Method for Embedding Watermark in CAD Data, Tracing Method, and Electronic Device

By generating and randomly inserting dark watermarks in CAD data according to the data type, the problem of insufficient anti-interference ability of watermarks in the prior art is solved, and strong anti-interference ability and reliable traceability are achieved.

CN114298882BActive Publication Date: 2025-08-01SUNGROW POWER SUPPLY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111518761.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-13
Publication Date
2025-08-01
Estimated Expiration
2041-12-13

AI Technical Summary

Technical Problem

In the prior art, the watermark protection of CAD data is not strong in anti-interference, which leads to difficulty in traceability.

Method used

Dark watermarks are generated according to the data type of the target table in the CAD database, and randomly inserted into the target table. Simulation data is generated through pseudo-random number algorithm and data dictionary extraction, and the clear watermark is embedded and stored in a trusted third party.

Benefits of technology

It improves the anti-interference and traceability of watermarks, and can reliably determine leaked personnel and ensure the security and traceability of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114298882B_ABST
    Figure CN114298882B_ABST
Patent Text Reader

Abstract

The present application provides a method for embedding a watermark in CAD data, a tracing method, and an electronic device. The method for embedding a watermark in CAD data includes: First, obtain the data types of the target tables in the initial CAD database, where the data types include numerical types and non-numerical types; Then, generate a hidden watermark according to the data types; Finally, randomly insert the hidden watermark into the target tables. Compared with the problem of weak anti-interference ability of watermark protection for CAD data in the prior art, the method for embedding a watermark in CAD data of the present application generates a hidden watermark according to the data types of the target tables in the CAD database and randomly inserts it into the target tables, ensuring strong anti-interference of the hidden watermark and facilitating subsequent tracing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of watermark technology. Specifically, it relates to a method for embedding watermarks in CAD data, a tracing method, a computer-readable storage medium, a processor, and an electronic device. Background Art

[0002] In the prior art, the original CAD (Computer Aided Design) engineering drawing source files designed by enterprises need to be sent to multiple suppliers for price inquiries. During the process of finding qualified suppliers, corresponding infringement acts such as intentional or unintentional dissemination, copying, and modification occur. In order to ensure data security, a technical means is urgently needed to trace the identity of the data from the implicit CAD data information and have a certain ability to resist watermark destruction. As an effective means of protecting data copyright, digital watermark technology is widely used. Digital watermark technology is a technology that finds redundant feature information in the protected original data and encodes and embeds secret information (digital watermark) to prove the ownership of the data.

[0003] For copyright protection and traceability of CAD data, existing watermark technologies include wireframe models, solid models and other representations, as well as surface representations and improved algorithms for surface representations. These algorithms have certain requirements for the capacity of watermark information when embedding watermarks. Too little information is not enough to uniquely determine the watermark information. Common watermark information includes the name of the designer, ID number, product serial number, company logo and website, or other meaningful content. Embedding too much information will cause distortion and affect the transparency of the original data; when these algorithms are extracting, such as extracting the embedded information from the modified data after the source file is attacked, the robustness is not high and the anti-interference ability is not strong, resulting in obstacles to tracing. Summary of the Invention

[0004] The main purpose of the present application is to provide a method for embedding watermarks in CAD data, a tracing method, a computer-readable storage medium, a processor, and an electronic device to solve the problem of weak anti-interference ability of watermark protection for CAD data in the prior art.

[0005] According to one aspect of an embodiment of the present invention, a method for embedding a watermark in CAD data is provided, including: obtaining the data type of a target table in an initial CAD database, where the data type includes numeric type and non-numeric type; generating a hidden watermark according to the data type; and randomly inserting the hidden watermark into the target table.

[0006] Optionally, obtain the data types of the target tables in the initial CAD database, including: parsing the initial CAD database to obtain multiple tables; determining at least one of the target tables from each of the tables using a random algorithm; and obtaining the data types of the cells in a predetermined row or a predetermined column of the target table.

[0007] Optionally, the steganographic watermark includes simulation data of at least one row or at least one column. Generate the steganographic watermark according to the data type, including: when the data type of the cell is the numerical type, generating simulation sub-data of the cell using a pseudo-random number algorithm; when the data type of the cell is the non-numerical type, randomly extracting non-numerical data from the data dictionary of the initial CAD database to form the simulation sub-data; and each of the simulation sub-data constitutes the simulation data of one row or one column.

[0008] Optionally, when the data type of the cell is the numerical type, generating simulation data of the cell using a pseudo-random number algorithm, including: when the data type of the cell is the numerical type, obtaining the data length, digital format, and numerical range of the data in the cell; and generating simulation data that is the same as the data length, the digital format, and the numerical range using a pseudo-random number algorithm.

[0009] Optionally, randomly insert the steganographic watermark into the target table, including: generating a visible watermark corresponding to the steganographic watermark, where the visible watermark includes at least one of the primary key of the target table and predetermined data, the hash value corresponding to the steganographic watermark, the user signature, and the embedding time, where the predetermined data is the data in a predetermined cell, the predetermined cell is at least one cell in each row or each column of the steganographic watermark, and the user signature is the signature information of the user who performs a predetermined operation on the data in the initial CAD database, and the predetermined operation includes access, download, and editing; determining the insertion position of the steganographic watermark, where the insertion position is a predetermined row or a predetermined column of the target table; inserting the steganographic watermark into the insertion position to obtain the CAD database; and storing the visible watermark in a trusted third party.

[0010] Optionally, determining the insertion position of the steganographic watermark includes: generating the hash value according to the function hash = Hash(k, r, p) mod (c + c1), where k is the hash password, r is the steganographic watermark, p is the primary key, c is the total number of rows or the total number of columns of the target table, and c1 is the total number of rows or the total number of columns of the steganographic watermark.

[0011] Optionally, randomly inserting the invisible watermark into the target table includes: obtaining a predetermined embedding ratio, where the predetermined embedding ratio is the ratio of the data volume of the invisible watermark to the data volume of the target table; randomly inserting the invisible watermark into the target table according to the predetermined embedding ratio.

[0012] According to another aspect of the embodiments of the present invention, there is also provided a method for tracing the watermark of CAD data, including: in the case of leakage of CAD data, obtaining the CAD database of the leaked CAD data, where the CAD database includes a predetermined invisible watermark, and the predetermined invisible watermark is embedded in the CAD database by using any one of the methods; obtaining a visible watermark list, where the visible watermark list includes a plurality of visible watermarks, and the visible watermark includes at least one of the primary key of the target table and predetermined data, the hash value corresponding to the invisible watermark, the user signature, and the embedding time, where the predetermined data is the data in a predetermined cell, the predetermined cell is at least one cell in each row or each column of the invisible watermark, the user signature is the signature information of the user who performs a predetermined operation on the data in the CAD database, the predetermined operation includes access, download, and editing, and the target table is the table of the CAD database into which the invisible watermark is inserted; determining the leaking person according to the CAD database and the visible watermark list.

[0013] Optionally, determining the leaking person according to the CAD database and the visible watermark list includes: determining a predetermined visible watermark according to the CAD database and the visible watermark list, where the predetermined visible watermark is the visible watermark corresponding to the predetermined invisible watermark in the visible watermark list; determining the user corresponding to the user signature in the predetermined visible watermark as the leaking person.

[0014] Optionally, determining a predetermined visible watermark according to the CAD database and the visible watermark list includes: determining whether there is data corresponding to a target hash value in the CAD database, and if there is data corresponding to the target hash value in the CAD database, determining the visible watermark corresponding to the target hash value as the predetermined visible watermark, where the target hash value is one of the hash values; if there is no data corresponding to the target hash value in the CAD database, searching for data identical to the target primary key and / or target data in the CAD database, and determining the visible watermark corresponding to the target primary key and / or the target data as the predetermined visible watermark, where each primary key includes the target primary key, and each predetermined data includes the target data.

[0015] According to still another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and the program is used to execute any one of the methods.

[0016] According to another aspect of the embodiments of the present invention, there is also provided a processor for running a program, wherein when the program runs, it executes any one of the above methods.

[0017] According to still another aspect of the embodiments of the present invention, there is also provided an electronic device, including one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include those for executing any one of the above methods.

[0018] In the method for embedding a watermark in CAD data according to the embodiments of the present invention, first, the data types of the target tables in the initial CAD database are obtained, and the data types include numerical types and non-numerical types; then, according to the data types, a hidden watermark is generated; finally, the hidden watermark is randomly inserted into the target tables. Compared with the problem of weak anti-interference ability of watermark protection for CAD data in the prior art, in the method for embedding a watermark in CAD data of the present application, the hidden watermark is generated according to the data types of the target tables in the CAD database and is randomly inserted into the target tables, ensuring strong anti-interference of the hidden watermark and facilitating subsequent traceability. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings forming a part of this application are used to provide a further understanding of this application. The schematic embodiments and descriptions thereof of this application are used to explain this application and do not constitute an improper limitation to this application. In the drawings:

[0020] Figure 1 shows a schematic diagram of the process of the method for embedding a watermark in CAD data according to an embodiment of this application;

[0021] Figure 2 shows a flowchart of the method for embedding a watermark in CAD data according to an embodiment of this application;

[0022] Figure 3 shows a schematic diagram of the process of the method for tracing a watermark in CAD data according to an embodiment of this application;

[0023] Figure 4 shows a schematic diagram of an AutoCAD data file according to an embodiment of this application;

[0024] Figure 5 shows a schematic diagram of the structure table of the database of AutoCAD according to an embodiment of this application;

[0025] Figure 6 and Figure 7The figure shows a schematic diagram of the layer table ACAD_LAYOUT obtained after embedding a hidden watermark at different positions;

[0026] Figure 8 The figure shows a schematic diagram of the content of the visible watermark corresponding to the hidden watermark;

[0027] Figure 9 The figure shows a schematic diagram of an embedding device for watermarking CAD data according to an embodiment of the present application;

[0028] Figure 10 The figure shows a schematic diagram of a tracing device for watermarking CAD data according to an embodiment of the present application. Detailed implementation manners

[0029] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other. The following will describe the present application in detail with reference to the drawings and in conjunction with the embodiments.

[0030] In order to enable those skilled in the art to better understand the solution of the present application, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0031] It should be noted that the terms "first", "second", etc. in the description and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances for the embodiments of the present application described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0032] It should be understood that when an element (such as a layer, film, region, or substrate) is described as being "on" another element, the element can be directly on the other element, or there may also be an intermediate element. Moreover, in the description and claims of the specification, when an element is described as "connected" to another element, the element can be "directly connected" to the other element, or "connected" to the other element through a third element.

[0033] As described in the background art, the anti-interference ability of watermark protection for CAD data in the prior art is not strong. To solve the above problems, in a typical embodiment of the present application, a method for embedding a watermark in CAD data, a tracing method, a computer-readable storage medium, a processor, and an electronic device are provided.

[0034] According to an embodiment of the present application, a method for embedding a watermark in CAD data is provided.

[0035] Figure 1 is a flowchart of a method for embedding a watermark in CAD data according to an embodiment of the present application. As Figure 1 shown, the method includes the following steps:

[0036] Step S101, obtain the data types of the cells in the target table in the initial CAD database, and the above data types include numerical types and non-numerical types;

[0037] Step S102, generate a hidden watermark according to the above data types;

[0038] Step S103, randomly insert the above hidden watermark into the above target table.

[0039] In the above method for embedding a watermark in CAD data, first, obtain the data types of the cells in the target table in the initial CAD database, and the above data types include numerical types and non-numerical types; then, generate a hidden watermark according to the above data types; finally, randomly insert the above hidden watermark into the above target table. Compared with the problem that the anti-interference ability of watermark protection for CAD data in the prior art is not strong, in the above method for embedding a watermark in CAD data of the present application, the above hidden watermark is generated according to the data types of the target table in the above CAD database and randomly inserted into the above target table, ensuring that the hidden watermark has strong anti-interference ability and facilitating subsequent tracing.

[0040] According to a specific embodiment of the present application, obtaining the data types of the cells in the target table in the initial CAD database includes: parsing the above initial CAD database to obtain multiple tables; using a random algorithm to determine at least one of the above target tables from each of the above tables; obtaining the above data types of each cell in a predetermined row or a predetermined column in the above target table. By obtaining the data types of the rows or columns in at least one target table in the above CAD database, it is convenient to generate the hidden watermark of the above target table according to the obtained data types, further ensuring that the generated above hidden watermark is consistent with the data types of the above target table, thereby further ensuring that the above hidden watermark has a high authenticity and further ensuring that the above hidden watermark has good anti-interference ability.

[0041] In the actual application process, when the titles of the above-mentioned target table are distributed by rows, obtaining the above-mentioned data types of each cell in a predetermined row or a predetermined column of the above-mentioned target table indicates obtaining the above-mentioned data types of each cell in the predetermined row of the above-mentioned target table; when the titles of the above-mentioned target table are distributed by columns, obtaining the above-mentioned data types of each cell in a predetermined row or a predetermined column of the above-mentioned target table indicates obtaining the above-mentioned data types of each cell in the predetermined column of the above-mentioned target table.

[0042] According to another specific embodiment of the present application, the above-mentioned hidden watermark includes at least one row or at least one column of simulation data. Generating a hidden watermark according to the above-mentioned data type includes: in the case where the above-mentioned data type of the above-mentioned cell is the above-mentioned numerical type, generating simulation sub-data of the above-mentioned cell by using a pseudo-random number algorithm; in the case where the above-mentioned data type of the above-mentioned cell is the above-mentioned non-numerical type, randomly extracting the above-mentioned non-numerical data from the data dictionary of the above-mentioned initial CAD database to form the above-mentioned simulation sub-data; each of the above-mentioned simulation sub-data constitutes one row or one column of the above-mentioned simulation data. By using different methods to generate the above-mentioned simulation sub-data according to whether the data type of the above-mentioned cell is numerical or non-numerical, it can be ensured that the finally generated above-mentioned simulation data is relatively similar to the above-mentioned original data, further ensuring that the above-mentioned hidden watermark has a relatively high authenticity, and thus further ensuring that the above-mentioned hidden watermark has good anti-interference performance.

[0043] Specifically, the above-mentioned non-numerical data includes non-numerical data and data combining numerical data and non-numerical data, such as text-type and image-type data. By using the method of data dictionary extraction, by randomly extracting in the data dictionary of the initial CAD database, existing similar data in the data dictionary is extracted to generate the text-type attributes in the simulation data. If the attribute is a combined attribute of text and numbers, it needs to be divided into different fields and generated separately. The data dictionary refers to the directory that records the metadata of the database, which is an information collection of data, mainly including data items, data structures, data flows, and their storage and processing processes.

[0044] In order to further ensure that the subsequently generated simulation data is relatively similar to the above original data and further ensure that the authenticity of the above dark watermark is relatively high, according to another specific embodiment of the present application, when the data type of the above cell is the above numerical type, a pseudo-random number algorithm is used to generate the simulation data of the above cell, including: when the data type of the above cell is the above numerical type, obtaining the data length, digital format, and numerical range of the data in the above cell; using the pseudo-random number algorithm to generate the above simulation data that is the same as the above data length, the above digital format, and the above numerical range. By generating the above simulation data that is the same as the above data length, the above digital format, and the above numerical range, it is ensured that the generated above simulation data has the same data format, data length, and numerical range as the above cell, further ensuring that the subsequently generated simulation data is relatively similar to the above original data, and further ensuring that the authenticity of the above dark watermark is relatively high, thereby further ensuring that the anti-interference ability of the above dark watermark is relatively good.

[0045] According to a specific embodiment of the present application, randomly inserting the above dark watermark into the above target table includes: generating a clear watermark corresponding to the above dark watermark, where the clear watermark includes at least one of the primary key of the target table and predetermined data, the hash value corresponding to the above dark watermark, the user signature, and the embedding time, where the above predetermined data is the data in a predetermined cell, the above predetermined cell is at least one cell in each of the above rows or each of the above columns in the above dark watermark, and the above user signature is the signature information of the user who performs a predetermined operation on the data in the above initial CAD database, and the above predetermined operation includes access, download, and editing; determining the insertion position of the above dark watermark, where the insertion position is a predetermined row or a predetermined column of the above target table; inserting the above dark watermark into the above insertion position to obtain the above CAD database; storing the above clear watermark in a trusted third party. By generating the clear watermark corresponding to the above dark watermark and determining the position where the dark watermark is inserted into the above target table through the above function and inserting the above dark watermark at this position, it is ensured that there is a one-to-one correspondence between the above dark watermark and the above clear watermark, which is convenient for subsequent tracing. Storing the above clear watermark in a trusted third party further ensures that the traceability reliability is relatively high.

[0046] Specifically, the above predetermined operation includes modifying records, deleting records, inserting records, or a mixed attack of a combination of 2 or 3 of them. The hash value corresponding to the above dark watermark is obtained by processing the above dark watermark using a hash algorithm. The hash algorithm maps a binary value of any length to a shorter fixed-length binary value, and this small binary value is called a hash value. The hash value is a unique and extremely compact numerical representation of a piece of data.

[0047] In the actual application process, the above trusted third party includes a blockchain.

[0048] According to another specific embodiment of the present application, determining the insertion position of the above-mentioned invisible watermark includes: determining the above-mentioned insertion position according to the function hash = Hash(k, r, p) mod (c + c1), where k is the hash password, r is the above-mentioned invisible watermark, p is the above-mentioned primary key, c is the total number of rows or columns of the above-mentioned target table, and c1 is the total number of rows or columns of the above-mentioned invisible watermark. The above method can provide fast insertion operations and search operations, and is relatively easy to implement programmatically, further facilitating subsequent traceability.

[0049] Specifically, the above-mentioned invisible watermark can be embedded at multiple levels, that is, a new invisible watermark is embedded again into the target table that has already embedded an invisible watermark, and the invisible watermark embedded at the next level will not affect the invisible watermark that has been embedded at the previous level, ensuring that multiple levels of leakage channels can be traced subsequently and ensuring more thorough subsequent traceability. Since in the process of watermark generation and embedding, highly simulated invisible watermark information generated by a pseudo-random number algorithm and a data dictionary extraction method is embedded into the object table, and the embedding position is determined by the hash modulo algorithm, multi-level embedding and non-interference are achieved.

[0050] According to yet another specific embodiment of the present application, randomly inserting the above-mentioned invisible watermark into the above-mentioned target table includes: obtaining a predetermined embedding ratio, where the above-mentioned predetermined embedding ratio is the ratio of the data volume of the above-mentioned invisible watermark to the data volume of the above-mentioned target table; randomly inserting the above-mentioned invisible watermark into the above-mentioned target table according to the above-mentioned predetermined embedding ratio.

[0051] In a specific embodiment, the range of the above-mentioned predetermined embedding ratio is 10% to 30%. The range of the embedding ratio of the above-mentioned invisible watermark is 10% to 30%. On the one hand, it ensures that the embedded data is not too little, ensuring better robustness, and on the other hand, it also ensures that the embedded data is not too much, solving the problem of storing redundant data.

[0052] In the actual application process, if there are ten rows of data in the above-mentioned target table and the embedding ratio is 30%, then the invisible watermark of three rows of simulation data is embedded.

[0053] Figure 2 The following will be combined with Figure 2 For the flowchart of embedding the watermark of CAD data according to this embodiment, an explanation will be given.

[0054] Obtain the data types of the target table in the initial CAD database, and the above-mentioned data types include numerical types and non-numerical types;

[0055] Generate a hidden watermark according to the above data types. When the data type in the above cell is the above numeric type, generate simulation sub-data for the above cell using a pseudo-random number algorithm; when the data type in the above cell is the above non-numeric type, randomly extract non-numeric data from the data dictionary of the above initial CAD database to form the above simulation sub-data; each of the above simulation sub-data constitutes one row or one column of the above simulation data.

[0056] Generate a visible watermark corresponding to the hidden watermark;

[0057] Calculate the position index number where the above hidden watermark is to be embedded;

[0058] Randomly insert the above hidden watermark into the above target table according to the above position index number;

[0059] Store the above visible watermark in a trusted third party;

[0060] Determine whether it is multi-level embedding. If it is multi-level embedding, return to reclassify according to the data type; if it is not multi-level embedding, end.

[0061] According to an embodiment of the application, a method for tracing the watermark of CAD data is also provided.

[0062] Figure 3 It is a flowchart of a method for tracing the watermark of CAD data according to an embodiment of the present application. As Figure 3 shown, the method includes the following steps:

[0063] Step S201, in the case of leakage of CAD data, obtain the CAD database of the leaked CAD data. The above CAD database includes a predetermined hidden watermark, and the above predetermined hidden watermark is embedded in the above CAD database by using any one of the above methods;

[0064] Step S202, obtain a visible watermark list. The above visible watermark list includes multiple visible watermarks. The above visible watermarks include at least one of the primary key of the target table and predetermined data, the hash value corresponding to the hidden watermark, the user signature, and the embedding time. Among them, the above predetermined data is the data in a predetermined cell, and the above predetermined cell is at least one cell in each row or each column of the above hidden watermark. The above user signature is the signature information of the user who performs a predetermined operation on the data in the above CAD database. The above predetermined operation includes access, download, and editing. The above target table is the table of the above CAD database into which the above hidden watermark is inserted;

[0065] Step S203, determine the leaking person according to the above CAD database and the visible watermark list.

[0066] In the above method for tracing the watermark of CAD data, first, obtain the CAD database of the leaked CAD data. The CAD database includes a predetermined hidden watermark, and the predetermined hidden watermark is embedded in the CAD database by using any of the above methods. Then, obtain a list of visible watermarks. The list of visible watermarks includes multiple visible watermarks, and the visible watermarks include at least one of the primary key of the target table and predetermined data, the hash value corresponding to the hidden watermark, the user signature, and the embedding time. Wherein, the predetermined data is the data in at least one cell of each row or each column in the hidden watermark, the user signature is the signature information of the user who performs a predetermined operation on the data in the CAD database, and the target table is the table in the CAD database into which the hidden watermark is inserted. Finally, determine the leaking person according to the CAD database and the list of visible watermarks. Compared with the problem of weak anti-interference ability of watermark protection for CAD data in the prior art, in the above method for tracing the watermark of CAD data in this application, the hidden watermark in the CAD database corresponding to the leakage is generated according to the data type of the target table and randomly inserted into the target table, which makes the anti-interference ability of the hidden watermark strong. In this way, according to the CAD database and the list of visible watermarks, determine the leaking person, ensuring that the leaking person of CAD data can be determined relatively simply and reliably, and the tracing power is relatively strong.

[0067] According to a specific embodiment of the present application, determining the leaking person according to the CAD database and the list of visible watermarks includes: determining a predetermined visible watermark according to the CAD database and the list of visible watermarks, where the predetermined visible watermark is the visible watermark corresponding to the predetermined hidden watermark in the list of visible watermarks; determining that the user corresponding to the user signature in the predetermined visible watermark is the leaking person. Due to the one-to-one correspondence between the visible watermark and the hidden watermark, and the user signature is included in the visible watermark, by determining the predetermined visible watermark through the CAD database and the list of visible watermarks, it is further ensured that the leaking person can be determined relatively accurately and reliably.

[0068] In the actual application process, in the case of CAD data leakage, the source file can be divided into two cases: attacked and not attacked. At this time, in order to further ensure a more thorough traceability, according to another specific embodiment of the present application, based on the above CAD database and the above clear watermark list, a predetermined clear watermark is determined, including: determining whether there is data corresponding to the target hash value in the above CAD database. In the case where there is data corresponding to the above target hash value in the above CAD database, determining the clear watermark corresponding to the above target hash value as the above predetermined clear watermark, and the above target hash value is one of the above hash values; in the case where there is no data corresponding to the above target hash value in the above CAD database, searching for data identical to the target primary key and / or target data in the above CAD database, and determining the clear watermark corresponding to the above target primary key and / or the above target data as the above predetermined clear watermark, and each of the above primary keys includes the above target primary key, and each of the above predetermined data includes the above target data. In the case where there is data corresponding to the above target hash value in the above CAD database, it indicates that the source file has not been attacked or has been attacked but not all the hidden watermarks have been completely destroyed. At this time, the hash value recorded in the predetermined row or column of the target table can be immediately found, and then the clear watermark corresponding to the target hash value is determined from the hash value as the above predetermined clear watermark; while in the case where there is no data corresponding to the above target hash value in the above CAD database, it indicates that the source file has been attacked, that is, at least one of modification records, deletion records, and insertion records has occurred. At this time, searching for data identical to the target primary key and / or target data in the above CAD database, and determining the clear watermark corresponding to the above target primary key and / or the above target data as the above predetermined clear watermark, which further ensures reliable traceability.

[0069] In a specific embodiment, the embedding ratio range of the above hidden watermark is 10% - 30%. Among them, the above embedding ratio is the ratio of the data volume of the above hidden watermark to the data volume of the above target table. When the leakage person attacks the source file, it is very difficult to accurately locate and modify all of the randomly embedded 10% - 30% of the above hidden watermarks. If a hash value is found to be the same, traceability can be achieved, which further ensures that traceability is relatively easy.

[0070] According to still another specific embodiment of the present application, the above hidden watermark can be embedded at multiple levels, that is, a new hidden watermark is embedded again into the target table that has already embedded a hidden watermark, and the hidden watermark embedded at the next level does not affect the hidden watermark already embedded at the previous level. By extracting the hidden watermark information table T from the sample of the leaked data and searching in the clear watermark list U stored in three parties, the watermarks embedded during the multi-level distribution by the leakage person can be found, that is, different users have different watermarks, and they are also different when the same user distributes at different levels. The traceability is more thorough.

[0071] To further deepen the understanding of the above-mentioned watermark embedding method and tracing method for CAD data, the following takes an AutoCAD data file model.dwg as an example and will be described in conjunction with Figures 4 to 8 as follows.

[0072] An AutoCAD data file is actually a database that records graphical and non-graphical objects. There are three different types of objects in total: entities, containers (managing and storing objects), and other objects (including special objects without layouts, etc.); among them, containers mainly include system symbol tables and dictionaries; the main system symbol tables include block tables, layer tables, line type tables, text type tables, view tables, view point tables, dimension style tables, user coordinate system tables, and registered application tables.

[0073] Parsing Figure 4 The generated database structure is as follows Figure 5 as shown:

[0074] Step 1: Watermark generation: Taking the layer table ACAD_LAYOUT as an example, to obtain the data structure of the table, the generation of the hidden watermark is required first. According to different data types, different generation rules are used to generate the simulation sub-data of each cell in a row.

[0075] For non-numerical data, such as text data, the method of extracting from the data dictionary is adopted, where the data is stored classified to facilitate the extraction of text for different purposes. For example, the Color class contains characters such as White, Yellow, Green, Red, etc. If the attribute is a combined attribute of text and number, the attribute needs to be divided into different fields and generated separately. For example, for the Name attribute, the first half is generated in text type, and the second half is generated in numerical type. They are connected with an underscore in the middle.

[0076] For numerical data, a pseudo-random number generation algorithm is adopted. The pseudo-random number generation algorithm can adopt the congruential method or the Mersenne Twister algorithm. The generator needs to configure some parameters, such as setting the generation range, length, and data type of the pseudo-random numbers to generate the numerical attributes in the embedded data. Figure 6 The last row is the generated simulation data.

[0077] Step 2: Watermark embedding: As Figure 7As shown, a certain proportion of tables are randomly selected through a random algorithm. Taking the table ACAD_LAYOUT as an example, after generating a dark watermark according to the table structure, the algorithm for embedding it into the original data uses the sha256 hash algorithm for random insertion. The formula hash = Hash(k, r, p) mod (c + c1) is used, where p is the primary key AM_3, k is the calculated hash password, r is the virtual dark watermark (1, AM_3, 1, 0, 0, white, ContinuousDefault, Color_3, 1,), c is the original number of records in this table, which is 12, and c1 is the amount of data to be embedded, which is 1. The hash value is generated through the hash function and modulo operation with c + c1 to determine the insertion position as 2, that is, the dark watermark is inserted into the second row, and the data at the original position is shifted backward in turn, so as to achieve the effect of random scrambling of data and make the authenticity of the data higher.

[0078] As Figure 8 shown, the embedding system stores the table name, primary key, hash value corresponding to the dark watermark, watermark string, embedding time, and embedding user name of the embedding. These data to be recorded should be stored correspondingly in a trusted third party, such as a blockchain, etc., to ensure the authenticity and effectiveness of traceability.

[0079] When the data is distributed at multiple levels, new dark watermarks can be embedded multiple times. That is, multiple rows are appended to the watermark table, and the dark watermarks embedded at the lower level will not affect the dark watermarks already embedded at the upper level.

[0080] Step 3: Watermark traceability: After the data is leaked, the structure and content of the database table to be detected are extracted from the leaked file. By comparing the CAD database of the suspected leaked data and the clear watermark list U, the CAD database is stored in the table T; the clear watermark list U stored in the third party is obtained. For the source file that has not been attacked, the hash of each row record in the T table can be immediately found in the U table to complete the traceability; for the source file that has been attacked, the attack methods include modifying records, deleting records, inserting records, or a mixed attack of 2 or 3 combinations. It is very difficult to accurately locate and modify all the randomly embedded 10% - 30% dark watermarks. If a hash match is found, the traceability can be completed. If no hash match is found, each piece of data R(i) in the T is compared with the data content (table name, primary key) in the clear watermark list U. If a match is found, the traceability can also be completed. The same method can be used to find the watermarks embedded during the multi-level distribution of users, that is, different users have different watermarks, and there are also watermarks during different hierarchical distributions of the same user, making the traceability more thorough.

[0081] The embodiment of the present application also provides a device for embedding a watermark in CAD data. The above device can be applied to a server. It should be noted that the device for embedding a watermark in CAD data in the embodiment of the present application can be used to execute the method for embedding a watermark in CAD data applied to the server side provided by the embodiment of the present application. The following introduces the device for embedding a watermark in CAD data provided by the embodiment of the present application.

[0082] Figure 9 It is a schematic diagram of a device for embedding a watermark in CAD data according to an embodiment of the present application. As Figure 9 shown, the device includes a first acquisition unit 10, a generation unit 20, and an insertion unit 30. Among them, the first acquisition unit 10 is used to acquire the data types of the target tables in the initial CAD database, and the data types include numeric types and non-numeric types; the generation unit 20 is used to generate a hidden watermark according to the data types; the insertion unit 30 is used to randomly insert the hidden watermark into the target tables.

[0083] In the above device for embedding a watermark in CAD data, the data types of the target tables in the initial CAD database are acquired through the first acquisition unit, and the data types include numeric types and non-numeric types; a hidden watermark is generated by the generation unit according to the data types; the hidden watermark is randomly inserted into the target tables through the insertion unit. Compared with the problem that the anti-interference ability of watermark protection for CAD data in the prior art is not strong, in the device for embedding a watermark in CAD data of the present application, the hidden watermark is generated according to the data types of the target tables in the CAD database and randomly inserted into the target tables, ensuring that the hidden watermark has strong anti-interference ability and facilitating subsequent traceability.

