CN110909320A - Webpage watermark tamper-proofing method, device, medium and electronic equipment - Google Patents

Webpage watermark tamper-proofing method, device, medium and electronic equipment Download PDF

Info

Publication number
CN110909320A
CN110909320A CN201910993496.XA CN201910993496A CN110909320A CN 110909320 A CN110909320 A CN 110909320A CN 201910993496 A CN201910993496 A CN 201910993496A CN 110909320 A CN110909320 A CN 110909320A
Authority
CN
China
Prior art keywords
watermark
object model
document object
webpage
current webpage
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.)
Granted
Application number
CN201910993496.XA
Other languages
Chinese (zh)
Other versions
CN110909320B (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.)
Douyin Vision Co Ltd
Douyin Vision Beijing Co Ltd
Original Assignee
Beijing ByteDance Network 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910993496.XA priority Critical patent/CN110909320B/en
Publication of CN110909320A publication Critical patent/CN110909320A/en
Application granted granted Critical
Publication of CN110909320B publication Critical patent/CN110909320B/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
    • 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/106Enforcing content protection by specific content processing
    • G06F21/1063Personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • 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)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention provides a method, a device, a medium and electronic equipment for preventing webpage watermark from being tampered, wherein the method for preventing webpage watermark from being tampered comprises the following steps: monitoring the change condition of a watermark document object model of the current webpage; according to the change condition of the watermark document object model of the current webpage, identifying the watermark tampering operation on the current webpage to obtain a watermark tampering operation identification result; and processing the watermark document object model of the tampered current webpage according to the watermark tampering operation identification result, and replacing or adding the watermark document object model as a pre-backed watermark document object model. The method can monitor the change condition of the watermark document object model of the current webpage; according to the change condition of the watermark document object model of the current webpage, the watermark tampering operation on the current webpage is identified, and when the watermark tampering operation is identified, the watermark document object model which is backed up in advance is used for replacing or adding, so that the phenomenon that the webpage watermark is tampered is avoided.

Description

Webpage watermark tamper-proofing method, device, medium and electronic equipment
Technical Field
The invention relates to the technical field of computers, in particular to a method, a device, a medium and electronic equipment for preventing webpage watermark from being tampered.
Background
The current web watermarking technology basically creates a DOM structure on a page dynamically, and the background is a piece of personal information related base64 picture.
The existing web page watermarking technology has the following defects:
disadvantage 1: the webpage watermark is easy to be deleted actively by a user;
and (2) disadvantage: easy overlap with other business styles results in style duplications;
disadvantage 3: after the current webpage watermark is tampered, a user cannot know that the current webpage watermark is tampered in time and cannot perform subsequent processing in time.
Therefore, in the long-term research and development, the inventor has conducted a great deal of research on how to prevent the web watermark from being tampered with, and proposes a method for preventing the web watermark from being tampered with, so as to solve one of the above technical problems.
Disclosure of Invention
The invention aims to provide a method, a device, a medium and an electronic device for preventing webpage watermark from being tampered, and at least one technical problem mentioned above can be solved. The specific scheme is as follows:
according to the specific implementation manner of the present invention, in a first aspect, the present invention provides a method for preventing a webpage watermark from being tampered, including:
monitoring the change condition of a watermark document object model of the current webpage;
according to the change condition of the watermark document object model of the current webpage, identifying the watermark tampering operation on the current webpage to obtain a watermark tampering operation identification result;
and processing the watermark document object model of the tampered current webpage according to the watermark tampering operation identification result, and replacing or adding the watermark document object model as a pre-backed watermark document object model.
Optionally, the processing the tampered watermark document object model of the current webpage according to the watermark tampering operation identification result, and replacing or adding the tampered watermark document object model with or as a pre-backed watermark document object model includes:
when the watermark tampering operation identification result is that the current tampering operation is to modify the watermark of the current webpage, processing the tampered watermark document object model of the current webpage and replacing the tampered watermark document object model with a pre-backed watermark document object model; alternatively, the first and second electrodes may be,
and when the watermark tampering operation identification result is that the current tampering operation is to delete the watermark of the current webpage, processing the tampered watermark document object model of the current webpage, and adding a pre-backed watermark document object model to the current webpage.
Optionally, before the monitoring of the change of the watermark document object model of the current webpage, the method further includes:
adding a watermark to the webpage page according to the inline style attribute information corresponding to the watermark document object model, and removing the style name of the watermark from the webpage page.
Optionally, before adding the watermark to the webpage according to the inline style attribute information corresponding to the watermark document object model, the method further includes:
setting the inline style attribute information corresponding to the watermark document object model;
wherein the inline style attribute information at least includes:
the method comprises the following steps of obtaining webpage background information of the watermark, width information of the watermark, height information of the watermark and layout mode information of the watermark in a webpage.
Optionally, before the setting the inline style attribute information corresponding to the watermark document object model, the method further includes:
and dynamically creating the watermark document object model of the current webpage.
Optionally, the dynamically creating the watermark document object model of the current webpage includes:
creating a watermark document object model of preset text content information on a current webpage through a script with a preset format;
acquiring style data corresponding to the inline style attribute information, and adding the style data to the watermark document object model to obtain the watermark document object model added with the style data;
and adding the watermark document object model to the current webpage to obtain the watermark document object model of the current webpage.
Optionally, before the dynamically creating the watermark document object model of the current webpage, the method further includes:
acquiring key information which is associated with the watermark document object model of the current webpage and is used for identifying a user, and converting a text written with the key information into an image in a preset format;
wherein the key information at least comprises:
the employee name information of the user and the employee number information of the user.
According to a second aspect, the present invention provides a device for preventing web watermark from being tampered, including:
the monitoring unit is used for monitoring the change condition of the watermark document object model of the current webpage;
the identification unit is used for identifying the watermark tampering operation on the current webpage according to the change condition of the watermark document object model of the current webpage monitored by the monitoring unit to obtain a watermark tampering operation identification result;
and the processing unit is used for processing the tampered watermark document object model of the current webpage according to the watermark tampering operation identification result identified by the identification unit, and replacing or adding the tampered watermark document object model with or into a pre-backed watermark document object model.
According to a third aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements a method for preventing a watermark of a web page from being tampered with, as described in any of the above.
According to a fourth aspect of the present invention, there is provided an electronic apparatus including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method for webpage watermarking tamper-proofing as described in any of the above.
Compared with the prior art, the scheme of the embodiment of the invention at least has the following beneficial effects: the invention provides a method, a device, a medium and an electronic device for preventing webpage watermark from being tampered, wherein the method comprises the steps of monitoring the change condition of a watermark document object model of a current webpage; according to the change condition of the watermark document object model of the current webpage, the watermark tampering operation on the current webpage is identified, and when the watermark tampering operation is identified, the watermark document object model which is backed up in advance is used for replacing or adding, so that the phenomenon that the webpage watermark is tampered is avoided.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 is a flow chart illustrating a method for preventing web page watermark from being tampered according to an embodiment of the invention;
FIG. 2 is a schematic structural diagram illustrating a device for preventing web watermark from being tampered according to an embodiment of the present invention;
fig. 3 shows a schematic diagram of an electronic device connection structure according to an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, and "a plurality" typically includes at least two.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used to describe … … in embodiments of the present invention, these … … should not be limited to these terms. These terms are used only to distinguish … …. For example, the first … … can also be referred to as the second … … and similarly the second … … can also be referred to as the first … … without departing from the scope of embodiments of the present invention.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that an article or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such article or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in the article or device in which the element is included.
Alternative embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Example 1
As shown in fig. 1, according to an embodiment of the present invention, in a first aspect, the present invention provides a method for preventing a watermark from being tampered, which specifically includes the following steps:
s102: and monitoring the change condition of the watermark document object model of the current webpage.
In the step, the change condition of the watermark document object model of the current webpage is monitored in real time; or monitoring the change condition of the watermark document object model of the current webpage within a preset time period, which is not limited specifically.
In a certain application scene, if need accurately know: the change condition of the watermark document object model of the current webpage can be monitored in real time.
On the contrary, in another application scenario, if the overhead of the server for processing data needs to be reduced, the change condition of the watermark document object model of the current webpage can be monitored within a preset time period; the time interval of the monitoring can be set or adjusted according to different user requirements, which is not described herein again.
S104: and identifying the watermark tampering operation on the current webpage according to the change condition of the watermark document object model of the current webpage to obtain a watermark tampering operation identification result.
In this step, based on the different monitoring results obtained in S102, it can be accurately identified that: and the tamperer performs watermark tampering operation aiming at the watermark tampering operation on the current webpage.
Different from the prior art, the webpage watermark tamper-proofing method provided by the embodiment of the invention can monitor the change condition of the watermark document object model of the current webpage and accurately identify the tampering operation according to the change condition of the watermark document object model of the current webpage.
Under different application scenarios, the identified watermark tampering operation identification result may be: a tamperer executes the tampering operation of modifying the watermark of the current webpage; in addition, the identified watermark tampering operation identification result may be: and the tamperer executes the tampering operation of deleting the watermark of the current webpage.
S106: and processing the watermark document object model of the tampered current webpage according to the watermark tampering operation identification result, and replacing or adding the watermark document object model as a pre-backed watermark document object model.
In this step, when the watermark tampering operation identification result is that the current tampering operation is to modify the watermark of the current webpage, the watermark document object model of the tampered current webpage is processed and replaced by the watermark document object model backed up in advance; alternatively, the first and second electrodes may be,
and when the watermark tampering operation identification result is that the current tampering operation is to delete the watermark of the current webpage, processing the tampered watermark document object model of the current webpage, and adding the pre-backed watermark document object model to the current webpage.
In this step, when the tampering operation of the tamperer is automatically recognized, the tampered watermark document object model of the current webpage is automatically repaired, and the pre-backed watermark document object model is used for replacement or addition, so as to avoid the phenomenon that the webpage watermark is tampered.
Optionally, processing the tampered watermark document object model of the current webpage according to the watermark tampering operation identification result, and replacing or adding the tampered watermark document object model with or as a pre-backed watermark document object model includes:
when the watermark tampering operation identification result is that the current tampering operation is to modify the watermark of the current webpage, processing the tampered watermark document object model of the current webpage and replacing the tampered watermark document object model with a pre-backed watermark document object model; alternatively, the first and second electrodes may be,
and when the watermark tampering operation identification result is that the current tampering operation is to delete the watermark of the current webpage, processing the tampered watermark document object model of the current webpage, and adding the pre-backed watermark document object model to the current webpage.
Optionally, before monitoring a change of the watermark document object model of the current webpage, the method further includes:
and adding the watermark to the webpage according to the inline style attribute information corresponding to the watermark document object model, and removing the style name of the watermark from the webpage.
In this step, in order to prevent an external user from tampering the watermark element using the DOM-related API, the watermark style name is removed using Javascript method remove Attribute ("class"), and there is no change in the watermark before and after the movement.
Optionally, before adding the watermark to the webpage according to the inline style attribute information corresponding to the watermark document object model, the method further includes:
setting the inline style attribute information corresponding to the watermark document object model;
wherein the inline style attribute information at least includes:
webpage background information of the watermark, width information of the watermark, height information of the watermark and layout mode information of the watermark in the webpage.
It should be noted that the inline style is: one way to define the presentation of page elements in a web page is to use style properties directly in the associated tab, rather than written in a style file.
For example: red, color; 20px of margin-left.
Optionally, before setting the inline style attribute information corresponding to the watermark document object model, the method further includes:
and dynamically creating a watermark document object model of the current webpage.
Optionally, dynamically creating the watermark document object model of the current webpage includes:
creating a watermark document object model of preset text content information on a current webpage through a script with a preset format;
acquiring style data corresponding to the inline style attribute information, and adding the style data to the watermark document object model to obtain the watermark document object model added with the style data;
and adding the watermark document object model to the current webpage to obtain the watermark document object model of the current webpage.
Optionally, before dynamically creating the watermark document object model of the current webpage, the method further includes:
acquiring key information which is associated with a watermark document object model of a current webpage and is used for identifying a user, and converting a text for writing the key information into an image in a preset format;
wherein the key information at least comprises:
the employee name information of the user and the employee number information of the user. The above lists only common key information, and there may be other key information, which is not described in detail herein.
In a specific application scenario, the steps of creating the tamper-resistant web watermark provided by the embodiment of the present invention are specifically as follows:
step a, converting a document containing key information (the key information is used for identifying a user, the key information can be a staff name, or the key information can be a staff number) into an image in a preset format, for example, the image in the preset format can be a base64 image.
Note that the base64 image is a representation method for representing binary data based on 64 printable characters. Modern browsers support web pages to directly use base64 encoded strings for picture display.
Step b: and dynamically creating a watermark DOM and setting a corresponding inline style. Creating a watermark on a page through a Javascript script, and adding data such as a style and the like to the watermark; the style attributes involved in the process comprise background, width, height, layout mode and the like, and finally the watermark is added to the page and displayed; wherein, DOM is the document object type, and W3C organizes the recommended standard programming interface for processing extensible markup language, which is used for Javascript operation web pages.
And c, removing the watermark style name by using a Javascript method remove Attribute ("class"), preventing an external user from tampering the watermark element by using a DOM (document object model) related API (application program interface), and ensuring that the watermark is not changed before and after the movement.
And d, judging whether the browser supports the Mutation Observer, if the current browser does not support the API, dynamically loading the compatible code, and actively realizing the API for the browser.
And e, copying and backing up the current watermark DOM to prevent the watermark from being damaged and then being incapable of being recovered due to tampering.
Step f, creating a Mutation Observer object, monitoring the DOM change of the whole page, judging that the changed DOM is the current watermark, and replacing the current page watermark by using a backup if the DOM is a modification action; if the page is deleted, the backup is directly added to the page.
And g, when the operation is finished, notifying the user to support the user to perform subsequent processing on the behavior, for example, reporting the environment information to a third party so as to facilitate the third party to collect the relevant environment data.
It should be noted that the watermark technology in the method for preventing the webpage watermark from being tampered provided by the embodiment of the present invention is an information hiding technology, and the watermark technology is widely applied in the fields of copyright, encryption, transmission, and the like. With the increasing importance on enterprise information security, the watermark technology is also developed, and the method for preventing the webpage watermark from being tampered provided by the embodiment of the invention achieves the purpose that the webpage watermark cannot be tampered through the Mutation Observer technology.
The Mutation Observer is the DOM Level3 Events specification, which is not implemented on older versions of browsers, and the API functions to provide the ability to monitor changes made to the DOM tree.
The embodiment of the invention provides a method for preventing webpage watermark from being tampered, which monitors the change condition of a watermark document object model of a current webpage; according to the change condition of the watermark document object model of the current webpage, the watermark tampering operation on the current webpage is identified, and when the watermark tampering operation is identified, the watermark document object model which is backed up in advance is used for replacing or adding, so that the phenomenon that the webpage watermark is tampered is avoided.
Example 2
Referring to fig. 2, according to a specific embodiment of the present disclosure, in a second aspect, the present disclosure provides a device for preventing web watermark from being tampered, which specifically includes a monitoring unit 202, an identifying unit 204, and a processing unit 206, and specifically as follows:
the monitoring unit 202 is configured to monitor a change condition of a watermark document object model of a current webpage.
Monitoring the change condition of a watermark document object model of the current webpage in real time through a monitoring unit 202; or, in a preset time period, the monitoring unit 202 monitors a change condition of the watermark document object model of the current webpage, which is not limited specifically.
In a certain application scene, if need accurately know: the change condition of the watermark document object model of the current webpage can be set to be monitored in real time through the monitoring unit 202.
On the contrary, in another application scenario, if the overhead of processing data by the server needs to be reduced, the change condition of the watermark document object model of the current webpage can be monitored in a preset time period by the monitoring unit 202; the time interval of the monitoring can be set or adjusted according to different user requirements, which is not described herein again.
The identifying unit 204 is configured to identify the watermark tampering operation on the current webpage according to the change condition of the watermark document object model of the current webpage monitored by the monitoring unit 202, so as to obtain a watermark tampering operation identification result.
According to different monitoring results monitored by the monitoring unit 202, it can be accurately identified that: and the tamperer performs watermark tampering operation aiming at the watermark tampering operation on the current webpage.
Different from the prior art, the device for preventing webpage watermark from being tampered provided by the embodiment of the invention can listen to the change condition of the watermark document object model of the current webpage monitored by the monitoring unit 202, and accurately identify the tampering operation according to the change condition of the watermark document object model of the current webpage monitored by the monitoring unit 202.
Under different application scenarios, the identified watermark tampering operation identification result may be: a tamperer executes the tampering operation of modifying the watermark of the current webpage; in addition, the identified watermark tampering operation identification result may be: and the tamperer executes the tampering operation of deleting the watermark of the current webpage.
And the processing unit 206 is configured to process the tampered watermark document object model of the current webpage according to the watermark tampering operation identification result identified by the identifying unit 204, and replace or add the tampered watermark document object model with a pre-backed-up watermark document object model.
Optionally, the processing unit 206 is specifically configured to:
when the watermark tampering operation identification result is that the current tampering operation is to modify the watermark of the current webpage, processing the tampered watermark document object model of the current webpage and replacing the tampered watermark document object model with a pre-backed watermark document object model; alternatively, the first and second electrodes may be,
and when the watermark tampering operation identification result is that the current tampering operation is to delete the watermark of the current webpage, processing the tampered watermark document object model of the current webpage, and adding the pre-backed watermark document object model to the current webpage.
Optionally, the apparatus further comprises:
an adding unit (not shown in fig. 2) configured to add a watermark to the webpage page according to the inline style attribute information corresponding to the watermark document object model before the monitoring unit 202 monitors a change of the watermark document object model of the current webpage;
a removal unit (not shown in fig. 2) for removing the style name of the watermark from the webpage.
Optionally, the apparatus further comprises:
a setting unit (not shown in fig. 2) for setting inline style attribute information corresponding to the watermark document object model before the adding unit adds the watermark to the web page according to the inline style attribute information corresponding to the watermark document object model;
wherein the inline style attribute information set by the setting unit at least includes:
webpage background information of the watermark, width information of the watermark, height information of the watermark and layout mode information of the watermark in the webpage.
Optionally, the apparatus further comprises:
and the creating unit is used for dynamically creating the watermark document object model of the current webpage before the setting unit sets the inline style attribute information corresponding to the watermark document object model.
Optionally, the creating unit is specifically configured to:
creating a watermark document object model of preset text content information on a current webpage through a script with a preset format;
acquiring style data corresponding to the inline style attribute information, and adding the style data to the watermark document object model to obtain the watermark document object model added with the style data;
and adding the watermark document object model to the current webpage to obtain the watermark document object model of the current webpage.
Optionally, the apparatus further comprises:
the acquisition unit is used for acquiring key information which is related to the watermark document object model of the current webpage and is used for identifying a user before the creation unit dynamically creates the watermark document object model of the current webpage;
the conversion unit is used for converting the text written with the key information acquired by the acquisition unit into an image in a preset format;
the key information acquired by the acquisition unit at least comprises:
the employee name information of the user and the employee number information of the user.
The embodiment of the invention provides a webpage watermark tamper-proofing device, which monitors the change condition of a watermark document object model of a current webpage; according to the change condition of the watermark document object model of the current webpage, the watermark tampering operation on the current webpage is identified, and when the watermark tampering operation is identified, the watermark document object model which is backed up in advance is used for replacing or adding, so that the phenomenon that the webpage watermark is tampered is avoided.
Example 3
As shown in fig. 3, an embodiment of the present disclosure provides an electronic device, where the electronic device is used in a method for preventing webpage watermark from being tampered, and the electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the one processor to cause the at least one processor to: monitoring the change condition of a watermark document object model of the current webpage; according to the change condition of the watermark document object model of the current webpage, the watermark tampering operation on the current webpage is identified, and when the watermark tampering operation is identified, the watermark document object model which is backed up in advance is used for replacing or adding, so that the phenomenon that the webpage watermark is tampered is avoided. .
Example 4
The embodiment of the disclosure provides a nonvolatile computer storage medium, where the computer storage medium stores computer-executable instructions, and the computer-executable instructions can execute the method for preventing the webpage watermark from being tampered in any method embodiment.
Example 5
Referring now to FIG. 3, shown is a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 3, the electronic device may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 301 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)302 or a program loaded from a storage device 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device to communicate wirelessly or by wire with other devices to exchange data. While fig. 3 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 309, or installed from the storage means 308, or installed from the ROM 302. The computer program, when executed by the processing device 301, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: the method can monitor the change condition of the watermark document object model of the current webpage; according to the change condition of the watermark document object model of the current webpage, the watermark tampering operation on the current webpage is identified, and when the watermark tampering operation is identified, the watermark document object model which is backed up in advance is used for replacing or adding, so that the phenomenon that the webpage watermark is tampered is avoided. Alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: the method can monitor the change condition of the watermark document object model of the current webpage; according to the change condition of the watermark document object model of the current webpage, the watermark tampering operation on the current webpage is identified, and when the watermark tampering operation is identified, the watermark document object model which is backed up in advance is used for replacing or adding, so that the phenomenon that the webpage watermark is tampered is avoided.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.

Claims (10)

1. A method for preventing webpage watermark from being tampered, comprising:
monitoring the change condition of a watermark document object model of the current webpage;
according to the change condition of the watermark document object model of the current webpage, identifying the watermark tampering operation on the current webpage to obtain a watermark tampering operation identification result;
and processing the watermark document object model of the tampered current webpage according to the watermark tampering operation identification result, and replacing or adding the watermark document object model as a pre-backed watermark document object model.
2. The method according to claim 1, wherein the processing the tampered watermark document object model of the current webpage as the watermark document object model replaced or added as the pre-backup watermark document object model according to the watermark tampering operation identification result comprises:
when the watermark tampering operation identification result is that the current tampering operation is to modify the watermark of the current webpage, processing the tampered watermark document object model of the current webpage and replacing the tampered watermark document object model with a pre-backed watermark document object model; alternatively, the first and second electrodes may be,
and when the watermark tampering operation identification result is that the current tampering operation is to delete the watermark of the current webpage, processing the tampered watermark document object model of the current webpage, and adding a pre-backed watermark document object model to the current webpage.
3. The method of claim 1, wherein prior to the monitoring for changes in the watermark document object model of the current web page, the method further comprises:
adding a watermark to the webpage page according to the inline style attribute information corresponding to the watermark document object model, and removing the style name of the watermark from the webpage page.
4. The method of claim 3, wherein before the adding a watermark to the web page according to the inline style attribute information corresponding to the watermark document object model, the method further comprises:
setting the inline style attribute information corresponding to the watermark document object model;
wherein the inline style attribute information at least includes:
the method comprises the following steps of obtaining webpage background information of the watermark, width information of the watermark, height information of the watermark and layout mode information of the watermark in a webpage.
5. The method of claim 4, wherein prior to the setting of inline style attribute information corresponding to the watermark document object model, the method further comprises:
and dynamically creating the watermark document object model of the current webpage.
6. The method of claim 5, wherein the dynamically creating the watermark document object model for the current web page comprises:
creating a watermark document object model of preset text content information on a current webpage through a script with a preset format;
acquiring style data corresponding to the inline style attribute information, and adding the style data to the watermark document object model to obtain the watermark document object model added with the style data;
and adding the watermark document object model to the current webpage to obtain the watermark document object model of the current webpage.
7. The method of claim 5, wherein prior to the dynamically creating the watermark document object model for the current web page, the method further comprises:
acquiring key information which is associated with the watermark document object model of the current webpage and is used for identifying a user, and converting a text written with the key information into an image in a preset format;
wherein the key information at least comprises:
the employee name information of the user and the employee number information of the user.
8. A device for preventing web watermark from being tampered, comprising:
the monitoring unit is used for monitoring the change condition of the watermark document object model of the current webpage;
the identification unit is used for identifying the watermark tampering operation on the current webpage according to the change condition of the watermark document object model of the current webpage monitored by the monitoring unit to obtain a watermark tampering operation identification result;
and the processing unit is used for processing the tampered watermark document object model of the current webpage according to the watermark tampering operation identification result identified by the identification unit, and replacing or adding the tampered watermark document object model with or into a pre-backed watermark document object model.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method of any one of claims 1 to 7.
CN201910993496.XA 2019-10-18 2019-10-18 Webpage watermark tamper-proofing method, device, medium and electronic equipment Active CN110909320B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910993496.XA CN110909320B (en) 2019-10-18 2019-10-18 Webpage watermark tamper-proofing method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910993496.XA CN110909320B (en) 2019-10-18 2019-10-18 Webpage watermark tamper-proofing method, device, medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN110909320A true CN110909320A (en) 2020-03-24
CN110909320B CN110909320B (en) 2022-03-15

