Method, apparatus, device, and storage medium for identifying beam spans

By automatically identifying the beam text and beam leads, combining the number of beam spans and two beam wires, efficient and automatic identification of beam spans is achieved, solving the problem of low identification efficiency in the existing technology.

CN114283414BActive Publication Date: 2025-08-01WANYI TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111320295.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-09
Publication Date
2025-08-01
Estimated Expiration
2041-11-09

AI Technical Summary

Technical Problem

In the prior art, the identification efficiency of beam spans is low, and relying on manual operations leads to inefficiency.

Method used

By automatically identifying the beam text and beam leads in the drawing, combining the number of beam spans and two beam lines, automatic identification of the target beam span is achieved.

Benefits of technology

It improves the recognition efficiency of beam spans, reduces manual operations, and improves the degree of automation of recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114283414B_ABST
    Figure CN114283414B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device, equipment and storage medium for identifying beam spans. Among them, the method includes: identifying at least one group of beam texts from the drawings; wherein each group of the beam texts includes: the number of beam spans; extracting the beam leads corresponding to each group of the beam texts; for each of the beam leads, identifying the two beam lines pointed to by the beam lead; and identifying the target beam span according to the number of beam spans and the two beam lines. The present application is used to solve the problem of low efficiency in identifying beam spans in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer-aided design technology, and particularly to a method, device, equipment and storage medium for identifying beam spans. Background Art

[0002] As one of the final product results of architectural design work, structural design drawings affect structural safety, construction progress, project quality and cost. Therefore, the review work of drawings is a very important part of architectural design work.

[0003] In structural design drawings, a common component is the beam span. At present, the identification of beam spans mostly relies on manual work. The drawing reviewers need to constantly look through the drawings, combine various information, and complete the identification of beam spans through manual calculation, resulting in low identification efficiency. Summary of the Invention

[0004] This application provides a method, device, equipment and storage medium for identifying beam spans, so as to solve the problem of low identification efficiency of beam spans in the prior art.

[0005] In a first aspect, an embodiment of this application provides a method for identifying beam spans, including:

[0006] Identifying at least one group of beam characters from the drawing; wherein, each group of the beam characters includes: the number of beam spans;

[0007] Extracting the beam leads corresponding to each group of the beam characters respectively;

[0008] For each of the beam leads, identifying the two beam lines pointed to by the beam lead; and identifying the target beam span according to the number of beam spans and the two beam lines.

[0009] Optionally, the extracting the beam leads corresponding to each group of the beam characters respectively includes:

[0010] Judging whether the beam characters and the beam leads in the drawing are on the same layer;

[0011] If so, within the layer where the beam characters are located, selecting the second line segment closest to the beam name number as the beam lead;

[0012] If not, within the preset range of the beam name number, extracting the second line segment perpendicular to the writing direction of the characters of the beam name number; if the number of the second line segments is 1, using the second line segment as the beam lead; if the number of the second line segments is greater than 1, extending the circumscribed rectangle of the beam name number along the writing direction by a preset dimension to obtain a new circumscribed rectangle, and using the second line segment intersecting with the new circumscribed rectangle as the beam lead.

[0013] Optionally, determining whether the beam text and the beam lead line in the drawing are on the same layer includes:

[0014] From each group of the beam text, identify the first quantity of the beam name numbers;

[0015] From the drawing, count the second quantity of all line segments on the same layer as the beam text;

[0016] Calculate the ratio of the second quantity to the first quantity;

[0017] Determine whether the ratio is less than a preset threshold. If so, determine that the beam text and the beam lead line in the drawing are on different layers; if not, determine that the beam text and the beam lead line in the drawing are on the same layer.

[0018] Optionally, identifying the two beam lines pointed to by the beam lead line includes:

[0019] From all the line segments in the drawing, exclude the wall column line segments and the beam lead line to obtain candidate beam lines;

[0020] From the candidate beam lines, search for a third line segment perpendicular to the beam lead line;

[0021] If the number of the third line segments is 1 and the beam lead line and the third line segment have a first intersection point, then use the third line segment as the first beam line;

[0022] If the number of the third line segments is greater than 1, then from each of the third line segments, screen out the third line segment that has a second intersection point with the beam lead line, and use the third line segment as the target third line segment; for each of the target third line segments, calculate the distances between the second intersection point and the two end points of the target third line segment; from each of the distances, select the minimum distance, and use the target third line segment corresponding to the minimum distance as the first beam line; use the end point corresponding to the minimum distance as the target end point;

[0023] Starting from the target end point, extend the beam lead line. If there is a third line segment that intersects the extended beam lead line, then select the third line segment that intersects the extended beam lead line and is parallel to the first beam line as the second beam line; if there is no third line segment that intersects the extended beam lead line, then along the extension direction of the beam lead line, select the third line segment closest to the target end point as the second beam line;

[0024] Use the first beam line and the second beam line as the two beam lines.

[0025] Optionally, identifying the target beam span according to the number of the beam spans and the two beam lines includes:

[0026] For the case where the number of the beam spans is 1, for each of the two beam lines, the beam span formed by the first beam line and the second beam line is taken as a single beam span, and the single beam span is taken as the target beam span;

[0027] For the case where the number of the beam spans is greater than 1, for each of the two beam lines, the beam span formed by the first beam line and the second beam line is taken as a reference beam span, and the number of the beam spans is bound to the reference beam span; according to the writing direction of the beam text, the direction of the beam span is determined; along the direction of the beam span, spans are searched at both ends of the reference beam span to obtain associated beam spans;

[0028] Each of the associated beam spans and each of the reference beam spans are taken as candidate beam spans to obtain a candidate beam span list;

[0029] Each of the candidate beam spans in the candidate beam span list is divided into spans to obtain the target beam span.

[0030] Optionally, the searching for spans at both ends of the reference beam span to obtain associated beam spans includes:

[0031] For each end of the reference beam span, supports are searched, and within a specified range of the supports, two parallel beam lines with an included angle with the reference beam span within a preset angle range are searched, and the two parallel beam lines are taken as the associated beam spans.

[0032] Optionally, the dividing each of the candidate beam spans in the candidate beam span list into spans to obtain the target beam span includes:

[0033] Sorting each of the candidate beam spans in a preset order;

[0034] In the arranged order, each of the candidate beam spans is sequentially placed into a stack. During the process of sequentially placing each of the candidate beam spans into the stack, for each candidate beam span placed into the stack, it is judged whether the candidate beam span is the reference beam span;

[0035] If so, the number of the beam spans corresponding to the reference beam span is recorded in a counter; it is judged whether the number of the candidate beam spans currently existing in the stack is the same as the number of the beam spans; if the same, the associated beam spans in the current stack and the reference beam span corresponding to the beam lead are taken as a group, and the counter is cleared, and the next candidate beam span is placed into the stack; otherwise, the next candidate beam span is continuously placed into the stack, and it is again judged whether the number of the candidate beam spans currently existing in the stack is the same as the number of the beam spans;

[0036] If not, the next candidate beam span is continuously placed into the stack.

[0037] In a second aspect, an embodiment of the present application provides a beam span identification device, including:

[0038] A first identification module, configured to identify at least one group of beam texts from a drawing; wherein, each group of the beam texts includes: the number of beam spans;

[0039] An extraction module, configured to extract the beam leads corresponding to each group of the beam texts;

[0040] A second identification module, configured to, for each of the beam leads, identify the two beam lines pointed to by the beam lead; and identify a target beam span according to the number of beam spans and the two beam lines.

[0041] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory, and a communication bus, wherein the processor and the memory communicate with each other through the communication bus;

[0042] The memory is configured to store a computer program;

[0043] The processor is configured to execute the program stored in the memory to implement a beam span identification method described in the first aspect.

[0044] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, it implements a beam span identification method described in the first aspect.

[0045] The above technical solutions provided by the embodiments of the present application have the following advantages compared with the prior art: The method provided by the embodiments of the present application identifies at least one group of beam texts from a drawing; wherein, each group of the beam texts includes: the number of beam spans; extracts the beam leads corresponding to each group of the beam texts; for each of the beam leads, identifies the two beam lines pointed to by the beam lead; and identifies a target beam span according to the number of beam spans and the two beam lines. The method provided by the embodiments of the present application can automatically identify beam spans and effectively improve the identification efficiency of beam spans. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present invention, and are used together with the specification to explain the principles of the present invention.

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.

[0048] Figure 1 Schematic flow chart of a method for identifying beam spans provided by an embodiment of the present application;

[0049] Figure 2 Schematic diagram of beam leads and beam characters provided by an embodiment of the present application;

[0050] Figure 3 Schematic diagram for identifying beam leads provided by an embodiment of the present application;

[0051] Figure 4 Schematic diagram of a method for finding spans provided by an embodiment of the present application;

[0052] Figure 5 Schematic flow chart of a method for dividing spans provided by an embodiment of the present application;

[0053] Figure 6 Schematic structural diagram of a beam span identification device provided by an embodiment of the present application;

[0054] Figure 7 Schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0055] To make the objectives, 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 accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0056] In the embodiments of the present application, to solve the problem of low efficiency in identifying beam spans in the prior art, a method for identifying beam spans is proposed, which does not require manual operation and effectively improves the efficiency of identifying beam spans. This method can be applied to any type of electronic device. For example, the electronic device can be a computer, a server, a tablet computer, or a mobile phone, etc.

[0057] As Figure 1 shown, the embodiments of the present application provide a method for identifying beam spans, which specifically includes the following steps:

[0058] Step 101, identify at least one group of beam characters from the drawing; wherein, each group of beam characters includes: the number of beam spans;

[0059] Specifically, first, identify text primitives from the drawing, and screen out beam texts from the text primitives. Specifically, the beam texts can be identified from numerous text primitives by identifying keywords. As shown in Table 1, Table 1 shows the main categories of beam texts and the corresponding feature descriptions.

[0060] Table 1 Main categories of beam texts and the corresponding feature descriptions

[0061]

[0062] In the drawing, a set of beam spans generally contains a centralized annotation (a set of beam texts). Among them, for multi-beam spans, it may also contain in-situ annotations corresponding to each beam span respectively. The in-situ annotation is located near each beam span and identifies some attribute information of the beam span.

[0063] Step 102: Extract the beam leads corresponding to each set of beam texts.

[0064] The beam lead is a line segment perpendicular to the writing direction of the beam text. As Figure 2 shown, the part indicated by the dashed box 201 is the beam text. Among them, only some beam texts are exemplarily given in the figure; the line segment 202 next to the dashed box 201 is the beam lead.

[0065] In the actual drawing process, usually the beam lead and the beam text are on the same layer. However, different designers have different working habits. Some designers do not strictly follow this good drawing habit during the drawing process, resulting in some beam leads in the drawing may be on different layers from the beam text. Considering this actual situation, first, judge whether the beam lead and the beam text are on the same layer, which specifically includes the following steps:

[0066] Identify the first quantity of the beam name number from the beam text; count the second quantity of all line segments on the same layer as the beam text from the drawing; calculate the ratio of the second quantity to the first quantity; judge whether the ratio is less than the preset threshold. If so, within the preset range of the beam name number, extract the second line segment perpendicular to the writing direction of the beam name number. If the number of the second line segments is 1, take the second line segment as the beam lead; if the number of the second line segments is greater than 1, extend the circumscribed rectangle of the beam name number along the writing direction by a preset dimension to obtain a new circumscribed rectangle, and take the second line segments intersecting with the new circumscribed rectangle as the beam lead; otherwise, select the second line segment closest to the beam name number within the layer where the beam text is located as the beam lead. When multiple line segments are identified, the method of extending the circumscribed rectangle of the beam name number along the writing direction by a preset dimension to obtain a new circumscribed rectangle and taking the second line segments intersecting with the new circumscribed rectangle as the beam lead can also be adopted.

[0067] Among them, when the ratio is less than the preset threshold, it is considered that some beam leads and beam texts are on different layers. Then, using the positional relationship between the beam lead and the direction of the beam text, specifically, the positional relationship between the beam lead and the beam name number can be used. For example, the positional relationship where the beam lead is perpendicular to the writing direction of the text of the beam name number is used to determine the second line segment as the alternative beam lead. If there is only one second line segment, then this second line segment is the beam lead.

[0068] If the number of alternative beam leads is more than one, as Figure 3 shown, if there are two second line segments perpendicular to the writing direction of the text of the beam name number, then extend the circumscribed rectangle 301 of the beam name number along the writing direction by a preset dimension. For example, Figure 3 the parts shown as 302 and 303 in

[0069] to obtain a new circumscribed rectangle. Among the two second line segments, the line segment indicated by 304 intersects with the new circumscribed rectangle, then the second line segment 304 is the beam lead; and the other line segment perpendicular to the beam name number may be the beam lead of another beam text.

[0070] In the drawing, the beam lead is perpendicular to the two beam lines, and the beam lead has an intersection point with one of the beam lines close to the beam text. From the positional relationship between the beam lead and the two beam lines, extract the two beam lines from various lines in the drawing.

[0071] Specifically, exclude the wall column line segments and beam leads from all line segments in the drawing to obtain candidate beam lines; search for the third line segment perpendicular to the beam lead from the candidate beam lines; if the number of third line segments is 1 and the beam lead has a first intersection point with the third line segment, then use the third line segment as the first beam line;

[0072] If the number of third line segments is greater than 1, then screen out the third line segments that have a second intersection point with the beam lead from each third line segment, and use the third line segment as the target third line segment; for each target third line segment, calculate the distances between the second intersection point and the two endpoints of the target third line segment; select the minimum distance from each distance, and use the target third line segment corresponding to the minimum distance as the first beam line; use the endpoint corresponding to the minimum distance as the target endpoint;

[0073] Starting from the target endpoint, extend the beam lead. If there is a third line segment that intersects with the extended beam lead, then select the third line segment that intersects with the extended beam lead and is parallel to the first beam line as the second beam line; if there is no third line segment that intersects with the extended beam lead, then along the extended direction of the beam lead, select the third line segment closest to the target endpoint as the second beam line; use the first beam line and the second beam line as the two beam lines.

[0074] Recognizing two beam lines is an important basis for subsequent recognition of the target beam span. Then, in combination with the number of beam spans in the beam text, the target beam span is comprehensively recognized.

[0075] In a drawing, it usually includes: single beam span and multiple beam spans:

[0076] For a single beam span, the number of beam spans is 1. Refer to Figure 2 the text 1 in the parentheses of Figure 3 which represents that there is only one beam span, i.e., a single beam span; for multiple beam spans, the number of beam spans is greater than 1. Refer to

[0077] Specifically, if through text recognition, it is recognized that the number of beam spans in the beam text is 1, then the beam span formed by the first beam line and the second beam line is used as a single beam span, and the single beam span is used as the target beam span.

[0078] If through text recognition, it is recognized that the number of beam spans in the beam text is greater than 1, then for each pair of beam lines, the beam span formed by the first beam line and the second beam line is used as a reference beam span, and the number of beam spans is bound to the reference beam span; according to the writing direction of the beam text, the direction of the beam span is determined; along the direction of the beam span, spans are found at both ends of the reference beam span to obtain associated beam spans; each associated beam span and each reference beam span are used as candidate beam spans to obtain a list of candidate beam spans; the candidate beam spans in the list of candidate beam spans are divided into spans to obtain the target beam span.

[0079] Specifically, in order to reduce interference, the single beam spans in the drawing can be recognized first, and then the multiple beam spans are recognized in the remaining lines.

[0080] In the embodiment of the present application, at least one group of beam text is recognized from the drawing; wherein, each group of beam text includes: the number of beam spans; the beam leads corresponding to each group of beam text are extracted; for each beam lead, the two beam lines pointed to by the beam lead are recognized; according to the number of beam spans and the two beam lines, the target beam span is recognized. The method provided by the embodiment of the present application can automatically recognize the beam span and effectively improve the recognition efficiency of the beam span.

[0081] In a specific embodiment, finding spans at both ends of the reference beam span to obtain associated beam spans includes:

[0082] For each end of the reference beam span, a support is searched for, and within the specified range of the support, two parallel beam lines with an included angle within a preset angle range with the reference beam span are searched for, and the two parallel beam lines are used as the associated beam spans.

[0083] Taking one end as an example, the other end is also spanned in the same way. Specifically, taking the left end of the reference beam span as an example for spanning, search for supports near the left end line of the reference beam span. Among the remaining lines, search for beam lines near the supports, and the included angle between the beam line and the reference beam span needs to be within a preset angle range. Combine the two qualified parallel beam lines into a group of beam lines as a beam span matched on the left side and save it to the candidate beam span list. Then continue to search along the direction of the beam span. If no beam span is found, search for the beam span on the right side and save it to the candidate beam span list.

[0084] During the actual process of searching for beam spans, if there are multiple beam spans whose included angles with the reference beam span are within the preset angle range, calculate the included angles with the reference beam span one by one, compare their magnitudes, and take the beam span with the smallest included angle as the next found beam span.

[0085] Among them, the preset angle range can be set in advance according to actual needs. For example, the preset angle range is set to 45°.

[0086] Taking Figure 4 as an example, the beam span with beam text in the middle is the reference beam span 401. Search for supports (the hatched part) on the left side of the reference beam span 401. Along the direction of the reference beam span, that is, search for associated beam spans in the horizontal direction as seen from Figure 4 . Among Figure 4 , the included angles between the beam spans indicated by label 402 and label 403 and the reference beam span are 90 degrees, exceeding the preset angle range and not belonging to the associated beam spans of this reference beam span. While the included angle between the beam span indicated by label 404 and the reference beam span is less than the preset angle range, so the beam span indicated by label 404 is used as the associated beam span of this reference beam span.

[0087] In a specific embodiment, as Figure 5 shown, the embodiment of the present application also provides a method for dividing each candidate beam span into spans, which specifically includes the following steps:

[0088] Step 501, sort each candidate beam span in a preset order;

[0089] In specific implementation, the sorting can be performed according to the positions of the candidate beam spans in the drawing, with the leftmost in the drawing being in the front and the rightmost in the drawing being in the back.

[0090] Step 502, sequentially put each candidate beam span into the stack according to the arranged order;

[0091] Step 503, for each candidate beam span put into the stack, determine whether the candidate beam span is a reference beam span; if it is, execute Step 504 and Step 505; if not, execute Step 508;

[0092] When determining whether a candidate beam span is a reference beam span, it can be judged whether the candidate beam span has bound beam text. Specifically, it can be determined by judging whether the candidate beam span has the number of bound beam spans. If so, it indicates that the candidate beam span is a reference beam span; otherwise, it is determined that the candidate beam span is an associated beam span.

[0093] Step 504; Record the number of beam spans corresponding to the reference beam span in the counter;

[0094] Step 505, judge whether the number of candidate beam spans currently existing in the stack is the same as the number of beam spans; if the same, execute Step 506; if different, execute Step 507;

[0095] Step 506, group the associated beam spans in the current stack and the reference beam span corresponding to the beam lead, clear the counter, put the next candidate beam span into the stack, and execute Step 503;

[0096] Step 507, continue to put the next candidate beam span into the stack, and execute Step 505;

[0097] Step 508, continue to put the next candidate beam span into the stack, and execute Step 503.

[0098] To facilitate the understanding of the process of beam span division, an example is given here. If the sorted candidate beam spans are candidate beam spans 1 to 3; among them, candidate beam span 1 is an associated beam span, candidate beam span 2 is a reference beam span, and candidate beam span 3 is an associated beam span; then after putting candidate beam span 1 into the stack, candidate beam span 1 does not have the number of bound beam spans, so it is determined that the candidate beam span is an associated beam span, and then the next candidate beam span is put into the stack, that is, candidate beam span 2 is put into the stack. Candidate beam span 2 has the number of bound beam spans, so candidate beam span 2 is a reference beam span, and the number of beam spans bound by the reference beam span obtained from it is 3. At this time, there are 2 candidate beam spans in the stack, so the number of currently existing candidate beam spans is different from the number of beam spans. Continue to put the next candidate beam span into the stack, that is, candidate beam span 3 is put into the stack. Candidate beam span 3 does not have the number of bound beam spans, so it is determined that the candidate beam span is an associated beam span. At this time, there are 3 candidate beam spans in the stack, and the number of currently existing candidate beam spans is the same as the number of beam spans. Group the associated beam spans in the current stack and the reference beam span corresponding to the beam lead, and clear the counter. If there is a next candidate beam span, put the next candidate beam span into the stack.

[0099] Through the above method of beam span division, the associated beam spans associated with the reference beam span can be matched to obtain multiple beam spans.

[0100] In addition, after identifying multiple beam spans, for each beam span, search for the in-situ annotation text nearby; and correct and understand the position of the in-situ annotation text. For multiple beam spans, if there is no in-situ annotation near a certain beam span, it means that the attribute information of this beam span is the same as that in the centralized annotation. If there is an in-situ annotation, take the in-situ annotation as the standard to obtain the annotation information of each beam span. For each beam span, associate and store the beam span and the annotation information for subsequent use.

[0101] To facilitate the understanding of a method for identifying beam spans provided by an embodiment of the present application, the entire identification process will be further described below in combination with specific steps.

[0102] The first step: Identify beam text

[0103] From all text primitives, screen out the primitives that conform to the characteristics of beam text (corresponding to the centralized annotation of the beam), and store them classified. See the classification of beam text and the corresponding feature descriptions in Figure 1 .