[0084] According to a specific embodiment of the present application, the first acquisition unit includes a parsing module, a first determination module, and a first acquisition module. Among them, the parsing module is used to parse the initial CAD database to obtain multiple tables; the first determination module is used to determine at least one of the target tables from each of the tables by using a random algorithm; the first acquisition module is used to acquire the data types of the cells in the predetermined rows or columns of the target tables. By acquiring the data types of the rows or columns in at least one target table in the CAD database, it facilitates the subsequent generation of the hidden watermark of the target table according to the obtained data types, further ensuring that the generated hidden watermark is consistent with the data types of the target table, thereby further ensuring that the hidden watermark has a high authenticity and further ensuring that the hidden watermark has good anti-interference ability.

[0085] In the actual application process, when the titles of the above target table are distributed row by row, obtaining the above data types of each cell in a predetermined row or a predetermined column of the above target table indicates obtaining the above data types of each cell in the predetermined row of the above target table; when the titles of the above target table are distributed column by column, obtaining the above data types of each cell in a predetermined row or a predetermined column of the above target table indicates obtaining the above data types of each cell in the predetermined column of the above target table.

[0086] According to another specific embodiment of the present application, the above dark watermark includes at least one row or at least one column of simulation data, and the above generating unit includes a first generating module, a composing module, and a constituting module. Among them, the above first generating module is used to generate the simulation sub-data of the above cell by using a pseudo-random number algorithm when the above data type of the above cell is the above numerical type; the above composing module is used to randomly extract the above non-numerical data from the data dictionary of the above initial CAD database to form the above simulation sub-data when the above data type of the above cell is the above non-numerical type; the above constituting module is used to constitute the above simulation sub-data into one row or one column of the above simulation data. By generating the above simulation sub-data using different modules according to the above two types of numerical and non-numerical data types of the above cell, it can be ensured that the finally generated above simulation data is relatively similar to the above original data, further ensuring that the above dark watermark has a relatively high authenticity, and thus further ensuring that the above dark watermark has good anti-interference performance.

[0087] Specifically, the above non-numerical data includes non-numerical data and data combining numerical data and non-numerical data, such as text type and image type data. By using the method of data dictionary extraction, by randomly extracting in the data dictionary of the initial CAD database, the existing similar data in the data dictionary is extracted to generate the text type attributes in the simulation data. If the attribute is a combined attribute of text type and number, it needs to be divided into different fields and generated separately. Among them, the data dictionary refers to the directory recording the metadata of the database, which is the information set of data, mainly including data items, data structures, data streams, and their storage and processing processes.

[0088] To further ensure that the subsequently generated simulation data is relatively similar to the above-mentioned original data and further ensure that the authenticity of the above-mentioned invisible watermark is relatively high, according to another specific embodiment of the present application, the above-mentioned first generation module includes an acquisition sub-module and a generation sub-module. Among them, the above-mentioned acquisition sub-module is used to obtain the data length, digital format, and numerical range of the data in the above-mentioned cell when the above-mentioned data type of the above-mentioned cell is the above-mentioned numerical type; the above-mentioned generation sub-module is used to generate the above-mentioned simulation data that is the same as the above-mentioned data length, the above-mentioned digital format, and the above-mentioned numerical range by using a pseudo-random number algorithm. By generating the above-mentioned simulation data that is the same as the above-mentioned data length, the above-mentioned digital format, and the above-mentioned numerical range, it is ensured that the generated above-mentioned simulation data has the same data format, data length, and numerical range as the above-mentioned cell, further ensuring that the subsequently generated simulation data is relatively similar to the above-mentioned original data, and further ensuring that the authenticity of the above-mentioned invisible watermark is relatively high, thereby further ensuring that the anti-interference performance of the above-mentioned invisible watermark is relatively good.

[0089] According to a specific embodiment of the present application, the above-mentioned insertion unit includes a second generation module, a sixth determination module, a first insertion module, and a storage module. Among them, the above-mentioned second generation module is used to generate a visible watermark corresponding to the above-mentioned invisible watermark. The visible watermark includes at least one of the primary key of the target table and the predetermined data, the hash value corresponding to the above-mentioned invisible watermark, the user signature, and the embedding time. Among them, the above-mentioned predetermined data is the data in the predetermined cell, and the above-mentioned predetermined cell is at least one cell in each of the above-mentioned rows or each of the above-mentioned columns in the above-mentioned invisible watermark. The above-mentioned user signature is the signature information of the user who performs a predetermined operation on the data in the above-mentioned initial CAD database. The above-mentioned predetermined operation includes access, download, and editing; the above-mentioned sixth determination module is used to determine the insertion position of the above-mentioned invisible watermark, and the insertion position is a predetermined row or a predetermined column of the above-mentioned target table; the above-mentioned first insertion module is used to insert the above-mentioned invisible watermark into the above-mentioned insertion position to obtain the above-mentioned CAD database; the above-mentioned storage module is used to store the above-mentioned visible watermark in a trusted third party. By generating the visible watermark corresponding to the above-mentioned invisible watermark and determining the position where the invisible watermark is inserted into the above-mentioned target table through the above-mentioned function, and inserting the above-mentioned invisible watermark at this position, it is ensured that there is a one-to-one correspondence between the above-mentioned invisible watermark and the above-mentioned visible watermark, which is convenient for subsequent traceability. Storing the above-mentioned visible watermark in a trusted third party further ensures a relatively high traceability reliability.

[0090] Specifically, the above-mentioned predetermined operation includes modifying records, deleting records, inserting records, or a mixed attack of 2 or 3 combinations. The hash value corresponding to the above-mentioned invisible watermark is obtained by processing the above-mentioned invisible watermark using a hash algorithm. The hash algorithm maps a binary value of any length to a shorter fixed-length binary value, and this small binary value is called a hash value. The hash value is a unique and extremely compact numerical representation of a piece of data.

[0091] In the actual application process, the above-mentioned trusted third party includes a blockchain.

[0092] According to another specific embodiment of the present application, the above-mentioned sixth determination module includes a determination sub-module, and the determination sub-module is used to determine the above-mentioned insertion position according to the function hash = Hash(k, r, p) mod (c + c1), where k is a hash password, r is the above-mentioned hidden watermark, p is the above-mentioned primary key, c is the total number of rows or columns of the above-mentioned target table, and c1 is the total number of rows or columns of the above-mentioned hidden watermark. The above-mentioned device can provide fast insertion operations and search operations, and the programming implementation is relatively easy, which further facilitates subsequent traceability.

[0093] Specifically, the above-mentioned hidden watermark can be embedded at multiple levels, that is, a new hidden watermark is embedded again into the target table that has already embedded the hidden watermark, and the hidden watermark embedded at the next level will not affect the hidden watermark that has been embedded at the previous level, ensuring that multiple leakage channels can be traced subsequently and ensuring more thorough subsequent traceability. Since in the process of watermark generation and embedding, highly simulated hidden watermark information generated by using a pseudo-random number algorithm and a data dictionary extraction method is embedded into the object table, and the embedding position is determined according to the hash modulo algorithm, the multi-level embedding does not interfere with each other.

[0094] According to yet another specific embodiment of the present application, the above-mentioned insertion unit includes a second acquisition module and a second insertion module, where the second acquisition module is used to acquire a predetermined embedding ratio, and the predetermined embedding ratio is the ratio of the data volume of the above-mentioned hidden watermark to the data volume of the above-mentioned target table; the second insertion module is used to randomly insert the above-mentioned hidden watermark into the above-mentioned target table according to the above-mentioned predetermined embedding ratio.

[0095] In a specific embodiment, the range of the above-mentioned predetermined embedding ratio is 10% to 30%. The range of the embedding ratio of the above-mentioned hidden watermark is 10% to 30%. On the one hand, it ensures that the embedded data is not too small, ensuring good robustness. On the other hand, it also ensures that the embedded data is not too much, solving the problem of redundant data storage.