Family

ID=69815687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910993496.XA Active CN110909320B (en) 2019-10-18 2019-10-18 Webpage watermark tamper-proofing method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110909320B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111698237A (en) * 2020-06-05 2020-09-22 浙江华途信息安全技术股份有限公司 Method and system for adding watermark to WEB page
CN112069468A (en) * 2020-08-26 2020-12-11 上海上讯信息技术股份有限公司 Method and equipment for dynamic watermarking of page
CN112100583A (en) * 2020-09-23 2020-12-18 上海英方软件股份有限公司 Method and device for generating Web visual watermark
CN112616056A (en) * 2020-12-18 2021-04-06 广州虎牙科技有限公司 Reporting alarm method and device based on watermark monitoring
CN112966232A (en) * 2021-03-12 2021-06-15 恩亿科(北京)数据科技有限公司 Page watermark tamper-proofing method and system, electronic equipment and readable storage medium
CN112966277A (en) * 2020-12-16 2021-06-15 南京指掌易信息科技有限公司 Webpage protection method and device, computer equipment and storage medium
CN113296773A (en) * 2021-05-28 2021-08-24 北京思特奇信息技术股份有限公司 Copyright marking method and system for cascading style sheet
CN116383782A (en) * 2022-12-02 2023-07-04 中山市可讯科技有限公司 Webpage watermark generation and tamper-proof method

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050169496A1 (en) * 2000-07-25 2005-08-04 Perry Burt W. Steganographic data embedding in objects for authenticating and associating value with the objects
US20050169499A1 (en) * 2001-04-24 2005-08-04 Rodriguez Tony F. Digital watermarking image signals on-chip and photographic travel logs through dgital watermarking
CN102129528A (en) * 2010-01-19 2011-07-20 北京启明星辰信息技术股份有限公司 WEB page tampering identification method and system
CN102831570A (en) * 2012-08-21 2012-12-19 西南交通大学 Webpage watermark generation and authentication method capable of positioning and tampering positions on a browser
CN102957705A (en) * 2012-11-12 2013-03-06 杭州迪普科技有限公司 Webpage tampering protection method and device
CN103049682A (en) * 2013-01-28 2013-04-17 上海理工大学 Character pitch encoding-based dual-watermark embedded text watermarking method
CN103052950A (en) * 2010-08-20 2013-04-17 惠普发展公司,有限责任合伙企业 Systems and methods for filtering web page contents
CN103605688A (en) * 2013-11-01 2014-02-26 北京奇虎科技有限公司 Intercept method and intercept device for homepage advertisements and browser
CN103685277A (en) * 2013-12-17 2014-03-26 南京大学 Safety protection system and method for webpage access through browser
CN103885960A (en) * 2012-12-20 2014-06-25 上海明想电子科技有限公司 Method for monitoring webpage change
US20140283067A1 (en) * 2013-03-15 2014-09-18 Shape Security Inc. Detecting the introduction of alien content
CN105094797A (en) * 2014-05-15 2015-11-25 奥克兰联合服务有限公司 Application analysis system for electronic devices
CN108073828A (en) * 2016-11-16 2018-05-25 阿里巴巴集团控股有限公司 A kind of webpage integrity assurance, apparatus and system
CN110245469A (en) * 2019-06-24 2019-09-17 苏州睿威博科技有限公司 Watermark generation method, watermark analytic method, device and the storage medium of webpage

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050169496A1 (en) * 2000-07-25 2005-08-04 Perry Burt W. Steganographic data embedding in objects for authenticating and associating value with the objects
US20050169499A1 (en) * 2001-04-24 2005-08-04 Rodriguez Tony F. Digital watermarking image signals on-chip and photographic travel logs through dgital watermarking
CN102129528A (en) * 2010-01-19 2011-07-20 北京启明星辰信息技术股份有限公司 WEB page tampering identification method and system
CN103052950A (en) * 2010-08-20 2013-04-17 惠普发展公司,有限责任合伙企业 Systems and methods for filtering web page contents
CN102831570A (en) * 2012-08-21 2012-12-19 西南交通大学 Webpage watermark generation and authentication method capable of positioning and tampering positions on a browser
CN102957705A (en) * 2012-11-12 2013-03-06 杭州迪普科技有限公司 Webpage tampering protection method and device
CN103885960A (en) * 2012-12-20 2014-06-25 上海明想电子科技有限公司 Method for monitoring webpage change
CN103049682A (en) * 2013-01-28 2013-04-17 上海理工大学 Character pitch encoding-based dual-watermark embedded text watermarking method
US20140283067A1 (en) * 2013-03-15 2014-09-18 Shape Security Inc. Detecting the introduction of alien content
CN103605688A (en) * 2013-11-01 2014-02-26 北京奇虎科技有限公司 Intercept method and intercept device for homepage advertisements and browser
CN103685277A (en) * 2013-12-17 2014-03-26 南京大学 Safety protection system and method for webpage access through browser
CN105094797A (en) * 2014-05-15 2015-11-25 奥克兰联合服务有限公司 Application analysis system for electronic devices
CN108073828A (en) * 2016-11-16 2018-05-25 阿里巴巴集团控股有限公司 A kind of webpage integrity assurance, apparatus and system
CN110245469A (en) * 2019-06-24 2019-09-17 苏州睿威博科技有限公司 Watermark generation method, watermark analytic method, device and the storage medium of webpage

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CHOKCOCO: "【前端安全】JavaScript防http劫持与XSS", 《HTTPS://WWW.CNBLOGS.COM/COCO1S/P/5777260.HTML》 *
刘江DDD: "网页篡改监控系统的设计与实现", 《中国优秀硕士学位论文全文数据库》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111698237A (en) * 2020-06-05 2020-09-22 浙江华途信息安全技术股份有限公司 Method and system for adding watermark to WEB page
CN112069468A (en) * 2020-08-26 2020-12-11 上海上讯信息技术股份有限公司 Method and equipment for dynamic watermarking of page
CN112069468B (en) * 2020-08-26 2023-05-30 上海上讯信息技术股份有限公司 Page dynamic watermark method and device
CN112100583A (en) * 2020-09-23 2020-12-18 上海英方软件股份有限公司 Method and device for generating Web visual watermark
CN112966277A (en) * 2020-12-16 2021-06-15 南京指掌易信息科技有限公司 Webpage protection method and device, computer equipment and storage medium
CN112616056A (en) * 2020-12-18 2021-04-06 广州虎牙科技有限公司 Reporting alarm method and device based on watermark monitoring
CN112616056B (en) * 2020-12-18 2023-04-07 广州虎牙科技有限公司 Reporting alarm method and device based on watermark monitoring
CN112966232A (en) * 2021-03-12 2021-06-15 恩亿科(北京)数据科技有限公司 Page watermark tamper-proofing method and system, electronic equipment and readable storage medium
CN112966232B (en) * 2021-03-12 2024-03-29 恩亿科(北京)数据科技有限公司 Page watermark tamper-proof method, system, electronic device and readable storage medium
CN113296773A (en) * 2021-05-28 2021-08-24 北京思特奇信息技术股份有限公司 Copyright marking method and system for cascading style sheet
CN116383782A (en) * 2022-12-02 2023-07-04 中山市可讯科技有限公司 Webpage watermark generation and tamper-proof method

