A video anti-tampering watermark method and device based on edge pixel concealment

By adding encrypted watermark information strings to the edges of video image frames, a weak differential watermark signal is formed, which solves the problem that signature information cannot be feedback when it is controlled or stolen in the prior art, and maintains the watermark when video transcoding and resolution changes. Effectiveness reduces the impact on picture quality and the cost of detection devices.

CN119182974BActive Publication Date: 2025-02-21HEFEI HIGH DIMENSIONAL DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411677412.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-02-21
Estimated Expiration
2044-11-22

AI Technical Summary

Technical Problem

The existing video tamper-proof technology has the signature information that cannot be effectively fed back when it is controlled or stolen, and the signature information is invalid during video transcoding; at the same time, noise watermarks have poor compression resistance after video transcoding and compression, which is easy to appear. Misconduct and the algorithm is complex, resulting in difficulty in real-time detection.

Method used

A video tamper-proof watermark method based on edge pixel concealment is adopted, and the watermark of the video file is formed by converting the encrypted watermark information string into a weakly differential watermark signal and adding it to the edge of the image frame. This method uses a perceptual hashing algorithm to generate image frame fingerprints and encrypts them in combination with user-unique encoding to ensure that the watermark remains valid during video transcoding and resolution changes.

Benefits of technology

The effectiveness of watermarking during video transcoding and resolution changes is realized, the impact on picture quality is reduced, the performance configuration requirements and cost of the detection device are reduced, and the function of real-time detection is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119182974B_ABST
    Figure CN119182974B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of digital video processing technology, and discloses a video anti-tampering watermark method and device based on edge pixel concealment. The video anti-tampering watermark method based on edge pixel concealment proposed by the present invention can convert the watermark information of each frame image fingerprint and the user's unique code into a weak differential watermark signal with a black background, cover the edge pixels of the frame image, and use the concealment of the edge pixels to effectively hide the watermark information. The public display screen video content detection device proposed by the present invention can meet the one-to-one matching of different operators for the review and tampering detection of the video content on the public display screen, avoid the confusion of the content played on the public display screen, and reduce the occurrence of adverse social impact events caused by the invasion and modification of the video content on the public display screen.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of digital video processing, and in particular relates to a video tamper-proof watermark method and device based on edge pixel concealment. Background Art

[0002] At present, video anti-tampering technology is mainly used in IPTV video live broadcast. The most commonly used method is to directly use signature information generation and verification, that is, insert signature information into the video stream and report or broadcast it. Or add a watermark signal with specific noise to the video screen. When the video screen is tampered with, the contour of the tampered area can be detected and located, and then the contour area can be used to determine whether the screen has been tampered with. However, these two methods of preventing video tampering have certain problems.

[0003] Using only signature information and verification to prevent video tampering has the following problems:

[0004] 1. When an existing transmission line is controlled or stolen by an "invader", the signature information cannot accurately feedback information and results;

[0005] 2. For transcoding scenarios required by normal business needs, such as transcoding 8K ultra-high-definition video into different resolutions such as 2K and 1080P, the signature information will become invalid and need to be re-signed, which is very inconvenient.

[0006] However, by adding a specific noise watermark signal to the picture to prevent video tampering, there are the following problems:

[0007] 1. Adjust the resolution of the video with noise watermark or use common algorithms such as H.264 to transcode and compress the video. Because noise watermarks have poor compression resistance, a large number of false detections are likely to occur;

[0008] 2. Adding noise watermarks to the entire video image will reduce the image quality after compressing the video again, resulting in poor video display effects;

[0009] 3. Adding noise watermarks usually uses a frequency domain transformation algorithm, which superimposes the watermark signal and then inversely transforms it. The algorithm is highly complex and can easily cause frame drops and freezes during real-time playback detection, or increase the performance configuration of the detection device, which is costly.

[0010] In view of this, the present invention is proposed. Summary of the invention

[0011] The purpose of the present invention is to propose a video anti-tampering watermark method and device based on edge pixel concealment, which can embed watermarks when the legitimate operator of a public display screen reviews the video content, so as to meet the one-to-one matching of different operators for the review and tampering detection of the video content on the public display screen, avoid confusion of the content played on the public display screen, and reduce the occurrence of adverse social impact events caused by the invasion and modification of the video content on the public display screen.

[0012] First, as Figure 1 , Figure 2 As shown, the present invention proposes a video anti-tampering watermark method based on edge pixel concealment, comprising:

[0013] S11. Preset a video file V and a user-unique code for the video file V, and decode the video file V into I image frames F1i, i=1, 2, ..., I;

[0014] S12. Scale the resolution of the image frame F1i to , cutting off 8 pixels at the edge of the image frame F1i to obtain an image frame F2i, and calculating the image frame F2i to obtain an image frame fingerprint of the image frame F2i;

[0015] S13. The image frame fingerprint of the image frame F2i and the user unique code of the video file V are concatenated and encrypted into a binary encrypted watermark information string w1i, wherein the length of the encrypted watermark information string is ni bits;

[0016] S14. Convert the encrypted watermark information string w1i into a weak differential watermark signal w1i' with a black background, and add the weak differential watermark signal w1i' with a black background to the edge of the image frame F1i to obtain an image frame F1i with the weak differential watermark signal w1i' with a black background added;

[0017] S15. Replace the image frame F1i of the weak differential watermark signal w1i' with a black background into the video file V, and use the same parameter compression encoding to form a video file V' with the weak differential watermark signal w1i' with a black background.

[0018] Furthermore, in S12, the image frame F2i is calculated to obtain the image frame fingerprint of the image frame F2i, and the calculation is performed using a perceptual hash algorithm with scaling invariance. The perceptual hash algorithm generates a "fingerprint" string for each image, and then compares the fingerprints of different images. The closer the results are, the more similar the images are. The advantages of the perceptual hash algorithm are that it is simple, fast, and not affected by image size scaling.

[0019] Furthermore, if Figure 2 As shown, in S14, the encrypted watermark information string w1i is converted into a weak differential watermark signal w1i' of a black background, and the weak differential watermark signal w1i' of the black background is added to the edge of the image frame F1i, including:

[0020] S141. The edge of the preset image frame F1i can be placed ni watermark information unit;

[0021] S142. Calculate the watermark information unit height mi, specifically:

[0022] a1. When the height hi of the image frame F1i resolution is ≤1080, the height mi of the watermark information unit is 2;

[0023] a2. When the height hi of the resolution of the image frame F1i is greater than 1080, the height mi of the watermark information unit is enlarged proportionally and rounded down, that is, the height mi of the watermark information unit is ;

[0024] S143. Calculate the watermark information unit width ki: divide the width wi of the image frame F1i resolution into ni equal parts, the watermark information unit width ki = floor(wi / ni);

[0025] S144. Sequentially add ni of the edges of the image frame F1i according to the information bits in the encrypted watermark information string w1i. The watermark information unit is filled, specifically:

[0026] b1. When the information bit in the encrypted watermark information string w1i is 0, the color of the watermark information unit is set to dark black with a gray value of 0;

[0027] b2. When the information bit in the encrypted watermark information string w1i is 1, the color of the watermark information unit is set to light black with a gray value > 0, and the gray value of the light black can be adjusted according to the degree of video compression.

[0028] Further, the edge of the image frame F1i in S12 may be the top edge, or the bottom edge, the left edge, the right edge, or any combination of the top edge, the bottom edge, the left edge, and the right edge. However, in terms of the hiding effect of adding a watermark, when the watermark is added to the top edge of the image frame, the hiding effect of the watermark is the best. It should be noted here that the calculation method of the height and width of the watermark information unit should be adjusted according to the appropriateness of the edge position where the watermark is placed.

[0029] Second, as Figure 3As shown, the present invention proposes a video anti-tampering watermark system based on edge pixel concealment, which adopts the video anti-tampering watermark method based on edge pixel concealment as described in the first aspect, including:

[0030] The image frame extraction module D31 presets a video file V and a user-unique code of the video file V, and decodes the video file V into I image frames F1i, i=1, 2, ..., I;

[0031] The image frame fingerprint calculation module D32 scales the resolution of the image frame F1i to , cutting off 8 pixels at the edge of the image frame F1i to obtain an image frame F2i, and calculating the image frame F2i to obtain an image frame fingerprint of the image frame F2i;

[0032] The watermark information encoding module D33 concatenates the image frame fingerprint of the image frame F2i and the user unique code of the video file V and encrypts them into a binary encrypted watermark information string w1i;

[0033] The differential watermark signal generating and adding module D34 converts the encrypted watermark information string w1i into a weak differential watermark signal w1i' with a black background, and adds the weak differential watermark signal w1i' with a black background to the edge of the image frame F1i, thereby obtaining the image frame F1i with the weak differential watermark signal w1i' with a black background added;

[0034] The watermark video synthesis module D35 replaces the image frame F1i of the weak differential watermark signal w1i' with a black background into the video file V, and uses the same parameter compression encoding to form a video file V' with the weak differential watermark signal w1i' with a black background.

[0035] Thirdly, Figure 4 As shown, the present invention proposes a video watermark detection method based on edge pixel concealment, comprising:

