CAD-based word group recognition method and device, storage medium and electronic equipment

By determining and using the ranking and content characteristics of the target group, text drawing and traversal of architectural drawings, identifying the character group that conforms to the characteristics, solve the problem of low accuracy of the word group recognition in the existing technology, and achieve higher Recognize accuracy.

CN119049077BActive Publication Date: 2025-01-28BEIJING EXPLORER SOFTWARE CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411454959.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-01-28
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

In the prior art, the method based on spatial position recognition word groups has a low recognition accuracy when facing complex drawings.

Method used

By determining the ranking and content characteristics of the target group, including the text characteristics and arrangement of the content of each line of the block, the text draws and traverses the identification building drawings to identify the character group that conforms to the characteristic.

Benefits of technology

The accuracy of the identification of the word group is improved, and the misunderstanding caused by the location relationship is avoided, and the reliability of the word group recognition in the complex drawings is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119049077B_ABST
    Figure CN119049077B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for character group recognition based on CAD, a storage medium and an electronic device. The method comprises: determining the target character group feature, wherein the target character group feature includes the arrangement feature and content feature of the target character group, and the content feature is used to indicate the text feature and arrangement order of each line of character block content of the target character group; extracting text from the architectural drawing to be recognized to obtain a text set corresponding to the architectural drawing to be recognized; traversing the text set, and determining the character group in the text set that meets the target character group feature as the target character group. The present application solves the technical problem that the character group recognition method provided by the related art has a low accuracy rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of engineering drawing, and in particular to a CAD-based character group recognition method and device, a storage medium and an electronic device. Background Art

[0002] Nowadays, when designing and viewing architectural drawings, you can use several words to describe the components in the drawings. Several lines of text that describe the same structure or component can form a word group. In architectural drawings, you can use word groups to review the corresponding components or structures, and you can also move the word group as a whole to adjust the binding relationship with the structure.

[0003] In the related art, in Computer Aided Design (CAD) software, word groups can be automatically identified, and components and their bound word groups can be identified according to their positions. For example, for a component or structure in a building drawing, the surrounding text can be bound into a word group. However, in the related art, because word groups are identified by spatial position, the recognition accuracy of word groups in drawings with complex drawings is low. In other words, the word group recognition method provided by the related art has the problem of low accuracy.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present application provide a CAD-based word group recognition method and device, a storage medium, and an electronic device to at least solve the technical problem that the word group recognition method provided by the related art has a low accuracy rate.

[0006] According to one aspect of an embodiment of the present application, a CAD-based character group recognition method is provided, comprising: determining target character group features, wherein the target character group features include arrangement features and content features of the target character group, and the content features are used to indicate the text features and arrangement order of the content of each line of character blocks of the target character group; performing text extraction on an architectural drawing to be recognized to obtain a text set corresponding to the architectural drawing to be recognized; traversing the text set, and determining a character group in the text set that meets the target character group features as the target character group.

[0007] According to another aspect of an embodiment of the present application, a CAD-based character group recognition device is also provided, including: a feature determination unit, used to determine target character group features, wherein the target character group features include arrangement features and content features of the target character group, and the content features are used to indicate the text features and arrangement order of the content of each line of character blocks of the target character group; a text set extraction unit, used to perform text extraction on the architectural drawings to be identified to obtain a text set corresponding to the architectural drawings to be identified; a target character group determination unit, used to traverse the text set and determine the character group in the text set that meets the target character group features as the target character group.

[0008] Optionally, the above-mentioned feature determination unit includes: an arrangement feature determination module, which is used to determine the arrangement features in the target word group features, wherein the arrangement features are used to indicate the spacing between each row of word blocks in the target word group and the spacing between each row of word blocks and the lead line in the target word group; a content feature determination module, which is used to determine the content features in the target word group features, wherein the content features are used to indicate the text features and arrangement order of the content of each row of word blocks in the target word group, and the text features are used to indicate the meaning of the word blocks.

[0009] Optionally, the above-mentioned target word group determination unit also includes: an initial word block determination module, used to determine the initial word block, wherein the initial word block is the first row of word blocks in the target word group that meets the target word group characteristics; the target word group determination module is used to determine the target word group in the text set according to the arrangement characteristics in the target word group characteristics and the position of the initial word block.

