Image document protection method and system based on watermark and encryption hybrid protection

By analyzing the pixel value distribution and watermark position of the picture document, evaluating the concealment of the watermark and selecting the appropriate encryption type to generate the key, the problem of difficulty in protecting the keys in the prior art is solved, and the watermark processing efficiency and security are improved.

CN119323507BActive Publication Date: 2025-03-04SHENZHEN HANTUO TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411874074.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-03-04
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

The existing watermark encryption design does not consider the secrets of different watermarks when filling in the key, which increases the difficulty of protection. It takes longer for the user to enter the wrong password to wait for retry.

Method used

By analyzing the pixel value distribution of the picture document, filtering high noise locations, determining the watermark size and position in combination with the watermark mark pop-up window, calculating the coincidence coefficient, evaluating the concealment of the watermark and selecting the appropriate encryption type to generate the correct key. If the key is incorrect, it will enter the permission evaluation mechanism for resetting.

Benefits of technology

Improve the efficiency of watermark processing verification, reduce the time for users to wait due to key errors, and enhance the permission protection and security of pictures and documents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119323507B_ABST
    Figure CN119323507B_ABST
Patent Text Reader

Abstract

The present invention discloses a hybrid protection method and system for image documents based on watermark and encryption, relates to the technical field of encryption design, and is used to improve the problem of low efficiency of user authority verification caused by different watermark confidentiality of unified image documents under the same encryption system, including screening high-noise positions of image documents, determining the overlap between watermark and high-noise positions, obtaining the watermark size of image documents, analyzing the watermark confidentiality based on the watermark size and position overlap and setting different encryption types, generating a correct key according to the encryption type, and when the encryption type is multiple keys, entering the authority evaluation mechanism if the first key input is incorrect, counting the number of user watermark mark pop-up window processing times for contribution evaluation, detecting the frequency of user decryption of linked image document watermarks, using a logistic regression algorithm based on the user contribution evaluation results and the frequency of linked image document watermark decryption to reset the encryption type and select the correct key, and filling in and resetting according to the correct key.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of encryption design, and more specifically, to a method and system for hybrid protection of image documents based on watermark and encryption. Background Art

[0002] Encryption design technology is a series of methods and technologies used to ensure data security and confidentiality. These technologies protect information through encryption algorithms and protocols to prevent unauthorized access and data leakage. The application of encryption design technology to image and document watermark data processing can effectively prevent watermark information leakage.

[0003] The prior art has the following deficiencies:

[0004] In previous watermark encryption designs, watermarks of unified image documents were mostly encrypted by designing complex algorithms. When filling in the key, the protection difficulty caused by the confidentiality of different watermarks in the unified image document was not taken into consideration. Instead, the number of key filling times was time-blocked by a preset threshold, resulting in users having to wait more time to re-enter the password if they entered the wrong password, which was time-consuming and laborious. Summary of the invention

[0005] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a hybrid protection method for graphic documents based on watermark and encryption, which analyzes the confidentiality of the watermark of the graphic document through interaction with the user terminal, selects different key levels to generate the correct key, and sets a processing method for inputting incorrect keys through an authority evaluation mechanism to solve the problems raised in the above-mentioned background technology.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] The image document is protected based on a watermark and encryption hybrid protection method, including the following steps:

[0008] Step S1: Acquire the image document, analyze the pixel value distribution of the image document, filter out the high noise position of the image document according to the pixel value distribution, pop up a watermark mark pop-up window to the user end, and determine the watermark size and watermark position according to the watermark mark pop-up window;

[0009] Step S2: Compare the overlap between the watermark position and the high noise position to calculate the overlap coefficient, comprehensively evaluate the watermark concealment by combining the overlap coefficient and the watermark size, and set the encryption type to single key, dual key or multi-key according to the watermark concealment score;

[0010] Step S3: Select a key of the corresponding level as the correct key of the digital key lock according to the encryption type, and send it to the authorized user end. When the encryption type is not a single key, after the first digital key lock is filled with the key, determine whether the key is correct. If the key is wrong, enter the authority evaluation mechanism;

[0011] Step S4: In the authority evaluation mechanism, count the number of times the user processes the watermark pop-up window, evaluate the user's contribution based on the number of times the user processes the watermark pop-up window, detect the user's frequency of decrypting the linked graph document watermark, reset the encryption type and select the correct key based on the user's contribution evaluation results and the frequency of decrypting the linked graph document watermark, and fill in and reset according to the correct key.

[0012] In a preferred embodiment, in step S1, the acquired graphic document is divided into multiple parts according to a preset division ratio, the graphic document is imported into an image processing library for processing, the number of pixels and pixel values ​​of each part of the graphic document are obtained, and the pixel average value and pixel value variance of the corresponding part of the graphic document are calculated based on the number of pixels and pixel values ​​of each part of the graphic document.

[0013] In a preferred embodiment, in step S1, a noise segmentation threshold of the image document is set using a recursive segmentation method according to the pixel value variance of each part of the image document. The specific steps are as follows:

[0014] Sort the pixel value variances of each part of the image document from small to large, set the basic segmentation coefficient and the upper limit segmentation coefficient, use the basic segmentation coefficient to divide the sequence into two parts, calculate the average value of the pixel value variance of the two parts, and select the part with the larger average value as the secondary sorting sequence;

[0015] Reducing the denominator of the basic division fraction by a predetermined reduction factor so that the basic division factor increases;

[0016] The secondary sorting sequence is segmented according to the basic segmentation score, the average variance of the pixel values ​​in the two parts is calculated, and the part with the smaller average value is selected as the tertiary sorting sequence. The operation is repeated until the basic segmentation coefficient reaches the upper limit segmentation coefficient or only one value remains in the sequence;

[0017] If there is only one value left in the sequence, it is used as the noise segmentation threshold. If the basic segmentation coefficient reaches the upper limit segmentation coefficient, the median of the value in the sequence is selected as the noise segmentation threshold.

[0018] The image document portion whose pixel value variance exceeds the noise segmentation threshold is marked as a high-noise portion; the image document portion whose pixel value variance is lower than the noise segmentation threshold is marked as a low-noise portion.

[0019] In a preferred embodiment, in step S1, after marking each part of the graphic document, a watermark pop-up window is popped up to the user terminal.

[0020] In a preferred embodiment, in step S2, the watermark position is compared with the high noise position to determine their overlap;

[0021] If the watermark position is completely within the high noise position, the coincidence coefficient is set to 1;

[0022] If the watermark position is completely outside the high noise position, the coincidence coefficient is set to 0;

[0023] If the watermark position is partially located at a high noise position, the ratio of the watermark area at the high noise position to the watermark size is used as the coincidence coefficient, and the coincidence coefficient is between 0 and 1;

[0024] After obtaining the overlap coefficient, multiple historical watermark sizes stored in the historical database are accessed, and the average value of the historical watermark sizes is calculated as the watermark size threshold;

[0025] If the watermark size obtained by the user exceeds the watermark size threshold, the size coefficient is set to 0;

[0026] If the watermark size obtained by the client is lower than the watermark size threshold, the size factor is set to 1.

[0027] In a preferred embodiment, in step S2, the watermark concealment is scored by combining the overlap coefficient and the size coefficient, and the encryption type is set according to the watermark concealment score. The specific steps are as follows:

[0028] The product of the overlap coefficient and the size coefficient is used as the watermark concealment score;

[0029] Rule 1: When the watermark concealment score is 1, the watermark concealment is judged to be high concealment;

[0030] Rule 2: When the watermark concealment score is between 0 and 1, the watermark concealment is judged to be medium concealment;

[0031] Rule 3: When the watermark concealment score is 0, the watermark concealment is judged to be low concealment;

[0032] When the watermark concealment is judged to be low concealment, the encryption type is set to single-key encryption type;

[0033] When the watermark concealment is judged to be medium concealment, the encryption type is set to double-key encryption type;

[0034] When the watermark concealment is judged to be highly concealed, the encryption type is set to a multi-key encryption type.

[0035] In a preferred embodiment, in step S3, the correct key is obtained by randomly combining letters and numbers with a preset number of characters and stored in advance in the key management system, and keys with different character lengths are obtained by setting different preset numbers of characters;

[0036] According to the encryption type, select the corresponding type of key in the key management system as the correct key for the digital key lock;

[0037] When the user inputs the key into the digital key lock, the system will compare the key input by the user with the correct key sent to the user account. When all the letters and numbers in the sequence are the same, the key is judged to be correct and the user can perform watermark processing on the image document.

