Watermark processing method and device, computer equipment and storage medium

Through encryption and grayscale image conversion technology, the generation of blind watermarks in web pages has been solved, and the problem of insufficient security in the existing technology of watermarks in complex network environments is achieved, and efficient watermark protection and authenticity guarantee are achieved.

CN119203079APending Publication Date: 2024-12-27PING AN BANK CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411106856.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing blind watermark generation methods are difficult to ensure absolute security when facing complex and changing network environments and advanced attack methods. The watermark content may be illegally tampered with, forged or removed, affecting the authenticity and credibility.

Method used

The watermark content is encrypted using encryption algorithm and grayscale conversion process. The watermark content is embedded in the web page component through the shadow document object model, and finally it is integrated into the target page. The target watermark is generated by combining encryption and grayscale conversion technology. Components.

Benefits of technology

It realizes dynamic generation of watermarks in web pages, and effectively prevents watermarks from being tampered with, improves the security and credibility of watermarks, and ensures the authenticity of watermark content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119203079A_ABST
    Figure CN119203079A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of artificial intelligence and the field of financial science and technology, and relates to a watermark processing method which comprises the following steps: acquiring watermark content to be processed; carrying out encryption processing on the watermark content based on a preset encryption algorithm to obtain corresponding first watermark content; performing grey-scale map conversion processing on the first watermark content to obtain a corresponding second watermark content; calling a pre-constructed watermark component; creating a shadow document object model corresponding to the watermark element in the watermark component; embedding the second watermark content in the shadow document object model to obtain a corresponding target watermark component; and integrating the target watermark component to a preset target page. The invention further provides a watermark processing device, computer equipment and a storage medium. In addition, the invention also relates to a block chain technology, and the target watermark component can be stored in a block chain. According to the method, the security problem of watermark generation is effectively solved, and the authenticity and credibility of the watermark content are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence development technology and financial technology, and in particular to watermark processing methods, devices, computer equipment and storage media. Background Art

[0002] In the field of information security and copyright protection, digital watermark technology plays an indispensable role as an important means of information concealment. By embedding invisible or imperceptible marking information in digital media, digital watermark technology provides strong support for data copyright protection, anti-counterfeiting and anti-tampering, and protection against sensitive information leakage. With the rapid development of the Internet, website pages, as important carriers of information, have become increasingly prominent in terms of security and copyright protection, and the application of digital watermark technology in web pages has become more and more extensive.

[0003] Blind watermark, as an important form of digital watermark technology, has been widely used in key node scenarios such as transactions, transmission, and settlement due to its high concealment and anti-attack performance. Blind watermark is embedded in digital media in an invisible way, which not only does not affect the normal use of the original data, but can also be extracted by specific means when needed to verify the source, integrity, and legitimacy of the data.

[0004] At present, the mainstream blind watermark generation methods in the industry mainly include bitmap method, server-side watermark method, Canvas splicing method and other methods. These methods have their own advantages and disadvantages, but they generally face security issues: although blind watermark technology has a certain degree of anti-attack ability, the existing methods are still difficult to guarantee absolute security when facing complex and changeable network environments and advanced attack methods. The watermark content may be illegally tampered with, forged or removed, thus affecting the authenticity and credibility of the watermark content. Summary of the invention

[0005] The purpose of the embodiments of the present application is to propose a watermark processing method, device, computer equipment and storage medium to solve the technical problem that the existing blind watermark generation method is still difficult to ensure absolute security when facing complex and changeable network environments and advanced attack methods. The watermark content may be illegally tampered with, forged or removed, thereby affecting the authenticity and credibility of the watermark content.

[0006] In order to solve the above technical problems, the present application provides a watermark processing method, which adopts the following technical solution:

[0007] Get the watermark content to be processed;

[0008] Encrypting the watermark content based on a preset encryption algorithm to obtain corresponding first watermark content;

[0009] Performing grayscale conversion processing on the first watermark content to obtain corresponding second watermark content;

[0010] Call the pre-built watermark component;

[0011] Creating a shadow document object model corresponding to the watermark element in the watermark component;

[0012] embedding the second watermark content in the shadow document object model to obtain a corresponding target watermark component;

[0013] Integrate the target watermark component into a preset target page.

[0014] Furthermore, the step of encrypting the watermark content based on a preset encryption algorithm to obtain the corresponding first watermark content specifically includes:

[0015] Determine a target encryption algorithm from among a plurality of preset encryption algorithms;

[0016] Generate keys based on the preset encryption library;

[0017] Encrypting the watermark content based on the target encryption algorithm and the key to obtain encrypted watermark content;

[0018] The encrypted watermark content is used as the first watermark content.

[0019] Furthermore, the step of performing grayscale conversion processing on the first watermark content to obtain the corresponding second watermark content specifically includes:

[0020] Obtaining image display information of the first watermark content;

[0021] Determining whether the image display information is grayscale image information;

[0022] If not, calling a preset image processing tool to convert the first watermark content into a corresponding target grayscale image;

[0023] The target grayscale image is used as the second watermark content.

[0024] Furthermore, the step of creating a shadow document object model corresponding to the watermark element in the watermark component specifically includes:

[0025] Get the custom element corresponding to the watermark component;

[0026] Construct a constructor corresponding to the custom element;

[0027] Get the preset creation method;

[0028] In the constructor, the shadow document object model corresponding to the watermark element is created using the creation method.

[0029] Furthermore, the step of embedding the second watermark content in the shadow document object model to obtain the corresponding target watermark component specifically includes:

[0030] embedding the second watermark content in the shadow document object model to obtain a corresponding first watermark component;