Also Published As

Publication number Publication date
CN110909320B (en) 2022-03-15

Similar Documents

Publication Publication Date Title
CN110909320B (en) Webpage watermark tamper-proofing method, device, medium and electronic equipment
CN111274760B (en) Rich text data processing method and device, electronic equipment and computer storage medium
CN109857486B (en) Method, device, equipment and medium for processing program page data
CN110865898B (en) Method, device, medium and equipment for converging crash call stack
US10984176B2 (en) Provision of alternative text for use in association with image data
CN110362304B (en) Webpage display method and device
CN110472434B (en) Data desensitization method, system, medium, and electronic device
CN109408754B (en) Webpage operation data processing method and device, electronic equipment and storage medium
CN110471709B (en) Method, device, medium and electronic equipment for accelerating webpage opening speed
CN110390063B (en) Data analysis method, device, medium and electronic equipment
CN110619099B (en) Comment content display method, device, equipment and storage medium
US20190259181A1 (en) Extracting color schemes of pages written in a markup language
CN111258998A (en) Data verification method, device, medium and electronic equipment
CN113343312A (en) Page tamper-proofing method and system based on front-end point burying technology
CN109902726B (en) Resume information processing method and device
CN109992698B (en) Data processing method and device, electronic equipment and readable storage medium
CN111177634A (en) Multi-language supporting file content loading method, device, equipment and medium
CN110673908A (en) Interface generation method, device, medium and electronic equipment
CN113672317B (en) Method and device for rendering topic pages
CN114328999A (en) Interaction method, device, medium and electronic equipment for presentation
CN109241787B (en) Call detection method and device for image input device and computer readable storage medium
CN110874253B (en) Display method and display system
CN113760706B (en) Webpage debugging method and device
CN113157164A (en) Display control method and device and electronic equipment
CN114912420B (en) Document processing method, device, electronic 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
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.

CP01 Change in the name or title of a patent holder