[0038] When there are letters and numbers that are not the same in the bit sequence, the key is judged to be wrong, and the key is reset and recalculated to send the correct key to the information receiving location preset by the user;

[0039] When the encryption type is dual key or multi-key, when the user needs to perform watermark processing, the system will judge the user account. When it is determined that the user account is an authorized account, the first correct key will be sent to the user account;

[0040] When the user enters the key into the digital key lock, if the key is judged to be correct, the second key will be sent to the user account; if the key is judged to be incorrect, the permission evaluation mechanism will be entered.

[0041] In a preferred embodiment, in step S4, the authority evaluation mechanism selects a past period of time as the statistical time, and counts the number of watermark pop-up window processing times of the current user within the statistical time;

[0042] The contribution index is calculated based on the number of times the user's watermark pop-up window is processed using the logarithmic normalization method to evaluate the user's contribution area.

[0043] Detect the frequency of users decrypting the linked graph document watermark within the statistical time, and use the user's contribution index and the frequency of decryption of the linked graph document watermark as input parameters to calculate the key strength coefficient using the logistic regression algorithm: , where M is the key strength coefficient, e is the natural base, z is the logistic regression parameter and z is the sum of the two input parameters of the user's contribution index and the decryption frequency of the linked graph document watermark;

[0044] Comparing the key strength coefficient with a preset first key strength threshold and a second key strength threshold to set the encryption type, wherein the first key strength threshold is lower than the second key strength threshold;

[0045] When the key strength coefficient is lower than the first key strength threshold, the encryption type is set to a multi-key encryption type;

[0046] When the key strength coefficient is between the first key strength threshold and the second key strength threshold, the encryption type is set to a dual-key encryption type;

[0047] When the key strength coefficient exceeds the second key strength threshold, the encryption type is set to a single-key encryption type.

[0048] A hybrid protection system for image documents based on watermarks and encryption is used to implement the above-mentioned hybrid protection method for image documents based on watermarks and encryption, including a pixel detection module, a secret scoring module, a permission evaluation module, and a key reset module;

[0049] The pixel detection module is used to analyze the pixel value distribution of the image document, filter out the high noise position of the image document, and determine the watermark size and watermark position input by the user;

[0050] The confidentiality scoring module is used to score the confidentiality of the watermark of the image document, set the encryption type of the key according to the confidentiality score of the watermark, and generate the correct key;

[0051] The permission evaluation module is used to send the correct key to the user account and check whether the key is correct. If the key is wrong, the permission evaluation mechanism will be used to evaluate the user's contribution.

[0052] The key reset module is used to reset the encryption type of the key according to the user's contribution and generate the correct key, and reset the key entry.

[0053] The technical effects and advantages of the watermark and encryption hybrid protection method and system of the image document of the present invention are as follows:

[0054] The present invention screens out high-noise positions in image documents by analyzing the pixel value distribution of image documents, determines the analysis direction and provides a data basis for subsequent analysis of watermark concealment, pops up a watermark mark pop-up window to the user end, determines the watermark size and watermark position according to the watermark mark pop-up window, compares the watermark position with the high-noise position, calculates their overlap, analyzes the watermark concealment based on the watermark size and position overlap, sets the encryption type based on the watermark concealment, generates a correct key based on the encryption type, and improves the watermark processing and verification efficiency by matching the encryption type with the watermark concealment. When the encryption type is multi-key, if the first key input is incorrect, the permission evaluation mechanism is entered, the number of user watermark mark pop-up window processing times is counted for contribution evaluation, the user's decryption frequency of linked image document watermarks is detected, the encryption type is reset based on the user contribution evaluation results and the decryption frequency of linked image document watermarks, and the correct key is selected, and the key is filled in and reset according to the correct key. In addition to providing convenience for timely processing of image documents, the permission protection security of image documents is also improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 It is a schematic diagram of the hybrid protection method of image documents based on watermark and encryption of the present invention.

[0056] Figure 2 This is a flow chart of the watermark and encryption hybrid protection system for graphic documents of the present invention. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0058] The present invention analyzes the pixel value distribution of the image document, screens out the high-noise position of the image document, pops up a watermark mark pop-up window to the user end, determines the watermark size and watermark position according to the watermark mark pop-up window, compares the watermark position with the high-noise position, calculates their overlap, analyzes the watermark concealment based on the watermark size and position overlap, sets the encryption type according to the watermark concealment, generates the correct key according to the encryption type, and when the encryption type is multiple keys, enters the permission evaluation mechanism if the first key input is incorrect, counts the number of times the user watermark mark pop-up window is processed to perform contribution evaluation, detects the user's decryption frequency of the linked image document watermark, resets the encryption type based on the user's contribution evaluation results and the decryption frequency of the linked image document watermark, selects the correct key, and fills in and resets according to the correct key, which not only provides convenience for timely processing of image documents, but also improves the security of image document permission protection.

[0059] Embodiment 1, the image document is protected by a mixed watermark and encryption method, such as Figure 1 As shown, the following steps are included:

[0060] Step S1: Acquire the image document, analyze the pixel value distribution of the image document, filter out the high noise position of the image document according to the pixel value distribution, pop up a watermark mark pop-up window to the user end, and determine the watermark size and watermark position according to the watermark mark pop-up window;

[0061] Step S2: Compare the overlap between the watermark position and the high noise position to calculate the overlap coefficient, comprehensively evaluate the watermark concealment by combining the overlap coefficient and the watermark size, and set the encryption type to single key, dual key or multi-key according to the watermark concealment score;

[0062] Step S3: Select a key of the corresponding level as the correct key of the digital key lock according to the encryption type, and send it to the authorized user end. When the encryption type is not a single key, after the first digital key lock is filled with the key, determine whether the key is correct. If the key is wrong, enter the authority evaluation mechanism;

[0063] Step S4: In the authority evaluation mechanism, count the number of times the user processes the watermark pop-up window, evaluate the user's contribution based on the number of times the user processes the watermark pop-up window, detect the user's frequency of decrypting the linked graph document watermark, reset the encryption type and select the correct key based on the user's contribution evaluation results and the frequency of decrypting the linked graph document watermark, and fill in and reset according to the correct key.

[0064] The specific implementation is as follows:

[0065] In step S1, the acquired image document is divided into multiple parts according to a preset division ratio, the image document is imported into an image processing library for processing, the number of pixels and pixel values ​​of each part of the image document are obtained, and the pixel average value and pixel value variance of the corresponding part of the image document are calculated according to the number of pixels and pixel values ​​of each part of the image document;

[0066] Determine the noise level of the image document for each part according to the variance of the pixel values ​​of each part of the image document. The larger the variance of the pixel values ​​in each part of the image document, the higher the noise level of the corresponding part.

[0067] According to the variance of pixel values ​​of each part of the image document, the noise segmentation threshold of the image document is set using the recursive segmentation method. The specific steps are as follows:

[0068] Sort the pixel value variances of each part of the image document from small to large, set the basic segmentation coefficient and the upper limit segmentation coefficient, use the basic segmentation coefficient to divide the sequence into two parts, calculate the average value of the pixel value variances of the two parts, and select the part with the larger average value as the secondary sorting sequence; reduce the denominator of the basic segmentation fraction by the preset reduction coefficient to increase the basic segmentation coefficient, divide the secondary sorting sequence according to the basic segmentation fraction, calculate the average value of the pixel value variances of the two parts, and select the part with the smaller average value as the tertiary sorting sequence, and repeat the operation until the basic segmentation coefficient reaches the upper limit segmentation coefficient or only one value is left in the sequence;

[0069] If there is only one value left in the sequence, it is used as the noise segmentation threshold. If the basic segmentation coefficient reaches the upper limit segmentation coefficient, the median of the value in the sequence is selected as the noise segmentation threshold.

[0070] For example, divide the image document into 12 parts, calculate and obtain the variance of 12 pixel values, set the basic division coefficient to 1 / 6, the upper limit division coefficient to 1 / 2, divide the series update value sequence into two parts according to 1 / 6, calculate the average value of the two parts, filter out the sequence with a small average value, set the reduction coefficient to 4, then the basic division coefficient is changed to 1 / 2, that is, the basic division coefficient reaches the upper limit division coefficient 1 / 2, and select the median value in the filtered sequence as the noise segmentation threshold.

[0071] The image document portion whose pixel value variance exceeds the noise segmentation threshold is marked as a high-noise portion; the image document portion whose pixel value variance is lower than the noise segmentation threshold is marked as a low-noise portion.

[0072] After marking each part of the graphic document, a watermark pop-up window will pop up to the user. The watermark pop-up window is used to interact with the user and provides a line drawing function. The user is required to circle the watermark range for the watermark to be processed, and the watermark size and watermark position in the graphic document provided by the user are obtained according to the watermark pop-up window.

[0073] It should be noted that the image processing library is a set of programming tools for processing and analyzing images. The image processing library can be used to segment the image document and calculate the pixel values ​​and variances of different parts. The watermark pop-up window is a user interaction pop-up window used to interact with the user or provide information. In this example, the user is required to circle the watermark size and watermark position in the sample pattern of the image document. In the step of setting the noise segmentation threshold, the basic segmentation coefficient, the upper limit segmentation coefficient and the reduction coefficient are not unique and can be set according to the actual situation. They are not analyzed here.

[0074] In step S2, the watermark size is obtained from the user end according to the watermark mark pop-up window. The watermark size is the watermark area. The watermark position is compared with the high noise position to determine their overlap. If the watermark position is completely in the high noise position, the overlap coefficient is set to 1; if the watermark position is completely outside the high noise position, the overlap coefficient is set to 0; if the watermark position is partially in the high noise position, the ratio of the watermark area in the high noise position to the watermark size is used as the overlap coefficient, and the overlap coefficient is between 0 and 1.

[0075] It should be explained that if the watermark position is located in two parts of the image document and both parts of the image document are high-noise positions, it is determined that the watermark position is completely located in the high-noise position.

[0076] After obtaining the overlap coefficient, access multiple historical watermark sizes stored in the historical database and calculate the average of the historical watermark sizes as the watermark size threshold. If the watermark size obtained by the user end exceeds the watermark size threshold, set the size coefficient to 0; if the watermark size obtained by the user end is lower than the watermark size threshold, set the size coefficient to 1.

[0077] The watermark concealment is scored based on the combined overlap coefficient and size coefficient. The encryption type is set based on the watermark concealment score. The specific steps are as follows:

[0078] The product of the overlap coefficient and the size coefficient is used as the watermark concealment score;

[0079] Rule 1: When the watermark concealment score is 1, the watermark concealment is judged to be high concealment;

[0080] Rule 2: When the watermark concealment score is between 0 and 1, the watermark concealment is judged to be medium concealment;

[0081] Rule 3: When the watermark concealment score is 0, the watermark concealment is judged to be low concealment.

[0082] When the watermark concealment is judged to be low concealment, the encryption type is set to single-key encryption type;

[0083] When the watermark concealment is judged to be medium concealment, the encryption type is set to double-key encryption type;

[0084] When the watermark concealment is judged to be highly concealed, the encryption type is set to a multi-key encryption type.

[0085] It should be noted that the smaller the size coefficient, the smaller the watermark size, the higher the watermark confidentiality, and the more likely unauthorized users are to call it, thereby increasing the probability of decryption events. The larger the coincidence coefficient, the closer the watermark position is to the high noise position, and the less likely it is to be detected. The higher the watermark confidentiality, the more deep encryption is needed to protect the watermark information.

[0086] In step S3, the correct key is obtained by randomly combining letters and numbers with a preset number of characters and stored in advance in the key management system. Different types of keys are obtained by setting different preset numbers of characters. For example, the preset number of characters is set to 6 and 8. When the encryption type is single key, the letters and numbers are randomly combined into a key of less than 6 digits as the correct key; when the encryption type is double key, the letters and numbers are randomly combined into a key between 6 and 8 digits as the correct key; when the encryption type is multi-key, the letters and numbers are randomly combined into a key of more than 8 digits as the correct key;

[0087] According to the encryption type, select the corresponding type of key in the key management system as the correct key for the digital key lock;

[0088] When the encryption type is single-key encryption type, when the user needs to perform watermark processing, the system will send the set correct key to the authorized administrator account, and at the same time compare the user account with the authorized account administrator list in the key management system to determine whether the user account has the authority. If the user account is stored in the authorized account administrator list, the user account is determined to be an authorized account and the correct key is sent to the user account;

[0089] When the user inputs the key into the digital key lock, the system will compare the key input by the user with the correct key sent to the user account. When all the letters and numbers in the sequence are the same, the key is judged to be correct and the user can perform watermark processing on the image document.