[0031] Acquire a target display mode corresponding to the watermark content;

[0032] Based on the target display mode, adding style processing is performed in the shadow document object model in the first watermark component to obtain a corresponding second watermark component;

[0033] The second watermark component is used as the target watermark component.

[0034] Furthermore, the step of integrating the target watermark component into a preset target page specifically includes:

[0035] Get the preset display verification rules;

[0036] Performing display verification on the target watermark component based on the display verification rule;

[0037] If the target watermark component passes the display verification, obtaining the target page corresponding to the watermark content;

[0038] Determine the watermark adding position in the target page;

[0039] Based on the watermark adding position, the target watermark component is integrated into the target page.

[0040] Furthermore, after the step of performing grayscale conversion processing on the first watermark content to obtain the corresponding second watermark content, the method further includes:

[0041] Get the preset watermark storage method;

[0042] Determining a target storage medium corresponding to the watermark storage method;

[0043] constructing target watermark content based on the watermark content, the first watermark content and the second watermark content;

[0044] The target watermark content is stored in the target storage medium.

[0045] In order to solve the above technical problems, the embodiment of the present application further provides a watermark processing device, which adopts the following technical solution:

[0046] A first acquisition module, used to acquire watermark content to be processed;

[0047] An encryption module, used to encrypt the watermark content based on a preset encryption algorithm to obtain corresponding first watermark content;

[0048] A conversion module, used for performing grayscale conversion processing on the first watermark content to obtain corresponding second watermark content;

[0049] The calling module is used to call the pre-built watermark component;

[0050] A creation module, used for creating a shadow document object model corresponding to the watermark element in the watermark component;

[0051] A construction module, used for embedding the second watermark content in the shadow document object model to obtain a corresponding target watermark component;

[0052] The integration module is used to integrate the target watermark component into a preset target page.

[0053] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0054] Get the watermark content to be processed;

[0055] Encrypting the watermark content based on a preset encryption algorithm to obtain corresponding first watermark content;

[0056] Performing grayscale conversion processing on the first watermark content to obtain corresponding second watermark content;

[0057] Call the pre-built watermark component;

[0058] Creating a shadow document object model corresponding to the watermark element in the watermark component;

[0059] embedding the second watermark content in the shadow document object model to obtain a corresponding target watermark component;

[0060] Integrate the target watermark component into a preset target page.

[0061] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0062] Get the watermark content to be processed;

[0063] Encrypting the watermark content based on a preset encryption algorithm to obtain corresponding first watermark content;

[0064] Performing grayscale conversion processing on the first watermark content to obtain corresponding second watermark content;

[0065] Call the pre-built watermark component;

[0066] Creating a shadow document object model corresponding to the watermark element in the watermark component;

[0067] embedding the second watermark content in the shadow document object model to obtain a corresponding target watermark component;

[0068] Integrate the target watermark component into a preset target page.

[0069] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0070] This application first obtains the watermark content to be processed; then encrypts the watermark content based on a preset encryption algorithm to obtain the corresponding first watermark content; then performs grayscale conversion on the first watermark content to obtain the corresponding second watermark content; subsequently calls a pre-built watermark component, and creates a shadow document object model corresponding to the watermark element in the watermark component; further embeds the second watermark content in the shadow document object model to obtain the corresponding target watermark component; finally, integrates the target watermark component into a preset target page. The present application generates a second watermark content by processing the acquired watermark content to be processed based on the use of an encryption algorithm and a grayscale image conversion method, and then uses a watermark component to create a shadow document object model corresponding to the watermark element, and embeds the second watermark content in the shadow document object model to obtain the corresponding target watermark component, and finally integrates the target watermark component into a preset target page, thereby realizing a safe and efficient blind watermark generation scheme, which can not only dynamically generate watermarks on web pages, but also effectively prevent watermarks from being tampered with, thereby providing strong support for the protection of watermark content, effectively solving the security problem of watermark generation, and ensuring the authenticity and credibility of the watermark content. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0072] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0073] Figure 2A flowchart of an embodiment of a watermark processing method according to the present application;

[0074] Figure 3 is a schematic structural diagram of an embodiment of a watermark processing device according to the present application;

[0075] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0076] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0077] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0078] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0079] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for 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 optical fiber cables, etc.

[0080] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0081] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.

[0082] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .

[0083] It should be noted that the watermark processing method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the watermark processing device is generally arranged in the server / terminal device.

[0084] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0085] Continue to refer Figure 2 , shows a flow chart of an embodiment of the watermark processing method according to the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The watermark processing method provided in the embodiment of the present application can be applied to any scenario where product recommendation is required, and the watermark processing method can be applied to products in these scenarios, for example, product recommendation in the financial insurance field. The watermark processing method comprises the following steps:

[0086] Step S201, obtaining watermark content to be processed.

[0087] In this embodiment, the electronic device (eg Figure 1The server / terminal device shown in the figure) can obtain the watermark content to be processed through a wired connection or a wireless connection. It should be pointed out that the above-mentioned wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future. The above-mentioned watermark content to be processed is the watermark that needs to be filled in the target page. The above-mentioned target page refers to the page that needs to be processed with a watermark added to the above-mentioned watermark content. In the field of finance and insurance, the above-mentioned target pages may include auto insurance pages, claims pages, life insurance pages, and so on. Among them, the specific content of the watermark can be determined according to actual needs, such as simple patterns, etc. And due to the robustness of the blind watermark and user experience considerations, the watermark content should be as concise as possible.

[0088] Step S202: encrypt the watermark content based on a preset encryption algorithm to obtain corresponding first watermark content.

[0089] In this embodiment, the specific implementation process of encrypting the watermark content based on the preset encryption algorithm to obtain the corresponding first watermark content will be further described in detail in subsequent specific embodiments of the present application and will not be elaborated on here.

[0090] Step S203: performing grayscale conversion processing on the first watermark content to obtain corresponding second watermark content.

[0091] In this embodiment, the grayscale image conversion process of the first watermark content is performed to obtain the corresponding second watermark content. This application will further describe this in detail in the subsequent specific embodiments, and will not be elaborated on here. In addition, after obtaining the second watermark content, a matching HTTP cache header, such as Cache-Control and ETag, can be set for the second watermark content, so that the browser can cache the image and directly use the cached version in subsequent requests, reducing the number of server requests and bandwidth consumption.

[0092] Step S204: calling a pre-built watermark component.

[0093] In this embodiment, the watermark component is specifically a Web Components component. The structure of the watermark component is defined in advance using HTML and JavaScript, including creating a custom element corresponding to the watermark component and a shadow document object model of the watermark component, also known as Shadow DOM. The pre-built watermark component has the function of encapsulating the watermark element. After the construction of the watermark component is completed, the component mode needs to be configured. Including setting the grayscale mode: setting the component mode to grey-mode through JavaScript or HTML attributes. This mode can be a custom attribute or a state variable inside the component, which is used to instruct the watermark component to use a grayscale image to process the watermark. Optimizing performance processing: ensuring that the loading and rendering of the image are handled well inside the watermark component to optimize performance and user experience. In addition, the watermark component can also be processed asynchronously. Including asynchronous loading of components: if the watermark component depends on external resources (such as JavaScript libraries or style sheets), ensure that these resources are loaded asynchronously in advance to avoid blocking the rendering of the page. Asynchronous updates: If the watermark component needs to update content based on some asynchronous operations (such as data returned from the server), ensure in advance that these update operations will not block the main thread. In addition, you can also use performance analysis tools to monitor and debug the watermark component. Specifically, use the browser's developer tools (such as the Performance panel of Chrome DevTools) to monitor the performance of the watermark component. Analyze the loading time, execution time, and rendering time to find performance bottlenecks. And check the memory usage of the watermark component to ensure that there are no memory leaks. Then use the browser's memory analysis tool to track and fix the corresponding problems.

[0094] Step S205: creating a shadow document object model corresponding to the watermark element in the watermark component.

[0095] In this embodiment, the specific implementation process of creating the shadow document object model corresponding to the watermark element in the watermark component will be described in further detail in subsequent specific embodiments of the present application, and will not be elaborated on here.

[0096] Step S206: embed the second watermark content in the shadow document object model to obtain a corresponding target watermark component.

[0097] In this embodiment, the specific implementation process of embedding the second watermark content in the shadow document object model to obtain the corresponding target watermark component will be further described in detail in subsequent specific embodiments of the present application and will not be elaborated on here.

[0098] Step S207: Integrate the target watermark component into a preset target page.

[0099] In this embodiment, the specific implementation process of integrating the target watermark component into the preset target page will be described in further detail in subsequent specific embodiments of the present application, and will not be elaborated on here.

[0100] This application first obtains the watermark content to be processed; then encrypts the watermark content based on a preset encryption algorithm to obtain the corresponding first watermark content; then performs grayscale conversion on the first watermark content to obtain the corresponding second watermark content; subsequently calls a pre-built watermark component, and creates a shadow document object model corresponding to the watermark element in the watermark component; further embeds the second watermark content in the shadow document object model to obtain the corresponding target watermark component; finally, integrates the target watermark component into a preset target page. The present application generates a second watermark content by processing the acquired watermark content to be processed based on the use of an encryption algorithm and a grayscale image conversion method, and then uses a watermark component to create a shadow document object model corresponding to the watermark element, and embeds the second watermark content in the shadow document object model to obtain the corresponding target watermark component, and finally integrates the target watermark component into a preset target page, thereby realizing a safe and efficient blind watermark generation scheme, which can not only dynamically generate watermarks on web pages, but also effectively prevent watermarks from being tampered with, thereby providing strong support for the protection of watermark content, effectively solving the security problem of watermark generation, and ensuring the authenticity and credibility of the watermark content.

[0101] In some optional implementations, step S202 includes the following steps:

[0102] Determine the target encryption algorithm from multiple preset encryption algorithms.

[0103] In this embodiment, the encryption algorithm may include at least symmetric encryption algorithms such as DES algorithm, AES algorithm, etc., and asymmetric encryption algorithms such as RSA algorithm, DSA algorithm, ECC algorithm, etc. A symmetric encryption algorithm may be first determined from a variety of encryption algorithms because the symmetric encryption algorithm has a faster encryption and decryption speed. Then, an algorithm is randomly selected from all symmetric encryption algorithms as the target encryption algorithm.

[0104] Generate a key based on a preset encryption library.

[0105] In this embodiment, for the symmetric encryption algorithm, a key needs to be generated. This key will be used to encrypt and decrypt the watermark content. The key should be randomly generated and the length should be long enough to ensure security. Specifically, an encryption library (such as CryptoJS, OpenSSL, etc.) can be used to generate the key.

[0106] The watermark content is encrypted based on the target encryption algorithm and the key to obtain encrypted watermark content.

[0107] In this embodiment, the watermark content is encrypted by using the selected target encryption algorithm and the generated key. Specifically, the watermark content is used as the input of the target encryption algorithm, and the encrypted watermark content is output. The encrypted watermark content is random and has no obvious pattern, so as to protect the confidentiality of the watermark content.

[0108] The encrypted watermark content is used as the first watermark content.

[0109] The present application determines a target encryption algorithm from a plurality of preset encryption algorithms; then generates a key based on a preset encryption library; then encrypts the watermark content based on the target encryption algorithm and the key to obtain the encrypted watermark content; and subsequently uses the encrypted watermark content as the first watermark content. The present application uses a target encryption algorithm determined from a plurality of encryption algorithms and a key generated based on an encryption library to encrypt the watermark content, thereby achieving fast and accurate completion of the encryption processing of the watermark content, improving the processing efficiency of the encryption processing of the watermark content, and ensuring the confidentiality of the obtained first watermark content.

[0110] In some optional implementations of this embodiment, step S203 includes the following steps:

[0111] Obtain image display information of the first watermark content.

[0112] In this embodiment, the image display information of the first watermark content can be obtained by performing image analysis on the first watermark content. The image display information may include various information types such as binary images that are either black or white, grayscale images, color RGB images, RGBA images, etc. Among them, binary images that are either black or white: 1 bit can represent 1 pixel (two states of black and white). So 1 byte can represent 8 pixels. Grayscale image: 1 pixel has 256 states (2 to the 8th power), which requires 8 bytes, that is, 1 character. Color RGB image: There are three channels of R / G / B, each channel has 256 states, which are represented by 1 byte, and a total of 3 bytes are required to represent 1 pixel. RGBA image: On the basis of the three channels of R / G / B, a transparency channel is added, with 256 states, and an additional 1 byte is required, and a total of 4 bytes are required to represent one pixel.

[0113] Determine whether the image display information is grayscale image information.

[0114] In this embodiment, the image display information can be matched with the information corresponding to the grayscale image to obtain a corresponding matching result. If the matching result is a successful match, the image display information is determined to be grayscale image information, and if the matching result is a failed match, the image display information is determined not to be grayscale image information.

[0115] If not, a preset image processing tool is called to convert the first watermark content into a corresponding target grayscale image.

[0116] In this embodiment, the image processing tool may be image processing software or a programming library (such as Pillow for Python). If it is detected that the image display information is not grayscale information, the first watermark content is converted into a corresponding target grayscale image by the image processing tool.

[0117] The target grayscale image is used as the second watermark content.

[0118] In this embodiment, since the blind watermark does not need to support color and multi-color scenes, the first watermark content is converted into a corresponding target grayscale image, namely, the second watermark content, thereby effectively improving the processing speed and performance of the watermark processing.

[0119] The present application obtains the image display information of the first watermark content; then determines whether the image display information is grayscale information; if not, calls a preset image processing tool to convert the first watermark content into a corresponding target grayscale image; and subsequently uses the target grayscale image as the second watermark content. The present application obtains the image display information of the first watermark content, and when it is detected that the image display information is not grayscale information, intelligently calls an image processing tool to convert the first watermark content into a corresponding target grayscale image and uses it as the second watermark content, thereby effectively improving the processing speed and processing performance of watermark processing.

[0120] In some optional implementations, step S205 includes the following steps:

[0121] Gets the custom element corresponding to the watermark component.

[0122] In this embodiment, the watermark component is specifically a Web Components component. A custom element is predefined, which is the basis of Web Components. A custom element is a new element that inherits the HTMLElement class (or any class that inherits from HTMLElement) and is registered in the browser. A suitable element name can be determined according to actual business needs, such as <watermark-element>as the custom element above.

[0123] Construct a constructor corresponding to the custom element.

[0124] In this embodiment, a constructor is further written for the custom element in JavaScript, which initializes the custom element and prepares to attach the shadow document object model, namely Shadow DOM, to the constructor.

[0125] Gets the creation method of a preset.

[0126] In this embodiment, the above preset creation method can specifically adopt Element.attachShadow({mode:'open'}) or {mode:'closed'} method.

[0127] In the constructor, the shadow document object model corresponding to the watermark element is created using the creation method.

[0128] In this embodiment, in the constructor of the custom element, use Element.attachShadow({mode:'open'}) or {mode:'closed'} to create Shadow DOM. If you need to access Shadow DOM from external JavaScript, select the 'open' mode, or if you want better encapsulation and isolation, select the 'closed' mode. The 'closed' mode is preferred. In addition, after completing the construction of Shadow DOM, you also need to build an HTML structure in Shadow DOM to display the watermark. Specifically, you can create some DOM nodes (such as div, span, or img, etc.) and attach them to the root element of ShadowDOM. Among them, if you choose to use If you want to embed a grayscale watermark using the tag, you need to create an img element, set its src attribute to the URL of the watermark image, and then add it to the Shadow DOM. Alternatively, you can use other elements (such as canvas) to dynamically draw the watermark image. Finally, use the customElements.define() method to register the generated custom element to the browser. This method accepts two parameters: the name of the custom element (including the hyphen before the tag name) and the constructor of the custom element. And once the custom element is registered, you can use it in the HTML document like any other HTML element. Just change <watermark-element>(or any name you choose) to the corresponding HTML, the browser will automatically instantiate this element using the defined constructor and Shadow DOM.

[0129] Specifically, Shadow DOM will be used as the private DOM tree of the watermark element to encapsulate and isolate the HTML, CSS, and JavaScript code of the watermark content. After creating Shadow DOM, you can design the watermark content in Shadow DOM. Specifically, you can create an HTML element (such as 、 , , etc.) to carry the watermark content, and add CSS styles to it to control the display method (such as position, size, transparency, etc.). If you choose to use an image as the watermark content, you also need to include the image file as a resource in your web application and reference it through the src attribute in the HTML element.

