Page watermark generation method and device, electronic equipment, storage medium and program product

By detecting the operation number in the session manager in the post-processor and adding watermarks to the page content area identification key information, the problem of ineffective page watermark generation method in the prior art is solved, and efficient security protection of page data is achieved.

CN119919271AActive Publication Date: 2025-05-02HANGZHOU NEWGRAND TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510406028.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-05-02
Estimated Expiration
2045-04-02

AI Technical Summary

Technical Problem

In the prior art, the page watermark generation method is relatively fixed and cannot effectively protect information security.

Method used

By detecting that the current page picture is deleted in the session manager and no other operation number exists in the post-processor, the current page picture is generated and a watermark is added in the content area to identify the key information, ensuring that the watermark covers all uncovered areas.

Benefits of technology

Improve the security of page data, ensure that key information is effectively protected when browsing and printing, and enhance information security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919271A_ABST
    Figure CN119919271A_ABST
Patent Text Reader

Abstract

The invention discloses a page watermark generation method and device, electronic equipment, a storage medium and a program product, and relates to the technical field of computer security. The method comprises the steps that when it is detected that a data loading process corresponding to a current page data loading operation is completed and no other operation serial number exists in a session manager where a current operation serial number is located, a front-end page is rendered, and a current display page is obtained; generating a current page picture according to the current resolution and the current root element of the current display page; performing region identification on the current page picture, and determining a current content region; key information identification is carried out on the current content area to obtain current key information, and a current page watermark is added to the current key information; and uniformly adding the current page watermark in the watermark uncovered area, and feeding back to the front-end page, so that the front-end page displays the current page picture after the current page watermark is added. According to the technical scheme, the security of the page data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer security technology, and in particular to a page watermark generation method, device, electronic equipment, storage medium and program product. Background Art

[0002] In daily software installations, in order to ensure information security, watermarks are embedded in browser page data and browser print data to prevent information leakage. However, the existing watermark generation method is relatively fixed, usually dispersing the watermark in a certain density on the page, resulting in the watermark not playing a role in protecting information security. Summary of the invention

[0003] The present invention provides a page watermark generation method, device, electronic equipment, storage medium and program product, which improve the security of page data.

[0004] According to one aspect of the present invention, a page watermark generation method is provided, which is applied to a post-processor, and the method comprises:

[0005] When it is detected that the current operation number has been deleted in the session manager and no other operation number exists in the session manager where the current operation number is located, based on the current page data loading operation corresponding to the current operation number, the current event source is called, the current root element corresponding to the current event source is obtained, and the front-end page is rendered to obtain the current display page;

[0006] Generate a current page image according to the current resolution and the current root element of the currently displayed page;

[0007] According to the current content interval of the current page image, performing region recognition on the current page image to determine the current content region of the current page image;

[0008] Performing key information identification on the current content area to obtain current key information, and adding a current page watermark at the current key information;

[0009] Detect the watermark uncovered area of ​​the current content area, and evenly add the current page watermark in the watermark uncovered area, and feed back the current page image to the front page so that the front page displays the current page image after adding the current page watermark.

[0010] According to another aspect of the present invention, a page watermark generation device is provided, which is applied to a post-processor, and the device comprises:

[0011] A current display page generation module is used to call the current event source based on the current page data loading operation corresponding to the current operation number, obtain the current root element corresponding to the current event source, render the front-end page, and obtain the current display page when it is detected that the current operation number has been deleted in the session manager and no other operation number exists in the session manager where the current operation number is located;

[0012] A current page image generation module, used to generate a current page image according to the current resolution and current root element of the currently displayed page;

[0013] A current content area identification module, used to perform area identification on the current page image according to the current content interval of the current page image, and determine the current content area of ​​the current page image;

[0014] A first current watermark adding module, used for identifying key information of the current content area, obtaining current key information, and adding a current page watermark at the current key information;

[0015] The second current watermark adding module is used to detect the watermark uncovered area of ​​the current content area, and evenly add the current page watermark in the watermark uncovered area, and feed back the current page image to the front-end page so that the front-end page displays the current page image after adding the current page watermark.

[0016] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0017] at least one processor; and

[0018] a memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the page watermark generation method described in any embodiment of the present invention.

[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the page watermark generation method described in any embodiment of the present invention when executed.

[0021] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the method for generating a page watermark according to any embodiment of the present invention is implemented.

[0022] The technical solution of the embodiment of the present invention is to call the current event source based on the current page data loading operation corresponding to the current operation number, obtain the current root element corresponding to the current event source, render the front-end page to obtain the current display page, generate the current page image according to the current resolution and the current root element of the current display page, and realize the monitoring of data interaction between the front-end page and the back-end server through the operation number in the session manager. When the data loading of a single session of the front-end page is completed, the generation of the current page image corresponding to the front display page and the current display page is realized; by performing area recognition on the current page image, the current content area of ​​the current page image is determined, and the current Key information is identified in the content area to obtain the current key information, and the current page watermark is added at the current key information, so that when the page operator browses and prints the browser page data, the watermark of the key information in the current content area is added, thereby improving the security of the key information in the current page image; by detecting the watermark uncovered area of ​​the current content area, and evenly adding the current page watermark in the watermark uncovered area, the current page image is fed back to the front-end page, so that the front-end page displays the current page image after the current page watermark is added, so that the watermark of the content in the watermark uncovered area of ​​the current content area is added, thereby improving the security of the page data in the watermark uncovered area of ​​the current content area, thereby improving the security of the front-end page data when the page operator browses and prints the browser page data.

[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 is a flow chart of a method for generating a page watermark according to the first embodiment of the present invention;

[0026] Figure 2 is a flow chart of a method for generating a page watermark according to a second embodiment of the present invention;

[0027] Figure 3is a schematic diagram of the structure of a page watermark generating device provided according to Embodiment 3 of the present invention;

[0028] Figure 4 It is a structural schematic diagram of an electronic device for implementing the page watermark generation method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0031] Embodiment 1

[0032] Figure 1 This is a flow chart of a page watermark generation method provided in Embodiment 1 of the present invention. The embodiment of the present invention is applicable to the case where a watermark is embedded in browser page data or browser print data. The method can be executed by a page watermark generation device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device that carries a page watermark generation function.

[0033] See also Figure 1 The page watermark generation method shown is applied to a post-processor, comprising:

[0034] S110. When it is detected that the current operation number has been deleted in the session manager and no other operation number exists in the session manager where the current operation number is located, based on the current page data loading operation corresponding to the current operation number, the current event source is called, the current root element corresponding to the current event source is obtained, the front-end page is rendered, and the current display page is obtained.

[0035] The session manager can be used to store the operation numbers corresponding to each page data loading operation in a single session. One session manager corresponds to one session. Each time a page is opened, it corresponds to a session, and a corresponding session manager is also created. The same session can include multiple page data loading operations. Each page data loading operation corresponds to an operation number. A single operation number is used to identify a single page data loading operation. Among them, the current operation number can be used to identify the current page data loading operation; other operation numbers can be used to identify other page data loading operations that belong to the same session as the current page data loading operation. The page data loading operation can be triggered by an operation on a certain page element of the front-end page. The same page data loading operation corresponds to the same page element of the front-end page and the same access address of the back-end server. The operation number can be used to distinguish the operation process of different page elements of the front-end page and / or the access process of different access addresses of the back-end server. The operation number can also be used to distinguish repeated page data loading operations. It can be understood that if the page operator operates the same page element in the front-end page and accesses the same access address in the back-end server, at this time, the generated operation number is the same. Therefore, the repeated operations of the page operator can be distinguished based on the operation number. Optionally, the same page may have multiple data request interfaces for receiving multiple page data loading operations during the same session. The current page data loading operation may be a data loading operation triggered on a certain page element in the front-end page at the current moment. The current page data loading operation may trigger data interaction between the front-end page and the back-end server. The front-end page may be used to display the current page image. The back-end server may be used to manage page data.

[0036] The current operation number has been deleted in the session manager, which can be understood as the data loading process corresponding to the current page data loading operation has been completed; correspondingly, the current operation number exists in the session manager, which can be understood as the data loading process corresponding to the current page data loading operation has not been completed. There are other operation numbers in the session manager where the current operation number is located, which can be understood as the session to which the current page data loading operation belongs has not ended, that is, there are data loading processes of other page data loading operations after the current page data loading operation, and the page data required to be loaded in this session has not been loaded; there are no other operation numbers in the session manager where the current operation number is located, which can be understood as the session to which the current page data loading operation belongs has ended, that is, there are no data loading processes of other page data loading operations after the current page data loading operation, and the page data required to be loaded in this session has been loaded.

[0037] The postprocessor can be used to detect whether there is an operation number in the session manager, render the front-end page, and generate a current page watermark. The current event source can be a DOM (Document Object Model) element that triggers the event corresponding to the current page data loading operation. The current event source can be an object directly acted upon by the current page data loading operation, that is, a page element directly acted upon by the current page data loading operation. Exemplarily, the page element can include a button or an input box, etc. The current event source can implement page interaction logic by binding an event processing function. The current root element can be the starting point or end point of the event propagation corresponding to the current page data loading operation. It can be understood that the current root element can be the only entry of the DOM (Document Object Model) number. Exemplarily, the current root element can be an HTML (Hyper Text Markup Language) tag of the front-end page. The current display page can be a display page rendered based on the current root element corresponding to the current event source.

[0038] Specifically, through the post-processor, when it is detected that the current operation number has been deleted in the session manager and there is no other operation number in the session manager where the current operation number is located, the current event source that triggers the current page data loading operation can be called based on the current page data loading operation corresponding to the current operation number to obtain the current root element corresponding to the current event source. The timing of registration and rendering completion can be determined by monitoring the current root element, and when the timing of registration and rendering completion is reached, the front-end page is rendered to obtain the current display page.

[0039] In an optional embodiment of the present invention, when it is detected that the current operation number has been deleted in the session manager and there is no other operation number in the session manager where the current operation number is located, based on the current page data loading operation corresponding to the current operation number, the current event source is called, the current root element corresponding to the current event source is obtained, and the front-end page is rendered to obtain the currently displayed page. It also includes: intercepting the current page data loading operation of the front-end page through a front-end interceptor, generating a current operation number corresponding to the current page data loading operation, and storing the current operation number in the session manager; and deleting the current operation number corresponding to the current page data loading operation in the session manager through the front-end interceptor when it is detected that the data loading process corresponding to the current page data loading operation has been completed.

[0040] The front-end interceptor can be used to intercept the page data loading operation that interacts between the front-end page and the back-end server and process the operation number corresponding to the page data loading operation. Compared with other operations on page data, such as page data addition operations, page data deletion operations, and page data modification operations, page data loading operations are the key operations that cause data leakage on the back-end server. Therefore, using a front-end interceptor to intercept page data loading operations and using a session manager to manage the operation numbers corresponding to page data loading operations can ensure the security of the page data corresponding to the front-end page on the back-end server.

[0041] The data loading process corresponding to the current page data loading operation has been completed, which can be understood as the current page data in the backend server corresponding to the current page data loading operation fed back by the backend server to the front-end page has been detected. The current operation number in the session manager can be used to indicate whether the data loading process corresponding to the current page data loading operation is completed. It can be understood that if the current operation number exists in the session manager, it means that the data loading process corresponding to the current page data loading operation is in progress, that is, it has not been completed; if the current operation number does not exist in the session manager, it means that the current page data loading operation has not been triggered or the data loading process corresponding to the current page data loading operation has been completed.

[0042] Specifically, when the post-processor detects that the current operation number has been deleted in the session manager and no other operation number exists in the session manager where the current operation number is located, based on the current page data loading operation corresponding to the current operation number, the current event source is called, the current root element corresponding to the current event source is obtained, and the front-end page is rendered. Before the current display page is obtained, the current page data loading operation of the front-end page is detected through the front-end interceptor. When the current page data loading operation is detected, the current page data loading operation is intercepted, and the current operation number corresponding to the current page data loading operation is generated at the same time, and the current operation number is stored in the session manager. When the data loading process corresponding to the current page data loading operation is detected to be completed through the front-end interceptor, the current operation number corresponding to the current page data loading operation in the session manager can be deleted.

[0043] This solution introduces a front-end interceptor to intercept the page data loading operation between the front-end page and the back-end server and to process the operation number corresponding to the page data loading operation in the session manager. The operation number is managed in conjunction with the session manager to ensure the security of data interaction between the front-end page and the back-end server during the page watermark generation process.

[0044] S120: Generate a current page image according to the current resolution and the current root element of the currently displayed page.

[0045] The current resolution can be used to characterize the actual number of pixels of the currently displayed page. In fact, the current resolution is a key parameter that affects the image size of the current page image. The current root element is a key parameter that determines the image content of the current page image.

[0046] Specifically, the image size of the currently displayed page can be determined according to the current resolution of the currently displayed page. Starting from the current root element of the currently displayed page, all current child element chains corresponding to the current root element can be obtained to determine the image content of the current page image. The current page image can be generated according to the image size and image content of the current page image. Among them, the current child element chain can refer to a parent-child element relationship chain nested layer by layer starting from the current root element. The current child element chain must exist dependent on the current root element. The current root element is the starting point of the entire current child element chain. All page data loading operations must start from the current root element and traverse downward. The current child element chain is used to organize content and realize data interaction between the front-end page and the back-end server.

[0047] S130: Perform region recognition on the current page image to determine the current content region of the current page image.

[0048] The current content area may be an area where the content in the current page image is located. Compared with other areas in the current page image, the content in the current content area is more important than the content in other areas.

[0049] Optionally, a preset content density may be obtained, and the current content interval of the current page image and the preset content density may be compared to perform region identification on the current page image. When the current content interval of the current page image is greater than or equal to the preset content density, the current content region of the current page image may be determined. The current content interval may be used to characterize the density of each part of the content in the current page image.

[0050] Optionally, OCR (Optical Character Recognition) may be used to identify the page layout of the current page image, such as a top-bottom layout or a top-bottom-left-right layout. The current content area of ​​the current page image may be determined based on the page layout of the current page image. For example, in a top-bottom layout, the current content area of ​​the current page image may be the lower area of ​​the current page image; in a top-bottom-left-right layout, the current content area of ​​the current page image may be the center area of ​​the current page image.

[0051] Optionally, different areas of the current page image may be distinguished based on the background color of the current page image to determine the current content area of ​​the current page image.

[0052] S140: Identify key information in the current content area to obtain current key information, and add a current page watermark at the current key information.

[0053] The current key information may be the key information in the current content area. Exemplarily, the current key information may include numbers, reports, presentations, and results. Optionally, the identified current key information may be placed in a content container to manage the current key information. The current page watermark may be a page watermark added to the current page image. Optionally, the size, tilt angle, and content of the current page watermark may be preset and adjusted by the page manager.

[0054] Specifically, the current content area can be identified to obtain the current page content of the current content area. Optionally, a large language model can be used to extract prompt words based on key information, and semantic understanding of the current page content can be performed to obtain the current key information. Exemplarily, the key information extraction prompt word can be "Please identify the key information contained in the content: current page content; such as numbers, reports, reports and results, etc." Optionally, preset keywords can be predefined by technical personnel. Based on preset keywords, regular recognition can be performed on the current page content to obtain the current key information. The current page watermark can be added at the location of the current key information.

[0055] In an optional embodiment of the present invention, while identifying key information in the current content area, obtaining the current key information, and adding the current page watermark at the current key information, it also includes: identifying sensitive information in the current content area, obtaining the current sensitive information, and adding the current page watermark at the current sensitive information.

[0056] The current sensitive information may be sensitive information in the current content area. Exemplarily, the current sensitive information may include sensitive information specified by laws and regulations. Optionally, the identified current sensitive information may be placed in a content container to manage the current sensitive information.

[0057] Specifically, the current content area can be identified to obtain the current page content of the current content area. Optionally, a large language model can be used to extract prompt words based on sensitive information, and semantic understanding of the current page content can be performed to obtain the current sensitive information. Exemplarily, the prompt word for sensitive information extraction can be "Please identify the sensitive information contained in this content: current page content; such as sensitive information required by law." Optionally, preset sensitive words can be predefined by technical personnel. Based on the preset sensitive words, regular recognition can be performed on the current page content to obtain the current sensitive information. The current page watermark can be added at the location of the current sensitive information.

[0058] This solution introduces a process of identifying sensitive information in the current content area and a process of adding a page watermark at the sensitive information, which further improves the security of the page data in the current content area.

[0059] S150, detecting the watermark uncovered area of ​​the current content area, and evenly adding the current page watermark in the watermark uncovered area, and feeding back the current page image to the front page, so that the front page displays the current page image after adding the current page watermark.

[0060] The watermark uncovered area may be an area in the current content area that is not covered by the current page watermark. Correspondingly, the watermark covered area may be an area in the current content area that covers the current page watermark. Comparatively, the importance of the content in the watermark covered area of ​​the current content area is higher than the content in the watermark uncovered area of ​​the current content area. However, adding the current page watermark to the content in the watermark uncovered area of ​​the current content area is also particularly important for the security of the page data.

[0061] Specifically, the watermark uncovered area of ​​the current content area may be detected. The current page watermark may be added uniformly in the watermark uncovered area, for example, the current page watermark is added in six equal parts. The current page image may be fed back to the front page, so that the front page displays the current page image after the current page watermark is added.

[0062] The technical solution of the embodiment of the present invention is to call the current event source based on the current page data loading operation corresponding to the current operation number, obtain the current root element corresponding to the current event source, render the front-end page to obtain the current display page, generate the current page image according to the current resolution and the current root element of the current display page, and realize the monitoring of data interaction between the front-end page and the back-end server through the operation number in the session manager. When the data loading of a single session of the front-end page is completed, the generation of the current page image corresponding to the front display page and the current display page is realized; by performing area recognition on the current page image, the current content area of ​​the current page image is determined, and the current Key information is identified in the content area to obtain the current key information, and the current page watermark is added at the current key information, so that when the page operator browses and prints the browser page data, the watermark of the key information in the current content area is added, thereby improving the security of the key information in the current page image; by detecting the watermark uncovered area of ​​the current content area, and evenly adding the current page watermark in the watermark uncovered area, the current page image is fed back to the front-end page, so that the front-end page displays the current page image after the current page watermark is added, so that the watermark of the content in the watermark uncovered area of ​​the current content area is added, thereby improving the security of the page data in the watermark uncovered area of ​​the current content area, thereby improving the security of the front-end page data when the page operator browses and prints the browser page data.

[0063] In an optional embodiment of the present invention, while performing area recognition on the current page image and determining the current content area of ​​the current page image, it includes: performing area recognition on the current page image according to the current single-line font size and the current single-line font number of the current page image, and determining the current title area of ​​the current page image; performing area recognition on the current page image according to the current content structure and the current content interval of the current page image, and determining the current menu area of ​​the current page image; determining other areas of the current page image except the current title area and the current menu area as the current content area of ​​the current page image; before performing key information recognition on the current content area to obtain the current key information and adding the current page watermark at the current key information, it also includes: determining the current page watermark position of the current title area according to the current title width of the current title area and the picture width of the current page image, and adding the current page watermark at the current page watermark position of the current title area; determining the current page watermark position of the current menu area according to the current menu height of the current menu area and the picture height of the current page image, and adding the current page watermark at the current page watermark position of the current menu area.

[0064] The current single-line font size may be used to characterize the size of a single font in a single-line font of the current page image. The current number of single-line fonts may be the number of single-line fonts in the current page image. The current title area may be the area in the current page image where the title is located. The current content structure may be the display structure of the content in the current page image. Exemplarily, the current content structure may include hierarchical display and non-hierarchical display. The current content interval may be the display distance between the content in the current page image. The current menu area may be the area in the current page image where the menu is located. The current title width may be the overall width of the title content in the current title area. The current menu height may be the overall height of the menu content in the current menu area.

[0065] Specifically, the preset single-line font size and the preset single-line font number can be obtained. The current single-line font size of each line of content in the current page image can be compared with the preset single-line font size, and the current single-line font number can be compared with the preset single-line font number. The area where the single-line content where the current single-line font size is greater than or equal to the preset single-line font size and the current single-line font number is less than or equal to the preset single-line font number can be determined as the current title area of ​​the current page image. Among them, the preset single-line font size can be a preset lower limit value of the font size of the single-line content in the current title area. The preset single-line font number can be a preset upper limit value of the font number of the single-line content in the current title area. The preset single-line font size and the preset single-line font number can be preset and adjusted by technical personnel based on experience. Exemplarily, the preset single-line font size can be 18px; the preset single-line font number can be 20.

[0066] Specifically, it is possible to detect whether the current content structure of the current page image is hierarchical display and whether the current content intervals are the same. When the current content structure of the current page image is hierarchical display and the current content intervals are the same, it is possible to determine that the area where the content of the current page image is located is the current menu area. Other areas of the current page image except the current title area and the current menu area can be determined as the current content area of ​​the current page image.

[0067] Specifically, before identifying the key information of the current content area, obtaining the current key information, and adding the current page watermark at the current key information, the current title width of the current title area and the image width of the current page image can be compared. When the current title width is greater than or equal to the first preset ratio of the image width of the current page image, the current page watermark position of the current title area is determined to be the middle position of the current title area; when the current title width is less than the first preset ratio of the image width of the current page image, the current page watermark position of the current title area is determined to be the two end positions of the current title area. The current page watermark can be added to the current page watermark position of the current title area. Among them, the first preset ratio can be a preset ratio for measuring the current page watermark position of the current title area. The first preset ratio can be preset and adjusted by a technician based on experience. Exemplarily, the first preset ratio can be 1 / 3.

[0068] Specifically, the current menu height of the current menu area and the picture height of the current page picture can be compared. When the current menu height is less than the second preset ratio of the picture height of the current page picture, the current page watermark position of the current menu area is determined to be the position of the current menu area divided into two equal parts. When the current menu height is greater than or equal to the second preset ratio of the picture height of the current page picture, and less than the third preset ratio of the picture height of the current page picture, the current page watermark position of the current menu area is determined to be the position of the current menu area divided into four equal parts. When the current menu height is greater than or equal to the third preset ratio of the picture height of the current page picture, the current page watermark position of the current menu area is determined to be the position of the current menu area divided into six equal parts. The current page watermark can be added to the current page watermark position of the current menu area. Among them, the second preset ratio and the third preset ratio can be preset ratios for measuring the current page watermark position of the current menu area. The second preset ratio and the third preset ratio can be preset and adjusted by technicians based on experience. The second preset ratio is less than the third preset ratio. Exemplarily, the second preset ratio can be 1 / 3; the third preset ratio can be 2 / 3.

[0069] This solution not only identifies the current content area of ​​the current page image, but also identifies the current title area and the current menu area, and adds a current page watermark to the current title area and the current menu area, thereby achieving full watermark coverage of the browser page data and the browser print data, and further improving the security of the browser page data and the browser print data.

[0070] Optionally, after determining the current page watermark position of the current title area based on the current title width of the current title area and the image width of the current page image, and adding the current page watermark at the current page watermark position of the current title area, it also includes: identifying the login information of the current title area, obtaining the current login information, and adding the current page watermark at the current login information.

[0071] The current login information can be used to characterize the information of the party adding the page data. By detecting the current login information and adding the current page watermark to the current login information, the information security of the party adding the page data is improved, thereby improving the security of the browser page data and the browser print data.

[0072] Embodiment 2

[0073] Figure 2 A flow chart of a page watermark generation method provided for the second embodiment of the present invention. Based on the above embodiments, the embodiment of the present invention further adds "detecting the current watermark distance between each current page watermark in the current content area or the current overlap number between the current page watermark areas corresponding to each current page watermark; determining the current watermark coverage of the current content area according to the current watermark distance between each current page watermark in the current content area or the current overlap number between the current page watermark areas corresponding to each current page watermark; and upon detecting that the current watermark coverage of the current content area is greater than or equal to a preset When the watermark coverage is calculated, the target page watermark is screened from each current page watermark according to the current watermark distance between each current page watermark in the current content area or the current overlap number between the current page watermark areas corresponding to each current page watermark, and the target page watermark is cropped. This avoids the current page watermarks in the current content area of ​​the current page image being too dense, affecting the browsing experience of the content of the browser page data or the browser print data, and can improve the rationality of the number of page watermarks in the browser page data or the browser print data, thereby improving the comfort of the page user browsing the browser page data or the browser print data. It should be noted that for the parts not described in detail in the embodiments of the present invention, reference can be made to the description of other embodiments.

[0074] See also Figure 2 The page watermark generation method shown is applied to a post-processor, comprising:

[0075] S210. When it is detected that the current operation number has been deleted in the session manager and no other operation number exists in the session manager where the current operation number is located, based on the current page data loading operation corresponding to the current operation number, the current event source is called, the current root element corresponding to the current event source is obtained, the front-end page is rendered, and the current display page is obtained.

[0076] S220: Generate a current page image according to the current resolution and the current root element of the currently displayed page.

[0077] S230: Perform region recognition on the current page image to determine the current content region of the current page image.

[0078] S240: Identify key information in the current content area to obtain current key information, and add a current page watermark at the current key information.

[0079] S250, detecting the watermark uncovered area of ​​the current content area, and evenly adding the current page watermark in the watermark uncovered area, and feeding back the current page image to the front page, so that the front page displays the current page image after adding the current page watermark.

[0080] S260: Detect the current watermark distance between each current page watermark in the current content area or the current overlap number between the current page watermark areas corresponding to each current page watermark.

[0081] The current watermark distance may be the distance between each current page watermark in the current content area. The current page watermark area may be a rectangular area generated by mapping the current page watermark in the current content area. It can be understood that the current page watermark may have an inclination angle in the current content area. The current page watermark may be mapped in the horizontal and vertical directions of the current content area to generate a rectangular area to obtain the current page watermark area. The current overlap number between the current page watermark areas corresponding to each current page watermark may be the number of the current page watermark areas corresponding to the same position in the current content area.

[0082] Specifically, the current watermark distance between each current page watermark in the current content area can be detected. The overlap number between the current page watermark areas corresponding to each current page watermark can be detected to obtain the current overlap number between the current page watermark areas corresponding to each current page watermark.

[0083] S270: Determine the current watermark coverage of the current content area according to the current watermark distance between each current page watermark in the current content area or the current overlap number between the current page watermark areas corresponding to each current page watermark.

[0084] The current watermark coverage rate can characterize the maximum density of the current page watermark in the watermark coverage area of ​​the current content area. The larger the current watermark distance between each current page watermark, the lower the current watermark coverage rate of the current content area; the smaller the current watermark distance between each current page watermark, the higher the current watermark coverage rate of the current content area. The larger the current overlap number between the current page watermark areas corresponding to each current page watermark, the higher the current watermark coverage rate of the current content area; the smaller the current overlap number between the current page watermark areas corresponding to each current page watermark, the lower the current watermark coverage rate of the current content area. There is a preset corresponding relationship between the current watermark distance between each current page watermark and the watermark coverage rate. There is a preset corresponding relationship between the current overlap number between the current page watermark areas corresponding to each current page watermark and the watermark coverage rate.

[0085] Specifically, the current watermark distances between the current page watermarks can be compared to determine the minimum current watermark distance. According to the minimum current watermark distance, the watermark coverage rate having a preset corresponding relationship with the minimum current watermark distance is queried to obtain the current watermark coverage rate of the current content area. Alternatively, the current overlap numbers between the current page watermark areas corresponding to the current page watermarks can be compared to determine the maximum current overlap number. According to the maximum current overlap number, the watermark coverage rate having a preset corresponding relationship with the maximum current overlap number is queried to obtain the current watermark coverage rate of the current content area.

[0086] S280. When it is detected that the current watermark coverage of the current content area is greater than or equal to the preset watermark coverage, the target page watermark is selected from each current page watermark according to the current watermark distance between each current page watermark in the current content area or the current overlap number between the current page watermark areas corresponding to each current page watermark, and the target page watermark is cropped.

[0087] The preset watermark coverage rate may be an upper limit of the preset watermark coverage rate. The preset watermark coverage rate may be set and adjusted by a technician based on experience. The target page watermark may be a current page watermark where watermarks are densely packed. It can be understood that the target page watermark may be the current page watermark that needs to be cropped, that is, the current page watermark that needs to be removed from each current page watermark.

[0088] Specifically, when it is detected that the current watermark coverage of the current content area is greater than or equal to the preset watermark coverage, the preset watermark distance corresponding to the preset watermark coverage can be queried. The current watermark distance between each current page watermark in the current content area can be compared with the preset watermark distance. Among the current page watermarks whose current watermark distance is less than or equal to the preset watermark distance, the overlapping current page watermark is selected to obtain the target page watermark. The target page watermark can be cropped. Or when it is detected that the current watermark coverage of the current content area is greater than or equal to the preset watermark coverage, the preset overlap number corresponding to the preset watermark coverage can be queried. The current overlap number between the current page watermark areas corresponding to each current page watermark in the current content area can be compared with the preset overlap number. Each current page watermark whose current overlap number is greater than or equal to the preset overlap number can be determined as the target page watermark. The target page watermark can be cropped.

[0089] The technical solution of the embodiment of the present invention introduces the detection of the current watermark distance or the current overlap number, calculates the current watermark coverage of the current content area, and screens and crops the target page watermark based on the current watermark coverage of the current content area, thereby avoiding the current page watermark being too dense in the current content area of ​​the current page image, affecting the browsing experience of the content of the browser page data or the browser print data, and can improve the rationality of the number of page watermarks in the browser page data or the browser print data, thereby improving the comfort of the page user in browsing the browser page data or the browser print data.

[0090] In an optional embodiment of the present invention, after the target page watermark is cropped, it also includes: filtering the target key information not covered by the current page watermark among the current key information in the watermark coverage area of ​​the current content area; rotating the current page watermark according to the target key information so that the current page watermark can cover the target key information.

[0091] The target key information may be the current key information not covered by the current page watermark. In terms of content importance, the target key information has a higher content importance than other content in the current content area, but the target key information is not covered.

[0092] Specifically, after the target page watermark is cropped, it is possible to detect whether each current key information in the watermark coverage area of ​​the current content area is covered by the current page watermark, and the current key information not covered by the current page watermark can be screened to obtain the target key information. According to the position of the target key information, the current page watermark is rotated so that the current page watermark can cover the target key information.

[0093] After cropping the target page watermark, this solution screens the target key information that is not covered by the current page watermark in the watermark coverage area of ​​the current content area, and rotates the current page watermark according to the target key information so that the current page watermark can cover the target key information. On the basis of taking into account the rationality of the number of page watermarks in the browser page data or the browser print data, the security of the key information in the current page image is further improved, thereby taking into account the security of the front-end page data and the rationality of the number of front-end page watermarks.

[0094] Based on the above embodiments, the present invention also provides a preferred embodiment. The page watermark generation method comprises:

[0095] Step A: intercept the current page data loading operation through the front-end interceptor, generate a current operation number corresponding to the current page data loading operation, and store the current operation number in the session manager.

[0096] Step B: When the front-end interceptor detects that the data loading process corresponding to the current page data loading operation has been completed, the current operation number corresponding to the current page data loading operation in the session manager is deleted.

[0097] Step C: Detect, through a post-processor, whether there are other operation numbers in the session manager where the current operation number is located. When other operation numbers exist in the session manager where the current operation number is located, do not perform any processing; when no other operation numbers exist in the session manager where the current operation number is located, based on the current page data loading operation corresponding to the current operation number, call the HTML element of the current event source, obtain the current root element corresponding to the current event source, register the rendering completion event, and obtain the current display page.

[0098] Step D: After the rendering of the current display page is completed, the watermark display mechanism is automatically triggered through the post-processor to obtain the current resolution of the current display page and the current root element of the entire current display page, and determine the image size of the current page image according to the current resolution of the current page; starting with the current root element of the current display page, obtain all current sub-element chains corresponding to the current root element, and determine the image content of the current page image according to each current sub-element chain; generate the current page image according to the image size and image content of the current page image.

[0099] Step E: Identify the current page image through a post-processor to determine the current layout of the current page image; perform preliminary regional division of the current page image according to the regional background colors of different areas of the current layout; based on the preliminary regional division results of the current page image, perform regional identification on the current page image according to the current single-line font size and the current number of single-line fonts of the current page image, and determine the current title area of ​​the current page image; perform regional identification on the current page image according to the current content structure and the current content interval of the current page image, and determine the current menu area of ​​the current page image; determine other areas of the current page image except the current title area and the current menu area as the current content area of ​​the current page image.

[0100] For example, the font recognition may be performed on the current page image. If the current single-line font size of the current page image exceeds 18px and the current single-line font number does not exceed 20, it is defined as the current title area by default.

[0101] Exemplarily, when it is detected that the current page images are displayed in a hierarchical manner and the density interval distance is the same, it is defined as the current menu area by default.

[0102] Exemplarily, other areas in the current page image except the current title area and the current menu area may be determined as the current content area.

[0103] Step F: Determine the current page watermark position of the current title area according to the current title width of the current title area and the picture width of the current page picture, and add the current page watermark at the current page watermark position of the current title area.

[0104] Exemplarily, in the current title area, the current page watermark position is determined according to the current title width. Specifically, if the current title width is greater than or equal to 1 / 3 of the image width of the current page image, the current page watermark is stamped at the beginning and end of the title in the current title area; if the current title width is less than 1 / 3 of the image width of the current page image, the current page watermark is stamped in the middle of the title in the current title area. In addition, the current login information in the current title area can be identified at the same time, and the current page watermark is automatically added at the current login information.

[0105] Step G: Determine the current page watermark position of the current menu area according to the current menu height of the current menu area and the picture height of the current page picture, and add the current page watermark at the current page watermark position of the current menu area.

[0106] Exemplarily, the current page watermark position is determined based on the current menu height of the current menu area and the picture height of the current page picture. Specifically, if the current menu height is less than 1 / 3 of the picture height of the current page picture, an average of 2 current page watermarks are placed in the current menu area; if the current menu height is greater than or equal to 1 / 3 of the picture height of the current page picture, and the front menu height is less than 2 / 3 of the picture height of the current page picture, an average of 4 current page watermarks are placed in the current menu area; if the current menu height is greater than or equal to 2 / 3 of the picture height of the current page picture, an average of 6 current page watermarks are placed in the current menu area.

[0107] Step H, perform key information identification and sensitive information identification on the current page image to obtain the current key information and the current sensitive information; add the current page watermark at the current key information and the current sensitive information; evenly add the current page watermark in the area not covered by the watermark; calculate the current watermark coverage of the current content area; when it is detected that the current watermark coverage of the current content area is greater than or equal to the preset watermark coverage, filter the target page watermark from each current page watermark and crop the target page watermark; filter the target key information that is not covered by the current page watermark from each current key information in the watermark coverage area of ​​the current content area; rotate the current page watermark according to the target key information so that the current page watermark can cover the target key information; feed back the current page image to the front-end page so that the front-end page displays the current page image after the current page watermark is added.

[0108] Exemplarily, in the current content area, the display method of the current page watermark is mainly divided into precise display and average display.

[0109] Among them, accurate display may include the following steps:

[0110] 1) By establishing a content container, multi-level recognition is performed on the current page image to obtain the current page content in the current content area.

[0111] 2) You can use the sensitive information extraction prompt word to input the current page content into a pre-trained large language model to identify the current sensitive information and put it into the content container. The sensitive information extraction prompt word can be "Please identify the sensitive information contained in this content: the current page content; such as sensitive information stipulated by law."

[0112] 3) Preset keywords can be predefined by technical personnel. Based on the preset keywords, regular recognition can be performed on the current page content to obtain the current key information and put it into the content container.

[0113] 4) After the recognition is completed, if there is content in the content container, the content position in the content container will be watermarked.

[0114] 5) At the same time, the current watermark coverage of the current content area is determined according to the current watermark distance between each current page watermark in the current content area or the current overlap number between the current page watermark areas corresponding to each current page watermark. When it is detected that the current watermark coverage of the current content area is greater than or equal to the preset watermark coverage, the target page watermark is selected from each current page watermark according to the current watermark distance between each current page watermark in the current content area or the current overlap number between the current page watermark areas corresponding to each current page watermark, and the target page watermark is cropped.

[0115] 6) After the target page watermark is cropped, the target key information not covered by the current page watermark is screened out from the current key information in the watermark coverage area of ​​the current content area; and the current page watermark is rotated according to the target key information so that the current page watermark can cover the target key information.

[0116] 7) Detect the watermark uncovered area in the current content area, and evenly add the current page watermark in the watermark uncovered area, for example, automatically divide the current page image into 6 equal parts for watermark display.