[0036] S31. Preset a video file V1, a public display screen user unique code B1, and decode the video file V1 into J image frames F3j, j = 1, 2, ..., J;

[0037] S32. Scale the resolution of the image frame F3j to , cutting off 8 pixels at the edge of the image frame F3j to obtain the image frame F4j, and calculating the image frame fingerprint A1j of the image frame F4j;

[0038] S33. The image frame fingerprint A1j of the image frame F4j and the unique code B1 of the public display screen user are concatenated and encrypted into a binary encrypted watermark information string w1j, wherein the length of the encrypted watermark information string is n1j bits;

[0039] S34. Convert the encrypted watermark information string w1j into a weak differential watermark signal w1j' with a black background, and add the weak differential watermark signal w1j' with a black background to the edge of the image frame F3j to obtain an image frame F3j with the weak differential watermark signal w1j' with a black background.

[0040] S35. Decrypt and segment the image frame F3j to which the weak differential watermark signal w1j' with a black background is added, and obtain J image frame fingerprints Aj of the image frame F3j and a public display user unique code B;

[0041] S36. Compare the image frame fingerprints A1j and Aj of the J image frames F3j, the public display screen user unique codes B1 and B, and determine whether the video file V1 has been tampered with, specifically:

[0042] c1. When the similarity between the image frame fingerprint A1j and Aj of the J image frames F3j is ≥ the set threshold and the public display user unique codes B1 and B are consistent, it means that the image frame F3j has not been tampered with, and it can be determined that the video file V1 has not been tampered with;

[0043] c2. When the similarity between the fingerprint A1j of any image frame in the J image frames F3j and Aj is less than the set threshold or the public display screen user unique codes B1 and B are inconsistent, it means that the image frame F3j has been tampered with or replaced, and it can be determined that the video file V1 has been tampered with or replaced.

[0044] Fourthly, Figure 5 As shown, the present invention proposes a video watermark detection system based on edge pixel concealment, which adopts the video watermark detection method based on edge pixel concealment as described in the third aspect, including:

[0045] The image frame extraction module D51 presets a video file V1 and a public display screen user unique code B1, and decodes the video file V1 into J image frames F3j, j=1, 2, ..., J;

[0046] The image frame fingerprint calculation module D52 scales the resolution of the image frame F3j to , cutting off 8 pixels at the edge of the image frame F3j to obtain the image frame F4j, and calculating the image frame fingerprint A1j of the image frame F4j;

[0047] The watermark information encoding module D53 concatenates the image frame fingerprint A1j of the image frame F4j and the unique code B1 of the user of the public display screen and encrypts them into a binary encrypted watermark information string w1j, wherein the length of the encrypted watermark information string is n1j bits;

[0048] The differential watermark signal generating and adding module D54 converts the encrypted watermark information string w1j into a weak differential watermark signal w1j' with a black background, and adds the weak differential watermark signal w1j' with a black background to the edge of the image frame F3j to obtain an image frame F3j with the weak differential watermark signal w1j' with a black background added;

[0049] The image frame fingerprint and user unique code reversible calculation module D55 decrypts and segments the image frame F4j with the weak differential watermark signal w1j' with a black background added, and obtains the image frame fingerprints Aj of J image frames F3j and a public display screen user unique code B;

[0050] The module D56 for judging whether the video has been tampered with: comparing the image frame fingerprints A1j and Aj of the J image frames F3j, the public display screen user unique codes B1 and B, and judging whether the video has been replaced or tampered with.

[0051] Fifthly, Figure 6 As shown, the present invention proposes a video content detection device for public display screen, including a video player, a tampering detection device, and a public display screen, wherein the tampering detection device is located between the video player and the public display screen, and the tampering detection device includes: an input signal source, a main signal buffer device, a bypass signal detection device, and an output signal source, wherein:

[0052] The input signal source is used to receive a signal from a video player or a video signal input;

[0053] The main signal buffer device includes a delay buffer, which can delay the video signal input for several seconds before outputting it;

[0054] The bypass signal detection device includes the video watermark detection system based on edge pixel concealment as described in the fourth aspect, which can detect the video signal in the video player to determine whether the video has been replaced or tampered with;

[0055] The output signal source outputs the video or outputs the preset picture to the public display screen, specifically:

[0056] When the bypass signal detection device detects that the video has not been tampered with, the output signal source outputs the video to a public display screen;

[0057] When the bypass signal detection device detects that the video has been replaced or tampered with, the output signal source outputs a preset picture to the public display screen.

[0058] In a sixth aspect, the present invention proposes an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the video anti-tampering watermark method based on edge pixel concealment or the video watermark detection method based on edge pixel concealment as described above is implemented.