[0130] The process of using Shadow DOM to achieve watermark isolation includes: 1. Use the Element.attachShadow method to attach the Shadow root to any element tree (Shadow T ree). 2. The element tree accepts the mode attribute, and the Shadow DOM can be obtained through the javascript method in the page. 3. Shadow DOM implements the close attribute, which achieves isolation by flattening the tree structure and exposing only the Shadow host to the outside.

[0131] The features of Shadow DOM include: 1. Encapsulation: Shadow DOM allows developers to encapsulate the internal structure, style, and behavior of components to isolate them from the external DOM tree. In this way, the internal implementation of the component will not be affected by external styles and scripts, nor will it affect other external elements. 2. Isolation: The styles and scripts defined in Shadow DOM are only valid for its internal elements, will not leak into external documents, and will not be affected by styles and scripts in external documents. This isolation helps reduce style conflicts and code pollution. 3. Scoped CSS: The style rules in Shadow DOM only apply to the internal elements of the component, which can avoid global style conflicts. It also allows common style class names to be used within the component without worrying about conflicts with class names in external documents.

[0132] The present application obtains a custom element corresponding to the watermark component; then constructs a constructor corresponding to the custom element; then obtains a preset creation method; and subsequently, in the constructor, uses the creation method to create the shadow document object model corresponding to the watermark element. The present application constructs a constructor corresponding to the obtained custom element corresponding to the watermark component, and then in the constructor, uses the obtained creation method to create the shadow document object model corresponding to the watermark element, thereby realizing the rapid and intelligent creation of the shadow document object model corresponding to the watermark element in the watermark component, thereby improving the creation efficiency and creation intelligence of the shadow document object model.

[0133] In some optional implementations, step S206 includes the following steps:

[0134] The second watermark content is embedded in the shadow document object model to obtain the corresponding first watermark component.

[0135] In this embodiment, by using the shadow document object model Tags or other suitable elements are used to embed the processed grayscale image watermark, that is, the above-mentioned second watermark content, so as to obtain the corresponding first watermark component.

[0136] Obtain a target display mode corresponding to the watermark content.

[0137] In this embodiment, the target display mode is to control the display mode of the watermark content. The specific display mode can be set according to the actual business use requirements.

[0138] Based on the target display mode, style processing is added in the shadow document object model in the first watermark component to obtain a corresponding second watermark component.

[0139] In this embodiment, the display mode of the watermark can be controlled by using CSS classes to define styles within Shadow DOM, that is, the above-mentioned target display mode. Specifically, the watermark display mode can be controlled by creating <style>元素并将其添加到Shadow DOM中来定义CSS样式。通过使用CSS类来控制水印的显示方式,而不是直接修改元素的style属性。这样可以利用浏览器的CSS优化机制,进而提高性能。

[0140] 将所述第二水印组件作为所述目标水印组件。

[0141] 本申请通过在所述阴影文档对象模型中嵌入所述第二水印内容,得到对应的第一水印组件;然后获取与所述水印内容对应的目标显示方式;之后基于所述目标显示方式,在所述第一水印组件中的所述阴影文档对象模型内进行添加样式处理,得到对应的第二水印组件;后续将所述第二水印组件作为所述目标水印组件。本申请通过在所述阴影文档对象模型中嵌入所述第二水印内容,得到对应的第一水印组件,进而基于获取到的与所述水印内容对应的目标显示方式,在所述第一水印组件中的所述阴影文档对象模型内进行添加样式处理,从而可以实现快速智能地完成目标水印组件的构建,提高了目标水印组件的构建效率,保证了生成的目标水印组件的内容准确性。

[0142] 在本实施例的一些可选的实现方式中,步骤S207包括以下步骤:

[0143] 获取预设的显示校验规则。

[0144] 在本实施例中,上述显示校验规则为预先构建的使用媒体查询(Media Queries)和响应式布局技术来确保水印组件在不同屏幕尺寸和分辨率下都能正确显示,且不会影响页面性能的校验规则。

[0145] 基于所述显示校验规则对所述目标水印组件进行显示校验。

[0146] 在本实施例中,可通过使用所述显示校验规则中的校验逻辑对对所述目标水印组件进行显示校验,并判断上述目标水印组件是否符合该显示校验规则。如果上述目标水印组件符合该显示校验规则,则判定所述目标水印组件通过显示校验。而如果上述目标水印组件不符合该显示校验规则,则判定所述目标水印组件未通过显示校验。

[0147] 若所述目标水印组件通过显示校验,则获取与所述水印内容对应的所述目标页面。

[0148] 在本实施例中,上述目标页面是指需要进行关于上述水印内容的水印添加处理的页面。在金融保险领域中,上述目标页面可包括车险页面、理赔页面、寿险页面,等等。

[0149] 确定所述目标页面中的水印添加位置。

[0150] 在本实施例中,对于上述水印添加位置的选取不做具体限定,可根据实际的业务使用需求进行设置。例如可采用目标页面的左上角位置、右上角位置、中间位置、左下角位置、右下角位置,等等。

[0151] 基于所述水印添加位置,将所述目标水印组件集成至所述目标页面内。

[0152] 在本实施例中,通过将所述目标水印组件填充至上述目标页面内的所述水印添加位置处,以完成所述目标水印组件的集成处理。

[0153] 本申请通过获取预设的显示校验规则;然后基于所述显示校验规则对所述目标水印组件进行显示校验;若所述目标水印组件通过显示校验,则获取与所述水印内容对应的所述目标页面;之后确定所述目标页面中的水印添加位置;后续基于所述水印添加位置,将所述目标水印组件集成至所述目标页面内。本申请在所述阴影文档对象模型中嵌入所述第二水印内容,得到对应的目标水印组件后,还会智能地根据预设的显示校验规则对所述目标水印组件进行显示校验,并在确定所述目标水印组件通过显示校验后,获取与所述水印内容对应的所述目标页面中的水印添加位置,进而基于所述水印添加位置,将所述目标水印组件集成至所述目标页面内,从而有效地确保了目标水印组件能够在目标页面内进行正常显示,保证了目标水印组件的有效性。

[0154] 在本实施例的一些可选的实现方式中,在步骤S203之后,上述电子设备还可以执行以下步骤:

[0155] 获取预设的水印存储方式。

[0156] 在本实施例中,对于上述水印存储方式的选取不做具体限定,可根据实际的业务使用需求进行确定。示例性的,水印存储方式可采用本地数据库存储、云端服务器存储、网盘存储、区块链存储等中的任意一种存储方式。优选使用区块链存储作为上述水印存储方式。通过使用区块链的存储方式来对水印内容进行存储和管理,可以实现有效地保证水印内容的安全性与不可篡改性。

[0157] 确定与所述水印存储方式对应的目标存储介质。

[0158] 在本实施例中,对于本地数据库存储、云端服务器存储、网盘存储、区块链存储等存储方式,则与该存储方式对应的存储介质可包括本地数据库、云端服务器、网盘、区块链。

[0159] 基于所述水印内容、所述第一水印内容以及所述第二水印内容构建目标水印内容。

[0160] 在本实施例中,可通过对所述水印内容、所述第一水印内容以及第二水印内容进行打包处理,从而得到相应的目标水印内容。目标水印内容由所述水印内容、所述第一水印内容以及第二水印内容组成。

[0161] 将所述目标水印内容存储至所述目标存储介质内。

[0162] 在本实施例中,可通过确定上述目标存储介质的存储位置信息,进而根据该存储位置信息与目标存储介质建立通信连接关系,并实现将所述目标水印内容存储至所述目标存储介质内。

[0163] 本申请通过获取预设的水印存储方式;然后确定与所述水印存储方式对应的目标存储介质;之后基于所述水印内容、所述第一水印内容以及所述第二水印内容构建目标水印内容;后续将所述目标水印内容存储至所述目标存储介质内。本申请在完成第一水印内容与第二水印内容的生成后,还会智能地基于所述水印内容、所述第一水印内容以及所述第二水印内容构建目标水印内容,进而使用与水印存储方式对应的目标存储介质来对该目标水印内容进行存储,从而可以有效地保证目标水印内容的数据安全性与不可篡改性,提高了对于目标水印内容的存储智能性。

[0164] 应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。

[0165] 需要强调的是,为进一步保证上述目标水印组件的私密和安全性,上述目标水印组件还可以存储于一区块链的节点中。

[0166] 本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。

[0167] 本申请实施例可以基于人工智能技术对相关的数据进行获取和处理。其中,人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。

[0168] 人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作 / 交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、机器人技术、生物识别技术、语音处理技术、自然语言处理技术以及机器学习 / 深度学习等几大方向。

[0169] 本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,该计算机可读指令可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等。

[0170] 应该理解的是,虽然附图的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,附图的流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。

[0171] 进一步参考图3,作为对上述图2所示方法的实现,本申请提供了一种水印处理装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。

[0172] 如图3所示,本实施例所述的水印处理装置300包括:第一获取模块301、加密模块302、转换模块303、调用模块304、创建模块305、构建模块306以及集成模块307。其中:

[0173] 第一获取模块301,用于获取待处理的水印内容;

[0174] 加密模块302,用于基于预设的加密算法对所述水印内容进行加密处理,得到对应的第一水印内容;

[0175] 转换模块303,用于对所述第一水印内容进行灰度图转换处理,得到对应的第二水印内容;

[0176] 调用模块304,用于调用预先构建的水印组件;

[0177] 创建模块305,用于在所述水印组件中创建与水印元素对应的阴影文档对象模型;

[0178] 构建模块306,用于在所述阴影文档对象模型中嵌入所述第二水印内容,得到对应的目标水印组件;

[0179] 集成模块307,用于将所述目标水印组件集成至预设的目标页面。

[0180] 在本实施例中,上述模块或单元分别用于执行的操作与前述实施方式的水印处理方法的步骤一一对应,在此不再赘述。

[0181] 在本实施例的一些可选的实现方式中,加密模块302包括:

[0182] 第一确定子模块,用于从预设的多种加密算法中确定出目标加密算法;

[0183] 生成子模块,用于基于预设的加密库生成密钥;

[0184] 加密子模块,用于基于所述目标加密算法与所述密钥对所述水印内容进行加密处理,得到加密后的水印内容;

[0185] 第二确定子模块,用于将所述加密后的水印内容作为所述第一水印内容。

[0186] 在本实施例中,上述模块或单元分别用于执行的操作与前述实施方式的水印处理方法的步骤一一对应,在此不再赘述。

[0187] 在本实施例的一些可选的实现方式中,转换模块303包括:

[0188] 第一获取子模块,用于获取所述第一水印内容的图像展示信息;

[0189] 判断子模块,用于判断所述图像展示信息是否为灰度图信息;

[0190] 转换子模块,用于若否,调用预设的图像处理工具将所述第一水印内容转换为对应的目标灰度图;

[0191] 第三确定子模块,用于将所述目标灰度图作为所述第二水印内容。

[0192] 本实施例中,上述模块或单元分别用于执行的操作与前述实施方式的水印处理方法的步骤一一对应,在此不再赘述。

[0193] 在本实施例的一些可选的实现方式中,创建模块305包括:

[0194] 第二获取子模块,用于获取与所述水印组件对应的自定义元素;

[0195] 构建子模块,用于构建与所述自定义元素对应的构造函数;

[0196] 第三获取子模块,用于获取预设的创建方法;

[0197] 创建子模块,用于在所述构造函数中,使用所述创建方法创建与水印元素对应的所述阴影文档对象模型。

[0198] 在本实施例中,上述模块或单元分别用于执行的操作与前述实施方式的水印处理方法的步骤一一对应,在此不再赘述。

[0199] 在本实施例的一些可选的实现方式中,构建模块306包括:

[0200] 嵌入子模块,用于在所述阴影文档对象模型中嵌入所述第二水印内容,得到对应的第一水印组件;

[0201] 第四获取子模块,用于获取与所述水印内容对应的目标显示方式;

[0202] 添加子模块,用于基于所述目标显示方式,在所述第一水印组件中的所述阴影文档对象模型内进行添加样式处理,得到对应的第二水印组件;

[0203] 第四确定子模块,用于将所述第二水印组件作为所述目标水印组件。

[0204] 在本实施例中,上述模块或单元分别用于执行的操作与前述实施方式的水印处理方法的步骤一一对应,在此不再赘述。

[0205] 在本实施例的一些可选的实现方式中,集成模块307包括:

[0206] 第五获取子模块,用于获取预设的显示校验规则;

[0207] 校验子模块,用于基于所述显示校验规则对所述目标水印组件进行显示校验;

[0208] 第六获取子模块,用于若所述目标水印组件通过显示校验,则获取与所述水印内容对应的所述目标页面;

[0209] 第五确定子模块,用于确定所述目标页面中的水印添加位置;

[0210] 集成子模块,用于基于所述水印添加位置,将所述目标水印组件集成至所述目标页面内。

[0211] 在本实施例中,上述模块或单元分别用于执行的操作与前述实施方式的水印处理方法的步骤一一对应,在此不再赘述。

[0212] 在本实施例的一些可选的实现方式中,水印处理装置还包括:

[0213] 第二获取模块,用于获取预设的水印存储方式;

[0214] 确定模块,用于确定与所述水印存储方式对应的目标存储介质;

[0215] 生成模块,用于基于所述水印内容、所述第一水印内容以及所述第二水印内容构建目标水印内容;

[0216] 存储模块,用于将所述目标水印内容存储至所述目标存储介质内。

[0217] 在本实施例中,上述模块或单元分别用于执行的操作与前述实施方式的水印处理方法的步骤一一对应,在此不再赘述。

[0218] 为解决上述技术问题,本申请实施例还提供计算机设备。具体请参阅图4,图4为本实施例计算机设备基本结构框图。

[0219] 所述计算机设备4包括通过系统总线相互通信连接存储器41、处理器42、网络接口43。需要指出的是,图中仅示出了具有组件41-43的计算机设备4,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。其中,本技术领域技术人员可以理解,这里的计算机设备是一种能够按照事先设定或存储的指令,自动进行数值计算和 / 或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(ApplicationSpecific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable GateArray,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。

[0220] 所述计算机设备可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述计算机设备可以与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互。

[0221] 所述存储器41至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器41可以是所述计算机设备4的内部存储单元,例如该计算机设备4的硬盘或内存。在另一些实施例中,所述存储器41也可以是所述计算机设备4的外部存储设备,例如该计算机设备4上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(FlashCard)等。当然,所述存储器41还可以既包括所述计算机设备4的内部存储单元也包括其外部存储设备。本实施例中,所述存储器41通常用于存储安装于所述计算机设备4的操作系统和各类应用软件,例如水印处理方法的计算机可读指令等。此外,所述存储器41还可以用于暂时地存储已经输出或者将要输出的各类数据。

[0222] 所述处理器42在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器42通常用于控制所述计算机设备4的总体操作。本实施例中,所述处理器42用于运行所述存储器41中存储的计算机可读指令或者处理数据,例如运行所述水印处理方法的计算机可读指令。

[0223] 所述网络接口43可包括无线网络接口或有线网络接口,该网络接口43通常用于在所述计算机设备4与其他电子设备之间建立通信连接。

[0224] 与现有技术相比,本申请实施例主要有以下有益效果:

[0225] 本申请实施例中,首先获取待处理的水印内容;然后基于预设的加密算法对所述水印内容进行加密处理,得到对应的第一水印内容;之后对所述第一水印内容进行灰度图转换处理,得到对应的第二水印内容;后续调用预先构建的水印组件,并在所述水印组件中创建与水印元素对应的阴影文档对象模型;进一步在所述阴影文档对象模型中嵌入所述第二水印内容,得到对应的目标水印组件;最后将所述目标水印组件集成至预设的目标页面。本申请通过基于使用加密算法以及灰度图转换的方式对获取的待处理的水印内容进行处理生成第二水印内容,进而使用水印组件创建与水印元素对应的阴影文档对象模型,并在所述阴影文档对象模型中嵌入所述第二水印内容得到对应的目标水印组件,最后将所述目标水印组件集成至预设的目标页面,实现了一个既安全又高效的盲水印生成方案,不仅可以在网页中动态生成水印,还可以有效防止水印被篡改,为水印内容的保护提供有力支持,有效地解决了水印生成的安全性问题,保证了水印内容的真实性和可信度。

[0226] 本申请还提供了另一种实施方式,即提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令可被至少一个处理器执行,以使所述至少一个处理器执行如上述的水印处理方法的步骤。

[0227] 与现有技术相比,本申请实施例主要有以下有益效果:

[0228] 本申请实施例中,首先获取待处理的水印内容;然后基于预设的加密算法对所述水印内容进行加密处理,得到对应的第一水印内容;之后对所述第一水印内容进行灰度图转换处理,得到对应的第二水印内容;后续调用预先构建的水印组件,并在所述水印组件中创建与水印元素对应的阴影文档对象模型;进一步在所述阴影文档对象模型中嵌入所述第二水印内容,得到对应的目标水印组件;最后将所述目标水印组件集成至预设的目标页面。本申请通过基于使用加密算法以及灰度图转换的方式对获取的待处理的水印内容进行处理生成第二水印内容,进而使用水印组件创建与水印元素对应的阴影文档对象模型,并在所述阴影文档对象模型中嵌入所述第二水印内容得到对应的目标水印组件,最后将所述目标水印组件集成至预设的目标页面,实现了一个既安全又高效的盲水印生成方案,不仅可以在网页中动态生成水印,还可以有效防止水印被篡改,为水印内容的保护提供有力支持,有效地解决了水印生成的安全性问题,保证了水印内容的真实性和可信度。

[0229] 通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM / RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。

[0230] 显然,以上所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例,附图中给出了本申请的较佳实施例,但并不限制本申请的专利范围。本申请可以以许多不同的形式来实现,相反地,提供这些实施例的目的是使对本申请的公开内容的理解更加透彻全面。尽管参照前述实施例对本申请进行了详细的说明,对于本领域的技术人员来而言,其依然可以对前述各具体实施方式所记载的技术方案进行修改,或者对其中部分技术特征进行等效替换。凡是利用本申请说明书及附图内容所做的等效结构,直接或间接运用在其他相关的技术领域,均同理在本申请专利保护范围之内。< / style>

Claims

1. A watermark processing method, characterized in that: The steps include: Get the watermark content to be processed; Encrypting the watermark content based on a preset encryption algorithm to obtain corresponding first watermark content; Performing grayscale conversion processing on the first watermark content to obtain corresponding second watermark content; Call the pre-built watermark component; Creating a shadow document object model corresponding to the watermark element in the watermark component; embedding the second watermark content in the shadow document object model to obtain a corresponding target watermark component; Integrate the target watermark component into a preset target page.

2. The watermark processing method according to claim 1, characterized in that: The step of encrypting the watermark content based on a preset encryption algorithm to obtain the corresponding first watermark content specifically includes: Determine a target encryption algorithm from among a plurality of preset encryption algorithms; Generate keys based on the preset encryption library; Encrypting the watermark content based on the target encryption algorithm and the key to obtain encrypted watermark content; The encrypted watermark content is used as the first watermark content.

3. The watermark processing method according to claim 1, characterized in that: The step of performing grayscale conversion processing on the first watermark content to obtain the corresponding second watermark content specifically includes: Obtaining image display information of the first watermark content; Determining whether the image display information is grayscale image information; If not, calling a preset image processing tool to convert the first watermark content into a corresponding target grayscale image; The target grayscale image is used as the second watermark content.

4. The watermark processing method according to claim 1, characterized in that: The step of creating a shadow document object model corresponding to the watermark element in the watermark component specifically includes: Get the custom element corresponding to the watermark component; Construct a constructor corresponding to the custom element; Get the preset creation method; In the constructor, the shadow document object model corresponding to the watermark element is created using the creation method.

5. The watermark processing method according to claim 1, characterized in that: The step of embedding the second watermark content in the shadow document object model to obtain the corresponding target watermark component specifically includes: embedding the second watermark content in the shadow document object model to obtain a corresponding first watermark component; Acquire a target display mode corresponding to the watermark content; Based on the target display mode, adding style processing is performed in the shadow document object model in the first watermark component to obtain a corresponding second watermark component; The second watermark component is used as the target watermark component.

6. The watermark processing method according to claim 1, characterized in that: The step of integrating the target watermark component into a preset target page specifically includes: Get the preset display verification rules; Performing display verification on the target watermark component based on the display verification rule; If the target watermark component passes the display verification, obtaining the target page corresponding to the watermark content; Determine the watermark adding position in the target page; Based on the watermark adding position, the target watermark component is integrated into the target page.

7. The watermark processing method according to claim 1, characterized in that: After the step of performing grayscale conversion processing on the first watermark content to obtain the corresponding second watermark content, the method further includes: Get the preset watermark storage method; Determining a target storage medium corresponding to the watermark storage method; constructing target watermark content based on the watermark content, the first watermark content and the second watermark content; The target watermark content is stored in the target storage medium.

8. A watermark processing device, characterized in that: include: A first acquisition module, used to acquire watermark content to be processed; An encryption module, used to encrypt the watermark content based on a preset encryption algorithm to obtain corresponding first watermark content; A conversion module, used for performing grayscale conversion processing on the first watermark content to obtain corresponding second watermark content; The calling module is used to call the pre-built watermark component; A creation module, used for creating a shadow document object model corresponding to the watermark element in the watermark component; A construction module, used for embedding the second watermark content in the shadow document object model to obtain a corresponding target watermark component; The integration module is used to integrate the target watermark component into a preset target page.

9. A computer device, comprising a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the watermark processing method according to any one of claims 1 to 7 when executing the computer-readable instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the watermark processing method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Watermark embedding method and device, storage medium and computer program product

    CN121173915A