In-situ marking recognition method, device and electronic equipment

By aggregating the direction and spacing of the in-situ marking elements in the CAD drawings, and combining the positional relationship of the beam elements, the problem of low accuracy of in-situ marking recognition in the existing technology is solved, achieving higher recognition accuracy and efficiency.

CN114444185BActive Publication Date: 2025-04-08GLODON CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210104579.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-28
Publication Date
2025-04-08
Estimated Expiration
2042-01-28

AI Technical Summary

Technical Problem

The recognition accuracy of existing in-situ labels is low, mainly due to the irregular drawing design and insufficient accuracy of neural network recognition.

Method used

By obtaining the target CAD drawing and analyzing the beam element and the in-situ marking ingot, aggregating based on the direction and spacing of the in-situ marking ingot, determining the target in-situ marking ingot, and determining the corresponding relationship based on the positional relationship between the target in-situ marking ingot and the beam element.

Benefits of technology

It improves the recognition accuracy of in-situ labels, reduces the number of in-situ label elements to be processed, improves the recognition efficiency, and ensures the integrity and legality of the recognition results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114444185B_ABST
    Figure CN114444185B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer-aided design technology, and specifically to an in-situ annotation recognition method, device and electronic device, the method comprising obtaining a target CAD drawing, parsing the target CAD drawing to determine a beam primitive and an in-situ annotation primitive in the target CAD drawing; aggregating the in-situ annotation primitives based on the directions of each in-situ annotation primitive and the spacing between the in-situ annotation primitives to determine a target in-situ annotation primitive; and determining the target in-situ annotation primitive corresponding to each beam primitive according to the positional relationship between the target in-situ annotation primitive and the beam primitive. By aggregating the in-situ annotation primitives obtained by the analysis, the scattered annotation information is aggregated into a complete information, which can ensure the integrity of the target in-situ annotation primitive, verify the legality, improve the accuracy of recognition, and reduce the number of in-situ annotation primitives to be processed through aggregation, thereby improving the recognition efficiency of in-situ annotation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer-aided design, and in particular to an in-situ marking recognition method, device and electronic equipment. Background Art

[0002] Since my country adopted the quota cost management of construction projects, the calculation of construction project quantities has played an important role in the construction cost management work, and has consumed a lot of time and energy of project budget personnel. People have also tried to find new methods and shortcuts in their work practice. After decades of exploration, it has roughly gone through the process of manual calculation, table calculation, calculator table calculation, computer table calculation, etc.

[0003] With the further development of technology, computers have gradually supported the automatic recognition of some component information in CAD drawings, including component location, component size information, and component reinforcement information. By recognizing CAD drawings, models are automatically generated in the modeling software, and the conversion of two-dimensional CAD drawings to three-dimensional models is accurately and quickly realized, which improves the efficiency of modeling and quantity calculation, saves time, and once again greatly improves productivity. When performing CAD recognition, the CAD drawings are first broken up in the platform, and then based on the user's subjective judgment, the component edges, annotations and other layers are extracted separately, and then the extracted layer data is processed and finally converted into a three-dimensional model.

[0004] Beams are the main structural components in building construction projects and are common and frequently used components. They also account for a large proportion of the workload in engineering modeling. In drawings, the centralized marking, in-situ marking, the starting and ending ranges of beams, and the support positions of beams are generally provided. Among them, there is no absolute standard for the in-situ marking of beams, and current judgment and identification are very difficult. The existing in-situ marking recognition uses a neural network to determine the beams corresponding to each in-situ marked graphic element. However, since drawings are a form of expression of the designer's subjective intentions, practitioners need to have a business knowledge background, so the design of the drawings will be non-standard, resulting in a low recognition accuracy rate. Summary of the invention

[0005] In view of this, the embodiments of the present invention provide a method, device and electronic device for identifying in-situ annotations to solve the problem of low recognition accuracy of existing in-situ annotations.

[0006] According to a first aspect, an embodiment of the present invention provides an in-situ marking recognition method, comprising:

[0007] Obtain a target CAD drawing, and parse the target CAD drawing to determine beam elements and in-situ annotated elements in the target CAD drawing;

[0008] Aggregating the in-situ labeled primitives based on directions of the in-situ labeled primitives and spacings between the in-situ labeled primitives to determine a target in-situ labeled primitive;

[0009] According to the positional relationship between the target in-situ labeled graphics element and the beam graphics element, the target in-situ labeled graphics element corresponding to each of the beam graphics elements is determined.

[0010] The in-situ annotation recognition method provided by the embodiment of the present invention aggregates the in-situ annotation primitives obtained by analysis, aggregates the scattered annotation information into a complete information, and determines the corresponding relationship through the target in-situ annotation primitives obtained after aggregation, thereby ensuring the integrity of the target in-situ annotation primitives, verifying the legality, and improving the accuracy of recognition. In addition, the number of in-situ annotation primitives to be processed is reduced through aggregation, thereby improving the recognition efficiency of in-situ annotations.

[0011] In combination with the first aspect, in a first implementation of the first aspect, aggregating the in-situ labeled primitives based on directions of the in-situ labeled primitives and spacings between the in-situ labeled primitives to determine a target in-situ labeled primitive includes:

[0012] Determine the direction of the in-situ labeled primitive using the basic point of the in-situ labeled primitive;

[0013] Based on the direction of the current in-situ annotation primitive, searching for an in-situ annotation primitive whose spacing from the current in-situ annotation primitive is less than a preset text width;

[0014] The queried in-situ annotated primitive is aggregated with the current in-situ annotated primitive to determine the target in-situ annotated primitive.

[0015] The in-situ annotation recognition method provided by the embodiment of the present invention performs aggregation processing through direction and spacing. The processing process complies with the basic rules of information description and is simple and easy to implement.

[0016] In combination with the first implementation manner of the first aspect, in the second implementation manner of the first aspect, aggregating the queried in-situ annotated primitive with the current in-situ annotated primitive to determine the target in-situ annotated primitive includes:

[0017] Aggregating the queried in-situ annotated primitive with the current in-situ annotated primitive to obtain an optional in-situ annotated primitive;