[0096] In the actual application process, if there are ten rows of data in the above-mentioned target table and the embedding ratio is 30%, then the hidden watermark of three rows of simulation data is embedded.

[0097] The embodiment of the present application also provides a traceability device for the watermark of CAD data. It should be noted that the traceability device for the watermark of CAD data in the embodiment of the present application can be used to execute the method for tracing the watermark of CAD data applied to the terminal provided by the embodiment of the present application. The following introduces the traceability device for the watermark of CAD data provided by the embodiment of the present application.

[0098] Figure 10It is a schematic diagram of a tracing device for watermarks of CAD data according to an embodiment of the present application. As Figure 10 shown, the device includes a second acquisition unit 40, a third acquisition unit 50, and a determination unit 60. Among them, the second acquisition unit 40 is configured to, when the CAD data is leaked, acquire the CAD database of the leaked CAD data. The CAD database includes a predetermined hidden watermark, and the predetermined hidden watermark is embedded in the CAD database by using any one of the above methods; the third acquisition unit 50 is configured to acquire a visible watermark list, and the visible watermark list includes a plurality of visible watermarks. The visible watermarks include at least one of the primary key of the target table and predetermined data, the hash value corresponding to the hidden watermark, the user signature, and the embedding time. The predetermined data is the data in a predetermined cell, and the predetermined cell is at least one cell in each row or each column of the hidden watermark. The user signature is the signature information of the user who performs a predetermined operation on the data in the CAD database. The predetermined operation includes access, download, and editing. The target table is the table of the CAD database into which the hidden watermark is inserted; the determination unit 60 is configured to determine the leaking person according to the CAD database and the visible watermark list.

[0099] In the above-mentioned tracing device for watermarks of CAD data, the CAD database of the leaked CAD data is acquired by the second acquisition unit. The CAD database includes a predetermined hidden watermark, and the predetermined hidden watermark is embedded in the CAD database by using any one of the above methods; the visible watermark list is acquired by the third acquisition unit. The visible watermark list includes a plurality of visible watermarks. The visible watermarks include at least one of the primary key of the target table and predetermined data, the hash value corresponding to the hidden watermark, the user signature, and the embedding time. The predetermined data is the data in at least one cell in each row or each column of the hidden watermark. The user signature is the signature information of the user who performs a predetermined operation on the data in the CAD database. The target table is the table of the CAD database into which the hidden watermark is inserted; the leaking person is determined by the determination unit according to the CAD database and the visible watermark list. Compared with the problem that the anti-interference ability of watermark protection for CAD data in the prior art is not strong, in the above-mentioned tracing device for watermarks of CAD data of the present application, the hidden watermark in the CAD database corresponding to the leakage is generated according to the data type of the target table and randomly inserted into the target table, which makes the anti-interference ability of the hidden watermark strong. In this way, according to the CAD database and the visible watermark list, the leaking person is determined, ensuring that the leaking person of the CAD data can be determined simply and reliably, and the traceability is strong.

[0100] According to a specific embodiment of the present application, the determining unit includes a second determining module and a third determining module. Among them, the second determining module is used to determine a predetermined visible watermark according to the CAD database and the visible watermark list, and the predetermined visible watermark is the visible watermark in the visible watermark list corresponding to the predetermined invisible watermark; the third determining module is used to determine that the user corresponding to the user signature in the predetermined visible watermark is the leaking person. Due to the one-to-one correspondence between the visible watermark and the invisible watermark, and the user signature is included in the visible watermark, the predetermined visible watermark is determined through the CAD database and the visible watermark list, which further ensures that the leaking person can be determined more accurately and reliably.

[0101] In the actual application process, in the case of CAD data leakage, the source file can be divided into two situations: being attacked and not being attacked. At this time, in order to further ensure thorough traceability, according to another specific embodiment of the present application, the determining unit includes a fourth determining module and a fifth determining module. Among them, the fourth determining module is used to determine whether there is data corresponding to the target hash value in the CAD database. If there is data corresponding to the target hash value in the CAD database, it is determined that the visible watermark corresponding to the target hash value is the predetermined visible watermark, and the target hash value is one of the hash values; the fifth determining module is used to, when there is no data corresponding to the target hash value in the CAD database, search for data identical to the target primary key and / or target data in the CAD database, and determine that the visible watermark corresponding to the target primary key and / or the target data is the predetermined visible watermark. Each of the primary keys includes the target primary key, and each of the predetermined data includes the target data. When there is data corresponding to the target hash value in the CAD database, it means that the source file has not been attacked or has been attacked but not all the invisible watermarks have been completely destroyed. At this time, the hash value recorded in the predetermined row or column of the target table can be immediately found, and then the visible watermark corresponding to the target hash value is determined from the hash value as the predetermined visible watermark; when there is no data corresponding to the target hash value in the CAD database, it means that the source file has been attacked, that is, at least one of record modification, record deletion, and record insertion has occurred. At this time, search for data identical to the target primary key and / or target data in the CAD database, and determine that the visible watermark corresponding to the target primary key and / or the target data is the predetermined visible watermark, which further ensures reliable traceability.

[0102] In a specific embodiment, the embedding ratio of the above-mentioned invisible watermark ranges from 10% to 30%. Herein, the embedding ratio is the ratio of the data volume of the invisible watermark to the data volume of the target table. When the source file of the leaked personnel is attacked, it is very difficult to accurately locate and modify all of the randomly embedded invisible watermark within the range of 10% to 30%. If a hash value is found to be the same, the source can be traced, which further ensures that the tracing is relatively easy.

[0103] According to another specific embodiment of the present application, the above-mentioned invisible watermark can be embedded at multiple levels, that is, a new invisible watermark is embedded again into the target table that has already embedded an invisible watermark, and the invisible watermark embedded at the next level will not affect the invisible watermark that has been embedded at the previous level. By extracting the invisible watermark information table T from the sample of the leaked data and searching in the clear watermark list U stored by the three parties, the watermarks embedded during the multi-level distribution by the leaked personnel can be found, that is, different users have different watermarks, and they are also different when the same user distributes at different levels. The tracing is more thorough.

[0104] To further deepen the understanding of the above-mentioned watermark embedding device and tracing device for CAD data, take an AutoCAD data file model.dwg as an example below, and it will be described in conjunction with Figures 4 to 8 for illustration.

[0105] The AutoCAD data file is actually a database that records graphic and non-graphic objects. There are a total of 3 different types of objects: entities, containers (managing and storing objects), and other objects (including special objects without layouts, etc.); among them, the containers mainly include system symbol tables and dictionaries; the main system symbol tables include block tables, layer tables, line type tables, text type tables, view tables, viewpoint tables, dimension style tables, user coordinate system tables, and registered application tables.

[0106] Parse Figure 4 The generated database structure is as follows Figure 5 shown as:

[0107] Step 1: Watermark generation: Take the layer table ACAD_LAYOUT as an example. To obtain the data structure of the table, the generation of the invisible watermark is required first. According to different data types, different generation rules are used to generate the simulation sub-data of each cell in a row.

[0108] For non-numeric data, such as text data, the data dictionary extraction method is adopted, where the data is stored categorically to facilitate the extraction of text for different purposes. For example, the Color class contains characters such as White, Yellow, Green, Red, etc. If the attribute is a combined attribute of text and number, the attribute needs to be divided into different fields and generated separately. For example, for the Name attribute, the first half is generated in text type, and the second half is generated in numeric type, connected by an underscore in the middle.

[0109] For numeric data, a pseudo-random number generation algorithm is adopted. The pseudo-random number generation algorithm can use the Congruential method or the Mersenne Twister algorithm. The generator needs to configure some parameters, such as setting the generation range, length, and data type of the pseudo-random number to generate the numeric attributes in the embedded data. Figure 6 The last line is the generated simulation data.

