Document type adaptive multi-modal screen capture provenance watermarking method and apparatus
By using a multi-modal anti-screen capture watermarking method that adapts to document types, the problem of existing technologies being unable to simultaneously cover different document types and leakage channels is solved. This method achieves full coverage of dense text and richly formatted graphic documents in camera captures and digital screenshots, possessing near-invisibility and anti-counterfeiting capabilities, thus ensuring reliable traceability.
Patent Information
- Application Number
- CN202611290997.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-11-27
AI Technical Summary
Existing digital watermarking methods cannot simultaneously cover two types of documents: dense text and rich layout, as well as two types of leakage channels: camera captures and digital screenshots. Invisible watermarks are not resistant to being captured, visible watermarks are conspicuous and easy to remove, the payload lacks a signature and is easy to misidentify, and page filling destroys the visual experience.
By determining the line density of text on each page, the system adaptively selects either a line-shifting watermark mode or a light-colored small QR code watermark overlaid with a hidden watermark mode. Combined with second-order relative displacement encoding and local background color filling, it achieves coverage of two types of documents and two types of channels. Multi-scale enhanced decoding and signature verification are employed to ensure the credibility of traceability.
It achieves full coverage of dense text documents and richly formatted graphic documents through camera capture and digital screenshot channels, with near-invisibility and anti-counterfeiting capabilities, without damaging the layout and ensuring reliable traceability.
Smart Images

