Drawing processing method and device, electronic equipment and storage medium

By identifying and extracting the view shape marking parameters in the drawings, the problem of low efficiency in drawing automation processing is solved, and the drawing automation processing is realized, which improves the work efficiency and the degree of automation of information processing.

CN119206761APending Publication Date: 2024-12-27GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411221894.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In the prior art, the automatic extraction efficiency of the view shape marking parameters in the drawings is low and error-prone, resulting in lagging accounting for business such as process parameters and procurement price verification, which cannot meet the needs of enterprises for digital transformation.

Method used

By identifying the target view and labeling lines in the drawing, the appearance labeling parameters are extracted, including the identification of horizontal and vertical labeling lines and the extraction and verification of text length and width, and the automatic processing of the drawing is achieved using visual recognition technology.

Benefits of technology

It realizes the precise extraction of the outline marking parameters of the view in the drawing, assists in manual completion of related tasks, improves work efficiency, and realizes automatic processing of information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206761A_ABST
    Figure CN119206761A_ABST
Patent Text Reader

Abstract

The invention relates to a drawing processing method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a to-be-processed drawing, and recognizing a target view in the to-be-processed drawing; identifying a marking line of the target view; and according to the annotation line, extracting an appearance annotation parameter of the target view. By recognizing the target view in the drawing, recognizing the marking line of the target view and recognizing the appearance marking parameter of the target view according to the marking line, the appearance marking parameter of each view in the drawing can be accurately extracted, various tasks related to the drawing can be completed manually, the working efficiency is greatly improved, and automatic information processing is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information processing technology, and in particular to a drawing processing method, device, electronic device, and storage medium. Background Art

[0002] With the digital transformation of enterprises, users' demand for structured data continues to increase to meet the digital applications of different businesses. For example, the current accounting of product quotas such as process parameters and purchase prices in enterprises is done manually by consulting and analyzing drawings, extracting key elements from drawings, and calculating process parameters and purchase prices based on key elements. This is inefficient, error-prone, and delayed.

[0003] Therefore, we hope to realize the automation of key element extraction of drawings through artificial intelligence drawing extraction. Among them, the automatic extraction of the shape annotation parameters of each view in the drawing is a key influencing factor in such business technology requirements. For this reason, we hope to provide a technical solution that can realize the accurate extraction of the shape annotation parameters of each view in the drawing, assist humans in completing various drawing-related tasks, greatly improve work efficiency, and realize automatic information processing. Summary of the invention

[0004] In order to solve the above-mentioned technical problem of providing a technical solution that can realize the accurate extraction of the shape annotation parameters of each view in the drawing, assist manual completion of various drawing-related tasks, greatly improve work efficiency, and realize the technical problem of automatic information processing, this application provides a drawing processing method, device, electronic device, and storage medium. The specific technical solution is as follows:

[0005] In a first aspect, the present application provides a drawing processing method, the method comprising:

[0006] Acquire a drawing to be processed, and identify a target view in the drawing to be processed;

[0007] identifying a label line of the target view;

[0008] According to the annotation line, the shape annotation parameters of the target view are extracted.

[0009] In an optional implementation, the identifying the target view in the drawing to be processed includes:

[0010] Using visual recognition technology, identifying the annotation frame in the drawing to be processed;

[0011] The marked drawing frame is removed from the drawing to be processed to obtain the target view in the drawing to be processed.

[0012] In an optional implementation, the annotation line includes a horizontal annotation line and a vertical annotation line, and the annotation line identifying the target view includes:

[0013] Acquire the first outermost pixel points which are continuous in the horizontal direction and have the largest number in the target view;

[0014] Determine a first line segment formed by the first outermost pixel points as a horizontal annotation line of the target view;

[0015] Acquire the second outermost pixel points which are continuous in the vertical direction and have the largest number in the target view;

[0016] A second line segment formed by the second outermost pixel points is determined as a longitudinal annotation line of the target view.

[0017] In an optional implementation, extracting the shape annotation parameters of the target view according to the annotation line includes:

[0018] Extracting the horizontal annotation text closest to the horizontal annotation line and the vertical annotation text closest to the vertical annotation line;

[0019] Extracting a first length and a first width of the horizontally marked text, and a second length and a second width of the vertically marked text;

[0020] The horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width are saved.

[0021] In an optional implementation, the storing the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width includes:

[0022] Extracting a third length of the horizontal marking line and a fourth length of the vertical marking line, and determining a first ratio between the third length and the fourth length;

[0023] determining a second ratio between the first length and the second length, and determining whether the first ratio is consistent with the second ratio;

[0024] If they are consistent, the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width are saved.

[0025] In an optional implementation, the storing the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width includes:

[0026] Acquire a text set in the drawing to be processed, and detect whether the horizontally marked text is consistent with the first text in the text set, and whether the vertically marked text is consistent with the second text in the text set;

[0027] Wherein, the first text is any text in the text set, and the first text is any text in the text set;

[0028] When the horizontal annotation text is consistent with the first text, and the vertical annotation text is consistent with the second text, the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width are saved.

[0029] In an optional embodiment, the method further comprises:

[0030] If they are not consistent, the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width are discarded.

[0031] In a second aspect, the present application provides a drawing processing device, the device comprising:

[0032] A drawing acquisition module is used to acquire drawings to be processed;

[0033] A view recognition module, used to recognize a target view in the drawing to be processed;

[0034] A label line recognition module, used to recognize the label lines of the target view;

[0035] A parameter extraction module is used to extract the shape annotation parameters of the target view according to the annotation line.

[0036] In an optional implementation, the view identification module is specifically configured to:

[0037] Identify the marked drawing frame in the drawing to be processed by visual recognition technology;

[0038] The marked drawing frame is removed from the drawing to be processed to obtain the target view in the drawing to be processed.

[0039] In an optional implementation, the marking lines include horizontal marking lines and vertical marking lines, and the marking line recognition module is specifically used for:

[0040] Acquire the first outermost pixel points which are continuous in the horizontal direction and have the largest number in the target view;

[0041] Determine a first line segment formed by the first outermost pixel points as a horizontal annotation line of the target view;

[0042] Acquire the second outermost pixel points which are continuous in the vertical direction and have the largest number in the target view;

[0043] A second line segment formed by the second outermost pixel points is determined as a longitudinal annotation line of the target view.

[0044] In an optional implementation, the parameter extraction module specifically includes:

[0045] A text extraction submodule, used to extract the horizontal annotation text closest to the horizontal annotation line and the vertical annotation text closest to the vertical annotation line;

[0046] A length and width extraction submodule, used to extract a first length and a first width of the horizontally annotated text, and a second length and a second width of the vertically annotated text;

[0047] The text, length and width saving submodule is used to save the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width.

[0048] In an optional implementation, the text, length and width preservation submodule specifically includes:

[0049] a ratio determination unit, configured to extract a third length of the horizontal marking line and a fourth length of the vertical marking line, and determine a first ratio between the third length and the fourth length;

[0050] a ratio determination unit, configured to determine a second ratio between the first length and the second length, and determine whether the first ratio is consistent with the second ratio;

[0051] The text, length and width saving unit is used to save the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width when they are consistent.

[0052] In an optional implementation, the text, length and width storage unit is specifically used for:

[0053] Acquire a text set in the drawing to be processed, and detect whether the horizontally marked text is consistent with the first text in the text set, and whether the vertically marked text is consistent with the second text in the text set;

[0054] Wherein, the first text is any text in the text set, and the first text is any text in the text set;

[0055] When the horizontal annotation text is consistent with the first text, and the vertical annotation text is consistent with the second text, the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width are saved.

[0056] In an optional implementation, the text, length and width preservation submodule further includes:

[0057] The text, length and width elimination unit is used to eliminate the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width when they are inconsistent.

[0058] In a third aspect, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0059] Memory, used to store computer programs;

[0060] The processor is used to implement any drawing processing method described in the first aspect when executing the program stored in the memory.

[0061] In a fourth aspect, a storage medium is also provided, wherein instructions are stored in the storage medium, and when the storage medium is run on a computer, the computer executes any drawing processing method described in the first aspect.

[0062] In a fifth aspect, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute any of the above-mentioned drawing processing methods.

[0063] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art: the drawing processing method provided by the embodiment of the present application obtains the drawing to be processed, identifies the target view in the drawing to be processed, identifies the annotation lines of the target view, and extracts the shape annotation parameters of the target view based on the annotation lines.

[0064] By identifying the target view in the drawing, identifying the annotation lines of the target view, and identifying the shape annotation parameters of the target view based on the annotation lines, it is possible to accurately extract the shape annotation parameters of each view in the drawing, assist humans in completing various drawing-related tasks, greatly improve work efficiency, and realize automated information processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0066] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0067] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0068] Figure 1 A schematic diagram of an implementation flow of a drawing processing method provided in an embodiment of the present application;

[0069] Figure 2 A schematic diagram of an implementation flow of another drawing processing method provided in an embodiment of the present application;

[0070] Figure 3 A schematic diagram of an implementation flow of another drawing processing method provided in an embodiment of the present application;

[0071] Figure 4 A schematic diagram of the structure of a drawing processing device provided in an embodiment of the present application;

[0072] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0073] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, 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 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 making creative work are within the scope of protection of this application.

[0074] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0075] like Figure 1FIG. 1 is a schematic diagram of an implementation flow of a drawing processing method provided in an embodiment of the present application. The method may specifically include the following steps:

[0076] S101, obtaining a drawing to be processed, and identifying a target view in the drawing to be processed.

[0077] In the embodiment of the present application, drawings to be processed can be obtained, and the drawings to be processed can be various drawings, and the format of the drawings to be processed can be various formats, such as PDF format. Among them, the drawings to be processed specified by the user can be obtained, or one drawing to be processed can be selected from many drawings.

[0078] The drawings to be processed are usually composed of structured data such as annotated drawing frames, views and technical requirements. To this end, the target view in the drawings to be processed can be identified. The target view can be located and segmented and extracted by the structural position of the annotated drawing frame and the drawing position of the target view, and then a separate shape annotation parameter extraction process can be performed.

[0079] S102, identifying annotation lines of the target view.

[0080] In an embodiment of the present application, after the target view in the drawing to be processed is identified, since the shape annotation of the target view is generally divided into horizontal and vertical directions, the direction of the annotation line is required for identification.

[0081] Therefore, for identifying the target view in the drawing to be processed, the annotation lines of the target view can be identified. The annotation lines are divided into horizontal annotation lines and vertical annotation lines. The horizontal annotation lines are used to identify horizontal shape annotations, and the vertical annotation lines are used to identify vertical shape annotations.

[0082] It should be noted that the horizontal marking lines and the vertical marking lines refer to the horizontal marking lines on the horizontal sides of the visual view and the vertical marking lines on the vertical sides, respectively, and the embodiments of the present application do not limit this.

[0083] S103: extracting the shape annotation parameters of the target view according to the annotation lines.

[0084] In the embodiment of the present application, for the annotation lines of the target view, the shape annotation parameters of the target view can be extracted according to the annotation lines. The annotation lines are divided into horizontal annotation lines and vertical annotation lines, so the horizontal shape annotation parameters of the target view can be extracted according to the horizontal and vertical annotation lines, and the vertical shape annotation parameters of the target view can be extracted according to the vertical annotation lines.

