Beam span identification method, device and equipment of vector graph paper and readable storage medium
By identifying key beam span points from the matrix representation of vector drawings, determining the beam span type, and mapping it to the target vector drawing, the problem of beam span recognition accuracy and attribute matching in CAD drawings is solved, achieving high-precision beam span primitive recognition and applicability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GLODON CO LTD
- Filing Date
- 2022-02-16
- Publication Date
- 2026-04-17
AI Technical Summary
Existing technologies struggle to accurately identify beam spans in CAD drawings, especially due to inconsistencies in the drawing habits of different designers, leading to errors in beam span identification accuracy and attribute matching.
By identifying key beam span points from the matrix representation of the target vector drawing, determining the beam span type, and mapping its position to the target vector drawing, the beam span primitives can be automatically identified using key beam span points, thus avoiding the limitations of feature matrix design.
It achieves accurate identification and attribute matching of beam span elements, improves identification accuracy and applicability, is applicable to different drawing methods, and reduces dependence on drawing habits.
Smart Images

Figure CN116665241B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of drawing recognition technology, specifically to a method, apparatus, device, and readable storage medium for beam span recognition in vector drawings. Background Technology
[0002] As a common component in building construction, beams can be subjected to various stress equilibrium conditions. In the process of drawing CAD engineering drawings, beams are usually drawn on multiple line segments. When identifying beam elements in CAD drawings, these line segments need to be divided according to the support positions at both ends of the beam to identify the area of each beam span. If the beam span is identified incorrectly, it will not only affect the identification of the position information of the beam element, but also lead to incorrect matching of its attribute information, thus affecting its identification accuracy.
[0003] Currently, machine learning algorithms or deep learning are commonly used to identify beam spans. However, machine learning-based beam span identification in vector drawings mainly involves extracting features such as in-situ annotations at supports and reinforcement lines. This requires highly refined feature extraction, necessitating the design of suitable feature matrices based on actual business needs, and its generalization ability cannot be guaranteed. Deep learning methods, such as object detection and semantic segmentation, struggle to directly identify beam span locations and match beam spans with their in-situ and centralized annotation information. Furthermore, different designers have different drawing habits, some even highly non-standard, making it difficult to ensure the applicability of the aforementioned methods to all designers' drawing habits, thus compromising the accuracy of beam span identification. Therefore, achieving accurate beam span identification is a pressing issue. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a method, apparatus, device, and readable storage medium for beam span identification in vector drawings, so as to solve the problem that beam span elements in drawings are difficult to identify accurately.
[0005] According to a first aspect, embodiments of the present invention provide a method for beam span identification from vector graphics, comprising: acquiring a target vector graphics and a matrix representation corresponding to the target vector graphics; identifying beam span key points from the matrix representation, determining the beam span type based on the beam span key points; and mapping the positions of the beam span key points to the target vector graphics to obtain beam span primitives in the target vector graphics corresponding to the beam span type.
[0006] The beam span identification method for vector graphics provided in this invention identifies key beam span points from the matrix representation corresponding to the target vector graphics. Based on the beam span type determined by these key beam span points, the positions of the key beam span points are mapped onto the target vector graphics, achieving automatic identification of beam span elements corresponding to each beam span type in the target vector graphics. This method determines beam span elements through key beam span points, is not limited by the drawing method, and ensures the identification accuracy of beam span elements. This enables accurate identification of the positional information of beam elements, further guaranteeing accurate identification and attribute matching of beam elements.
[0007] In conjunction with the first aspect, in the first embodiment of the first aspect, identifying key beam span points from the matrix representation and determining the beam span type based on the key beam span points includes: obtaining multiple coordinate points in the matrix representation; parsing the beam span structural information corresponding to the multiple coordinate points; determining the beam span start point, beam span end point, and beam span implicit point based on the beam span structural information; and determining the beam span type based on the relationship between the beam span start point, beam span end point, and beam span implicit point.
[0008] The beam span identification method for vector drawings provided in this invention expresses the corresponding beam span structural information through an analytical matrix, determines multiple coordinate points corresponding to the beam span, and then determines key points such as the beam span start point, beam span end point, and hidden beam span points from these multiple coordinate points. Based on the positional relationship between the beam span start point, beam span end point, and hidden beam span points, the current beam span type is determined, thus realizing automatic identification of beam span types. This facilitates subsequent analysis of the beam's stress state by technicians based on the beam span type.
[0009] In conjunction with the first embodiment of the first aspect, in the second embodiment of the first aspect, the beam span type is determined based on the relationship between the beam span start point, the beam span end point, and the beam span implicit point, including: determining the beam span center point based on the beam span start point and the beam span end point; detecting whether the beam span implicit point overlaps with the beam span center point; when the beam span implicit point overlaps with the beam span center point, determining that the beam span is a normal beam span.
[0010] In conjunction with the second embodiment of the first aspect, in the third embodiment of the first aspect, the method further includes: when the implicit point of the beam span does not overlap with the center point of the beam span, obtaining the type of the implicit point of the beam span; when the type of the implicit point of the beam span is the center point of a curved beam, determining that the beam span is the beam span of a curved beam.
[0011] In conjunction with the third embodiment of the first aspect, in the fourth embodiment of the first aspect, the method further includes: when the type of the implicit point of the beam span is the bending point of a folded beam, determining that the beam span is the beam span of a folded beam.
[0012] The beam span identification method for vector graphics provided in this invention determines the beam span type based on the relationship between the beam span start point, the beam span end point, and the hidden points of the beam span, which facilitates accurate identification of beam span elements of various types in the target vector graphics.
[0013] In conjunction with any of the second to fourth embodiments of the first aspect, in the fifth embodiment of the first aspect, the method further includes: identifying beam span text information, detecting the positional relationship between the beam span text information and the center point of the beam span; and matching the beam span text information to the corresponding beam span based on the positional relationship.
[0014] The beam span recognition method for vector graphics provided in this invention identifies the beam span text information to determine the positional relationship between the beam span text information and the center point of the beam span, and matches the beam span text information to the corresponding beam span based on the positional relationship between the two, thereby achieving accurate matching of beam span graphic elements and their annotation information.
[0015] In conjunction with the first aspect, in the sixth embodiment of the first aspect, obtaining the target vector drawing and the matrix representation corresponding to the target vector drawing includes: obtaining the target vector drawing and the original vector coordinate system corresponding to the target vector drawing; converting the original vector coordinate system into a matrix coordinate system to obtain the matrix representation of the target vector drawing; wherein the matrix coordinate system is used to characterize the geometric structure of the beam span.
[0016] The beam span identification method for vector graphics provided in this invention obtains the original vector coordinate system corresponding to the target vector graphics paper, and then converts the original vector coordinate system into a matrix coordinate system to obtain the matrix representation of the target vector graphics paper. This matrix coordinate system is used to characterize the geometric structure of the beam span. This method eliminates the need to design different feature matrices based on different business requirements; it only needs to convert the original vector coordinate system corresponding to the target vector graphics paper into a matrix that can characterize the geometric structure of the beam span. This minimizes the limitations of business scenarios and improves its generalization and applicability.
[0017] In conjunction with the sixth embodiment of the first aspect, in the seventh embodiment of the first aspect, obtaining the target vector graphic paper includes: obtaining the element attribute information in the original vector graphic paper; filtering the interfering elements in the target vector graphic paper based on the element attribute information to obtain the target vector graphic paper.
[0018] The beam span identification method for vector graphics provided in this invention obtains the element attribute information in the original vector graphics paper. Based on this element attribute information, it can efficiently and accurately filter interfering elements in the target vector graphics paper, thereby obtaining the target vector graphics paper. This avoids interference from interfering elements in the identification of beam span elements, facilitating accurate identification of beam span elements in the subsequent process.
[0019] In conjunction with the first aspect, in the eighth embodiment of the first aspect, mapping the position of the beam span key point to the target vector map to obtain the beam span primitive corresponding to the beam span type in the target vector map includes: obtaining the current coordinates, current coordinate resolution, and vector coordinate resolution corresponding to the beam span key point; mapping the current coordinates to vector coordinates corresponding to the vector coordinate resolution based on the coordinate transformation relationship between the current coordinates, the current coordinate resolution, and the vector coordinate resolution; and matching the beam span key point with the primitive in the target vector map based on the vector coordinates corresponding to the beam span key point to obtain the beam span primitive in the target vector map, wherein the beam span primitive corresponds to the beam span type.
[0020] The beam span identification method for vector graphics provided in this invention identifies the position coordinates of key beam span points and maps them to the vector coordinate system of the target vector graphics paper. This allows the determination of the key beam span points' position information in the vector coordinates. By matching these key beam span points with graphic elements, the corresponding beam span graphic element in the target vector graphics paper can be identified. This method is not limited to a specific drawing method, maximizing the identification of beam span graphic elements from different drawing methods and improving the flexibility of beam span graphic element identification.
[0021] In conjunction with the first aspect, in the ninth embodiment of the first aspect, the method further includes: acquiring attribute information of the beam span element; detecting whether the attribute information meets preset conditions; and when the attribute information does not meet the preset conditions, re-identifying the beam span element in the target vector drawing.
[0022] The beam span recognition method for vector graphics provided in this invention, after automatically recognizing beam span elements, obtains the attribute information of the beam span elements and verifies the attribute information to determine whether it meets preset conditions. If it does not meet the preset conditions, it indicates that there is a recognition error, and the beam span elements in the target vector graphics need to be re-recognized and corrected, thereby ensuring the recognition accuracy of beam span elements.
[0023] In conjunction with the first aspect, in a tenth embodiment of the first aspect, the method further includes: in response to an identification operation of beam span elements, identifying and correcting beam span elements in the target vector drawing based on the identification operation.
[0024] The beam span recognition method for vector graphics provided in this invention can respond to the recognition operation of beam span elements by technicians, and then select the recognition area of the beam span elements to improve recognition efficiency and correct the position of recognition error, thereby further improving the recognition accuracy of beam span elements.
[0025] According to a second aspect, embodiments of the present invention provide a beam span identification device for vector graphics, comprising: an acquisition module for acquiring a target vector graphics and a matrix representation corresponding to the target vector graphics; an identification module for identifying beam span key points from the matrix representation and determining a beam span type based on the beam span key points; and a determination module for mapping the positions of the beam span key points to the target vector graphics to obtain beam span primitives in the target vector graphics corresponding to the beam span type.
[0026] According to a third aspect, embodiments of the present invention provide an electronic device, including: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the beam span recognition method for vector paper as described in the first aspect or any embodiment of the first aspect.
[0027] According to a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing computer instructions for causing a computer to perform the beam span recognition method for vector drawings as described in the first aspect or any embodiment of the first aspect.
[0028] It should be noted that the beneficial effects of the beam span recognition device, electronic device and computer-readable storage medium for vector drawings provided in the embodiments of the present invention can be found in the description of the corresponding content in the beam span recognition method for vector drawings, and will not be repeated here. Attached Figure Description
[0029] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0030] Figure 1 This is a flowchart of a beam span identification method using vector graphics according to an embodiment of the present invention;
[0031] Figure 2 This is another flowchart of a beam span recognition method for vector graphics paper according to an embodiment of the present invention;
[0032] Figure 3 This is another flowchart of a beam span recognition method for vector graphics paper according to an embodiment of the present invention;
[0033] Figure 4 This is a structural block diagram of a beam span recognition device based on a vector graphic according to an embodiment of the present invention;
[0034] Figure 5 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0035] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0036] According to an embodiment of the present invention, an embodiment of a beam span identification method for vector graphics is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0037] This embodiment provides a method for beam span identification from vector graphics, which can be used in electronic devices such as mobile phones, tablets, and computers. Figure 1 This is a flowchart of a beam span identification method using vector graphics according to an embodiment of the present invention, as shown below. Figure 1 As shown, the process includes the following steps:
[0038] S11, obtain the target vector graphic and the matrix representation of the target vector graphic.
[0039] The target vector drawing is a vector drawing of the beam span element to be identified, such as different types of CAD drawings like gcad, dwg, and pdf. The electronic device can respond to the designer's creation operation of the beam component drawing to obtain the target vector drawing designed by the designer according to actual business needs; it can also retrieve the target vector drawing from local storage space by querying it; or it can retrieve the target vector drawing from external storage space (such as USB flash drive, external hard drive, etc.) through a communication interface. Of course, other methods can also be used to obtain the target vector drawing; these are not specifically limited here, and those skilled in the art can determine them according to actual needs.
[0040] Matrix representation is the representation of the primitives contained in a target vector graphic in matrix form. This matrix can be a bitmap primitive matrix or a primitive feature matrix; there is no specific limitation here, as long as the target vector graphic is converted into a matrix representation. After obtaining the target vector graphic, the electronic device can parse its attribute information, such as resolution, line primitive features, and text primitive features, and then perform matrix transformation on the target vector graphic based on this attribute information to obtain the corresponding matrix representation of the target vector graphic.
[0041] S12, Identify key points of beam span from the matrix representation, and determine the beam span type based on the key points of beam span.
[0042] When the electronic device obtains the matrix representation corresponding to the target vector drawing, it can use a preset structural information detection model to identify key points representing the geometric structure of the beam span, thus obtaining the beam span key points. Subsequently, the structural information detection model in the electronic device can use these beam span key points in the matrix representation to represent the geometric structures of ordinary beam spans, folded beams, and curved beams, thereby determining the beam span type. The structural information detection model can employ an existing backbone structure neural network model, and the backbone structure of this neural network model is not limited to RESNET, VGG, or HRNET; it can also use a self-developed neural network model, and can employ recognition methods such as heatmap, center-heatmap, association embedding, and location offset regression. No specific limitations are imposed here, as long as the beam span key points of each beam span can be identified from the matrix representation.
[0043] S13, map the positions of the key points of the beam span to the target vector map, and obtain the beam span primitives corresponding to the beam span type in the target vector map.
[0044] The identification of key beam spans is completed in a matrix coordinate system after data transformation, which is different from the original vector coordinate system of the target vector paper. The electronic device can map the position of the identified key beam spans from the current matrix coordinate system to the original vector coordinate system of the target vector paper, and match the primitives in the target vector paper with the key beam spans to identify various types of beam span primitives in the target vector paper.
[0045] The beam span identification method for vector graphics provided in this embodiment identifies key beam span points from the matrix representation corresponding to the target vector graphics. Based on the beam span type determined by these key beam span points, the positions of the key beam span points are mapped to the target vector graphics, achieving automatic identification of beam span elements corresponding to each beam span type in the target vector graphics. This method determines beam span elements through key beam span points, is not limited by the drawing method, and ensures the identification accuracy of beam span elements. This allows for accurate identification of the positional information of beam elements, further guaranteeing accurate identification and attribute matching of beam elements.
[0046] This embodiment provides a method for beam span identification from vector graphics, which can be used in electronic devices such as mobile phones, tablets, and computers. Figure 2 This is a flowchart of a beam span identification method using vector graphics according to an embodiment of the present invention, as shown below. Figure 2 As shown, the process includes the following steps:
[0047] S21, obtain the target vector graphic and the matrix representation of the target vector graphic.
[0048] Specifically, step S21 above may include:
[0049] S211, Obtain the target vector graphic and the original vector coordinate system corresponding to the target vector graphic.
[0050] For an explanation of the target vector graphic, please refer to the relevant descriptions in the above embodiments, which will not be repeated here.
[0051] The original vector coordinate system is the vector coordinate system in which each element in the target vector drawing resides. Electronic devices can analyze the drawing type of the current target vector drawing and determine the corresponding original vector coordinate system based on that drawing type. For example, when the electronic device recognizes that the target vector drawing is in DWG format, it can analyze the DWG drawing to obtain the vector coordinate system for generating the DWG drawing.
[0052] Specifically, the steps to obtain the target vector paper may include:
[0053] (1) Obtain the attribute information of the primitives in the original vector paper.
[0054] The element attribute information refers to the attributes used to represent the corresponding elements in the original vector graphic. Specifically, this element attribute information may include dimension annotations, line elements, text elements, and filled elements. The original vector graphic is the vector graphic directly obtained by the electronic device, that is, the vector graphic obtained from storage space, the vector graphic uploaded by the designer, or the vector graphic created by the designer.
[0055] (2) Based on the attribute information of the graphic elements, the interfering graphic elements in the target vector paper are filtered to obtain the target vector paper.
[0056] In order to more accurately identify beam span elements in vector graphics, electronic devices can filter out interfering elements in the original vector graphics to obtain the target vector graphics. These interfering elements mainly include dimension annotations, text numbers, and grid lines within the vector graphics.
[0057] Specifically, electronic devices can precisely filter dimensions, text numbers, and other elements based on the structured information in the original vector drawings. This means that by using element attribute information, they can efficiently and accurately filter out interfering elements that affect beam span element recognition. Simultaneously, electronic devices can also filter interfering elements in the original vector drawings based on general rules of architectural engineering design. For example, by traversing the elements in the original vector drawings and extracting geometric relationship attributes through geometric operations, such as the number of parallel line segments, the number of perpendicular line segments, average length, and line segment type (solid line, dashed line), they can perform clustering and geometric configuration analysis to filter out interfering elements with specific drawing rules for grid types.
[0058] It should be noted that if there are no interfering elements in the original vector drawing, the electronic device can directly use the original vector drawing it acquires as the target vector drawing for beam span element identification.
[0059] By obtaining the element attribute information from the original vector drawing, the interfering elements in the target vector drawing can be filtered efficiently and accurately based on this element attribute information, thereby obtaining the target vector drawing. This avoids the interference of interfering elements on the identification of beam span elements, making it easier to accurately identify beam span elements in the future.
[0060] S212 transforms the original vector coordinate system into a matrix coordinate system to obtain the matrix representation of the target vector drawing; where the matrix coordinate system is used to characterize the geometric structure of the beam span.
[0061] The original vector coordinate system of the target vector paper after filtering out interference primitives is converted into a matrix coordinate system. This matrix coordinate system is used to characterize the geometric structure of the beam span. Then, the matrix representation corresponding to the target vector paper is determined through the transformed matrix coordinate system.
[0062] This section uses two conversion methods as examples to illustrate:
[0063] 1) Convert the target vector paper into a bitmap primitive matrix. Generate an image matrix with all values of 0 according to the specified resolution. Calculate the coordinate range of each line segment primitive and text primitive in the image matrix according to the resolution. Modify the corresponding values in the matrix to the RGB values in the primitive attributes to obtain the bitmap primitive matrix corresponding to the target vector paper.
[0064] 2) Generate a feature matrix corresponding to the target vector drawing. Cut the target vector drawing into blocks according to a fixed ratio, calculate the geometric features and text features of each block, and generate a corresponding feature matrix. For example, set the dimension of the generated matrix to 10*10 and generate a feature matrix with all values being 0; calculate the area of each coordinate in the feature matrix in the target vector drawing, such as 100 < x < 200, 100 < y < 200; calculate the number of parallel lines, intersection lines, lengths of all line drawing elements and the number of text containing keywords in this area, and use them as features, that is, update them as the values in the matrix to obtain an updated feature matrix.
[0065] Of course, there may be other conversion methods, which are not specifically limited here, and those skilled in the art can determine according to actual needs.
[0066] S22. Identify the key points of the beam span from the matrix representation, and determine the beam span type based on the key points of the beam span.
[0067] Specifically, the above step S22 may include:
[0068] S221. Analyze the beam span structure information corresponding to the matrix representation, and determine multiple coordinate points corresponding to the beam span.
[0069] The matrix representation includes coordinate points or coordinate ranges corresponding to the graphic element attribute information such as line graphic elements, text graphic elements, and annotation graphic elements corresponding to the beam span graphic elements. The beam span structure information is characterized by the matrix representation, and when the electronic device converts the target vector drawing into the matrix representation, it can directly obtain the beam span structure information corresponding to the matrix representation to identify multiple coordinate points representing the beam span from it.
[0070] S222. Analyze multiple coordinate points to determine the starting point, ending point, and implicit point of the beam span.
[0071] The expression method of the beam span graphic element includes the starting point, ending point, and implicit point of the beam span. After the structure information detection model in the electronic device identifies the beam span structure information, it can further determine the starting point, ending point, and implicit point of each beam span corresponding to the beam span structure information. Specifically, the electronic device identifies the beam span endpoints, beam span center points, the length and angle of the beam span corresponding to the beam span center point, and the coordinates of the beam span implicit points. Calculate the beam span endpoints of the beam span where it is located through the position, length, and angle of the beam span center point. If the calculated beam span endpoints match the identified beam span endpoints, then retain this beam span and obtain the starting point, ending point, and implicit point of this beam span corresponding to it.
[0072] S223. Determine the beam span type based on the relationship between the starting point, ending point, and implicit point of the beam span.
[0073] Electronic equipment can analyze the positional relationship between the starting point, ending point, and implicit point of a beam span to determine the beam span type corresponding to each beam span.
[0074] Specifically, step S224 above may include:
[0075] (1) Determine the center point of the beam span based on the starting point and ending point of the beam span.
[0076] The electronic device can calculate the midpoint coordinates between the starting and ending points of the beam span. This midpoint coordinates is the coordinate position of the midpoint of the beam span.
[0077] (2) Check whether the hidden point of the beam span overlaps with the center point of the beam span.
[0078] The electronic device compares the coordinates of the hidden point of the beam span with the coordinates of the center point of the beam span to determine whether the hidden point of the beam span overlaps with the center point of the beam span. If the hidden point of the beam span overlaps with the center point of the beam span, step (3) is executed; otherwise, steps (4) to (6) are executed.
[0079] (3) Determine that the beam span is a normal beam span.
[0080] Implicit points in beam spans are used to characterize folded or curved beams, distinguishing between them. When an implicit point in a beam span overlaps with the center point of the beam span, it indicates that the current beam is a normal beam, meaning the current beam span is a normal beam span.
[0081] (4) Obtain the type of hidden points in the beam span.
[0082] When the hidden point of the beam span does not overlap with the center point of the beam span, it indicates that the current beam is a folded beam or a curved beam. At this time, the electronic device can obtain the type of the hidden point of the beam span and further determine the beam span type based on the type of the hidden point of the beam span.
[0083] (5) When the type of the hidden point of the beam span is the center point of the curved beam, the beam span is determined to be the beam span of the curved beam.
[0084] When the type of the hidden point of the beam span is the center point of a curved beam, it indicates that the current beam is a curved beam, and the current beam span is determined to be the beam span of a curved beam.
[0085] (6) When the type of the hidden point of the beam span is the bending point of the folded beam, the beam span is determined to be the beam span of the folded beam.
[0086] When the type of the hidden point of the beam span is the bending point of a folded beam, it indicates that the current beam is a folded beam, and the current beam span is determined to be the span of a folded beam.
[0087] Based on the relationship between the starting point, ending point, and implicit points of the beam span, the beam span type is determined, which facilitates the accurate identification of various types of beam span elements in the target vector drawing.
[0088] Optionally, step S224 above may further include:
[0089] (7) Identify the beam span text information and detect the positional relationship between the beam span text information and the beam span center point.
[0090] The beam span text information refers to textual and labeled graphic elements located around and related to the beam span. Electronic devices can detect the beam span text information as a key point of the beam span, and simultaneously detect the positional relationship between the beam span text information and the center point of the beam span.
[0091] (8) Based on the positional relationship, match the beam span text information to the corresponding beam span.
[0092] The electronic device pairs the beam span text information with the beam span center point based on the positional relationship between the two, and then matches them to the corresponding beam span. Specifically, after identifying the beam span center point, the electronic device connects the coordinates of the beam span center point with the coordinates of the beam span text information to achieve matching between the beam span text information and the beam span center point. In other words, the electronic device can identify and locate the position of the key points of each beam span and match their related information.
[0093] By identifying the text information of the beam span, the positional relationship between the text information of the beam span and the center point of the beam span is determined. Based on the positional relationship between the two, the text information of the beam span is matched to the corresponding beam span, thereby achieving accurate matching of beam span elements and their annotation information.
[0094] S23, map the positions of the key points of the beam span to the target vector map, and obtain the beam span primitives corresponding to the beam span type in the target vector map. For detailed explanation, please refer to the relevant descriptions in the above embodiments, which will not be repeated here.
[0095] The beam span identification method for vector graphics provided in this embodiment parses the corresponding beam span structural information using a matrix representation, determines multiple coordinate points corresponding to the beam span, and then identifies key points such as the beam span start point, beam span end point, and implicit points from these coordinate points. Based on the positional relationship between the beam span start point, beam span end point, and implicit points, the current beam span type is determined, achieving automatic identification of the beam span type. This facilitates subsequent analysis of the beam's stress state by technicians based on the beam span type. By obtaining the original vector coordinate system corresponding to the target vector graphics and converting it into a matrix coordinate system, the matrix representation of the target vector graphics can be obtained. This matrix coordinate system is used to characterize the geometric structure of the beam span. This method eliminates the need to design different feature matrices for different business requirements; it only needs to convert the original vector coordinate system corresponding to the target vector graphics into a matrix that can characterize the beam span's geometry. This minimizes the limitations of business scenarios and improves its generalization and applicability.
[0096] This embodiment provides a method for beam span identification from vector graphics, which can be used in electronic devices such as mobile phones, tablets, and computers. Figure 3 This is a flowchart of a beam span identification method using vector graphics according to an embodiment of the present invention, as shown below. Figure 3 As shown, the process includes the following steps:
[0097] S31, Obtain the target vector graphic and its corresponding matrix representation. For detailed explanation, please refer to the relevant descriptions in the above embodiments; they will not be repeated here.
[0098] S32, identify key points of the beam span from the matrix representation, and determine the beam span type based on the key points. For detailed explanations, please refer to the relevant descriptions in the above embodiments; they will not be repeated here.
[0099] S33, map the positions of the key points of the beam span to the target vector map, and obtain the beam span primitives corresponding to the beam span type in the target vector map.
[0100] Specifically, step S33 above may include:
[0101] S331, obtain the current coordinates, current coordinate resolution, and vector coordinate resolution of the key points of the beam span, as well as the vector coordinate resolution corresponding to the target vector drawing.
[0102] The electronic device acquires the current coordinates (x0, y0) of the key points of the beam span in the current matrix coordinate system, and at the same time acquires the current coordinate resolution w0*h0 corresponding to the current matrix coordinate system, and the vector coordinate resolution w1*h1 of the target vector paper.
[0103] S332, based on the coordinate transformation relationship between the current coordinates, the current coordinate resolution, and the vector coordinate resolution, maps the current coordinates to vector coordinates corresponding to the vector coordinate resolution.
[0104] Based on the coordinate transformation relationship between the current coordinates, the current coordinate resolution, and the vector coordinate resolution, the current coordinates are converted into vector coordinates. Specifically, if the current coordinates are (x0, y0), the current coordinate resolution is w0*h0, and the vector coordinate resolution is w1*h1, then the vector coordinates (x1, y1) are calculated as follows: x1 = x0 / w0*w1, y1 = y0 / h0*h1.
[0105] S333: Based on the vector coordinates corresponding to the key points of the beam span, the key points of the beam span are matched with the primitives in the target vector drawing to obtain the beam span primitives in the target vector drawing, wherein the beam span primitives correspond to the beam span type.
[0106] The electronic device maps each beam span key point to a target vector map based on its calculated vector coordinates. It then matches the graphic elements in the target vector map with the beam span key points based on the vector coordinates. This allows the electronic device to determine the beam span graphic elements in the target vector map based on the beam span key points, ensuring a one-to-one correspondence between the beam span graphic elements and the beam span type. Simultaneously, the electronic device can also parse the beam span text information and add it to the corresponding beam span.
[0107] S34, retrieve the attribute information of the beam span element.
[0108] The attribute information of beam span elements is used to characterize the beam span information in the target vector drawing. Specifically, the attribute information of beam span elements can include the number of beam spans, beam span cantilever, beam stress, and the continuity of beam spans at the mid-section. After identifying the beam span elements, the electronic device can obtain the attribute information of the beam span elements from the target vector drawing.
[0109] S35, check whether the attribute information meets the preset conditions.
[0110] The preset conditions are the attribute settings information corresponding to the beam span elements in the target vector drawing. The electronic device can compare the attribute information of the detected beam span elements with the preset conditions to determine whether the attribute information of the beam span elements meets the preset conditions. When the attribute information does not meet the preset conditions, step S36 is executed; otherwise, it indicates that the beam span element is accurately identified.
[0111] Specifically, electronic devices can perform beam span quantity verification, beam span cantilever verification, beam stress verification, and beam span continuity verification at mid-sections based on the attribute information of beam span elements. For example, they can compare the number of beam spans contained in the target vector drawing with the number of identified beam spans; and perform stress calculations on the reinforcement information of the identified beam span elements to determine whether they comply with specifications, etc.
[0112] S36, Re-identify beam span primitives in the target vector drawing.
[0113] When the attribute information does not meet the preset conditions, it indicates that there is an error in the identification of the beam span element, that is, the identification of the beam span element contains incorrect information. At this time, the electronic device can re-identify the beam span element in the target vector drawing to automatically correct the incorrect identification result.
[0114] S37, in response to the beam span element recognition operation, identifies and corrects the beam span elements in the target vector drawing based on the recognition operation.
[0115] During the identification process, technicians can delineate the areas of graphic elements to be identified from the target vector drawing according to their needs. Correspondingly, the electronic equipment can respond to the technician's identification operation on the beam span graphic elements and perform beam span graphic element identification on the graphic element area delineated by the identification operation, thereby reducing the influence of interfering graphic elements and improving the identification efficiency of beam span graphic elements.
[0116] During the identification process, the electronic device can display the target bounding boxes, allowing technicians to determine if there are any incorrect or missing boxes. If incorrect or missing boxes are found, technicians can delete or add them. Correspondingly, the electronic device can respond to the technician's actions by deleting incorrect or adding missing boxes to ensure the accuracy of beam span element identification.
[0117] After the beam span elements are identified, the electronic device can display the identification results. Technicians can review these results to determine if there are any errors. If errors are found, technicians can send identification commands to the electronic device to correct the erroneous identifications. Accordingly, the electronic device can respond to the technicians' identification operations and correct the incorrectly identified beam span elements to ensure the accuracy of beam span element identification.
[0118] The beam span identification method for vector graphics provided in this embodiment identifies the position coordinates of key beam span points and maps them to the vector coordinate system of the target vector graphics paper. This allows the determination of the key beam span point positions in the vector coordinate system. By matching these key beam span points with graphic elements, the corresponding beam span graphic element in the target vector graphics paper can be identified. This method is not limited to a specific drawing method, maximizing the identification of beam span graphic elements from different drawing methods and improving the flexibility of beam span graphic element identification. After automatic identification of the beam span graphic element, the attribute information of the beam span graphic element is acquired and verified to determine whether it meets preset conditions. If the preset conditions are not met, it indicates an identification error, and the beam span graphic element in the target vector graphics paper needs to be re-identified and corrected, thus ensuring the identification accuracy of the beam span graphic element. This method can also respond to the identification operation of the beam span graphic element by the technician, thereby selecting the identification area of the beam span graphic element to improve identification efficiency and correcting the location of identification errors, further improving the identification accuracy of the beam span graphic element.
[0119] This embodiment also provides a beam span recognition device for vector graphics, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0120] This embodiment provides a beam span recognition device for vector graphics, such as... Figure 4 As shown, it includes:
[0121] The acquisition module 41 is used to acquire the target vector graphic and its corresponding matrix representation. For detailed explanations, please refer to the relevant descriptions in the above method embodiments; they will not be repeated here.
[0122] The identification module 42 is used to identify key points of the beam span from the matrix representation and determine the beam span type based on these key points. For detailed explanations, please refer to the relevant descriptions in the above method embodiments; they will not be repeated here.
[0123] The determination module 43 is used to map the positions of key points of the beam span to the target vector map, thereby obtaining beam span primitives corresponding to the beam span type in the target vector map. For detailed explanations, please refer to the relevant descriptions in the above method embodiments; they will not be repeated here.
[0124] The beam span recognition device for vector graphics provided in this embodiment identifies key beam span points from the matrix representation corresponding to the target vector graphics. Based on the beam span type determined by these key points, the device maps the positions of the key points to the target vector graphics, thus achieving automatic recognition of beam span elements corresponding to each beam span type in the target vector graphics. This device determines beam span elements through key points, is not limited by the drawing method, and ensures the recognition accuracy of beam span elements. This allows for accurate identification of the positional information of beam elements, further guaranteeing accurate identification and attribute matching of beam elements.
[0125] In this embodiment, the beam span recognition device of the vector drawing is presented in the form of a functional unit. Here, a unit refers to an ASIC circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0126] Further functional descriptions of the above modules are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0127] This invention also provides an electronic device having the above-described features. Figure 4 The vector graphic shown shows the beam span recognition device.
[0128] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in an optional embodiment of the present invention, such as... Figure 5 As shown, the electronic device may include: at least one processor 501, such as a CPU (Central Processing Unit), at least one communication interface 503, memory 504, and at least one communication bus 502. The communication bus 502 is used to enable communication between these components. The communication interface 503 may include a display screen or a keyboard; optionally, the communication interface 503 may also include a standard wired interface or a wireless interface. The memory 504 may be high-speed RAM (Random Access Memory) or non-volatile memory, such as at least one disk storage device. Optionally, the memory 504 may also be at least one storage device located remotely from the aforementioned processor 501. The processor 501 may be combined with... Figure 4 The described apparatus has an application program stored in memory 504, and a processor 501 calls the program code stored in memory 504 to perform any of the above method steps.
[0129] The communication bus 502 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus 502 can be divided into an address bus, a data bus, and a control bus, etc. For ease of representation, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0130] The memory 504 may include volatile memory, such as random-access memory (RAM); the memory may also include non-volatile memory, such as flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory 504 may also include a combination of the above types of memory.
[0131] The processor 501 can be a central processing unit (CPU), a network processor (NP), or a combination of CPU and NP.
[0132] The processor 501 may further include a hardware chip. This hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0133] Optionally, memory 504 is also used to store program instructions. Processor 501 can call the program instructions to implement the functions described in this application. Figures 1 to 3The beam span identification method of the vector drawing shown in the embodiment.
[0134] This invention also provides a non-transitory computer storage medium storing computer-executable instructions that can execute the beam span recognition method for vector drawings in any of the above method embodiments. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium may also include combinations of the above types of memory.
[0135] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and all such modifications and variations fall within the scope defined by the appended claims.
Claims
1. A method of identifying a beam span of a vector drawing sheet, characterized by, include: Obtain the target vector graphic and the matrix representation corresponding to the target vector graphic; Identify key beam span points from the matrix representation, and determine the beam span type based on the key beam span points; Mapping the position of the beam span key point to the target vector map to obtain the beam span primitive corresponding to the beam span type in the target vector map includes: obtaining the current coordinates and current coordinate resolution of the beam span key point and the vector coordinate resolution corresponding to the target vector map; Based on the coordinate transformation relationship between the current coordinates, the current coordinate resolution, and the vector coordinate resolution, the current coordinates are mapped to vector coordinates corresponding to the vector coordinate resolution; based on the vector coordinates corresponding to the key points of the beam span, the key points of the beam span are matched with the primitives in the target vector drawing to obtain the beam span primitives in the target vector drawing, and the beam span primitives correspond to the beam span type.
2. The method of claim 1, wherein, The step of identifying key beam span points from the matrix representation and determining the beam span type based on the key beam span points includes: The matrix is analyzed to represent the structural information of the corresponding beam span, and multiple coordinate points corresponding to the beam span are determined. Analyze the multiple coordinate points to determine the starting point, ending point, and implicit points of the beam span; The beam span type is determined based on the relationship between the beam span start point, beam span end point, and beam span implicit point.
3. The method according to claim 2, characterized in that, Based on the relationship between the beam span start point, beam span end point, and implicit beam span point, the beam span type is determined, including: Determine the center point of the beam span based on the starting point and ending point of the beam span; Detect whether the implicit point of the beam span overlaps with the center point of the beam span; When the hidden point of the beam span overlaps with the center point of the beam span, the beam span is determined to be an ordinary beam span.
4. The method according to claim 3, characterized in that, Also includes: When the hidden point of the beam span does not overlap with the center point of the beam span, the type of the hidden point of the beam span is obtained; When the type of the implicit point of the beam span is the center point of a curved beam, the beam span is determined to be the beam span of a curved beam.
5. The method according to claim 4, characterized in that, Also includes: When the type of the implicit point of the beam span is the bending point of a folded beam, the beam span is determined to be the beam span of a folded beam.
6. The method according to any one of claims 3-5, characterized in that, Also includes: Identify beam span text information and detect the positional relationship between the beam span text information and the center point of the beam span; Based on the positional relationship, the beam span text information is matched to the corresponding beam span.
7. The method according to claim 1, characterized in that, The process of obtaining the target vector graphic and the matrix representation corresponding to the target vector graphic includes: Obtain the target vector graphic and the original vector coordinate system corresponding to the target vector graphic; The original vector coordinate system is converted into a matrix coordinate system to obtain the matrix representation of the target vector drawing; wherein, the matrix coordinate system is used to characterize the geometric structure of the beam span.
8. The method according to claim 7, characterized in that, The acquisition of the target vector graphic includes: Obtain the attribute information of primitives in the original vector graphics paper; The target vector paper is obtained by filtering out interfering elements in the target vector paper based on the element attribute information.
9. The method according to claim 1, characterized in that, Also includes: Obtain the attribute information of the beam span element; Detect whether the attribute information meets preset conditions; When the attribute information does not meet the preset conditions, the beam span element in the target vector drawing is re-identified.
10. The method according to claim 1, characterized in that, Also includes: In response to the identification operation of beam span elements, the beam span elements in the target vector drawing are identified and corrected based on the identification operation.
11. A beam span recognition device for vector graphics, characterized in that, include: The acquisition module is used to acquire the target vector graphic and the matrix representation corresponding to the target vector graphic; The identification module is used to identify key beam span points from the matrix representation and determine the beam span type based on the key beam span points; The determination module is used to map the position of the beam span key point to the target vector map to obtain the beam span primitive corresponding to the beam span type in the target vector map, including: obtaining the current coordinates, current coordinate resolution and vector coordinate resolution of the beam span key point; Based on the coordinate transformation relationship between the current coordinates, the current coordinate resolution, and the vector coordinate resolution, the current coordinates are mapped to vector coordinates corresponding to the vector coordinate resolution; based on the vector coordinates corresponding to the key points of the beam span, the key points of the beam span are matched with the primitives in the target vector drawing to obtain the beam span primitives in the target vector drawing, and the beam span primitives correspond to the beam span type.
12. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the beam span recognition method of vector paper according to any one of claims 1-10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to execute the beam span recognition method of vector paper according to any one of claims 1-10.
Citation Information
Patent Citations
Beam primitive editing method and device, electronic equipment and readable storage medium
CN112580123A
Building data analysis processing method based on matrix operation
CN113094791A