CN110245469B - Webpage watermark generation method, watermark analysis method, device and storage medium - Google Patents

Webpage watermark generation method, watermark analysis method, device and storage medium Download PDF

Info

Publication number
CN110245469B
CN110245469B CN201910547456.2A CN201910547456A CN110245469B CN 110245469 B CN110245469 B CN 110245469B CN 201910547456 A CN201910547456 A CN 201910547456A CN 110245469 B CN110245469 B CN 110245469B
Authority
CN
China
Prior art keywords
watermark
user identification
identification information
data string
sub
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910547456.2A
Other languages
Chinese (zh)
Other versions
CN110245469A (en
Inventor
胡平
贡文伟
陈励平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ruishi (Suzhou) video technology Co., Ltd
Suzhou Keda Technology Co Ltd
Original Assignee
Ruishi Suzhou Video Technology Co Ltd
Suzhou Keda Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ruishi Suzhou Video Technology Co Ltd, Suzhou Keda Technology Co Ltd filed Critical Ruishi Suzhou Video Technology Co Ltd
Priority to CN201910547456.2A priority Critical patent/CN110245469B/en
Publication of CN110245469A publication Critical patent/CN110245469A/en
Application granted granted Critical
Publication of CN110245469B publication Critical patent/CN110245469B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/16Program or content traceability, e.g. by watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

The application relates to a webpage watermark generation method, a watermark analysis method, a device and a storage medium, belonging to the technical field of computers, wherein the method comprises the following steps: acquiring user identification information; converting the user identification information according to an encryption watermark format to obtain an encryption watermark; generating a watermark pattern of the target webpage by using the user identification information and the encrypted watermark; the problem that the watermark exists in the webpage of a potential divulger cannot be prompted by the encrypted watermark when the watermark pattern of the target webpage is generated only by the encrypted watermark can be solved; the method can not only prompt the potential divulger that the watermark exists in the webpage, but also avoid the user identification information from being disguised, and can reduce the leakage range of the webpage content.

Description

Webpage watermark generation method, watermark analysis method, device and storage medium
Technical Field
The application relates to a webpage watermark generation method, a watermark analysis method, a device and a storage medium, and belongs to the technical field of computers.
Background
With the development of information technology, web services have become an essential part of people's daily life. Many web services, particularly web services within a company, may display information related to company internal data, company trade secrets, and the like when data is displayed, and as the application of internet technology becomes more frequent, the information is more easily leaked. At present, in order to prevent leakage of internal information, a watermark may be embedded in a web page.
The invention patent with publication number CN 109726348A discloses a method for protecting web page watermark, which comprises the following steps: acquiring user information; generating a watermark picture matched with the user information; when a user logs in, displaying a watermark picture in an intranet webpage; and detecting the watermark picture in the external network webpage, if the watermark picture is detected, identifying the watermark picture, and matching user information according to the watermark picture.
And the watermark picture is generated by the encrypted user information. Because the watermark picture is usually represented by a pattern, a character and the like which do not have any meaning, a potential divulger cannot be prompted that a watermark exists in the current webpage, the potential divulger is easy to misunderstand that the watermark does not exist in the webpage, and the webpage content can be greatly spread.
Disclosure of Invention
The application provides a webpage watermark generating method, a watermark analyzing method, a device and a storage medium, which can solve the problem that when only an encrypted watermark is used for generating a watermark pattern of a target webpage, the encrypted watermark cannot prompt that a potential divulger has a watermark in the webpage. The application provides the following technical scheme:
in a first aspect, a method for generating a watermark of a web page is provided, where the method includes:
acquiring user identification information, wherein the user identification information is used for identifying a user logging in a target webpage;
converting the user identification information according to an encryption watermark format to obtain an encryption watermark;
and generating a watermark pattern of the target webpage by using the user identification information and the encrypted watermark.
Optionally, the converting the user identification information according to an encrypted watermark format to obtain an encrypted watermark includes:
generating information index values corresponding to the user identification information, wherein the information index values corresponding to different user identification information are different;
converting the information index value into a binary data string with preset digits;
and representing the binary data string in a preset representation mode to obtain the encrypted watermark.
Optionally, the generating a watermark pattern of the target webpage by using the user identification information and the encrypted watermark includes:
dividing the binary data string into n sub-data strings, wherein n is an integer greater than 1;
acquiring the arrangement mode of the n sub-data strings in the target webpage;
and arranging each subdata string and the user identification information at the corresponding pattern position according to the arrangement mode to obtain the watermark pattern.
Optionally, the arrangement is to arrange the n sub data strings into an n × n data string matrix;
each row of the data string matrix comprises different sub data strings in the binary data string; each column of the data string matrix includes a different sub data string of the binary data string.
Optionally, the generating an information index value corresponding to the user identification information includes:
calculating a difference value between the current time and a preset time;
inputting the difference value and the preset digit into a preset index value generation formula to obtain the information index value;
wherein the product of the difference and the maximum value of the concurrency is less than or equal to 2iAnd the i is the preset digit.
Optionally, the representing the binary data string in a preset representation manner to obtain the encrypted watermark includes:
and representing 0 in the binary data string by a line segment with a first length, and representing 1 in the binary data string by a line segment with a second length to obtain the encrypted watermark.
In a second aspect, a method for analyzing a watermark of a web page is provided, where the method includes:
acquiring image information of a target webpage, wherein the target webpage comprises a watermark pattern generated by using user identification information and an encrypted watermark, and the encrypted watermark is obtained by converting the user identification information for logging in the target webpage according to an encrypted watermark format;
analyzing the image information to obtain the watermark pattern;
and restoring the encrypted watermark in the watermark pattern to obtain the user identification information for logging in the target webpage.
Optionally, the encrypted watermark is a binary data string with a preset number of bits represented in a preset representation manner;
the restoring the encrypted watermark in the watermark pattern includes:
restoring the binary data string into an information index value;
and searching the user identification information corresponding to the information index value and logging in the target webpage from the corresponding relation between the user identification information and the information index value.
Optionally, the watermark pattern is a division of the binary data string into n sub-data strings; acquiring the arrangement mode of the n sub-data strings in the target webpage; arranging each subdata string and the user identification information at the corresponding pattern position according to the arrangement mode to obtain the subdata string and the user identification information; the arrangement mode is that the n sub data strings are arranged into an n multiplied by n data string matrix; each row of the data string matrix comprises different sub data strings in the binary data string; each column of the data string matrix comprises different subdata strings in the binary data string;
the restoring the binary data string to an information index value includes:
for each sub data string, determining a plurality of pattern positions according to the arrangement when the image information includes a plurality of sub parts of the sub data string respectively located at the plurality of pattern positions;
determining the sub data string using the sub portions in the respective pattern positions;
splicing the sub data strings to obtain the binary data string;
and restoring the binary data string into the information index value.
Optionally, the determining the sub data string using the sub portions in the respective pattern positions includes:
splicing all the sub parts to obtain the subdata string;
and/or the presence of a gas in the gas,
splicing all the sub parts to obtain a partial sub data string; exhausting a plurality of inferred complete sub-data strings based on the partial sub-data strings; and determining the complete subdata string with the corresponding user identification information as the subdata string.
In a third aspect, an apparatus for generating a watermark of a web page is provided, the apparatus including:
the information acquisition module is used for acquiring user identification information, and the user identification information is used for identifying a user logging in a target webpage;
the information conversion module is used for converting the user identification information according to an encrypted watermark format to obtain an encrypted watermark;
and the watermark generating module is used for generating the watermark pattern of the target webpage by using the user identification information and the encrypted watermark.
In a fourth aspect, an apparatus for analyzing a watermark of a web page is provided, where the apparatus includes:
the image acquisition module is used for acquiring image information of a target webpage, wherein the target webpage comprises a watermark pattern generated by using user identification information and an encrypted watermark, and the encrypted watermark is obtained by converting the user identification information logged in the target webpage according to an encrypted watermark format;
the image analysis module is used for analyzing the image information to obtain the watermark pattern;
and the watermark reduction module is used for reducing the encrypted watermark in the watermark pattern to obtain the user identification information for logging in the target webpage.
In a fifth aspect, an apparatus for generating a watermark for a web page is provided, the apparatus comprising a processor and a memory; the memory stores a program that is loaded and executed by the processor to implement the watermark generation method for a web page provided in the first aspect.
In a sixth aspect, an apparatus for analyzing a watermark of a web page is provided, the apparatus includes a processor and a memory; the memory stores a program, and the program is loaded and executed by the processor to implement the watermark analyzing method for the web page provided by the second aspect.
A seventh aspect provides a computer-readable storage medium, in which a program is stored, the program being loaded and executed by the processor to implement the method for generating a watermark of a web page according to the first aspect; or, the watermark analyzing method for the webpage provided by the second aspect is implemented.
The beneficial effect of this application lies in: the method comprises the steps that user identification information is obtained and used for identifying a user logging in a target webpage; converting the user identification information according to an encryption watermark format to obtain an encryption watermark; generating a watermark pattern of the target webpage by using the user identification information and the encrypted watermark; the problem that the watermark exists in the webpage of a potential divulger cannot be prompted by the encrypted watermark when the watermark pattern of the target webpage is generated only by the encrypted watermark can be solved; because the watermark pattern of the target webpage is generated by using the user identification information and the encrypted watermark, the user identification information can prompt that the potential divulger webpage has the watermark, and the encrypted watermark can avoid the problem that the user identification information is disguised due to the fact that the watermark is modified, so that the effects of prompting that the potential divulger webpage has the watermark and preventing the user identification information from being disguised can be achieved, and the leakage range of webpage content can be reduced.
The foregoing description is only an overview of the technical solutions of the present application, and in order to make the technical solutions of the present application more clear and clear, and to implement the technical solutions according to the content of the description, the following detailed description is made with reference to the preferred embodiments of the present application and the accompanying drawings.
Drawings
Fig. 1 is a flowchart of a method for generating a watermark of a web page according to an embodiment of the present application;
fig. 2 is a schematic diagram of an encrypted watermark provided by an embodiment of the present application;
FIG. 3 is a schematic view of a watermark pattern provided by one embodiment of the present application;
FIG. 4 is a schematic view of a watermark pattern provided by another embodiment of the present application;
FIG. 5 is a flowchart of a method for parsing a watermark of a web page according to an embodiment of the present application;
fig. 6 is a block diagram of a watermark generation apparatus for a web page according to an embodiment of the present application;
fig. 7 is a block diagram of a watermark parsing apparatus for a web page according to an embodiment of the present application;
fig. 8 is a block diagram of an occlusion detection device according to an embodiment of the present application.
Detailed Description
The following detailed description of embodiments of the present application will be described in conjunction with the accompanying drawings and examples. The following examples are intended to illustrate the present application but are not intended to limit the scope of the present application.
Optionally, the execution subject of each embodiment is taken as an example of an electronic device, and the electronic device may be a device with computing capability, such as a server or a terminal, and the embodiment does not limit the type of the electronic device. The terminal may be a computer, a tablet computer, a mobile phone, a wearable device, and the like, and the embodiment does not limit the type of the terminal.
Fig. 1 is a flowchart of a method for generating a watermark of a web page according to an embodiment of the present application. The method at least comprises the following steps:
step 101, user identification information is obtained.
The user identification information is used for identifying a user logging in the target webpage. Optionally, the user identification information includes, but is not limited to: at least one of a user name, a login account, an identity card, an Internet Protocol Address (IP Address) and login time.
And 102, converting the user identification information according to an encryption watermark format to obtain an encryption watermark.
Optionally, converting the user identification information according to an encrypted watermark format to obtain an encrypted watermark, including: generating an information index value corresponding to the user identification information; converting the information index value into a binary data string with preset digits; and representing the binary data string in a preset representation mode to obtain the encrypted watermark.
And the information index values corresponding to different user identification information are different. Illustratively, referring to the corresponding relationship between the user identification information and the information index value shown in table one, the user identification information of each user in table one corresponds to one information index value, and the information index values corresponding to the user identification information of different users are different.
Table one:
Figure BDA0002104407430000061
Figure BDA0002104407430000071
in the application, the information index value generated by the electronic equipment has impact resistance and randomness. Wherein the impact resistance is used to prevent the occurrence of duplicate information index values. Randomness is used to avoid masquerading and exhaustive verification, i.e., to increase the difficulty of the information index value being emulated and deciphered.
Optionally, generating an information index value corresponding to the user identification information includes: calculating a difference value between the current time and a preset time; and inputting the difference value and the preset digit into a preset index value generation formula to obtain an information index value. Wherein the product of the difference and the maximum value of the concurrency is less than or equal to 2iAnd i is a preset number of bits.
The preset index value generation formula is as follows:
information index value ═ ((current time-preset time)/10k-k’)%2i
k is the decimal digit of the current time timing accuracy, such as: the precision of the current time timing is millisecond level, the decimal digit is 3 bits, and k is 3. The maximum value of the concurrency is preset in the electronic equipment, the maximum value of the concurrency refers to the maximum value of the number of users logging in the webpage at the same time, and the maximum value of the concurrency is less than or equal to 10k。10k’Is a value that is greater than the maximum value of the concurrency quantity and has the smallest difference with the maximum value of the concurrency quantity, such as: the maximum amount of concurrency is 999, 10k’Is 103K' is 3; for another example: the maximum value of the concurrency is 99, then 10k’Is 102And k' is 2.
The preset digit i and the maximum value j of the concurrency quantity need to satisfy the following formula:
i=ceil(log2 (366*24*3600*a*j))
wherein ceil represents rounding up, and a represents the maximum number of years of use for the preset time. The value of a is preset in the electronic device.
Assuming that j has a value of 1000 and a has a value of 2, i is determined to be 36 according to the formula between i and j, and 366 × 24 × 3600 × 1000 × 2 is 63, 244, 800, 000<68,719,476,736(236) When the concurrency quantity is 1000, the maximum value of the information index value is less than or equal to 2i
Optionally, representing the binary data string in a preset representation manner to obtain the encrypted watermark includes: and representing 0 in the binary data string by line segments with a first length, and representing 1 in the binary data string by line segments with a second length to obtain the encrypted watermark.
Wherein the first length is different from the second length, and the first length may be greater than the second length; alternatively, it may be smaller than the second length, and the relative length between the first length and the second length is not limited in this embodiment.
Referring to fig. 2, an encrypted watermark is shown that represents a binary string 00001011010011 in a predetermined representation. In fig. 2, the shorter line segment represents 0, and the longer line segment represents 1.
Step 103, generating a watermark pattern of the target webpage by using the user identification information and the encrypted watermark.
The watermark pattern includes both plain-text user identification information and an encrypted watermark. In one example, the encrypted watermark is arranged at a first pattern position in its entirety, and the user identification information is arranged at a second pattern position to obtain the watermark pattern. The first pattern location is different from the second pattern location.
Referring to the schematic diagram of the watermark pattern of the target web page shown in fig. 3, a first pattern position 31 in the watermark pattern represents the encrypted watermark, and a second pattern position 32 represents the user identification information "zhang san".
In the watermark generation method shown in fig. 3, if the length of the encrypted watermark is long, the area required for the first pattern position 31 becomes large, and the target web page may not display the entire encrypted watermark. In addition, the requirement for the screenshot of the watermark pattern is also increased, and referring to fig. 3, only when the image area 33 including the entire encrypted watermark is captured, the effective encrypted watermark can be acquired, so that the encrypted watermark is analyzed. On the other hand, in the image areas 34 and 35 not including the entire encrypted watermark, the effective encrypted watermark cannot be acquired, and therefore, the encrypted watermark cannot be analyzed.
In another example, an electronic device divides a binary data string into n sub-data strings; acquiring the arrangement mode of the n sub-data strings in the target webpage; and arranging each subdata string and the user identification information at the corresponding pattern position according to the arrangement mode to obtain the watermark pattern. n is an integer greater than 1.
Optionally, the number of bits of the n sub-data strings is the same; alternatively, there is at least one sub data string having a different number of bits from the other sub data strings. In this embodiment, the description will be given taking as an example that the number of bits of n sub data strings is the same.
Optionally, in order to ensure that the position of each sub data string can be determined when the sub data strings are spliced, a position identifier is added to the front end of each sub data string. The location identifier is used to identify the location of the sub-data string within the binary data string. Illustratively, the location identity may be represented by a binary code, such as: 00 denotes a first-stage sub data string, 01 denotes a second-stage sub data string, and 10 denotes a third-stage sub data string. Of course, the location identity may also be represented in other ways, such as: the present embodiment does not limit the representation manner of the position indication by letter representation and the like.
Refer to fig. 4 for a schematic illustration of a watermark pattern of a target web page. The binary data string is divided into 3 sub-data strings (m1, m2, and m3), each of which is distributed at a different pattern position of the watermark pattern. At this time, when the length of the encrypted watermark is long, the encrypted watermark can be displayed in segments, and therefore, the target web page can display all the encrypted watermarks.
In one example, the arrangement is that n sub-data strings are arranged into an n × n data string matrix; each row of the data string matrix comprises different subdata strings in the binary data string; each column of the data string matrix includes a different sub-data string within the binary data string.
In order to ensure that each row of the data string matrix comprises different subdata strings in the binary data string; each column of the data string matrix comprises different subdata strings in the binary data string, and the pth row of the data string matrix is obtained by circularly shifting the elements of the pth-1 row by 1 bit; or circularly right-shifting the elements of the p-1 line by 1 bit. p is an integer greater than 1 and less than or equal to n.
Referring to fig. 4, the data string matrix is a 3 × 3 matrix, each row of which includes a different sub data string of the binary data string, and each column of which includes a different sub data string of the binary data string. At this time, the intercepted image information does not need to include all of each sub data string, but only needs to intercept a plurality of portions of each sub data string, and combine the plurality of portions to restore each sub data string (the specific restoration process refers to the embodiment described in fig. 5), so that the requirements for the screenshot of the watermark pattern can be reduced.
Optionally, the watermark pattern is displayed in the target webpage when the user logs in the target webpage.
Optionally, the size, transparency, color, font, position, and/or pixel parameters of the watermark pattern may be adjusted as desired.
In summary, in the method for generating a watermark of a web page provided by this embodiment, user identification information is obtained, and the user identification information is used to identify a user who logs in a target web page; converting the user identification information according to an encryption watermark format to obtain an encryption watermark; generating a watermark pattern of the target webpage by using the user identification information and the encrypted watermark; the problem that the watermark exists in the webpage of a potential divulger cannot be prompted by the encrypted watermark when the watermark pattern of the target webpage is generated only by the encrypted watermark can be solved; because the watermark pattern of the target webpage is generated by using the user identification information and the encrypted watermark, the user identification information can prompt that the potential divulger webpage has the watermark, and the encrypted watermark can avoid the problem that the user identification information is disguised due to the fact that the watermark is modified, so that the effects of prompting that the potential divulger webpage has the watermark and preventing the user identification information from being disguised can be achieved, and the leakage range of webpage content can be reduced.
In addition, the user identification information is converted into an information index value; converting the information index value into a binary data string with preset digits; representing the binary data string in a preset representation mode to obtain an encrypted watermark; the decryption difficulty of the encrypted watermark can be improved, so that the difficulty of disguising the encrypted watermark is increased.
In addition, the binary data string is divided into n sub-data strings, and each sub-data string and the user identification information are arranged at the corresponding pattern position according to a preset arrangement mode to obtain a watermark pattern; when the length of the encrypted watermark is longer, the encrypted watermark can be displayed in sections, and the target webpage can be ensured to display all the encrypted watermarks.
In addition, the arrangement mode is set to arrange the n sub data strings into an n multiplied by n data string matrix; each row of the data string matrix comprises different subdata strings in the binary data string; each column of the data string matrix comprises different subdata strings in the binary data string; the image information intercepted in the screenshot process does not need to include all the subdata strings, only a plurality of parts of each subdata string need to be intercepted, and each subdata string can be restored by combining the plurality of parts, so that the screenshot requirement on the watermark pattern can be reduced, and the screenshot efficiency can be improved.
In addition, by using the difference between the current time and the preset time and 2iPerforming a remainder operation to obtain an information index value; wherein the difference between the current time and the preset time is less than or equal to 2i(ii) a The impact resistance and the randomness of the information index value can be ensured, and the electronic equipment can be prevented from generating repeated information index values; the difficulty of imitating and deciphering the information index value is improved.
Based on the above embodiments, this embodiment further provides a watermark analyzing method for a target webpage. The
Fig. 5 is a flowchart of a method for parsing a watermark of a web page according to an embodiment of the present application. The method at least comprises the following steps:
step 501, image information of a target webpage is acquired.
The target webpage comprises a watermark pattern generated by using user identification information and an encrypted watermark, and the encrypted watermark is obtained by converting the user identification information of the login target webpage according to an encrypted watermark format.
Optionally, the electronic device detects each web page, and if a web page including the watermark pattern generated in step 103 is detected, determines that the web page is the target web page. Optionally, the electronic device may detect the watermark pattern for some popular web pages, and when the watermark pattern is detected in the web page, the electronic device may directly identify the watermark pattern, or may store the watermark pattern in the database and then identify the watermark pattern. In this embodiment, the web page is searched in a watermark crawler manner, and other manners may be used in actual implementation.
The image information of the target webpage refers to information including an image of the target webpage, and the image information can be obtained by screenshot of the target webpage; alternatively, the information may be information obtained by photographing the target web page, and the embodiment does not limit the manner of acquiring the image information.
Step 502, analyzing the image information to obtain a watermark pattern.
Optionally, the method for analyzing the image information includes ORC algorithm recognition, neural network model recognition, and the like, and the embodiment does not limit the analysis method of the image information.
And 503, restoring the encrypted watermark in the watermark pattern to obtain the user identification information of the login target webpage.
Optionally, the encrypted watermark is a binary data string of a preset number of bits represented in a preset representation. At this time, the encrypted watermark in the watermark pattern is restored, including: restoring the binary data string into an information index value; and searching the user identification information of the login target webpage corresponding to the information index value from the corresponding relation between the user identification information and the information index value.
In one example, the watermark pattern is a division of a binary data string into n sub-data strings; acquiring the arrangement mode of the n sub-data strings in the target webpage; and arranging each subdata string and the user identification information at the corresponding pattern position according to an arrangement mode to obtain the subdata string. The arrangement mode is that n sub data strings are arranged into an n multiplied by n data string matrix; each row of the data string matrix comprises different subdata strings in the binary data string; each column of the data string matrix includes a different sub-data string within the binary data string.
In a first scenario, the image information includes n complete subdata strings located in the same row in the data string matrix; alternatively, the image information includes n complete sub data strings located in the same column in the data string matrix. At this time, the electronic device splices the n sub-data strings to obtain a binary data string.
Optionally, a position identifier is added to the front end of each sub data string, and the electronic device splices the parts of the n sub data strings except the position identifier according to the position identifier to obtain a binary data string.
Assuming that the image information is the image information of the area 41 in fig. 4, the area 41 includes 3 sub-data strings (m1 is 00001011010011, m2 is 01000111110110, m3 is 10110110101110), the first two bits of each sub-data string are position identifiers, where 00 denotes a first-stage sub-data string, 01 denotes a second-stage sub-data string, and 10 denotes a third-stage sub-data string; the last 12 bits are the complete sub data string. The electronic equipment splices the last 12 bits of the 3 sub-data strings according to the position identification to obtain a binary data string:
001011010011000111110110110110101110. the electronic device then converts the binary data string to decimal, resulting in an information index value 12131986862. And obtaining the user identification information corresponding to the information index value according to the corresponding relation shown in the table I, wherein the user identification information comprises zhangsan.
In a second scenario, for each sub data string, the image information includes a plurality of sub portions of the sub data string respectively located at a plurality of pattern positions. At this time, the electronic device determines a plurality of pattern positions according to the arrangement mode; determining a sub-data string using the sub-portions in the respective pattern positions; splicing the sub data strings to obtain a binary data string; the binary data string is restored to the information index value.
Optionally, determining the sub-data string using the sub-portions in the respective pattern positions comprises: and splicing all the subsections to obtain the subdata string.
Optionally, determining the sub-data string using the sub-portions in the respective pattern positions comprises: splicing all the sub parts to obtain a partial sub data string; exhausting a plurality of inferred complete subdata strings based on the partial subdata strings; and determining the complete subdata string with the corresponding user identification information as the subdata string to be determined.
Assuming that the image information is the image information of the area 42 in fig. 4, the area 42 includes 6 sub-data strings (m1, m2, m3, m4, m5, and m6), the full bit number of each sub-data string is 14 bits, the first two bits are position identifiers, where 00 denotes a first-stage sub-data string, 01 denotes a second-stage sub-data string, and 10 denotes a third-stage sub-data string. As can be seen from FIG. 4, the number of bits of the 6 sub-data strings is less than 14, and the sub-data strings are incomplete. Wherein two bits are deleted from the upper right corner of m1, two bits are deleted from the upper right corner of m2, and three bits are deleted from the upper right corner of m 3; m4 and m5 lower left corner are missing; m6 is missing in both the top left and bottom right corners and is not available. According to the matrix law shown in fig. 4, the electronic device can make up for two missing bits in the upper right corner of m2 by using the last two bits of m4, obtain m2 as 01000111110110, make up for three missing bits in the upper right corner of m3 by using m5, and obtain m3 as 10110110101110. m1 cannot be completed, but two missing bits of m1 can be enumerated as follows: 00. 01, 10, 11, whereby a speculative complete sub-data string of m1 may be derived, comprises:
[A]001011010000
[B]001011010001
[C]001011010010
[D]001011010011
splicing all complete sub-data strings according to the sequence of m1, m2 and m3 to obtain the following four binary data strings:
[A’]001011010000 000111110110110110101110
[B’]001011010001 000111110110110110101110
[C’]001011010010 000111110110110110101110
[D’]001011010011 000111110110110110101110
converting the obtained binary data string into a decimal data string respectively comprises the following steps:
[A”]12081655214
[B”]12098432430
[C”]12115209646
[D”]12131986862
comparing [ a "], [ B" ], [ C "] and [ D" ] with each information index value in table one, where the same information index value as [ D "] exists, it can be determined that two missing bits in the upper right corner of m1 are 11 and the user identification information is zhangsan.
In summary, in the method for analyzing a watermark of a web page provided by this embodiment, image information of a target web page is obtained, where the target web page includes a watermark pattern generated by using user identification information and an encrypted watermark, and the encrypted watermark is obtained by converting the user identification information of a login target web page according to an encrypted watermark format; analyzing the image information to obtain a watermark pattern; reducing the encrypted watermark in the watermark pattern to obtain user identification information of the login target webpage; the problem that when only the encrypted watermark is used for generating the watermark pattern of the target webpage, the encrypted watermark cannot prompt that the potential divulger has the watermark in the webpage, so that the leakage range of the webpage content is enlarged can be solved; because the watermark pattern of the target webpage is generated by using the user identification information and the encrypted watermark, the user identification information can prompt that the potential divulger webpage has the watermark, and the encrypted watermark can avoid the problem that the user identification information is disguised due to the fact that the watermark is modified, so that the effects of prompting that the potential divulger webpage has the watermark and preventing the user identification information from being disguised can be achieved, and the leakage range of webpage content can be reduced.
In addition, the encrypted watermark is used for tracking the user identification information, so that the problem that the user identification information in the target webpage is directly analyzed, the user identification information determined when the user identification information is tampered is inaccurate can be prevented, and the accuracy of the tracked user identification information can be ensured.
In addition, the arrangement mode is set to arrange the n sub data strings into an n multiplied by n data string matrix; each row of the data string matrix comprises different subdata strings in the binary data string; each column of the data string matrix comprises different subdata strings in the binary data string; the image information intercepted in the screenshot process does not need to include all the subdata strings, only a plurality of parts of each subdata string need to be intercepted, and each subdata string can be restored by combining the plurality of parts, so that the screenshot requirement on the watermark pattern can be reduced, and the screenshot efficiency can be improved.
Fig. 6 is a block diagram of a watermark generation apparatus for a web page according to an embodiment of the present application. The device at least comprises the following modules: an information acquisition module 610, an information conversion module 620 and a watermark generation module 630.
An information obtaining module 610, configured to obtain user identification information, where the user identification information is used to identify a user who logs in a target web page;
an information conversion module 620, configured to convert the user identification information according to an encrypted watermark format to obtain an encrypted watermark;
a watermark generating module 630, configured to generate a watermark pattern of the target webpage by using the user identification information and the encrypted watermark.
For relevant details reference is made to the above-described method embodiments.
It should be noted that: in the above embodiment, when generating the watermark of the web page, the web page watermark generating apparatus is exemplified by only the division of the functional modules, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the web page watermark generating apparatus is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the watermark generation apparatus for a web page and the watermark generation method for a web page provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Fig. 7 is a block diagram of a device for parsing a watermark of a web page according to an embodiment of the present application. The device at least comprises the following modules: an image acquisition module 710, an image parsing module 720 and a watermark restoration module 730.
An image obtaining module 710, configured to obtain image information of a target webpage, where the target webpage includes a watermark pattern generated by using user identification information and an encrypted watermark, and the encrypted watermark is obtained by converting user identification information logged in the target webpage according to an encrypted watermark format;
an image analysis module 720, configured to analyze the image information to obtain the watermark pattern;
and the watermark restoring module 730 is configured to restore the encrypted watermark in the watermark pattern to obtain the user identification information for logging in the target webpage.
For relevant details reference is made to the above-described method embodiments.
It should be noted that: in the above embodiment, when the watermark analyzing apparatus for a web page analyzes a watermark of the web page, only the division of the functional modules is illustrated, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the watermark analyzing apparatus for a web page is divided into different functional modules, so as to complete all or part of the above described functions. In addition, the watermark analyzing apparatus for a web page and the watermark analyzing method for a web page provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Fig. 8 is a block diagram of a watermark processing apparatus for a web page provided in an embodiment of the present application, which may include the watermark generation apparatus for the web page shown in fig. 6 and/or the watermark parsing apparatus for the web page shown in fig. 7. The device may be a smartphone, tablet, laptop, desktop, or server. The watermark processing device of the web page may also be referred to as a user equipment, a portable terminal, a laptop terminal, a desktop terminal, a control terminal, a server, etc., and this embodiment is not limited thereto. The apparatus comprises at least a processor 801 and a memory 802.
Processor 801 may include one or more processing cores, such as: 4 core processors, 8 core processors, etc. The processor 801 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 801 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 801 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 801 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 802 may include one or more computer-readable storage media, which may be non-transitory. Memory 802 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 802 is used to store at least one instruction for execution by the processor 801 to implement the watermark generation method for a web page provided by the method embodiments in the present application; or, the method for analyzing the watermark of the webpage provided by the method embodiment of the application is realized.
In some embodiments, the watermark processing device for the web page may further include: a peripheral interface and at least one peripheral. The processor 801, memory 802 and peripheral interface may be connected by bus or signal lines. Each peripheral may be connected to the peripheral interface via a bus, signal line, or circuit board. Illustratively, peripheral devices include, but are not limited to: radio frequency circuit, touch display screen, audio circuit, power supply, etc.
Of course, the watermarking device for web pages may also include fewer or more components, which is not limited in this embodiment.
Optionally, the present application further provides a computer-readable storage medium, in which a program is stored, where the program is loaded and executed by a processor to implement the watermark generation method for a web page of the foregoing method embodiment; or, the method for analyzing the watermark of the webpage in the embodiment of the method is realized.
Optionally, the present application further provides a computer product, which includes a computer-readable storage medium, where a program is stored in the computer-readable storage medium, and the program is loaded and executed by a processor to implement the watermark generation method for a web page of the foregoing method embodiment; or, the method for analyzing the watermark of the webpage in the embodiment of the method is realized.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (14)

1. A method for generating a watermark for a web page, the method comprising:
acquiring user identification information, wherein the user identification information is used for identifying a user logging in a target webpage;
converting the user identification information according to an encryption watermark format to obtain an encryption watermark;
generating a watermark pattern of the target webpage by using the user identification information and the encrypted watermark, wherein the watermark pattern comprises the user identification information and the encrypted watermark in plain text;
the converting the user identification information according to an encryption watermark format to obtain an encryption watermark includes:
generating information index values corresponding to the user identification information, wherein the information index values corresponding to different user identification information are different;
converting the information index value into a binary data string with preset digits;
and representing the binary data string in a preset representation mode to obtain the encrypted watermark.
2. The method of claim 1, wherein generating the watermark pattern for the target web page using the user identification information and the encrypted watermark comprises:
dividing the binary data string into n sub-data strings, wherein n is an integer greater than 1;
acquiring the arrangement mode of the n sub-data strings in the target webpage;
and arranging each subdata string and the user identification information at the corresponding pattern position according to the arrangement mode to obtain the watermark pattern.
3. The method according to claim 2, wherein the arrangement is that the n sub-data strings are arranged into an n x n data string matrix;
each row of the data string matrix comprises different sub data strings in the binary data string; each column of the data string matrix includes a different sub data string of the binary data string.
4. The method according to claim 1, wherein the generating an information index value corresponding to the user identification information comprises:
calculating a difference value between the current time and a preset time;
inputting the difference value and the preset digit into a preset index value generation formula to obtain the information index value;
wherein the product of the difference and the maximum value of the concurrency is less than or equal to 2iAnd the i is the preset digit.
5. The method of claim 1, wherein said representing the binary data string in a predetermined representation to obtain the encrypted watermark comprises:
and representing 0 in the binary data string by a line segment with a first length, and representing 1 in the binary data string by a line segment with a second length to obtain the encrypted watermark.
6. A method for analyzing a watermark of a web page, the method comprising:
acquiring image information of a target webpage, wherein the target webpage comprises a watermark pattern generated by using user identification information and an encrypted watermark, and the encrypted watermark is obtained by converting the user identification information for logging in the target webpage according to an encrypted watermark format; the watermark pattern comprises the user identification information and the encrypted watermark in plain text; converting the user identification information according to the encryption watermark format, including: generating information index values corresponding to the user identification information, wherein the information index values corresponding to different user identification information are different; converting the information index value into a binary data string with preset digits; representing the binary data string in a preset representation mode to obtain the encrypted watermark;
analyzing the image information to obtain the watermark pattern;
and restoring the encrypted watermark in the watermark pattern to obtain the user identification information for logging in the target webpage.
7. The method according to claim 6, wherein the encrypted watermark is a binary data string of a preset number of bits represented in a preset representation;
the restoring the encrypted watermark in the watermark pattern includes:
restoring the binary data string into an information index value;
and searching the user identification information corresponding to the information index value and logging in the target webpage from the corresponding relation between the user identification information and the information index value.
8. The method of claim 7, wherein the watermark pattern is a division of the binary data string into n sub-data strings; acquiring the arrangement mode of the n sub-data strings in the target webpage; arranging each subdata string and the user identification information at the corresponding pattern position according to the arrangement mode to obtain the subdata string and the user identification information; the arrangement mode is that the n sub data strings are arranged into an n multiplied by n data string matrix; each row of the data string matrix comprises different sub data strings in the binary data string; each column of the data string matrix comprises different subdata strings in the binary data string;
the restoring the binary data string to an information index value includes:
for each sub data string, determining a plurality of pattern positions according to the arrangement when the image information includes a plurality of sub parts of the sub data string respectively located at the plurality of pattern positions;
determining the sub data string using the sub portions in the respective pattern positions;
splicing the sub data strings to obtain the binary data string;
and restoring the binary data string into the information index value.
9. The method of claim 8, wherein said determining the sub-string of data using sub-portions in respective pattern locations comprises:
splicing all the sub parts to obtain the subdata string;
and/or the presence of a gas in the gas,
splicing all the sub parts to obtain a partial sub data string; exhausting a plurality of inferred complete sub-data strings based on the partial sub-data strings; and determining the complete subdata string with the corresponding user identification information as the subdata string.
10. An apparatus for generating a watermark for a web page, the apparatus comprising:
the information acquisition module is used for acquiring user identification information, and the user identification information is used for identifying a user logging in a target webpage;
the information conversion module is used for converting the user identification information according to an encrypted watermark format to obtain an encrypted watermark;
a watermark generating module, configured to generate a watermark pattern of the target webpage using the user identification information and the encrypted watermark, where the watermark pattern includes the user identification information and the encrypted watermark in plaintext;
the information conversion module is used for:
generating information index values corresponding to the user identification information, wherein the information index values corresponding to different user identification information are different;
converting the information index value into a binary data string with preset digits;
and representing the binary data string in a preset representation mode to obtain the encrypted watermark.
11. An apparatus for parsing a watermark of a web page, the apparatus comprising:
the image acquisition module is used for acquiring image information of a target webpage, the target webpage comprises a watermark pattern generated by using user identification information and an encrypted watermark, the encrypted watermark is obtained by converting the user identification information logged in the target webpage according to an encrypted watermark format, and the watermark pattern comprises the user identification information and the encrypted watermark in plain text; converting the user identification information according to the encryption watermark format, including: generating information index values corresponding to the user identification information, wherein the information index values corresponding to different user identification information are different; converting the information index value into a binary data string with preset digits; representing the binary data string in a preset representation mode to obtain the encrypted watermark;
the image analysis module is used for analyzing the image information to obtain the watermark pattern;
and the watermark reduction module is used for reducing the encrypted watermark in the watermark pattern to obtain the user identification information for logging in the target webpage.
12. An apparatus for generating a watermark for a web page, the apparatus comprising a processor and a memory; the memory stores a program that is loaded and executed by the processor to implement the watermark generation method of the web page according to any one of claims 1 to 5.
13. An apparatus for analyzing a watermark of a web page, the apparatus comprising a processor and a memory; the memory stores a program that is loaded and executed by the processor to implement the watermark parsing method of the web page according to any one of claims 6 to 9.
14. A computer-readable storage medium, characterized in that the storage medium stores a program which, when executed by a processor, is used to implement the watermark generation method of a web page according to any one of claims 1 to 5; or, implementing a watermark parsing method of a web page according to any one of claims 6 to 9.
CN201910547456.2A 2019-06-24 2019-06-24 Webpage watermark generation method, watermark analysis method, device and storage medium Active CN110245469B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910547456.2A CN110245469B (en) 2019-06-24 2019-06-24 Webpage watermark generation method, watermark analysis method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910547456.2A CN110245469B (en) 2019-06-24 2019-06-24 Webpage watermark generation method, watermark analysis method, device and storage medium

Publications (2)

Publication Number Publication Date
CN110245469A CN110245469A (en) 2019-09-17
CN110245469B true CN110245469B (en) 2021-06-18

Family

ID=67888882

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910547456.2A Active CN110245469B (en) 2019-06-24 2019-06-24 Webpage watermark generation method, watermark analysis method, device and storage medium

Country Status (1)

Country Link
CN (1) CN110245469B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11537689B2 (en) * 2019-10-10 2022-12-27 Baidu Usa Llc Method and system for signing an artificial intelligence watermark using a kernel
CN110909320B (en) * 2019-10-18 2022-03-15 北京字节跳动网络技术有限公司 Webpage watermark tamper-proofing method, device, medium and electronic equipment
CN111191414B (en) * 2019-11-11 2021-02-02 苏州亿歌网络科技有限公司 Page watermark generation method, identification method, device, equipment and storage medium
CN111488559B (en) * 2020-04-10 2023-03-10 腾讯科技(深圳)有限公司 Webpage watermark generation method and device, computer equipment and storage medium
CN111680273B (en) * 2020-05-21 2023-07-07 北京北信源软件股份有限公司 Watermark embedding method, watermark embedding device, electronic equipment and readable storage medium
CN112100583A (en) * 2020-09-23 2020-12-18 上海英方软件股份有限公司 Method and device for generating Web visual watermark
CN112800396B (en) * 2021-02-08 2023-10-27 北京百度网讯科技有限公司 Page watermark generation method, device, equipment, storage medium and program product
CN113672880B (en) * 2021-08-24 2024-06-18 联仁健康医疗大数据科技股份有限公司 File leakage prevention method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105631355A (en) * 2015-12-18 2016-06-01 北京奇虎科技有限公司 Data processing method and device
CN109190340A (en) * 2018-09-13 2019-01-11 中国农业银行股份有限公司 A kind of webpage digital watermarking generates, identification, Method of printing and device
CN109190339A (en) * 2018-09-13 2019-01-11 中国农业银行股份有限公司 A kind of webpage digital watermarking image generates, identification, Method of printing and device
CN109919823A (en) * 2019-02-13 2019-06-21 阿里巴巴集团控股有限公司 A kind of watermark generation method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109427029A (en) * 2017-08-21 2019-03-05 苏宁云商集团股份有限公司 A kind of method and device generating watermark
CN108055493B (en) * 2017-12-13 2020-06-30 苏州科达科技股份有限公司 Method and device for embedding watermark in video image
CN108391078B (en) * 2018-02-26 2020-10-27 苏州科达科技股份有限公司 Method, system, equipment and storage medium for determining watermark embedding position in video
CN108985081B (en) * 2018-07-06 2022-02-01 泰康保险集团股份有限公司 Watermark encryption method, device, medium and electronic equipment
CN109767375B (en) * 2018-12-06 2022-12-13 北京北信源信息安全技术有限公司 Image watermark embedding and tracing method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105631355A (en) * 2015-12-18 2016-06-01 北京奇虎科技有限公司 Data processing method and device
CN109190340A (en) * 2018-09-13 2019-01-11 中国农业银行股份有限公司 A kind of webpage digital watermarking generates, identification, Method of printing and device
CN109190339A (en) * 2018-09-13 2019-01-11 中国农业银行股份有限公司 A kind of webpage digital watermarking image generates, identification, Method of printing and device
CN109919823A (en) * 2019-02-13 2019-06-21 阿里巴巴集团控股有限公司 A kind of watermark generation method and device

Also Published As

Publication number Publication date
CN110245469A (en) 2019-09-17

Similar Documents

Publication Publication Date Title
CN110245469B (en) Webpage watermark generation method, watermark analysis method, device and storage medium
US11704764B2 (en) Method and system for generating watermark on the basis of graphic, terminal, and medium
CN108985066B (en) Intelligent contract security vulnerability detection method, device, terminal and storage medium
CN108629727B (en) Method, terminal and medium for generating watermark according to color
CN110968847A (en) File watermark hiding and analyzing method, device, equipment and storage medium
CN114626079A (en) File viewing method, device, equipment and storage medium based on user permission
CN110069907A (en) Big data source tracing method and system based on digital watermarking
CN113221190A (en) Electronic signature method, device and system of PDF file and storage medium
CN111783119A (en) Form data security control method and device, electronic equipment and storage medium
CN116702103A (en) Database watermark processing method, database watermark tracing method and device
WO2018153299A1 (en) Image processing method and apparatus, and storage medium
CN115982675A (en) Document processing method, device, electronic equipment and storage medium
CN116127419A (en) Data processing method, data identification method, font file generation method and device
CN114722361A (en) Data protection method, device, equipment and storage medium based on Morse coding
CN114329030A (en) Information processing method and device, computer equipment and storage medium
CN115099200B (en) Tamper-proof text processing method and device and computer equipment
CN113177214A (en) Image publishing and auditing method, related device and computer program product
CN110599271A (en) Bill detection method and device, computer equipment and storage medium
US20230026954A1 (en) Method for embedding user information in webpages and electronic device implementing method
CN115134473B (en) Image encryption method and device
CN117113302B (en) Text watermark generation method and text verification method
CN114121049B (en) Data processing method, device and storage medium
US20220224801A1 (en) Data embedding and data extraction in image
TWI514310B (en) Method for generating electronic transcript and withdrawing verification of electronic transcript, and method for generating verification code of electronic transcript
CN115952554A (en) Electronic signature data processing method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201117

Address after: Room 708, Ruiqi building, building 11, no.668, Fengting Avenue, Suzhou Industrial Park, Suzhou, Jiangsu Province, 215000

Applicant after: Ruishi (Suzhou) video technology Co., Ltd

Applicant after: SUZHOU KEDA TECHNOLOGY Co.,Ltd.

Address before: 215000 Unit 04, 13th Floor, Building 388 A, Xinping Street, Suzhou Industrial Park, Jiangsu Province

Applicant before: Suzhou Ruiweibo Technology Co.,Ltd.

Applicant before: SUZHOU KEDA TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant