A method, system and device for extracting frame attributes
By obtaining and analyzing the text feature values and dependencies in the drawings, and combining standard information, the problem of low efficiency in the drawings attribute extraction in the drawings in the existing technology is solved, and the high accuracy and universality of the drawings attribute extraction effect is achieved. .
Patent Information
- Application Number
- CN202411259768.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-09-10
AI Technical Summary
The prior art is inefficient in identifying the properties of frames in drawings, and it is difficult to accurately and efficiently extract the properties of frames of non-standard drawings, especially when the drawings are not standard, the table content is missing, or the text location is isolated.
By obtaining multiple text feature values and feature value dependencies in the target drawing, using standard graph frame information to determine the target frame attributes, filtering out wrong text information, and extracting frame attributes, the methods and systems can be used to normalize without dependency In the case of frames and text formats, accurately extract the frame properties.
It realizes high-accurate frame attribute extraction, has good drawing management effect, and is good general use, and can handle non-standard drawings.
Smart Images

Figure CN118887695B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of drawing recognition, and in particular to a method, system and device for extracting drawing frame attributes. Background Art
[0002] At present, drawings are mainly drawn through drawing software (such as CAD software), using various graphics elements to describe the overall, local, parameter details and other contents of the design object in detail. When the drawing is officially produced, a frame will be put on to clarify the scope of this drawing and facilitate printing of the drawing. In order to clarify the main content of the drawing and facilitate access and management, the drawing name, project name, drawing number, version, drawing unit and other frame attributes of this drawing will be written in the drawing label area of the frame. How to accurately and efficiently identify the attributes of the frame is a problem that needs to be solved.
[0003] Therefore, it is necessary to provide a method, system and device for extracting picture frame attributes to achieve efficient picture frame attribute extraction. Summary of the invention
[0004] One or more embodiments of the present specification provide a method for extracting frame attributes, the method comprising: obtaining standard information of frame attributes, the standard information comprising multiple standard frame attributes and standard feature values of each of the standard frame attributes and standard feature value dependencies; parsing a target drawing to obtain a target frame and multiple texts within the target frame; determining feature values and feature value dependencies of each of the multiple texts; and determining a target frame attribute corresponding to the target frame based on the feature values, the feature value dependencies and the standard information.
[0005] One or more embodiments of the present specification also provide a frame attribute extraction system, the system comprising: an acquisition module, configured to acquire standard information of frame attributes, the standard information comprising multiple standard frame attributes and standard feature values of each of the standard frame attributes and standard feature value dependencies; a parsing module, configured to parse a target drawing, acquire a target frame and multiple texts within the target frame; a first determination module, configured to determine the feature value and feature value dependency of each of the multiple texts; and a second determination module, configured to determine a target frame attribute corresponding to the target frame based on the feature value, the feature value dependency and the standard information.
[0006] One or more embodiments of the present specification also provide a frame attribute extraction device, the device comprising: at least one processor and at least one memory; the at least one memory is used to store computer instructions; the at least one processor is used to execute at least part of the computer instructions to implement the frame attribute extraction method described in the above embodiment. The frame attribute extraction method, system and device provided in the embodiments of the present specification can filter out erroneous text information as much as possible, the extracted frame attributes are highly accurate, and have a good drawing management effect; in addition, it does not need to rely on standardized frame and text formats, and can also extract frame attributes from non-standard drawings well, and has good versatility. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] This specification will be further described in the form of exemplary embodiments, which will be described in detail by the accompanying drawings. These embodiments are not restrictive, and in these embodiments, the same number represents the same structure, wherein:
[0008] Figure 1 is a schematic diagram of an application scenario of a frame attribute extraction system according to some embodiments of this specification;
[0009] Figure 2 is an exemplary flow chart of a frame attribute extraction method according to some embodiments of this specification;
[0010] Figure 3 is an exemplary flow chart for determining feature values and feature value dependencies according to some embodiments of this specification;
[0011] Figure 4 is an exemplary module diagram of a frame attribute extraction system according to some embodiments of this specification;
[0012] Figure 5A and Figure 5B It is a partial schematic diagram of a drawing shown in some embodiments of this specification. DETAILED DESCRIPTION
[0013] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the following is a brief introduction to the drawings required for the description of the embodiments. Obviously, the drawings described below are only some examples or embodiments of this specification. For ordinary technicians in this field, this specification can also be applied to other similar scenarios based on these drawings without creative work. Unless it is obvious from the language environment or otherwise explained, the same reference numerals in the figures represent the same structure or operation.
[0014] It should be understood that the "system", "device", "unit" and / or "module" used herein are a method for distinguishing different components, elements, parts, portions or assemblies at different levels. However, if other words can achieve the same purpose, the words can be replaced by other expressions.
[0015] As shown in this specification and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular and may also include the plural. Generally speaking, the terms "comprise" and "include" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.
[0016] Flowcharts are used in this specification to illustrate the operations performed by the system according to the embodiments of this specification. It should be understood that the preceding or following operations are not necessarily performed precisely in order. Instead, the steps may be processed in reverse order or simultaneously. At the same time, other operations may also be added to these processes, or one or more operations may be removed from these processes.
[0017] In the related art, when identifying the attributes of the drawing frame in the drawing, the drawing frame attributes are mainly obtained by manually viewing the drawing, and the drawings are managed through drawing storage management tools such as folders. When searching for related drawings, they are still browsed according to the folder and file name, which is inefficient and relies on memory and experience. In other cases, the drawing frame attributes can be identified by character recognition tools (such as OCR software), but the character recognition tools require the drawing frame attributes to be placed in a fixed position or in a table with a header (such as Figure 5A ), which is highly dependent on the standardization of drawing and the regular data collation of the drawing frame drawing situation of the drawing design unit. In the case of non-standard drawing of the drawing frame, missing table content, isolated text position, etc. (such as Figure 5B ), it is difficult to accurately and efficiently extract the frame attributes in the drawing.
[0018] In view of this, the embodiments of the present specification provide a method, system and device for extracting frame attributes. By obtaining the feature values and feature value dependencies of multiple texts in a target drawing and determining the target frame attributes through standard frame information, erroneous text information can be screened out as much as possible, and the extracted frame attributes are highly accurate, with better drawing management effects. In addition, there is no need to rely on standardized frame and text formats, and the frame attributes of non-standard drawings can be extracted well, with good versatility.
[0019] Figure 1 is a schematic diagram of an application scenario of a frame attribute extraction system according to some embodiments of this specification. Figure 1As shown, the application scenario 100 of the frame attribute extraction system includes a drawing 110, a network 120, a terminal 130, a processor 140, and a storage device 150.
[0020] Drawings 110 refer to various design drawings that require frame attribute extraction. For example, drawings 110 may be architectural design drawings, decoration design drawings, mechanical manufacturing design drawings, clothing design drawings, etc. that require frame attribute extraction. The types of drawings 110 listed above are only examples and do not constitute a limitation. Drawings 110 may also be any drawings that require frame attribute extraction.
[0021] In some embodiments, the drawing 110 may be a paper drawing. In other embodiments, the drawing 110 may also be an electronic drawing.
[0022] like Figure 5A As shown, the drawing 110 can be divided into a drawing area 510 and a frame area 520. The drawing area 510 is used to draw a specific design drawing, and the frame area 520 is used to identify various information for identifying and managing the drawing. For example, the frame area can be used to identify the drawing title, project name, drawing number, version, person in charge, drawing unit and other information. In some embodiments of the present specification, the information related to the drawing identified in the frame area can also be called frame attributes. For example, the frame attributes may include the drawing title, project name, drawing number, version, drawing unit and other information. Frame attribute extraction refers to extracting the information related to the drawing identified in the frame area.
[0023] The network 120 may connect various components in the application scenario 100 of the drawing frame attribute extraction system and / or connect other components outside the application scenario 100 of the drawing frame attribute extraction system. In some embodiments, one or more components of the application scenario 100 of the drawing frame attribute extraction system (e.g., the terminal 130, the processor 140, and the storage device 150, etc.) may be connected and / or communicate with each other through the network 120. For example, the terminal 130 may send the drawing frame attributes of the drawing 110 to the processor 140, etc. through the network 120.
[0024] The terminal 130 can provide functional components related to user interaction and can implement user interaction functions (such as providing or displaying information and data to users). The user can refer to the manager of the drawing 110, or the person who searches or uses the drawing 110. As an example only, the terminal 130 can be a mobile device, a tablet computer, a laptop computer, a desktop computer, or other devices with input and / or output functions, or any combination thereof.
[0025] In some embodiments, the user may obtain the drawings 110 through the terminal 130 . For example, the user may search for and read the drawings stored in the storage device 150 through the terminal 130 .
[0026] In some embodiments, the user may also send the drawing 110 to the processor 140 via the terminal 130 , and the processor 140 may extract the frame attributes of the drawing 110 .
[0027] The processor 140 is capable of processing information and / or data related to the frame attribute extraction system to perform one or more functions described in this specification. In some embodiments, the processor 140 can obtain standard information of the frame attributes, the standard information including multiple standard frame attributes and standard feature values of each standard frame attribute and standard feature value dependencies; parse the target drawing to obtain the target frame and multiple texts within the target frame; determine the feature value and feature value dependency of each text in the multiple texts; determine the target frame attribute corresponding to the target frame based on the feature value, feature value dependency and standard information. Detailed description of the relevant content can be found later (such as Figure 2 , Figure 3 etc.) related description.
[0028] In some embodiments, the processor 140 may include a central processing unit (CPU), a digital signal processor (DSP), a microcontroller unit (MCU), a computer, a user console, etc., or any combination thereof. In some embodiments, the processor 140 may include a single server or a server group. The server group may be centralized or distributed. In some embodiments, the processor 140 may be local or remote. In some embodiments, the processor 140 may be implemented on a cloud platform. By way of example only, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an internal cloud, a multi-layer cloud, etc., or any combination thereof.
[0029] The storage device 150 is capable of storing data, instructions, and / or any other information. In some embodiments, the storage device 150 may store data obtained from the terminal 130, the processor 140, etc., such as drawings 110, frame attributes, etc. In some embodiments, the storage device 150 may include a large-capacity memory, a removable memory, a volatile read-write memory, a read-only memory (ROM), etc., or any combination thereof. In some embodiments, the storage device 150 may be executed on a cloud platform. In some embodiments, the storage device 150 may be connected to the network 120 to communicate with one or more other components of the application scenario 100 of the frame attribute extraction system (e.g., the terminal 130, the processor 140, etc.). In some embodiments, the storage device 150 may be part of the processor 140.
[0030] It is worth noting that the application scenario 100 of the frame attribute extraction system is provided only for illustrative purposes and is not intended to limit the scope of this specification. For those of ordinary skill in the art, various changes and modifications can be made according to the description of this specification. For example, the application scenario 100 of the frame attribute extraction system can also include a database, an information source, etc. For another example, the application scenario 100 of the frame attribute extraction system can be implemented on other devices to achieve similar or different functions. However, these changes and modifications will not deviate from the scope of this specification.
[0031] Figure 2 is an exemplary flow chart of a frame attribute extraction method according to some embodiments of this specification. In some embodiments, process 200 may be executed by a processing device (eg, processor 140). Figure 2 As shown, process 200 includes the following steps.
[0032] Step 210, obtaining standard information of frame attributes.
[0033] Standard information refers to a collection of standardized frame attributes. For more information about frame attributes, see Figure 1 Relevant part.
[0034] In some embodiments, the standard information includes a plurality of standard frame attributes and a standard feature value of each standard frame attribute and a standard feature value dependency relationship.
[0035] The standard frame attributes refer to normalized frame attributes used as reference. In some embodiments, the standard frame attributes include standard feature values and standard feature value dependencies.
[0036] The standard feature value refers to the text or number that describes the frame attribute in a standardized manner. In some embodiments, the standard feature value can be obtained by splitting the standard frame attribute. For example, for the standard frame attribute "Decoration design drawing of room 204, unit 3, building 7, community A", it can be split into multiple standard feature values such as "community A", "building 7", "unit 3", "room 204", and "decoration design drawing". Among them, the splitting method of the standard frame attribute includes splitting through machine learning models such as support vector machines, recurrent neural networks, convolutional neural networks, and BERT. For example, the processor can input the standard frame attribute into a pre-trained machine learning model, and the machine learning model outputs the standard feature value.
[0037] Standard feature value dependencies refer to the grammatical and semantic interdependencies between various standard feature values in standard drawing frame attributes. In standard drawing frame attributes, the order in which different feature values appear is always determined. Taking the aforementioned standard drawing frame attribute "Decoration design drawing of room 204, unit 3, building 7, community A" as an example, the community name always appears before feature values such as building, unit, and room number, and the drawing type (decoration design drawing) always appears after other feature values, that is, the dependency relationship between the standard feature value related to the community name and the standard feature value related to the drawing type is that the community name is before the drawing type. Similarly, the dependency relationship between the feature value related to the building and the feature value related to the unit is that the feature value related to the building is before the feature value related to the unit, etc.
[0038] The processor may determine the dependency relationship between the standard feature values according to the order in which the standard feature values appear in the standard frame attributes. In some embodiments, the standard feature value dependency relationship may be represented in a variety of ways, such as a tree, a graph, a table, and the like.
[0039] In some embodiments, standard information may be stored in a frame properties database.
[0040] In some embodiments, the processor may construct a drawing frame attribute database based on a large number of existing drawings of different drawing units.
[0041] For example, a large number of drawings drawn by different drawing units can be obtained in advance, and the frame attributes on the drawings (such as drawing name, project name, drawing number, version, drawing unit) can be annotated through annotation tools. Then, the frame attributes in the drawings can be extracted through image recognition (for example, optical character recognition, Optical Character Recognition, OCR) and other technologies, and the extracted frame attributes can be stored as standard information in the frame attribute database.
[0042] In some embodiments, the standard information may also be preset by the user. For example, the user may preset the standard information according to the requirements of the drawing frame attribute extraction. For example, when it is necessary to extract the drawing name in the drawing frame attribute, the user may preset the standard information related to the drawing name (such as storing the drawing names in a large number of drawings as standard information in the drawing frame attribute database).
[0043] Step 220 , parsing the target drawing to obtain a target drawing frame and a plurality of texts within the target drawing frame.
[0044] The target drawing is the drawing that needs to extract the drawing frame attributes. The target drawing can be an electronic drawing or a physical drawing (such as a paper drawing).
[0045] The target frame refers to the area in the target drawing from which the frame properties need to be extracted.
[0046] In some embodiments, taking the target drawing as an electronic version of the drawing as an example, the processor can parse the target drawing based on image processing software and mapping software. Exemplarily, the processor can determine the boundary of the target frame (such as the top, bottom, left and right four vertices of the target frame) in a preset coordinate system (such as the coordinate system built into the mapping software) through a positioning method (such as a frame positioning technology), and extract multiple texts within the boundary range of the target frame through image recognition technology (such as OCR technology, etc.).
[0047] In some embodiments, when the target drawing is a physical drawing, the physical drawing can be converted into an electronic drawing by photographing, scanning, etc. and then analyzed.
[0048] In some embodiments, the target drawings may include multiple drawings, and each target drawing may include multiple target frames. When parsing the target drawings, it is necessary to obtain text information within the multiple target frames of each of the multiple target drawings.
[0049] Step 230: determining the feature value and feature value dependency of each text in the plurality of texts.
[0050] In some embodiments, the processor may perform word segmentation processing on each of the multiple texts, and use the results of the word segmentation processing as the feature value and feature value dependency relationship of each text.
[0051] In some embodiments, the processor may also segment each text and match the segmentation result with the standard feature value to determine the feature value and feature value dependency of each text. Figure 3 and related instructions.
[0052] Step 240 : determining a target frame attribute corresponding to the target frame based on the feature value, the feature value dependency and the standard information.
[0053] In some embodiments, the processor may directly use the extracted text as a target frame attribute of the target frame.
[0054] In some embodiments, the text extracted by the processor may include some text that is not a frame attribute (for example, when the frame is positioned incorrectly, text in the drawing area may be extracted, and for example, there may be errors in text extraction). The processor may screen the text based on the feature value, feature value dependency, and standard information of each text to determine the target frame attribute corresponding to the target frame. For example, the text whose feature value and feature value dependency have a vector distance less than a threshold value from the standard feature value and standard feature value dependency in the standard information is determined as the target frame attribute.
[0055] In some embodiments, for each of the multiple texts within the target frame, the processor can determine the feature value confidence based on the feature value and the standard feature value; determine the dependency confidence based on the feature value dependency and the standard feature value dependency; and determine the target frame attribute based on the feature value confidence and the dependency confidence.
[0056] The feature value confidence is a measure of the reliability of the feature value of the text, wherein the feature value of the text may be the feature value of the text determined in step 230 .
[0057] In some embodiments, the feature value confidence can be determined based on the feature value and standard feature value of the text. In some embodiments, the processor can determine the number of split words obtained by splitting the text, and determine the number of feature values of the text based on the split words and the standard feature value, and finally determine the ratio of the number of feature values of the text to the number of split words as the feature value confidence. For example, if the number of split words in a text is 5 and the number of feature values is 4, then the feature value confidence corresponding to the text is 0.8. In some embodiments, the processor can also determine the ratio of the number of feature values of the text to the number of standard feature values as the feature value confidence. For more information on text splitting and determining text feature values, see Figure 3 and its related parts.
[0058] The dependency confidence is a measure of the reliability of the feature value dependency of the text, wherein the feature value dependency of the text refers to the feature value dependency of the text determined in step 230 .
[0059] In some embodiments, the dependency confidence can be determined based on the feature value dependency and the standard feature value dependency of the text. In some embodiments, the processor can determine the feature value dependency between two of the multiple feature values of the text, and compare each feature value dependency with the corresponding standard feature value dependency, and determine the ratio of the number of correctly compared feature value dependencies to the total number of feature value dependencies as the dependency confidence. Wherein, correct comparison means that the feature value dependency between two feature values is the same as the standard feature value dependency between the corresponding standard feature values, for example, the feature value dependency between feature values A and B and the corresponding standard feature value A are the same. 1 , B 1 If the standard eigenvalue dependencies between are the same, then the eigenvalue dependency comparison between eigenvalues A and B is correct.
[0060] For example, the number of feature value dependencies between all feature values of a text is n, the number of feature value dependencies that are correctly compared with the standard feature value dependencies is m, and the dependency confidence is m / n. For more information on determining the feature value dependencies of a text, see Figure 3and related instructions.
[0061] In some embodiments, the processor may determine the text whose feature value confidence exceeds a first threshold and whose dependency confidence exceeds a second threshold as the target frame attribute. The first threshold and the second threshold may be preset. For example, the first threshold and the second threshold may be 0.8.
[0062] In some embodiments of the present specification, the extracted text is screened by the feature value confidence and the dependency confidence, so as to filter out the interference of some texts that are not frame attributes, and improve the accuracy of the determined frame attributes; in addition, it does not rely on the standard frame and text format, and for non-standard drawings (such as Figure 5B The drawing frame attributes of the drawings shown in the figure can also be accurately extracted, which has good versatility.
[0063] It is understandable that the frame attributes are usually close to or near the frame, and the text content far away from the frame may be a non-frame attribute (for example, it may be text in the drawing area). The processor can filter the target frame attributes based on the distance information between the text and the frame.
[0064] In some embodiments, the processor may determine the target text based on the feature value confidence and the dependency confidence; determine the distance information between the target text and the target frame; and determine the target frame attribute based on the distance information.
[0065] Target text refers to the text that needs to be further filtered. The target text includes the target drawing frame attributes and may also include other texts (such as text extracted when parsing the target drawing error, text in the drawing area, etc.).
[0066] In some embodiments, the processor may determine, as target text, text whose feature value confidence exceeds a first threshold and whose dependency confidence exceeds a second threshold.
[0067] The distance information includes a first distance between the target text and a side line of the frame (ie, a left or right line of the frame) and a second distance between the target text and a bottom line (or top line) of the frame.
[0068] In some embodiments, the processor may determine the target text whose first distance is less than the third threshold and whose second distance is less than the fourth threshold as the target frame attribute. The third threshold and the fourth threshold may be preset. For example, the third threshold and the fourth threshold may be related to the drawing size (e.g., the larger the drawing, the larger the third threshold and the fourth threshold).
[0069] In some embodiments, when the target text includes multiple target texts whose first distance is less than the third threshold value and whose second distance is less than the fourth threshold value, the processor can select the text with the highest feature value confidence as the target frame attribute. On this basis, if there are multiple target texts with the same feature value confidence, the target text with the highest feature value dependency confidence is selected as the target frame attribute. Further, if there are still multiple target texts with the same feature value dependency confidence, the multiple target texts are used as the target frame attribute.
[0070] In some embodiments of the present specification, by filtering the target text using distance information, texts that are not frame attributes can be further filtered out, thereby further improving the accuracy of determining the target frame attributes.
[0071] In some embodiments, when determining the feature value of text, content that is not a frame attribute may be determined as a feature value due to reasons such as an error in parsing the target drawing resulting in an error in text extraction, an error in positioning the frame to extract text within the drawing area, etc. For example, if the target drawing is an architectural design drawing, when mechanical-related text such as gears and bolts is extracted, the text obviously does not belong to the target frame attribute of the target drawing. However, when determining the feature value of the text, since the standard information may also contain standard feature values related to mechanical design drawings, the mechanical-related text may be determined as a feature value, resulting in inaccurate target frame attributes determined subsequently.
[0072] In some embodiments, the processor may determine the target text based on the feature value confidence and the dependency confidence; determine the first type of target text and the second type of target text based on the feature value of the target text, the first type of target text is the target text corresponding to the first key field, and the second type of target text is the target text corresponding to the second key field; verify the second type of target text based on the first type of target text, and determine the target frame attribute. For more information about the target text and determining the target text, please refer to the relevant part above.
[0073] The first type of target text is the target text corresponding to the first key field.
[0074] Key fields refer to strings that annotate drawing frame attributes. For example, key fields may include "drawing name", "drawing number", "drawing unit", "sub-item", "version", "project name", etc. Among them, a key field may correspond to a content of a drawing frame attribute. For example, the key field "drawing name" may correspond to the drawing name in the drawing frame attribute (such as "XX bridge design drawing").
[0075] The first key field refers to the key field corresponding to the drawing frame attributes that can appear directly in the drawing. The first key field does not need to rely on other key fields. For example, the key field corresponding to the drawing name, etc.
[0076] The second type of target text is the target text corresponding to the second key field.
[0077] The second key field refers to the key field corresponding to the drawing frame attribute that needs to rely on other drawing frame attributes to appear in the drawing. For example, the key fields corresponding to the drawing frame attributes of various numbers (which generally rely on the key fields corresponding to the drawing frame attributes of the name).
[0078] The second key field often depends on the first key field. That is, the corresponding second key field will appear only when the first key field exists. For example, the corresponding second key field "sub-item number" will appear only after the first key field "sub-item name" appears.
[0079] In some embodiments, the processor may determine the first type of target text and the second type of target text by a variety of methods. For example, the processor may process the target text based on a natural language processing method (Natural Language Processing, NLP) to determine the first type of target text and the second type of target text. For another example, the processor may input the feature value of the target text into a pre-trained first machine learning model, and the pre-trained first machine learning model outputs the classification of the target text (i.e., outputs whether the target text is the first type of target text or the second type of target text).
[0080] In some embodiments, the processor can verify the second type of target text based on the first type of target text to determine the target frame attributes. As mentioned above, the second key field often depends on the first key field, so the second type of target text corresponding to the second key field also depends on the first type of target text corresponding to the first key field. That is, only when the first type of target text appears, the corresponding second type of target text will appear, so the second type of target text can be verified based on the first type of target text.
[0081] In some embodiments, the processor can determine the first type of frame attributes based on the first type of target text; obtain the correspondence between each first key field and the second key field; verify each second type of target text based on the correspondence; and determine the second type of frame attributes based on the verified second type of target text.
[0082] The first type of frame attributes are frame attributes corresponding to the first type of target text. In some embodiments, the processor may determine the first type of target text as the first type of frame attributes.
[0083] In some embodiments, the processor may obtain the correspondence between each first key field and the second key field in a variety of ways. For example, the processor may obtain the correspondence between the first key field and the second key field by querying a preset correspondence table. For another example, the processor may input the first key field and the second key field into a pre-trained second machine learning model, and the second machine learning model outputs whether the first key field corresponds to the second key field.
[0084] In some embodiments, the processor can verify each second-class target text based on the first-class target text. In some embodiments, for each second-class target text, the processor can determine whether the corresponding second key field has a corresponding first key field; if so, the second-class target text passes the verification of the first-class target text, and if not, the verification fails.
[0085] In some embodiments, the processor may determine the second-category target text that has passed verification as the second-category frame attribute.
[0086] In some embodiments, the processor may further combine the first type of frame attributes and the second type of frame attributes to determine the target frame attributes.
[0087] In some embodiments of the present specification, verifying the second type of target text through the first type of target text can further reduce possible errors in drawing parsing, improve the accuracy of the obtained target frame attributes, and obtain better drawing management effects.
[0088] Figure 3 is an exemplary flow chart of determining feature values and feature value dependencies according to some embodiments of this specification. In some embodiments, process 300 may be executed by a processing device (eg, processor 140). Figure 3 As shown, process 300 includes the following steps.
[0089] Step 310, split each text based on part of speech and grammar to obtain a set of split words.
[0090] In some embodiments, the processor can pre-process the text. For example, remove irrelevant characters (such as punctuation marks, special symbols, etc.), and possible text cleaning (such as removing garbled characters, etc.). After pre-processing, the processor can further perform word segmentation, part-of-speech tagging, and syntactic analysis on the text through the NLP method. Finally, the processor can split the text into multiple words based on part of speech (such as nouns, verbs, adjectives, etc.) and grammar (such as the subject, predicate, object, etc. of a sentence), and obtain a set of split words. The multiple words obtained by splitting the text are the split words corresponding to the text. Wherein, the split text refers to the multiple texts within the target frame range obtained in step 220.
[0091] Step 320: Match each split word in the split word set with a standard feature value to obtain multiple feature values.
[0092] In some embodiments, the standard feature value may have only one expression form, and the processor may determine the split words whose vector distance with the standard feature value is less than a preset threshold as the feature value.
[0093] In some embodiments, the standard feature value includes multiple feature value expression forms. For example, in architectural drawings, the expression forms of feature values related to buildings may include "building", "block", "building number", etc.; the expression forms of feature values related to floors may include "floor", "F", etc.; the expression forms related to drawing types may include "plan", "elevation", "large sample drawing", "instructions", "table", etc.
[0094] In some embodiments, the processor may match each split word in the split word set with a plurality of feature value expressions in the standard feature value, and in response to a successful match between the split word and any one of the plurality of feature value expressions, determine the successfully matched split word as the feature value. For example, if the split word is "7 buildings", the processor can match the split word "7 buildings" with the expression form of the feature value related to the building in the standard feature value (such as "building", "building", "number building", etc.), and as long as there is a successful match, the split word can be determined as the feature value.
[0095] It is understandable that different drawing units may have different specifications and requirements, and the same frame attribute may be expressed in different forms. For example, a building may include multiple expressions such as "building", "building", and "building number". In some embodiments of this specification, considering the multiple expressions of feature values, as long as one expression is successfully matched, the split word can be determined as the feature value, which reduces the probability of missing feature values, can obtain better frame attribute extraction effects, and can adapt to drawings with different expressions, further improving versatility.
[0096] Step 330 , obtaining a feature value dependency relationship according to a positional relationship and / or a grammatical relationship between each feature value in the plurality of feature values.
[0097] In some embodiments, the processor may determine the feature value dependency relationship between each feature value in a plurality of feature values according to a variety of methods. For example, the processor may analyze the positional relationship and / or grammatical relationship between the feature values by an NLP method to obtain the feature value dependency relationship. For another example, the processor may input each feature value into a machine learning model, and the machine learning model outputs the feature value dependency relationship between each feature value.
[0098] In some embodiments, some texts may not include text content, but may be composed of at least one of numbers, letters, and symbols. For example, for the text corresponding to the frame attribute of the numbering class, it may only be composed of at least one of numbers, letters, and symbols. In this case, it is impossible to obtain the feature value dependency relationship based on the positional relationship and / or grammatical relationship of the text.
[0099] In some embodiments, in response to the text being composed of at least one of numbers, letters, and symbols, the processor can split the text based on character type to obtain structural features of the text; and compare the structural features with standard feature values to obtain feature values and feature value dependencies.
[0100] Character type refers to the type of characters that make up the text. Character types include numbers, symbols, uppercase letters, lowercase letters, etc.
[0101] Structural features refer to the structure of the characters of the text. Taking the drawing number "ZX-123456" as an example, its structural feature is "2 uppercase letters + 1 symbol + 4 numbers". Correspondingly, the standard information also includes a standard feature value with a preset structural feature of letters + symbols + numbers. The processor can match the structural feature "2 uppercase letters + 1 symbol + 4 numbers" with the standard feature value in the standard information. When the standard structural feature of "2 uppercase letters + 1 symbol + 4 numbers" is matched, the feature value and feature value dependency of the drawing number "ZX-123456" are determined according to the standard feature value and standard feature value dependency corresponding to the standard structural feature. Among them, the feature value is a string composed of different types of characters (such as "ZX", "-", "123456", etc.), and the feature value dependency is the order in which different types of characters appear (for example, "ZX" is before "-", "123456" is after "-", etc.).
[0102] In some embodiments of the present specification, determining feature values and feature value dependencies through structural features of the text can solve the problem that non-text text cannot be semantically / part-of-speech recognized. Non-text frame attributes (such as drawing numbers, etc.) can also be better recognized, thereby improving the accuracy of target frame attribute recognition.
[0103] Figure 4 is an exemplary module diagram of a frame attribute extraction system according to some embodiments of this specification. Figure 4 As shown, the frame attribute extraction system 400 includes an acquisition module 410 , a parsing module 420 , a first determination module 430 , and a second determination module 440 .
[0104] The acquisition module 410 is configured to acquire standard information of frame attributes, where the standard information includes a plurality of standard frame attributes and a standard feature value of each standard frame attribute and a standard feature value dependency relationship.
[0105] The parsing module 420 is configured to parse the target drawing and obtain the target drawing frame and a plurality of texts within the target drawing frame.
[0106] The first determination module 430 is configured to determine a feature value and a feature value dependency relationship of each of the plurality of texts.
[0107] In some embodiments, the first determination module 430 is further configured to split each text based on part of speech and grammar to obtain a set of split words; match each split word in the set of split words with a standard feature value to obtain multiple feature values; and obtain feature value dependency based on the positional relationship and / or grammatical relationship between each feature value in the multiple feature values.
[0108] In some embodiments, the standard feature value includes multiple feature value expression forms, and the first determination module 430 is further configured to match the split word with the multiple feature value expression forms; in response to the split word successfully matching with any one of the multiple feature value expression forms, the successfully matched split word is determined as the feature value.
[0109] In some embodiments, in response to the text being composed of at least one of numbers, letters and symbols, the first determination module 430 is further configured to split the text based on character type to obtain structural features of the text; and, compare the structural features with standard feature values to obtain feature values and feature value dependencies.
[0110] The second determination module 440 is configured to determine a target frame attribute corresponding to the target frame based on the feature value, the feature value dependency relationship and the standard information.
[0111] In some embodiments, the second determination module 440 is further configured to determine feature value confidence based on feature values and standard feature values; determine dependency confidence based on feature value dependencies and standard feature value dependencies; and determine target frame attributes based on feature value confidence and dependency confidence.
[0112] In some embodiments, the second determination module 440 is further configured to determine the target text based on the feature value confidence and the dependency confidence; determine the distance information between the target text and the target frame; and determine the target frame attributes based on the distance information.
[0113] In some embodiments, the second determination module 440 is further configured to determine the target text based on the feature value confidence and the dependency confidence; determine the first type of target text and the second type of target text based on the feature value of the target text, the first type of target text is the target text corresponding to the basic key field, and the second type of target text is the target text corresponding to the non-basic key field; verify the feature value confidence and dependency confidence of the second type of target text based on the first type of target text, and determine the target frame attributes.
[0114] In some embodiments, the second determination module 440 is further configured to determine the first type of frame attributes based on the first type of target text; obtain the correspondence between each basic key field and the non-basic key field; verify each second type of target text based on the correspondence; and determine the second type of frame attributes based on the verified second type of target text.
[0115] It should be noted that the above description of the frame attribute extraction system 400 and its modules is only for convenience of description and does not limit the present specification to the scope of the embodiments. Figure 4 The acquisition module 410, the parsing module 420, the first determination module 430, and the second determination module 440 of the frame attribute extraction system 400 disclosed in the specification can be different modules in one system, or one module can realize the functions of two or more modules. For example, each module can share a storage module, or each module can have its own storage module. Such variations are all within the protection scope of this specification.
[0116] The basic concepts have been described above. Obviously, for those skilled in the art, the above detailed disclosure is only for example and does not constitute a limitation of this specification. Although not explicitly stated here, those skilled in the art may make various modifications, improvements and corrections to this specification. Such modifications, improvements and corrections are suggested in this specification, so such modifications, improvements and corrections still belong to the spirit and scope of the exemplary embodiments of this specification.
[0117] At the same time, this specification uses specific words to describe the embodiments of this specification. For example, "one embodiment", "an embodiment", and / or "some embodiments" refer to a certain feature, structure or characteristic related to at least one embodiment of this specification. Therefore, it should be emphasized and noted that "one embodiment" or "an embodiment" or "an alternative embodiment" mentioned twice or more in different positions in this specification does not necessarily refer to the same embodiment. In addition, certain features, structures or characteristics in one or more embodiments of this specification can be appropriately combined.
[0118] It should be noted that in order to simplify the description disclosed in this specification and thus help understand one or more embodiments, in the above description of the embodiments of this specification, multiple features are sometimes combined into one embodiment, figure or description thereof. However, this disclosure method does not mean that the features required by the subject of this specification are more than the features mentioned in the claims. In fact, the features of the embodiments are less than all the features of the single embodiment disclosed above.
Claims
1. A method for extracting frame attributes, characterized in that: The method comprises: Acquire standard information of a frame attribute, wherein the standard information includes a plurality of standard frame attributes and a standard feature value of each of the standard frame attributes and a standard feature value dependency relationship; the standard feature value refers to a text or number that describes the frame attribute in a standardized manner; the standard feature value dependency relationship refers to a grammatical and semantic interdependence relationship between each of the standard feature values in the standard frame attributes; Parse the target drawing to obtain a target drawing frame and a plurality of texts within the target drawing frame; Determining a feature value and a feature value dependency relationship of each of the plurality of texts; Determining an eigenvalue confidence level according to the eigenvalue and the standard eigenvalue; Determining a dependency confidence according to the eigenvalue dependency and the standard eigenvalue dependency; and, Determining a target text based on the feature value confidence and the dependency confidence; Based on the characteristic value of the target text, a first type of target text and a second type of target text are determined, wherein the first type of target text is the target text corresponding to the first key field, and the second type of target text is the target text corresponding to the second key field; the first key field refers to the key field corresponding to the drawing frame attribute that directly appears in the target drawing; the second key field refers to the key field corresponding to the drawing frame attribute that depends on other drawing frame attributes to appear in the target drawing; the second key field depends on the first key field; The second type of target text is verified based on the first type of target text to determine the target frame attributes.
2. The method according to claim 1, characterized in that The determining of the feature value and the feature value dependency of each text in the plurality of texts comprises: Splitting each of the texts based on part of speech and grammar to obtain a set of split words; Matching each split word in the split word set with the standard feature value to obtain a plurality of the feature values; and The feature value dependency relationship is obtained according to the position relationship and / or grammatical relationship between each of the feature values in the plurality of feature values.
3. The method according to claim 2, characterized in that The standard feature value includes multiple feature value expression forms, and each split word in the split word set is matched with the standard feature value to obtain multiple feature values, including: Matching the split words with the multiple feature value expression forms; In response to the split word successfully matching any one of the multiple feature value expression forms, the successfully matched split word is determined as the feature value.
4. The method according to claim 2, characterized in that The step of obtaining the feature value dependency relationship according to the positional relationship and / or grammatical relationship between the feature values in the plurality of feature values further comprises: In response to the text being composed of at least one of numbers, letters and symbols, Splitting the text based on character types to obtain structural features of the text; and The structural features are compared with the standard feature values to obtain the feature values and the feature value dependencies.
5. The method according to claim 1, characterized in that The method further comprises: Determining a target text based on the feature value confidence and the dependency confidence; Determine the distance information between the target text and the target frame; The target frame attribute is determined based on the distance information.
6. The method according to claim 1, characterized in that The verifying the second type of target text based on the first type of target text and determining the target frame attribute includes: Determining first-type frame attributes based on the first-type target text; Obtaining a corresponding relationship between each of the first key fields and the second key fields; Verify each of the second-category target texts based on the corresponding relationship; and A second type of frame attribute is determined based on the second type of target text that has passed verification.
7. A frame attribute extraction system, characterized in that: The system comprises: An acquisition module is configured to acquire standard information of a frame attribute, wherein the standard information includes a plurality of standard frame attributes and a standard feature value of each of the standard frame attributes and a standard feature value dependency relationship; A parsing module is configured to parse a target drawing and obtain a target drawing frame and a plurality of texts within the target drawing frame; A first determination module is configured to determine a feature value and a feature value dependency relationship of each of the plurality of texts; A second determination module is configured to determine a eigenvalue confidence level according to the eigenvalue and the standard eigenvalue; Determining a dependency confidence according to the eigenvalue dependency and the standard eigenvalue dependency; and, Determining a target text based on the feature value confidence and the dependency confidence; Based on the characteristic value of the target text, a first type of target text and a second type of target text are determined, wherein the first type of target text is the target text corresponding to the first key field, and the second type of target text is the target text corresponding to the second key field; the first key field refers to the key field corresponding to the drawing frame attribute that directly appears in the target drawing; the second key field refers to the key field corresponding to the drawing frame attribute that depends on other drawing frame attributes to appear in the target drawing; the second key field depends on the first key field; The second type of target text is verified based on the first type of target text to determine the target frame attributes.
8. A frame attribute extraction device, characterized in that: The apparatus comprises: at least one processor and at least one memory; The at least one memory is used to store computer instructions; The at least one processor is used to execute at least part of the computer instructions to implement the frame attribute extraction method as described in any one of claims 1 to 6.