[0010] Optionally, the above-mentioned initial character block determination module is also used to: determine the initial content features corresponding to the initial character block according to the content features of the target character group features; determine the character blocks that meet the initial content features in the text set as the character blocks to be determined; when the spacing between the character blocks to be determined and the target lead lines meets the arrangement features, determine the character blocks to be determined as the initial character blocks.

[0011] Optionally, the step of determining in the text set the character blocks that meet the initial content features as the character blocks to be determined includes: acquiring key features in the initial content features, wherein the key features match the type of the architectural drawing to be identified.

[0012] Optionally, the above-mentioned target word group determination unit also includes: traversing the text set, determining the word group in the text set that meets the target word group characteristics as the target word group; removing the target word group in the text set to update the text set, and determining the word group in the updated text set that meets the target word group characteristics as the target word group.

[0013] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned CAD-based character group recognition method when running.

[0014] According to another aspect of the embodiment of the present application, a computer program product is provided, the computer program product comprising a computer program / instruction, the computer instruction being stored in a computer-readable storage medium. A processor of a computer device reads the computer program / instruction from the computer-readable storage medium, and the processor executes the computer program / instruction, so that the computer device performs the above CAD-based word group recognition method.

[0015] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the CAD-based word group recognition method through the computer program.

[0016] In an embodiment of the present application, a target word group feature is determined, wherein the target word group feature includes the arrangement feature and content feature of the target word group, and the content feature is used to indicate the text feature and arrangement order of the content of each line of the target word group; a text extraction is performed on the architectural drawing to be identified to obtain a text set corresponding to the architectural drawing to be identified; the text set is traversed, and the word group in the text set that meets the target word group feature is determined as the target word group. In the above manner, the target word group feature including the arrangement feature and the content feature can be predetermined, and the content feature can indicate the content of each line of the word block in the target word group and the order of each line of the word block. After obtaining the architectural drawing to be identified, the text extraction can be performed on it to obtain the corresponding text set, and the text set is traversed to determine the word group that meets the arrangement feature and the content feature as the target word group. In this way, the word group can be identified in combination with the content feature of the word group. When identifying the word group in a complex drawing, the misidentification caused by the position relationship can be avoided, and the technical problem of low accuracy of the word group recognition method provided by the related technology is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0018] Figure 1 is a schematic diagram of a hardware environment of an optional CAD-based word group recognition method according to an embodiment of the present application;

[0019] Figure 2is a flow chart of an optional CAD-based word group recognition method according to an embodiment of the present application;

[0020] Figure 3 is a schematic diagram of an optional CAD-based word group recognition method according to an embodiment of the present application;

[0021] Figure 4 is a schematic diagram of another optional CAD-based word group recognition method according to an embodiment of the present application;

[0022] Figure 5 is a schematic diagram of another optional CAD-based word group recognition method according to an embodiment of the present application;

[0023] Figure 6 is a schematic diagram of another optional CAD-based word group recognition method according to an embodiment of the present application;

[0024] Figure 7 is a schematic diagram of an optional CAD-based character group recognition device according to an embodiment of the present application;

[0025] Figure 8 is a schematic diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] According to one aspect of the embodiment of the present application, a CAD-based word group recognition method is provided. As an optional implementation, the CAD-based word group recognition method can be but is not limited to being applied to Figure 1 The CAD-based word group recognition system in the hardware environment shown. The CAD-based word group recognition system may include but is not limited to a terminal device 102, a network 110, a server 112, and a database 114. The terminal device 102 runs a target client (such as Figure 1 As shown, the target client is a client that can create accurate two-dimensional drawings, detailed drawings and three-dimensional models. The terminal device 102 includes a display 108, a processor 106 and a memory 104. The display 108 can be used to display the architectural drawings to be identified, etc., and is also used to provide a human-computer interaction interface to receive touch human-computer interaction operations for different information. The processor is used to generate an interaction instruction in response to the human-computer interaction operation, and send the interaction instruction to the server to obtain the architectural drawings to be identified. The memory is used to store resources such as target word group features and target word groups.

[0029] In addition, the server 112 includes a processing engine 116, which is used to perform storage or reading operations on the database 114. Specifically, the processing engine 116 reads the to-be-identified architectural drawings from the database 114.

[0030] Assumptions Figure 1 The terminal device 102 in the embodiment runs an auxiliary design client for creating accurate two-dimensional drawings, detailed drawings and three-dimensional models. The specific process of this embodiment is as follows: in step S102, the terminal device 102 sends a request for a building drawing to be identified to the server 112 through the network 110. The terminal device 102 may be one or more devices; after receiving the request for the building drawing to be identified sent by the terminal device 102 in step S102, the server 112 obtains the building drawing to be identified from the database 114 and sends it to the terminal device 102.

[0031] After the terminal device 102 receives the architectural drawing to be recognized sent by the server 112, steps S104-S108 are executed in the terminal device 102 to determine the target word group features, wherein the target word group features include the arrangement features and content features of the target word group, and the content features are used to indicate the text features and arrangement order of the content of each line of the target word group; text extraction is performed on the architectural drawing to be recognized to obtain a text set corresponding to the architectural drawing to be recognized; the text set is traversed, and the word group in the text set that meets the target word group features is determined as the target word group.

[0032] Optionally, in this embodiment, the terminal device 102 may be a terminal device configured with a target client, which may include but is not limited to at least one of the following: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop, a tablet computer, a PDA, a MID (Mobile Internet Devices), a PAD, a desktop computer, a smart TV, etc. The target client may be a client that supports providing a CAD-based word group recognition task, such as a graphic design client and a browser client. The network may include but is not limited to: a wired network, a wireless network, wherein the wired network includes: a local area network, a metropolitan area network and a wide area network, and the wireless network includes: Bluetooth, WIFI and other networks that realize wireless communication. The server may be a single server, or a server cluster consisting of multiple servers, or a cloud server. The above is only an example, and no limitation is made to this in this embodiment.

[0033] Optionally, in this embodiment, the above-mentioned CAD-based word group recognition method can be applied to, but not limited to, designing the structural engineering of a construction project. For example, if a structural engineer uses CAD to design the structural system of a building, including beams, columns, plates, foundations, etc., the structural construction drawings can be automatically generated using CAD software or building information modeling (BIM). During the design process, the above-mentioned CAD-based word group recognition method can be used to automatically select the target word group, and the target word group can be moved, dragged, etc., and the target word group and the matching components can also be reviewed. The above-mentioned CAD-based word group recognition method can solve the problem of misrecognition that affects the normal display of the subsequent functional effects of the review software.

[0034] The above usage scenarios are only examples. The solution of the present application can be used in any scenario of recognizing character groups in architectural drawings in CAD, and this embodiment does not impose any limitation on this.

[0035] In an embodiment of the present application, a target word group feature is determined, wherein the target word group feature includes the arrangement feature and content feature of the target word group, and the content feature is used to indicate the text feature and arrangement order of the content of each line of the target word group; a text extraction is performed on the architectural drawing to be identified to obtain a text set corresponding to the architectural drawing to be identified; the text set is traversed, and the word group in the text set that meets the target word group feature is determined as the target word group. In the above manner, the target word group feature including the arrangement feature and the content feature can be predetermined, and the content feature can indicate the content of each line of the word block in the target word group and the order of each line of the word block. After obtaining the architectural drawing to be identified, the text extraction can be performed on it to obtain the corresponding text set, and the text set is traversed to determine the word group that meets the arrangement feature and the content feature as the target word group. In this way, the word group can be identified in combination with the content feature of the word group. When identifying the word group in a complex drawing, the misidentification caused by the position relationship can be avoided, and the technical problem of low accuracy of the word group recognition method provided by the related technology is solved.

[0036] As an optional implementation, Figure 2 As shown, the above method comprises the following steps:

[0037] S202, determining a target word group feature, wherein the target word group feature includes an arrangement feature and a content feature of the target word group, and the content feature is used to indicate a text feature and an arrangement order of the content of each line of the target word group;

[0038] It should be noted that the word group in architectural drawings refers to the collection of words and numbers used to represent specific information on the drawings. In architectural drawings, the application of word groups is very critical. They are usually used to convey important information such as design intent, dimensioning, materials, construction requirements, etc.

[0039] It should be noted that in architectural drawings, the marking methods of word groups are usually divided into two types: centralized marking and in-situ marking. Centralized marking is to uniformly describe the common properties of multiple or all components in a specific area of ​​the drawing. For example, in the centralized marking of the beam, the beam number, cross-sectional dimensions, reinforcement information, etc. will be given. This information is common to the beams in the entire structure or a certain area. Different from centralized marking, in-situ marking is to mark the component-specific information directly next to the component. This marking method is used to point out specific information that is not mentioned in the centralized marking or is different from the centralized marking. For example, if a beam has special reinforcement requirements or size changes in a certain part, in-situ marking will be performed at that part.

[0040] In an optional implementation, different target word group features may be set for different annotation modes. For example, for the target word group features corresponding to the centralized annotation, a keyword feature may be set in the content feature to retrieve the centralized annotation.

[0041] In an optional embodiment, the arrangement feature may be the alignment between the blocks in the target word group, the distance between the blocks, etc. The content feature may be the text features and arrangement order of the content of each line of blocks in the target word group. The content feature may include the content and order such as the content of the first line of blocks is the numbered section, and the content of the second line of blocks is the reinforcement.

[0042] How to set the layout features and content features will be described in detail below and will not be repeated here.

[0043] S204, extracting text from the architectural drawing to be identified to obtain a text set corresponding to the architectural drawing to be identified;

[0044] It should be noted that the building drawings to be identified can be drawings that record in detail information such as the planning, design, materials, construction methods and building specifications of the building. They can be floor plans (such as the horizontal layout of the building, including rooms, doors and windows, etc.) or structural drawings (describing the structural system of the building, such as the dimensions and materials of structures such as beams, columns and slabs).

[0045] It should be noted that the text set can be words and blocks that maintain the positional relationship in the architectural drawings to be identified. In the architectural drawings to be identified, the words and blocks are around the corresponding components or structures, and have a certain positional relationship with other words and blocks, and the words and blocks have corresponding position coordinates. In the text extraction process, the position information of the words and blocks will be retained to generate a text set. The text set can be a text file without components and structural drawings, or a text file with components and structural drawings.

[0046] In an optional implementation, in CAD, text extraction is performed on the architectural drawings to be recognized, and the text extraction tool or optical character recognition technology provided in the CAD software may be used.

[0047] Figure 3 is a schematic diagram of an optional CAD-based word group recognition method according to an embodiment of the present application; Figure 3 After text extraction in (a), we can get Figure 3 As shown in (b), the text in the architectural drawing to be recognized can be displayed in bold to indicate the extracted text set.

[0048] S206, traversing the text set, and determining the word group in the text set that meets the target word group characteristics as the target word group.

[0049] In an optional implementation, in the process of traversing the characters and character blocks in a text set, the characters and character blocks can first be identified using arrangement features to determine preliminary matching character groups, and then they are traversed according to content features to determine the character groups that meet the target character group features as the target character groups.

[0050] In an embodiment of the present application, a target word group feature is determined, wherein the target word group feature includes the arrangement feature and content feature of the target word group, and the content feature is used to indicate the text feature and arrangement order of the content of each line of the target word group; a text extraction is performed on the architectural drawing to be identified to obtain a text set corresponding to the architectural drawing to be identified; the text set is traversed, and the word group in the text set that meets the target word group feature is determined as the target word group. In the above manner, the target word group feature including the arrangement feature and the content feature can be predetermined, and the content feature can indicate the content of each line of the word block in the target word group and the order of each line of the word block. After obtaining the architectural drawing to be identified, the text extraction can be performed on it to obtain the corresponding text set, and the text set is traversed to determine the word group that meets the arrangement feature and the content feature as the target word group. In this way, the word group can be identified in combination with the content feature of the word group. When identifying the word group in a complex drawing, the misidentification caused by the position relationship can be avoided, and the technical problem of low accuracy of the word group recognition method provided by the related technology is solved.

[0051] In an optional embodiment, the above-mentioned determination of the target word group characteristics includes: determining arrangement characteristics in the target word group characteristics, wherein the arrangement characteristics are used to indicate the spacing between each row of word blocks in the target word group and the spacing between each row of word blocks in the target word group and the lead line; determining content characteristics in the target word group characteristics, wherein the content characteristics are used to indicate the text characteristics and arrangement order of the content of each row of word blocks in the target word group, and the text characteristics are used to indicate the meaning of the word blocks.

[0052] It should be noted that the use of leaders is very important in architectural drawings. They not only provide visual guidance, but also help ensure the accuracy and clarity of information. Whether it is centralized annotation or in-situ annotation, leaders are a key tool to ensure that the information in the drawing is conveyed correctly. In practical applications, leaders can be straight lines or splines, with an indicator mark on one end and connected to a multi-line text object or block on the other end to ensure the accuracy and professionalism of the annotation.

[0053] In an optional implementation, the arrangement feature may indicate the spacing between each row of character blocks and the spacing between character blocks and leading lines in the target character group, and the arrangement feature may also indicate the alignment of the character blocks in the character group (left alignment, right alignment, center alignment, etc.).

[0054] In an optional implementation, the content feature may indicate the content of each line of word blocks in the target word group and the order of the content.

[0055] Figure 4 is a schematic diagram of another optional CAD-based word group recognition method according to an embodiment of the present application; Figure 4 As shown, a word group can be selected from the word set in the architectural drawing to be recognized, and the target word group feature can be determined based on the selected word group. It can also be the target word group feature received from the instruction and parameter setting sent by the user.

[0056] The content feature in the target character group feature can be the content meaning of the character block with sequential features, such as numbered section, stirrup reinforcement, longitudinal reinforcement, waist reinforcement, other characters, etc. from top to bottom. The arrangement feature can be that the spacing between the character group and the leader is not greater than 1 / 2 of the character height, the character block in the character group does not exceed one character height beyond the edge of the leader, the spacing between each line of character blocks in the character group is not greater than the character height, and the distance between the heads of each line of character blocks in the character group is not greater than 1 / 4 of the character height.

[0057] In the embodiment of the present application, the target word group can be identified by using the arrangement feature and the content feature, and the word group is identified as the target word group only when the arrangement feature and the content feature are met, so as to avoid misidentification between word groups with close positions and improve the accuracy of word group recognition.

[0058] In an optional embodiment, the above-mentioned determining the word group in the text set that meets the target word group characteristics as the target word group includes: determining an initial word block, wherein the initial word block is the first row of word blocks in the target word group that meets the target word group characteristics; determining the target word group in the text set based on the arrangement characteristics in the target word group characteristics and the position of the initial word block.

[0059] In an optional embodiment, the above-mentioned determination of the initial character block includes: determining the initial content features corresponding to the initial character block based on the content features of the target character group features; determining the character block that meets the initial content features in the text set as the character block to be determined; when the spacing between the character block to be determined and the target lead line meets the arrangement features, determining the character block to be determined as the initial character block.

[0060] In an optional embodiment, the above-mentioned determining the character blocks that meet the initial content characteristics in the text set as the character blocks to be determined includes: obtaining key features in the initial content characteristics, wherein the key features match the type of the architectural drawing to be identified.

[0061] It should be noted that the text set can be traversed first and the initial character block can be determined. The initial character block can be a character block that meets the content feature. If the content of the first line of character blocks in the content feature is a numbered section, then the character block corresponding to the numbered section in the text set can be determined as the character block to be determined. In the centralized annotation character group, keywords can also be set, such as the keyword "L" can be identified.

[0062] In an optional implementation, the setting of keywords may be related to the architectural drawings to be identified, such as the keyword "L" may be set for beam drawings, and the keyword "K" may be set for column drawings.

[0063] In an optional implementation, after the initial block of characters is determined, a lead line may be searched for within a corresponding range at both ends of the initial block of characters according to the distance feature in the arrangement feature. If a lead line is not found within the corresponding range of the distance in the arrangement feature, the text set continues to be traversed to determine the next initial block of characters. If a lead line is found, the searched lead line may be bound to the initial block of characters, and the remaining blocks may be searched downwards based on the range corresponding to the distance between each row of blocks in the arrangement feature, taking the initial block of characters as a reference. If a block of characters is found within the range, it is determined whether it conforms to the content order of the content feature, etc. If so, the block of characters is bound to the initial block of characters and the lead line. If a block of characters is not found within the range of characters or the searched block of characters does not conform to the content order of the content feature, the bound blocks of characters and the lead line are used as a target word group.

[0064] Figure 5 is a schematic diagram of another optional CAD-based word group recognition method according to an embodiment of the present application; Figure 5 As shown, to find the initial word block in the text collection, the keyword "L" can be searched, and then the word block that meets the content characteristics is determined as the initial word block (such as Figure 5 The initial block 502 and the initial block 504 in Figure 5 The initial character block is not fully shown in the figure). The initial character block satisfies the arrangement characteristics between the character block and the lead line. Figure 5 As shown, the distance between the undetermined character block 506 and the character group including the initial character block 502 meets the arrangement feature, but does not meet the content feature. Therefore, the undetermined character block 506 and the character group including the initial character block 502 are not bound, but the character group currently including the initial character block 502 is determined as the target character group. Figure 5 As shown, the distance between the undetermined character block 508 and the character group including the initial character block 504 does not meet the arrangement characteristics, so the undetermined character block 508 and the character group including the initial character block 504 are not bound, but the character group currently including the initial character block 504 is determined as the target character group.

[0065] In the embodiment of the present application, when performing word group recognition, the initial word block can be determined first, and in the process of determining the initial word block, the keyword features related to the drawing type can be used. The search efficiency for the initial word block is improved, and for different drawings, target word group features that are more in line with the current architectural drawings can be set, which improves the flexibility and accuracy of setting the target word group features. In the process of identifying the target word group, the arrangement features and content features are combined to improve the accuracy of word group recognition.

[0066] In an optional embodiment, the above-mentioned traversing the text collection and determining the word group in the text collection that meets the target word group characteristics as the target word group includes: traversing the text collection and determining the word group in the text collection that meets the target word group characteristics as the target word group; removing the target word group in the text collection to update the text collection, and determining the word group in the updated text collection that meets the target word group characteristics as the target word group.

[0067] In an optional embodiment, after a set of target word groups is determined, the set of target word groups can be removed and the updated text set can be recognized until all initial word blocks in the text set have been recognized (or until all keywords in the text set have been recognized).

[0068] Figure 6 is a schematic diagram of another optional CAD-based word group recognition method according to an embodiment of the present application; Figure 6 As shown in (a) in , the text set can be recognized according to the target word group features. After the recognition is completed, Figure 6 As shown in (b) in FIG. 5 , the word group in the dotted box is the recognized target word group.

[0069] In the embodiment of the present application, the initial character block can be traversed to determine whether the text set is completely traversed, thereby avoiding missed searches for target character groups and improving the accuracy of character group recognition.

[0070] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0071] According to another aspect of the embodiment of the present application, a CAD-based word group recognition device for implementing the above-mentioned CAD-based word group recognition method is also provided. Figure 7 As shown, the device comprises:

[0072] The feature determination unit 702 is used to determine the target word group feature, wherein the target word group feature includes the arrangement feature and content feature of the target word group, and the content feature is used to indicate the text feature and arrangement order of each line of the target word group;

[0073] A text set extraction unit 704 is used to extract text from the architectural drawing to be identified to obtain a text set corresponding to the architectural drawing to be identified;

[0074] The target word group determination unit 706 is used to traverse the text set and determine the word group in the text set that meets the target word group characteristics as the target word group.

[0075] Optionally, the feature determination unit 702 includes: an arrangement feature determination module, used to determine the arrangement features in the target character group features, wherein the arrangement features are used to indicate the spacing between each row of character blocks in the target character group and the spacing between each row of character blocks and the lead lines in the target character group; a content feature determination module, used to determine the content features in the target character group features, wherein the content features are used to indicate the text features and arrangement order of the content of each row of character blocks in the target character group, and the text features are used to indicate the meaning of the character blocks.

[0076] Optionally, the above-mentioned target word group determination unit 706 also includes: an initial word block determination module, used to determine the initial word block, wherein the initial word block is the first row of word blocks in the target word group that meets the target word group characteristics; the target word group determination module is used to determine the target word group in the text set according to the arrangement characteristics in the target word group characteristics and the position of the initial word block.