[0104] The second step: Identify beam leads based on beam text

[0105] From the beam text, count the number A of beam name numbers, count the number B of line segments on the same layer as the beam text, calculate the ratio C of B to A. If C is less than the set threshold, it is considered that the beam lead and the beam text are on different layers, and method 1 is executed; otherwise, method 2 is executed;

[0106] Method 1:

[0107] Search for line segments near each beam name number (for example: within the preset range of the beam name number) and perpendicular to the direction of the beam name number;

[0108] If the number of line segments is equal to 1, group this line segment with the corresponding beam name as a beam lead;

[0109] If the number of line segments is greater than or equal to 2, extend the circumscribed rectangle of the beam name number along the text writing direction by a preset size to obtain a new circumscribed rectangle, and use the second line segment intersecting with the new circumscribed rectangle as the beam lead;

[0110] Method 2:

[0111] According to the layer where the beam text is located, screen out all beam leads belonging to this layer;

[0112] Among all beam leads, search for beam leads near each beam name number (for example: within the preset range of the beam name number), and search for beam leads perpendicular to the beam name number from them as the beam leads corresponding to the beam text.

[0113] The third step: Identify two parallel beam lines based on beam leads

[0114] 1) Identify the first beam line indicated by the beam lead

[0115] From all the line segments on the drawing, exclude the wall column line segments and beam leads to obtain a list of candidate beam lines BEAM_LINE_LIST;

[0116] In the list of candidate beam lines BEAM_LINE_LIST, search for the line segment L1 near each beam lead and perpendicular to the beam lead;

[0117] If a line segment is found, calculate the intersection point of the beam lead and the line segment L1. If the intersection points are respectively within the lead and the line segment, then take the line segment L1 as the correct first beam line;

[0118] If the number of found line segments is more than 1, calculate the intersection points of the beam lead and each line segment in the line segment list;

[0119] Judge whether the intersection points are respectively within the beam lead and the line segment. If not, delete the line segment from the line segment list; then calculate the minimum distance from each line segment intersection point to the beam lead endpoint, and take the line segment with the minimum distance as the correct first beam line;

[0120] 2) Identify the second beam line indicated by the beam lead

[0121] Filter the remaining beam lines from all the beam lines;

[0122] Based on the endpoint of the beam lead within the beam span, extend the beam lead by a certain range, and search in the remaining beam lines for the line segment that intersects the extended range and is parallel to the first beam line;

[0123] Determine the line that is along the extension direction of the beam lead and closest to the beam lead endpoint as the second beam line.

[0124] Step 4: Identify single beam spans and multi-beam spans

[0125] According to the number of spans (the number of beam spans) in the beam text, it can be divided into single beam spans and multi-beam spans. The single beam span can be determined based on the above-identified beam text and two beam lines. After identifying all the single beam spans, the process of identifying multi-beam spans in the remaining beam lines is as follows:

[0126] 1) Identify multi-spans

[0127] 1.1 For the remaining beam lines, group them in pairs according to parallelism and form a list of supports based on the beam line groups and the lower-layer wall column contours;

[0128] 1.2 For each beam span with a beam lead, if the number of spans is greater than 1, then perform the following steps to find the span;

[0129] 1.3 Determine the beam span direction, as well as the left and right end lines of the beam span, according to the text direction of the beam;

[0130] 1.4 Search for spans at both ends of the beam span and save them to the candidate beam span list. Taking the search for spans at the left end as an example, the description is as follows:

[0131] 1.4.1 Search for supports near the left end line;

[0132] 1.4.2 Among the remaining beam lines, search for the beam lines near the support. The searched beam lines need to meet the condition that the included angle with the current beam line is within the set range;

[0133] 1.4.3 If two parallel beam lines that meet the conditions are found, form a group of beam lines as the next beam span matched on the left;

[0134] 1.4.4 Save it to the candidate beam span list;

[0135] 1.4.5 If there are no beam lines for the next span that meet the conditions, if a beam span with a beam lead is found, also save it to the candidate beam span list;

[0136] 1.4.6 Update the pointer of the current beam span to point to the next beam span that has been matched;

[0137] 1.4.7 Based on the updated pointer of the current beam span, continue to search for the next beam span to the left;

[0138] 1.4.8 If no beam span is found, exit;

[0139] 1.5 Search for beam spans on the right and save them to the candidate beam span list;

[0140] 1.6 Add the current beam span with a beam lead to the candidate beam span list;

[0141] 1.7 For all candidate beam span lists that may form multi - spans, execute the span - splitting algorithm as follows:

[0142] 1.7.1 Sort the candidate beam span list according to coordinates;

[0143] 1.7.2 Initialize the multi - span stack;

[0144] 1.7.3 Pop each span from the candidate beam span list in turn and insert it into the multi - span stack;

[0145] 1.7.4 If a beam span with a beam lead (reference beam span) is encountered, record the number of beam spans to the counter;

[0146] 1.7.5 Judge whether the current number of the multi - span stack is equal to the number of beam spans;

[0147] 1.7.6 If they are equal, incorporate the beam spans in the multi-span stack into this beam span (the reference beam span) and clear the counter.

[0148] 1.7.7 If they are not equal, continue to traverse the next beam span.

[0149] 1.8 For all beam spans, search for the supports near both ends of the beam span and update the left and right support attributes of the beam span.

[0150] 2) For each beam span, search for the in-situ annotation text nearby.

[0151] 2.1 Search for the text within a certain range near the beam span.