[0085] Through the above description of the technical solution provided in the embodiment of the present application, the drawing to be processed is obtained, and the target view in the drawing to be processed is identified, the annotation lines of the target view are identified, and the shape annotation parameters of the target view are extracted based on the annotation lines.

[0086] By identifying the target view in the drawing, identifying the annotation lines of the target view, and identifying the shape annotation parameters of the target view based on the annotation lines, it is possible to accurately extract the shape annotation parameters of each view in the drawing, assist humans in completing various drawing-related tasks, greatly improve work efficiency, and realize automated information processing.

[0087] like Figure 2 FIG. 1 is a schematic diagram of an implementation flow of another drawing processing method provided in an embodiment of the present application. The method may specifically include the following steps:

[0088] S201, obtaining the drawing to be processed, and identifying the annotation frame in the drawing to be processed through visual recognition technology.

[0089] S202, removing the annotation frame from the drawing to be processed to obtain the target view in the drawing to be processed.

[0090] In the embodiment of the present application, a drawing to be processed is obtained. The drawing to be processed mainly consists of structured data such as annotated drawing frames, views, and technical requirements. In order to accurately extract the shape annotation parameters of the target view in the drawing to be processed, it is necessary to first identify the annotated drawing frame in the drawing to be processed, and then locate the target view in the drawing to be processed and perform segmentation extraction based on it, and then accurately extract the individual shape annotation parameters.

[0091] Based on this, for the drawings to be processed, the annotated drawing frames in the drawings to be processed are identified through visual recognition technology, and the annotated drawing frames are removed from the drawings to be processed to obtain the target view in the drawings to be processed. Among them, the visual recognition technology can be a relatively mature image recognition technology currently on the market, and the embodiments of the present application are not limited to this.

[0092] S203: Acquire the first outermost pixel points that are continuous in the horizontal direction and have the largest number in the target view.

[0093] S204: Determine a first line segment formed by the first outermost pixel points as a horizontal annotation line of the target view.

[0094] S205 , obtaining the second outermost pixel points that are continuous in the vertical direction and have the largest number in the target view.

[0095] S206: Determine a second line segment formed by the second outermost pixel points as a longitudinal annotation line of the target view.

[0096] In the embodiment of the present application, the annotation lines of the target view generally include horizontal annotation lines and vertical annotation lines, which are horizontal annotation lines on both sides horizontally and vertical annotation lines on both sides vertically.

[0097] To this end, the identification of the horizontal annotation line of the target view can specifically be to obtain the first outermost pixel points that are continuous and have the largest number in the target view in the horizontal direction, and determine the first line segment composed of the first outermost pixel points as the horizontal annotation line of the target view, which means that the horizontal annotation line of the target view is usually the first line segment composed of the first outermost pixel points that are continuous and have the largest number in the target view in the horizontal direction (that is, the outermost horizontal line segment of the target view).

[0098] For the identification of the longitudinal annotation line of the target view, specifically, the second outermost pixel points that are continuous in the longitudinal direction and have the largest number in the target view are obtained, and the second line segment composed of the second outermost pixel points is determined as the longitudinal annotation line of the target view, which means that the longitudinal annotation line of the target view is usually the second line segment composed of the second outermost pixel points that are continuous in the longitudinal direction and have the largest number in the target view (i.e., the outermost longitudinal line segment of the target view).

[0099] S207, extracting the horizontal annotation text closest to the horizontal annotation line and the vertical annotation text closest to the vertical annotation line.

[0100] S208: extracting a first length and a first width of the horizontally annotated text, and a second length and a second width of the vertically annotated text.

[0101] S209, saving the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width.

[0102] In the embodiment of the present application, the shape annotation parameters of the target view are extracted, which usually refers to the annotation text and length, width, direction and other information of the visual view. To this end, the horizontal annotation text closest to the horizontal annotation line and the vertical annotation text closest to the vertical annotation line are extracted, the first length and first width of the horizontal annotation text and the second length and second width of the vertical annotation text are extracted, and the horizontal annotation text, first length, first width, vertical annotation text, second length, and second width are saved.

