Disclosure of Invention
The embodiment of the application aims to provide a watermark adding method, a server, computer equipment and a storage medium of an H5 page, so as to solve the possible information security problem in the sharing process of the H5 page.
In order to solve the above technical problems, the embodiments of the present application provide a watermark adding method for an H5 page, which adopts the following technical scheme:
the watermarking method of the H5 page can comprise the following steps:
the server receives an indication message which is triggered to be sent when the terminal monitors the sharing operation of the user on the target H5 page;
the server responds to the indication message to determine a preset first watermark;
the server adds the first watermark in the target H5 page, so that the first watermark is displayed in the target H5 page when the target H5 page is rendered by the browser.
In some possible implementations of the application embodiments, the step of adding the first watermark to the target H5 page by the server may include:
the server adds the first watermark in the target H5 page by adopting a JS injection method.
In some possible implementations of the application embodiment, the step of adding the first watermark to the target H5 page by the server using JS injection method may include:
the server splices the first watermark with a preset watermark pattern code to generate a section of JS code, and the JS code is used for displaying the first watermark in the target H5 page when being rendered by a browser;
the server determines an HTML file of the target H5 page and traverses the content body of the HTML file;
the server adds the JS code to the content body as a new tag content.
In some possible implementations of the application embodiments, the step of determining, by the server, the preset first watermark in response to the indication message may include:
and the server responds to the indication message to acquire the identity information of the user or the target H5 page owner, and takes the identity information as the first watermark.
In some possible implementations of the application embodiment, after the step of triggering the sent indication message when the server obtains the terminal in response to the user performing the sharing operation on the target H5 page, the watermarking method of the H5 page may further include:
The server determines whether the user has the right to add the watermark;
the step of adding the first watermark to the target H5 page by the server may include:
when the server determines that the user has the right of adding the watermark, adding the first watermark in the target H5 page;
the watermarking method of the H5 page can further comprise the following steps:
the server does not add the first watermark in the target H5 page when it determines that the user does not have the right to add the watermark.
In some possible implementations of the application embodiments, after the step of determining the preset first watermark by the server in response to the indication message, the watermarking method of the H5 page may further include:
the server detects whether a second watermark exists in the target H5 page;
the step of adding the first watermark to the target H5 page by the server may include:
if the second watermark can be included, the server firstly removes the second watermark and adds the first watermark in the target H5 page, or the server directly adds the first watermark at the position of the second watermark offset by a preset distance;
if the second watermark cannot be included, the server adds the first watermark to the target H5 page.
In some possible implementations of the application embodiments, the server adds the first watermark to the target H5 page, so that when the target H5 page is rendered by the browser, after the step of displaying the first watermark in the target H5 page, the watermark adding method of the H5 page may further include:
and after the first watermark is added, the server counts time, and after the preset time length is exceeded, the first watermark in the target H5 page is removed.
In order to solve the above technical problems, the embodiments of the present application further provide a server, which adopts the following technical schemes:
a server may include:
the receiving module is used for sending an indication message to the server when the sharing operation of the user on the target H5 page is monitored;
a determining module, configured to determine a preset first watermark in response to the indication message;
and the watermark adding module is used for adding the first watermark in the target H5 page, so that the first watermark is displayed in the target H5 page when the target H5 page is rendered by a browser.
In some possible implementations of the embodiments of the present application, the watermark adding module is specifically configured to add the first watermark to the target H5 page by using a JS injection method.
In some possible implementations of the embodiments of the present application, the watermarking module includes:
the splicing unit is used for splicing the first watermark with a preset watermark pattern code to generate a section of JS code, and the JS code is used for displaying the first watermark in the target H5 page when being rendered by a browser;
the query unit is used for determining an HTML file of the target H5 page and traversing the content body of the HTML file;
and the editing unit is used for adding the JS code as a new tag content to the content body.
In some possible implementations of the embodiments of the present application, the determining module is specifically configured to obtain, in response to the indication message, identification information of the user or the owner of the target H5 page, and use the identification information as the first watermark.
In some possible implementations of the embodiments of the present application, the server further includes:
the permission judging module is used for determining whether the user has the permission of adding the watermark;
the watermark adding module is specifically configured to add the first watermark in the target H5 page when it is determined that the user has the right to add the watermark;
the server further includes:
and the processing module is also used for not adding the first watermark in the target H5 page when the user is determined to not have the right of adding the watermark.
In some possible implementations of the embodiments of the present application, the server further includes:
the watermark detection module is used for detecting whether a second watermark exists in the target H5 page or not;
the watermark adding module is specifically configured to, if the second watermark can be included, remove the second watermark first, and add the first watermark to the target H5 page, or directly add the first watermark at a position where the second watermark deviates from a preset distance; if the second watermark cannot be included, the first watermark is added to the target H5 page. In some possible implementations of the embodiments of the present application, the server further includes:
and the watermark deleting module is used for timing after the first watermark is added, and removing the first watermark in the target H5 page after the preset time length is exceeded.
In order to solve the above technical problems, the embodiments of the present application further provide a computer device, which adopts the following technical schemes:
a computer device may include a memory having stored therein computer readable instructions which when executed by the processor implement the steps of the watermarking method of H5 pages as described above.
In order to solve the above technical problems, embodiments of the present application further provide a computer readable storage medium, which adopts the following technical solutions:
a computer readable storage medium having stored thereon computer readable instructions which when executed by a processor perform the steps of a method of watermarking an H5 page as described above.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
in this embodiment of the present application, after the terminal triggers the sent indication message when the terminal responds to the user to perform the sharing operation on the target H5 page, the server may determine the preset first watermark in response to the indication message. And then, the server adds the first watermark in the target H5 page, so that the first watermark is displayed in the target H5 page when the target H5 page is rendered by the browser. As the first watermark is added in the target H5 page and is used as the identification information of the target H5 page, when the target H5 page is rendered by the browser, the first watermark can be displayed in the target H5 page, so that traceability of the target H5 page is realized, and compared with unlimited sharing operation in the prior art, the information security problem caused by sharing the target H5 page can be effectively reduced.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the applications herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having" and any variations thereof in the description and claims of the present application and in the description of the figures above are intended to cover non-exclusive inclusions. The terms first, second and the like in the description and in the claims or in the above-described figures, are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order.
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 present application. 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.
In order to better understand the technical solutions of the present application, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication terminal applications, such as a web browser application, a shopping class application, a search class application, an instant messaging tool, a mailbox terminal, social platform software, and the like, may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablet computers, electronic book readers, MP3 players (Moving Picture ExpertsGroup Audio Layer III, dynamic video expert compression standard audio plane 3), MP4 (Moving PictureExperts Group Audio Layer IV, dynamic video expert compression standard audio plane 4) players, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that, the watermarking method of the H5 page provided in the embodiments of the present application is generally executed by a server/terminal device.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to fig. 2, a flow chart of one embodiment of a watermarking method for an H5 page according to the present application is shown. The watermarking method of the H5 page comprises the following steps:
In step S210, the server receives an indication message triggered to be sent when the terminal monitors the sharing operation of the user on the target H5 page.
In this embodiment of the present application, the terminal may be terminal devices 101, 102 or 103 in the architecture shown in fig. 1, and the sharing operation, or forwarding operation, of the target H5 page refers to operations such as forwarding or sharing performed on a link of the target H5 page after a user clicks a sharing or forwarding button after opening the target H5 page. The target H5 page may be a specific page set in advance, and when the terminal responds to the user to share the target H5 page, the terminal triggers to send an indication message to a server storing the source file of the target H5 page, where the indication message may include link address information of the target H5 page.
In step S220, the server determines a preset first watermark in response to the indication message.
In this embodiment of the present application, the first watermark may be a preset text watermark or a picture watermark.
In some possible implementations of the embodiments of the present application, to improve the security of sharing of the target H5 page, the first watermark may be the identity information of the owner of the target H5 page or the identity information of the current user. The process of obtaining the identification information may include: and inquiring and acquiring the identity information of the user or the owner of the target H5 page from a preset inquiry interface, and extracting the identity information of the user from the identity information, wherein the identity information can be a user name, a user ID and the like.
In step S230, the server adds the first watermark to the target H5 page, so that the first watermark is displayed in the target H5 page when the target H5 page is rendered by the browser.
In this embodiment of the present application, after the first watermark is obtained, the link address information in the indication message may be queried to determine the target H5 page, and then, according to a preset watermark adding rule, the first watermark is added at a predetermined position of the target H5 page, which is used as identification information of the target H5 page, so that when the target H5 page is rendered by the browser, the first watermark may be displayed in the target H5 page. In the watermark adding rule, information such as adding position, transparency, color and the like of the watermark can be indicated.
In some possible implementations of the embodiments of the present application, the step of adding the first watermark to the target H5 page includes: and adding a first watermark in the target H5 page by adopting a JS injection method.
Specifically, a method of JS injection may be adopted for the source file of the target H5 page, and the first watermark may be added.
In some possible implementations of the embodiments of the present application, the step of adding the first watermark to the target H5 page by using the JS injection method includes: the server splices the first watermark with a preset watermark pattern code to generate a section of JS code, and the JS code is used for displaying the first watermark in a target H5 page when being rendered by a browser; the server determines an HTML file of a target H5 page and traverses the content body of the HTML file; the server adds the JS code to the content body as a new tag content.
Specifically, the method for adding the first watermark through JS injection may include: after the first watermark is acquired, the first watermark and a preset watermark pattern code are spliced to generate a section of JS code comprising the first watermark. If the first watermark is a text, the text is directly added into the watermark pattern code, and if the first watermark is a picture, the resource address of the picture is added into the watermark pattern code. After the JS code is generated, the HTML file of the target H5 page may be queried and determined by using the link address information included in the indication message, and then the HTML file is traversed to the body of the content of the HTML file, and the JS code is embedded into the target H5 page as a new child node or new child tag content under the body. Thus, the shared target H5 page integrates the watermark, and other users can see the first watermark through browser rendering when opening the link of the shared target H5 page. The watermark pattern code may be set with information such as content and pattern of the watermark to be displayed. For example, specific content of the watermark pattern code may include the following: watermark content to be displayed, transparency, inclination, size, etc.
Further, adding the JS code to the content body of the HTML file may include: in a document object, i.e., an HTML file, taken to a web view, the body attribute of the document object is acquired, and then the tag content of the JS code is added to the body as a child node using an addChild tool.
In some possible implementations of the embodiments of the present application, in step S210, after the step of triggering the sent indication message when the terminal responds to the user to perform the sharing operation on the target H5 page, the method for adding the watermark to the H5 page further includes: it is determined whether the user has the right to add the watermark. Step S230, adding the first watermark to the target H5 page, so that when the target H5 page is rendered by the browser, the first watermark is displayed in the target H5 page, including: and if the requirement is determined, acquiring a preset first watermark. And after determining whether the user has the right to add the watermark, the watermarking method of the H5 page further comprises the following steps: and when the server determines that the user does not have the right of watermarking, the first watermark is not added in the target H5 page.
Specifically, when determining that the user performs the sharing operation on the target H5 page, it may be further determined whether the target H5 page needs to be added with a watermark, and then a preset first watermark is obtained. Specifically, two user types may be set: a first type of user with watermarking rights and a second type of user without watermarking rights, thereby determining whether the target H5 page requires watermarking by determining the type of the current user. The first type of user can be the creator of the target H5 page or the user with the modification authority or the specific user with the setting joining, and the second type of user is the other user with the read-only authority. The corresponding relation between the user identifier and the user type can be set in the system, for example, a user name list with watermark adding authority to the target H5 page is saved, and the user type of the current user is determined according to the corresponding relation.
By referring to the description, by setting the authority, the watermark in the target H5 page can be prevented from being added by the non-authority user, and the information security problem possibly caused by adding the watermark of the non-authority user into the target H5 page is avoided. For example, a recruiter uploads personal identity information on a resume page of a recruitment APP, the account number of the recruiter is a first type user, and the other account numbers are second type users. When the resume page of the recruiter is opened and shared, the watermark set by the recruiter is added through judgment and determination, and when the resume page of the recruiter is opened and shared by a user of other accounts, the watermark of the user is not required to be added through judgment and determination.
In some possible implementations of the embodiments of the present application, in the foregoing step, after the target H5 page addition completes the first watermark, the method for adding a watermark to the H5 page may further include: and after the preset time length is exceeded, removing the first watermark in the target H5 page. Specifically, a tag name or an element name corresponding to the first watermark may be recorded, when the first watermark is deleted, the JS code corresponding to the first watermark under the HTML file body node of the H5 page may be queried by using the tag name or the element name, and deleting the code segment may be implemented to delete the first watermark.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
in this embodiment of the present application, after the terminal triggers the sent indication message when the terminal responds to the sharing operation performed on the target H5 page by the user, the preset first watermark may be determined in response to the indication message. And then adding the first watermark in the target H5 page, so that the first watermark is displayed in the target H5 page when the target H5 page is rendered by a browser. As the first watermark is added in the target H5 page and is used as the identification information of the target H5 page, when the target H5 page is rendered by the browser, the first watermark can be displayed in the target H5 page, so that traceability of the target H5 page is realized, and compared with unlimited sharing operation in the prior art, the information security problem caused by sharing the target H5 page can be effectively reduced.
In some possible implementations of the embodiments of the present application, referring specifically to fig. 3, a further embodiment of a watermarking method for an H5 page according to the embodiments of the present application is shown. Wherein, in step S220, after determining the preset first watermark in response to the indication message, the watermarking method of the H5 page further includes:
In step S310, the server detects whether a second watermark is already present in the target H5 page.
Specifically, in some cases, if the target H5 page already has a watermark, in order to avoid the watermark overlapping caused by the subsequent re-adding of the watermark, it may be detected whether the target H5 page already has a second watermark after the first watermark is obtained. The watermark may be preset to have a specific identifier, and whether the target H5 page already has the second watermark is determined by querying whether the identifier exists in the file of the target H5 page. For example, for the JS injection mode, a first watermark of the target H5 page may be set, where the name corresponding to the sub-tag under the body attribute of the HTML source file is watermark01, and a second watermark of the target H5 page, where the sub-tag name is watermark02, and so on. If the fact that the mark of the 'watermark' exists in the file of the target H5 page is inquired, the second watermark is determined to exist, otherwise, the second watermark is determined not to exist.
Step S230, the server adds a first watermark in the target H5 page, so that when the target H5 page is rendered by the browser, the first watermark is displayed in the target H5 page, including:
Step S331, if the second watermark is included, the server firstly removes the second watermark and adds the first watermark in the target H5 page, or the server directly adds the first watermark at the position of the second watermark offset by the preset distance;
in step S332, if the second watermark is not included, the server adds the first watermark to the target H5 page.
Specifically, when the existence of the second watermark is detected, a method for replacing the watermark may be adopted, that is, the second watermark is removed first, and then the first watermark is added. And in the specific replacement, replacing the watermark content in the second watermark code with the watermark content of the first watermark. Alternatively, the watermark position may be changed, that is, the first watermark may be added at a position offset by a predetermined distance from the second watermark, so as to avoid watermark overlapping. At this time, if the content of the first watermark needs to be added, a tag name different from the tag of the second watermark may be taken as the identifier of the first watermark under the body node, and the JS code of the first watermark is added.
In some possible implementations, the step of determining whether the user has the right to add the watermark performed in the previous embodiment section may be further performed upon detecting the presence of the second watermark. When the permission of adding the watermark is determined, the second watermark is removed, and the first watermark is added in the target H5 page, or the first watermark is directly added at the position of the second watermark offset by a preset distance; when it is determined that the watermarking right does not exist, the operation of adding the first watermark is stopped. By the setting, on one hand, the tampering of a non-authority user to the second watermark can be avoided, and on the other hand, the problem of display confusion of a target H5 page caused by excessive watermarks because the first watermark is added on the basis of the second watermark can be avoided.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
and if the second watermark is not included, the first watermark is added in the target H5 page. The problem of watermark overlapping possibly caused by watermark adding during sharing of the target H5 page is avoided.
The subject application is operational with numerous general purpose or special purpose computer system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by computer readable instructions stored in a computer readable storage medium that, when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a random access Memory (Random Access Memory, RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
With further reference to fig. 4, as an implementation of the method shown in fig. 2 or fig. 3, the present application provides an embodiment of a server, as shown in fig. 4, a server 400 according to this embodiment includes:
the receiving module 410 is configured to trigger a sent indication message when the receiving terminal monitors a sharing operation of the user on the target H5 page;
a determining module 420, configured to determine a preset first watermark in response to the indication message;
the watermark adding module 430 is configured to add the first watermark to the target H5 page, so that the first watermark is displayed in the target H5 page when the target H5 page is rendered by the browser.
In some possible implementations of the embodiments of the present application, the watermark adding module 430 is specifically configured to add the first watermark to the target H5 page by using a JS injection method.
In some possible implementations of embodiments of the present application, the watermarking module 430 includes:
the splicing unit is used for splicing the first watermark with a preset watermark pattern code to generate a section of JS code, and the JS code is used for displaying the first watermark in the target H5 page when being rendered by a browser;
the query unit is used for determining an HTML file of the target H5 page and traversing the content body of the HTML file;
And the editing unit is used for adding the JS code as a new tag content to the content body.
In some possible implementations of the embodiments of the present application, the determining module 420 is specifically configured to obtain, in response to the indication message, identification information of the user or the owner of the target H5 page, where the identification information is used as the first watermark.
In some possible implementations of embodiments of the present application, the server 400 further includes:
the permission judging module is used for determining whether the user has the permission of adding the watermark;
the watermark adding module 430 is specifically configured to add the first watermark to the target H5 page when it is determined that the user has the right to add the watermark;
the server 400 further includes:
and the processing module is also used for not adding the first watermark in the target H5 page when the user is determined to not have the right of adding the watermark.
In some possible implementations of embodiments of the present application, the server 400 further includes:
the watermark detection module is used for detecting whether a second watermark exists in the target H5 page or not;
the watermark adding module 430 is specifically configured to, if the second watermark may be included, remove the second watermark first, and add the first watermark to the target H5 page, or directly add the first watermark at a position where the second watermark deviates from a preset distance; if the second watermark cannot be included, the first watermark is added to the target H5 page.
In some possible implementations of embodiments of the present application, the server 400 further includes:
and the watermark deleting module is used for timing after the first watermark is added, and removing the first watermark in the target H5 page after the preset time length is exceeded.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
in this embodiment of the present application, after the server 400 triggers the sent indication message when the terminal responds to the user to perform the sharing operation on the target H5 page, the server 400 may determine the preset first watermark in response to the indication message. Then, the server 400 adds the first watermark to the target H5 page, so that the first watermark is displayed in the target H5 page when the target H5 page is rendered by the browser. As the first watermark is added in the target H5 page and is used as the identification information of the target H5 page, when the target H5 page is rendered by the browser, the first watermark can be displayed in the target H5 page, so that traceability of the target H5 page is realized, and compared with unlimited sharing operation in the prior art, the information security problem caused by sharing the target H5 page can be effectively reduced.
In order to solve the technical problems, the embodiment of the application also provides computer equipment. Referring specifically to fig. 5, fig. 5 is a basic structural block diagram of a computer device according to the present embodiment.
The computer device 500 includes a memory 510, a processor 520, and a network interface 530 communicatively coupled to each other via a system bus. It should be noted that only computer device 500 having components 510-530 is shown in the figures, but it should be understood that not all of the illustrated components need be implemented, and that more or fewer components may be implemented instead. It will be appreciated by those skilled in the art that the computer device herein is a device capable of automatically performing numerical calculations and/or information processing in accordance with predetermined or stored instructions, the hardware of which includes, but is not limited to, microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASICs), programmable gate arrays (fields-Programmable Gate Array, FPGAs), digital processors (Digital Signal Processor, DSPs), embedded devices, etc.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer equipment can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
The memory 510 includes at least one type of readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage 510 may be an internal storage unit of the computer device 500, such as a hard disk or a memory of the computer device 500. In other embodiments, the memory 510 may also be an external storage device of the computer device 500, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the computer device 500. Of course, the memory 510 may also include both internal storage units and external storage devices of the computer device 500. In this embodiment, the memory 510 is typically used to store an operating system installed on the computer device 500 and various application software, such as computer readable instructions of a watermarking method of H5 pages. In addition, the memory 510 may be used to temporarily store various types of data that have been output or are to be output.
The processor 520 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 520 is generally used to control the overall operation of the computer device 500. In this embodiment, the processor 520 is configured to execute computer readable instructions stored in the memory 510 or process data, such as computer readable instructions for executing the watermarking method of the H5 page.
The network interface 530 may include a wireless network interface or a wired network interface, the network interface 530 typically being used to establish a communication connection between the computer device 500 and other electronic devices.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
in this embodiment of the present application, after the terminal triggers the sent indication message when the terminal responds to the user to perform the sharing operation on the target H5 page, the server may determine the preset first watermark in response to the indication message. And then, the server adds the first watermark in the target H5 page, so that the first watermark is displayed in the target H5 page when the target H5 page is rendered by the browser. As the first watermark is added in the target H5 page and is used as the identification information of the target H5 page, when the target H5 page is rendered by the browser, the first watermark can be displayed in the target H5 page, so that traceability of the target H5 page is realized, and compared with unlimited sharing operation in the prior art, the information security problem caused by sharing the target H5 page can be effectively reduced.
The present application also provides another embodiment, namely, a computer-readable storage medium storing computer-readable instructions executable by at least one processor to cause the at least one processor to perform the steps of the watermarking method of H5 pages as described above.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
in this embodiment of the present application, after the terminal triggers the sent indication message when the terminal responds to the user to perform the sharing operation on the target H5 page, the server may determine the preset first watermark in response to the indication message. And then, the server adds the first watermark in the target H5 page, so that the first watermark is displayed in the target H5 page when the target H5 page is rendered by the browser. As the first watermark is added in the target H5 page and is used as the identification information of the target H5 page, when the target H5 page is rendered by the browser, the first watermark can be displayed in the target H5 page, so that traceability of the target H5 page is realized, and compared with unlimited sharing operation in the prior art, the information security problem caused by sharing the target H5 page can be effectively reduced.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present application.
It is apparent that the embodiments described above are only some embodiments of the present application, but not all embodiments, the preferred embodiments of the present application are given in the drawings, but not limiting the patent scope of the present application. This application may be embodied in many different forms, but rather, embodiments are provided in order to provide a more thorough understanding of the present disclosure. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing, or equivalents may be substituted for elements thereof. All equivalent structures made by the specification and the drawings of the application are directly or indirectly applied to other related technical fields, and are also within the protection scope of the application.