[0152] 2.2 Determine whether the text direction is parallel to the beam span direction and filter out the non-parallel text.

[0153] 2.3 Calculate the closest distance between the text and the beam span and filter out the text that exceeds the distance threshold.

[0154] 2.4 Take the remaining text as the eligible in-situ annotation text and assign it to the current beam span.

[0155] 2.5 Mark the position of the in-situ annotation text according to the left, middle, right, and lower, lower positions of the text coordinates relative to the beam span coordinates.

[0156] 2.6 For the remaining unassigned text, search for the nearby beam spans. If there are multiple beam spans, calculate the distance between the text and the beam spans and assign the text to the beam span with the closest distance as the in-situ annotation text of this beam span.

[0157] 3) Position correction and understanding of the in-situ annotation text

[0158] a) For the in-situ annotation text above the beam span, re-determine the position according to the following principles;

[0159] i. If there is only one top reinforcement, assign the top reinforcement according to whether it is on the left or right.

[0160] ii. If there are two top reinforcements, assign them to the left and right respectively, and decide whether to assign the middle one according to the situation.

[0161] ① When there are special marks such as "continuous reinforcement 2C25", "continuous 2C25", "2C25 (underlined)", "2C25 (T)", "2C25 + (2C14)", etc., it is considered as the middle reinforcement.

[0162] ② Without the above identifiers, as long as the steel bar string is strictly in the middle and its length is within 1 / 3 of the beam width, it is considered as the middle reinforcement.

[0163] ③ Replace the continuous reinforcement read from the centralized annotation of this span with the in-situ marked middle top reinforcement.

[0164] iii. If there are 3 gluten, they are assigned according to the left, middle and right division.

[0165] b) For the in-situ marking text below the beam span, it is understood according to the following principles:

[0166] i. The in-situ bottom reinforcement that does not anchor into the support is preferentially recognized;

[0167] ii. If there is filling or marking description in a single-sided beam span, the in-situ bottom reinforcement is only assigned the beam attributes at the marked position;

[0168] iii. If there is one bottom reinforcement text and there is no filling or marking description, it is reused for all bottom reinforcements in this span;

[0169] c) For the in-situ marking text above the multi-span beam, assign the in-situ longitudinal reinforcement marking of the adjacent span;

[0170] i. Arrange the multi-span beams in sequence;

[0171] For each span of the beam, if the in-situ markings above both ends are empty, obtain the in-situ longitudinal reinforcement markings of the adjacent span.

[0172] 4) Store the information identified by the beam in an associated manner

[0173] For a multi-span beam, if there is no in-situ marking near a certain beam span, it means that the attribute information of this beam span is the same as that in the centralized marking. If there is an in-situ marking, the in-situ marking shall prevail.

[0174] In addition, based on the same concept, an in-situ marking device for beam spans is provided in the embodiments of the present application. For the specific implementation of this device, reference can be made to the description in the method embodiment part, and the repeated parts will not be elaborated. As Figure 6 shown, this device mainly includes:

[0175] The first recognition module 601 is used to recognize at least one group of beam texts from the drawing; wherein, each group of the beam texts includes: the number of beam spans;

[0176] The extraction module 602 is used to extract the beam leads corresponding to each group of the beam texts;

[0177] The second recognition module 603 is used to, for each of the beam leads, recognize the two beam lines pointed to by the beam lead; according to the number of beam spans and the two beam lines, recognize the target beam span.

[0178] In a specific embodiment, the extraction module 602 is configured to determine whether the beam text and the beam lead line in the drawing are on the same layer; if so, within the layer where the beam text is located, select the second line segment closest to the beam name number as the beam lead line; if not, within the preset range of the beam name number, extract the second line segment perpendicular to the writing direction of the text of the beam name number; if the number of the second line segments is 1, use the second line segment as the beam lead line; if the number of the second line segments is greater than 1, extend the circumscribed rectangle of the beam name number by a preset dimension along the writing direction to obtain a new circumscribed rectangle, and use the second line segment intersecting with the new circumscribed rectangle as the beam lead line.

[0179] In a specific embodiment, the extraction module 602 is configured to identify the first quantity of the beam name numbers from each group of the beam texts; count the second quantity of all the line segments on the same layer as the beam text in the drawing; calculate the ratio of the second quantity to the first quantity; determine whether the ratio is less than a preset threshold, and if so, determine that the beam text and the beam lead line in the drawing are on different layers; if not, determine that the beam text and the beam lead line in the drawing are on the same layer.

[0180] In a specific embodiment, the second recognition module 603 is configured to exclude the wall column line segments and the beam lead line from all the line segments in the drawing to obtain candidate beam lines; search for the third line segments perpendicular to the beam lead line from the candidate beam lines; if the number of the third line segments is 1 and the beam lead line and the third line segment have a first intersection point, use the third line segment as the first beam line; if the number of the third line segments is greater than 1, screen out the third line segments having a second intersection point with the beam lead line from each of the third line segments, and use the third line segment as the target third line segment; for each of the target third line segments, calculate the distances between the second intersection point and the two end points of the target third line segment; select the minimum distance from each of the distances, and use the target third line segment corresponding to the minimum distance as the first beam line; use the end point corresponding to the minimum distance as the target end point; starting from the target end point, extend the beam lead line, and if there is a third line segment intersecting with the extended beam lead line, select the third line segment intersecting with the extended beam lead line and parallel to the first beam line as the second beam line; if there is no third line segment intersecting with the extended beam lead line, select the third line segment closest to the target end point along the extension direction of the beam lead line as the second beam line; use the first beam line and the second beam line as the two beam lines.

[0181] In a specific embodiment, the second recognition module 603 is configured to, for the case where the number of beam spans is 1, for each of the two beam lines, take the beam span formed by the first beam line and the second beam line as a single beam span, and take the single beam span as the target beam span; for the case where the number of beam spans is greater than 1, for each of the two beam lines, take the beam span formed by the first beam line and the second beam line as a reference beam span, and bind the number of beam spans to the reference beam span; determine the direction of the beam span according to the writing direction of the beam text; along the direction of the beam span, find spans at both ends of the reference beam span to obtain associated beam spans; take each of the associated beam spans and each of the reference beam spans as candidate beam spans to obtain a candidate beam span list; and perform span division on each candidate beam span in the candidate beam span list to obtain the target beam span.

[0182] In a specific embodiment, the second recognition module 603 is configured to, for each end of the reference beam span, search for a support, and within a specified range of the support, search for two parallel beam lines whose included angle with the reference beam span is within a preset angle range, and take the two parallel beam lines as the associated beam spans.

[0183] In a specific embodiment, the second recognition module 603 is configured to sort each of the candidate beam spans in a preset order; in the order after sorting, sequentially place each of the candidate beam spans into a stack, and during the process of sequentially placing each of the candidate beam spans into the stack in order, for each candidate beam span placed into the stack, determine whether the candidate beam span is the reference beam span; if so, record the number of beam spans corresponding to the reference beam span in a counter; determine whether the number of candidate beam spans currently present in the stack is the same as the number of beam spans; if the same, take the associated beam spans in the current stack and the reference beam span corresponding to the beam lead as a group; and clear the counter, and place the next candidate beam span into the stack; otherwise, continue to place the next candidate beam span into the stack; and again determine whether the number of candidate beam spans currently present in the stack is the same as the number of beam spans; if not, continue to place the next candidate beam span into the stack.

[0184] Based on the same inventive concept, an electronic device is further provided in an embodiment of the present application, as Figure 7 shown. The electronic device mainly includes: a processor 701, a memory 702, and a communication bus 703. Among them, the processor 701 and the memory 702 complete mutual communication through the communication bus 703. Among them, a program executable by the processor 701 is stored in the memory 702, and the processor 701 executes the program stored in the memory 702 to implement the following steps:

[0185] Identify at least one set of beam text from the drawings; wherein, each set of the beam text includes: the number of beam spans;

[0186] Extract the beam leads corresponding to each set of the beam text respectively;

[0187] For each of the beam leads, identify the two beam lines pointed to by the beam lead; identify the target beam span according to the number of beam spans and the two beam lines.

[0188] The communication bus 703 mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus 703 can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, Figure 7 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

[0189] The memory 702 may include a Random Access Memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor 701.

[0190] The aforementioned processor 701 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 gate or transistor logic devices, discrete hardware components.

[0191] In another embodiment of the present application, a computer-readable storage medium is further provided. A computer program is stored in the computer-readable storage medium. When the computer program runs on a computer, the computer is enabled to execute a method for identifying a beam span described in the above embodiment.

[0192] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions are transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape, etc.), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state drive), etc.

[0193] It should be noted that in this document, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including", or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or device that includes a series of elements includes not only those elements but also other elements that are not explicitly listed, or also includes elements that are inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article, or device that includes the said element.

[0194] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for identifying beam spans, characterized in that, Including: Identifying at least one set of beam text from the drawing; wherein, each set of the beam text includes: the number of beam spans; Extracting the beam lead corresponding to each set of the beam text; For each of the beam leads, identifying the two beam lines pointed to by the beam lead; identifying the target beam span according to the number of beam spans and the two beam lines; Wherein, the identifying the two beam lines pointed to by the beam lead includes: Excluding wall column lines and the beam lead from all the line segments of the drawing to obtain candidate beam lines; Searching for a third line segment perpendicular to the beam lead from the candidate beam lines; If the number of the third line segments is 1 and the beam lead and the third line segment have a first intersection point, taking the third line segment as the first beam line; If the number of the third line segments is greater than 1, screening out the third line segments having a second intersection point with the beam lead from each of the third line segments, taking the third line segment as the target third line segment; for each of the target third line segments, calculating the distances between the second intersection point and the two end points of the target third line segment; selecting the minimum distance from each of the distances, taking the target third line segment corresponding to the minimum distance as the first beam line; taking the end point corresponding to the minimum distance as the target end point; Taking the target end point as the starting point, extending the beam lead, if there is a third line segment intersecting with the extended beam lead, selecting the third line segment intersecting with the extended beam lead and parallel to the first beam line as the second beam line; if there is no third line segment intersecting with the extended beam lead, selecting the third line segment closest to the target end point along the extension direction of the beam lead as the second beam line; Taking the first beam line and the second beam line as the two beam lines; The identifying the target beam span according to the number of beam spans and the two beam lines includes: For the case where the number of beam spans is 1, for each of the two beam lines, taking the beam span formed by the first beam line and the second beam line as a single beam span, taking the single beam span as the target beam span; For the case where the number of beam spans is greater than 1, for each of the two beam lines, taking the beam span formed by the first beam line and the second beam line as a reference beam span, binding the number of beam spans to the reference beam span; determining the direction of the beam span according to the writing direction of the beam text; finding spans at both ends of the reference beam span along the direction of the beam span to obtain associated beam spans; Taking each of the associated beam spans and each reference beam span as candidate beam spans to obtain a candidate beam span list; Performing span division on each candidate beam span in the candidate beam span list to obtain the target beam span.