[0103] Among them, since the visual recognition technology (i.e., image recognition technology) is not yet very perfect, the extracted data cannot be 100% correct. Therefore, the above-identified annotation frame may have errors, which in turn may lead to errors in the horizontal annotation text, first length, first width, vertical annotation text, second length, and second width extracted here. Therefore, it is necessary to check whether the ratio of the horizontal and vertical annotation lines to the extracted text (size) is symmetrical.

[0104] Based on this, the third length of the horizontal annotation line and the fourth length of the vertical annotation line are extracted, and then the first ratio between the third length and the fourth length is determined, the second ratio between the first length of the horizontal annotation text and the second length of the vertical annotation text is determined, and it is judged whether the first ratio is consistent with the second ratio. When the first ratio is consistent with the second ratio, the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width are saved.

[0105] In addition, when the first ratio is inconsistent with the second ratio, it means that there are abnormalities in the extracted horizontal annotation text, first length, first width, vertical annotation text, second length, and second width. At this time, the horizontal annotation text, first length, first width, vertical annotation text, second length, and second width are discarded.

[0106] In addition, in order to further ensure the accuracy of the extracted horizontal annotation text, first length, first width, vertical annotation text, second length, and second width, and to prevent the extracted data from being 100% correct due to the fact that the visual recognition technology (i.e., image recognition technology) is not yet perfect, resulting in errors in the identified annotation frame, and then causing errors in the horizontal annotation text, first length, first width, vertical annotation text, second length, and second width extracted here, it is necessary to verify the extracted horizontal annotation text and vertical annotation text.

[0107] Based on this, obtain the text set in the drawing to be processed, detect whether the horizontal annotation text is consistent with the first text in the text set, and whether the vertical annotation text is consistent with the second text in the text set, where the first text is any text in the text set, and the first text is any text in the text set. When the horizontal annotation text is consistent with the first text and the vertical annotation text is consistent with the second text, save the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width.

[0108] In addition, when the horizontal annotation text is inconsistent with the first text, and / or the vertical annotation text is inconsistent with the second text, it means that there are abnormalities in the extracted horizontal annotation text, first length, first width, vertical annotation text, second length, and second width. At this time, the horizontal annotation text, first length, first width, vertical annotation text, second length, and second width are discarded.

[0109] For example, if the horizontal text is 1o, and the first text in the text set is 10, then the horizontal annotation text is inconsistent with the first text, indicating that the extracted horizontal annotation text, first length, first width, vertical annotation text, second length, and second width are abnormal. At this time, the horizontal annotation text, first length, first width, vertical annotation text, second length, and second width are discarded.

[0110] It should be noted that the acquisition of the text set in the drawing to be processed can be obtained by format conversion. For example, the drawing to be processed is usually in PDF format, which can be converted into TXT format, and then the text therein is obtained to form a text set, which is not limited in the embodiment of the present application.

[0111] The drawing processing method provided by the embodiment of the present application is described below in conjunction with a specific scenario. Figure 3 FIG. 1 is a schematic diagram of an implementation flow of another drawing processing method provided in an embodiment of the present application. The method may specifically include the following steps:

[0112] S301, extracting a text set from a PDF drawing.

[0113] Since image recognition technology is not yet perfect, the extracted data cannot be 100% accurate. Therefore, it is necessary to extract the text set from the original drawing and make a verification and comparison for the next step of extraction to ensure the accuracy of the data.

[0114] The original drawings are generally PDF drawings, and the text set can be extracted through automatic conversion technology. For example, PDF drawings can be converted into TXT format, and then the text therein can be obtained to form a text set to complete the extraction of the text set.

[0115] S302, splitting and extracting views from the PDF drawing.

