Drawing cleaning method and system for architectural drawings

By converting layer groups and calculating the amount of information on architectural drawings, the cleaning sequence is determined and layers are gradually eliminated, which solves the problem of large data loss in the existing technology, achieves hierarchical cleaning, and retains the readability and readability of the drawings. storage space.

CN118277347BActive Publication Date: 2024-09-27BEIJING GUANGLIANDA YUNTU DREAM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410433426.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-11
Publication Date
2024-09-27
Estimated Expiration
2044-04-11

AI Technical Summary

Technical Problem

The existing architectural drawing cleaning methods suffer from the problem of large amounts of data loss and the lack of an effective balance between cleaning process and data retention. Integrated cleaning results in serious loss of drawing content.

Method used

By obtaining the original file of the architectural drawing, convert it into a layer group, calculate the amount of self-defined information and other specified information, determine the cleaning sequence, gradually remove the layers in the layer group, and retain the removed content in the queue-type cleaning cache library , delete data based on storage duration.

Benefits of technology

It is realized that when cleaning architectural drawings, only part of the content is lost and readability is retained. It balances the cleaning process and the amount of data loss, and converts it to a hierarchical cleaning process, which reduces the data loss caused by the overall cleaning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118277347B
    Figure CN118277347B
Patent Text Reader

Abstract

The present invention relates to the technical field of drawing management, and specifically discloses a drawing cleaning method and system for architectural drawings, the method comprising obtaining an original file of the architectural drawing, querying each layer in the original file, and converting the architectural drawing into a layer group; obtaining a name tag of the architectural drawing, classifying the layer group according to the name tag, and synchronously calculating the information volume of each layer group; determining a cleaning order according to the information volume, and removing layers in the layer group according to the cleaning order. The present invention converts the architectural drawing into a layer group, classifies the layer group according to the drawing name, identifies each layer, and compares each layer with other layers, determines the cleaning order of each layer according to the identification result and the comparison result, and continuously removes the layers, so that while releasing the storage space, the architectural drawing will only lose a part of the content each time it is cleaned up, and still retains a certain readability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of drawing management, and in particular to a drawing cleaning method and system for architectural drawings. Background Art

[0002] Architectural drawings are detailed drawings used by architects, structural engineers, and other professionals to design and construct buildings. These drawings typically include plans, elevations, sections, detail drawings, and construction drawings.

[0003] Under the current technological background, architectural drawings are mostly electronic drawings. Due to the review process, a final draft is often accompanied by multiple revisions. This revision is actually the thinking process of the staff. The drawing management party will store it for a short period of time. As time goes by, the number of electronic drawings will increase. At this time, they need to be cleaned up regularly.

[0004] The existing cleaning method uses two databases for cleaning, one is called the drawing library, which is used to store drawings, and the other is called the recycle bin, which is used to temporarily store drawings. When cleaning drawings, the drawings will be transferred to the recycle bin, which will clean the drawings regularly. This cleaning is an integrated cleaning, and the drawings have only two states: saved and deleted. Once deleted, a large amount of data is lost. How to balance the cleaning process and the amount of data loss is a technical problem that the technical solution of the present invention wants to solve. Summary of the invention

[0005] The object of the present invention is to provide a drawing cleaning method and system for architectural drawings to solve the problems raised in the above background technology.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A drawing cleaning method for architectural drawings, the method comprising:

[0008] Obtain the original file of the architectural drawing, query each layer in the original file, and convert the architectural drawing into a layer group;

[0009] Obtain name tags of architectural drawings, classify the layer groups according to the name tags, and simultaneously calculate the information volume of each layer group; wherein the information volume includes self-defined information volume and other-defined information volume; the self-defined information volume is determined by the pixel distribution characteristics of the layer group, and the other-defined information volume is determined by the overlap degree of the layer group with other layer groups;

[0010] A cleaning order is determined according to the amount of information, and layers in the layer group are removed according to the cleaning order.