[0117] Among them, the average display may include: if there is no content in the content container, it means that there is no key information and sensitive information in the current page image, and the watermark is mainly displayed based on 6 equal parts of the current page image.

[0118] This solution uses a front-end interceptor to intercept the page data loading operation that interacts between the front-end page and the back-end server, and processes the operation number corresponding to the page data loading operation in the session manager. Combined with the session manager to manage the operation number, this solution implements the monitoring of data interaction between the front-end page and the back-end server. When the page operator browses and prints the browser page data, this solution adds a watermark to the key information in the current content area, thereby improving the security of the key information in the current page image. This solution implements the addition of a watermark to the content in the area not covered by the watermark in the current content area, thereby improving the security of the page data in the area not covered by the watermark in the current content area. This improves the security of the front-end page data when the page operator browses and prints the browser page data.

[0119] Embodiment 3

[0120] Figure 3This is a schematic diagram of the structure of a page watermark generation device provided in Embodiment 3 of the present invention. The embodiment of the present invention can be applied to the case where a watermark is implanted in browser page data or browser print data. The device can execute a page watermark generation method. The device can be implemented in the form of hardware and / or software. The device can be configured in an electronic device that carries a page watermark generation function.

[0121] See also Figure 3 The page watermark generating device shown is applied to a post-processor, and includes: a current display page generating module 310, a current page image generating module 320, a current content area identifying module 330, a first current watermark adding module 340 and a second current watermark adding module 350. Among them, the current display page generation module 310 is used to call the current event source based on the current page data loading operation corresponding to the current operation number, obtain the current root element corresponding to the current event source, render the front-end page, and obtain the current display page when it is detected that the current operation number has been deleted in the session manager and there is no other operation number in the session manager where the current operation number is located; the current page image generation module 320 is used to generate the current page image according to the current resolution and the current root element of the current display page; the current content area identification module 330 is used to perform area identification on the current page image and determine the current content area of ​​the current page image; the first current watermark adding module 340 is used to identify key information of the current content area, obtain current key information, and add the current page watermark at the current key information; the second current watermark adding module 350 is used to detect the watermark-uncovered area of ​​the current content area, and evenly add the current page watermark in the watermark-uncovered area, and feed the current page image back to the front-end page, so that the front-end page displays the current page image after adding the current page watermark.

[0122] The technical solution of the embodiment of the present invention is to call the current event source based on the current page data loading operation corresponding to the current operation number, obtain the current root element corresponding to the current event source, render the front-end page to obtain the current display page, generate the current page image according to the current resolution and the current root element of the current display page, and realize the monitoring of data interaction between the front-end page and the back-end server through the operation number in the session manager. When the data loading of a single session of the front-end page is completed, the generation of the current page image corresponding to the front display page and the current display page is realized; by performing area recognition on the current page image, the current content area of ​​the current page image is determined, and the current Key information is identified in the content area to obtain the current key information, and the current page watermark is added at the current key information, so that when the page operator browses and prints the browser page data, the watermark of the key information in the current content area is added, thereby improving the security of the key information in the current page image; by detecting the watermark uncovered area of ​​the current content area, and evenly adding the current page watermark in the watermark uncovered area, the current page image is fed back to the front-end page, so that the front-end page displays the current page image after the current page watermark is added, so that the watermark of the content in the watermark uncovered area of ​​the current content area is added, thereby improving the security of the page data in the watermark uncovered area of ​​the current content area, thereby improving the security of the front-end page data when the page operator browses and prints the browser page data.

[0123] In an optional embodiment of the present invention, the device further includes: a current overlap number detection module, which is used to detect the current watermark distance between each current page watermark in the current content area or the current overlap number between the current page watermark areas corresponding to each current page watermark before detecting the watermark uncovered area of ​​the current content area and uniformly adding the current page watermark in the watermark uncovered area; a current watermark coverage rate calculation module, which is used to determine the current watermark coverage rate of the current content area according to the current watermark distance between each current page watermark in the current content area or the current overlap number between the current page watermark areas corresponding to each current page watermark; a target page watermark cropping module, which is used to select a target page watermark from each current page watermark according to the current watermark distance between each current page watermark in the current content area or the current overlap number between the current page watermark areas corresponding to each current page watermark when it is detected that the current watermark coverage rate of the current content area is greater than or equal to a preset watermark coverage rate, and crop the target page watermark.

