CN118194320B - Intelligent drawing data processing method and system - Google Patents
Intelligent drawing data processing method and system Download PDFInfo
- Publication number
- CN118194320B CN118194320B CN202410273578.8A CN202410273578A CN118194320B CN 118194320 B CN118194320 B CN 118194320B CN 202410273578 A CN202410273578 A CN 202410273578A CN 118194320 B CN118194320 B CN 118194320B
- Authority
- CN
- China
- Prior art keywords
- fitting
- block
- processed
- coordinate
- scanning
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 10
- 230000006870 function Effects 0.000 claims abstract description 128
- 239000011159 matrix material Substances 0.000 claims abstract description 63
- 238000012545 processing Methods 0.000 claims abstract description 55
- 238000000034 method Methods 0.000 claims abstract description 21
- 238000004806 packaging method and process Methods 0.000 claims abstract description 14
- 238000000605 extraction Methods 0.000 claims description 6
- 230000002194 synthesizing effect Effects 0.000 claims description 5
- 238000007781 pre-processing Methods 0.000 claims description 4
- 238000012795 verification Methods 0.000 claims description 2
- 238000010276 construction Methods 0.000 description 6
- 239000000284 extract Substances 0.000 description 6
- 230000006837 decompression Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 238000009435 building construction Methods 0.000 description 2
- 238000012938 design process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000012856 packing Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/70—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
- G06F21/78—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/40—Document-oriented image-based pattern recognition
- G06V30/41—Analysis of document content
- G06V30/412—Layout analysis of documents structured with printed lines or input boxes, e.g. business forms or tables
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Artificial Intelligence (AREA)
- Image Processing (AREA)
Abstract
The invention is applicable to the technical field of electric digital data processing, and particularly relates to an intelligent drawing data processing method and system, wherein the method comprises the following steps: acquiring a drawing to be processed, and determining a drawing processing mode; counting to obtain graphic block data and constructing a graphic block coding matrix; carrying out grid scanning on the drawing to be processed, identifying the coordinates of each image block, and extracting a longitudinal scanning coordinate set and a transverse distance data set; and carrying out coordinate fitting and distance value fitting to obtain a plurality of groups of fitting functions, carrying out function coding, storing coding results, and packaging the block coding matrix, the fitting functions and block graphic data into an encrypted data packet. According to the invention, through processing the drawing, each image block in the drawing is extracted, and the coordinates of each image block are recorded in a function mode, so that the safety of the drawing is greatly improved under the condition that the integrity of the recorded content of the drawing is ensured, and the content of the drawing cannot be leaked even if the password is deciphered.
Description
Technical Field
The invention belongs to the technical field of electric digital data processing, and particularly relates to an intelligent drawing data processing method and system.
Background
CAD drawings refer to CAD drawings showing the overall layout of engineering projects, the external shape, internal layout, structural construction, internal and external finishing, material construction, equipment, construction, etc. of a building by CAD software; the cad construction drawing has the characteristics of complete drawings, accurate expression and specific requirements.
In the technical field of building design, a drawing is generally encrypted in a document encryption mode, namely a file decompression password is set, the drawing is not encrypted, and when the decompression password is cracked or leaked, the risk of leakage of a technical file occurs, namely the problem that the drawing data transmission in the prior art has the leakage risk.
Disclosure of Invention
The invention aims to provide an intelligent drawing data processing method and aims to solve the problem that leakage risks exist in drawing data transmission in the prior art.
The invention is realized in such a way that an intelligent drawing data processing method comprises the following steps:
Acquiring a drawing to be processed, identifying a picture block of the drawing to be processed, and determining a drawing processing mode;
Counting the image blocks contained in the drawing to be processed based on the drawing processing mode to obtain image block graph data, and constructing an image block coding matrix;
Carrying out grid scanning on the drawing to be processed, identifying the coordinates of each image block, and extracting a longitudinal scanning coordinate set and a transverse distance data set;
And carrying out coordinate fitting and distance value fitting to obtain a plurality of groups of fitting functions, carrying out function coding, storing coding results, and packaging the block coding matrix, the fitting functions and block graphic data into an encrypted data packet.
Preferably, the step of counting the image blocks included in the drawing to be processed based on the drawing processing mode to obtain image block graphic data and constructing an image block coding matrix specifically includes:
Determining the type of the image block to be counted according to the drawing processing mode, and identifying the type of the image block corresponding to the image block in the drawing to be processed;
Determining the pattern block graph of each pattern block in the drawing to be processed to obtain pattern block graph data;
And carrying out non-repeated statistics on the image blocks, coding the image blocks, and constructing an image block coding matrix according to the positions of the image blocks.
Preferably, the step of performing grid scanning on the drawing to be processed, identifying coordinates of each image block, and extracting a longitudinal scanning coordinate set and a transverse distance data set specifically includes:
Identifying the edge of the drawing to be processed, and determining the range for grid scanning according to the position of the edge;
Carrying out longitudinal scanning on a drawing to be processed, obtaining a group of longitudinal scanning coordinates after the scanning is completed, and obtaining a longitudinal scanning coordinate set after the longitudinal scanning is completed;
and judging the effectiveness of the longitudinal scanning, and recording the distance values between the effective longitudinal scanning to obtain a transverse distance data set.
Preferably, the step of performing coordinate fitting and distance value fitting to obtain a plurality of sets of fitting functions, performing function encoding, saving encoding results, and packaging the block encoding matrix, the fitting functions and the block graphic data into an encrypted data packet specifically includes:
Extracting coordinates from the longitudinal scanning coordinate set, constructing a coordinate sequence, and performing function fitting according to the coordinates recorded in the coordinate sequence to obtain a coordinate fitting function;
Sequentially extracting distance values from the transverse distance data set, synthesizing distance coordinates according to the extraction sequence of the distance values, and performing function fitting to obtain a distance value fitting function;
And performing function coding on the coordinate fitting function and the distance value fitting function, storing coding results, and packaging the block coding matrix, the fitting function and the block graphic data into an encrypted data packet.
Preferably, when the drawing is required to be transmitted, an encrypted data packet is sent to a receiver, when decryption is required, after verification, a coding result is sent to the receiver, the receiver decrypts according to the coding result, and a corresponding drawing is generated based on the block coding matrix, the fitting function and the block graphic data.
Another object of the present invention is to provide an intelligent drawing data processing system, the system comprising:
the drawing preprocessing module is used for acquiring a drawing to be processed, carrying out block identification on the drawing to be processed, and determining a drawing processing mode;
The image block coding module is used for counting the image blocks contained in the drawing to be processed based on the drawing processing mode to obtain image block graphic data and constructing an image block coding matrix;
The drawing scanning module is used for carrying out grid scanning on the drawing to be processed, identifying the coordinates of each image block, and extracting a longitudinal scanning coordinate set and a transverse distance data set;
And the fitting encryption module is used for carrying out coordinate fitting and distance value fitting to obtain a plurality of groups of fitting functions, carrying out function coding, storing coding results, and packaging the block coding matrix, the fitting functions and the block graphic data into an encryption data packet.
Preferably, the tile encoding module includes:
The image block type identification unit is used for determining image block types to be counted according to the drawing processing mode and identifying image block types corresponding to the image blocks in the drawing to be processed;
the graphic coordinate recognition unit is used for determining the graphic block graphs of all the graphic blocks in the drawing to be processed to obtain graphic block graph data;
The icon coding unit is used for carrying out non-repeated statistics on the image blocks, coding the image blocks, and constructing an image block coding matrix according to the positions of the image blocks.
Preferably, the drawing scanning module includes:
the edge identification unit is used for identifying the edge of the drawing to be processed and determining the range for grid scanning according to the position of the edge;
The longitudinal scanning unit is used for carrying out longitudinal scanning on the drawing to be processed, obtaining a group of longitudinal scanning coordinates after the scanning is completed, and obtaining a longitudinal scanning coordinate set after the longitudinal scanning is completed;
And the distance value recording unit is used for judging the effectiveness of the longitudinal scanning and recording the distance values between the effective longitudinal scanning to obtain a transverse distance data set.
Preferably, the fitting encryption module includes:
The coordinate fitting unit is used for extracting coordinates from the longitudinal scanning coordinate set, constructing a coordinate sequence, and performing function fitting according to the coordinates recorded in the coordinate sequence to obtain a coordinate fitting function;
The distance value fitting unit is used for sequentially extracting distance values from the transverse distance data set, synthesizing distance coordinates according to the extraction sequence of the distance values, and performing function fitting to obtain a distance value fitting function;
And the data encryption unit is used for performing function encoding on the coordinate fitting function and the distance value fitting function, saving the encoding result and packaging the block encoding matrix, the fitting function and the block graphic data into an encrypted data packet.
According to the intelligent drawing data processing method, through processing the drawing, each image block in the drawing is extracted, the coordinates of each image block are recorded in a function mode, and under the condition that the integrity of recorded content of the drawing is ensured, the safety of the drawing is greatly improved, and even if a password is deciphered, the content of the drawing cannot be leaked.
Drawings
FIG. 1 is a flowchart of an intelligent drawing data processing method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a step of counting tiles contained in a drawing to be processed based on a drawing processing mode to obtain tile graphic data and constructing a tile coding matrix according to the embodiment of the present invention;
FIG. 3 is a flowchart illustrating steps of performing grid scanning on a drawing to be processed, identifying coordinates of each image block, and extracting a longitudinal scanning coordinate set and a transverse distance data set according to an embodiment of the present invention;
FIG. 4 is a flowchart of steps for performing coordinate fitting and distance value fitting to obtain multiple sets of fitting functions, performing function encoding, saving encoding results, and packing a block encoding matrix, fitting functions and block graphic data into an encrypted data packet according to an embodiment of the present invention;
FIG. 5 is a block diagram of an intelligent drawing data processing system according to an embodiment of the present invention;
FIG. 6 is a block diagram of a block encoding module according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a drawing scanning module according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a fitting encryption module according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
It will be understood that the terms "first," "second," and the like, as used herein, may be used to describe various elements, but these elements are not limited by these terms unless otherwise specified. These terms are only used to distinguish one element from another element. For example, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script, without departing from the scope of this disclosure.
As shown in fig. 1, a flowchart of an intelligent drawing data processing method according to an embodiment of the present invention is provided, where the method includes:
s100, acquiring a drawing to be processed, identifying a pattern block of the drawing to be processed, and determining a drawing processing mode.
In this step, a drawing to be processed is obtained, the drawing to be processed is a CAD drawing to be packaged this time, for the technical field of building design, a large number of block commands are used in the process of processing a building construction drawing, because a large number of identical or similar contents are contained in the drawing during drawing, the drawing efficiency can be greatly improved by adopting the block commands, the drawing time is shortened, all blocks contained in the drawing to be processed can be extracted and obtained by identifying the blocks, the occupation amount P of the blocks is calculated, what drawing processing mode is adopted is determined according to the occupation amount of the blocks, specifically, the line total length S1 of the drawing to be processed is calculated, then the line total length S2 of all the blocks in the drawing to be processed is calculated, the occupation amount P of the blocks is the ratio of the line total length S2 to the line total length S1, if P is larger than a preset value, the drawing processing mode is judged to be a block encryption mode, and if P is not larger than the preset value, the drawing processing mode is judged to be a line encryption mode.
S200, counting the image blocks contained in the drawing to be processed based on the drawing processing mode to obtain image block graph data, and constructing an image block coding matrix.
In this step, statistics is performed on the image blocks included in the drawing to be processed based on the statistics of the drawing processing mode, when the image block processing mode is an image block encryption mode, the image block is manually established by a plotter in the drawing to be processed to obtain image block graph data, the image block graph data is specific content of the image block, for example, in the design process of building doors and windows, in a plane construction drawing, the same type of doors and windows can be represented by the same image block, the image block graph data is obtained by copying the image block graph, according to the mode, all the image blocks included in the whole drawing to be processed are determined, and of course, according to the requirement of a user, an encryption area can be selected, only the image blocks in the encryption area are counted when the image block processing mode is the image block encryption mode, line graphs outside the image blocks in the drawing are used as virtual image blocks, such as straight lines, spline curves, polygons, circles and the like, after the image block coding matrix is constructed according to the relative positions of the image blocks, the relative azimuth relations among the image blocks (including the virtual image blocks) are recorded in the image block coding matrix, in order to be convenient for determining, and each image block coding matrix is generated, so that unique encoding is performed in the image block coding matrix; for the tile encryption mode, for lines other than tiles, it is considered an independent tile.
S300, grid scanning is carried out on the drawing to be processed, coordinates of each image block are identified, and a longitudinal scanning coordinate set and a transverse distance data set are extracted.
In this step, the drawing to be processed is scanned in a grid mode, when the drawing to be processed is scanned, the minimum interval between the image blocks is identified, the scanning interval is determined according to the minimum interval between the image blocks, so that the drawing to be processed is scanned according to a preset sequence, specifically, the coordinates of each image block in the drawing to be processed can be determined in a mode of from top to bottom and from left to right based on the sequence of the identified image blocks, the center of each image block defined by a user is used as the coordinates of the image block, the position of the coordinates is determined according to the command type of each virtual image block, for example, the position of the line image block is the end point of the line, the circular image block is the circle center of the circle, the coordinates of the polygon image block are the centroid of the polygon, the coordinates of each image block are determined according to the scanning coordinate set of the polygon, namely, the transverse distance between the effective longitudinal scanning of the identified image blocks is determined according to the intervals between different batches of longitudinal scanning, and a transverse distance data set is constructed.
S400, coordinate fitting and distance value fitting are carried out to obtain a plurality of groups of fitting functions, function encoding is carried out, encoding results are stored, and the block encoding matrix, the fitting functions and block graphic data are packaged into an encrypted data packet.
In this step, coordinate fitting and distance value fitting are performed, a longitudinal scan coordinate set is extracted, coordinates of each image block are extracted, coordinates of a plurality of image blocks obtained by each scan are determined according to a scan sequence, coordinate distance values between adjacent coordinates are calculated, numbering is performed for each coordinate distance value, a coordinate point set is constructed according to the numbers and the coordinate distance values, coordinate fitting is performed according to the coordinate point set, a coordinate fitting function is obtained, the operation is performed on the longitudinal scan coordinate set, a coordinate fitting function set is obtained, similarly, the distance values recorded in a transverse distance data set are numbered, so that a distance point set is constructed, distance value fitting is performed, a distance value fitting function is generated, encoding is performed on the function, encoding results are reserved locally, an image block encoding matrix, a fitting function and image block data are packaged into an encrypted data packet, when transmission data is required, the encrypted data packet is directly transmitted, the encoding results are stored locally as keys, and a decompression password can be set in a file encryption mode when the encrypted data packet is transmitted.
As shown in fig. 2, as a preferred embodiment of the present invention, the step of counting the tiles contained in the drawing to be processed based on the drawing processing mode to obtain tile graphic data and constructing the tile coding matrix specifically includes:
S201, determining the type of the image block to be counted according to the drawing processing mode, and identifying the type of the image block corresponding to the image block in the drawing to be processed.
In the step, the type of the image block to be counted is determined according to the processing mode of the drawing, the image block in the drawing to be processed is inquired, the type of each image block is determined, and in the process, the same image block is combined and used as an image block of one type.
S202, determining the pattern block graph of each pattern block in the drawing to be processed, and obtaining pattern block graph data.
S203, carrying out non-repeated statistics on the image blocks, coding the image blocks, and constructing an image block coding matrix according to the positions of the image blocks.
In this step, determining a tile pattern of each tile in the drawing to be processed, where there may be multiple tile patterns, where the same tile pattern is stored only once in statistics, then only numbering non-repeated tile patterns when coding, and constructing a tile coding matrix according to the relative positions between the tiles, where the tile coding matrix is a matrix of a tile coding matrix 3*6 if three longitudinal scans are performed in total, where the tile coding matrix is A1, A2, A3, A4, and A5, B1, B2, B3, and B4, C1, C2, C3, C4, C5, and C6, where the tile coding matrix is a matrix of 5, 4, and 6, respectively:
In the block coding matrix, the blank positions are filled with preset values.
As shown in fig. 3, as a preferred embodiment of the present invention, the step of performing grid scanning on the drawing to be processed, identifying coordinates of each tile, and extracting a longitudinal scanning coordinate set and a transverse distance data set specifically includes:
S301, identifying edges of the drawing to be processed, and determining a range for grid scanning according to the positions of the edges.
In the step, the edge of the drawing to be processed is identified, and the figure at the edge in the drawing to be processed is identified, so that a rectangular area is constructed, the rectangular area is tangent to the edge of the image to be processed, and then the rectangular area is the range for grid scanning.
S302, carrying out longitudinal scanning on a drawing to be processed, obtaining a group of longitudinal scanning coordinates after the scanning is completed, and obtaining a longitudinal scanning coordinate set after the longitudinal scanning is completed.
In this step, the drawing to be processed is scanned longitudinally, and scaled to a preset scale, specifically, the scale may be 1:1, then scanning can be carried out according to pixel columns one by one during scanning, each pixel column is scanned, the block coordinates obtained by each scanning are recorded, the block coordinates obtained by the scanning are recorded, or the block coordinates obtained by the scanning can be scanned from top to bottom and from left to right according to a preset scanning width, and when the whole scanning area is scanned, a longitudinal scanning coordinate set is obtained.
S303, judging the validity of the longitudinal scanning, and recording the distance values between the valid longitudinal scanning to obtain a transverse distance data set.
In the step, the validity of the longitudinal scanning is judged, when the result of the longitudinal scanning is empty, namely the image block is not recognized in the longitudinal scanning, the scanning is judged to be invalid, the effective scanning process is finally determined, and the distance value between two adjacent longitudinal scanning is counted to obtain the transverse distance data set.
As shown in fig. 4, as a preferred embodiment of the present invention, the steps of performing coordinate fitting and distance value fitting to obtain a plurality of sets of fitting functions, performing function encoding, saving the encoding result, and packaging the tile encoding matrix, the fitting functions and the tile graphics data into an encrypted data packet specifically include:
s401, extracting coordinates from the longitudinal scanning coordinate set, constructing a coordinate sequence, and performing function fitting according to the coordinates recorded in the coordinate sequence to obtain a coordinate fitting function.
In this step, coordinates are extracted from the set of longitudinal scan coordinates, when coordinates are extracted, coordinates of a block scanned by only one set of scanning processes are extracted each time, and the coordinates of the part are numbered, for example, in the first longitudinal scan process, 6 sets of coordinates are obtained by scanning, namely, M1, M2, M3, M4, M5 and M6 respectively, then a set of distance values are obtained between two adjacent sets of coordinates, namely, L 1-2、L2-3、L3-4、L4-5 and L 5-6,L1-2、L2-3、L3-4、L4-5 and L 5-6 respectively, corresponding numbers 1,2,3,4 and 5 are obtained, five sets of fitting coordinates, (1, L 1-2)、(2、L2-3)、(3、L3-4)、(4、L4-5) and (5, L 5-6) are obtained by constructing, a coordinate fitting function corresponding to the set of coordinates is determined by a fitting mode, and coordinates obtained by the first set of scanning, namely, M1 is recorded, if fitting coordinates obtained by the word scanning cannot be obtained by fitting through a function, the fitting function are divided into a plurality of segments, and the fitting functions are represented by adopting a plurality of coordinate fitting functions.
S402, sequentially extracting distance values from the transverse distance data set, synthesizing distance coordinates according to the extraction sequence of the distance values, and performing function fitting to obtain a distance value fitting function.
In this step, distance values are sequentially extracted from the transverse distance dataset, all distance values are called based on a similar mode to coordinate fitting, each distance value is numbered to obtain a distance coordinate, if the effective longitudinal scanning is 6 times, 5 scanning distance values are corresponding to each of the distance values, namely D1, D2, D3, D4 and D5, the numbers are respectively 1,2,3,4 and 5, and five groups of distance coordinates are respectively (1, D1), (1, D2), (1, D3), (1, D4) and (1, D5), and function fitting is performed to obtain a distance value fitting function.
S403, performing function coding on the coordinate fitting function and the distance value fitting function, storing a coding result, and packaging the block coding matrix, the fitting function and the block graphic data into an encrypted data packet.
In the step, performing function coding on coordinate fitting functions and distance value fitting functions, wherein each coordinate fitting function is expressed as f n, n is the number of the coordinate fitting function and the distance value fitting function, scrambling the number when the number is used, storing the number as a coding result, recording the expression and the independent variable range of the fitting function corresponding to each number in the coding result, recording the arrangement mode of the correct fitting function in the coding result, and packaging the block coding matrix, the fitting function and the block graphic data into an encrypted data packet; when the data are required to be recovered, the user sends the coding result to a data receiver, the data receiver determines the arrangement sequence of each fitting function according to the coding result, so that the positions of all the image blocks are determined based on the independent variable range and the initial coordinate M1, and the image block corresponding to each image block position is determined according to the image block coding matrix inquiring image block graph data, so that the original drawing is recovered.
As shown in fig. 5, an intelligent drawing data processing system provided by an embodiment of the present invention includes:
the drawing preprocessing module 100 is configured to obtain a drawing to be processed, perform tile recognition on the drawing to be processed, and determine a drawing processing mode.
In the system, a drawing preprocessing module 100 acquires a drawing to be processed, the drawing to be processed is a CAD drawing to be packaged this time, for the technical field of building design, a large number of block commands are used in the process of processing a building construction drawing, because a large number of identical or similar contents are contained in the drawing during drawing, the drawing efficiency can be greatly improved by adopting the block commands, the drawing time is shortened, all blocks contained in the drawing to be processed can be extracted and obtained by identifying the blocks, the occupation amount P of the blocks is calculated, what kind of drawing processing mode is adopted is determined according to the occupation amount of the blocks, specifically, the total length S1 of lines in the drawing to be processed is calculated, then the total length S2 of lines of all the blocks in the drawing to be processed is calculated, the occupation amount P of the blocks is the ratio of the total length S2 of the lines to the total length S1 of the lines, if P is larger than a preset value, the processing mode is determined to be a block encryption mode, and if P is not larger than the preset value, the processing mode is determined to be a line encryption mode.
The block coding module 200 is configured to count blocks included in a drawing to be processed based on a drawing processing mode, obtain block graphic data, and construct a block coding matrix.
In the system, a block coding module 200 counts the blocks contained in a drawing to be processed based on drawing processing mode statistics, when the block processing mode is a block encryption mode, a plotter manually builds the blocks in the drawing to be processed to obtain block graphic data, the block graphic data is specific content of the blocks, such as a building door and window design process, in a plane construction drawing, the same type of door and window can be represented by the same blocks, the patterns of the blocks are copied to obtain block graphic data, according to the mode, all the blocks contained in the whole drawing to be processed are determined, an encryption area can be selected according to user requirements, only the blocks in the encryption area are counted when the block is counted, when the drawing processing mode is a line encryption mode, line graphics outside the blocks in the drawing are used as virtual blocks, such as straight lines, spline curves, polygons, circles and the like, after the identification of the blocks is completed, a block coding matrix is built according to the relative positions of the blocks, the relative azimuth relation among the blocks (including the virtual blocks) is recorded in the block coding matrix, and in order to determine the block coding matrix, the unique coding matrix is generated for each block; for the tile encryption mode, for lines other than tiles, it is considered an independent tile.
The drawing scanning module 300 is configured to perform grid scanning on a drawing to be processed, identify coordinates of each tile, and extract a longitudinal scanning coordinate set and a transverse distance data set.
In the system, the drawing scanning module 300 performs grid scanning on the drawing to be processed, during scanning, identifies the minimum interval between the image blocks, determines the scanning interval according to the minimum interval between the image blocks, so as to scan the drawing to be processed according to a preset sequence, specifically, the coordinate of each image block in the drawing to be processed can be determined in a mode from top to bottom and from left to right based on the identified image block sequence, the center of each image block defined by a user is used as the coordinate of the image block, each virtual image block determines the position of the coordinate according to the command type, such as the line image block, the end point of the line is the circular image block, the coordinate is the circle center of the circle, the coordinate of the polygon image block is the centroid of the polygon, then the coordinate of each image block is determined according to the minimum interval between the longitudinal scanning coordinate sets, and then the transverse distance between the effective longitudinal scanning of the identified image blocks is determined according to the intervals between the longitudinal scanning of different batches, so as to construct a transverse distance data set.
The fitting encryption module 400 is configured to perform coordinate fitting and distance value fitting to obtain multiple sets of fitting functions, perform function encoding, store encoding results, and package the tile encoding matrix, the fitting functions, and the tile graphics data into an encrypted data packet.
In the system, the fitting encryption module 400 performs coordinate fitting and distance value fitting, invokes a longitudinal scanning coordinate set, extracts coordinates of each image block, determines coordinates of a plurality of image blocks obtained by each scanning according to a scanning sequence, calculates coordinate distance values between adjacent coordinates, numbers each coordinate distance value, constructs a coordinate point set according to the numbers and the coordinate distance values, performs coordinate fitting according to the coordinate point set to obtain a coordinate fitting function, performs the operation on the longitudinal scanning coordinate set to obtain a coordinate fitting function set, and similarly, numbers the distance values recorded in the transverse distance data set to construct a distance point set, performs distance value fitting to generate a distance value fitting function, encodes the function, keeps the encoded result in a local place, packages the image block encoding matrix, the fitting function and image block image data into an encrypted data packet, directly transmits the encrypted data packet, stores the encoded result in the local place as a key, and can set a decompression password in a file encryption mode when the encrypted data packet is transmitted.
As shown in fig. 6, as a preferred embodiment of the present invention, the tile encoding module 200 includes:
the tile type identifying unit 201 is configured to determine a tile type to be counted according to a drawing processing mode, and identify a tile type corresponding to a tile in a drawing to be processed.
In this module, the tile type recognition unit 201 determines the type of the tile to be counted according to the processing mode of the drawing, queries the tile in the drawing to be processed, determines the type of each tile, and merges the same tile as a tile of one type in this process.
The graphic coordinate recognition unit 202 is configured to determine a graphic block graphic of each graphic block in the drawing to be processed, and obtain graphic block graphic data.
The icon coding unit 203 is configured to perform non-repeated statistics on the tiles, code the tiles, and construct a tile coding matrix according to the positions of the tiles.
In this module, the graphic coordinate recognition unit 202 determines that there may be multiple tile graphs of each tile in the drawing to be processed, where the same tile graph is stored only once in statistics, and then only the tile graphs that are not repeated are numbered in coding, and a tile coding matrix is constructed according to the relative positions between the tiles, for example, a total of three longitudinal scans are performed to obtain 5, 4 and 6 tiles, and the tile codes are A1, A2, A3, A4 and A5, B1, B2, B3 and B4, C1, C2, C3, C4, C5 and C6, respectively, and then the constructed tile coding matrix 3*6 is a matrix:
In the block coding matrix, the blank positions are filled with preset values.
As shown in fig. 7, as a preferred embodiment of the present invention, the drawing scanning module 300 includes:
The edge recognition unit 301 is configured to recognize an edge of the drawing to be processed, and determine a range for performing grid scanning according to a position of the edge.
In this module, the edge recognition unit 301 recognizes the edge of the drawing to be processed, and recognizes the figure of the most edge in the drawing to be processed, so as to construct a rectangular area, where the rectangular area is tangent to the edge of the image to be processed, and then the rectangular area is the range for performing the grid scanning.
The longitudinal scanning unit 302 is configured to perform longitudinal scanning on the drawing to be processed, obtain a set of longitudinal scanning coordinates after the scanning is completed, and obtain a set of longitudinal scanning coordinates after the longitudinal scanning is completed.
In this module, the longitudinal scanning unit 302 performs longitudinal scanning on the drawing to be processed, and scales the drawing to be processed to a preset scale, and specifically, the scale may be 1:1, then scanning can be carried out according to pixel columns one by one during scanning, each pixel column is scanned, the block coordinates obtained by each scanning are recorded, the block coordinates obtained by the scanning are recorded, or the block coordinates obtained by the scanning can be scanned from top to bottom and from left to right according to a preset scanning width, and when the whole scanning area is scanned, a longitudinal scanning coordinate set is obtained.
And a distance value recording unit 303, configured to determine validity of the longitudinal scans, record distance values between valid longitudinal scans, and obtain a transverse distance data set.
In this module, the distance value recording unit 303 determines the validity of the longitudinal scan, and when the result of the longitudinal scan is null, that is, the tile is not recognized by the longitudinal scan, determines that the scan is invalid, and finally determines an effective scanning process, and counts the distance value between two adjacent longitudinal scans to obtain the transverse distance dataset.
As shown in fig. 8, as a preferred embodiment of the present invention, the fitting encryption module 400 includes:
The coordinate fitting unit 401 is configured to extract coordinates from the longitudinal scan coordinate set, construct a coordinate sequence, and perform function fitting according to the coordinates recorded in the coordinate sequence to obtain a coordinate fitting function.
In this module, the coordinate fitting unit 401 extracts coordinates from the set of longitudinal scan coordinates, extracts coordinates of a block scanned by only one set of scanning processes at a time when extracting coordinates, and numbers the coordinates of the block, for example, in the first longitudinal scanning process, the coordinates of the block scanned by the first set are scanned to obtain 6 sets of coordinates, namely, M1, M2, M3, M4, M5 and M6, respectively, then a set of distance values between two adjacent sets of coordinates are obtained, namely, L 1-2、L2-3、L3-4、L4-5 and L 5-6,L1-2、L2-3、L3-4、L4-5 and L 5-6, respectively, corresponding numbers 1, 2, 3, 4 and 5 are obtained, five sets of fitting coordinates, (1, L 1-2)、(2、L2-3)、(3、L3-4)、(4、L4-5) and (5, L 5-6) are constructed, a coordinate fitting function corresponding to the set of coordinates is determined by a fitting method, and if the fitting coordinates obtained by the first set of scanning are not obtained by fitting a function, the fitting coordinates obtained by the word scanning are divided into multiple segments, and are represented by using multiple coordinate functions.
A distance value fitting unit 402, configured to sequentially extract distance values from the transverse distance data set, synthesize distance coordinates according to the extraction sequence of the distance values, and perform function fitting to obtain a distance value fitting function.
In this module, the distance value fitting unit 402 sequentially extracts distance values from the transverse distance data set, and based on a similar manner to coordinate fitting, calls all the distance values, numbers each of the distance values to obtain distance coordinates, if the effective longitudinal scan is 6 times, there are 5 scan distance values corresponding to each of D1, D2, D3, D4 and D5, and numbers are 1,2, 3, 4 and 5, respectively, and five sets of distance coordinates are (1, D1), (1, D2), (1, D3), (1, D4) and (1, D5), and performs function fitting to obtain a distance value fitting function.
The data encryption unit 403 is configured to perform function encoding on the coordinate fitting function and the distance value fitting function, save the encoding result, and package the tile encoding matrix, the fitting function, and the tile graphics data into an encrypted data packet.
In this module, the data encryption unit 403 performs function encoding on the coordinate fitting function and the distance value fitting function, where each coordinate fitting function is denoted by f n, n is the number of the coordinate fitting function and the distance value fitting function, the numbers are scrambled when numbered, the numbers are saved as encoding results, the expression and the independent variable range of the fitting function corresponding to each number are recorded in the encoding results, the correct arrangement mode of the fitting function is recorded in the encoding results, and the tile encoding matrix, the fitting function and the tile graphics data are packaged into an encrypted data packet; when the data are required to be recovered, the user sends the coding result to a data receiver, the data receiver determines the arrangement sequence of each fitting function according to the coding result, so that the positions of all the image blocks are determined based on the independent variable range and the initial coordinate M1, and the image block corresponding to each image block position is determined according to the image block coding matrix inquiring image block graph data, so that the original drawing is recovered.
It should be understood that, although the steps in the flowcharts of the embodiments of the present invention are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in various embodiments may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the sub-steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of the sub-steps or stages of other steps or other steps.
Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a non-volatile computer readable storage medium, and where the program, when executed, may include processes in the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the invention and are described in detail herein without thereby limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.
Claims (10)
1. An intelligent drawing data processing method is characterized by comprising the following steps:
Acquiring a drawing to be processed, identifying a picture block of the drawing to be processed, and determining a drawing processing mode;
Counting the image blocks contained in the drawing to be processed based on the drawing processing mode to obtain image block graph data, and constructing an image block coding matrix;
Carrying out grid scanning on the drawing to be processed, identifying the coordinates of each image block, and extracting a longitudinal scanning coordinate set and a transverse distance data set;
And carrying out coordinate fitting and distance value fitting to obtain a plurality of groups of fitting functions, carrying out function coding, storing coding results, and packaging the block coding matrix, the fitting functions and block graphic data into an encrypted data packet.
2. The method for processing intelligent drawing data according to claim 1, wherein the step of counting the image blocks included in the drawing to be processed based on the drawing processing mode to obtain image block graphic data and constructing the image block coding matrix specifically comprises the steps of:
Determining the type of the image block to be counted according to the drawing processing mode, and identifying the type of the image block corresponding to the image block in the drawing to be processed;
Determining the pattern block graph of each pattern block in the drawing to be processed to obtain pattern block graph data;
And carrying out non-repeated statistics on the image blocks, coding the image blocks, and constructing an image block coding matrix according to the positions of the image blocks.
3. The method for processing intelligent drawing data according to claim 1, wherein the steps of performing grid scanning on the drawing to be processed, identifying coordinates of each tile, and extracting a longitudinal scanning coordinate set and a transverse distance data set specifically comprise:
Identifying the edge of the drawing to be processed, and determining the range for grid scanning according to the position of the edge;
Carrying out longitudinal scanning on a drawing to be processed, obtaining a group of longitudinal scanning coordinates after the scanning is completed, and obtaining a longitudinal scanning coordinate set after the longitudinal scanning is completed;
and judging the effectiveness of the longitudinal scanning, and recording the distance values between the effective longitudinal scanning to obtain a transverse distance data set.
4. The method for processing intelligent drawing data according to claim 1, wherein the steps of performing coordinate fitting and distance value fitting to obtain a plurality of sets of fitting functions, performing function encoding, storing encoding results, and packaging the block encoding matrix, the fitting functions and the block graphic data into an encrypted data packet specifically include:
Extracting coordinates from the longitudinal scanning coordinate set, constructing a coordinate sequence, and performing function fitting according to the coordinates recorded in the coordinate sequence to obtain a coordinate fitting function;
Sequentially extracting distance values from the transverse distance data set, synthesizing distance coordinates according to the extraction sequence of the distance values, and performing function fitting to obtain a distance value fitting function;
And performing function coding on the coordinate fitting function and the distance value fitting function, storing coding results, and packaging the block coding matrix, the fitting function and the block graphic data into an encrypted data packet.
5. The method for processing drawing data according to claim 1, wherein when the drawing is required to be transmitted, an encrypted data packet is sent to a receiver, when decryption is required, after verification, an encoding result is sent to the receiver, the receiver decrypts according to the encoding result, and generates a corresponding drawing based on a block encoding matrix, a fitting function and block graphic data.
6. An intelligent drawing data processing system, the system comprising:
the drawing preprocessing module is used for acquiring a drawing to be processed, carrying out block identification on the drawing to be processed, and determining a drawing processing mode;
The image block coding module is used for counting the image blocks contained in the drawing to be processed based on the drawing processing mode to obtain image block graphic data and constructing an image block coding matrix;
The drawing scanning module is used for carrying out grid scanning on the drawing to be processed, identifying the coordinates of each image block, and extracting a longitudinal scanning coordinate set and a transverse distance data set;
And the fitting encryption module is used for carrying out coordinate fitting and distance value fitting to obtain a plurality of groups of fitting functions, carrying out function coding, storing coding results, and packaging the block coding matrix, the fitting functions and the block graphic data into an encryption data packet.
7. The intelligent drawing data processing system of claim 6, wherein the tile encoding module comprises:
The image block type identification unit is used for determining image block types to be counted according to the drawing processing mode and identifying image block types corresponding to the image blocks in the drawing to be processed;
the graphic coordinate recognition unit is used for determining the graphic block graphs of all the graphic blocks in the drawing to be processed to obtain graphic block graph data;
The icon coding unit is used for carrying out non-repeated statistics on the image blocks, coding the image blocks, and constructing an image block coding matrix according to the positions of the image blocks.
8. The intelligent drawing data processing system of claim 6, wherein the drawing scanning module comprises:
the edge identification unit is used for identifying the edge of the drawing to be processed and determining the range for grid scanning according to the position of the edge;
The longitudinal scanning unit is used for carrying out longitudinal scanning on the drawing to be processed, obtaining a group of longitudinal scanning coordinates after the scanning is completed, and obtaining a longitudinal scanning coordinate set after the longitudinal scanning is completed;
And the distance value recording unit is used for judging the effectiveness of the longitudinal scanning and recording the distance values between the effective longitudinal scanning to obtain a transverse distance data set.
9. The intelligent drawing data processing system of claim 6, wherein the fitting encryption module comprises:
The coordinate fitting unit is used for extracting coordinates from the longitudinal scanning coordinate set, constructing a coordinate sequence, and performing function fitting according to the coordinates recorded in the coordinate sequence to obtain a coordinate fitting function;
The distance value fitting unit is used for sequentially extracting distance values from the transverse distance data set, synthesizing distance coordinates according to the extraction sequence of the distance values, and performing function fitting to obtain a distance value fitting function;
And the data encryption unit is used for performing function encoding on the coordinate fitting function and the distance value fitting function, saving the encoding result and packaging the block encoding matrix, the fitting function and the block graphic data into an encrypted data packet.
10. The intelligent drawing data processing system according to claim 6, wherein when the drawing is required to be transmitted, the encrypted data packet is sent to the receiver, when decryption is required, the encrypted data packet is verified, the encoding result is sent to the receiver, the receiver decrypts according to the encoding result, and the corresponding drawing is generated based on the block encoding matrix, the fitting function and the block graphic data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410273578.8A CN118194320B (en) | 2024-03-11 | 2024-03-11 | Intelligent drawing data processing method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410273578.8A CN118194320B (en) | 2024-03-11 | 2024-03-11 | Intelligent drawing data processing method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN118194320A CN118194320A (en) | 2024-06-14 |
CN118194320B true CN118194320B (en) | 2024-08-23 |
Family
ID=91404409
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410273578.8A Active CN118194320B (en) | 2024-03-11 | 2024-03-11 | Intelligent drawing data processing method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118194320B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104537098A (en) * | 2015-01-09 | 2015-04-22 | 南京朗坤自动化有限公司 | CAD blueprint search method based on GIS technology |
CN112882644A (en) * | 2021-02-24 | 2021-06-01 | 中国电建集团河南工程有限公司 | Method for automatically extracting hectometer sag value of power transmission line |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7911480B2 (en) * | 2007-10-08 | 2011-03-22 | Via Technologies, Inc. | Compression of multiple-sample-anti-aliasing tile data in a graphics pipeline |
CN113673413A (en) * | 2021-08-16 | 2021-11-19 | 金地(集团)股份有限公司 | Drawing approval method, device, computer readable medium and electronic equipment for architectural drawings |
CN113766082B (en) * | 2021-09-08 | 2022-05-24 | 泰兴市建设工程施工图审查服务中心 | Construction drawing review-based vector drawing compiling method and system |
CN115758494A (en) * | 2022-11-24 | 2023-03-07 | 昆船智能技术股份有限公司 | A method and device for fast conversion of 3D model scene data and CAD drawings based on DXF file technology |
CN115797942B (en) * | 2023-02-01 | 2023-04-28 | 潍坊工程职业学院 | Propaganda information interaction method and system |
-
2024
- 2024-03-11 CN CN202410273578.8A patent/CN118194320B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104537098A (en) * | 2015-01-09 | 2015-04-22 | 南京朗坤自动化有限公司 | CAD blueprint search method based on GIS technology |
CN112882644A (en) * | 2021-02-24 | 2021-06-01 | 中国电建集团河南工程有限公司 | Method for automatically extracting hectometer sag value of power transmission line |
Also Published As
Publication number | Publication date |
---|---|
CN118194320A (en) | 2024-06-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111008923B (en) | Watermark embedding method, watermark extracting method, watermark embedding device, watermark extracting device and watermark extracting equipment | |
US20070076925A1 (en) | Authentication system by fingerprint | |
CA2378345A1 (en) | Method and system for fingerprint template matching | |
WO2021169502A1 (en) | A pixel image as well as its processing method and application system | |
CN113658032B (en) | Image watermark encryption and decryption method and system based on deep learning and image processing | |
CN115643110B (en) | Application software safety detection method based on running data | |
CN115426101B (en) | Data transmission method of cloud intercommunication platform | |
CN118194320B (en) | Intelligent drawing data processing method and system | |
CN116232565B (en) | Safe storage method for website user data | |
CN114913422B (en) | A field monitoring device for soil and water loss in karst mountainous areas | |
CN111428532B (en) | Coding and decoding method capable of encrypting three-dimensional code | |
CN119544217B (en) | Digital watermark encryption and tracing method and system based on national encryption algorithm | |
KR101901535B1 (en) | Method and device for generating anti-forgery image | |
CN105897716A (en) | Website login verification code generating method | |
CN116541872B (en) | Data information safety transmission method and system | |
CN115423063B (en) | Anti-copying shading anti-counterfeiting method and device based on micro-point code | |
CN113569258B (en) | Real estate mortgage registration data security query working method | |
CN116126998B (en) | File homology checking method and system | |
CN118250017A (en) | JS data processing method and device, electronic equipment and storage medium | |
CN115329291A (en) | Anti-crawler method, system, computer equipment and storage medium | |
CN1665182B (en) | Coding and decoding method for high-speed recognition matrix code | |
US20040123100A1 (en) | Certificate issuing method and certificate verifying method | |
US7295678B2 (en) | Method for inserting binary messages in a digital image | |
CN118445861B (en) | Solid state disk data safe storage method and device based on artificial intelligence | |
CN111563238A (en) | Anti-counterfeiting PDF automatic generation system and method for contract text |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |