The copy-right protection method of DWG formatted data and DWG formatted data production method
Technical field
The present invention relates to field of Computer Graphics is and in particular to a kind of copy-right protection method of DWG formatted data and DWG
Formatted data production method.
Background technology
Currently adopting CAD platform domestic most designing unit and engineer applied unit, therefore how digital product is with DWG more
Form stores.Advance over time, the digital product of constituent parts is just becoming its intangible asset the most precious.The copyright of data is protected
It is considered that there being two aspects, one is the protection for data file to shield, and one is the protection for fileinfo.Protect with regard to file
The problem of shield, such as md5 encryption etc., highly developed, but for the particularly copyright information of the copyright protection based on fileinfo
Identification follow the trail of and dabble seldom.Although common file copy right protective measure can protect file copy right, just deposit Yi Dan being cracked
In following fatal drawback:1)Data content can arbitrarily be disseminated;2)Data cannot be followed the trail of and disseminate source;3)Leakage of data is difficult to
Right-safeguarding.
Content of the invention
It is an object of the invention to provide a kind of copy-right protection method of the DWG formatted data with copyright protection and DWG lattice
Formula data production method, the method overcomes the weak defect of prior art copyright protection, has copyright protection comprehensive, strong operability
Feature.
Technical scheme is as follows:
A kind of copy-right protection method of DWG formatted data, comprises the following steps:
A, drawing software basic module is called to set up self-defining data model, and for all kinds of geometry pair in self-defining data model
As adding the feature of adeditive attribute;
B, the distinctive copyright information of self-defined copyright owner, copyright information includes ownership unit information, atural object coding information, institute
The atural object coding information stated sets according to the geometric attribute of all kinds of geometric objects in self-defining data model;
C, achievement DWG file is obtained based on self-defining data modelling, using each in atural object coding information and achievement DWG file
The corresponding relation of class geometric object, copyright information is write the additional genus of the corresponding all kinds of geometric objects in achievement DWG file
In property, complete the copyright protection information typing of DWG formatted data.
Preferably, above-mentioned steps B comprise the following steps:
B1, definition ownership unit information, are write a Chinese character in simplified form by copyright owner's English and are defined;
B2, definition corresponding to each geometric object atural object coding information, comprise the figure layer sequence number of this geometric object, color sequence number and
Line style is numbered;
B3, ownership unit information is connected successively copyright information as this corresponding geometric object with each atural object coding information.
The present invention also provides a kind of DWG formatted data production method applying above-mentioned copy-right protection method, including following
Step:
1), the relevant criterion according to DWG formatted data and the self-defined symbolic library of specification and line style storehouse;
2), the relevant criterion according to DWG formatted data and specification self-defining data model, and for each in self-defining data model
Class geometric object adds the feature of adeditive attribute, generates self-defined DWG file template;
3), the distinctive copyright information of self-defined copyright owner, including ownership unit information, atural object coding information, described ground
Thing coding information sets according to the geometric attribute of all kinds of geometric objects in self-defining data model;
4), DWG file data produce when, by copyright owner pass through drawing software to need draw geometric object carry out successively
Operation, drawing software successively by corresponding geometric object according to data model definitions with different figure layers, line style or symbol, color
Deposited, obtained achievement DWG file;
5), using all kinds of geometric objects in atural object coding information and achievement DWG file corresponding relation, copyright information is written to
In the adeditive attribute of all kinds of geometric objects in fruit DWG file, complete the production of DWG formatted data.
Preferably, also include following operation in step 4:After obtaining achievement DWG file, to the geometry in achievement DWG file
Object is detected according to symbolic library, line style storehouse and data model, and copyright owner is not to meeting symbolic library, line style storehouse and data
The geometric object of any one of model detects after modifying again, until detection is qualified;The operation of above-mentioned definition detection, this area
Drawing software basic module can be compiled into corresponding specific purpose tool to realize by technical staff.
Preferably, before execution step step 5, first carry out copyright information detection, detecting step is as follows:Inspection result
Geometric object in DWG file whether there is the geometric object containing vicious coding and/or copyright information, if existing, deletes
The coding of the mistake in this geometric object and/or copyright information;Above-mentioned detection and deletion action, those skilled in the art can will draw
Figure basis of software module is compiled into corresponding power function to realize.
It is further preferred that step 1) comprise the following steps:
11), self-defined symbolic library:Symbolic library be designed with SHP form shape file pattern or block file pattern;
According to SHP form shape file, according to custom coding rule, define each shape object oriented;SHP form shape file sets
Count and name according to actual practical situation after finishing and generate shape file SHX symbolic library;
According to block module definition symbolic library, according to custom coding rule, define each block object title;Block object has designed
Bi Hou, is wrapped into forming symbol library file;
12), self-defined line style storehouse:According to new naming rule name, existing line style or independent design are directly chosen in line style storehouse
New line style;
13), new symbolic library and line style storehouse are loaded into drawing software, activated by default drawing instrument.
It is further preferred that step 2) comprise the following steps:
Described data model includes figure layer title, figure layer sequence number, figure layer default color, acquiescence line style;
Step 2)Comprise the following steps that:
21), define the title of DWG file figure layer, write a Chinese character in simplified form with copyright owner's English and take the lead;
22), define the sequence number of DWG file figure layer, figure layer sequence number starts with 0, most 99 layers;
23), determine color table, define the default color of DWG file figure layer, using color table index number as color sequence number;
24) acquiescence line style, designed, designed line style the Uniform Name of DWG file figure layer, are defined, title includes copyright owner's English
Literary composition is write a Chinese character in simplified form and line style numbering;
25), call drawing software basic module to add blank adeditive attribute for data model, generate self-defined DWG file mould
Plate.
It is further preferred that step 3) comprise the following steps:
31), define ownership unit information, write a Chinese character in simplified form by copyright owner's English and be defined;
32), definition corresponding to all kinds of geometric objects atural object coding information, comprise the figure in the geometric attribute of such geometric object
Sequence number, color sequence number and line style numbering;
33), ownership unit information is connected successively copyright information as such corresponding geometric object with each atural object coding information.
It is further preferred that step 4) comprise the following steps:
41), copyright owner passes through drawing software, with the new empty DWG file of self-defined DWG file template establishment, chooses required
Geometric object carry out depositing with different figure layers, line style or symbol, color and complete to draw, generate achievement DWG file;Above-mentioned paint
Figure process, those skilled in the art can be compiled into corresponding drawing instrument by drawing software basic module and realize.
The DWG formatted data copy-right protection method of technical solution of the present invention passes through to expand the copyright protection of DWG formatted data
Open up each geometric object, the data model of geometric object is carried out self-defined;Add adeditive attribute for data model simultaneously
Feature, in data production process by copyright information write geometric object adeditive attribute;And, each class geometric object pair
The copyright information answered simultaneously differs, considerably increase distort, the cost of Copyrights information, from multiple angles, copyright is protected
Shield, so that copyright protection realizes the covering of " from top to bottom, from the inside to surface ", dramatically increases the difficulty cracking copyright information, improves
The dynamics of copyright protection.
Brief description
The flow chart of the copy-right protection method of the DWG formatted data that Fig. 1 provides for the present invention;
The flow chart of the DWG formatted data production method that Fig. 2 provides for the present invention.
Specific embodiment
Illustrate the present invention with reference to the accompanying drawings and examples.
Embodiment 1
The copy-right protection method of the DWG formatted data that the present embodiment provides, comprises the following steps:
A, drawing software basic module is called to set up self-defining data model, and for all kinds of geometry pair in self-defining data model
As adding the feature of adeditive attribute;
B, the distinctive copyright information of self-defined copyright owner, copyright information includes ownership unit information, atural object coding information, institute
The atural object coding information stated sets according to the geometric attribute of all kinds of geometric objects in self-defining data model;
It is specially:
B1, definition ownership unit information, are write a Chinese character in simplified form by copyright owner's English and are defined;
B2, definition corresponding to each geometric object atural object coding information, comprise the figure layer sequence number of this geometric object, color sequence number and
Line style is numbered;
B3, ownership unit information is connected successively copyright information as this corresponding geometric object with each atural object coding information;
C, achievement DWG file is obtained based on self-defining data modelling, using each in atural object coding information and achievement DWG file
The corresponding relation of class geometric object, copyright information is write the additional genus of the corresponding all kinds of geometric objects in achievement DWG file
In property, complete the copyright protection information typing of DWG formatted data.
The DWG formatted data production method that the present embodiment provides, comprises the following steps:
1), the relevant criterion according to DWG formatted data and the self-defined symbolic library of specification and line style storehouse;
It is specially:
11), self-defined symbolic library:Symbolic library be designed with SHP form shape file pattern;
According to custom coding rule, define each shape object oriented, such as 01120200, wherein two, left side expression figure layer sequence
Number, 01 first figure layer key-course of expression, up to 99 layers, the color sequence number of 120 expression figure layers, up to 255,200 expressions
The substantial linear of shaped object is organized in shape file;
SHP form shape file designs to be named according to actual practical situation after finishing and generates shape file SHX symbolic library, such as
ZIUPD.SHX;
12), self-defined line style storehouse:According to new naming rule name, existing line style or independent design are directly chosen in line style storehouse
New line style, according to new naming rule name, such as 200, wherein 2 represent line slightly, 00 common solid line when representing;
13), new symbolic library and line style storehouse are loaded into drawing software, activated by default drawing instrument;
2), the relevant criterion according to DWG formatted data and specification self-defining data model, and for each in self-defining data model
Class geometric object adds the feature of adeditive attribute, generates self-defined DWG file template;
Described data model includes figure layer title, figure layer sequence number, figure layer default color, acquiescence line style;
Step 2)Comprise the following steps that:
21), define the title of DWG file figure layer, write a Chinese character in simplified form with copyright owner's English and take the lead, figure layer title generally according to GB or
Rower, the entitled KZD of such as first figure layer;
22), define the sequence number of DWG file figure layer, figure layer sequence number with 0 beginning, most 99 layers, figure layer order generally according to GB or
Rower, such as first figure layer control point order is 0;
23), determine color table, define the default color of DWG file figure layer, using color table index number as color sequence number, such as second
Figure layer JMD layer, default color is pink colour, color serial number 5;
24) acquiescence line style, designed, designed line style the Uniform Name of DWG file figure layer, are defined, title includes copyright owner's English
Literary composition is write a Chinese character in simplified form and line style numbering, and such as ziupd100, wherein ziupd write a Chinese character in simplified form for English, and 100 is line style numbering, and wherein 1 represents line slightly,
00 common solid line when representing;
25), call drawing software basic module to add blank adeditive attribute for data model, generate self-defined DWG file mould
Plate;
3), the distinctive copyright information of self-defined copyright owner, including ownership unit information, atural object coding information, described ground
Thing coding information sets according to the geometric attribute of all kinds of geometric objects in self-defining data model;
It is specially:
31), define ownership unit information, write a Chinese character in simplified form by copyright owner's English and be defined, such as ziupd;
32), definition corresponding to each geometric object atural object coding information, comprise the figure layer sequence in the geometric attribute of this geometric object
Number, color sequence number and line style numbering, such as 01120100, wherein two, left side expression figure layer sequence numbers, 01 first figure layer control of expression
Preparative layer, up to 99 layers, the color sequence number of 120 expression figure layers, up to 255,100 represent the base organizing shaped object in shape file
This line style;
33), ownership unit information and each atural object coding information are connected the copyright information as this corresponding geometric object successively, such as
ziupd01120100;
4), data produce when, by copyright owner to need draw geometric object operate successively, by corresponding geometry pair
As being deposited with corresponding figure layer, line style or symbol, color according to data model definitions, obtain achievement DWG file;To achievement
Geometric object in DWG file carries out detection and revises;
It is specially:
41), copyright owner passes through drawing software, with the new empty DWG file of self-defined DWG file template establishment, chooses required
Geometric object carry out depositing with corresponding figure layer, line style or symbol, color and complete to draw, generate achievement DWG file;
Default coding check is called to process the geometric object in function pair achievement DWG file according to symbolic library, line style storehouse and number
Detected according to model, copyright owner is carried out to the geometric object not meeting symbolic library, line style storehouse and any one of data model
Detect again after modification, until detection is qualified;Described coding check processes function and is worked out and obtained by drawing software basic module;
5), call default coded rights inspection to process function check through step 4)Detect in revised achievement DWG file
Geometric object whether there is containing vicious coding and/or copyright information geometric object, if exist, delete this geometric object
In the coding of mistake and/or copyright information;Described coded rights inspection processes function and is worked out by drawing software basic module
And obtain;
Using the corresponding relation of atural object coding information and all kinds of geometric objects in achievement DWG file, copyright information is write achievement
In the adeditive attribute of all kinds of geometric objects in DWG file, complete the production of DWG formatted data;Described copyright information write
Function is worked out and obtained by drawing software basic module.