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.
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:
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.