[0124] In an optional embodiment of the present invention, the device further includes: a target key information screening module, used to screen the target key information that is not covered by the current page watermark among the current key information in the watermark coverage area of ​​the current content area after the target page watermark is cropped; and a current page watermark rotation module, used to rotate the current page watermark according to the target key information so that the current page watermark can cover the target key information.

[0125] In an optional embodiment of the present invention, the device further includes: a current title area recognition module, which is used to perform area recognition on the current page image according to the current single-line font size and the current single-line font quantity of the current page image to determine the current title area of ​​the current page image while performing area recognition on the current page image to determine the current content area of ​​the current page image; a current menu area recognition module, which is used to perform area recognition on the current page image according to the current content structure and the current content interval of the current page image to determine the current menu area of ​​the current page image; and a current content area recognition module, which is used to identify other areas of the current page image except the current title area and the current menu area. domain, determined to be the current content area of ​​the current page image; a third current watermark adding module, used for identifying the key information of the current content area, obtaining the current key information, and before adding the current page watermark at the current key information, determining the current page watermark position of the current title area according to the current title width of the current title area and the image width of the current page image, and adding the current page watermark at the current page watermark position of the current title area; a fourth current watermark adding module, used for determining the current page watermark position of the current menu area according to the current menu height of the current menu area and the image height of the current page image, and adding the current page watermark at the current page watermark position of the current menu area.

[0126] In an optional embodiment of the present invention, the device further includes: a fifth current watermark adding module, which is used to identify sensitive information in the current content area, obtain current sensitive information, and add a current page watermark at the current sensitive information while identifying key information in the current content area, obtaining current key information, and adding a current page watermark at the current key information.

[0127] In an optional embodiment of the present invention, the device further includes: a front-end interceptor, which is used to call the current event source based on the current page data loading operation corresponding to the current operation number, obtain the current root element corresponding to the current event source, render the front-end page, and intercept the current page data loading operation of the front-end page before obtaining the currently displayed page, generate the current operation number corresponding to the current page data loading operation, and store the current operation number in the session manager when it is detected that the current operation number has been deleted in the session manager and there is no other operation number in the session manager where the current operation number is located; the front-end interceptor is used to delete the current operation number corresponding to the current page data loading operation in the session manager when it is detected that the data loading process corresponding to the current page data loading operation has been completed.

[0128] The page watermark generation device provided in the embodiment of the present invention can execute the page watermark generation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0129] In the technical solution of the embodiment of the present invention, the acquisition, storage and application of the current root element corresponding to the current event source are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0130] Embodiment 4

[0131] Figure 4 A schematic diagram of the structure of an electronic device 400 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0132] like Figure 4As shown, the electronic device 400 includes at least one processor 401, and a memory connected to the at least one processor 401 in communication, such as a read-only memory (ROM) 402, a random access memory (RAM) 403, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 401 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 402 or the computer program loaded from the storage unit 408 to the random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 can also be stored. The processor 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0133] Multiple components in the electronic device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the electronic device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0134] The processor 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 401 executes the various methods and processes described above, such as a page watermark generation method.