[0018] When the text directions and heights in the selectable in-situ labeling primitives are the same, the selectable in-situ labeling primitive is determined to be the target in-situ labeling primitive.

[0019] The in-situ annotation recognition method provided by the embodiment of the present invention uses the text direction and height to re-screen the optional in-situ annotation primitives, thereby improving the accuracy of the obtained target in-situ annotation primitives.

[0020] In combination with the second implementation manner of the first aspect, in the third implementation manner of the first aspect, aggregating the queried in-situ annotated primitive with the current in-situ annotated primitive to obtain an optional in-situ annotated primitive includes:

[0021] When the queried in-situ annotated graphic elements are obtained by queried in the same direction as the writing direction, the queried in-situ annotated graphic elements are sequentially stored in the back end of the current in-situ annotated graphic element;

[0022] When the queried in-situ annotation primitives are obtained by querying in the direction opposite to the writing direction, the queried in-situ annotation primitives are sequentially stored in the front end of the current in-situ annotation primitive to obtain the optional in-situ annotation primitives.

[0023] The in-situ annotation recognition method provided by the embodiment of the present invention aggregates the in-situ annotation primitives based on writing habits, thereby ensuring that the left-right order of the text content in the obtained target in-situ annotation primitives is correct.

[0024] In combination with the first aspect, in a fourth implementation of the first aspect, determining the target in-situ labeled primitive corresponding to each of the beam primitives according to the positional relationship between the target in-situ labeled primitive and the beam primitive includes:

[0025] For each of the beam elements, determine a target in-situ annotation element projected onto the beam element;

[0026] When the determined target in-situ annotation element is parallel to the beam element, the target in-situ annotation element corresponding to the beam element is determined based on the distance between the determined target in-situ annotation element and the beam element.

[0027] In combination with the fourth implementation manner of the first aspect, in the fifth implementation manner of the first aspect, determining the target in-situ labeled primitive corresponding to the beam primitive based on the determined distance between the target in-situ labeled primitive and the beam primitive includes:

[0028] Selecting a target in-situ labeled primitive that is closest to the target in-situ labeled primitive from among the determined target in-situ labeled primitives;

[0029] The result is checked based on the position information of the screened target in-situ annotated graphics element to determine the target in-situ annotated graphics element corresponding to the beam graphics element.

[0030] The in-situ annotation recognition method provided by the embodiment of the present invention verifies the results through the position information of the target in-situ annotated graphic element, further ensures the accuracy of the recognition results, and performs the best relationship matching based on the position of the entire drawing to prevent the user from partially identifying (or when the recognition order changes), thereby preventing the in-situ annotation information from being incorrectly attributed, thereby improving the recognition accuracy.

[0031] In combination with the fifth implementation manner of the first aspect, in the sixth implementation manner of the first aspect, the result verification based on the position information of the screened target in-situ labeled primitive to determine the target in-situ labeled primitive corresponding to the beam primitive includes:

[0032] For the selected target in-situ annotation elements, select the optional beam elements within the preset range;

[0033] Based on the positional relationship between the filtered target in-situ labeled graphics element and each of the optional beam graphics elements, the target in-situ labeled graphics element corresponding to the beam graphics element is determined.

[0034] In combination with the first aspect, in a seventh implementation manner of the first aspect, determining the target in-situ labeled primitives corresponding to the beam primitives according to the positional relationship between the target in-situ labeled primitives and the beam primitives further includes:

[0035] Determine the beam element corresponding to each of the target in-situ labeled elements based on the positional relationship between the target in-situ labeled elements and the beam element;

[0036] The distance between the basic point of the target in-situ annotation element and the corresponding beam element is used to determine the steel bar type of the corresponding beam element, and the steel bar type includes upper steel bars and lower steel bars.

[0037] The in-situ marking recognition method provided by an embodiment of the present invention determines the steel bar type based on the distance between the basic point of the target in-situ marked element and the beam element, so that the steel bar type judgment no longer changes due to the drawing direction of the beam element, and the user is no longer confused.

[0038] In combination with the first aspect, in an eighth implementation of the first aspect, determining the target in-situ labeled primitive corresponding to each of the beam primitives according to the positional relationship between the target in-situ labeled primitive and the beam primitive further includes:

[0039] Corresponding to each of the beam elements, based on the annotation information type of the target in-situ annotated element, searching along a preset direction to obtain an in-situ annotated element group corresponding to the beam element;

[0040] Based on the distance between the in-situ labeled primitive group and the beam primitive, a target in-situ labeled primitive corresponding to each of the beam primitives is determined.

[0041] In the in-situ annotation recognition method provided by the embodiment of the present invention, in a annotation set, the same type of annotation information appears only once. When it appears twice, the ownership of the annotation changes. Therefore, the reliability of the recognition result can be guaranteed by in-situ annotation of the element group; and the result is verified by using the distance between the in-situ annotation element group and the beam element, which further ensures the accuracy of the recognition.

[0042] In combination with the first aspect or any implementation manner of the first aspect, in a ninth implementation manner of the first aspect, determining the target in-situ labeled primitive corresponding to each of the beam primitives according to the positional relationship between the target in-situ labeled primitive and the beam primitive further includes:

[0043] When the number of target in-situ annotated graphics elements corresponding to the beam graphics element is greater than 1, screening is performed based on the horizontal distance between the corresponding target in-situ annotated graphics elements and the beam graphics element;

[0044] When there are at least two legal target in-situ labeled entities after screening, the target in-situ labeled entity with the smallest labeling sequence number is determined as the target in-situ labeled entity corresponding to the beam entity.

[0045] The in-situ annotation recognition method provided by the embodiment of the present invention has a unified principle when recognizing multiple in-situ annotations at the same position, can achieve the optimal solution for the annotations, and ensure that each recognition result is unique and is not affected by drawing direction and recognition range factors.

[0046] According to the second aspect, an embodiment of the present invention further provides an in-situ marking recognition device, comprising:

[0047] An acquisition module is used to acquire a target CAD drawing, and parse the target CAD drawing to determine beam elements and in-situ annotated elements in the target CAD drawing;

[0048] An aggregation module, configured to aggregate the in-situ annotated primitives based on directions of the in-situ annotated primitives and spacings between the in-situ annotated primitives to determine a target in-situ annotated primitive;

[0049] A determination module is used to determine the target in-situ marked graphics element corresponding to each of the beam graphics elements according to the positional relationship between the target in-situ marked graphics element and the beam graphics element.

[0050] According to the third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the in-situ marking recognition method described in the first aspect or any one of the embodiments of the first aspect by executing the computer instructions.

[0051] According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the in-situ marking recognition method described in the first aspect or any one of the embodiments of the first aspect.

[0052] It should be noted that, for the relevant beneficial effects of the in-situ marking recognition device, electronic device and computer-readable storage medium provided by the embodiments of the present invention, please refer to the corresponding description of the in-situ marking recognition method above, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0054] Figure 1 is a flow chart of an in-situ marking recognition method according to an embodiment of the present invention;

[0055] Figure 2 is a schematic diagram of in-situ labeling primitives according to an embodiment of the present invention;

[0056] Figure 3 is a flow chart of an in-situ marking recognition method according to an embodiment of the present invention;

[0057] Figure 4a-4d is a schematic diagram of aggregation processing according to an embodiment of the present invention;

[0058] Figure 5 is a schematic diagram of in-situ marking recognition according to an embodiment of the present invention;

[0059] Figure 6 is a schematic diagram of in-situ marking recognition according to an embodiment of the present invention;

[0060] Figure 7 is a schematic diagram of identifying the type of steel bars according to an embodiment of the present invention;

[0061] Figure 8 is a schematic diagram of identification of in-situ marking according to an embodiment of the present invention;

[0062] Figure 9a-9c is a schematic diagram of identifying a target in-situ labeled primitive group according to an embodiment of the present invention;

[0063] Fig.10 is a screening schematic diagram according to an embodiment of the present invention;

[0064] Fig.11 is a flow chart of an in-situ marking recognition method according to an embodiment of the present invention;

[0065] Fig.12 is a structural block diagram of an in-situ marking recognition device according to an embodiment of the present invention;

[0066] Fig.13 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0067] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0068] The in-situ annotation recognition method provided by the embodiment of the present invention aggregates the in-situ annotation primitives obtained after parsing the CAD drawing to obtain the target in-situ annotation primitive, that is, integrates the scattered data into a complete annotation primitive. This method can handle the information parsing of illegal DWG annotation primitives (that is, the in-situ annotation information is composed of multiple in-situ annotation primitives) and expand the compatibility range of user drawings.

[0069] Furthermore, the method also uses the position of the identified target in-situ annotated elements to verify the results, so as to avoid the situation where the ownership of the in-situ annotated elements changes when the recognition order of the beams changes during recognition; at the same time, it can also avoid the uncertainty of the recognition results when the in-situ annotation of the beam elements is identified by box selection due to different selection ranges.

[0070] Furthermore, in the existing in-situ annotation recognition method of beam elements, the upper and lower reinforcement types are determined according to the drawing direction of the beam element, resulting in errors in the identification of the reinforcement type. Based on this, in this solution, the reinforcement type of the beam element is determined by the relative position relationship between the target in-situ annotation element and the beam element.

[0071] Furthermore, since there may be overlapped or close distances between in-situ annotation information in CAD drawings, in this case, the same type of in-situ annotation information will be attributed to the same beam element, and other beam elements will not be able to find their own in-situ annotations. Based on this, in this solution, the in-situ annotation information is recursively expanded, and the type of annotation information is judged during the expansion process. When the types of annotation information overlap, the expansion is terminated. That is, the in-situ annotation information group is expanded by the type of annotation information.

[0072] Furthermore, when each in-situ annotated primitive is upgraded to an in-situ annotated information group, the positional legality is judged based on the annotated information group as a unit, and the group is judged as a whole to ensure the accuracy of the recognition result.

[0073] Furthermore, in the original recognition algorithm, when there are multiple solutions for the in-situ annotation algorithm, the information will be obtained in a random order. That is, whichever is calculated first and complies with the principle will be used. However, in this case, when the in-situ annotation positions overlap, there is a high probability of recognition errors. Based on this, when there are multiple in-situ annotations with correct information at the same time, a priority algorithm is determined to further identify that there is only one unique solution.

[0074] According to an embodiment of the present invention, an embodiment of an in-situ marking identification method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0075] In this embodiment, a method for identifying an in-situ mark is provided, which can be used in electronic devices such as computers. Figure 1 is a flow chart of an in-situ marking recognition method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0076] S11, obtaining a target CAD drawing, and analyzing the target CAD drawing to determine beam elements and in-situ annotation elements in the target CAD drawing.

[0077] After acquiring the target CAD drawing, the electronic device parses it and breaks up the target CAD drawing in the platform to obtain each primitive and its primitive type. Based on the primitive type of each primitive, the beam primitive and the in-situ annotated primitive in the target CAD drawing can be determined. It should be noted that the in-situ annotated primitive obtained by parsing the target CAD drawing is a primitive in character units.

[0078] For example, for a beam element, its corresponding in-situ annotation element is Figure 2 As shown in the figure, the obtained in-situ annotated primitives are 4, C, 2, 0. These are independent primitives, but for the beam primitive, its in-situ annotated information should be the complete annotated information 4C20. Therefore, after obtaining the in-situ annotated primitives, the electronic device needs to aggregate them to obtain the complete target in-situ annotated primitives.

[0079] S12, based on the directions of the respective in-situ annotated primitives and the spacings between the in-situ annotated primitives, aggregate the in-situ annotated primitives to determine the target in-situ annotated primitive.

[0080] When the electronic device aggregates the in-situ annotated primitives, it needs to follow certain principles. That is, the spacing between the in-situ annotated primitives belonging to the same beam primitive is small, and the directions of the in-situ annotated primitives are consistent. Based on this, the electronic device aggregates the in-situ annotated primitives to obtain the target in-situ annotated primitives. Among them, the target in-situ annotated primitive is the aggregation of at least two in-situ annotated primitives.

