CN116596736B - Hidden watermark generation method, device and equipment of webpage system and storage medium - Google Patents

Hidden watermark generation method, device and equipment of webpage system and storage medium Download PDF

Info

Publication number
CN116596736B
CN116596736B CN202310642122.XA CN202310642122A CN116596736B CN 116596736 B CN116596736 B CN 116596736B CN 202310642122 A CN202310642122 A CN 202310642122A CN 116596736 B CN116596736 B CN 116596736B
Authority
CN
China
Prior art keywords
canvas
preset
pixel
hidden watermark
pixel points
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
CN202310642122.XA
Other languages
Chinese (zh)
Other versions
CN116596736A (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.)
China Construction Third Engineering Bureau Information Technology Co ltd
Original Assignee
China Construction Third Engineering Bureau Information 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 China Construction Third Engineering Bureau Information Technology Co ltd filed Critical China Construction Third Engineering Bureau Information Technology Co ltd
Priority to CN202310642122.XA priority Critical patent/CN116596736B/en
Publication of CN116596736A publication Critical patent/CN116596736A/en
Application granted granted Critical
Publication of CN116596736B publication Critical patent/CN116596736B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to a hidden watermark generation method, a device, equipment and a storage medium of a webpage system, wherein the method comprises the following steps: generating a first canvas and a second canvas with preset sizes, and writing user information into the second canvas; modifying the pixel value of the first canvas by taking the second canvas as a reference, and generating a hidden watermark picture according to the modified first canvas; and fusing the hidden watermark picture to the background of all pages of the webpage information system. The hidden watermark generation method, the device, the equipment and the storage medium of the webpage system provided by the invention generate the first canvas and the second canvas, write the user information into the second canvas, determine the hidden watermark picture through the first canvas and the second canvas, fuse the hidden watermark picture to the background of all pages of the webpage information system, set hidden watermarks for any form of webpage information system and have wide application range.

Description

Hidden watermark generation method, device and equipment of webpage system and storage medium
Technical Field
The present invention relates to the field of watermark generation technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating hidden watermarks in a web page system.
Background
With the development of information dissemination technology, information copyright protection is an urgent problem to be solved. In the digital transformation of enterprises, web-based information systems are widely used. The mode can be accessed by supporting a browser through cross-platform and cross-equipment, changes the traditional office mode, improves the efficiency, and also introduces a security problem which cannot be ignored. Many web page information systems encounter situations where data is leaked to the social platform by a screenshot, but enterprises cannot track the person responsible for the leakage.
In order to solve the problem, in the prior art, watermarks are added in a webpage information system, in order to improve the confidentiality, safety and attractiveness of the watermarks, in the prior art, an informationized constructor introduces a hidden watermark scheme into the webpage information system, and hidden watermarks, namely watermarks invisible to naked eyes, can be extracted only by a specific tool.
However, the existing hidden watermark scheme is an information security technology based on information hiding, which embeds encrypted information into digital products, is generally applied to image anti-counterfeiting, is limited in application in a webpage information system based on characters, and cannot be interpreted if a picture is not included in a compromised picture.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a method, a device, an apparatus and a storage medium for generating hidden watermarks of a web page system, so as to solve the problems that the hidden watermark scheme in the prior art can only be applied to image anti-counterfeiting, is not applicable to a web page information system based on characters, and has a narrow application range.
In order to achieve the technical purpose, the invention adopts the following technical scheme:
in a first aspect, the present invention provides a method for generating a hidden watermark in a web page system, including:
generating a first canvas and a second canvas with preset sizes, and writing user information into the second canvas;
modifying the pixel value of the first canvas by taking the second canvas as a reference, and generating a hidden watermark picture according to the modified first canvas;
and fusing the hidden watermark picture to the background of all pages of the webpage information system.
In some possible implementations, generating a first canvas and a second canvas of a preset size, writing user information to the second canvas, includes:
generating a first canvas and a second canvas with preset sizes through a preset webpage script;
setting the background of the first canvas as a preset background color, and setting the background of the second canvas as transparent;
and writing the user information into the second canvas in a preset text color.
In some possible implementations, modifying the pixel value of the first canvas with reference to the second canvas, generating the hidden watermark picture according to the modified first canvas includes:
traversing all pixel points in the second canvas, and judging whether the transparency of the pixel points is zero or not;
when the transparency of the pixel points is zero, processing the pixel points at the corresponding positions in the first canvas according to a first preset rule;
when the transparency of the pixel points is not zero, processing the pixel points at the corresponding positions in the first canvas according to a second preset rule;
and converting the modified first canvas into a hidden watermark picture through a preset method.
In some possible implementations, when the transparency of the pixel point is zero, processing the pixel point at the corresponding position in the first canvas according to a first preset rule includes:
if the sum of the pixel values of the pixel points at the corresponding positions in the first canvas can be divided by the preset integer, the pixel values of the pixel points at the corresponding positions are increased or decreased by the preset value randomly, so that the sum of the pixel values of the pixel points at the corresponding positions can not be divided by the preset integer.
In some possible implementations, when the transparency of the pixel point is not zero, processing the pixel point at the corresponding position in the first canvas according to a second preset rule includes:
if the sum of the pixel values of the pixel points at the corresponding positions in the first canvas cannot be divided by the preset integer, randomly increasing or decreasing the pixel values of the pixel points at the corresponding positions by the preset value, so that the sum of the pixel values of the pixel points at the corresponding positions can be divided by the preset integer.
In some possible implementations, fusing the hidden watermark picture to the background of all pages of the web page information system includes:
deleting the background colors of the root elements of all pages in the webpage information system;
tiling the hidden watermark picture to the background of all pages of the webpage information system;
and deleting the background colors of the sub-elements of all pages of the webpage information system.
In some possible implementations, generating a first canvas and a second canvas of a preset size, writing user information to the second canvas, previously includes:
and verifying the user login information, and collecting the user information after the user logs in the webpage information system.
In a second aspect, the present invention further provides a hidden watermark generating device of a web page system, including:
the generating module is used for generating a first canvas and a second canvas with preset sizes and writing user information into the second canvas;
the modification module is used for modifying the pixel value of the first canvas by taking the second canvas as a reference, and generating a hidden watermark picture according to the modified first canvas;
and the fusion module is used for fusing the hidden watermark pictures to the backgrounds of all pages of the webpage information system.
In a third aspect, the invention also provides an electronic device comprising a memory and a processor, wherein,
a memory for storing a program;
and the processor is coupled with the memory and is used for executing the program stored in the memory to realize the steps in the hidden watermark generation method of the webpage system in any implementation mode.
In a fourth aspect, the present invention further provides a computer readable storage medium, configured to store a computer readable program or instructions, where the program or instructions, when executed by a processor, implement the steps in a hidden watermark generating method of a web page system in any of the above implementations.
The beneficial effects of adopting the embodiment are as follows: the invention relates to a hidden watermark generation method, a device, equipment and a storage medium of a webpage system, wherein the method comprises the following steps: generating a first canvas and a second canvas with preset sizes, and writing user information into the second canvas; modifying the pixel value of the first canvas by taking the second canvas as a reference, and generating a hidden watermark picture according to the modified first canvas; and fusing the hidden watermark picture to the background of all pages of the webpage information system. The hidden watermark generation method, the device, the equipment and the storage medium of the webpage system provided by the invention generate the first canvas and the second canvas, write the user information into the second canvas, determine the hidden watermark pictures through the first canvas and the second canvas, fuse the hidden watermark pictures to the backgrounds of all pages of the webpage information system, finally set hidden watermarks in the backgrounds of the webpage information system, set hidden watermarks for any form of webpage information system, and have wide application range.
Drawings
FIG. 1 is a flowchart illustrating an embodiment of a hidden watermark generating method of a web page system according to the present invention;
FIG. 2 is a flowchart illustrating an embodiment of the step S101 in FIG. 1;
FIG. 3 is a flowchart illustrating an embodiment of the step S102 in FIG. 1;
FIG. 4 is a flowchart illustrating an embodiment of the step S103 in FIG. 1;
FIG. 5 is a schematic diagram illustrating an embodiment of a hidden watermark generating apparatus of a web page system according to the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form a part hereof, and together with the description serve to explain the principles of the invention, and are not intended to limit the scope of the invention.
In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the invention. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The invention provides a hidden watermark generation method, device and equipment of a webpage system and a storage medium, and the hidden watermark generation method, device and equipment and the storage medium are respectively described below.
Referring to fig. 1, fig. 1 is a flowchart illustrating an embodiment of a hidden watermark generating method of a web page system according to the present invention, and a specific embodiment of the present invention discloses a hidden watermark generating method of a web page system, including:
s101, generating a first canvas and a second canvas with preset sizes, and writing user information into the second canvas;
s102, modifying pixel values of a first canvas by taking a second canvas as a reference, and generating a hidden watermark picture according to the modified first canvas;
s103, fusing the hidden watermark pictures to the backgrounds of all pages of the webpage information system.
In the above embodiment, the pixel dot size with the preset size of 250×90 is completely the same as the size of the generated first canvas and the second canvas, but the colors are different, after the user information is obtained, the user information is written into the second canvas, that is, the pixel value of the second canvas is changed according to the user information.
Because the user information is on the second canvas, the second canvas is traversed by taking the second canvas as a reference, the pixel values of the pixel points at the corresponding positions in the first canvas are modified according to the pixel values in the second canvas, the modified first canvas has the user information, and then the modified first canvas is converted into the hidden watermark picture.
The background of all pages of the webpage information system is queried, and hidden watermark pictures are fused into the background of the page, and whether the webpage information system is text or pictures are provided with the background, so that the hidden watermark is fused into the background of the page, the watermark can be arranged on any kind of webpage information system, and the problem that the hidden watermark cannot be arranged on the webpage system with the text as a main part in the prior art is solved.
Compared with the prior art, the hidden watermark generation method of the webpage system provided by the embodiment comprises the following steps: generating a first canvas and a second canvas with preset sizes, and writing user information into the second canvas; modifying the pixel value of the first canvas by taking the second canvas as a reference, and generating a hidden watermark picture according to the modified first canvas; and fusing the hidden watermark picture to the background of all pages of the webpage information system. The hidden watermark generation method, the device, the equipment and the storage medium of the webpage system provided by the invention generate the first canvas and the second canvas, write the user information into the second canvas, determine the hidden watermark pictures through the first canvas and the second canvas, fuse the hidden watermark pictures to the backgrounds of all pages of the webpage information system, finally set hidden watermarks in the backgrounds of the webpage information system, set hidden watermarks for any form of webpage information system, and have wide application range.
Referring to fig. 2, fig. 2 is a flowchart of an embodiment of step S101 in fig. 1, in a possible embodiment of the present invention, generating a first canvas and a second canvas with preset dimensions, and writing user information into the second canvas, including:
s201, generating a first canvas and a second canvas with preset sizes through preset webpage scripts;
s202, setting the background of the first canvas as a preset background color, and setting the background of the second canvas as transparent;
s203, writing the user information into the second canvas in a preset text color.
In the above embodiment, the preset web script may be outside the visible area of the browser, and the first canvas and the second canvas of 250×90 are temporarily drawn, and since the color of the web information system is generally white, the preset background color in the present invention is also set to be white, and it can be understood that the preset background color in the present invention may also be other colors, and may be adjusted according to the color of the web information system.
It should be noted that, the preset webpage script is in the prior art, and only the canvas with the preset size is drawn outside the visible area of the browser through the preset webpage script, which is not described in detail in the present invention.
As a preferred embodiment, the preset text color in the scheme is black, and writing the user information into the second canvas can also be realized by calling a browser canvas to write text through a webpage script in the prior art, which is not repeated in the invention. After the user information is written into the second canvas, the color of the text is black, and the background outside the text is kept transparent.
Referring to fig. 3, fig. 3 is a flowchart of an embodiment of step S102 in fig. 1, in a possible embodiment of the present invention, modifying pixel values of a first canvas based on a second canvas, and generating a hidden watermark picture according to the modified first canvas includes:
s301, traversing all pixel points in the second canvas, and judging whether the transparency of the pixel points is zero or not;
s302, when the transparency of the pixel points is zero, processing the pixel points at the corresponding positions in the first canvas according to a first preset rule;
s303, when the transparency of the pixel points is not zero, processing the pixel points at the corresponding positions in the first canvas according to a second preset rule;
s304, converting the modified first canvas into a hidden watermark picture through a preset method.
In the above embodiment, according to the RGB three-primary principle, the pixel color value of each point in any canvas can be decomposed into 4 channel values: r (Red), G (Green), B (Blue), A (Alpha) represent Red, green, blue, transparency, respectively. Wherein the value range of R, G, B is 0-255, and the value range of A is 0-1. That is, the pixel color value of any one pixel point can be represented by an object of (r, g, b, a). For example, the color value of one white pixel may be expressed as (255, 255, 255, 1), the color value of one black pixel may be expressed as (0, 0,0, 1), and the color value of one transparent pixel may be expressed as (0, 0,0, 0). Where V_A (x, y) is used to represent the pixel color value of any point in the first canvas and V_B (x, y) is used to represent the color value of any point in the second canvas, where 0.ltoreq.x <250,0.ltoreq.y <90.
The color of the first canvas is white, the pixel value of the pixel point of the first canvas is (255, 255, 255, 1), the second canvas is a transparent canvas written with user information, the pixel value of the pixel point of the second canvas is the pixel value (0, 0,0, 1) of the black pixel point written with the user information part or the pixel value (0, 0,0, 0) of the transparent pixel point, and each pixel point pixel value in the second canvas is traversed in sequence by taking the second canvas as a reference.
And when traversing the second canvas, firstly determining whether the transparency value of the current pixel point is 0 or 1, and processing the pixel point at the corresponding position in the first canvas in different modes according to different transparency values of the pixel point.
After traversing all pixel points of the second canvas, obtaining a modified first canvas, wherein the color value of each pixel point in the first canvas is represented to contain watermark information if R+G+B can be divided by 3; if R+G+B is not divisible by 3, it indicates that the watermark information is not contained. The content of the first canvas is converted into a hidden watermark picture by using a browser provided method and is stored in an information system foreground page.
It may be appreciated that the preset method is to convert the content of the first canvas into the hidden watermark picture by using a method provided by the browser, which is not further limited by the present invention.
In a possible embodiment of the present invention, when the transparency of the pixel point is zero, processing the pixel point at the corresponding position in the first canvas according to a first preset rule includes:
if the sum of the pixel values of the pixel points at the corresponding positions in the first canvas can be divided by the preset integer, the pixel values of the pixel points at the corresponding positions are increased or decreased by the preset value randomly, so that the sum of the pixel values of the pixel points at the corresponding positions can not be divided by the preset integer.
In the above embodiment, when the transparency of the pixel color value of v_b (x, y) in the second canvas is 0, that is, v_b (x, y) is (0, 0,0, 0), it is described that there is no text watermark information, whether the sum of r+g+b in the pixel value of v_a (x, y) is divisible by a preset integer is determined first, and if divisible by a preset integer, the pixel color value (R, G, B) of v_a (x, y) is randomly increased by a preset value (guaranteed to not exceed 255) or decreased by a preset value (guaranteed to be greater than 0) to ensure that the sum of r+g+b of the corresponding pixel color value v_a (x, y) of the first canvas is not divisible by the preset integer.
As a preferred embodiment, the preset integer is 3 and the preset value is 1 or 2. In this embodiment, the first canvas is white, and its pixel value is (255, 255, 255, 1), and since 255+255+255 can be divided by 3, v_a (j, k) = (255, 254, 255, 1), or v_a (j, k) = (254, 255, 255, 1), or v_a (j, k) = (255, 255, 254, 1) is obtained through the above random operation.
In a possible embodiment of the present invention, when the transparency of the pixel point is not zero, processing the pixel point at the corresponding position in the first canvas according to the second preset rule includes:
if the sum of the pixel values of the pixel points at the corresponding positions in the first canvas cannot be divided by the preset integer, randomly increasing or decreasing the pixel values of the pixel points at the corresponding positions by the preset value, so that the sum of the pixel values of the pixel points at the corresponding positions can be divided by the preset integer.
In the above embodiment, when the transparency in the pixel color value of v_b (x, y) in the second canvas is not 0, i.e., v_b (x, y) is (0, 0,0, 1), then it is explained that text watermark information is contained therein, and the same operation (randomly adding 1 plus 2 minus 1 minus 2) is performed on the corresponding pixel color value of v_a (x, y) to ensure that the sum of r+g+b of the pixel color value v_a (x, y) of the a canvas can be divided by 3. The first canvas in the present invention is white, v_a (x, y) = (255, 255, 255, 1), no operation is necessary because 255+255+255 is already divisible by 3.
Referring to fig. 4, fig. 4 is a flowchart of an embodiment of step S103 in fig. 1, in a possible embodiment of the present invention, fusing hidden watermark pictures to the background of all pages of the web page information system includes:
s401, deleting the background colors of the root elements of all pages in the webpage information system;
s402, tiling the hidden watermark picture to the background of all pages of the webpage information system;
s403, deleting the sub-element background colors of all pages of the webpage information system.
In the above embodiment, after the pixel value of the first canvas is adjusted to obtain the hidden watermark picture, a web script is used to call a browser method to remove the background color of the root elements of all pages of the web information system, and then the background is changed into the generated hidden watermark picture to be tiled repeatedly. And finally deleting the background color of the sub-element in the webpage of the webpage information system to finish the fusion process of the hidden watermark. At this time, the background color is still white (because of the slight difference of the values of RGB, the naked eyes of the human cannot distinguish), but the hidden watermark picture is tiled repeatedly in the real background.
In a possible embodiment of the present invention, generating a first canvas and a second canvas of a preset size, writing user information into the second canvas, includes:
and verifying the user login information, and collecting the user information after the user logs in the webpage information system.
In the above embodiment, after the user logs in the webpage information system by using the mobile phone number, the password and the mobile phone verification code, the webpage information system is checked in the background, the user information (such as the user name) is matched through the mobile phone number of the user, then the user information is transferred to the foreground page of the webpage information system in an interface calling mode, and after the foreground page obtains the user information (such as the user name and the mobile phone number), a first canvas and a second canvas are generated, and the user information is written into the second canvas.
It should be noted that, the user information in the present solution may take different other information capable of identifying the uniqueness of the user according to the need, which is not further limited by the present invention.
In order to better implement the hidden watermark generation method of the web page system in the embodiment of the present invention, referring to fig. 5 correspondingly on the basis of the hidden watermark generation method of the web page system, fig. 5 is a schematic structural diagram of an embodiment of the hidden watermark generation device of the web page system provided by the present invention, and the embodiment of the present invention provides a hidden watermark generation device 500 of the web page system, including:
a generating module 510, configured to generate a first canvas and a second canvas with preset sizes, and write user information into the second canvas;
the modification module 520 is configured to modify a pixel value of the first canvas with the second canvas as a reference, and generate a hidden watermark picture according to the modified first canvas;
and the fusion module 530 is used for fusing the hidden watermark pictures to the backgrounds of all pages of the webpage information system.
What needs to be explained here is: the apparatus 500 provided in the foregoing embodiments may implement the technical solutions described in the foregoing method embodiments, and the specific implementation principles of the foregoing modules or units may be referred to the corresponding content in the foregoing method embodiments, which is not described herein again.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the invention. Based on the hidden watermark generation method of the webpage system, the invention also correspondingly provides hidden watermark generation equipment of the webpage system, and the hidden watermark generation equipment of the webpage system can be computing equipment such as a mobile terminal, a desktop computer, a notebook computer, a palm computer, a server and the like. The hidden watermark generating device of the web page system includes a processor 610, a memory 620, and a display 630. Fig. 6 shows only some of the components of the electronic device, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may alternatively be implemented.
The memory 620 may in some embodiments be an internal storage unit of the hidden watermark generating device of the web page system, such as a hard disk or a memory of the hidden watermark generating device of the web page system. The memory 620 may also be an external storage device of the hidden watermark generating device of the web page system, for example, a plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash Card (Flash Card) or the like. Further, the memory 620 may also include both an internal storage unit and an external storage device of the hidden watermark generating device of the web page system. The memory 620 is used for storing application software of the hidden watermark generating apparatus installed in the web page system and various data, such as program codes of the hidden watermark generating apparatus installed in the web page system. The memory 620 may also be used to temporarily store data that has been output or is to be output. In an embodiment, the memory 620 stores a hidden watermark generating program 640 of the web page system, where the hidden watermark generating program 640 of the web page system is executable by the processor 610, so as to implement the hidden watermark generating method of the web page system according to embodiments of the present application.
The processor 610 may be a central processing unit (Central Processing Unit, CPU), microprocessor or other data processing chip in some embodiments for executing program code or processing data stored in the memory 620, such as performing the hidden watermark generation method of a web page system, etc.
The display 630 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like in some embodiments. The display 630 is used to display information at the hidden watermark generating device of the web page system and to display a visual user interface. The components 610-630 of the hidden watermark generating device of the netpage system communicate with each other via a system bus.
In one embodiment, the steps in the hidden watermark generation method for a web page system as described above are implemented when the processor 610 executes the hidden watermark generation program 640 for a web page system in the memory 620.
The present embodiment also provides a computer-readable storage medium having stored thereon a hidden watermark generation program of a web page system, which when executed by a processor, implements the steps of:
generating a first canvas and a second canvas with preset sizes, and writing user information into the second canvas;
modifying the pixel value of the first canvas by taking the second canvas as a reference, and generating a hidden watermark picture according to the modified first canvas;
and fusing the hidden watermark picture to the background of all pages of the webpage information system.
In summary, the method, device, equipment and storage medium for generating hidden watermarks in a web page system provided in this embodiment include: generating a first canvas and a second canvas with preset sizes, and writing user information into the second canvas; modifying the pixel value of the first canvas by taking the second canvas as a reference, and generating a hidden watermark picture according to the modified first canvas; and fusing the hidden watermark picture to the background of all pages of the webpage information system. The hidden watermark generation method, the device, the equipment and the storage medium of the webpage system provided by the invention generate the first canvas and the second canvas, write the user information into the second canvas, determine the hidden watermark pictures through the first canvas and the second canvas, fuse the hidden watermark pictures to the backgrounds of all pages of the webpage information system, finally set hidden watermarks in the backgrounds of the webpage information system, set hidden watermarks for any form of webpage information system, and have wide application range.
The present invention is not limited to the above-mentioned embodiments, and any changes or substitutions that can be easily understood by those skilled in the art within the technical scope of the present invention are intended to be included in the scope of the present invention.