Figure CN123179369A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information security technology, specifically to a document type adaptive multi-mode anti-screen capture source tracing watermarking method and device. Background Technology
[0002] Confidential documents are often leaked when displayed on screens or circulated within internal systems, as authorized personnel frequently capture and distribute these images using mobile phone cameras or digital screenshots. To identify the viewer and pinpoint the source of the leak in leaked samples, the industry uses digital watermarks to embed unique identifiers. Common carriers include invisible watermarks in the least significant bit and frequency domain, residual-based invisible watermarks, visible QR code watermarks, line-shifting watermarks that make slight vertical displacements of text lines, and zero-width character text watermarks. Pixel-domain, frequency-domain, and residual-type invisible watermarks use low-amplitude, high-frequency signals to achieve invisibility. When captured by a mobile phone camera, these signals are smoothed out by screen sub-pixel illumination, moiré patterns, camera resampling, and compression, leading to decoding failure. They are only resistant to digital screenshots but not to camera captures.
[0003] Watermarks often use large, high-contrast black QR codes, which are clearly visible and affect readability. Because they are conspicuous, they are easily smeared or cropped out. Line-shifting watermarks rely on the relative position encoding of text lines and are only suitable for documents with a large amount of dense text per page. For pages with rich layouts, mixed text and images, tables, or sparse text, the available text lines are insufficient to carry the complete identifier. Zero-width character watermarks exist only in the character encoding stream; once the text is rendered as an image, it is lost when captured or photographed. The above methods also lack payload signatures in terms of anti-counterfeiting; random gibberish generated by screen capture noise can easily be misinterpreted as legitimate identifiers, leading to misidentification.
[0004] The more fundamental problem is that the aforementioned methods all rely on a single carrier, failing to simultaneously cover two different document types: dense text documents and richly formatted image-text documents. They also cannot simultaneously cover two different leakage channels: camera captures and digital screenshots. Using any single watermark creates coverage blind spots. Furthermore, visible watermarks tend to leave white stripes in colored title blocks and tables when filling white space on a page, disrupting the visual appeal. The determination of invisible watermarks lacks robustness under small displacements and strong noise. Therefore, a source tracing method is needed that adaptively selects and combines multiple watermarks based on document type, simultaneously covering two types of documents and two types of channels, and possessing near-invisibility, anti-counterfeiting, and non-destructive embedding capabilities. Summary of the Invention
[0005] To address the problems of existing digital watermarking methods, such as the inability of a single carrier to simultaneously cover both dense text and richly formatted documents, as well as both camera-captured and digitally captured leakage channels, the ease with which visible watermarks can be removed, the lack of robustness of invisible watermarks against camera captures and insufficient robustness in small displacement judgments, and the inability of payloads to be misidentified due to missing signatures and the visual impact of page filling, this application provides a document type-adaptive multi-mode anti-screen capture traceability watermarking method and apparatus. This method adaptively selects either a line-shifting watermark mode or a light-colored small QR code overlay watermark mode for each page based on the line density of the text, eliminating blind spots in the coverage of a single watermark. It uses second-order relative displacement encoding of the line-shifting watermark and non-destructive filling with the local background color to carry both camera-captured and digitally captured channels. The light-colored small QR code reduces visible interference and is enhanced through multi-scale decoding. The hidden watermark covers the digitally captured channel. Finally, it improves the coverage integrity, anti-screen capture robustness, and traceability credibility of multi-mode watermarking for both document types and channels by decoding in a reliable order and performing identifier format verification and message authentication signature verification.
[0006] To solve at least one of the above problems, this application provides the following technical solution: Firstly, this application provides a document type adaptive multi-mode anti-screen capture source tracing watermarking method, comprising: uniformly rendering the document to be traced as a page bitmap bound to the viewer's identifier and counting the text line density page by page; when the number of text lines on a certain page reaches a preset threshold condition, the page is judged as a dense text page and a line-shift watermarking mode is selected; when the preset threshold condition is not reached, the page is judged as a rich text and image page and a light-colored small QR code watermarking mode is selected overlaid with a hidden watermarking mode; for the dense text page, three consecutive lines of text are grouped together, keeping the upper and lower lines as reference lines and making a directional micro-shift of the middle line relative to the midpoint of its upper and lower lines to carry bits, and connecting the synchronization code with the... The data unit consisting of the viewer identifier and the message authentication signature is repeatedly tiled along the text line and the moving gaps are filled with the local background color. For the rich text and image page, the light-colored small QR code carrying the viewer identifier is tiled in the white blank area, avoiding text and dark blocks, and a hidden watermark carrying the same identifier is superimposed. After performing page quadrilateral positioning and perspective correction on the leaked sample, the light-colored small QR code, the moving watermark and the hidden watermark are attempted to be decoded in a preset reliable order. The decoding results are verified for the identifier format and the message authentication signature. When the verification is successful, the viewer identifier and the hit channel are output. When the verification fails, it is judged as unrecognized.
[0007] Furthermore, it also includes: uniformly rendering the layout document and image document into a page bitmap with the long side normalized to a preset pixel, binding the viewer identifier to each page bitmap, performing a horizontal projection on each page bitmap to count the number of consecutive text lines and the line spacing; determining the text line density of the page based on the number of text lines obtained from the horizontal projection, comparing the text line density with the preset threshold condition for selecting the watermark mode page by page, and removing projected lines whose ink volume deviates from the preset multiple range of the median line ink volume as noise lines.
[0008] Furthermore, it also includes: selecting a line-shifting watermark mode for page bitmaps identified as dense text pages, with the line-shifting watermark handling the tracing of the camera capture channel and the digital screenshot channel; selecting a light-colored small QR code watermark mode and overlaying a hidden watermark mode for page bitmaps identified as rich-format graphic pages, with the light-colored small QR code handling the tracing of the camera capture channel and the hidden watermark handling the tracing of the digital screenshot channel, so that both types of documents and both types of leakage channels are covered.
[0009] Furthermore, it also includes: for the dense text page, taking three consecutive lines of text as a group, keeping the top and bottom lines as reference lines, shifting the middle line up relative to the midpoint of the two lines above and below it to represent the first bit value and shifting it down to represent the second bit value, with the micro-shift amount taking a preset small value of adaptive line spacing, using the second-order relative value of the middle line relative to the midpoint as a decision to make the encoding immune to overall scaling and skew, repeatedly tiling the data units along the text lines and filling the moving gaps with the local background color sampled above and below the line, and skipping the embedding of image areas with non-uniform backgrounds; after page correction, taking the center of each text line of the line-shifting watermark page and determining the moving direction of the middle line according to the preset line-shifting decision method to obtain the bit sequence, matching the synchronization code with a sliding window to align the data units, and then decrypting the viewer identifier through message authentication signature verification.
[0010] Furthermore, it also includes: rendering the QR code carrying the viewer's identifier as a low-contrast light gray with a preset small unit side length, tiling it on the white blank area of the rich-format graphic page and automatically avoiding text and dark color blocks, while superimposing a hidden watermark carrying the same viewer's identifier on the page; performing multi-scale scaling and multi-directional rotation scanning on the light-colored small QR code of the leaked sample and applying preprocessing such as linear stretching of the highlight area and adaptive threshold and contrast-limited histogram equalization; processing the light-colored code elements into black and white and then decoding them through a QR code detector; and retrieving the viewer's identifier from the hidden watermark through the corresponding decoding process in the digital screenshot channel.
[0011] Furthermore, it also includes: performing quadrilateral edge detection on the leaked sample to determine the page area and performing perspective correction and rotation correction to obtain a corrected source tracing bitmap; attempting to decode the corrected source tracing bitmap in a preset reliable order with built-in cyclic redundancy check, prioritizing the light-colored small QR code over the row-moving watermark over the hidden watermark, and terminating subsequent decoding when the previous channel is decoded and passes the verification.
[0012] Furthermore, it also includes: generating a message authentication signature using the server key to the viewer identifier and synchronization code and embedding it along with the data unit, so that those without the key cannot forge legitimate payloads; first verifying the decoding result by limiting the identifier format of letters and numbers, and then verifying the message authentication signature; when both verifications pass, outputting the viewer identifier, the hit channel, and the confidence level; and judging all garbled characters obtained by illegal format, signature mismatch, and occasional noise from screen capture as unrecognized.
[0013] Secondly, this application provides a document type adaptive multi-mode anti-screen capture tracing watermarking device, comprising: a type discrimination and selection module, used to uniformly render the document to be traced as a page bitmap bound to the viewer's identifier and count the text line density page by page; when the number of text lines reaches a preset threshold, it is judged as a dense text page and a line-shifting watermark mode is selected; when it does not reach the threshold, it is judged as a rich-format graphic page and a light-colored small QR code watermark mode is selected overlaid with a hidden watermark mode; a line-shifting embedding module, used to perform directional micro-shifting of the middle line relative to the midpoint of the upper and lower lines to carry bits in the dense text page in groups of three consecutive lines, and repeatedly tile the data unit composed of the synchronization code, the viewer's identifier, and the message authentication signature along the text line and fill the shift gaps with the local background color; and a format embedding module, used for... The rich-format image and text page lays a light-colored QR code carrying the viewer's identifier flat in a white background blank area, avoiding text and dark blocks. At the same time, a hidden watermark carrying the same identifier is superimposed to cover the camera capture channel and the digital screenshot channel respectively. The source tracing decoding module is used to perform page quadrilateral positioning and perspective correction on the leaked sample, and then attempt to decode the light-colored QR code, the row-moving watermark, and the hidden watermark in a preset reliable order. The row-moving watermark is used to determine the movement direction of the middle row according to a preset row-moving decision method to extract the bit sequence. The signature verification output module is used to perform identifier format verification and message authentication signature verification on the decoding result. When the verification passes, the viewer's identifier and the hit channel are output. When the verification fails, it is judged as unidentified to reject forgery and garbled characters.
[0014] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the document type adaptive multi-mode anti-screen capture source tracing watermarking method.
[0015] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the document type adaptive multi-mode anti-screen capture source tracing watermarking method.
[0016] Fifthly, this application provides a computer program product, including a computer program / instruction that, when executed by a processor, implements the steps of the document type adaptive multi-mode anti-screen capture source tracing watermarking method.
[0017] As can be seen from the above technical solution, this application provides a document type adaptive multi-mode anti-screen capture traceability watermarking method and device. It uses page-by-page text line density discrimination to drive each page to adaptively select between a line-moving watermark mode and a light-colored small QR code overlaid hidden watermark mode, adapting both dense text documents and rich-format graphic documents. It uses second-order relative displacement encoding of the line-moving watermark to be immune to overall scaling and tilting, and fills the moving gaps with the local background color to achieve non-destructive embedding and support local decoding. It uses light-colored small QR codes to tile and avoid visibility, and then decodes them after multi-scale scaling, multi-directional rotation, highlight stretching, and contrast-limited histogram equalization enhancement. It uses hidden watermarks to cover the digital screenshot channel and complements the light-colored small QR codes. It decodes in a reliable order and performs identifier format verification and message authentication signature verification, only outputting the identifier when the signature verification is successful. This allows the multi-mode watermark to simultaneously cover two types of documents and two types of leakage channels, while also considering near-invisibility, anti-counterfeiting, and non-destructive embedding. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0019] Figure 1 This is a flowchart illustrating the document type adaptive multi-mode anti-screen capture source tracing watermarking method in the embodiments of this application; Figure 2 This is a schematic diagram of the document type adaptive multi-mode anti-screen capture tracing watermarking device in the embodiments of this application; Figure 3 This is a schematic diagram of the document type discrimination and watermark mode adaptive selection process in the embodiments of this application; Figure 4 This is a schematic diagram of the second-order relative displacement encoding of the row-moving watermark in the embodiments of this application; Figure 5 This is a schematic diagram illustrating the tiling and avoidance of the light-colored small QR code in the embodiments of this application; Figure 6 This is a schematic diagram of the lightweight decision network structure for line-moving watermarking in an embodiment of this application; Figure 7 This is a schematic diagram of the unified traceability decoding and signature verification process in the embodiments of this application. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of this application, but not all embodiments.
[0021] Considering that existing digital watermarking carriers cannot simultaneously cover two types of documents—dense text and rich layouts—and two leakage channels—camera captures and digital screenshots; that invisible watermarks are not resistant to being captured; and that visible watermarks are conspicuous and easy to remove, while the lack of a signature on the payload makes them easy to misidentify, this application provides a document type-adaptive multi-mode anti-screen capture traceability watermarking method. By determining the line density of text on each page, adaptively embedding multi-mode watermarks, and using unified traceability signature verification, this method enables traceability watermark embedding and reliable decoding of confidential documents that are adaptive to the type and cover both types of channels.
[0022] This application provides an embodiment of a document type-adaptive multi-modal anti-screen capture source tracing watermarking method, see [link to embodiment]. Figure 1 The method specifically includes the following: Step S101: Render the document to be traced as a page bitmap bound to the viewer's identifier and count the text line density page by page. When the number of text lines on a page reaches the preset threshold, the page is judged as a dense text page and the line-moving watermark mode is selected. When the preset threshold is not reached, the page is judged as a rich text and graphic page and the light-colored small QR code watermark mode is selected and the hidden watermark mode is superimposed.
[0023] In this embodiment, the method runs on a confidential document tracing watermarking platform, see [link to relevant documentation]. Figure 1 Step S101, as the discrimination and selection layer, is responsible for document rendering, text line density statistics, and page-by-page watermark mode selection. The platform uniformly renders various documents, including PDFs, word processing documents, presentation documents, spreadsheets, and images, into a page bitmap with a long side normalized to approximately 1600 pixels, and associates the viewer identifier with the page position. Figure 1 And bind it so that the watermark subsequently embedded corresponds to the viewer's identity.
[0024] In one feasible implementation, each page of bitmap is projected horizontally, and the ink volume of each scanned line is accumulated horizontally to obtain a projection curve. The peaks of the projection curve correspond to text lines, and the troughs correspond to line spacing. Based on this, the number of consecutive text lines and line spacing are counted. To suppress interference from decorative lines and color blocks, projected lines whose ink volume deviates from a preset multiple range of the median line ink volume are discarded as noise lines. The preset multiple range is calibrated according to the layout sample and adjusted according to the document source.
[0025] Based on this, the text line density of the page is determined and compared with the preset threshold condition. When the number of available text lines on a page reaches the preset threshold condition, the page is judged as a dense text page. If it does not reach the threshold condition, it is judged as a rich text and image page. The preset threshold condition is determined based on the minimum number of text lines required for a complete data unit of line-moving watermark, so that a page judged as a dense text page can accommodate at least one complete data unit.
[0026] Optionally, for pages identified as dense text pages, a line-shifting watermark mode can be selected, and for pages identified as rich text and image pages, a light-colored small QR code watermark mode can be selected and a hidden watermark mode can be superimposed. In this way, the most suitable watermark combination can be selected adaptively for each page, so that both dense text documents and rich text and image documents are adapted and the coverage blind spots of a single watermark are eliminated.
[0027] In one specific implementation, the page bitmap is organized with document identifier, page number, long side pixels, viewer identifier and watermark mode mark. The watermark mode mark takes two values: line-shifting mode and light-colored QR code overlay hiding mode. The page bitmap and the watermark mode mark are used with document identifier and page number as primary keys for step S102 to read page by page at the embedding entry.
[0028] If rendering fails or a page has no usable text lines, a rendering error flag is registered and the page is reverted to the light-colored small QR code overlay hidden watermark mode to avoid losing the traceability capability of the page due to single-page parsing failure. The judgment results of each page and the selected mode are written into the embedding task table for page-by-page embedding and subsequent unified traceability verification.
[0029] Step S102: For the dense text page, keep the top and bottom lines as reference lines in groups of three consecutive lines, and make a slight directional shift of the middle line relative to the midpoint of the top and bottom lines to carry bits. Repeatedly tile the data unit composed of the synchronization code, the viewer identifier, and the message authentication signature along the text lines and fill the shift gaps with the local background color. For the rich text and image page, tile the light-colored small QR code carrying the viewer identifier in the white blank area, avoiding text and dark blocks, and superimpose a hidden watermark carrying the same identifier.
[0030] Step S102 reads the page bitmap and watermark mode marker from step S101, and adaptively embeds the watermark on the page according to the selected mode. See [link to relevant documentation]. Figure 1 For pages identified as having dense text, a line-shifting watermark is embedded. The watermark is applied in groups of three consecutive lines of text, with the top and bottom lines remaining stationary. Only the middle line is slightly shifted relative to the midpoint of the lines above and below it. The middle line shifts up to carry the first bit value and shifts down to carry the second bit value.
[0031] In one feasible implementation, the ordinate of the center of a set of inner middle rows is denoted as... The vertical coordinates of the centers of the upper and lower reference rows are: and In terms of second-order relative quantities As a coding quantity and a decision quantity, such as Figure 4 As shown, It is immune to overall translation, scaling and tilting of the entire text block. The micro-movement is measured by the preset small value of the adaptive line spacing, which is about 0.3 times the line spacing and within the preset pixel range, so that the displacement is almost invisible and can be stably judged.
[0032] The data unit, which is formed by concatenating the synchronization code, the viewer identifier, and the message authentication signature, is repeatedly laid out along the text line. This allows the decoding end to decode the data by capturing only a portion containing a complete data unit. The synchronization code is used for sliding window alignment, and the message authentication signature is used for signature verification. The data unit is repeatedly laid out a preset number of times on the entire page to provide redundancy and resist partial clipping.
[0033] In one specific implementation, line shifting is achieved by directly displacing the text line band on the rendered page, and filling the gaps after the shift with the local background color sampled from the blank areas above and below the line. This ensures non-destructive embedding of colored title blocks and tables without leaving white stripes. Image areas with non-uniform backgrounds are automatically skipped from embedding and a skip flag is registered to avoid visible tearing on the image.
[0034] For pages identified as rich-format graphic pages, a light-colored small QR code watermark is overlaid and a hidden watermark is embedded. The QR code carrying the viewer's identifier is rendered as a low-contrast light gray with a preset small unit side length. It is tiled in the white blank area of the page and automatically avoids text and dark color blocks. The tiling provides redundancy and resists partial cropping, the light color reduces visible interference, and the small size makes it easy to densely fill the gaps on the page.
[0035] Accordingly, a hidden watermark carrying the same viewer's identifier is superimposed on the rich-format text and image page. The hidden watermark is one of frequency domain watermark and residual watermark, used for tracing the source of digital links such as digital screenshots, saving and forwarding. It will be invalid under camera capture, and the camera channel will be handled by a light-colored small QR code. The two complement each other and cover the camera capture channel and digital screenshot channel of this type of document.
[0036] The embedded page bitmap is recorded in the watermark ledger with document identifier, page number, hit mode and embedded data unit as records. The embedding results of each page of the same document are merged into a watermarked document for distribution. Pages with embedding errors are registered with an embedding error identifier and the mode rollback and re-embedding of the page are triggered. The watermark ledger is used by step S103 to verify the hit channel and viewer identifier during unified traceability.
[0037] Step S103: After performing page quadrilateral positioning and perspective correction on the leaked sample, attempt to decode the light-colored small QR code, the row-moving watermark, and the hidden watermark in a preset reliable order. Perform identifier format verification and message authentication signature verification on the decoding results. If the verification passes, output the viewer identifier and hit channel. If the verification fails, it is judged as unidentified.
[0038] Step S103 performs unified traceability and anti-counterfeiting verification on the uploaded leaked samples, see [link to relevant documentation]. Figure 1 First, page geometry correction is performed, then decoding and verification are performed in a reliable order. For leaked samples, page quadrilateral edge detection is performed to determine the page area, then perspective correction and rotation correction are performed to obtain the corrected source tracing bitmap, eliminating geometric distortions caused by the shooting perspective and cropping.
[0039] In one feasible implementation, the corrected traceability bitmap is decoded in a preset reliable order, prioritizing the light-colored small QR code with built-in cyclic redundancy check, followed by the row-moving watermark, and then the hidden watermark. The reliable order is determined based on the decoding reliability of each channel under screen capture degradation. When the previous channel is decoded and passes the verification, the subsequent decoding is terminated to reduce misjudgment and time consumption.
[0040] For the light-colored small QR code channel, the samples are subjected to multi-scale scaling and multi-directional rotation scanning, and preprocessing is performed with linear stretching of the highlight area, adaptive thresholding and contrast-limited histogram equalization. The light-colored code elements are enhanced into clear black and white before being decoded by the QR code detector. For the line-shifting watermark channel, the center of each text line is taken and the bit sequence is obtained according to the preset line-shifting decision method. Then, the data unit is aligned by sliding window matching of the synchronization code.
[0041] In one specific implementation, the decoding result is first checked for the identification format of letters and numbers. Then, the message authentication signature is recalculated using the server key and the synchronization code and compared with the signature in the payload for signature verification. Only when both verifications pass, the viewer's identifier, the hit channel, and the confidence level are output. Illegal format, signature mismatch, and random garbled characters obtained from screen capture noise are all judged as unrecognized to avoid misidentification.
[0042] Optionally, for images without watermarks or forged samples, the system returns "unrecognized" instead of "incorrect work number" because the signature fails verification, preventing others from forging legitimate payloads without the server key. Similarly, for extreme local images where only a few lines of text are captured, the system will also judge them as unrecognized and prompt for a more complete sample to be collected.
[0043] The source tracing results are organized and written into the source tracing log with sample identifier, hit channel, viewer identifier, confidence level and signature verification conclusion. When multiple channels are hit, the channel with the highest reliability and successful signature verification shall be used. The source tracing log is used for locating the source of leakage and auditing. The intermediate quantities of decoding and signature verification for each channel are registered as observable markers for decoding strategy regression and threshold adjustment.
[0044] As can be seen from the above description, the document type adaptive multi-mode anti-screen capture traceability watermarking method provided in this application embodiment can adaptively select and combine line-shift watermarks, light-colored small QR code watermarks and hidden watermarks according to document type to cover two types of documents and two types of leakage channels. It achieves near-invisible and non-destructive line-shift embedding by second-order relative displacement encoding and local background color filling, and ensures the credibility of traceability by decoding in a reliable order and verifying signature rejection.
[0045] In one embodiment of the document type adaptive multimodal anti-screen capture source tracing watermarking method of this application, see [link to relevant documentation]. Figure 3 It can also specifically include the following: Step S201: Render the layout document and image document into page bitmaps with the long side normalized to a preset pixel, and bind the viewer identifier to each page bitmap. Perform horizontal projection on each page bitmap to count the number of consecutive text lines and line spacing. Step S202: Determine the text line density of the page based on the number of text lines obtained from the horizontal projection, compare the text line density with the preset threshold condition for selecting the watermark mode page by page, and remove the projected lines whose ink volume deviates from the preset multiple range of the median line ink volume as noise lines.
[0046] The rendering and text line density statistics described in step S101 are prerequisites for selecting the watermark mode page by page, such as... Figure 3 As shown, the platform uses a unified renderer to rasterize layout documents and image documents into page bitmaps. Word processing documents, presentation documents, and spreadsheets are first converted to intermediate layout formats before rendering, while image documents are directly used as page bitmaps. The long side is normalized to a preset pixel to count text lines at the same pixel scale for documents from different sources, while the short side is scaled according to the original aspect ratio.
[0047] In one feasible implementation, the viewer identifier is bound to the page bitmap. The viewer identifier is a string of letters and numbers that is limited to an employee number. The binding relationship is organized into an embedding task table using the document identifier, page number, and viewer identifier. This allows each viewer to embed their unique identifier when the same document is distributed to different viewers. The identifier deciphered from the leaked sample points to the corresponding viewer.
[0048] For each page bitmap, a horizontal projection is made, and the amount of foreground ink in the same scan line is accumulated along the horizontal direction to obtain the projection curve. The peaks of the projection curve in the vertical direction correspond to text lines, and the troughs correspond to the line spacing. The peaks between adjacent troughs are counted as a text line and the number of lines is counted. The distance between the centers of adjacent text lines is counted as the line spacing. The line spacing is used in step S102 to determine the adaptive reference for the line shift micro-movement amount.
[0049] In one specific implementation, to suppress header lines, table borders, and decorative color blocks from being mistakenly counted as text lines, the ink volume of each projected line is counted and the median is taken. Projected lines with ink volume lower than a preset lower multiple of the median or higher than a preset upper multiple of the median are discarded as noise lines. The preset multiple range is between approximately 0.5 times and 2.5 times the median and is adjusted according to the document source layout.
[0050] Based on this, the number of available text lines on the page is obtained and compared with the preset threshold condition. The preset threshold condition is determined based on the number of text lines occupied by a complete data unit. Each bit of a data unit occupies three consecutive lines. A page with the number of available text lines reaching the preset threshold condition must be able to accommodate at least one complete data unit. The preset threshold condition is taken at approximately 20 lines and adjusted according to the length of the data unit.
[0051] When the text line density statistics are abnormal or the projection curve has no obvious peaks and troughs, register the density statistics abnormality flag and determine that the page to be rolled back as a rich text and image page. This is to avoid the text line extraction failure causing the line shift mode to be mistakenly entered, resulting in no place to embed. The rollback decision is written into the embedding task table.
[0052] The page bitmap, viewer identifier binding relationship, text line number, line spacing and noise line removal results are organized with document identifier and page number as primary keys to form the rendering result record, which is used for reading the mode selection criteria in step S101, for using the line spacing benchmark for line shift embedding in step S102, and for subsequent unified traceability and verification of page source.
[0053] In one embodiment of the document type adaptive multimodal anti-screen capture source tracing watermarking method of this application, see [link to relevant documentation]. Figure 3 It can also specifically include the following: Step S301: Select the line-shift watermark mode for the page bitmap that is determined to be a dense text page, and let the line-shift watermark be responsible for tracing the source of the camera capture channel and the digital screenshot channel; Step S302: For the page bitmap identified as a rich-format image and text page, select the light-colored small QR code watermark mode and overlay the hidden watermark mode. The light-colored small QR code is used to trace the source of the camera capture channel, and the hidden watermark is used to trace the source of the digital screenshot channel, so that both types of documents and both types of leakage channels are covered.
[0054] Step S101 describes the adaptive selection of the watermark mode, which is determined independently for each page based on the text line density. Figure 3 As shown, the multi-mode watermarking is divided according to the leakage channel to cover two types of channels. For page bitmaps judged as dense text pages, the line-shifting watermarking mode is selected. The line-shifting watermark is embedded in the image domain of the rendered page. It can be solved by second-order relative quantity decision after camera capture, or it can be solved after digital screenshot. Therefore, the line-shifting watermark simultaneously undertakes the camera capture channel and the digital screenshot channel.
[0055] In one feasible implementation, a light-colored small QR code watermark mode is selected for the page bitmap that is determined to be a rich-format graphic page, and a hidden watermark mode is superimposed. The light-colored small QR code is a visible watermark in the image domain, which can still be decoded by the detector after being photographed by the camera. Therefore, the light-colored small QR code is used for the camera photographing channel. The hidden watermark is a frequency domain or residual signal, which is retained losslessly in the digital link. Therefore, the hidden watermark is used for the digital screenshot channel.
[0056] Based on this, a two-dimensional division of labor is formed according to document type and leakage channel. Dense text documents are covered by line-moving watermarks to cover both channels, while rich text and image documents are covered by light-colored small QR codes and hidden watermarks to cover the camera capture channel and digital screenshot channel respectively. This ensures that both dense text documents and rich text and image documents, as well as both camera capture and digital screenshot channels, are covered without leaving any blind spots.
[0057] In one specific implementation, different pages within the same document can belong to different modes. For mixed documents containing dense text pages and chart pages, a line-moving watermark and a light-colored small QR code are embedded on each page to hide the watermark. The watermark mode of each page is written into the watermark ledger, and the corresponding decoding process is selected according to the mode to which the page belongs during unified tracing.
[0058] Optionally, for boundary pages between the two categories, a definitive classification is made based solely on whether the number of lines of text reaches a preset threshold condition, to avoid interference between two sets of line shifts and QR code watermarks existing on the same page. The classification result of the boundary page and its number of lines of text are registered together for threshold condition regression adjustment.
[0059] For extremely sparse pages that have neither enough text lines nor enough white background blank areas, register an insufficient coverage indicator and prioritize retaining the hidden watermark to at least cover the digital screenshot channel. At the same time, indicate that the page's camera capture channel traceability capability is limited, making the capability boundaries transparent to the user.
[0060] The watermark pattern markers, channel division of labor, and boundary page classification results are organized using document identifiers and page numbers as primary keys. These are used for step S102 to assign embedding processes according to patterns, for step S103 to select decoding order according to hit patterns, and for auditing to verify the channel coverage of each page.
[0061] In one embodiment of the document type adaptive multimodal anti-screen capture source tracing watermarking method of this application, see [link to relevant documentation]. Figure 4 It can also specifically include the following: Step S401: For the dense text page, group three consecutive lines of text together, keep the top and bottom lines as reference lines, shift the middle line up relative to the midpoint of the two lines above and below it to represent the first bit value and shift it down to represent the second bit value, and take the preset small value of the adaptive line spacing for the slight shift. Use the second-order relative value of the middle line relative to the midpoint as the decision to make the encoding immune to overall scaling and skewing. Repeatedly tile the data units along the text lines and fill the shift gaps with the local background color sampled from the blank areas above and below the line, and skip embedding the image areas with non-uniform background. Step S402: After page correction, the center of each text line is taken and the movement direction of the middle line is determined according to the preset line movement decision method to obtain the bit sequence. The data unit is aligned by matching the synchronization code with a sliding window and then the viewer identifier is decrypted by message authentication signature verification.
[0062] Step S102 describes embedding the row-shift watermark using second-order relative displacement encoding to carry bits, such as... Figure 4 As shown, it can be paired with a lightweight decision network to improve the robustness of decisions under small displacements. Taking three consecutive lines of text as a group, with the top and bottom lines as reference lines and fixed, the middle line is positioned relative to the midpoint of its top and bottom lines. Perform directional micro-movement, center of the middle row Shifting upwards causes the second-order relative quantity to be shifted upwards. A negative value indicates the first bit value, and shifting it down makes... A positive value indicates the value of the second bit.
[0063] In one feasible implementation, the micro-displacement is taken as a preset small value of the adaptive line spacing, within approximately 0.3 times the line spacing and falling within the range of 2 to 6 pixels, making the displacement nearly invisible; a second-order relative quantity is used. The judgment is immune to overall translation, scaling and tilting of the entire text block, because the overall geometric transformation has a synchronous effect on the midpoints of the middle line and the upper and lower reference lines, and thus cancels each other out in relative quantities.
[0064] The synchronization code, the viewer's identifier, and the message authentication signature are concatenated to form a data unit. For example, the synchronization code is 4 to 6 bits, the identifier is 8 bits, and the signature is 4 to 8 bits. The data is repeatedly tiled along the text line and repeated a preset number of times on the entire page. This allows the decoding end to decode only a portion containing a complete data unit. The repeated tiling provides redundancy to resist partial clipping and line loss.
[0065] In one specific implementation, the image domain is embedded by directly shifting the text line band on the rendered page. The gap after the shift is filled with the local background color sampled from the blank space above and below the line. The non-destructive embedding is achieved by leaving no white stripes on the colored title block and table. The background variance of the image area with non-uniform background is detected and the embedding is skipped when the variance exceeds the threshold and a skip flag is registered.
[0066] To ensure stable decision-making under smaller displacements and stronger screen capture noise, the corrected three-line text regions are normalized to 96×384 grayscale stripes and input into the lightweight decision network, such as... Figure 6 As shown, the lightweight decision network consists of several convolutional layers, batch normalization, activation functions, and downsampling-based feature extraction blocks connected to global average pooling and a fully connected binary classification head. The convolutional layers use small-sized convolutional kernels, and the activation function uses modified linear units. The output is a binary classification with the middle row shifted up or down.
[0067] In one feasible implementation, the training data of the lightweight decision network is synthesized by a program. Three rows of stripes with known bit values are rendered and screen capture degradation augmentation such as perspective, rotation, resampling, moiré, blur, lighting, noise, and compression are applied. No real shooting is required. The weights are derived after training with cross-entropy as the loss function. The number of network parameters is small and inference can be performed in real time on a central processing unit. When the displacement is compressed to 2 to 3 pixels, the single-bit decision accuracy under the synthesized screen capture degradation is still maintained at a high level.
[0068] During decoding, the center of each text line is taken and the overall page tilt is eliminated by detrending. The sign of the second-order relative quantity is then calculated to obtain the bit. Alternatively, the three-line strip is sent to the lightweight decision network to obtain the bit. One of the two decision methods can be selected and enabled. The detrending method does not require a model and is computationally lightweight. The lightweight decision network method is more robust under strong noise and small displacement. The bit sequence obtained by the decision is aligned with the synchronization code by sliding window matching.
[0069] The data units, second-order relative quantities, skip flags, and decision bit sequences are organized with document identifiers, page numbers, and line group numbers as primary keys. They are used in step S103 for synchronization code alignment and signature verification, for auditing to check embedding density and skip regions, and for the return of misjudged samples to the lightweight decision network for iterative training of augmentation strategies.
[0070] In one embodiment of the document type adaptive multimodal anti-screen capture source tracing watermarking method of this application, see [link to relevant documentation]. Figure 5 It can also specifically include the following: Step S501: Render the QR code carrying the viewer's identifier as a low-contrast light gray with a preset small unit side length, lay it flat on the white blank area of the rich text and graphic page and automatically avoid text and dark color blocks, and at the same time overlay a hidden watermark carrying the same viewer's identifier on the page. Step S502: Perform multi-scale scaling and multi-directional rotation scanning on the light-colored QR code of the leaked sample, and apply preprocessing such as linear stretching of the highlight area, adaptive threshold and contrast-limited histogram equalization. After processing the light-colored code elements into black and white, they are decoded by the QR code detector. The hidden watermark is decoded in the digital screenshot channel to obtain the viewer's identifier through the corresponding decoding process.
[0071] Step S102 describes embedding a light-colored small QR code with a visible watermark overlaid with a hidden watermark for use in rich-format graphic pages, such as... Figure 5 As shown, a low-visibility visible code serves as the camera capture channel, while a hidden watermark serves as the digital screenshot channel. The QR code carrying the viewer's identifier is rendered as a low-contrast light gray, with a grayscale value between approximately 190 and 210. The unit side length is a preset small size, and the value is between tens and three hundred pixels according to the page spacing density, so as to significantly reduce visible interference while maintaining camera solvability.
[0072] In one feasible implementation, a light-colored small QR code is laid flat on the white blank area of the page. The foreground distribution of the page is detected and the text lines and dark color blocks are automatically avoided. The code is only placed in the continuous white background area. The tiling method provides space redundancy. Even if a part is cropped or obscured, the QR code in the remaining position can still be deciphered. White space is left around the QR code to facilitate the detector's positioning.
[0073] At the same time, a hidden watermark carrying the same viewer's identifier is superimposed on the rich-format image and text page. The hidden watermark is one of frequency domain watermark and residual watermark. The identifier is embedded in the frequency domain coefficient or pixel residual with a low amplitude value. It is preserved in the lossless digital link such as digital screenshot, save and forward, and is used for tracing the source of digital screenshot channel. It complements the light-colored small QR code that carries the same identifier.
[0074] In one specific implementation, the decoding end performs multi-scale scaling and multi-directional rotation scanning on the light-colored small QR codes of the leaked sample to adapt to changes in the photographing distance and angle. It also applies preprocessing such as linear stretching of the highlight area, adaptive thresholding, and contrast-limited histogram equalization to enhance the low-contrast light-colored code elements into clear black and white before sending them to the QR code detector for decoding. The cyclic redundancy check inherent in the QR code is used to eliminate false detections.
[0075] Optionally, the hidden watermark is decoded in the digital screenshot channel through its corresponding decoding process. In the camera capture channel, the hidden watermark becomes ineffective because the screen sub-pixel illumination, moiré patterns, and resampling smooth out the low-amplitude signal. At this time, the light-colored small QR code takes over the camera capture channel. The two complement each other and cover the two types of leakage channels of the rich-format graphic page.
[0076] For rich-format pages where the white background blank area is insufficient to accommodate the minimum-sized QR code, register an insufficient code label and reduce the unit side length or increase the tiling interval to retry. If the retry is still insufficient, retain the hidden watermark to cover the digital screenshot channel and prompt that the camera's copying channel capability is limited, making the coverage capability transparent to the user.
[0077] The grayscale, unit side length, tiling position, and type and embedding strength of the light-colored small QR code are organized into a layout embedding record with document identifier and page number as the primary key. This record is used in step S103 to select the QR code decoding and hidden watermark decoding process according to the hit mode, and is used for auditing to verify visibility and code coverage.
[0078] In one embodiment of the document type adaptive multimodal anti-screen capture source tracing watermarking method of this application, see [link to relevant documentation]. Figure 7 It can also specifically include the following: Step S601: Perform page quadrilateral edge detection on the leaked sample to determine the page area, and perform perspective correction and rotation correction to obtain the corrected source tracing bitmap; Step S602: The corrected traceability bitmap is decoded sequentially according to a preset reliable order in which the light-colored small QR code with built-in cyclic redundancy check takes priority over the row-moving watermark and the hidden watermark. The subsequent decoding is terminated when the previous channel is decoded and passes the check.
[0079] Step S103, which involves page location and reliable sequential decoding, is a prerequisite for unified traceability. Figure 7 As shown, geometric distortion is first eliminated, and then decoding is sorted by channel reliability. For uploaded leaked samples, quadrilateral edge detection is performed on the page. The four sides and four corners of the document page are located in the photograph or screenshot to determine the page area, excluding irrelevant areas such as the background and desktop.
[0080] In one feasible implementation, perspective correction is performed based on the four detected corner points to map the tilted page back to the front view rectangle, and then rotation correction is performed to eliminate the rotation in the page plane, resulting in a corrected traceability bitmap with the same pixel scale as when it was embedded, so that the extraction of the row center of the row-moving watermark and the detection of the QR code are performed in a unified coordinate system.
[0081] Based on this, the corrected source bitmap is decoded sequentially according to a preset reliable order. The reliable order is set as follows: light-colored small QR codes with built-in cyclic redundancy check take priority, followed by line-shifting watermarks, and then hidden watermarks. This order is determined based on the decoding reliability and self-checking capability of each channel under screen capture degradation. Light-colored small QR codes with built-in cyclic redundancy check are tried first.
[0082] In one specific implementation, the decoding of subsequent channels is terminated when the previous channel decodes the candidate payload and passes its self-verification, thereby reducing the time consumption and mutual misjudgment of multi-channel parallel decoding. When the previous channel fails to decode or fails the verification, it enters the next channel in sequence, so that when a single channel fails, the remaining channels can still be used for decoding.
[0083] Optionally, in the case where the same sample hits multiple channels, the result of the channel with the highest reliability and the one that passes the verification shall be used, and the decoding conclusion of each channel shall be recorded for cross-checking. When the conclusions of multiple channels are consistent, the confidence level shall be increased. When the conclusions conflict, the one that passes the verification shall be used and the conflict mark shall be registered for manual review.
[0084] In the line-shifting watermarking channel, the center of each text line is re-extracted by horizontal projection of the corrected source bitmap. The correspondence between the reference line and the middle line is restored by grouping three consecutive lines. For each group, the second-order relative quantity of the middle line relative to the midpoint of the upper and lower lines is calculated and its sign is taken to obtain the candidate bit. The sliding window searches for the synchronization code position along the text line direction to determine the data unit boundary. Multiple repeated flat data units are merged by bit-by-bit majority voting to offset the decision flip of individual lines.
[0085] Samples that fail to locate quadrilaterals on the page or are still severely distorted after correction are marked with an abnormal location identifier and multiple candidate quadrilaterals are attempted to be corrected and decoded one by one. If all candidates cannot be decoded, they are judged as unrecognized and a prompt is made to collect more complete and clearer samples to avoid forcibly decoding on distorted samples and getting garbled characters.
[0086] The corrected source tracing bitmap, the decoding order of each channel, and the intermediate decoding conclusions are organized with the sample identifier as the primary key to record the decoding process. This is used for the signature verification step in step S103 to read candidate payloads, for regression adjustment of the reliable decoding order, and for audit restoration of the source tracing judgment link.
[0087] In one embodiment of the document type adaptive multimodal anti-screen capture source tracing watermarking method of this application, see [link to relevant documentation]. Figure 7 It can also specifically include the following: Step S701: Generate a message authentication signature using the server key and the viewer identifier and synchronization code, and embed it along with the data unit so that those without the key cannot forge legitimate payloads; Step S702: First, perform a format verification of letters and numbers on the decoding result, and then perform the message authentication signature verification. When both verifications pass, output the viewer identifier, hit channel, and confidence level. All garbled characters with illegal format, inconsistent signature, or occasional noise from screen capture are judged as unrecognized.
[0088] Step S103 describes the verification output which performs double verification on the candidate payload before outputting the identifier, such as... Figure 7 As shown, to prevent forgery and garbled characters from causing misidentification, the embedded side uses the server key to calculate the message authentication signature based on the viewer identifier and synchronization code, and embeds it along with the data unit. The key is stored only on the server side, so that those without the key cannot forge a legitimate payload that can pass verification.
[0089] In one feasible implementation, after decoding the candidate payload, the identifier format is first checked to verify whether the identifier is limited to letters and numbers and whether the length conforms to the preset work number format. Candidate payloads with illegal formats are directly judged as unrecognized and will not enter the signature verification, so as to quickly filter out obvious garbled characters.
[0090] Based on this, message authentication signature verification is performed on the candidate payload that passes the format verification. The signature of the identifier and synchronization code in the candidate payload is recalculated using the server key and compared bit by bit with the signature carried in the payload. If the two match, the signature verification is deemed to have passed. If they do not match, the signature is deemed to have been forged or damaged and the output is rejected. Only when both the format verification and signature verification pass, the viewer identifier, hit channel and confidence level are output.
[0091] In one specific implementation, for watermark-free images, forged samples by others, and random garbled characters generated by screen capture noise, since they do not contain a legitimate signature generated by the server key, they cannot pass the signature verification. Therefore, they are all returned as unidentified rather than as incorrect work numbers, so that the tracing results would rather miss the identification than misidentify. For watermark-free images, they are returned as unidentified rather than falsely reported.
[0092] Optionally, the confidence level is given based on the decoding quality of the hit channel, the consistency of the multi-channel conclusions, and the signal strength, so that the user can classify and accept the source tracing conclusions. High confidence conclusions can be directly used to locate the source of leakage, while low confidence conclusions are transferred to manual review. The signature verification conclusions and confidence levels are written into the source tracing log together.
[0093] When multiple channels are hit in the same sample, the viewer identifiers resolved by each channel are cross-checked. If the identifiers of each channel are consistent and all have passed the verification, the confidence level is set to high and directly accepted. If the identifiers are inconsistent, the channel that has passed the verification and has the earlier reliable order is used and the conflict identifier is registered. When only a single channel is resolved, the confidence level is given based on the signal strength of that channel and the consistency rate of the voting of the repetition unit.
[0094] For cases where the signature verification passes but the hit channel does not match the document mode embedded in the ledger record, an abnormal channel identifier is registered and the case is transferred to manual review to avoid cross-document load mismatch. The verification is based on the hit mode of each page of the document in the watermark ledger.
[0095] The format verification results, signature verification results, hit channels, viewer identifiers, and confidence levels are organized with the sample identifier as the primary key to form the source tracing conclusion record and written into the source tracing log. This is used for locating the source of the leak and tracing audits, for reviewing rejected samples, and for iterative maintenance of signature strategies and format rules.
[0096] To implement all or part of the method, this application provides an embodiment of an apparatus for implementing the document type adaptive multimodal anti-screen capture source tracing watermarking method, see [link to embodiment]. Figure 2 The device specifically includes the following components: The type discrimination and selection module is used to uniformly render the document to be traced as a page bitmap bound to the viewer's identifier and count the text line density page by page. When the number of text lines reaches the preset threshold, it is judged as a dense text page and the line-moving watermark mode is selected. When it does not reach the threshold, it is judged as a rich text and graphic page and the light-colored small QR code watermark mode is selected and the hidden watermark mode is superimposed. The line-shifting embedding module is used to perform directional micro-shifting of the middle line relative to the midpoint of the upper and lower lines in groups of three consecutive lines to carry bits, and to repeatedly tile the data unit composed of the synchronization code, the viewer identifier and the message authentication signature along the text line and fill the moving gaps with the local background color. The layout embedding module is used to lay a light-colored small QR code carrying the viewer's identifier on a white blank area of the rich layout graphic page and avoid text and dark blocks, while superimposing a hidden watermark carrying the same identifier to cover the camera capture channel and the digital screenshot channel respectively. The source tracing and decoding module is used to perform page quadrilateral positioning and perspective correction on the leaked sample, and then attempt to decode the light-colored small QR code, the row-shifting watermark, and the hidden watermark in a preset reliable order. The module determines the direction of the middle row movement of the row-shifting watermark according to a preset row-shifting decision method and extracts the bit sequence. The signature verification output module is used to verify the identifier format and message authentication signature of the decoding result. When the verification is successful, it outputs the viewer's identifier and the hit channel. When the verification fails, it is judged as unidentified to reject forgery and garbled characters.
[0097] This application provides an apparatus for implementing the method. A type discrimination and selection module uniformly renders the document to be traced as a page bitmap with a normalized long side and binds the viewer identifier to each page. It performs horizontal projection on each page, statistically analyzing the number of available text lines and line spacing, and removes noisy lines. Pages with a text line count reaching a preset threshold are classified as dense text pages and selected using a line-shifting watermark mode. Pages that do not reach the threshold are classified as rich-text / image pages and selected using a light-colored small QR code watermark mode overlaid with a hidden watermark mode. The line-shifting embedding module groups the dense text pages into sets of three consecutive lines, keeping the upper and lower reference lines stationary and making a slight directional shift of the middle line relative to the midpoint of the upper and lower lines. The second-order relative quantity of the middle line relative to the midpoint carries the decision bits. Data units consisting of the synchronization code, viewer identifier, and message authentication signature are repeatedly tiled along the text lines, and the shifting gaps are filled with the local background color. Non-uniform background image areas are skipped during embedding.
[0098] The layout embedding module places a small, light-colored QR code carrying the viewer's identifier in a low-contrast light gray color and a preset small size on a white background blank area of the rich layout image and text page, avoiding text and dark blocks. At the same time, a frequency domain or residual hidden watermark carrying the same identifier is superimposed. The light-colored QR code serves as the camera capture channel, and the hidden watermark serves as the digital screenshot channel. The source tracing decoding module performs page quadrilateral positioning, perspective correction, and rotation correction on the leaked sample. It attempts to decode in a preset reliable order, prioritizing the light-colored QR code, followed by the line-shifting watermark, and then the hidden watermark. The light-colored QR code is detected after multi-scale multi-rotation scanning, highlight stretching, and contrast-limited histogram equalization enhancement. The line-shifting watermark is decoded into a bit sequence according to a preset line-shifting decision method.
[0099] The signature verification output module first verifies the format of the decoded candidate payload by limiting the use of letters and numbers, and then performs message authentication signature verification using the server key. If both verifications pass, it outputs the viewer identifier, the hit channel, and the confidence level. Illegal formats, mismatched signatures, and garbled characters are all judged as unrecognized to reject forgery and misidentification. The five modules of the device work together to achieve a closed loop from document rendering and discrimination to multi-mode watermark adaptive embedding and unified traceability signature verification. The discrimination results, embedding records, and decoding signature verification conclusions of each module are written into the watermark ledger and traceability log using the document identifier and sample identifier as primary keys, supporting multi-mode watermark coverage verification and traceability.
[0100] As can be seen from the above description, the document type adaptive multi-mode anti-screen capture tracing watermarking device provided in this application embodiment can achieve adaptive tracing watermarking embedding and reliable decoding of confidential documents by type and covering two types of leakage channels through the coordinated operation of five modules: type discrimination and selection, line shift embedding, layout embedding, tracing decoding and signature verification output.
[0101] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described method.
[0102] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0103] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described method.
[0104] In this embodiment, each page is driven to adaptively select between a line-shifting watermark mode and a light-colored small QR code watermark overlay hidden watermark mode to eliminate blind spots of single watermark coverage by determining the line density of text lines on each page. Nearly invisible and scale-resistant dense text page embedding is achieved by second-order relative displacement encoding of line-shifting watermark and non-destructive filling of local background color. Camera channel traceability of rich layout pages is achieved by tiling and avoiding light-colored small QR codes and multi-scale enhanced decoding. The digital screenshot channel is covered by hidden watermark and complemented by light-colored small QR codes. The viewer identifier is output only when the signature verification is passed by decoding in a reliable order and performing identifier format verification and message authentication signature verification. This forms a complete closed loop from document rendering discrimination to multi-mode embedding to unified traceability and signature verification.
[0105] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A document type-adaptive multi-modal anti-screen capture source tracing watermarking method, characterized in that, The method includes: The document to be traced is uniformly rendered as a page bitmap bound to the viewer's identifier, and the text line density is counted page by page. When the number of text lines on a certain page reaches the preset threshold, the page is judged as a dense text page and the line-moving watermark mode is selected. When the preset threshold is not reached, the page is judged as a rich text and graphic page and the light-colored small QR code watermark mode is selected and the hidden watermark mode is superimposed. For the dense text page, three consecutive lines of text are grouped together, with the top and bottom lines kept as reference lines and the middle line slightly shifted relative to the midpoint of the top and bottom lines to carry bits. The data unit consisting of the synchronization code, the viewer identifier, and the message authentication signature is repeatedly tiled along the text lines and the shift gaps are filled with the local background color. For the rich text and image page, a light-colored small QR code carrying the viewer identifier is tiled in a white blank area, avoiding text and dark blocks, and a hidden watermark carrying the same identifier is superimposed. After performing page quadrilateral positioning and perspective correction on the leaked sample, the light-colored small QR code, the row-moving watermark, and the hidden watermark are sequentially decoded in a preset reliable order. The decoding results are verified for the identifier format and message authentication signature. When the verification passes, the viewer identifier and hit channel are output. When the verification fails, it is judged as unidentified.
2. The document type adaptive multi-modal anti-screen capture source tracing watermarking method according to claim 1, characterized in that, The process of uniformly rendering the documents to be traced as page bitmaps bound to viewer identifiers and calculating the text line density page by page includes: The layout document and image document are uniformly rendered into page bitmaps with the long side normalized to a preset pixel value, and the viewer's identifier is bound to each page bitmap. The horizontal projection of each page bitmap is used to count the number of consecutive text lines and the line spacing. The text line density of the page is determined based on the number of text lines obtained from the horizontal projection. The text line density is compared with the preset threshold condition to select the watermark mode page by page. Projected lines whose ink volume deviates from the preset multiple range of the median line ink volume are removed as noise lines.
3. The document type adaptive multi-modal anti-screen capture source tracing watermarking method according to claim 1, characterized in that, The process of classifying a page as a dense text page and selecting a line-shifting watermark mode when the number of lines of text on a page reaches a preset threshold, and classifying the page as a rich text and image page and selecting a light-colored small QR code watermark mode overlaid with a hidden watermark mode when the preset threshold is not reached, includes: For page bitmaps identified as dense text pages, select the line-shift watermark mode, and let the line-shift watermark be responsible for tracing the source of the camera capture channel and the digital screenshot channel; For page bitmaps identified as rich-format image and text pages, a light-colored small QR code watermark mode is selected and a hidden watermark mode is superimposed. The light-colored small QR code is used to trace the source of the camera capture channel, and the hidden watermark is used to trace the source of the digital screenshot channel, so that both types of documents and both types of leakage channels are covered.
4. The document type adaptive multi-modal anti-screen capture source tracing watermarking method according to claim 1, characterized in that, The process of grouping the dense text page into sets of three consecutive lines, keeping the top and bottom lines as reference lines and slightly shifting the middle line relative to the midpoint of its top and bottom lines to carry bits, and repeatedly tiling the data unit consisting of the synchronization code, the viewer identifier, and the message authentication signature along the text lines and filling the shift gaps with the local background color includes: For the dense text page, three consecutive lines of text are grouped together. The upper and lower lines are kept as reference lines. The middle line is moved up relative to the midpoint of the two lines above and below it to represent the first bit value and down to represent the second bit value. The micro-movement is taken as a preset small value of adaptive line spacing. The second-order relative value of the middle line relative to the midpoint is used as a decision to make the encoding immune to overall scaling and skewing. The data units are repeatedly tiled along the text line and the moving gaps are filled with the local background color sampled above and below the line. Image areas with non-uniform backgrounds are skipped from embedding. After page correction, the center of each text line is taken from the line-shifting watermark page, and the movement direction of the middle line is determined according to the preset line-shifting decision method to obtain the bit sequence. The data unit is then aligned with the synchronization code by a sliding window and the viewer identifier is decrypted by message authentication signature verification.
5. The document type adaptive multi-modal anti-screen capture source tracing watermarking method according to claim 1, characterized in that, The process of placing a light-colored QR code carrying the viewer's identifier on a white background blank area, avoiding text and dark blocks, and overlaying a hidden watermark carrying the same identifier on the rich-format graphic page includes: The QR code carrying the viewer's identifier is rendered as a low-contrast light gray with a preset small unit side length, and is laid flat on the white blank area of the rich text and image page, automatically avoiding text and dark color blocks. At the same time, a hidden watermark carrying the same viewer's identifier is superimposed on the page. The light-colored QR code of the leaked sample is subjected to multi-scale scaling and multi-directional rotation scanning, and preprocessing is performed with linear stretching of the highlight area, adaptive threshold and contrast-limited histogram equalization. The light-colored code elements are processed into black and white and then decoded by the QR code detector. The hidden watermark is decoded in the digital screenshot channel to obtain the viewer's identifier through the corresponding decoding process.
6. The document type adaptive multi-modal anti-screen capture source tracing watermarking method according to claim 1, characterized in that, After performing page quadrilateral positioning and perspective correction on the leaked sample, the process of sequentially attempting to decode the light-colored small QR code, the line-shifting watermark, and the hidden watermark in a preset reliable order includes: The page quadrilateral edge detection of the leaked sample is used to determine the page area, and perspective correction and rotation correction are performed to obtain the corrected source tracing bitmap; The corrected traceability bitmap is decoded sequentially in a preset reliable order, prioritizing the light-colored small QR code with built-in cyclic redundancy check over the row-moving watermark over the hidden watermark. Subsequent decoding is terminated when the previous channel is decoded and passes the check.
7. The document type adaptive multi-modal anti-screen capture source tracing watermarking method according to claim 1, characterized in that, The process of verifying the decoding result's identifier format and message authentication signature, and outputting the viewer's identifier and hit channel when the verification passes, and determining it as unrecognized when the verification fails, includes: The server-side key is used to generate a message authentication signature based on the viewer's identifier and synchronization code, and this signature is embedded along with the data unit, so that those without the key cannot forge legitimate payloads. The decoding result is first checked for the identification format of letters and numbers, and then the message authentication signature is checked. When both checks pass, the viewer identifier, the hit channel, and the confidence level are output. All garbled characters with illegal format, inconsistent signature, or occasional noise from screen capture are judged as unrecognized.
8. A document type adaptive multi-mode anti-screen capture source tracing watermarking device, characterized in that, The device includes: The type discrimination and selection module is used to uniformly render the document to be traced as a page bitmap bound to the viewer's identifier and count the text line density page by page. When the number of text lines reaches the preset threshold, it is judged as a dense text page and the line-moving watermark mode is selected. When it does not reach the threshold, it is judged as a rich text and graphic page and the light-colored small QR code watermark mode is selected and the hidden watermark mode is superimposed. The line-shifting embedding module is used to perform directional micro-shifting of the middle line relative to the midpoint of the upper and lower lines in groups of three consecutive lines to carry bits, and to repeatedly tile the data unit composed of the synchronization code, the viewer identifier and the message authentication signature along the text line and fill the moving gaps with the local background color. The layout embedding module is used to lay a light-colored small QR code carrying the viewer's identifier on a white blank area of the rich layout graphic page and avoid text and dark blocks, while superimposing a hidden watermark carrying the same identifier to cover the camera capture channel and the digital screenshot channel respectively. The source tracing and decoding module is used to perform page quadrilateral positioning and perspective correction on the leaked sample, and then attempt to decode the light-colored small QR code, the row-shifting watermark, and the hidden watermark in a preset reliable order. The module determines the direction of the middle row movement of the row-shifting watermark according to a preset row-shifting decision method and extracts the bit sequence. The signature verification output module is used to verify the identifier format and message authentication signature of the decoding result. When the verification is successful, it outputs the viewer's identifier and the hit channel. When the verification fails, it is judged as unidentified to reject forgery and garbled characters.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the document type adaptive multi-mode anti-screen capture tracing watermarking method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the document type adaptive multi-mode anti-screen capture source watermarking method according to any one of claims 1 to 7.