[0090] When there are letters and numbers that are different in the sequence, the key is judged to be wrong, and it is reset and recalculated, and the correct key is sent to the administrator account.

[0091] When the encryption type is dual key or multi-key, when the user needs to perform watermark processing, the system will make the same judgment on the user account. When the user account is judged to be an authorized account, the first correct key will be sent to the user account;

[0092] When the user enters the key into the digital key lock, if the key is judged to be correct, the second key will be sent to the user account; if the key is judged to be incorrect, the permission evaluation mechanism will be entered.

[0093] It should be noted that the key management system is a system used to generate, store, manage and use encryption keys. It can also store a list of administrators who can obtain keys. The preset number of characters is not unique and can be increased according to encryption requirements. When sending the correct key to the user account, in order to prevent the current account from being logged in by someone other than the person himself, the correct key can be sent to other contact methods reserved in advance for the user account, which is not limited here.

[0094] In step S4, when the user inputs the key into the digital key lock and it is determined that the key is wrong, the permission evaluation mechanism is entered. In the permission evaluation mechanism, a period of time in the past is selected as the statistical time, and the number of watermark pop-up window processing times of the current user is counted within the statistical time. The number of watermark pop-up window processing times is the number of times the user interacts with the watermark pop-up window within the statistical time.

[0095] The contribution index is calculated based on the number of watermark pop-up window processing times to evaluate the user's contribution using the logarithmic normalization method: , where y is the contribution index, x is the number of times the user's watermark pop-up window is processed, and In x is the logarithmic form of x;

[0096] Detect the frequency of users decrypting linked graph document watermarks within the statistical time. Linked graph documents are graph documents stored under the same type of label when storing graph documents. Obtain the number of times the user processes the linked graph document watermark and the number of times the key is input before processing the linked graph document. The ratio of the number of times the linked graph document watermark is processed to the number of times the key is input is used as the frequency of decryption of the linked graph document watermark.

[0097] The user's contribution index and the frequency of watermark decryption of the linked graph document are used as input parameters to calculate the key strength coefficient using the logistic regression algorithm: , where M is the key strength coefficient, e is the natural base, z is the logistic regression parameter and z is the sum of the two input parameters of the user's contribution index and the decryption frequency of the linked graph document watermark;

[0098] Comparing the key strength coefficient with a preset first key strength threshold and a second key strength threshold to set the encryption type, wherein the first key strength threshold is lower than the second key strength threshold;

[0099] When the key strength coefficient is lower than the first key strength threshold, the encryption type is set to a multi-key encryption type;

[0100] When the key strength coefficient is between the first key strength threshold and the second key strength threshold, the encryption type is set to a dual-key encryption type;

[0101] When the key strength coefficient exceeds the second key strength threshold, the encryption type is set to a single-key encryption type;

[0102] Reset the correct key according to the set encryption type, and fill in the reset key according to the correct key.

[0103] It should be noted that the larger the key strength coefficient, the higher the number of watermark pop-up window processing times and the frequency of linked graph document watermark decryption, and the more likely it is that the user is an unrecorded authorized user. The key type can be lowered to enable the current user to perform watermark processing operations. The first key strength threshold and the second key strength threshold in the above steps are set by professionals in this field according to actual conditions and will not be elaborated here.

[0104] Embodiment 2, the image document is based on a watermark and encryption hybrid protection system, such as Figure 2 As shown, it is used to implement the above-mentioned hybrid protection method based on watermark and encryption, including a pixel detection module, a secret scoring module, a permission evaluation module and a key reset module;

[0105] The pixel detection module is used to analyze the pixel value distribution of the image document, filter out the high noise position of the image document, and determine the watermark size and watermark position input by the user;

[0106] The confidentiality scoring module is used to score the confidentiality of the watermark of the image document, set the encryption type of the key according to the confidentiality score of the watermark, and generate the correct key;

[0107] The permission evaluation module is used to send the correct key to the user account and check whether the key is correct. If the key is wrong, the permission evaluation mechanism will be used to evaluate the user's contribution.

[0108] The key reset module is used to reset the encryption type of the key according to the user's contribution and generate the correct key, and reset the key entry.

[0109] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product.

[0110] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application of the technical solution and the invention constraints. 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 this application.

[0111] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0112] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0113] Finally: 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 principles of the present invention should be included in the protection scope of the present invention.