Claims (7)

1. The hidden watermark generation method of the webpage system is characterized by comprising the following steps of:
generating a first canvas and a second canvas with preset sizes, and writing user information into the second canvas;
modifying the pixel value of the first canvas by taking the second canvas as a reference, and generating a hidden watermark picture according to the modified first canvas;
fusing the hidden watermark pictures to the backgrounds of all pages of a webpage information system;
the modifying the pixel value of the first canvas by taking the second canvas as a reference, and generating the hidden watermark picture according to the modified first canvas comprises the following steps:
traversing all pixel points in the second canvas, and judging whether the transparency of the pixel points is zero or not;
when the transparency of the pixel points is zero, processing the pixel points at the corresponding positions in the first canvas according to a first preset rule;
when the transparency of the pixel points is not zero, processing the pixel points at the corresponding positions in the first canvas according to a second preset rule;
converting the modified first canvas into a hidden watermark picture by a preset method;
when the transparency of the pixel point is zero, processing the pixel point at the corresponding position in the first canvas according to a first preset rule, including:
if the sum of the pixel values of the pixel points at the corresponding positions in the first canvas can be divided by a preset integer, randomly increasing or decreasing the pixel values of the pixel points at the corresponding positions by a preset value, so that the sum of the pixel values of the pixel points at the corresponding positions can not be divided by the preset integer;
when the transparency of the pixel point is not zero, processing the pixel point at the corresponding position in the first canvas according to a second preset rule, including:
if the sum of the pixel values of the pixel points at the corresponding positions in the first canvas can not be divided by the preset integer, randomly increasing or decreasing the pixel values of the pixel points at the corresponding positions by a preset value, so that the sum of the pixel values of the pixel points at the corresponding positions can be divided by the preset integer.
2. The hidden watermark generating method of a web page system according to claim 1, wherein the generating a first canvas and a second canvas of a preset size, writing user information into the second canvas, comprises:
generating a first canvas and a second canvas with preset sizes through a preset webpage script;
setting the background of the first canvas as a preset background color, and setting the background of the second canvas as transparent;
and writing the user information into the second canvas in a preset text color.
3. The hidden watermark generation method of a web page system according to claim 1, wherein the fusing the hidden watermark picture to the background of all pages of a web page information system comprises:
deleting the background colors of the root elements of all pages in the webpage information system;
tiling the hidden watermark picture to the backgrounds of all pages of the webpage information system;
and deleting the sub-element background colors of all pages of the webpage information system.
4. The hidden watermark generating method of a web page system according to claim 1, wherein the generating a first canvas and a second canvas of a preset size, writing user information into the second canvas, previously comprises:
and verifying user login information, and collecting user information after the user logs in the webpage information system.
5. A hidden watermark generating apparatus for a web page system, comprising:
the generation module is used for generating a first canvas and a second canvas with preset sizes and writing user information into the second canvas;
the modification module is used for modifying the pixel value of the first canvas by taking the second canvas as a reference, and generating a hidden watermark picture according to the modified first canvas;
the fusion module is used for fusing the hidden watermark pictures to the backgrounds of all pages of the webpage information system;
the modifying the pixel value of the first canvas by taking the second canvas as a reference, and generating the hidden watermark picture according to the modified first canvas comprises the following steps:
traversing all pixel points in the second canvas, and judging whether the transparency of the pixel points is zero or not;
when the transparency of the pixel points is zero, processing the pixel points at the corresponding positions in the first canvas according to a first preset rule;
when the transparency of the pixel points is not zero, processing the pixel points at the corresponding positions in the first canvas according to a second preset rule;
converting the modified first canvas into a hidden watermark picture by a preset method;
when the transparency of the pixel point is zero, processing the pixel point at the corresponding position in the first canvas according to a first preset rule, including:
if the sum of the pixel values of the pixel points at the corresponding positions in the first canvas can be divided by a preset integer, randomly increasing or decreasing the pixel values of the pixel points at the corresponding positions by a preset value, so that the sum of the pixel values of the pixel points at the corresponding positions can not be divided by the preset integer;
when the transparency of the pixel point is not zero, processing the pixel point at the corresponding position in the first canvas according to a second preset rule, including:
if the sum of the pixel values of the pixel points at the corresponding positions in the first canvas can not be divided by the preset integer, randomly increasing or decreasing the pixel values of the pixel points at the corresponding positions by a preset value, so that the sum of the pixel values of the pixel points at the corresponding positions can be divided by the preset integer.
6. An electronic device comprising a memory and a processor, wherein,
the memory is used for storing programs;
the processor, coupled to the memory, is configured to execute the program stored in the memory to implement the steps in the hidden watermark generation method of the web page system as claimed in any one of claims 1 to 4.
7. A computer readable storage medium storing a computer readable program or instructions which, when executed by a processor, is capable of carrying out the steps of the hidden watermark generation method of a netpage system according to any one of claims 1 to 4.
CN202310642122.XA 2023-06-01 2023-06-01 Hidden watermark generation method, device and equipment of webpage system and storage medium Active CN116596736B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310642122.XA CN116596736B (en) 2023-06-01 2023-06-01 Hidden watermark generation method, device and equipment of webpage system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310642122.XA CN116596736B (en) 2023-06-01 2023-06-01 Hidden watermark generation method, device and equipment of webpage system and storage medium