[0011] As a further solution of the present invention, the steps of obtaining the original file of the architectural drawing, searching each layer in the original file, and converting the architectural drawing into a layer group include:

[0012] Obtain the original file of the architectural drawing and extract the layers in the original file;

[0013] Traverse each layer and calculate the data volume of the layer based on the value of each pixel;

[0014] Determine the number of splits of the layer according to the amount of data, and classify the valuable pixels based on the number of splits to obtain the split layers;

[0015] All layers are sorted according to a preset layer sorting rule to obtain a layer group.

[0016] As a further solution of the present invention, the steps of obtaining the name tags of the architectural drawings, classifying the layer groups according to the name tags, and synchronously calculating the information volume of each layer group include:

[0017] Obtain name tags of architectural drawings, and classify layer groups corresponding to the architectural drawings into one category according to the name tags;

[0018] Read the data volume and layer weight of the layer, and calculate the custom information volume according to the layer weight and the data volume; wherein the layer weight is a preset value used to characterize the importance of the layer;

[0019] Read the layer groups in sequence, compare the information with all other layer groups, calculate the overlap, obtain the overlap array, and calculate the certain amount of information based on the overlap array;

[0020] The information amount of each layer group is calculated according to the self-defined information amount and the other-defined information amount.

[0021] As a further solution of the present invention: the step of sequentially reading the layer groups, comparing the layer groups with all other layer groups, calculating the overlap, obtaining the overlap array, and calculating the amount of information according to the overlap array includes:

[0022] Read the layer groups in sequence as your own layer groups, and read other layer groups in sequence as other layer groups;

[0023] Cluster the layers in your own layer group based on the pre-set clustering rules to obtain the center point of each layer;

[0024] Cluster the layers in the other layer group based on the same clustering rule to obtain the center point of each layer;

[0025] Compare the center point of your layer group with the center point of the other layer group and calculate the degree of overlap;

[0026] Count the overlap between your own layer group and all other layer groups to obtain an overlap array, and calculate the amount of other information based on the overlap array.

[0027] As a further solution of the present invention: wherein, the clustering process is:

[0028] Read the data volume of the layer, and determine the K value range according to the data volume; select a K value in the K value range, and cluster the pixels with values ​​in the layer; calculate the minimum square sum for each K value, compare the minimum square sum, determine the final K value, and use the center point corresponding to the final K value as the final center point;

[0029] The step of selecting a K value in the K value range and clustering the valued pixels in the layer comprises:

[0030] Select a K value in the K value range, and randomly select K points from the pixels with values ​​as the center points;

[0031] Classify all other points according to the selected K points, and determine the new center point according to the classification results;

[0032] Synchronously calculating the difference between the center points in two adjacent calculation processes, and cyclically executing the clustering process until the difference is less than a preset condition;

[0033] In the formula, the objective function for classifying all other points according to the selected K points is: In the formula, TotalCSS is the total sum of squares, CSS l is the intra-cluster sum of squares of the cluster corresponding to the I-th center point, x ij is the point in the i-th row and j-th column of the layer, μ ij For x ij The nearest center point; m and n are the sizes of the layer, and k is the number of center points;

[0034] The rule for determining the amount of information is: I = f(E[C h ]); where C h =g(∑dis(z1,z2)); where I is the amount of information, f() is the conversion function between the preset value in the bracket and I; E[] is the expectation of the value in the bracket; C h is the overlap between the own layer group and the hth other layer group, z1 is the center point in the own layer group, z2 is the corresponding center point in the hth other layer group, the two corresponding center points are closest, dis(z1, z2) is the distance between z1 and z2; g() is the preset value in brackets and C h The conversion function of .

[0035] As a further solution of the present invention: the step of determining the cleaning order according to the amount of information and removing the layers in the layer group according to the cleaning order comprises:

[0036] Reading the information volume, and determining the reference order of each layer group according to the reverse order of the information volume;

[0037] Query the data amount of each layer in the layer group, and determine the floating order according to the data amount;

[0038] A cleaning order is determined according to the reference order and the floating order, and layers are removed according to the cleaning order.

[0039] As a further solution of the present invention: the method further comprises:

[0040] When executing the culling action, the culling time and culling content are retained, and a queue-type cleaning cache library is established;

[0041] The data is read in real time at the head of the cleaning cache library, the storage time is calculated, and when the storage time reaches a preset time threshold, the data is deleted.

[0042] The technical solution of the present invention also provides a drawing cleaning system for architectural drawings, the system comprising:

[0043] The layer query module is used to obtain the original file of the architectural drawing, query each layer in the original file, and convert the architectural drawing into a layer group;

[0044] An information volume calculation module is used to obtain the name tags of the architectural drawings, classify the layer groups according to the name tags, and synchronously calculate the information volume of each layer group; wherein the information volume includes self-defined information volume and other-defined information volume; the self-defined information volume is determined by the pixel distribution characteristics of the layer group, and the other-defined information volume is determined by the overlap degree of the layer group with other layer groups;

[0045] The data elimination module is used to determine a cleaning order according to the amount of information, and eliminate layers in the layer group according to the cleaning order.

[0046] As a further solution of the present invention: the layer query module includes:

[0047] A layer extraction unit, used for obtaining the original file of the architectural drawing and extracting the layer from the original file;

[0048] A data volume calculation unit is used to traverse each layer and calculate the data volume of the layer according to the value of each pixel;

[0049] A layer splitting unit, used for determining the number of layer splits according to the data volume, and classifying the valuable pixels based on the number of splits to obtain split layers;

[0050] The layer sorting unit is used to sort all layers according to a preset layer sorting rule to obtain a layer group.

[0051] As a further solution of the present invention: the information volume calculation module includes:

[0052] A layer classification unit is used to obtain the name tags of the architectural drawings and classify the layer groups corresponding to the architectural drawings into one category according to the name tags;

[0053] A first calculation unit is used to read the data volume and layer weight of the layer, and calculate the custom information volume according to the layer weight and the data volume; wherein the layer weight is a preset value used to represent the importance of the layer;

[0054] The second calculation unit is used to read the layer group in sequence, compare the information with all other layer groups, calculate the overlap, obtain the overlap array, and calculate the certain information amount according to the overlap array;

[0055] The third calculation unit is used to calculate the information amount of each layer group according to the self-determined information amount and the other-determined information amount.

[0056] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention converts architectural drawings into layer groups, classifies the layer groups according to the drawing names, identifies each layer, and compares each layer with other layers, determines the cleaning order of each layer according to the identification results and the comparison results, and continuously removes the layers, thereby releasing storage space while making the architectural drawings only lose a part of the content each time they are cleaned, and still retains a certain readability, converting the original overall cleaning process into a layered cleaning process, and balancing the cleaning process and the amount of data loss. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention.

[0058] Figure 1 A flowchart of a drawing cleanup method for architectural drawings.

[0059] Figure 2 The first sub-flow chart of the drawing cleaning method for architectural drawings.

[0060] Figure 3 The second sub-flow chart of the drawing cleaning method for architectural drawings.

[0061] Figure 4The third sub-flow chart of the drawing cleaning method for architectural drawings.

[0062] Figure 5 The present invention is a structural block diagram of the drawing cleaning system used for architectural drawings. DETAILED DESCRIPTION

[0063] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0064] Figure 1 The flowchart of the method for cleaning architectural drawings is shown in FIG. 1 . In an embodiment of the present invention, a method for cleaning architectural drawings includes:

[0065] Step S100: obtaining the original file of the architectural drawing, searching each layer in the original file, and converting the architectural drawing into a layer group;

[0066] The format of architectural drawings is determined by architectural software. In the process of drawing architectural drawings, multiple layers are involved. When printing, they will be superimposed on each other and saved as one layer, but the layer information is still retained in the original file. Therefore, this application needs to obtain the original file of the architectural drawing, query each layer in the original file, and convert the architectural drawing into the form of several layers, which is called a layer group.