[0081] For example, the electronic device can put all the in-situ annotated primitives into a queue to be processed, and can first determine other in-situ annotated primitives within a preset range of each in-situ annotated primitive based on the position of each in-situ annotated primitive, and these other in-situ annotated primitives may be the aggregation objects of the in-situ annotated primitive. Then, these other in-situ annotated primitives are screened and aggregated based on the direction and spacing, and then the target in-situ annotated primitive is obtained.

[0082] This step will be described in detail below.

[0083] S13, determining the target in-situ marked graphics element corresponding to each beam graphics element according to the positional relationship between the target in-situ marked graphics element and the beam graphics element.

[0084] After obtaining the target in-situ annotated element, the electronic device determines the target in-situ annotated element corresponding to each beam element based on the positional relationship between each target in-situ annotated element and the beam element, because the target in-situ annotated element is closest to the beam element and is parallel to the beam element when annotating the beam element.

[0085] Alternatively, on this basis, the electronic device can also process at least two target in-situ labeled graphics elements into a target in-situ labeled graphics element group, and then match the beam graphics element with the target in-situ labeled graphics element based on the target in-situ labeled graphics element group to obtain a more accurate recognition result.

[0086] This step will be described in detail below.

[0087] The in-situ annotation recognition method provided in this embodiment aggregates the in-situ annotation primitives obtained by analysis, aggregates the scattered annotation information into a complete information, and determines the corresponding relationship through the target in-situ annotation primitives obtained after aggregation, thereby ensuring the integrity of the target in-situ annotation primitives, verifying their legality, and improving the accuracy of recognition. In addition, the number of in-situ annotation primitives to be processed is reduced through aggregation, thereby improving the recognition efficiency of in-situ annotations.

[0088] In this embodiment, a method for identifying an in-situ mark is provided, which can be used in electronic devices such as computers. Figure 3 is a flow chart of an in-situ marking recognition method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0089] S21, obtaining a target CAD drawing, and analyzing the target CAD drawing to determine beam elements and in-situ annotated elements in the target CAD drawing.

[0090] For details, please see Figure 1 S11 of the illustrated embodiment will not be described in detail here.

[0091] S22, based on the directions of the respective in-situ annotated primitives and the spacings between the in-situ annotated primitives, aggregate the in-situ annotated primitives to determine the target in-situ annotated primitive.

[0092] Specifically, the above S22 includes:

[0093] S221, using the basic points of the in-situ labeled primitives, determine the direction of the in-situ labeled primitives.

[0094] As mentioned above, the in-situ annotation primitives are independent characters, each of which corresponds to a rectangular bounding box, and the vertices of the rectangular bounding box are called the basic points of the in-situ annotation primitive. Figure 4a As shown, the in-situ annotation primitive has four basic points, namely 1, 2, 3 and 4.

[0095] Each basic point has a corresponding coordinate in the target CAD drawing, and the direction vector of the original annotation primitive can be determined by the difference between the two coordinates. For example, along the width direction of the original annotation primitive, the coordinate difference between basic point 3 and basic point 4 is calculated to obtain the direction of the original annotation primitive.

[0096] The directions of the in-situ annotation entities that are the same as the target in-situ annotation entity are consistent. Figure 4b As shown, the electronic device can use the directions of adjacent in-situ labeled graphic elements to screen whether they belong to the same target in-situ labeled graphic element.

[0097] S222: Based on the direction of the current in-situ annotation primitive, search for in-situ annotation primitives whose spacing from the current in-situ annotation primitive is less than a preset text width.

[0098] The electronic device processes each in-situ annotation primitive in turn, and regards the in-situ annotation primitive currently being processed as the current in-situ annotation primitive. The electronic device uses the direction of the current in-situ annotation primitive to first find the in-situ annotation primitive adjacent to it, and based on the direction of the adjacent in-situ annotation primitive, determines whether it belongs to the same target in-situ annotation primitive. Then, combined with the spacing between the adjacent in-situ annotation primitive and the current in-situ annotation primitive, when the spacing is less than the in-situ annotation primitive with a preset text width, it is determined that the adjacent in-situ annotation primitive and the current in-situ annotation primitive belong to the same target in-situ annotation primitive.

[0099] For example, Figure 4c As shown, for the current in-situ labeled primitive 4, the in-situ labeled primitive 6 adjacent to its left is no longer on the same horizontal plane with it, which means that the in-situ labeled primitive 6 and the current in-situ labeled primitive 4 do not belong to the same target in-situ labeled primitive.

[0100] For the current annotation element 0, the distance between it and the adjacent in-situ annotation element 6 on its right side is wider; the adjacent in-situ annotation element 6 in its upper right corner is not on the same horizontal plane with it, so these two adjacent in-situ annotation elements 6 and the current annotation element 0 do not belong to the same target in-situ annotation element.

[0101] S223: Aggregate the queried in-situ annotated primitive with the current in-situ annotated primitive to determine a target in-situ annotated primitive.

[0102] When performing aggregation processing, the electronic device can use queues. For example, starting from the current in-situ annotation primitive, the adjacent in-situ annotation primitives are screened on both sides. When the in-situ annotation primitives that meet the conditions are screened, they are added to the queue based on their positional relationship with the current in-situ annotation primitive. For example, if the writing direction is from left to right, and the adjacent in-situ annotation primitive is on the left side of the current in-situ annotation primitive, the adjacent in-situ annotation primitive is added to the front end of the queue; if it is on the right side of the current in-situ annotation primitive, the adjacent in-situ annotation primitive is added to the back end of the queue.

[0103] In some optional implementations of this embodiment, the above S223 may include:

[0104] (1) Aggregate the queried in-situ annotated primitive with the current in-situ annotated primitive to obtain an optional in-situ annotated primitive.

[0105] (2) When the text direction and height of the optional in-situ annotation graphic element are the same, the optional in-situ annotation graphic element is determined to be the target in-situ annotation graphic element.