[0116] Since PDF drawings are composed of structured data such as annotated frames, views, and technical requirements, the embodiment of the present application locates the views by annotating the structural positions of the frames and the drawing positions of the views, and then performs separate recognition processing after locating the views.

[0117] S303, distinguishing between horizontal and vertical annotations in the view.

[0118] After the view is acquired, the direction of the annotation line is needed for identification because the shape annotation is generally divided into horizontal and vertical directions. The extraction is mainly based on the size and continuity of the outermost line segment, which is the horizontal and vertical sides respectively.

[0119] S304, extracting the annotation lines and the nearby texts.

[0120] Through the identified annotation line, the text closest to the annotation line is extracted, and then the ratio of the horizontal annotation line and the extracted text (size) is compared to check whether they are symmetrical.

[0121] S305, comparing and verifying the text with the text in the text set.

[0122] After the horizontal and vertical dimension extraction of the annotation text is completed, the extracted text is searched and proofread with the text in the text set extracted by 101, and the invalid data that cannot be retrieved is discarded to ensure the correctness of the extracted data.

[0123] Corresponding to the above method embodiment, the present application embodiment also provides a drawing processing device, such as Figure 4 As shown, the device may include: a drawing acquisition module 410, a view recognition module 420, a annotation line recognition module 430, and a parameter extraction module 440.

[0124] The drawing acquisition module 410 is used to acquire drawings to be processed;

[0125] A view identification module 420, used to identify a target view in the drawing to be processed;

[0126] A label line recognition module 430, used to recognize the label lines of the target view;

[0127] The parameter extraction module 440 is used to extract the shape annotation parameters of the target view according to the annotation line.

[0128] In an optional implementation, the view identification module is specifically configured to:

[0129] Identify the marked drawing frame in the drawing to be processed by visual recognition technology;

[0130] The marked drawing frame is removed from the drawing to be processed to obtain the target view in the drawing to be processed.

[0131] In an optional implementation, the marking lines include horizontal marking lines and vertical marking lines, and the marking line recognition module is specifically used for:

[0132] Acquire the first outermost pixel points which are continuous in the horizontal direction and have the largest number in the target view;

[0133] Determine a first line segment formed by the first outermost pixel points as a horizontal annotation line of the target view;

[0134] Acquire the second outermost pixel points which are continuous in the vertical direction and have the largest number in the target view;

[0135] A second line segment formed by the second outermost pixel points is determined as a longitudinal annotation line of the target view.

[0136] In an optional implementation, the parameter extraction module specifically includes:

[0137] A text extraction submodule, used to extract the horizontal annotation text closest to the horizontal annotation line and the vertical annotation text closest to the vertical annotation line;

[0138] A length and width extraction submodule, used to extract a first length and a first width of the horizontally annotated text, and a second length and a second width of the vertically annotated text;

[0139] The text, length and width saving submodule is used to save the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width.

[0140] In an optional implementation, the text, length and width preservation submodule specifically includes:

[0141] a ratio determination unit, configured to extract a third length of the horizontal marking line and a fourth length of the vertical marking line, and determine a first ratio between the third length and the fourth length;

[0142] a ratio determination unit, configured to determine a second ratio between the first length and the second length, and determine whether the first ratio is consistent with the second ratio;

[0143] The text, length and width saving unit is used to save the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width when they are consistent.

[0144] In an optional implementation, the text, length and width storage unit is specifically used for:

[0145] Acquire a text set in the drawing to be processed, and detect whether the horizontally marked text is consistent with the first text in the text set, and whether the vertically marked text is consistent with the second text in the text set;

[0146] Wherein, the first text is any text in the text set, and the first text is any text in the text set;

[0147] When the horizontal annotation text is consistent with the first text, and the vertical annotation text is consistent with the second text, the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width are saved.

[0148] In an optional implementation, the text, length and width preservation submodule further includes:

[0149] The text, length and width elimination unit is used to eliminate the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width when they are inconsistent.