[0077] Optionally, the above-mentioned initial character block determination module is also used to: determine the initial content features corresponding to the initial character block according to the content features of the target character group features; determine the character blocks that meet the initial content features in the text set as the character blocks to be determined; when the spacing between the character blocks to be determined and the target lead lines meets the arrangement features, determine the character blocks to be determined as the initial character blocks.

[0078] Optionally, the step of determining in the text set the character blocks that meet the initial content features as the character blocks to be determined includes: acquiring key features in the initial content features, wherein the key features match the type of the architectural drawing to be identified.

[0079] Optionally, the target word group determination unit 706 further includes: traversing the text set, determining the word group in the text set that meets the target word group characteristics as the target word group; removing the target word group in the text set to update the text set, and determining the word group in the updated text set that meets the target word group characteristics as the target word group.

[0080] Optionally, in this embodiment, the embodiments to be implemented by the above-mentioned various unit modules can refer to the above-mentioned various method embodiments, which will not be repeated here.

[0081] According to another aspect of the embodiment of the present application, an electronic device for implementing the above-mentioned CAD-based word group recognition method is also provided. The electronic device may be Figure 8 The terminal device or server shown in the figure. This embodiment is described by taking the electronic device as a terminal device as an example. Figure 8As shown, the electronic device includes a memory 802 and a processor 804. The memory 802 stores a computer program, and the processor 804 is configured to execute the steps in any of the above method embodiments through the computer program.