[0110] Step 2: Watermark embedding: As Figure 7 shown, a certain proportion of the table is randomly extracted through a random algorithm. Taking the table ACAD_LAYOUT as an example, after generating the dark watermark according to the table structure, the algorithm for embedding it into the original data uses the sha256 hash algorithm for random insertion. Using the formula hash = Hash(k, r, p) mod (c + c1), where p is the primary key AM_3, k is the calculated hash password, r is the virtual dark watermark (1, AM_3, 1, 0, 0, white, ContinuousDefault, Color_3, 1,), c is the original number of records in this table, which is 12, and c1 is the amount of data to be embedded, which is 1. The hash value is generated through the hash function and modulo operation on c + c1 to determine the insertion position as 2, that is, the dark watermark is inserted into the second row, and the data in the original position is shifted backward in turn, so as to achieve the effect of random scrambling of the data and make the authenticity of the data higher.

[0111] As Figure 8 shown, the embedding system stores the table name, primary key, hash value corresponding to the dark watermark, watermark string, embedding time, and embedding username. These data of the record need to be stored correspondingly in a trusted third party, such as a blockchain, etc., to ensure the authenticity and effectiveness of traceability.

[0112] When the data is distributed at multiple levels, new dark watermarks can be embedded multiple times. That is, multiple rows are appended to the watermark table, and the dark watermarks embedded at the next level will not affect the dark watermarks already embedded at the previous level.

[0113] Step 3 Watermark Traceability: After data leakage, extract the structure and content of the database tables to be detected from the leaked files. By comparing the CAD database of the suspected leaked data with the clear watermark list U, the CAD database is extracted and stored in table T; obtain the clear watermark list U stored by the third party. For the source files that have not been attacked, the hash of each row record in table T can be immediately found in table U to complete the traceability; for the source files that have been attacked, the attack methods include modifying records, deleting records, inserting records, or a mixed attack of 2 or 3 combinations. It is difficult to accurately locate and modify all the randomly embedded 10% - 30% dark watermarks. If a hash match is found, the traceability can be completed. If no hash match is found, compare each piece of data R(i) in T with the data content (table name, primary key) in the clear watermark list U. If a match is found, the traceability can also be completed. The same method can be used to find the watermarks embedded during multi-level distribution by users, that is, different users have different watermarks, and there are also watermarks during different hierarchical distributions of the same user, making the traceability more thorough.

[0114] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium. The above computer-readable storage medium includes a stored program, wherein the above program is used to execute any one of the above methods.

[0115] According to still another aspect of the embodiments of the present invention, there is also provided a processor. The above processor is used to run a program, wherein the above program, when running, executes any one of the above methods.

[0116] According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including one or more processors, a memory, and one or more programs. The above one or more programs are stored in the above memory and are configured to be executed by the above one or more processors. The above one or more programs include those for executing any one of the above methods.

[0117] The embodiments of the present invention provide a computer-readable storage medium, on which a program is stored. When the program is executed by a processor, it implements the method for embedding the watermark of the above CAD data or executes the method for tracing the watermark of the above CAD data.

[0118] The embodiments of the present invention provide a processor. The above processor is used to run a program, wherein the above program, when running, executes the method for embedding the watermark of the above CAD data or executes the method for tracing the watermark of the above CAD data.

[0119] The embodiments of the present invention provide a device. The device includes a processor, a memory, and a program stored on the memory and executable on the processor. When the processor executes the program, it implements at least the following steps:

[0120] Step S101, obtain the data types of the target tables in the initial CAD database, where the data types include numerical types and non-numerical types;

[0121] Step S102, generate a hidden watermark according to the above data types;

[0122] Step S103, randomly insert the above hidden watermark into the above target table,

[0123] Or when the program is executed, at least the following steps are implemented:

[0124] Step S201, in the case of CAD data leakage, obtain the CAD database of the leaked CAD data, where the CAD database includes a predetermined hidden watermark, and the predetermined hidden watermark is embedded in the CAD database by using any one of the above methods;

[0125] Step S202, obtain a clear watermark list, where the clear watermark list includes multiple clear watermarks, and the clear watermarks include at least one of the primary key of the target table and predetermined data, the hash value corresponding to the hidden watermark, the user signature, and the embedding time. Wherein, the predetermined data is the data in the predetermined cells, and the predetermined cells are at least one cell in each row or each column of the hidden watermark. The user signature is the signature information of the user who performs a predetermined operation on the data in the CAD database, and the predetermined operations include access, download, and editing. The target table is the table in the CAD database into which the above hidden watermark is inserted;

[0126] Step S203, determine the leaking person according to the above CAD database and the clear watermark list.

[0127] The devices in this article can be servers, PCs, PADs, mobile phones, etc.

[0128] This application also provides a computer program product, which when executed on a data processing device, is adapted to execute a program initialized with at least the following method steps:

[0129] Step S101, obtain the data types of the target tables in the initial CAD database, where the data types include numerical types and non-numerical types;

[0130] Step S102, generate a hidden watermark according to the above data types;

[0131] Step S103, randomly insert the above hidden watermark into the above target table,

[0132] Or is adapted to execute a program initialized with at least the following method steps:

[0133] Step S201, in the case of CAD data leakage, obtain the CAD database of the leaked CAD data, where the CAD database includes a predetermined watermark, and the predetermined watermark is embedded in the CAD database by using any of the above methods;

[0134] Step S202, obtain a clear watermark list, where the clear watermark list includes multiple clear watermarks, and the clear watermarks include at least one of the primary key of the target table and predetermined data, the hash value corresponding to the watermark, the user signature, and the embedding time. Among them, the predetermined data is the data in a predetermined cell, and the predetermined cell is at least one cell in each row or column of the watermark. The user signature is the signature information of the user who performs a predetermined operation on the data in the CAD database, and the predetermined operation includes access, download, and editing. The target table is the table of the CAD database into which the watermark is inserted;

[0135] Step S203, determine the leaking person according to the CAD database and the clear watermark list. According to another typical embodiment of the present application, an electronic device is further provided, including one or more processors, a memory, and one or more programs. Among them, the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include those for executing any of the above methods.

[0136] The above electronic device includes one or more processors, a memory, and one or more programs. Among them, the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include those for executing any of the above methods.

[0137] In the above embodiments of the present invention, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0138] In several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the above unit division can be a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of units or modules can be in an electrical or other form.

[0139] The units described above as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0140] In addition, each functional unit in various embodiments of the present invention may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0141] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the above methods in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), mobile hard disks, magnetic disks, or optical discs that can store program codes.

[0142] From the above description, it can be seen that the above embodiments of this application achieve the following technical effects:

[0143] 1). In the method for embedding a watermark in CAD data described above in this application, first, the data types of the target tables in the initial CAD database are obtained, and the above data types include numerical types and non-numerical types; then, according to the above data types, a hidden watermark is generated; finally, the above hidden watermark is randomly inserted into the above target tables. Compared with the problem of weak anti-interference ability of watermark protection for CAD data in the prior art, in the method for embedding a watermark in CAD data described above in this application, the above hidden watermark is generated according to the data types of the target tables in the above CAD database and randomly inserted into the above target tables, ensuring strong anti-interference of the hidden watermark and facilitating subsequent traceability.