[0150] The present application also provides an electronic device, such as Figure 5 As shown, it includes a processor 51, a communication interface 52, a memory 53 and a communication bus 54, wherein the processor 51, the communication interface 52, and the memory 53 communicate with each other through the communication bus 54.

[0151] A memory 53, for storing computer programs;

[0152] The processor 51 is used to execute the program stored in the memory 53 to implement the following steps:

[0153] Acquire a drawing to be processed, and identify a target view in the drawing to be processed; identify annotation lines of the target view; and extract shape annotation parameters of the target view based on the annotation lines.

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

[0155] The communication interface is used for communication between the above air conditioner and other devices.

[0156] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0157] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0158] In another embodiment provided in the present application, a storage medium is also provided, in which instructions are stored. When the storage medium is run on a computer, the computer executes the drawing processing method described in any of the above embodiments.

[0159] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the drawing processing method described in any one of the above embodiments.

[0160] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a storage medium, or transmitted from one storage medium to another storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0161] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0162] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0163] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A drawing processing method, characterized in that: The method comprises: Acquire a drawing to be processed, and identify a target view in the drawing to be processed; identifying a label line of the target view; According to the annotation line, the shape annotation parameters of the target view are extracted.

2. The method according to claim 1, characterized in that The identifying the target view in the drawing to be processed includes: Identify the marked drawing frame in the drawing to be processed by visual recognition technology; The marked drawing frame is removed from the drawing to be processed to obtain the target view in the drawing to be processed.

3. The method according to claim 1, characterized in that The annotation lines include horizontal annotation lines and vertical annotation lines, and the annotation lines for identifying the target view include: Acquire the first outermost pixel points which are continuous in the horizontal direction and have the largest number in the target view; Determine a first line segment formed by the first outermost pixel points as a horizontal annotation line of the target view; Acquire the second outermost pixel points which are continuous in the vertical direction and have the largest number in the target view; A second line segment formed by the second outermost pixel points is determined as a longitudinal annotation line of the target view.

4. The method according to claim 3, characterized in that The step of extracting the shape annotation parameters of the target view according to the annotation line includes: Extracting the horizontal annotation text closest to the horizontal annotation line and the vertical annotation text closest to the vertical annotation line; Extracting a first length and a first width of the horizontally marked text, and a second length and a second width of the vertically marked text; The horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width are saved.

5. The method according to claim 4, characterized in that The step of saving the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width includes: Extracting a third length of the horizontal marking line and a fourth length of the vertical marking line, and determining a first ratio between the third length and the fourth length; determining a second ratio between the first length and the second length, and determining whether the first ratio is consistent with the second ratio; If they are consistent, the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width are saved.

6. The method according to claim 5, characterized in that The step of saving the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width includes: Acquire a text set in the drawing to be processed, and detect whether the horizontally marked text is consistent with the first text in the text set, and whether the vertically marked text is consistent with the second text in the text set; Wherein, the first text is any text in the text set, and the first text is any text in the text set; When the horizontal annotation text is consistent with the first text, and the vertical annotation text is consistent with the second text, the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width are saved.

7. The method according to claim 5, characterized in that The method further comprises: If they are not consistent, the horizontal annotation text, the first length, the first width, the vertical annotation text, the second length, and the second width are discarded.

8. A drawing processing method, characterized in that: The method comprises: A drawing acquisition module is used to acquire drawings to be processed; A view recognition module, used to recognize a target view in the drawing to be processed; A label line recognition module, used to recognize the label lines of the target view; A parameter extraction module is used to extract the shape annotation parameters of the target view according to the annotation line.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-7 when executing a program stored in a memory.

10. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Electronic drawing labeling method and device based on home decoration

    CN115482316A

  • Bridge superstructure cast-in-place beam identification method and system

    CN116823807A

  • Device and method of aligning rafter and hip rafter and aligning instrument of rafter and hip rafter

    JP2000320059A