[0082] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.

[0083] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0084] S1, determining a target word group feature, wherein the target word group feature includes an arrangement feature and a content feature of the target word group, and the content feature is used to indicate the text feature and arrangement order of each line of the target word group;

[0085] S2, extracting text from the architectural drawings to be identified to obtain a text set corresponding to the architectural drawings to be identified;

[0086] S3, traversing the text set, and determining the word group in the text set that meets the target word group characteristics as the target word group.

[0087] Alternatively, a person skilled in the art may understand that: Figure 8 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 8 The electronic device and the electronic equipment described above are not limited in structure. Figure 8 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 8 Different configurations are shown.

[0088] Among them, the memory 802 can be used to store software programs and modules, such as the program instructions / modules corresponding to the CAD-based word group recognition method and device in the embodiment of the present application. The processor 804 executes various functional applications and data processing by running the software programs and modules stored in the memory 802, that is, realizing the above-mentioned CAD-based word group recognition method. The memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 802 may further include a memory remotely arranged relative to the processor 804, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include but are not limited to the Internet, corporate intranets, local area networks, mobile communication networks and combinations thereof. Among them, the memory 802 can be specifically but not limited to being used to store information such as target word group features. As an example, Figure 8 As shown, the memory 802 may include, but is not limited to, the feature determination unit 702, the text set extraction unit 704, and the target word group determination unit 706 in the CAD-based word group recognition device. In addition, it may also include, but is not limited to, other module units in the CAD-based word group recognition device, which will not be described in detail in this example.