[0067] Step S200: obtaining name tags of architectural drawings, classifying the layer groups according to the name tags, and synchronously calculating the information volume of each layer group; wherein the information volume includes self-defined information volume and other-defined information volume; the self-defined information volume is determined by the pixel distribution characteristics of the layer group, and the other-defined information volume is determined by the overlap degree of the layer group with other layer groups;

[0068] When drawing architectural drawings, the draftsman will record which part of the building the architectural drawings correspond to. Some of this information is in the name, and some is in a certain layer of the drawing. They are counted as name tags. Architectural drawings with the same or similar name tags are regarded as one category, and the layer group corresponding to each architectural drawing is read, and the layer groups of the same type of architectural drawings can be counted.

[0069] Then, for each type of layer group, the amount of data of each layer group and the degree of similarity between each layer group and other layer groups are calculated to determine the importance of each layer group; generally speaking, the more data each layer group has, the higher the importance of the layer group, and the more similar each layer group is to other layer groups, the higher the importance of the layer group, wherein the importance is reflected by the amount of information.

[0070] Step S300: determining a cleaning order according to the amount of information, and removing layers from the layer group according to the cleaning order;

[0071] According to the amount of information calculated in the above content, the cleaning order can be determined. The higher the amount of information, the later the cleaning order. The layers in each layer group are removed according to the cleaning order. This removal process will only remove a certain layer. In the architectural drawings, only some details are removed. In the staff's perception, part of the drawing content will be retained, making the drawing cleaning process a step-by-step cleaning process.

[0072] Figure 2 The first sub-flow diagram of the drawing cleaning method for architectural drawings is shown in FIG. 1 , wherein the steps of obtaining the original file of the architectural drawing, searching each layer in the original file, and converting the architectural drawing into a layer group include:

[0073] Step S101: obtaining the original file of the architectural drawing and extracting the layers from the original file;

[0074] Step S102: traverse each layer and calculate the data volume of the layer according to the value of each pixel;

[0075] Step S103: determining the number of splits of the layer according to the data volume, and classifying the valuable pixels based on the number of splits to obtain split layers;

[0076] Step S104: Sort all layers according to a preset layer sorting rule to obtain a layer group.

[0077] Each architectural drawing software contains a layer selection port, which can be used to directly read the layer; on this basis, each layer is traversed and the data volume of the layer is calculated. According to the amount of data, each layer can be further split, so that the difference in data volume between each layer in the layer group will not be too large.

[0078] Among them, the splitting method adopts a process similar to downsampling. For example, on a straight line, every two pixels are retained. In this way, the original layer can be converted into three split layers. After the layer with too much data volume is split, all layers are sorted according to the preset layer sorting rules. The specific layer sorting rules are not important. The layers can be sorted according to the line color and shape of the layers. What is important is that the layer sorting rules of all layer groups are the same; it is worth mentioning that the split layers split from the same layer can be set as adjacent layers.

[0079] It is worth mentioning that whether the above process of calculating the amount of data for each layer will cause additional calculations, the answer is no. After calculating the amount of data, the calculation results are saved to calculate the subsequent amount of information.

[0080] Figure 3 The second sub-flow diagram of the drawing cleaning method for architectural drawings is shown in FIG. 1 , wherein the steps of obtaining the name tags of the architectural drawings, classifying the layer groups according to the name tags, and synchronously calculating the information amount of each layer group include:

[0081] Step S201: obtaining name tags of architectural drawings, and classifying layer groups corresponding to the architectural drawings into one category according to the name tags;

[0082] Step S202: Read the data volume and layer weight of the layer, and calculate the custom information volume according to the layer weight and the data volume; wherein the layer weight is a preset value used to characterize the importance of the layer;

[0083] Step S203: read the layer groups in sequence, compare the information with all other layer groups, calculate the overlap, obtain the overlap array, and calculate the certain information amount according to the overlap array;