Claims

1. The image document is protected by a hybrid watermark and encryption method, which is characterized by: The following steps are involved: Step S1: Acquire the image document, analyze the pixel value distribution of the image document, filter out the high noise position of the image document according to the pixel value distribution, pop up a watermark mark pop-up window to the user end, and determine the watermark size and watermark position according to the watermark mark pop-up window; Step S2: Compare the overlap between the watermark position and the high noise position to calculate the overlap coefficient, comprehensively evaluate the watermark concealment by combining the overlap coefficient and the watermark size, and set the encryption type to single key, dual key or multi-key according to the watermark concealment score; Step S3: Select a key of the corresponding level as the correct key of the digital key lock according to the encryption type, and send it to the authorized user end. When the encryption type is not a single key, after the first digital key lock is filled with the key, determine whether the key is correct. If the key is wrong, enter the authority evaluation mechanism; Step S4: In the authority evaluation mechanism, count the number of times the user processes the watermark pop-up window, evaluate the user's contribution based on the number of times the user processes the watermark pop-up window, detect the user's frequency of decrypting the linked graph document watermark, reset the encryption type and select the correct key based on the user's contribution evaluation results and the frequency of decrypting the linked graph document watermark, and fill in and reset according to the correct key.

2. The image document protection method based on watermark and encryption hybrid according to claim 1 is characterized by: In step S1, the acquired image document is divided into multiple parts according to a preset division ratio, the image document is imported into an image processing library for processing, the number of pixels and pixel values ​​of each part of the image document are obtained, and the pixel average value and pixel value variance of the corresponding part of the image document are calculated according to the number of pixels and pixel values ​​of each part of the image document; The image processing library is a set of programming tools for processing and analyzing images. It is used to segment image documents and calculate the pixel values ​​and their variance of different parts.

3. The image document protection method based on watermark and encryption hybrid protection according to claim 2 is characterized by: In step S1, the noise segmentation threshold of the image document is set using a recursive segmentation method according to the pixel value variance of each part of the image document. The specific steps are as follows: Sort the pixel value variances of each part of the image document from small to large, set the basic segmentation coefficient and the upper limit segmentation coefficient, use the basic segmentation coefficient to divide the sequence into two parts, calculate the average value of the pixel value variance of the two parts, and select the part with the larger average value as the secondary sorting sequence; Reducing the denominator of the basic division fraction by a predetermined reduction factor so that the basic division factor increases; The secondary sorting sequence is segmented according to the basic segmentation score, the average variance of the pixel values ​​in the two parts is calculated, and the part with the smaller average value is selected as the tertiary sorting sequence. The operation is repeated until the basic segmentation coefficient reaches the upper limit segmentation coefficient or only one value remains in the sequence; If there is only one value left in the sequence, it is used as the noise segmentation threshold. If the basic segmentation coefficient reaches the upper limit segmentation coefficient, the median of the value in the sequence is selected as the noise segmentation threshold. The image document portion whose pixel value variance exceeds the noise segmentation threshold is marked as a high-noise portion; the image document portion whose pixel value variance is lower than the noise segmentation threshold is marked as a low-noise portion.

4. The image document protection method based on watermark and encryption hybrid protection according to claim 1 is characterized in that: In step S1, after marking each part of the image document, a watermark mark pop-up window is popped up to the user end; The watermark mark pop-up window is used to interact with the user. The user circles the watermark range that needs to be processed according to the prompts and obtains the watermark size and watermark position in the image document provided by the user.

5. The image document protection method based on watermark and encryption hybrid according to claim 1 is characterized in that: In step S2, the watermark position is compared with the high noise position to determine their overlap; If the watermark position is completely within the high noise position, the coincidence coefficient is set to 1; If the watermark position is completely outside the high noise position, the coincidence coefficient is set to 0; If the watermark position is partially located at a high noise position, the ratio of the watermark area at the high noise position to the watermark size is used as the coincidence coefficient, and the coincidence coefficient is between 0 and 1; After obtaining the overlap coefficient, multiple historical watermark sizes stored in the historical database are accessed, and the average value of the historical watermark sizes is calculated as the watermark size threshold; If the watermark size obtained by the user exceeds the watermark size threshold, the size coefficient is set to 0; If the watermark size obtained by the client is lower than the watermark size threshold, the size factor is set to 1.

6. The image document protection method based on watermark and encryption hybrid protection according to claim 5 is characterized in that: In step S2, the watermark concealment is scored based on the combined overlap coefficient and size coefficient, and the encryption type is set according to the watermark concealment score. The specific steps are as follows: The product of the overlap coefficient and the size coefficient is used as the watermark concealment score; Rule 1: When the watermark concealment score is 1, the watermark concealment is judged to be high concealment; Rule 2: When the watermark concealment score is between 0 and 1, the watermark concealment is judged to be medium concealment; Rule 3: When the watermark concealment score is 0, the watermark concealment is judged to be low concealment; When the watermark concealment is judged to be low concealment, the encryption type is set to single-key encryption type; When the watermark concealment is judged to be medium concealment, the encryption type is set to double-key encryption type; When the watermark concealment is judged to be highly concealed, the encryption type is set to a multi-key encryption type.

7. The image document protection method based on watermark and encryption hybrid protection according to claim 6 is characterized in that: In step S3, the correct key is obtained by randomly combining letters and numbers with a preset number of characters and stored in advance in the key management system, and keys with different character lengths are obtained by setting different preset numbers of characters; According to the encryption type, select the corresponding type of key in the key management system as the correct key for the digital key lock; When the user inputs the key into the digital key lock, the system will compare the key input by the user with the correct key sent to the user account. When all the letters and numbers in the sequence are the same, the key is judged to be correct and the user can perform watermark processing on the image document. When there are letters and numbers that are not the same in the bit sequence, the key is judged to be wrong, and the key is reset and recalculated to send the correct key to the information receiving location preset by the user; When the encryption type is dual key or multi-key, when the user needs to perform watermark processing, the system will judge the user account. When it is determined that the user account is an authorized account, the first correct key will be sent to the user account; When the user enters the key into the digital key lock, if the key is judged to be correct, the second key will be sent to the user account; if the key is judged to be wrong, the permission evaluation mechanism will be entered; A key management system is a system for generating, storing, managing, and using encryption keys and for storing a list of administrators who can access the keys.

8. The image document protection method based on watermark and encryption hybrid protection according to claim 7 is characterized in that: In step S4, the authority evaluation mechanism selects a past period of time as the statistical time, and counts the number of watermark pop-up window processing times of the current user within the statistical time; The contribution index is calculated based on the number of times the user's watermark pop-up window is processed using the logarithmic normalization method to evaluate the user's contribution area. Detect the frequency of users decrypting the linked graph document watermark within the statistical time, and use the user's contribution index and the frequency of decryption of the linked graph document watermark as input parameters to calculate the key strength coefficient using the logistic regression algorithm: , where M is the key strength coefficient, e is the natural base, z is the logistic regression parameter and z is the sum of the two input parameters of the user's contribution index and the decryption frequency of the linked graph document watermark; Comparing the key strength coefficient with a preset first key strength threshold and a second key strength threshold to set the encryption type, wherein the first key strength threshold is lower than the second key strength threshold; When the key strength coefficient is lower than the first key strength threshold, the encryption type is set to a multi-key encryption type; When the key strength coefficient is between the first key strength threshold and the second key strength threshold, the encryption type is set to a dual-key encryption type; When the key strength coefficient exceeds the second key strength threshold, the encryption type is set to a single-key encryption type.

9. A system for protecting image documents based on watermark and encryption hybrid protection, based on a method for protecting image documents based on watermark and encryption hybrid protection as claimed in any one of claims 1 to 8, characterized in that: It includes pixel detection module, secret scoring module, permission assessment module and key reset module; The pixel detection module is used to analyze the pixel value distribution of the image document, filter out the high noise position of the image document, and determine the watermark size and watermark position input by the user; The confidentiality scoring module is used to score the confidentiality of the watermark of the image document, set the encryption type of the key according to the confidentiality score of the watermark, and generate the correct key; The permission evaluation module is used to send the correct key to the user account and check whether the key is correct. If the key is wrong, the permission evaluation mechanism will be used to evaluate the user's contribution. The key reset module is used to reset the encryption type of the key according to the user's contribution and generate the correct key, and reset the key entry.

Citation Information

Patent Citations

  • Electronic document digital watermark processing method and system

    CN111861846A

  • Watermark image processing method and electronic equipment

    CN117011112A