The copy-right protection method and DWG formatted data production method of DWG formatted data
Technical field
The present invention relates to field of Computer Graphics, and in particular to a kind of copy-right protection method and DWG of DWG formatted data
Formatted data production method.
Background technique
Current domestic designing unit and engineer application unit mostly mostly use CAD platform, therefore digital product is mostly with DWG
Format storage.With time stepping method, the digital product of constituent parts is just becoming its intangible asset the most precious.The copyright of data is protected
Shield is it is considered that there are two levels, first is that the protection of data file is directed to, first is that being directed to the protection of the file information.It is protected about file
It is the problem of shield, such as md5 encryption, highly developed, but for the especially copyright information of the copyright protection based on the file information
Identification tracking dabble seldom.Although common file copy right safeguard measure can protect file copy right, deposited once being cracked
In following fatal drawback: 1) data content can be disseminated arbitrarily;2) data can not be tracked and disseminates source;3) leakage of data is difficult to
Right-safeguarding.
Summary of the invention
The copy-right protection method and DWG lattice for the DWG formatted data with copyright protection that the purpose of the present invention is to provide a kind of
Formula data production method, the defect that this method overcomes prior art copyright protection weak are comprehensive, strong operability with copyright protection
Feature.
Technical scheme is as follows:
A kind of copy-right protection method of DWG formatted data, comprising the following steps:
A, it calls drawing software basic module to establish self-defining data model, and is all kinds of several in self-defining data model
The feature of what object addition adeditive attribute;
B, the distinctive copyright information of customized copyright owner, copyright information include ownership unit information, atural object coding letter
Breath, the atural object encoded information are set 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, utilizes atural object encoded information and achievement DWG file
In all kinds of geometric objects corresponding relationship, by copyright information be written achievement DWG file in corresponding all kinds of geometric objects it is attached
In additive attribute, the copyright protection information typing of DWG formatted data is completed.
Preferably, above-mentioned steps B the following steps are included:
B1, ownership unit information is defined, copyright owner's English of being subject to is write a Chinese character in simplified form;
B2, definition correspond to the atural object encoded information of each geometric object, figure layer serial number, color sequence comprising the geometric object
Number and line style number;
B3, ownership unit information is successively connected with each atural object encoded information and is believed as the copyright of the corresponding geometric object
Breath.
The present invention also provides a kind of DWG formatted data production method for applying above-mentioned copy-right protection method, including it is following
Step:
1), according to the relevant criterion of DWG formatted data and the customized symbolic library of specification and line style library;
2), according to the relevant criterion of DWG formatted data and specification self-defining data model, and in self-defining data model
All kinds of geometric objects addition adeditive attribute feature, generate customized DWG file template;
3), the distinctive copyright information of customized copyright owner, including ownership unit information, atural object encoded information, it is described
Atural object encoded information according to the geometric attribute of all kinds of geometric objects in self-defining data model set;
4) when, DWG file data produce, by copyright owner by drawing software to the geometric object drawn of needs successively
Operated, drawing software successively by corresponding geometric object according to data model definitions with different figure layers, line style or symbol,
Color is stored, and achievement DWG file is obtained;
5), using the corresponding relationship of all kinds of geometric objects in atural object encoded information and achievement DWG file, copyright information is write
In the adeditive attribute for entering all kinds of geometric objects in achievement DWG file, the production of DWG formatted data is completed.
It preferably, further 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 library and data model, and copyright owner is not to meeting symbolic library, line style library and data
The geometric object of any one of model detects again after modifying, until detection is qualified;The operation of above-mentioned definition detection, this field
Drawing software basic module can be compiled into corresponding specific purpose tool to realize by technical staff.
Preferably, before executing step step 5, copyright information detection is first carried out, 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, and if it exists, delete
The coding and/or copyright information of mistake in the geometric object;Above-mentioned detection and delete operation, 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) the following steps are included:
11), customized symbolic library: the design of symbolic library uses SHP format shape files mode or block file mode;
Each shape object oriented is defined according to custom coding rule according to SHP format shape files;SHP format shape text
Part is named according to practical actual conditions after designing and generates shape files SHX symbolic library;
Each block object title is defined according to custom coding rule according to block module definition symbolic library;Block object is set
After meter, it is wrapped into forming symbol library file;
12) it, customized line style library: is named according to new naming rule, existing line style or independence are directly chosen in line style library
Design new line style;
13) new symbolic library and line style library, are loaded into drawing software, activated by preset drawing tool.
It is further preferred that step 2) the following steps are included:
The data model includes figure layer title, figure layer serial number, figure layer default color, default line style;
Specific step is as follows for step 2:
21) title for, defining DWG file figure layer, is write a Chinese character in simplified form with copyright owner's English and is taken the lead;
22) serial number of DWG file figure layer, is defined, figure layer serial number starts with 0, and most 99 layers;
23) it, determines color table, the default color of DWG file figure layer is defined, using color table index number as color serial number;
24) the default line style of DWG file figure layer, designed, designed line style and Uniform Name, are defined, title includes that all rights reserved
Person's English is write a Chinese character in simplified form numbers with line style;
25), calling drawing software basic module is the adeditive attribute that data model adds blank, generates customized DWG text
Part template.
It is further preferred that step 3) the following steps are included:
31) ownership unit information, is defined, copyright owner's English of being subject to is write a Chinese character in simplified form;
32), definition corresponds to the atural object encoded information of all kinds of geometric objects, in the geometric attribute comprising such geometric object
Figure layer serial number, color serial number and line style number;
33), ownership unit information is successively connected to the copyright as such corresponding geometric object with each atural object encoded information
Information.
It is further preferred that step 4) the following steps are included:
41), copyright owner is chosen by drawing software with the new empty DWG file of customized DWG file template creation
Required geometric object carries out storage with different figure layers, line style or symbol, color and completes to draw, and generates achievement DWG file;On
Drawing course is stated, those skilled in the art can be compiled into corresponding drawing tool by drawing software basic module to realize.
The DWG formatted data copy-right protection method of technical solution of the present invention is by expanding the copyright protection of DWG formatted data
Each geometric object is opened up, the data model of geometric object is carried out customized;Adeditive attribute is added simultaneously for data model
Feature, in data production process by copyright information write-in geometric object adeditive attribute;Also, every one kind geometric object pair
The copyright information answered is not identical, considerably increase distort, the cost of Copyrights information, copyright is protected from multiple angles
Shield dramatically increases the difficulty for cracking copyright information so that copyright protection realizes the covering of " from top to bottom, from the inside to surface ", improves
The dynamics of copyright protection.
Detailed description of the invention
Fig. 1 is the flow chart of the copy-right protection method of DWG formatted data provided by the invention;
Fig. 2 is the flow chart of DWG formatted data production method provided by the invention.
Specific embodiment
The present invention is illustrated with reference to the accompanying drawings and examples.
Embodiment 1
The copy-right protection method of DWG formatted data provided in this embodiment, comprising the following steps:
A, it calls drawing software basic module to establish self-defining data model, and is all kinds of several in self-defining data model
The feature of what object addition adeditive attribute;
B, the distinctive copyright information of customized copyright owner, copyright information include ownership unit information, atural object coding letter
Breath, the atural object encoded information are set according to the geometric attribute of all kinds of geometric objects in self-defining data model;
Specifically:
B1, ownership unit information is defined, copyright owner's English of being subject to is write a Chinese character in simplified form;
B2, definition correspond to the atural object encoded information of each geometric object, figure layer serial number, color sequence comprising the geometric object
Number and line style number;
B3, ownership unit information is successively connected with each atural object encoded information and is believed as the copyright of the corresponding geometric object
Breath;
C, achievement DWG file is obtained based on self-defining data modelling, utilizes atural object encoded information and achievement DWG file
In all kinds of geometric objects corresponding relationship, by copyright information be written achievement DWG file in corresponding all kinds of geometric objects it is attached
In additive attribute, the copyright protection information typing of DWG formatted data is completed.
DWG formatted data production method provided in this embodiment, comprising the following steps:
1), according to the relevant criterion of DWG formatted data and the customized symbolic library of specification and line style library;
Specifically:
11), customized symbolic library: the design of symbolic library uses SHP format shape files mode;
According to custom coding rule, each shape object oriented is defined, such as 01120200, wherein the two expression figure layers in left side
Serial number, 01 first figure layer control layer of expression, up to 99 layers, the color serial number of 120 expression figure layers, up to 255,200 tables
Show the substantial linear that shaped object is organized in shape files;
SHP format shape files are named according to practical actual conditions after designing and generate shape files SHX symbolic library, such as
ZIUPD.SHX;
12) it, customized line style library: is named according to new naming rule, existing line style or independence are directly chosen in line style library
New line style is designed, is named according to new naming rule, such as 200, wherein 2 thick, 00 common solid lines when representing that represent line;
13) new symbolic library and line style library, are loaded into drawing software, activated by preset drawing tool;
2), according to the relevant criterion of DWG formatted data and specification self-defining data model, and in self-defining data model
All kinds of geometric objects addition adeditive attribute feature, generate customized DWG file template;
The data model includes figure layer title, figure layer serial number, figure layer default color, default line style;
Specific step is as follows for step 2:
21) title for, defining DWG file figure layer, is write a Chinese character in simplified form with copyright owner's English and is taken the lead, figure layer title is generally according to state
Mark or rower, such as first entitled KZD of figure layer;
22) serial number of DWG file figure layer, is defined, figure layer serial number starts with 0, and most 99 layers, figure layer order is generally according to state
Mark or rower, such as first figure layer control point order are 0;
23) it, determines color table, defines the default color of DWG file figure layer, using color table index number as color serial number, such as
Second JMD layers of figure layer, default color are pink colour, color serial number 5;
24) the default line style of DWG file figure layer, designed, designed line style and Uniform Name, are defined, title includes that all rights reserved
Person's English is write a Chinese character in simplified form numbers with line style, and such as ziupd100, wherein ziupd writes a Chinese character in simplified form for English, and 100 number for line style, wherein 1 represents line
Slightly, common solid line when 00 represents;
25), calling drawing software basic module is the adeditive attribute that data model adds blank, generates customized DWG text
Part template;
3), the distinctive copyright information of customized copyright owner, including ownership unit information, atural object encoded information, it is described
Atural object encoded information according to the geometric attribute of all kinds of geometric objects in self-defining data model set;
Specifically:
31) ownership unit information, is defined, copyright owner's English of being subject to is write a Chinese character in simplified form, such as ziupd;
32), definition corresponds to the atural object encoded information of each geometric object, the figure in the geometric attribute comprising the geometric object
Sequence number, color serial number and line style number, such as 01120100, wherein the two expression figure layer serial numbers in left side, 01 indicates first figure
Layer control layer, up to 99 layers, 120 indicate the color serial number of figure layer, organize shaped object in up to 255,100 expression shape files
Substantial linear;
33), ownership unit information is successively connected to the copyright letter as the corresponding geometric object with each atural object encoded information
Breath, such as ziupd01120100;
4) it when, data produce, is successively operated by the geometric object that copyright owner draws needs, it will be corresponding several
What object is stored according to data model definitions with corresponding figure layer, line style or symbol, color, and achievement DWG file is obtained;It is right
Geometric object in achievement DWG file carries out detection amendment;
Specifically:
41), copyright owner is chosen by drawing software with the new empty DWG file of customized DWG file template creation
Required geometric object carries out storage with corresponding figure layer, line style or symbol, color and completes to draw, and generates achievement DWG file;
Call preset coding check processing function to the geometric object in achievement DWG file according to symbolic library, line style library
And data model is detected, copyright owner is to the geometric object for not meeting any one of symbolic library, line style library and data model
It is detected again after modifying, until detection is qualified;The coding check processing function is worked out by drawing software basic module
And it obtains;
5) preset coded rights inspection processing function check, is called to detect revised achievement DWG text by step 4)
Geometric object in part whether there is the geometric object containing vicious coding and/or copyright information, and if it exists, delete the geometry
The coding and/or copyright information of mistake in object;The coded rights inspection processing function is by drawing software basic module
It works out and obtains;
Using the corresponding relationship of all kinds of geometric objects in atural object encoded information and achievement DWG file, copyright information is written
In the adeditive attribute of all kinds of geometric objects in achievement DWG file, the production of DWG formatted data is completed;The copyright information
Write-in function is worked out by drawing software basic module and is obtained.