Tamper-proof digital watermark generation method

The tamper-proof digital watermark generation method addresses vulnerabilities in traditional watermarking by using random character generation, obfuscation, and verification processes to ensure the integrity and security of digital content.

CN119150261APending Publication Date: 2024-12-17UNICLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411033731.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

Traditional digital watermarking methods are vulnerable to deletion and tampering, especially in front-end applications, compromising the traceability and security of digital content.

Method used

A method for generating a tamper-proof digital watermark involving random character generation, obfuscation, embedding, and verification processes, including the use of identification tags and hash calculations to ensure integrity, with obfuscation techniques to scatter fragments across the code.

Benefits of technology

The method ensures the digital content's traceability and tamper-proof nature, enhancing security and making it resistant to conventional attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119150261A_ABST
    Figure CN119150261A_ABST
Patent Text Reader

Abstract

The invention provides a tamper-proof digital watermark generation method, which comprises the following steps of: generating a digital watermark which consists of random characters, numbers and graphs; carrying out confusion processing on the digital watermark, and embedding the processed digital watermark into a webpage; in the loading process of the webpage embedded with the digital watermark, detecting whether the digital watermark still exists in the webpage or not, and verifying whether the content of the digital watermark is not tampered or not; when the detection result and the verification result are both yes, normally opening the webpage; otherwise, the error information is sent to the worker. The digital watermark generation method has the advantages that compared with a traditional digital watermark generation method, the digital watermark generation method provided by the invention has the advantages of no deletion, tampering prevention and the like, the copyright and the safety of digital contents can be effectively protected, and a more reliable guarantee is provided for propagation and application of the digital contents.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computer technology, and in particular relates to a tamper-proof digital watermark generation method. Background Art

[0002] Digital watermarking is a technology that embeds digital information into a carrier. It is often used to protect the copyright of digital content and prevent tampering. However, traditional digital watermark generation methods often have the risk of being deleted or tampered with. Especially in front-end applications, digital watermarks are easily deleted or modified by attackers. Therefore, the present invention provides a method for generating an indelible digital watermark in front-end applications to ensure the traceability and tamper-proofness of digital content. Summary of the invention

[0003] In view of this, the present invention aims to provide a tamper-proof digital watermark generation method, in order to solve at least one of the above-mentioned technical problems.

[0004] To achieve the above object, the technical solution of the present invention is achieved as follows:

[0005] A method for generating a tamper-proof digital watermark comprises the following steps:

[0006] Generate a digital watermark, the watermark consisting of random characters, numbers, and graphics;

[0007] Obfuscating the digital watermark and embedding the processed digital watermark into the web page;

[0008] During the loading process of a web page embedded with a digital watermark, detecting whether the digital watermark still exists in the web page and verifying whether the content of the digital watermark has not been tampered with;

[0009] When both the test result and the verification result are yes, the webpage will be opened normally; otherwise, an error message will be sent to the staff.

[0010] Furthermore, the process of generating a digital watermark includes:

[0011] Setting the watermark length and selecting a character set for generating the watermark, wherein the character set includes uppercase letters, lowercase letters, numbers, special characters, and graphic symbols;

[0012] An array with the same length is generated according to the set watermark length, and a value is randomly selected from the character set and filled into the array until the array is completely filled.

[0013] Furthermore, after the digital watermark is generated, an identification tag is added thereto, and the generation process of the identification tag includes:

[0014] Generate identifiers in sequence, record the timestamp of digital watermark generation, record the version number of the current web page, perform hash calculation on the identifier, timestamp, and version number to obtain a corresponding hash value, and use the hash value as an identification tag.

[0015] Furthermore, the process of randomly selecting a value from the character set and filling it into the array includes:

[0016] Use the system's current time as a primary random seed and get several environment variables from the system environment;

[0017] Combine the obtained timestamp and the value of the environment variable into a string, hash the string, convert the generated hash value into an integer and use it as the seed of the random number generator;

[0018] Use a random number generator to generate a random number, and select a corresponding character from the character set based on the random number.

[0019] Furthermore, the process of detecting whether the digital watermark still exists in the web page includes:

[0020] Obtain the HTML content of the specified web page by sending an HTTP request and parsing the returned HTML response, and extract the content that needs to be detected from the HTML obtained by parsing;

[0021] In the extraction process, a string matching algorithm is used to search for the characteristics of the digital watermark, and the watermark is judged whether it still exists according to the search results;

[0022] If the corresponding features are found, it means that the watermark still exists; if not, it can be considered that the watermark has been removed or changed.

[0023] Furthermore, the process of verifying whether the content of the digital watermark has not been tampered with includes:

[0024] When embedding a digital watermark in content, a specific algorithm is used to combine the watermark information with the original content and record the hash value of the original content;

[0025] When verification is required, the current content is extracted and the watermark information is recovered from the extracted content using the same algorithm as when the watermark was embedded;

[0026] Calculate the hash value of the extracted content and compare it with the hash value of the original content saved previously. If the two hash values ​​are consistent, the content has not been tampered with; otherwise, the content has been tampered with.

[0027] Furthermore, the process of performing obfuscation processing on the digital watermark includes:

[0028] Replace the characters of the watermark with other characters or symbols by creating a character map;

[0029] Obfuscate variable names and replace them with meaningless strings;

[0030] Randomize function names and replace them with non-descriptive character combinations;

[0031] The digital watermark is decomposed into multiple fragments and these fragments are scattered to different code locations.

[0032] Compared with the prior art, the tamper-proof digital watermark generation method described in the present invention has the following advantages:

[0033] Beneficial effects:

[0034] The digital content is traceable and tamper-proof. Compared with the traditional digital watermark generation method, the digital watermark of the present invention cannot be deleted or tampered with by conventional means, thereby improving the security and protection effect of the digital content. At the same time, the method for obfuscating digital watermarks provided by the present invention can reduce the attack difficulty of attackers and increase the reliability and complexity of digital watermarks. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:

[0036] Figure 1 The present invention is a flowchart of a method for generating a tamper-proof digital watermark according to an embodiment of the present invention. DETAILED DESCRIPTION

[0037] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0038] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0039] A method for generating a tamper-proof digital watermark comprises the following steps:

[0040] S1. Generate a digital watermark, which consists of random characters, numbers, and graphics;

[0041] S2, performing obfuscation processing on the digital watermark, and embedding the processed digital watermark into the web page;

[0042] S3, during the loading process of the webpage embedded with the digital watermark, detecting whether the digital watermark still exists in the webpage, and verifying whether the content of the digital watermark has not been tampered with;

[0043] S4. When both the test result and the verification result are yes, the webpage is opened normally; otherwise, an error message is sent to the staff.

[0044] The process of generating a digital watermark includes:

[0045] Setting the watermark length and selecting a character set for generating the watermark, wherein the character set includes uppercase letters, lowercase letters, numbers, special characters, and graphic symbols;

[0046] An array with the same length is generated according to the set watermark length, and a value is randomly selected from the character set and filled into the array until the array is completely filled.

[0047] After the digital watermark is generated, an identification tag is added thereto. The generation process of the identification tag includes:

[0048] Generate identifiers in sequence, record the timestamp of digital watermark generation, record the version number of the current web page, perform hash calculation on the identifier, timestamp, and version number to obtain a corresponding hash value, and use the hash value as an identification tag.

[0049] The process of randomly selecting a value from the character set and filling it into the array includes:

[0050] Use the system's current time as a primary random seed and get several environment variables from the system environment;

[0051] Combine the obtained timestamp and the value of the environment variable into a string, hash the string, convert the generated hash value into an integer and use it as the seed of the random number generator;

[0052] Use a random number generator to generate a random number, and select a corresponding character from the character set based on the random number.

[0053] The process of detecting whether the digital watermark still exists in the web page includes:

[0054] Obtain the HTML content of the specified web page by sending an HTTP request and parsing the returned HTML response, and extract the content that needs to be detected from the HTML obtained by parsing;

[0055] In the extraction process, a string matching algorithm is used to search for the characteristics of the digital watermark, and the watermark is judged whether it still exists according to the search results;

[0056] If the corresponding features are found, it means that the watermark still exists; if not, it can be considered that the watermark has been removed or changed.

[0057] The process of verifying whether the content of the digital watermark has not been tampered with includes:

[0058] When embedding a digital watermark in content, a specific algorithm is used to combine the watermark information with the original content and record the hash value of the original content;

[0059] When verification is required, the current content is extracted and the watermark information is recovered from the extracted content using the same algorithm as when the watermark was embedded;

[0060] Calculate the hash value of the extracted content and compare it with the hash value of the original content saved previously. If the two hash values ​​are consistent, the content has not been tampered with; otherwise, the content has been tampered with.

[0061] The process of performing obfuscation processing on the digital watermark includes:

[0062] Replace the characters of the watermark with other characters or symbols by creating a character map;

[0063] Obfuscate variable names and replace them with meaningless strings;

[0064] Randomize function names and replace them with non-descriptive character combinations;

[0065] The digital watermark is decomposed into multiple fragments and these fragments are scattered to different code locations.

[0066] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0067] In the several embodiments provided in the present application, it should be understood that the disclosed methods and systems can be implemented in other ways. For example, the division of the units described above is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The above-mentioned units may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.

[0068] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.

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

Claims

1. A method for generating tamper-proof digital watermarks, It is characterized in that The steps include: Generate a digital watermark, the watermark consisting of random characters, numbers, and graphics; Obfuscating the digital watermark and embedding the processed digital watermark into the web page; During the loading process of a web page embedded with a digital watermark, detecting whether the digital watermark still exists in the web page and verifying whether the content of the digital watermark has not been tampered with; When both the test result and the verification result are yes, the webpage will be opened normally; otherwise, an error message will be sent to the staff.

2. A tamper-proof digital watermark generation method according to claim 1, It is characterized in that The process of generating a digital watermark includes: Setting the watermark length and selecting a character set for generating the watermark, wherein the character set includes uppercase letters, lowercase letters, numbers, special characters, and graphic symbols; An array with the same length is generated according to the set watermark length, and a value is randomly selected from the character set and filled into the array until the array is completely filled.

3. A tamper-proof digital watermark generation method according to claim 1, It is characterized in that After the digital watermark is generated, an identification tag is added thereto. The generation process of the identification tag includes: Generate identifiers in sequence, record the timestamp of digital watermark generation, record the version number of the current web page, perform hash calculation on the identifier, timestamp, and version number to obtain a corresponding hash value, and use the hash value as an identification tag.

4. A tamper-proof digital watermark generation method according to claim 2, It is characterized in that The process of randomly selecting a value from the character set and filling it into the array includes: Use the system's current time as a primary random seed and get several environment variables from the system environment; Combine the obtained timestamp and the value of the environment variable into a string, hash the string, convert the generated hash value into an integer and use it as the seed of the random number generator; Use a random number generator to generate a random number, and select a corresponding character from the character set based on the random number.

5. The method for generating a tamper-proof digital watermark according to claim 1, It is characterized in that The process of detecting whether the digital watermark still exists in the web page includes: Obtain the HTML content of the specified web page by sending an HTTP request and parsing the returned HTML response, and extract the content that needs to be detected from the HTML obtained by parsing; In the extraction process, a string matching algorithm is used to search for the characteristics of the digital watermark, and the watermark is judged whether it still exists according to the search results; If the corresponding features are found, it means that the watermark still exists; if not, it can be considered that the watermark has been removed or changed.

6. A tamper-proof digital watermark generation method according to claim 1, It is characterized in that The process of verifying whether the content of the digital watermark has not been tampered with includes: When embedding a digital watermark in content, a specific algorithm is used to combine the watermark information with the original content and record the hash value of the original content; When verification is required, the current content is extracted and the watermark information is recovered from the extracted content using the same algorithm as when the watermark was embedded; Calculate the hash value of the extracted content and compare it with the hash value of the original content saved previously. If the two hash values ​​are consistent, the content has not been tampered with; otherwise, the content has been tampered with.

7. A tamper-proof digital watermark generation method according to claim 1, It is characterized in that The process of performing obfuscation processing on the digital watermark includes: Replace the characters of the watermark with other characters or symbols by creating a character map; Obfuscate variable names and replace them with meaningless strings; Randomize function names and replace them with non-descriptive character combinations; The digital watermark is decomposed into multiple fragments and these fragments are scattered to different code locations.