[0089] Optionally, the transmission device 806 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 806 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 806 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0090] In addition, the electronic device mentioned above further includes: a display 808 for displaying the architectural drawings to be identified; and a connection bus 810 for connecting various module components in the electronic device mentioned above.

[0091] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes in the form of network communication. Among them, the nodes may form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.

[0092] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program / instruction, the computer program / instruction comprising a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, various functions provided by the embodiments of the present application are executed.

[0093] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0094] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned CAD-based word group recognition method.

[0095] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0096] S1, determining a target word group feature, wherein the target word group feature includes an arrangement feature and a content feature of the target word group, and the content feature is used to indicate the text feature and arrangement order of each line of the target word group;

[0097] S2, extracting text from the architectural drawings to be identified to obtain a text set corresponding to the architectural drawings to be identified;

[0098] S3, traversing the text set, and determining the word group in the text set that meets the target word group characteristics as the target word group.

[0099] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0100] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers or network devices, etc.) to execute all or part of the steps of the above methods in each embodiment of the present application.

[0101] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0102] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0103] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0104] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0105] The above are only preferred implementations of the present application. It should be pointed out that ordinary technicians in this technical field can make several improvements and modifications without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A word group recognition method based on CAD, characterized in that: include: Determine the target word group features, wherein the target word group features include the arrangement features and content features of the target word group, the content features are used to indicate the text features and arrangement order of the content of each line of the target word group, and the arrangement features are used to indicate the alignment between the word blocks in the target word group and the distance between the word blocks; Performing text extraction on the architectural drawings to be identified to obtain a text set corresponding to the architectural drawings to be identified; Traversing the text set, and determining the word group in the text set that meets the target word group feature as the target word group; Wherein, determining the target word group features includes: Determine an arrangement feature in the target word group feature, wherein the arrangement feature is used to indicate the spacing between each row of word blocks in the target word group and the spacing between each row of word blocks in the target word group and a lead line; Determine content features in the target word group features, wherein the content features are used to indicate text features and arrangement order of content of each line of word blocks of the target word group, and the text features are used to indicate the meaning of the word blocks; The step of determining the word group in the text set that meets the target word group feature as the target word group comprises: Determine an initial word block, wherein the initial word block is the first row of word blocks in the target word group that meets the characteristics of the target word group; The target word group is determined in the text set according to the arrangement features in the target word group features and the position of the initial word block.

2. The method according to claim 1, characterized in that: The step of determining the initial word block comprises: Determining the initial content feature corresponding to the initial word block according to the content feature of the target word group feature; Determining in the text set a character block that meets the initial content characteristics as a character block to be determined; In the case that the spacing between the to-be-determined character block and the target lead line meets the arrangement characteristics, the to-be-determined character block is determined as the initial character block.

3. The method according to claim 2, characterized in that The step of determining the character blocks that meet the initial content characteristics in the text set as the character blocks to be determined includes: A key feature in the initial content feature is obtained, wherein the key feature matches the type of the architectural drawing to be identified.

4. The method according to any one of claims 1 to 3, characterized in that The step of traversing the text set and determining a word group in the text set that meets the target word group feature as a target word group includes: Traversing the text set, and determining the word group in the text set that meets the target word group feature as the target word group; The target word group is removed from the text set to update the text set, and the word group in the updated text set that meets the characteristics of the target word group is determined as the target word group.

5. A CAD-based character group recognition device, characterized in that: include: a feature determination unit, configured to determine a target character group feature, wherein the target character group feature includes an arrangement feature and a content feature of the target character group, wherein the content feature is used to indicate the text feature and arrangement order of the content of each line of character blocks of the target character group, and the arrangement feature is used to indicate the alignment mode and distance between character blocks in the target character group; A text set extraction unit, used for performing text extraction on the architectural drawing to be identified to obtain a text set corresponding to the architectural drawing to be identified; A target word group determination unit, used for traversing the text set, and determining a word group in the text set that meets the target word group feature as a target word group; The feature determination unit includes: an arrangement feature determination module, which is used to determine the arrangement feature in the target word group feature, wherein the arrangement feature is used to indicate the spacing between each row of word blocks in the target word group and the spacing between each row of word blocks and the lead line in the target word group; A content feature determination module, used to determine the content feature in the target word group feature, wherein the content feature is used to indicate the text feature and arrangement order of the content of each line of the target word group, and the text feature is used to indicate the meaning of the word block; The target word group determination unit comprises: an initial word block determination module, used to determine an initial word block, wherein the initial word block is the first row of word blocks in the target word group that meets the target word group characteristics; The target word group determination module is used to determine the target word group in the text set according to the arrangement features in the target word group features and the position of the initial word block.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 4 when executed.

7. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 4 is implemented.

8. An electronic device, comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 4 through the computer program.

Citation Information

Patent Citations

  • Text recognition method and device

    CN111144114A

  • Text recognition method and device

    CN113591862A