[0084] Step S204: calculating the information volume of each layer group according to the self-defined information volume and the other-defined information volume.

[0085] Obtain the name tags of the architectural drawings and classify the layer groups according to the name tags; read the data volume of each layer (the calculation result of step S102), combine it with the layer weight input by the staff, accumulate all data volumes based on the layer weight, and the data volume of the layer group can be obtained, which is called the custom information volume.

[0086] Furthermore, the layer groups are read in sequence and compared with other layer groups. This comparison process is a comparison process between sets, or more precisely, a comparison process between a set and several other sets. Each comparison will result in a degree of overlap. By counting several degrees of overlap, an array of degrees of overlap is obtained. By analyzing the array of degrees of overlap, the comprehensive similarity between the layer group and other layer groups can be determined, and then a certain amount of information can be determined. The comprehensive similarity is generally determined by statistical parameters such as mean, mode, maximum and variance. The simplest solution is to directly use the mean as the comprehensive similarity. The operation process of this method is relatively simple, but the evaluation dimensions are fewer and the evaluation accuracy is not high.

[0087] As a preferred embodiment of the technical solution of the present invention, the step of sequentially reading the layer groups, comparing the layer groups with all other layer groups, calculating the overlap, obtaining the overlap array, and calculating the certain amount of information according to the overlap array includes:

[0088] Read the layer groups in sequence as your own layer groups, and read other layer groups in sequence as other layer groups;

[0089] Cluster the layers in your own layer group based on the pre-set clustering rules to obtain the center point of each layer;

[0090] Cluster the layers in the other layer group based on the same clustering rule to obtain the center point of each layer;

[0091] Compare the center point of your layer group with the center point of the other layer group and calculate the degree of overlap;

[0092] Count the overlap between your own layer group and all other layer groups to obtain an overlap array, and calculate the amount of other information based on the overlap array.

[0093] The above content provides a specific solution for determining the amount of other information. From the above content, we can know that the process of determining the amount of other information is a process of comparing sets. The specific solution is:

[0094] Read a layer group as your own layer group, and the calculation result is a certain amount of information about your own layer group; read other layer groups in turn as other layer groups as the comparison parties. Since the layer group is a set, the comparison process will involve a corresponding relationship. If the data in the two sets are compared one by one, the amount of calculation will be very large. Therefore, this application provides a special way to cluster pixels of each layer, obtain several center points, and count the center points of all layers. The entire layer group can be converted into the positions of some center points. By comparing the positions of the center points, the degree of overlap can be calculated.

[0095] A degree of overlap can be calculated between one of our own layer groups and each of the other layer groups. By counting all the overlaps, we can get an array of overlaps. By analyzing the array of overlaps, we can get a certain amount of information.

[0096] As a preferred embodiment of the technical solution of the present invention, the clustering process is:

[0097] Read the data volume of the layer, and determine the K value range according to the data volume; select a K value in the K value range, and cluster the pixels with values ​​in the layer; calculate the minimum square sum for each K value, compare the minimum square sum, determine the final K value, and use the center point corresponding to the final K value as the final center point;

[0098] The step of selecting a K value in the K value range and clustering the valued pixels in the layer comprises:

[0099] Select a K value in the K value range, and randomly select K points from the pixels with values ​​as the center points;

[0100] Classify all other points according to the selected K points, and determine the new center point according to the classification results;

[0101] Synchronously calculating the difference between the center points in two adjacent calculation processes, and cyclically executing the clustering process until the difference is less than a preset condition;

[0102] In the formula, the objective function for classifying all other points according to the selected K points is: In the formula, TotalCSS is the total sum of squares, CSS l is the intra-cluster sum of squares of the cluster corresponding to the I-th center point, x ij is the point in the i-th row and j-th column of the layer, μ ij For x ij The nearest center point; m and n are the sizes of the layer, and k is the number of center points;

[0103] The rule for determining the amount of information is: I = f(E[C h ]); where C h =g(∑dis(z1,z2)); where I is the amount of information, f() is the conversion function between the preset value in the bracket and I; E[] is the expectation of the value in the bracket; C h is the overlap between the own layer group and the hth other layer group, z1 is the center point in the own layer group, z2 is the corresponding center point in the hth other layer group, the two corresponding center points are closest, dis(z1, z2) is the distance between z1 and z2; g() is the preset value in brackets and C h The conversion function of .

[0104] The principle of the above clustering process is explained as follows:

[0105] For two layer groups, each layer needs to be clustered. The clustering process uses the K-means algorithm with an unfixed K value. A K value range is determined according to the amount of data that has been calculated. The same clustering process is performed with different K values ​​to determine the most appropriate K value and its clustering result. This allows each layer to determine the most accurate clustering process based on actual conditions. After each layer is clustered, the center point can be obtained. All center points are counted to obtain an image containing only the center point. At this time, the image corresponds to the layer group. By comparing the two images containing only the center points, the overlap of the two layer groups can be determined.

[0106] The way to judge the overlap is to take the nearest center points of the two images as the corresponding two center points, calculate their distance, and sum up all the distances. The larger the sum of the distances, the smaller the overlap, that is, g() is a decreasing function. On this basis, one own layer group corresponds to multiple other layer groups, which makes the overlap non-unique. The mean of all overlaps can be calculated to determine the amount of other information.

[0107] Figure 4 The third sub-flow diagram of the drawing cleaning method for architectural drawings, wherein the step of determining the cleaning order according to the amount of information and removing the layers in the layer group according to the cleaning order comprises:

[0108] Step S301: reading the amount of information, and determining the reference order of each layer group according to the reverse order of the amount of information;

[0109] Step S302: querying the data volume of each layer in the layer group, and determining the floating order according to the data volume;

[0110] Step S303: determining a cleaning order according to the reference order and the floating order, and removing layers according to the cleaning order.

[0111] In an example of the technical solution of the present invention, the application reads the amount of information (determined by the self-determined amount of information and the other-determined amount of information), and determines the baseline order of the layer group based on the amount of information, so that all layers in the layer group have the same baseline order. Then, a floating order is determined based on the amount of data of each layer in the layer group, thereby obtaining a clearing order for each layer, and each layer row can be eliminated based on the clearing order.

[0112] As a preferred embodiment of the technical solution of the present invention, the method further includes:

[0113] When executing the culling action, the culling time and culling content are retained, and a queue-type cleaning cache library is established;

[0114] The data is read in real time at the head of the cleaning cache library, the storage time is calculated, and when the storage time reaches a preset time threshold, the data is deleted.

[0115] The removed layers can be deleted directly or saved for a short time. This application uses a queue structure to save the removed layers for a short time so that the staff can read the removed data.

[0116] In fact, in the technical solution of the present invention, since what is deleted each time is a layer, it is only a part of the architectural drawing. This is a gradual deletion process. The purpose of the staff reading the deleted data is mostly to improve the clarity of the existing drawings.

[0117] Figure 5 The structure block diagram of a drawing cleaning system for architectural drawings is shown in FIG. 1 . In an embodiment of the present invention, a drawing cleaning system for architectural drawings is provided. The system 10 includes:

[0118] The layer query module 11 is used to obtain the original file of the architectural drawing, query each layer in the original file, and convert the architectural drawing into a layer group;

[0119] The information volume calculation module 12 is used to obtain the name tags of the architectural drawings, classify the layer groups according to the name tags, and simultaneously calculate the information volume of each layer group; wherein the information volume includes a self-defined information volume and an externally defined information volume; the self-defined information volume is determined by the pixel distribution characteristics of the layer group, and the externally defined information volume is determined by the overlap between the layer group and other layer groups;

[0120] The data elimination module 13 is used to determine a cleaning sequence according to the amount of information, and eliminate layers in the layer group according to the cleaning sequence.