Publications (2)

Publication Number Publication Date
CN116596736A CN116596736A (en) 2023-08-15
CN116596736B true CN116596736B (en) 2024-03-22

Family

ID=87611603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310642122.XA Active CN116596736B (en) 2023-06-01 2023-06-01 Hidden watermark generation method, device and equipment of webpage system and storage medium

Country Status (1)

Country Link
CN (1) CN116596736B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102231836A (en) * 2011-06-27 2011-11-02 深圳市茁壮网络股份有限公司 Graphics interchange format (GIF) file processing method and device for digital television system
CN108230221A (en) * 2017-05-17 2018-06-29 深圳市创梦天地科技有限公司 Watermark generation method and device, terminal
CN110246076A (en) * 2019-05-21 2019-09-17 宁波大学 The high dynamic range images water mark method decomposed based on Tucker
CN113436052A (en) * 2021-06-23 2021-09-24 网易(杭州)网络有限公司 Image processing method and device and electronic equipment
CN114419193A (en) * 2022-01-24 2022-04-29 北京思明启创科技有限公司 Image drawing method, image drawing device, electronic equipment and computer-readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE69943294D1 (en) * 1999-01-25 2011-05-05 Nippon Telegraph & Telephone Method Apparatus and program storage medium for digital watermark embedding and detection
US8538199B2 (en) * 2010-03-29 2013-09-17 Ricoh Productions Print Solutions LLC Digital image scaling with non integer scaling factors
WO2014205460A2 (en) * 2013-05-02 2014-12-24 Waterston Entertainment (Pty) Ltd System and method for incorporating digital footage into a digital cinematographic template
TWI765780B (en) * 2021-07-16 2022-05-21 艾明康生技股份有限公司 Vision test device, method and system and non-transient computer readable recording medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102231836A (en) * 2011-06-27 2011-11-02 深圳市茁壮网络股份有限公司 Graphics interchange format (GIF) file processing method and device for digital television system
CN108230221A (en) * 2017-05-17 2018-06-29 深圳市创梦天地科技有限公司 Watermark generation method and device, terminal
CN110246076A (en) * 2019-05-21 2019-09-17 宁波大学 The high dynamic range images water mark method decomposed based on Tucker
CN113436052A (en) * 2021-06-23 2021-09-24 网易(杭州)网络有限公司 Image processing method and device and electronic equipment
CN114419193A (en) * 2022-01-24 2022-04-29 北京思明启创科技有限公司 Image drawing method, image drawing device, electronic equipment and computer-readable storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Sanjay Kumar,et al..An improved watermarking scheme for color image using alpha blending.《Multimedia Tools and Applications》.2021,全文. *
基于CNN高维超混沌系统图像加密算法;张琴 等;《西安邮电大学学报》;全文 *
用于图像内容认证的半脆弱水印新算法;王友卫 等;《浙江大学学报(工学版)》;全文 *