[0106] Specifically, when the in-situ annotation primitives queried are obtained along the same direction as the writing direction, the in-situ annotation primitives queried are sequentially stored in the back end of the current in-situ annotation primitives; when the in-situ annotation primitives queried are obtained along the opposite direction of the writing direction, the in-situ annotation primitives queried are sequentially stored in the front end of the current in-situ annotation primitives to obtain the optional in-situ annotation primitives. Figure 4d As shown, if the search starts from the in-situ annotation primitive C, and the in-situ annotation primitive 4 is found, first determine whether the direction of the in-situ annotation primitive 4 and the distance between it and C meet the corresponding conditions. That is, the directions are the same and the distance is less than the preset width. When the corresponding conditions are met, since the in-situ annotation primitive 4 is on the left side of C, which is opposite to the writing direction, 4 is added to the front end of the queue. Search again and find the in-situ annotation primitive 2, which also meets the corresponding conditions. Since 2 is on the right side of C and in the same direction as the writing direction, 2 is added to the back end of the queue. And so on, the optional in-situ annotation primitive 4C20 is obtained.

[0107] After obtaining the optional in-situ annotation primitives, it is necessary to screen the heights of the various in-situ annotation primitives in the optional in-situ annotation primitives again, so as to finally determine the target in-situ annotation primitive.

[0108] As mentioned above, when electronic devices aggregate the in-situ annotated primitives, they are based on the characteristics of complete information description. That is, according to the basic rules of human information description, when a complete information description is performed in any direction, it will present the following characteristics: horizontal description from left to right in the local coordinate system; reasonable spaces between information blocks; the same information is in the same horizontal position and at the same height. Among them, the local coordinate system is established based on the coordinate difference between the two basic points of the in-situ annotated primitive. For example, Figure 4b As shown, the local coordinate system can be established by using the direction vector calculated by the coordinate difference of the two basic points of the in-situ annotated primitive as the horizontal coordinate and the direction perpendicular to the horizontal coordinate as the vertical coordinate.

[0109] As a specific example of this embodiment, Figure 4c as well as Figure 4d As shown in the figure, when the aggregation processing of the in-situ annotated primitives is performed, the processing process includes:

[0110] (1) For any in-situ annotated primitive, the direction vector of the in-situ annotated primitive is obtained by using the coordinate difference between basic point 3 and basic point 4, or the coordinate difference between basic point 4 and basic point 3;

[0111] (2) In this direction, recursively search the range of spacing and text width to achieve the purpose of hash information aggregation;

[0112] (3) The legitimacy of the in-situ annotated primitives found on the direction vector needs to be reversely verified. That is, the in-situ annotated primitives belonging to the same target in-situ annotated primitive are in the same horizontal direction;

[0113] (4) A queue is used. For the in-situ annotated graphics elements found, when searching in the left direction in the local coordinate system, the in-situ annotated graphics elements obtained are stored at the front end of the queue; when searching in the right direction, the in-situ annotated graphics elements obtained are stored at the back end of the queue. The left-right order of the target in-situ annotated graphics elements finally obtained is correct.

[0114] Optionally, when searching, a quadtree method may be used for searching, or other methods may be used for searching, etc., and specific settings may be made according to actual needs.

[0115] The optional in-situ annotation graphics are screened again using the text direction and height, thereby improving the accuracy of the target in-situ annotation graphics obtained.

[0116] S23, determining the target in-situ marked graphics element corresponding to each beam graphics element according to the positional relationship between the target in-situ marked graphics element and the beam graphics element.

[0117] Specifically, the above S23 includes:

[0118] S231: For each beam element, determine the target in-situ annotation element projected onto the beam element.

[0119] S232, when the determined target in-situ marked element is parallel to the beam element, based on the determined distance between the target in-situ marked element and the beam element, determine the target in-situ marked element corresponding to the beam element.

[0120] When matching the beam element with the target in-situ annotated element, the electronic device uses the projection of the target in-situ annotated element and whether the target in-situ annotated element is parallel to the beam element for screening. For example, first corresponding to each beam element, first determine the target in-situ annotated element projected on the beam element; then determine whether the target in-situ element is parallel to the beam element. Alternatively, the order of the two is exchanged, first query the target in-situ annotated element parallel to the beam element, and then determine whether the projection is on the beam element. There is no limitation on the processing order of the two here, and it can be set according to actual needs.

[0121] When both the projection condition and the parallel condition are satisfied, it means that the target in-situ annotation element may belong to the beam element. Then, the vertical distance between the target in-situ annotation element and the beam element is used to determine the target in-situ annotation element corresponding to the beam element. As mentioned above, the target in-situ annotation element corresponding to the beam element is closest to the beam element.

[0122] In some optional implementations of this embodiment, the above S232 may include:

[0123] (1) Filter out the target in-situ labeled primitives that are closest to the target in-situ labeled primitives from the determined target in-situ labeled primitives.

[0124] like Figure 5 As shown, the target in-situ annotation element 4C20 can correspond to beam 1 and beam 2 through the above projection and parallel judgment. At this time, it is necessary to further screen the target in-situ annotation element 4C20 in combination with the vertical distance between the two beams. That is, if the vertical distance between 4C20 and beam 1 is less than the vertical distance between 4C20 and beam 2, it is determined that 4C20 corresponds to beam 1.

[0125] (2) The result is verified based on the position information of the selected target in-situ annotated graphics elements to determine the target in-situ annotated graphics elements corresponding to the beam graphics elements.

[0126] From a global perspective, the target in-situ labeled element 4C20 belongs to beam 1. However, in the existing recognition method, if beam 1 is recognized first, 4C20 belongs to beam 1; if beam 2 is recognized first, 4C20 belongs to beam 2. Based on this, in order to further ensure the reliability of the recognition result, the electronic device also uses the position information of the identified target in-situ labeled element to verify the result. That is, when a beam is identified with an in-situ annotation, the in-situ annotation's own verification algorithm is used to finally determine the correct ownership of the in-situ annotation. The result verification is to use the position of the target in-situ labeled element as a reference, screen out the beam elements within the preset range of the target in-situ labeled element, and then use the screened beam elements to judge the positional relationship to determine the target in-situ labeled element corresponding to the beam element.

[0127] like Figure 6 As shown, as an optional implementation of this embodiment, step (2) of S232 above may include:

[0128] 2.1) For the selected target in-situ annotation elements, select the optional beam elements within the preset range.

[0129] 2.2) Based on the positional relationship between the selected target in-situ annotation elements and each optional beam element, the target in-situ annotation element corresponding to the beam element is determined.

[0130] For example, Figure 6 As shown, for the determined target in-situ annotation element 4C20, all beam elements within the preset range are screened out, which are called optional beam elements, and beams 2, 3, and 4 are obtained. In combination with the above-mentioned projection and parallel screening conditions, it is determined that beams 3 and 4 do not meet the conditions, and 4C20 is determined to correspond to beam 1 again.

[0131] The result is verified through the position information of the target in-situ annotated graphics element to further ensure the accuracy of the recognition result, and the best relationship matching is performed based on the position of the entire drawing to prevent the user from partially identifying (or when the recognition order changes) and attributing the in-situ annotated information incorrectly, thereby improving the recognition accuracy.

[0132] The in-situ annotation recognition method provided in this embodiment performs aggregation processing through direction and spacing. The processing conforms to the basic rules of information description and is simple and easy to implement.

[0133] As an optional implementation of this embodiment, the above S23 may also include:

[0134] (1) Based on the positional relationship between the target in-situ annotated entities and the beam entities, the beam entities corresponding to each target in-situ annotated entity are determined.

[0135] (2) The distance between the basic point of the target in-situ annotation element and the corresponding beam element is used to determine the steel bar type of the corresponding beam element, wherein the steel bar type includes upper steel bars and lower steel bars.

[0136] According to the basic rules of drawing drawings by personnel, such as Figure 7 As shown in the figure, when drawing the lower reinforcement, the basic point 1 of the in-situ annotation element is updated to the center line of the beam element; when drawing the upper reinforcement, the basic point 4 of the in-situ annotation element is closer to the center line of the beam element. Based on this, the algorithm is implemented according to this rule, and the calculated reinforcement type of the beam element is more in line with actual needs.

[0137] When the electronic device matches the target in-situ annotation element corresponding to the beam element, it calculates the vertical distance between the basic point 1 and the basic point 4 of the target in-situ annotation element and the beam element. Based on the size of the vertical distance, the type of steel bar of the corresponding beam element is determined. If the vertical distance between the basic point 1 and the beam element is close, the type of steel bar of the beam element is determined to be the upper steel bar; if the vertical distance between the basic point 4 and the beam element is close, the type of steel bar of the beam element is determined to be the lower steel bar.

[0138] The judgment of the steel bar type is based on the distance between the basic point of the target in-situ annotation element and the beam element, so that the judgment of the steel bar type will no longer change due to the drawing direction of the beam element, and users will no longer be confused.

[0139] In this embodiment, a method for identifying an in-situ mark is provided, which can be used in electronic devices such as computers. Figure 8 is a flow chart of an in-situ marking recognition method according to an embodiment of the present invention. Figure 8 As shown, the process includes the following steps:

[0140] S31, obtaining a target CAD drawing, and analyzing the target CAD drawing to determine beam elements and in-situ annotated elements in the target CAD drawing.

[0141] For details, please refer to S21 of the embodiment shown in 3, which will not be described again here.

[0142] S32, based on the directions of the respective in-situ annotated primitives and the spacings between the in-situ annotated primitives, aggregate the in-situ annotated primitives to determine a target in-situ annotated primitive.

[0143] Please refer to S22 of the embodiment shown in 3 for details, which will not be described again here.

[0144] S33, determining the target in-situ marked graphics element corresponding to each beam graphics element according to the positional relationship between the target in-situ marked graphics element and the beam graphics element.

[0145] It should be noted that, in this embodiment, the description is made with the in-situ labeled primitive group. Of course, in the recognition process of the in-situ annotation, not only the above Figure 3 The target in-situ labeled primitives described in the embodiment are matched, and the in-situ labeled primitive groups described in the embodiment can also be matched. Specifically, the above S33 includes:

[0146] S331, corresponding to each beam element, based on the annotation information type of the target in-situ annotated element, search along a preset direction to obtain an in-situ annotated element group corresponding to the beam element.

[0147] For example, Figure 9a As shown, for the target in-situ annotation element 4C20, based on the above Figure 3 The identification methods shown, i.e., projection, parallelism, and distance, determine that 4C20 belongs to beam 1. However, in reality, 4C20 belongs to beam 2. Therefore, using the above method, it may appear Figure 9a The case shown is where 4C20 is incorrectly attributed to beam 1.

[0148] Based on this, in this embodiment, a method of in-situ annotated primitive groups is introduced. First, the in-situ annotated primitive group is determined using the annotation information type. The annotation information type is related to the annotation method of the target in-situ annotated primitive. That is, in an in-situ annotated primitive group, the target in-situ annotated primitive of the same annotation information type appears once and only once. When it appears twice, the ownership of the annotation changes. Specifically, when recursively expanding the target in-situ annotated primitive, the annotation information type is judged. When the annotation information types overlap, the expansion is terminated.

[0149] like Figure 9bAs shown, for beam 2, the upward directional search finds the target in-situ annotation element 4C20, 4C20 directional search finds C8@200, C8@200 directional search finds 4C20, and because the same type of 4C20 already exists, the search is terminated, and finally C8@200 is found and the correct annotation set is identified. That is, the in-situ annotation element group corresponding to beam 2 is obtained, including 4C20 and C8@200.

[0150] S332, based on the distance between the in-situ labeled element group and the beam element, determine the target in-situ labeled element corresponding to each beam element.

[0151] After determining the in-situ labeled primitive group, the electronic device uses the same result verification method as the above-mentioned target in-situ labeled primitive to verify the result. Please refer to the above description for details, which will not be repeated here.

[0152] For example, Fig.9c As shown, for the in-situ labeled element group, the beam elements that meet the conditions are found to include beam 1 and beam 2. By comparing the vertical distances between the in-situ labeled element group and the two beams, the beam element with the shortest vertical distance is determined as the beam element corresponding to the in-situ labeled element group.

[0153] The in-situ annotation recognition method provided in this embodiment is that in a annotation set, the same type of annotation information occurs only once. When it appears twice, the ownership of the annotation changes. Therefore, the reliability of the recognition result can be guaranteed by in-situ annotation of the element group; and the result is verified by using the distance between the in-situ annotation element group and the beam element, which further ensures the accuracy of the recognition.

[0154] In some optional implementations of this embodiment, the above S33 may also include:

[0155] (1) When the number of target in-situ annotated graphics elements corresponding to the beam graphics element is greater than 1, screening is performed based on the horizontal distance between the corresponding target in-situ annotated graphics elements and the beam graphics element.

[0156] (2) When there are at least two legal target in-situ labeled entities after screening, the target in-situ labeled entity with the smallest labeling sequence number is determined as the target in-situ labeled entity corresponding to the beam entity.

[0157] like Fig.10 As shown, for a target in-situ annotated primitive with multiple correct information at the same time, a priority algorithm is determined, and further identified as having one and only one unique solution. Specifically, it includes:

[0158] (1) When there are multiple legal annotations, find the one with the shortest vertical distance;

[0159] (2) When there are multiple legal annotations with the shortest vertical distance, find the annotation that is closest to the center of the area horizontally;

[0160] (3) When there are multiple legal annotations for the horizontal distance, find the one with the smallest ID value;

[0161] The above can achieve the optimal solution for labeling and ensure that each recognition result is unique and is not affected by drawing direction and recognition range factors.

[0162] As a specific application example of this embodiment, Fig.11 As shown, the in-situ marking recognition method includes:

[0163] S401, obtaining all beam elements;

[0164] S402, constructing a beam element quadtree;

[0165] S403, obtaining all in-situ annotated graphics elements;

[0166] S404, horizontally aggregate the in-situ annotated graphics elements to obtain target in-situ annotated graphics elements;

[0167] S405, constructing a target in-situ labeled primitive quadtree;

[0168] S406, traversing a target in-situ labeled primitive;

[0169] S407, determining whether the annotation is projected on the beam and whether there is no other annotation between the annotation and the beam; if so, executing S408, otherwise executing S406;

[0170] S408, determine whether the mark is parallel to the beam. If so, execute S409; otherwise, execute S406;

[0171] S409, determining whether there is a more suitable beam element for the target in-situ annotation, that is, screening by vertical distance, and executing S410 if no more suitable beam element exists, otherwise, executing S406;

[0172] S410, check the legality of the target in-situ marking information, if legal, execute S411, otherwise execute S406;

[0173] S411, calculate the beam to which the annotation belongs;

[0174] S412, calculate and mark the upper and lower reinforcement types;

[0175] S413, calculate and mark specific steel bar types;

[0176] S414, searching for a marked information group according to the most recent mark;

[0177] S415, determining whether there is a more suitable beam element in the annotation information group; if so, executing S414, otherwise executing S416;

[0178] S416, parsing the annotation information group;

[0179] S417, when there are multiple solutions, matching is performed based on the priority principle;

[0180] S418, the in-situ marking information analysis is completed.

[0181] This method can handle the information analysis of illegal DWG annotated entities (the situation where the in-situ annotation information consists of multiple entities) by aggregating the in-situ annotated entities, thereby expanding the compatibility range of user drawings; it performs the best relationship matching based on the positions of the entire drawing to prevent users from making partial identifications or incorrect attribution of in-situ annotation information due to changes in the identification order, thereby improving the recognition accuracy; the steel bar type is determined based on the relative position of the target in-situ annotated entity and the beam entity, and no longer changes due to the drawing direction of the beam entity, so that users are no longer confused; when multiple in-situ annotations at the same position are identified, the principles are unified, and users no longer have to worry about the non-uniqueness of multiple identification results.

[0182] In this embodiment, a recognition device for in-situ marking is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0183] This embodiment provides an in-situ marking recognition device, such as Fig.12 As shown, including:

[0184] The acquisition module 41 is used to acquire a target CAD drawing, and parse the target CAD drawing to determine the beam element and the in-situ annotation element in the target CAD drawing;

[0185] An aggregation module 42, configured to aggregate the in-situ annotated primitives based on directions of the in-situ annotated primitives and spacings between the in-situ annotated primitives to determine a target in-situ annotated primitive;

[0186] The determination module 43 is used to determine the target in-situ marked graphics element corresponding to each of the beam graphics elements according to the positional relationship between the target in-situ marked graphics element and the beam graphics element.

[0187] The in-situ marking identification device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0188] The further functional description of each of the above modules is the same as that of the above corresponding embodiments and will not be repeated here.

[0189] The embodiment of the present invention also provides an electronic device having the above Fig.12 The in-situ marked identification device is shown.

[0190] See also Fig.13 , Fig.13 is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present invention, such as Fig.13 As shown, the electronic device may include: at least one processor 601, such as a CPU (Central Processing Unit), at least one communication interface 603, a memory 604, and at least one communication bus 602. The communication bus 602 is used to realize the connection and communication between these components. The communication interface 603 may include a display screen (Display), a keyboard (Keyboard), and the optional communication interface 603 may also include a standard wired interface and a wireless interface. The memory 604 may be a high-speed RAM memory (Random Access Memory) or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 604 may optionally be at least one storage device located away from the aforementioned processor 601. The processor 601 may be combined with Fig.12 In the described device, the memory 604 stores an application program, and the processor 601 calls the program code stored in the memory 604 to execute any of the above method steps.

[0191] The communication bus 602 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The communication bus 602 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.13 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0192] Among them, the memory 604 may include a volatile memory (English: volatile memory), such as a random access memory (English: random-access memory, abbreviated: RAM); the memory may also include a non-volatile memory (English: non-volatile memory), such as a flash memory (English: flash memory), a hard disk drive (English: hard disk drive, abbreviated: HDD) or a solid-state drive (English: solid-state drive, abbreviated: SSD); the memory 604 may also include a combination of the above types of memory.

[0193] The processor 601 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP.

[0194] The processor 601 may further include a hardware chip. The 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.

[0195] Optionally, the memory 604 is also used to store program instructions. The processor 601 can call the program instructions to implement the in-situ marking recognition method shown in any embodiment of the present application.

[0196] The embodiment of the present invention further provides a non-transitory computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the in-situ marking recognition method in any of the above method embodiments. The storage medium may be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium may also include a combination of the above types of memory.

[0197] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. An in-situ marking recognition method, characterized in that: include: Obtain a target CAD drawing, and parse the target CAD drawing to determine beam elements and in-situ annotated elements in the target CAD drawing; Aggregating the in-situ labeled primitives based on directions of the in-situ labeled primitives and spacings between the in-situ labeled primitives to determine a target in-situ labeled primitive; Determine the target in-situ labeled graphic element corresponding to each of the beam graphic elements according to the positional relationship between the target in-situ labeled graphic element and the beam graphic element; The step of aggregating the in-situ labeled primitives based on the directions of the in-situ labeled primitives and the spacing between the in-situ labeled primitives to determine the target in-situ labeled primitive includes: Determine the direction of the in-situ labeled primitive using the basic point of the in-situ labeled primitive; Based on the direction of the current in-situ annotation primitive, searching for an in-situ annotation primitive whose spacing from the current in-situ annotation primitive is less than a preset text width; Aggregating the queried in-situ annotated primitive with the current in-situ annotated primitive to obtain an optional in-situ annotated primitive; When the text directions and heights in the selectable in-situ labeling primitives are the same, the selectable in-situ labeling primitive is determined to be the target in-situ labeling primitive.

2. The method according to claim 1, characterized in that The step of aggregating the queried in-situ annotated primitive with the current in-situ annotated primitive to obtain an optional in-situ annotated primitive includes: When the queried in-situ annotated graphic elements are obtained by queried in the same direction as the writing direction, the queried in-situ annotated graphic elements are sequentially stored in the back end of the current in-situ annotated graphic element; When the queried in-situ annotation primitives are obtained by querying in the direction opposite to the writing direction, the queried in-situ annotation primitives are sequentially stored in the front end of the current in-situ annotation primitive to obtain the optional in-situ annotation primitives.

3. The method according to claim 1, characterized in that The step of determining the target in-situ labeled primitives corresponding to the beam primitives according to the positional relationship between the target in-situ labeled primitives and the beam primitives includes: For each of the beam elements, determine a target in-situ annotation element projected onto the beam element; When the determined target in-situ annotation element is parallel to the beam element, the target in-situ annotation element corresponding to the beam element is determined based on the distance between the determined target in-situ annotation element and the beam element.

4. The method according to claim 3, characterized in that The determining, based on the determined distance between the target in-situ labeled primitive and the beam primitive, a target in-situ labeled primitive corresponding to the beam primitive comprises: Selecting a target in-situ labeled primitive that is closest to the target in-situ labeled primitive from among the determined target in-situ labeled primitives; The result is checked based on the position information of the screened target in-situ annotated graphics element to determine the target in-situ annotated graphics element corresponding to the beam graphics element.

5. The method according to claim 4, characterized in that The result verification based on the position information of the filtered target in-situ annotated graphic element to determine the target in-situ annotated graphic element corresponding to the beam graphic element includes: For the selected target in-situ annotation elements, select the optional beam elements within the preset range; Based on the positional relationship between the filtered target in-situ labeled graphics element and each of the optional beam graphics elements, the target in-situ labeled graphics element corresponding to the beam graphics element is determined.

6. The method according to claim 1, characterized in that The step of determining the target in-situ labeled primitives corresponding to the beam primitives according to the positional relationship between the target in-situ labeled primitives and the beam primitives further comprises: Determine the beam element corresponding to each of the target in-situ labeled elements based on the positional relationship between the target in-situ labeled elements and the beam element; The distance between the basic point of the target in-situ annotation element and the corresponding beam element is used to determine the steel bar type of the corresponding beam element, and the steel bar type includes upper steel bars and lower steel bars.

7. The method according to claim 1, characterized in that The step of determining the target in-situ labeled primitives corresponding to the beam primitives according to the positional relationship between the target in-situ labeled primitives and the beam primitives further comprises: Corresponding to each of the beam elements, based on the annotation information type of the target in-situ annotated element, searching along a preset direction to obtain an in-situ annotated element group corresponding to the beam element; Based on the distance between the in-situ labeled primitive group and the beam primitive, a target in-situ labeled primitive corresponding to each of the beam primitives is determined.

8. The method according to any one of claims 1 to 7, characterized in that The step of determining the target in-situ labeled primitives corresponding to the beam primitives according to the positional relationship between the target in-situ labeled primitives and the beam primitives further comprises: When the number of target in-situ annotated graphics elements corresponding to the beam graphics element is greater than 1, screening is performed based on the horizontal distance between the corresponding target in-situ annotated graphics elements and the beam graphics element; When there are at least two legal target in-situ labeled entities after screening, the target in-situ labeled entity with the smallest labeling sequence number is determined as the target in-situ labeled entity corresponding to the beam entity.

9. An in-situ marking recognition device, characterized in that: include: An acquisition module is used to acquire a target CAD drawing, and parse the target CAD drawing to determine beam elements and in-situ annotated elements in the target CAD drawing; An aggregation module, configured to aggregate the in-situ annotated primitives based on directions of the in-situ annotated primitives and spacings between the in-situ annotated primitives to determine a target in-situ annotated primitive; A determination module, used for determining the target in-situ labeled graphic element corresponding to each of the beam graphic elements according to the positional relationship between the target in-situ labeled graphic element and the beam graphic element; The step of aggregating the in-situ labeled primitives based on the directions of the in-situ labeled primitives and the spacing between the in-situ labeled primitives to determine the target in-situ labeled primitive includes: Determine the direction of the in-situ labeled primitive using the basic point of the in-situ labeled primitive; Based on the direction of the current in-situ annotation primitive, searching for an in-situ annotation primitive whose spacing from the current in-situ annotation primitive is less than a preset text width; Aggregating the queried in-situ annotated primitive with the current in-situ annotated primitive to obtain an optional in-situ annotated primitive; When the text directions and heights in the selectable in-situ labeling primitives are the same, the selectable in-situ labeling primitive is determined to be the target in-situ labeling primitive.

10. An electronic device, characterized in that: include: 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 in-situ marking recognition method according to any one of claims 1 to 8 by executing the computer instructions.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the in-situ marking recognition method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Architectural drawing text information identification method and device

    CN112651373A