[0121] Furthermore, the layer query module 11 includes:

[0122] A layer extraction unit, used for obtaining the original file of the architectural drawing and extracting the layer from the original file;

[0123] A data volume calculation unit is used to traverse each layer and calculate the data volume of the layer according to the value of each pixel;

[0124] A layer splitting unit, used for determining the number of layer splits according to the data volume, and classifying the valuable pixels based on the number of splits to obtain split layers;

[0125] The layer sorting unit is used to sort all layers according to a preset layer sorting rule to obtain a layer group.

[0126] Specifically, the information volume calculation module 12 includes:

[0127] A layer classification unit is used to obtain the name tags of the architectural drawings and classify the layer groups corresponding to the architectural drawings into one category according to the name tags;

[0128] A first calculation unit is used to read the data volume and layer weight of the layer, and calculate the custom information volume according to the layer weight and the data volume; wherein the layer weight is a preset value used to represent the importance of the layer;

[0129] The second calculation unit is used to read the layer group in sequence, compare the information with all other layer groups, calculate the overlap, obtain the overlap array, and calculate the certain information amount according to the overlap array;

[0130] The third calculation unit is used to calculate the information amount of each layer group according to the self-determined information amount and the other-determined information amount.

[0131] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A drawing cleaning method for architectural drawings, characterized in that: The method comprises: Obtain the original file of the architectural drawing, query each layer in the original file, and convert the architectural drawing into a layer group; Obtain name tags of architectural drawings, classify the layer groups according to the name tags, and simultaneously calculate the information volume of each layer group; wherein the information volume includes self-defined information volume and other-defined information volume; the self-defined information volume is determined by the pixel distribution characteristics of the layer group, and the other-defined information volume is determined by the overlap degree of the layer group with other layer groups; Determine a cleaning order according to the amount of information, and remove layers in the layer group according to the cleaning order; The steps of obtaining the original file of the architectural drawing, searching each layer in the original file, and converting the architectural drawing into a layer group include: Obtain the original file of the architectural drawing and extract the layers in the original file; Traverse each layer and calculate the data volume of the layer based on the value of each pixel; Determine the number of splits of the layer according to the amount of data, and classify the valuable pixels based on the number of splits to obtain the split layers; Sort all layers according to the preset layer sorting rules to obtain a layer group; The steps of obtaining the name tags of the architectural drawings, classifying the layer groups according to the name tags, and synchronously calculating the information volume of each layer group include: Obtain name tags of architectural drawings, and classify layer groups corresponding to the architectural drawings into one category according to the name tags; Read the data volume and layer weight of the layer, and calculate the custom information volume according to the layer weight and the data volume; wherein the layer weight is a preset value used to characterize the importance of the layer; Read the layer groups in sequence, compare the information with all other layer groups, calculate the overlap, obtain the overlap array, and calculate the certain amount of information based on the overlap array; Calculate the information amount of each layer group according to the self-determined information amount and the other-determined information amount; The step of sequentially reading the layer groups, comparing the layer groups with all other layer groups, calculating the overlap, obtaining the overlap array, and calculating the amount of information according to the overlap array includes: Read the layer groups in sequence as your own layer groups, and read other layer groups in sequence as other layer groups; Cluster the layers in your own layer group based on the pre-set clustering rules to obtain the center point of each layer; Cluster the layers in the other layer group based on the same clustering rule to obtain the center point of each layer; Compare the center point of your layer group with the center point of the other layer group and calculate the degree of overlap; Count the overlap between your own layer group and all other layer groups to obtain an overlap array, and calculate the amount of other information based on the overlap array; The step of determining a cleaning order according to the amount of information and removing layers from the layer group according to the cleaning order comprises: Reading the information volume, and determining the reference order of each layer group according to the reverse order of the information volume; Query the data amount of each layer in the layer group, and determine the floating order according to the data amount; A cleaning order is determined according to the reference order and the floating order, and layers are removed according to the cleaning order.

2. The drawing cleaning method for architectural drawings according to claim 1, characterized in that: in, The clustering process is: Read the data volume of the layer, and determine the K value range according to the data volume; select a K value in the K value range, and cluster the pixels with values ​​in the layer; calculate the minimum square sum for each K value, compare the minimum square sum, determine the final K value, and use the center point corresponding to the final K value as the final center point; The step of selecting a K value in the K value range and clustering the valued pixels in the layer comprises: Select a K value in the K value range, and randomly select K points from the pixels with values ​​as the center points; Classify all other points according to the selected K points, and determine the new center point according to the classification results; Synchronously calculating the difference between the center points in two adjacent calculation processes, and cyclically executing the clustering process until the difference is less than a preset condition; In the formula, the objective function for classifying all other points according to the selected K points is: In the formula, TotalCSS is the total square sum, CSS l is the intra-cluster sum of squares of the cluster corresponding to the lth center point, x ij is the point in the i-th row and j-th column of the layer, μ ij For x ij The nearest center point; m and n are the sizes of the layer, and k is the number of center points; The rule for determining the amount of information is: I = f(E[C h ]); where C h =g(∑dis(z1,z2)); where I is the amount of information, f() is the conversion function between the preset value in the brackets and I; E[] is the expectation of the value in the brackets; C h is the overlap between the own layer group and the hth other layer group, z1 is the center point in the own layer group, z2 is the corresponding center point in the hth other layer group, the two corresponding center points are closest, dis(z1,z2) is the distance between z1 and z2; g() is the preset value in brackets and C h The conversion function of .

3. The drawing cleaning method for architectural drawings according to claim 1, characterized in that: The method further comprises: When executing the culling action, the culling time and culling content are retained, and a queue-type cleaning cache library is established; The data is read in real time at the head of the cleaning cache library, the storage time is calculated, and when the storage time reaches a preset time threshold, the data is deleted.

4. A drawing cleaning system for architectural drawings, characterized in that: The system is used to implement the drawing cleaning method for architectural drawings according to any one of claims 1 to 3, and the system comprises: The layer query module is used to obtain the original file of the architectural drawing, query each layer in the original file, and convert the architectural drawing into a layer group; An information volume calculation module is used to obtain the name tags of the architectural drawings, classify the layer groups according to the name tags, and synchronously calculate the information volume of each layer group; wherein the information volume includes self-defined information volume and other-defined information volume; the self-defined information volume is determined by the pixel distribution characteristics of the layer group, and the other-defined information volume is determined by the overlap degree of the layer group with other layer groups; The data elimination module is used to determine a cleaning order according to the amount of information, and eliminate layers in the layer group according to the cleaning order.

5. The drawing cleaning system for architectural drawings according to claim 4, characterized in that: The layer query module includes: A layer extraction unit, used for obtaining the original file of the architectural drawing and extracting the layer from the original file; A data volume calculation unit is used to traverse each layer and calculate the data volume of the layer according to the value of each pixel; A layer splitting unit, used for determining the number of layer splits according to the data volume, and classifying the valuable pixels based on the number of splits to obtain split layers; The layer sorting unit is used to sort all layers according to a preset layer sorting rule to obtain a layer group.

6. The drawing cleaning system for architectural drawings according to claim 5, characterized in that: The information volume calculation module includes: A layer classification unit is used to obtain the name tags of the architectural drawings and classify the layer groups corresponding to the architectural drawings into one category according to the name tags; A first calculation unit is used to read the data volume and layer weight of the layer, and calculate the custom information volume according to the layer weight and the data volume; wherein the layer weight is a preset value used to represent the importance of the layer; The second calculation unit is used to read the layer group in sequence, compare the information with all other layer groups, calculate the overlap, obtain the overlap array, and calculate the certain information amount according to the overlap array; The third calculation unit is used to calculate the information amount of each layer group according to the self-determined information amount and the other-determined information amount.