[0135] In some embodiments, the page watermark generation method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 400 via the ROM 402 and / or the communication unit 409. When the computer program is loaded into the RAM 403 and executed by the processor 401, one or more steps of the page watermark generation method described above may be performed. Alternatively, in other embodiments, the processor 401 may be configured to execute the page watermark generation method in any other appropriate manner (e.g., by means of firmware).

[0136] Various implementations of the devices and techniques described above herein can be implemented in digital electronic circuit devices, integrated circuit devices, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), devices on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable device including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage device, at least one input device, and at least one output device, and transmit data and instructions to the storage device, the at least one input device, and the at least one output device.

[0137] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0138] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution device, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor devices, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0139] To provide interaction with a user, the apparatus and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of apparatus may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0140] The apparatus and techniques described herein may be implemented in a computing device including backend components (e.g., as a data server), or a computing device including middleware components (e.g., an application server), or a computing device including frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the apparatus and techniques described herein), or a computing device including any combination of such backend components, middleware components, or frontend components. The components of the apparatus may be interconnected by digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0141] The computing device may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS (Virtual Private Server) services.

[0142] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0143] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for generating a page watermark, characterized in that: Applied to a post-processor, the method comprises: When it is detected that the current operation number has been deleted in the session manager and no other operation number exists in the session manager where the current operation number is located, based on the current page data loading operation corresponding to the current operation number, the current event source is called, the current root element corresponding to the current event source is obtained, and the front-end page is rendered to obtain the current display page; Generate a current page image according to the current resolution and the current root element of the currently displayed page; Performing region recognition on the current page image to determine the current content region of the current page image; Performing key information identification on the current content area to obtain current key information, and adding a current page watermark at the current key information; Detect the watermark uncovered area of ​​the current content area, and evenly add the current page watermark in the watermark uncovered area, and feed back the current page image to the front page so that the front page displays the current page image after adding the current page watermark.

2. The method according to claim 1, characterized in that Before detecting the watermark uncovered area of ​​the current content area and uniformly adding the current page watermark in the watermark uncovered area, the method further includes: Detecting a current watermark distance between each of the current page watermarks in the current content area or a current overlap number between current page watermark areas corresponding to each of the current page watermarks; Determine the current watermark coverage of the current content area according to the current watermark distance between the current page watermarks in the current content area or the current overlap number between the current page watermark areas corresponding to the current page watermarks; When it is detected that the current watermark coverage of the current content area is greater than or equal to the preset watermark coverage, the target page watermark is filtered out from each current page watermark according to the current watermark distance between each current page watermark in the current content area or the current overlap number between the current page watermark areas corresponding to each current page watermark, and the target page watermark is cropped.

3. The method according to claim 2, characterized in that After the target page watermark is cut, the method further includes: Filtering target key information not covered by the current page watermark from each of the current key information in the watermark coverage area of ​​the current content area; The current page watermark is rotated according to the target key information so that the current page watermark can cover the target key information.

4. The method according to claim 1, characterized in that While performing area recognition on the current page image and determining the current content area of ​​the current page image, the method further includes: According to the current single-line font size and the current single-line font quantity of the current page image, performing area recognition on the current page image to determine the current title area of ​​the current page image; According to the current content structure and current content interval of the current page image, performing area recognition on the current page image to determine the current menu area of ​​the current page image; Determine other areas of the current page image except the current title area and the current menu area as the current content area of ​​the current page image; Before identifying the key information of the current content area to obtain the current key information and adding the current page watermark at the current key information, the method further includes: Determine the current page watermark position of the current title area according to the current title width of the current title area and the picture width of the current page picture, and add the current page watermark at the current page watermark position of the current title area; The current page watermark position of the current menu area is determined according to the current menu height of the current menu area and the picture height of the current page picture, and the current page watermark is added at the current page watermark position of the current menu area.

5. The method according to claim 1, characterized in that While identifying the key information of the current content area to obtain the current key information and adding the current page watermark at the current key information, the method further includes: Sensitive information is identified in the current content area to obtain current sensitive information, and a current page watermark is added at the current sensitive information.

6. The method according to claim 1, characterized in that When it is detected that the current operation number has been deleted in the session manager and no other operation number exists in the session manager where the current operation number is located, based on the current page data loading operation corresponding to the current operation number, the current event source is called, the current root element corresponding to the current event source is obtained, and the front-end page is rendered to obtain the current display page, before the process further includes: The current page data loading operation of the front-end page is intercepted by the front-end interceptor, a current operation number corresponding to the current page data loading operation is generated, and the current operation number is stored in the session manager; Through the front interceptor, when it is detected that the data loading process corresponding to the current page data loading operation has been completed, the current operation number corresponding to the current page data loading operation in the session manager is deleted.

7. A page watermark generation device, characterized in that: Applied to a post-processor, the device comprises: A current display page generation module is used to call the current event source based on the current page data loading operation corresponding to the current operation number, obtain the current root element corresponding to the current event source, render the front-end page, and obtain the current display page when it is detected that the current operation number has been deleted in the session manager and no other operation number exists in the session manager where the current operation number is located; A current page image generation module, used to generate a current page image according to the current resolution and current root element of the currently displayed page; A current content area recognition module, used to perform area recognition on the current page image and determine the current content area of ​​the current page image; A first current watermark adding module, used for identifying key information of the current content area, obtaining current key information, and adding a current page watermark at the current key information; The second current watermark adding module is used to detect the watermark uncovered area of ​​the current content area, and evenly add the current page watermark in the watermark uncovered area, and feed back the current page image to the front-end page so that the front-end page displays the current page image after adding the current page watermark.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the page watermark generation method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the page watermark generation method according to any one of claims 1 to 6 when executed.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method for generating a page watermark according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Webpage watermark adding method and device

    CN113672837A

  • Anti-leakage method and device for adding watermark to target webpage

    CN117454336A

  • Webpage digital watermark generation and identification method and system based on particle effect

    CN117972656A

  • Webpage watermark implanting method and device, electronic equipment and storage medium

    CN119211435A

  • Method, system and apparatus for determining position of a watermark annotation

    US20140118793A1