[0059] In a seventh aspect, the present invention proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the video anti-tampering watermark method based on edge pixel concealment or the video watermark detection method based on edge pixel concealment as described above.

[0060] Compared with the prior art, the present invention has the following beneficial effects:

[0061] 1. The video has better picture quality: The video anti-tampering watermark method based on edge pixel concealment proposed in the present invention encodes the watermark information into a weak differential watermark signal, covers the edge pixels of the image frame, and uses the concealment of edge pixels to hide the watermark information. Compared with the traditional watermark signal that adds specific noise to the entire video screen, it is less likely to be detected and reduces the impact on the picture quality;

[0062] 2. Noise watermarks can resist stronger video transcoding compression and resolution adjustment: The video anti-tampering watermark method based on edge pixel concealment proposed in the present invention can maintain the validity of the watermark when the video content is transcoded and the resolution changes on the public display screen, without the need for re-signing, which solves the problem of signature information becoming invalid after transcoding compression in the prior art. This advantage is particularly important for scenarios that require frequent transcoding, such as transcoding 8K ultra-high-definition video into different resolutions such as 2K and 1080P;

[0063] 3. The detection device has the function of real-time detection: the public display screen video content detection device proposed by the present invention can extract the differential watermark signal from the signal or video stream signal in real time during video playback, and compare it with the image fingerprint to determine whether the video has been tampered with or replaced. Compared with the existing technology, it reduces the problem of frame drop and freeze during real-time playback detection, and reduces the performance configuration requirements and cost of the detection device. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present invention, and together with the specification are used to explain the principles of the present invention. Obviously, the accompanying drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0065] Figure 1 It is a schematic diagram of the video anti-tampering watermark method based on edge pixel concealment of the present invention.

[0066] Figure 2 It is a schematic diagram of filling the watermark information unit of the information bit in the encrypted watermark information string.

[0067] Figure 3 It is a schematic diagram of the structure of the video anti-tampering watermark system based on edge pixel concealment of the present invention.

[0068] Figure 4 It is a schematic diagram of a video watermark detection method based on edge pixel concealment of the present invention.

[0069] Figure 5 It is a schematic diagram of the structure of the video watermark detection system based on edge pixel concealment of the present invention.

[0070] Figure 6 It is a structural schematic diagram of a device for detecting video content on a public display screen according to the present invention.

[0071] Explanation of reference numerals: D31 image frame extraction module; D32 image frame fingerprint calculation module; D33 watermark information encoding module; D34 differential watermark signal generation and addition module; D35 watermark video synthesis module. D51 image frame extraction module; D52 image frame fingerprint calculation module; D53 watermark information encoding module; D54 differential watermark signal generation and addition module; D55 image frame fingerprint and user unique code reversible calculation module; D56 module for judging whether the video has been tampered with. DETAILED DESCRIPTION

[0072] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0073] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two.

[0074] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0075] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.

[0076] It should also be noted that the term "includes", "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the commodity or device including the elements.

[0077] The optional embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0078] First, as Figure 1 , Figure 2 As shown, the present invention proposes a video anti-tampering watermark method based on edge pixel concealment, comprising:

[0079] S11. Preset a video file V and a user-unique code for the video file V, and decode the video file V into I image frames F1i, i=1, 2, ..., I;

[0080] S12. Scale the resolution of the image frame F1i to , cutting off 8 pixels at the edge of the image frame F1i to obtain an image frame F2i, and calculating the image frame F2i to obtain an image frame fingerprint of the image frame F2i;

[0081] S13. The image frame fingerprint of the image frame F2i and the user unique code of the video file V are concatenated and encrypted into a binary encrypted watermark information string w1i, wherein the length of the encrypted watermark information string is ni bits;

[0082] S14. Convert the encrypted watermark information string w1i into a weak differential watermark signal w1i' with a black background, and add the weak differential watermark signal w1i' with a black background to the edge of the image frame F1i to obtain an image frame F1i with the weak differential watermark signal w1i' with a black background added;

[0083] S15. Replace the image frame F1i of the weak differential watermark signal w1i' with a black background into the video file V, and use the same parameter compression encoding to form a video file V' with the weak differential watermark signal w1i' with a black background.

[0084] In S12, the resolution of the image frame F1i is scaled to Resolution is because It is a large screen resolution commonly used in high-definition LCD monitors. Resolution refers to the number of pixels in the length and width of an image or display. Generally speaking, the higher the image resolution, the more pixels it contains and the clearer the image.

[0085] In addition, the 8 pixels at the edge of the image frame F1i are cropped in S12 to avoid the influence of the added watermark on the fingerprint of the image frame.

[0086] The encrypted watermark information string is converted into a weak differential watermark signal with a black background in S14 because the edges of public display screens are generally black and have better concealment.

[0087] Furthermore, in S12, the image frame F2i is calculated to obtain the image frame fingerprint of the image frame F2i, and the calculation is performed using a perceptual hash algorithm with scaling invariance. The perceptual hash algorithm generates a "fingerprint" string for each image, and then compares the fingerprints of different images. The closer the results are, the more similar the images are. The advantages of the perceptual hash algorithm are that it is simple, fast, and not affected by image size scaling.

[0088] Furthermore, in S14, the encrypted watermark information string w1i is converted into a weak differential watermark signal w1i' of a black background, and the weak differential watermark signal w1i' of the black background is added to the edge of the image frame F1i, including:

[0089] S141. The edge of the preset image frame F1i can be placed ni watermark information unit;

[0090] S142. Calculate the watermark information unit height m, specifically:

[0091] a1. When the height hi of the image frame F1i resolution is ≤1080, the height mi of the watermark information unit is 2;

[0092] a2. When the height hi of the resolution of the image frame F1i is greater than 1080, the height mi of the watermark information unit is enlarged proportionally and rounded down, that is, the height mi of the watermark information unit is ;

[0093] S143. Calculate the watermark information unit width ki: divide the width wi of the image frame F1i resolution into ni equal parts, the watermark information unit width ki = floor(wi / ni);

[0094] S144. Sequentially add ni of the edges of the image frame F1i according to the information bits in the encrypted watermark information string w1i. The watermark information unit is filled, specifically:

[0095] b1. When the information bit in the encrypted watermark information string w1i is 0, the color of the watermark information unit is set to dark black with a gray value of 0;

[0096] b2. When the information bit in the encrypted watermark information string w1i is 1, the color of the watermark information unit is set to light black with a gray value > 0, and the gray value of the light black can be adjusted according to the degree of video compression.

[0097] Furthermore, if Figure 2 As shown, the edge of the image frame F1i in S12 can be the top edge, or the bottom edge, the left edge, the right edge, or any combination of the top edge, the bottom edge, the left edge, and the right edge. However, in terms of the hiding effect of adding a watermark, when the watermark is added to the top edge of the image frame, the hiding effect of the watermark is the best. It should be noted here that the calculation method of the height and width of the watermark information unit should be adjusted according to the appropriateness of the edge position where the watermark is placed.

[0098] Second, as Figure 3 As shown, the present invention proposes a video anti-tampering watermark system based on edge pixel concealment, which adopts the video anti-tampering watermark method based on edge pixel concealment as described in the first aspect, including:

[0099] The image frame extraction module D31 presets a video file V and a user-unique code of the video file V, and decodes the video file V into I image frames F1i, i=1, 2, ..., I;

[0100] The image frame fingerprint calculation module D32 scales the resolution of the image frame F1i to , cutting off 8 pixels at the edge of the image frame F1i to obtain an image frame F2i, and calculating the image frame F2i to obtain an image frame fingerprint of the image frame F2i;

[0101] The watermark information encoding module D33 concatenates the image frame fingerprint of the image frame F2i and the user unique code of the video file V and encrypts them into a binary encrypted watermark information string w1i;

[0102] The differential watermark signal generating and adding module D34 converts the encrypted watermark information string w1i into a weak differential watermark signal w1i' with a black background, and adds the weak differential watermark signal w1i' with a black background to the edge of the image frame F1i, thereby obtaining the image frame F1i with the weak differential watermark signal w1i' with a black background added;

[0103] The watermark video synthesis module D35 replaces the image frame F1i of the weak differential watermark signal w1i' with a black background into the video file V, and uses the same parameter compression encoding to form a video file V' with the weak differential watermark signal w1i' with a black background.

[0104] Thirdly, Figure 4 As shown, the present invention proposes a video watermark detection method based on edge pixel concealment, comprising:

[0105] S31. Preset a video file V1, a public display screen user unique code B1, and decode the video file V1 into J image frames F3j, j = 1, 2, ..., J;

[0106] S32. Scale the resolution of the image frame F3j to , cutting off 8 pixels at the edge of the image frame F3j to obtain the image frame F4j, and calculating the image frame fingerprint A1j of the image frame F4j;

[0107] S33. The image frame fingerprint A1j of the image frame F4j and the unique code B1 of the public display screen user are concatenated and encrypted into a binary encrypted watermark information string w1j, wherein the length of the encrypted watermark information string is n1j bits;

[0108] S34. Convert the encrypted watermark information string w1j into a weak differential watermark signal w1j' with a black background, and add the weak differential watermark signal w1j' with a black background to the edge of the image frame F3j to obtain an image frame F3j with the weak differential watermark signal w1j' with a black background added;

[0109] S35. Decrypt and segment the image frame F3j to which the weak differential watermark signal w1j' with a black background is added, and obtain J image frame fingerprints Aj of the image frame F3j and a public display user unique code B;

[0110] S36. Compare the image frame fingerprints A1j and Aj of the J image frames F3j, the public display screen user unique codes B1 and B, and determine whether the video file V1 has been tampered with, specifically:

[0111] c1. When the similarity between the image frame fingerprint A1j and Aj of the J image frames F3j is ≥ the set threshold and the public display user unique codes B1 and B are consistent, it means that the image frame F3j has not been tampered with, and it can be determined that the video file V1 has not been tampered with;

[0112] c2. When the similarity between the fingerprint A1j and Aj of any image frame in the image frame F3j is less than the set threshold or the public display screen user unique codes B1 and B are inconsistent, it means that the image frame F3j has been tampered with or replaced, and it can be determined that the video file V1 has been tampered with or replaced.

[0113] In S32, since the image frame F4j is obtained by cutting 8 pixels of the edge of the image frame F3j, the image frame fingerprint A1j of the image frame F4j is also the image frame fingerprint of the image frame F3j. In S35, the image frame F3j with the weak differential watermark signal w1j' with the black background added can be decrypted and segmented through the reversible steps of the above steps S32-S35, thereby obtaining J image frame fingerprints Aj of the image frames F3j and a public display screen user unique code B.

[0114] Fourthly, Figure 5 As shown, the present invention proposes a video watermark detection system based on edge pixel concealment, which adopts the video watermark detection method based on edge pixel concealment as described in the third aspect, including:

[0115] The image frame extraction module D51 presets a video file V1 and a public display screen user unique code B1, and decodes the video file V1 into J image frames F3j, j=1, 2, ..., J;

[0116] The image frame fingerprint calculation module D52 scales the resolution of the image frame F3j to , cutting off 8 pixels at the edge of the image frame F3j to obtain the image frame F4j, and calculating the image frame fingerprint A1j of the image frame F4j;

[0117] The watermark information encoding module D53 concatenates the image frame fingerprint A1j of the image frame F4j and the unique code B1 of the user of the public display screen and encrypts them into a binary encrypted watermark information string w1j, wherein the length of the encrypted watermark information string is n1j bits;

[0118] The differential watermark signal generating and adding module D54 converts the encrypted watermark information string w1j into a weak differential watermark signal w1j' with a black background, and adds the weak differential watermark signal w1j' with a black background to the edge of the image frame F3j to obtain an image frame F3j with the weak differential watermark signal w1j' with a black background added;

[0119] The image frame fingerprint and user unique code reversible calculation module D55 decrypts and segments the image frame F4j with the weak differential watermark signal w1j' with a black background added, and obtains the image frame fingerprints Aj of J image frames F3j and a public display screen user unique code B;

[0120] The module D56 for judging whether the video has been tampered with: comparing the image frame fingerprints A1j and Aj of the J image frames F3j, the public display screen user unique codes B1 and B, and judging whether the video has been replaced or tampered with.

[0121] Fifthly, Figure 6 As shown, the present invention proposes a video content detection device for public display screen, including a video player, a tampering detection device, and a public display screen, wherein the tampering detection device is located between the video player and the public display screen, and the tampering detection device includes: an input signal source, a main signal buffer device, a bypass signal detection device, and an output signal source, wherein:

[0122] The input signal source is used to receive a signal from a video player or a video signal input;

[0123] The main signal buffer device includes a delay buffer, which can delay the video signal input for several seconds before outputting it;

[0124] The bypass signal detection device includes the video watermark detection system based on edge pixel concealment as described in the fourth aspect, which can detect the video signal in the video player to determine whether the video has been tampered with or replaced;

[0125] The output signal source outputs the video or outputs the preset picture to the public display screen, specifically:

[0126] When the bypass signal detection device detects that the video has not been tampered with, the output signal source outputs the video to a public display screen;

[0127] When the bypass signal detection device detects that the video has been tampered with or replaced, the output signal source outputs a preset picture to the public display screen.

[0128] In a sixth aspect, the present invention proposes an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the video anti-tampering watermark method based on edge pixel concealment or the video watermark detection method based on edge pixel concealment as described above is implemented.

[0129] In a seventh aspect, the present invention proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the video anti-tampering watermark method based on edge pixel concealment or the video watermark detection method based on edge pixel concealment as described above.

[0130] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program code stored in the storage medium.

[0131] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0132] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RYM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer via a communication network.

[0133] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0134] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or written to a memory provided in an expansion unit connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or the expansion unit is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A video anti-tampering watermark method based on edge pixel concealment, characterized in that: include: S11. Preset a video file V and a user-unique code for the video file V, and decode the video file V into I image frames F1i, i=1, 2, ..., I; S12. Scale the resolution of the image frame F1i to , cutting off 8 pixels at the edge of the image frame F1i to obtain an image frame F2i, and calculating the image frame F2i to obtain an image frame fingerprint of the image frame F2i; S13. The image frame fingerprint of the image frame F2i and the user unique code of the video file V are concatenated and encrypted into a binary encrypted watermark information string w1i, wherein the length of the encrypted watermark information string is ni bits; S14. Convert the encrypted watermark information string w1i into a weak differential watermark signal w1i' with a black background, and add the weak differential watermark signal w1i' with a black background to the edge of the image frame F1i to obtain an image frame F1i with the weak differential watermark signal w1i' with a black background added; S15. Replace the image frame F1i of the weak differential watermark signal w1i' with a black background into the video file V, and use the same parameter compression encoding to form a video file V' with the weak differential watermark signal w1i' with a black background.

2. According to claim 1, a video anti-tampering watermark method based on edge pixel concealment is characterized in that: In S12, the image frame F2i is calculated to obtain the image frame fingerprint of the image frame F2i, and a perceptual hash algorithm with scaling invariance is used for calculation.

3. The video anti-tampering watermark method based on edge pixel concealment according to claim 1 is characterized in that: S14 converts the encrypted watermark information string w1i into a weak differential watermark signal w1i' of a black background, and adds the weak differential watermark signal w1i' of the black background to the edge of the image frame F1i, including: S141. The edge of the preset image frame F1i can be placed ni watermark information unit; S142. Calculate the watermark information unit height mi, specifically: a1. When the height hi of the image frame F1i resolution is ≤1080, the height mi of the watermark information unit is 2; a2. When the height hi of the resolution of the image frame F1i is greater than 1080, the height mi of the watermark information unit is enlarged proportionally and rounded down, that is, the height mi of the watermark information unit is ; S143. Calculate the watermark information unit width ki: divide the width wi of the image frame F1i resolution into ni equal parts, the watermark information unit width ki = floor(wi / ni); S144. Sequentially add ni of the edges of the image frame F1i according to the information bits in the encrypted watermark information string w1i. The watermark information unit is filled, specifically: b1. When the information bit in the encrypted watermark information string w1i is 0, the color of the watermark information unit is set to dark black with a gray value of 0; b2. When the information bit in the encrypted watermark information string w1i is 1, the color of the watermark information unit is set to light black with a gray value > 0, and the gray value of the light black can be adjusted according to the degree of video compression.

4. The video anti-tampering watermark method based on edge pixel concealment according to claim 1 is characterized in that: The edge of the image frame F1i in S12 may be a top edge, or a bottom edge, a left edge, a right edge, or any combination of the top edge, the bottom edge, the left edge, and the right edge.

5. A video anti-tampering watermark system based on edge pixel concealment, using the video anti-tampering watermark method based on edge pixel concealment as described in any one of claims 1 to 4, characterized in that: include: The image frame extraction module D31 presets a video file V and a user-unique code of the video file V, and decodes the video file V into I image frames F1i, i=1, 2, ..., I; The image frame fingerprint calculation module D32 scales the resolution of the image frame F1i to , cutting off 8 pixels at the edge of the image frame F1i to obtain an image frame F2i, and calculating the image frame F2i to obtain an image frame fingerprint of the image frame F2i; The watermark information encoding module D33 concatenates the image frame fingerprint of the image frame F2i and the user unique code of the video file V and encrypts them into a binary encrypted watermark information string w1i; The differential watermark signal generating and adding module D34 converts the encrypted watermark information string w1i into a weak differential watermark signal w1i' with a black background, and adds the weak differential watermark signal w1i' with a black background to the edge of the image frame F1i, thereby obtaining the image frame F1i with the weak differential watermark signal w1i' with a black background added; The watermark video synthesis module D35 replaces the image frame F1i of the weak differential watermark signal w1i' with a black background into the video file V, and uses the same parameter compression encoding to form a video file V' with the weak differential watermark signal w1i' with a black background.

6. A video watermark detection method based on edge pixel concealment, characterized in that: include: S31. Preset a video file V1, a public display screen user unique code B1, and decode the video file V1 into J image frames F3j, j = 1, 2, ..., J; S32. Scale the resolution of the image frame F3j to , cutting off 8 pixels at the edge of the image frame F3j to obtain the image frame F4j, and calculating the image frame fingerprint A1j of the image frame F4j; S33. The image frame fingerprint A1j of the image frame F4j and the unique code B1 of the public display screen user are concatenated and encrypted into a binary encrypted watermark information string w1j, wherein the length of the encrypted watermark information string is n1j bits; S34. Convert the encrypted watermark information string w1j into a weak differential watermark signal w1j' with a black background, and add the weak differential watermark signal w1j' with a black background to the edge of the image frame F3j to obtain an image frame F3j with the weak differential watermark signal w1j' with a black background added; S35. Decrypt and segment the image frame F3j to which the weak differential watermark signal w1j' with a black background is added, and obtain J image frame fingerprints Aj of the image frame F3j and a public display user unique code B; S36. Compare the image frame fingerprints A1j and Aj of the J image frames F3j, the public display screen user unique codes B1 and B, and determine whether the video file V1 has been tampered with, specifically: c1. When the similarity between the image frame fingerprint A1j and Aj of the J image frames F3j is ≥ the set threshold and the public display user unique codes B1 and B are consistent, it means that the image frame F3j has not been tampered with, and it can be determined that the video file V1 has not been tampered with; c2. When the similarity between the fingerprint A1j of any image frame in the J image frames F3j and Aj is less than the set threshold or the public display screen user unique codes B1 and B are inconsistent, it means that the image frame F3j has been tampered with or replaced, and it can be determined that the video file V1 has been tampered with or replaced.

7. A video watermark detection system based on edge pixel concealment, using the video watermark detection method based on edge pixel concealment as claimed in claim 6, characterized in that: include: The image frame extraction module D51 presets a video file V1 and a public display screen user unique code B1, and decodes the video file V1 into J image frames F3j, j=1, 2, ..., J; The image frame fingerprint calculation module D52 scales the resolution of the image frame F3j to , cutting off 8 pixels at the edge of the image frame F3j to obtain the image frame F4j, and calculating the image frame fingerprint A1j of the image frame F4j; The watermark information encoding module D53 concatenates the image frame fingerprint A1j of the image frame F4j and the unique code B1 of the user of the public display screen and encrypts them into a binary encrypted watermark information string w1j, wherein the length of the encrypted watermark information string is n1j bits; The differential watermark signal generating and adding module D54 converts the encrypted watermark information string w1j into a weak differential watermark signal w1j' with a black background, and adds the weak differential watermark signal w1j' with a black background to the edge of the image frame F3j to obtain an image frame F3j with the weak differential watermark signal w1j' with a black background added; The image frame fingerprint and user unique code reversible calculation module D55 decrypts and segments the image frame F4j with the weak differential watermark signal w1j' with a black background added, and obtains the image frame fingerprints Aj of J image frames F3j and a public display screen user unique code B; The module D56 for judging whether the video has been tampered with: comparing the image frame fingerprints A1j and Aj of the J image frames F3j, the public display screen user unique codes B1 and B, and judging whether the video file V1 has been replaced or tampered with.

8. A device for detecting video content on a public display screen, characterized in that: It includes a video player, a tampering detection device, and a public display screen. The tampering detection device is located between the video player and the public display screen. The tampering detection device includes: an input signal source, a main signal buffer device, a bypass signal detection device, and an output signal source, wherein: The input signal source is used to receive a signal from a video player or a video signal input; The main signal buffer device includes a delay buffer, which can delay the video signal input for several seconds before outputting it; The bypass signal detection device includes the video watermark detection system based on edge pixel concealment as claimed in claim 7, which can detect the video signal in the video player to determine whether the video has been replaced or tampered with; The output signal source outputs the video or outputs the preset picture to the public display screen, specifically: When the bypass signal detection device detects that the video has not been tampered with, the output signal source outputs the video to a public display screen; When the bypass signal detection device detects that the video has been replaced or tampered with, the output signal source outputs a preset picture to the public display screen.

9. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for video anti-tampering watermark based on edge pixel concealment as described in any one of claims 1 to 4 or the method for video watermark detection based on edge pixel concealment as described in claim 6 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the video anti-tampering watermark method based on edge pixel concealment as described in any one of claims 1 to 4 or the video watermark detection method based on edge pixel concealment as described in claim 6.

Citation Information

Patent Citations

  • Quickly generating method of user copy based on video GOP (Group of Picture)

    CN101976323A

  • Method and device for signing an encoded video sequence

    EP4192018A1