[0144] 2) In the method for tracing the watermark of the CAD data in the present application, first, obtain the CAD database of the leaked CAD data. The CAD database includes a predetermined hidden watermark, and the predetermined hidden watermark is embedded in the CAD database by using any of the above methods. Then, obtain the clear watermark list. The clear watermark list includes multiple clear watermarks, and the clear watermarks include at least one of the primary key of the target table and the predetermined data, the hash value corresponding to the hidden watermark, the user signature, and the embedding time. Among them, the predetermined data is the data in at least one cell of each row or each column in the hidden watermark, the user signature is the signature information of the user who performs a predetermined operation on the data in the CAD database, and the target table is the table in the CAD database into which the hidden watermark is inserted. Finally, determine the leaking person according to the CAD database and the clear watermark list. Compared with the problem that the anti-interference ability of the watermark protection of CAD data in the prior art is not strong, in the method for tracing the watermark of the CAD data in the present application, the hidden watermark in the CAD database corresponding to the leakage is generated according to the data type of the target table and randomly inserted into the target table, which makes the anti-interference ability of the hidden watermark strong. In this way, according to the CAD database and the clear watermark list, the leaking person is determined, ensuring that the leaking person of the CAD data can be determined simply and reliably, and the tracing power is relatively strong.

[0145] 3) In the watermark embedding device for the CAD data in the present application, the data type of the target table in the initial CAD database is obtained through the first obtaining unit, and the data type includes numerical type and non-numerical type. The hidden watermark is generated by the generating unit according to the data type. The hidden watermark is randomly inserted into the target table through the inserting unit. Compared with the problem that the anti-interference ability of the watermark protection of CAD data in the prior art is not strong, in the watermark embedding device for the CAD data in the present application, the hidden watermark is generated according to the data type of the target table in the CAD database and randomly inserted into the target table, ensuring that the anti-interference ability of the hidden watermark is strong and facilitating subsequent tracing.

[0146] 4) In the tracing device for the watermark of the CAD data of the present application, the CAD database of the leaked CAD data is obtained through the second obtaining unit. The CAD database includes a predetermined hidden watermark, and the predetermined hidden watermark is embedded in the CAD database by using any of the above methods; the clear watermark list is obtained through the third obtaining unit. The clear watermark list includes a plurality of clear watermarks, and the clear watermarks include at least one of the primary key of the target table and the predetermined data, the hash value corresponding to the hidden watermark, the user signature, and the embedding time. Wherein, the predetermined data is the data in at least one cell of each row or each column in the hidden watermark, the user signature is the signature information of the user who performs a predetermined operation on the data in the CAD database, and the target table is the table of the CAD database into which the hidden watermark is inserted; the determining unit determines the leaking person according to the CAD database and the clear watermark list. Compared with the problem that the anti-interference ability of the watermark protection of CAD data in the prior art is not strong, in the tracing device for the watermark of the CAD data of the present application, the hidden watermark in the CAD database corresponding to the leakage is generated according to the data type of the target table and randomly inserted into the target table, which makes the anti-interference ability of the hidden watermark strong. In this way, according to the CAD database and the clear watermark list, the leaking person is determined, ensuring that the leaking person of the CAD data can be determined simply and reliably, and the tracing power is relatively strong.

[0147] The foregoing are only the preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.

Claims

1. A method for embedding a watermark in CAD data, characterized in that, Including: Obtain the data types of the target table in the initial CAD database, where the data types include numerical types and non-numerical types; Generate a watermark according to the data types; Randomly insert the watermark into the target table; Randomly inserting the watermark into the target table includes: Generate a visible watermark corresponding to the watermark, where the visible watermark includes at least one of the primary key of the target table and predetermined data, the hash value corresponding to the watermark, the user signature, and the embedding time, where the predetermined data is the data in a predetermined cell, and the predetermined cell is at least one cell in each row or each column of the watermark; Determine the insertion position of the watermark, where the insertion position is a predetermined row or a predetermined column of the target table; Insert the watermark into the insertion position to obtain the CAD database; Store the visible watermark in a trusted third party.

2. The method according to claim 1, wherein Obtain the data types of the target table in the initial CAD database, including: Parse the initial CAD database to obtain multiple tables; Determine at least one of the target tables from each of the tables using a random algorithm; Obtain the data types of each cell in a predetermined row or a predetermined column of the target table.

3. The method according to claim 2, wherein The watermark includes simulation data of at least one row or at least one column. Generating the watermark according to the data types includes: When the data type of the cell is the numerical type, generate simulation sub-data of the cell using a pseudo-random number algorithm; When the data type of the cell is the non-numerical type, randomly extract non-numerical data from the data dictionary of the initial CAD database to form the simulation sub-data; Each of the simulation sub-data constitutes the simulation data of one row or one column.

4. The method according to claim 3, characterized in that When the data type of the cell is the numerical type, generating the simulation data of the cell using a pseudo-random number algorithm includes: When the data type of the cell is the numerical type, obtain the data length, digital format, and numerical range of the data in the cell; Generate the simulation data with the same data length, digital format, and numerical range using a pseudo-random number algorithm.

5. The method according to claim 1, characterized in that, The user signature is the signature information of the user who performs a predetermined operation on the data in the initial CAD database, and the predetermined operation includes access, download, and editing.

6. The method according to claim 5, characterized in that, Determine the insertion position of the watermark, including: Determine the insertion position according to the function hash = Hash(k, r, p) mod (c + c1), where k is the hash password, r is the watermark, p is the primary key, c is the total number of rows or the total number of columns of the target table, and c1 is the total number of rows or the total number of columns of the watermark.

7. The method according to any one of claims 1 to 6, characterized in that, Randomly inserting the watermark into the target table includes: Obtain a predetermined embedding ratio, where the predetermined embedding ratio is the ratio of the data volume of the watermark to the data volume of the target table; Randomly insert the watermark into the target table according to the predetermined embedding ratio.

8. A method for tracing a watermark of CAD data, characterized in that, Including: In the case of leakage of CAD data, obtain the CAD database that has leaked the CAD data. The CAD database includes a predetermined hidden watermark, and the predetermined hidden watermark is embedded in the CAD database by using the method described in any one of claims 1 to 7; Obtain a list of visible watermarks. The list of visible watermarks includes a plurality of visible watermarks. The visible watermarks include at least one of the primary key of the target table and predetermined data, the hash value corresponding to the hidden watermark, the user signature, and the embedding time. The predetermined data is the data in a predetermined cell, and the predetermined cell is at least one cell in each row or each column of the hidden watermark. The user signature is the signature information of the user who performs a predetermined operation on the data in the CAD database. The predetermined operation includes access, download, and editing. The target table is the table of the CAD database in which the hidden watermark is inserted; Determine the person who caused the leakage based on the CAD database and the list of visible watermarks.

9. The method according to claim 8, wherein Determining the person who caused the leakage based on the CAD database and the list of visible watermarks includes: Based on the CAD database and the list of visible watermarks, determine a predetermined visible watermark. The predetermined visible watermark is the visible watermark in the list of visible watermarks that corresponds to the predetermined hidden watermark; Determine that the user corresponding to the user signature in the predetermined visible watermark is the person who caused the leakage.

10. The method according to claim 8, wherein Based on the CAD database and the list of visible watermarks, determining a predetermined visible watermark includes: Determine whether there is data corresponding to the target hash value in the CAD database. If there is data corresponding to the target hash value in the CAD database, determine that the visible watermark corresponding to the target hash value is the predetermined visible watermark. The target hash value is one of the hash values; If there is no data corresponding to the target hash value in the CAD database, search the CAD database for data that is the same as the target primary key and / or target data, and determine that the visible watermark corresponding to the target primary key and / or target data is the predetermined visible watermark. Each primary key includes the target primary key, and each predetermined data includes the target data.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, where the program executes the method described in any one of claims 1 to 7 or executes the method described in any one of claims 8 to 10.

12. A processor, characterized in that, The processor is used to run a program, where when the program runs, it executes the method described in any one of claims 1 to 7 or executes the method described in any one of claims 8 to 10.

13. An electronic device, characterized in that, Comprising: One or more processors, a memory, and one or more programs, where the one or more programs are stored in the memory and are configured to be executed by the one or more processors. The one or more programs include a method for executing any one of claims 1 to 7 or a method for executing any one of claims 8 to 10.

Citation Information

Patent Citations

  • Watermark adding and verifying method and device for database

    CN112597456A

  • Reversible database watermarking method and system

    CN113626774A