Also Published As

Publication number Publication date
CN116596736A (en) 2023-08-15

Similar Documents

Publication Publication Date Title
US10068071B2 (en) Screen shot marking and identification for device security
US20170132186A1 (en) Method and System for Selective Document Redaction
CN110245469B (en) Webpage watermark generation method, watermark analysis method, device and storage medium
EP3410685B1 (en) Image processing device, image processing method, and program
US20210090203A1 (en) Method and system for generating watermark on the basis of graphic, terminal, and medium
CN108985066A (en) Intelligent contract security vulnerability detection method, device, terminal and storage medium
CN109753968A (en) Generation method, device, equipment and the medium of character recognition model
CN107025480A (en) Image generating method and its equipment
US8485428B1 (en) Systems and methods for providing security information about quick response codes
CN112650993B (en) Screen watermark display method and device, electronic equipment and storage medium
CN101183458A (en) Picture validation code generating method and device
CN104933375A (en) Method and system for protecting electronic display document
WO2021023085A1 (en) Watermark adding method and apparatus, watermark recognition method and apparatus, and electronic device
CN111222611B (en) Color-based stacked three-dimensional code encoding method, encoding device, decoding method, decoding device and storage medium
CN113486406A (en) Electronic signature protection and restoration method and system, electronic equipment and storage medium
CN110222478A (en) A kind of method and mobile terminal for protecting document
CN116596736B (en) Hidden watermark generation method, device and equipment of webpage system and storage medium
CN105897716A (en) Website login verification code generating method
CN112581344A (en) Image processing method and device, computer equipment and storage medium
CN115659295B (en) Page protection method, device, equipment and storage medium
CN111783119A (en) Form data security control method and device, electronic equipment and storage medium
CN116680580A (en) Information matching method and device based on multi-mode training, electronic equipment and medium
WO2018153299A1 (en) Image processing method and apparatus, and storage medium
CN112037291B (en) Data processing method and device and electronic equipment
CN116681574B (en) Method, device, equipment and storage medium for generating clear watermark of webpage information system

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
GR01 Patent grant
GR01 Patent grant