2. The method for identifying a beam span according to claim 1, wherein The extracting the beam lead corresponding to each set of the beam text includes: Judging whether the beam text and the beam lead in the drawing are on the same layer; If so, within the layer where the beam text is located, selecting the second line segment closest to the beam name number as the beam lead; If not, within the preset range of the beam name number, extract a second line segment perpendicular to the writing direction of the text of the beam name number; if the number of the second line segments is 1, use the second line segment as the beam lead; if the number of the second line segments is greater than 1, extend the circumscribed rectangle of the beam name number along the writing direction by a preset dimension to obtain a new circumscribed rectangle, and use the second line segments intersecting with the new circumscribed rectangle as the beam lead.

3. The method for identifying the beam span according to claim 2, characterized in that, The determination of whether the beam text and the beam lead in the drawing are on the same layer includes: From each group of the beam text, identify the first quantity of the beam name number; From the drawing, count the second quantity of all line segments on the same layer as the beam text; Calculate the ratio of the second quantity to the first quantity; Determine whether the ratio is less than a preset threshold. If so, determine that the beam text and the beam lead in the drawing are on different layers; if not, determine that the beam text and the beam lead in the drawing are on the same layer.

4. The method for identifying a beam span according to claim 1, wherein The finding of the associated beam spans at both ends of the reference beam span includes: For each end of the reference beam span, find the supports, and within the specified range of the supports, find two parallel beam lines whose included angle with the reference beam span is within a preset angle range, and use the two parallel beam lines as the associated beam spans.

5. The beam span identification method according to claim 1, characterized in that, The splitting of each candidate beam span in the candidate beam span list to obtain the target beam span includes: Sort each of the candidate beam spans in a preset order; In the arranged order, sequentially put each of the candidate beam spans into a stack. During the process of sequentially putting each of the candidate beam spans into the stack, for each candidate beam span put into the stack, determine whether the candidate beam span is the reference beam span; If so, record the quantity of the beam span corresponding to the reference beam span in a counter; determine whether the quantity of the candidate beam spans currently existing in the stack is the same as the quantity of the beam spans; if the same, use the associated beam spans in the current stack and the reference beam span corresponding to the beam lead as a group, clear the counter, and put the next candidate beam span into the stack; otherwise, continue to put the next candidate beam span into the stack, and again determine whether the quantity of the candidate beam spans currently existing in the stack is the same as the quantity of the beam spans; If not, continue to put the next candidate beam span into the stack.

6. An identifying device for beam spans, characterized in that, including: A first recognition module for recognizing at least one group of beam text from the drawing; wherein, each group of the beam text includes: the quantity of beam spans; An extraction module for extracting the beam lead corresponding to each group of the beam text; A second recognition module for, for each of the beam leads, recognizing the two beam lines pointed to by the beam lead; and recognizing the target beam span according to the quantity of the beam spans and the two beam lines; Wherein, the recognition of the two beam lines pointed to by the beam lead includes: Excluding wall column line segments and the beam lead from all line segments of the drawing to obtain candidate beam lines; Search for a third line segment perpendicular to the beam lead from the candidate beam lines; If the number of the third line segments is 1 and the beam lead has a first intersection point with the third line segment, then use the third line segment as the first beam line; If the number of the third line segments is greater than 1, then screen out the third line segments that have a second intersection point with the beam lead from each of the third line segments, and use the third line segments as the target third line segments; for each of the target third line segments, calculate the distances between the second intersection point and the two end points of the target third line segment; select the minimum distance from each of the distances, and use the target third line segment corresponding to the minimum distance as the first beam line; use the end point corresponding to the minimum distance as the target end point; Starting from the target end point, extend the beam lead. If there are third line segments that intersect with the extended beam lead, then select the third line segments that intersect with the extended beam lead and are parallel to the first beam line as the second beam line; if there are no third line segments that intersect with the extended beam lead, then select the third line segment that is closest to the target end point along the extension direction of the beam lead as the second beam line; Use the first beam line and the second beam line as the two beam lines; The identifying the target beam spans according to the number of the beam spans and the two beam lines includes: For the case where the number of the beam spans is 1, for each of the two beam lines, use the beam span formed by the first beam line and the second beam line as a single beam span, and use the single beam span as the target beam span; For the case where the number of the beam spans is greater than 1, for each of the two beam lines, use the beam span formed by the first beam line and the second beam line as a reference beam span, and bind the number of the beam spans to the reference beam span; determine the direction of the beam span according to the writing direction of the beam text; along the direction of the beam span, find spans at both ends of the reference beam span to obtain associated beam spans; Use each of the associated beam spans and each of the reference beam spans as candidate beam spans to obtain a candidate beam span list; Perform span division on each of the candidate beam spans in the candidate beam span list to obtain the target beam spans.

7. An electronic device, characterized in that, Including: A processor, a memory and a communication bus, wherein the processor and the memory complete mutual communication through the communication bus; The memory is used for storing a computer program; The processor is used for executing the program stored in the memory to implement a method for identifying a beam span according to any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that, The computer program, when executed by the processor, implements a method for identifying a beam span according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Quick automatic identification method for beam member in beam structure planar engineering drawing

    CN101447024A

  • Engineering drawing recognition system and method based on longitudinal and transverse beams, and template arrangement system and method

    CN105302930A