Watermark dynamic embedding method and device
By utilizing the device's screen refresh rate and camera frame rate to determine raster parameters, generating a physical key, and embedding a watermark, the problem of existing watermarking technologies being easily bypassed is solved, achieving high-security copyright protection for video content.
Patent Information
- Application Number
- CN202511240594.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-01
- Publication Date
- 2025-11-04
AI Technical Summary
Existing dynamic watermarking technology is easily bypassed by image processing, developer tools, and screen recording, making it unable to effectively prevent the piracy and illegal dissemination of video content.
Taking advantage of the unpredictable nature of screen aging, the target grating parameters are determined by the device's screen refresh rate, camera frame rate, and supported wavelength types. The target device screen is then driven to emit light signals through the grating. The camera captures the light signals to generate a physical key, which is then combined with the original video key to generate a watermark that is embedded in the video.
It improves the security of watermarked videos, making them more difficult to clone and tamper with, and enhances the copyright protection of video content.
Smart Images

Figure CN120897096A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to a watermark dynamic embedding method and device. BACKGROUND
[0002] Digital watermarking is an effective method to realize copyright protection, has become a hot spot in the field of multimedia information security research, and is an important branch of information hiding technology research. It proves the ownership of the data by embedding secret information, watermark, in the original data. The embedded watermark can be a text, an identifier, a serial number, etc. The watermark is usually invisible or imperceptible, and it is closely combined with the original data (such as image, audio, video data, etc.) and hidden therein, becoming an inseparable part of the source data.
[0003] The current mainstream dynamic watermarking technology includes lightweight watermarking based on Canvas, DOM monitoring and tamper-proofing, enhanced security watermarking, and cross-session persistent watermarking schemes, but these schemes in the prior art have security defects, which can be bypassed by image processing, developer tools, screen recording and other means, so that they cannot effectively prevent video content piracy and illegal dissemination. SUMMARY
[0004] Therefore, the present application provides a watermark dynamic embedding method and device, which utilizes the screen emission grating to emit light signals containing device characteristics based on the unpredictable characteristics of screen aging, generates a physical key after capturing the light signals, and combines the physical key and the original video key to generate a watermark embedded in the original video, effectively improving the security of the watermark video.
[0005] The first aspect of the present application provides a watermark dynamic embedding method applied to an authentication center, which comprises:
[0006] receiving a physical key acquisition request of a target device sent by a gateway;
[0007] acquiring basic information of the target device; wherein the basic information includes screen refresh rate, camera frame rate and wavelength type supported by the device;
[0008] determining target grating parameters according to the screen refresh rate, the camera frame rate and the wavelength type supported by the device, and driving the target device screen emission grating to emit light signals based on the target grating parameters;
[0009] capturing image information of the light signals by using the camera, and generating a physical key of the target device according to the image information, and feeding back the physical key of the target device to the gateway.
[0010] Optionally, the target grating parameters include a grating period and a wavelength mode, and the determining the target grating parameters according to the screen refresh rate, the camera frame rate and the wavelength type supported by the device comprises:
[0011] determining the grating period according to the screen refresh rate and the camera frame rate;
[0012] if the wavelength type supported by the device is to support infrared light emission, determining the wavelength mode to be emitting alternating infrared light and visible light, and an interval of emitting the infrared light and the visible light is the grating period;
[0013] if the wavelength type supported by the device is not to support infrared light emission, determining the wavelength mode to be emitting visible light, and an interval of emitting every two segments of visible light is the grating period.
[0014] Optionally, the generating the physical key of the target device according to the image information comprises:
[0015] extracting RGB channel data in the image data;
[0016] for each pixel in the RGB channel data, determining a target value of the pixel according to a luminance difference value between the pixel and a previous pixel of the pixel;
[0017] generating visible light waveband feature data according to the target values of all the pixels;
[0018] performing windowed Fourier transform on infrared light data to obtain an infrared light feature spectrum;
[0019] performing feature quantization on the visible light waveband feature data and the infrared light feature spectrum to obtain the physical key of the target device.
[0020] Optionally, after the image information of the light signal is captured by the camera and the physical key of the target device is generated according to the image information, the method further comprises:
[0021] performing hash calculation on the physical key of the target device to obtain a hash value corresponding to the physical key;
[0022] storing the hash value corresponding to the physical key into a blockchain, and the blockchain performs whole-process notarization on the hash value corresponding to the physical key after receiving the hash value.
[0023] The second aspect of the present application provides a watermark dynamic embedding method applied to a gateway, and the watermark dynamic embedding method comprises:
[0024] sending a physical key acquisition request of a target device to an authentication center;
[0025] receiving the physical key of the target device fed back by the authentication center;
[0026] generating a target watermark according to the physical key of the target device and the original video key;
[0027] embedding the target watermark into the original video in a raster form to obtain a watermark video.
[0028] Optionally, the generating of the target watermark according to the physical key of the target device and the original video key comprises:
[0029] chaotically diffusing the physical key of the target device and the original video key to obtain a two-dimensional diffusion matrix;
[0030] scrambling the two-dimensional diffusion matrix to obtain a scrambled chaotic matrix;
[0031] binding the scrambled chaotic matrix with features of the original image to obtain the target watermark.
[0032] Optionally, the watermark dynamic embedding method further comprises:
[0033] superimposing user information and a timestamp onto the original video in a semi-transparent text form.
[0034] Optionally, the embedding of the target watermark into the original video in a raster form to obtain a watermark video comprises:
[0035] encoding the target watermark into a binary sequence;
[0036] performing duty cycle modulation according to the binary sequence to obtain duty cycle information;
[0037] generating a raster pattern according to the duty cycle information, a timestamp of an original video frame and the target watermark;
[0038] superimposing the raster pattern with an infrared light channel of the original video to obtain the watermark video.
[0039] A third aspect of the present application provides a watermark dynamic embedding device applied to an authentication center, the watermark dynamic embedding device comprising:
[0040] a first receiving unit configured to receive a physical key acquisition request of a target device sent by a gateway;
[0041] an acquisition unit configured to acquire basic information of the target device, wherein the basic information comprises a screen refresh rate, a camera frame rate and a wavelength type supported by the device;
[0042] determining unit, configured to determine target grating parameters according to the screen refresh rate, the camera frame rate, and wavelength types supported by the device;
[0043] a driving unit, configured to drive a target device screen to emit a grating emission light signal based on the target grating parameters;
[0044] a physical key generating unit, configured to capture image information of the light signal by using the camera, and generate a physical key of the target device according to the image information;
[0045] a feedback unit, configured to feed back the physical key of the target device to the gateway.
[0046] Optionally, the target grating parameters include a grating period and a wavelength mode, and the determining unit includes:
[0047] a grating period determining unit, configured to determine the grating period according to the screen refresh rate and the camera frame rate;
[0048] a wavelength mode determining unit, configured to determine, if the wavelength types supported by the device are infrared light emission, that the wavelength mode is emission of alternating infrared light and visible light; wherein an interval of emission of the infrared light and the visible light is the grating period;
[0049] a wavelength mode determining unit, configured to determine, if the wavelength types supported by the device are not infrared light emission, that the wavelength mode is emission of visible light; wherein an interval of emission of every two pieces of visible light is the grating period.
[0050] Optionally, the physical key generating unit includes:
[0051] an extracting unit, configured to extract RGB channel data in the image data;
[0052] a target value determining unit, configured to, for each pixel in the RGB channel data, determine a target value of the pixel according to a luminance difference value between the pixel and a previous pixel of the pixel;
[0053] a target image generating unit, configured to generate visible light waveband feature data according to the target values of all the pixels;
[0054] a windowed Fourier transform unit, configured to perform windowed Fourier transform on the infrared light data to obtain an infrared light feature spectrum;
[0055] a feature quantization unit, configured to perform feature quantization on the visible light waveband feature data and the infrared light feature spectrum to obtain the physical key of the target device.
[0056] Optionally, the watermark dynamic embedding device further includes:
[0057] a hash calculation unit, configured to perform hash calculation on the physical key of the target device to obtain a hash value corresponding to the physical key;
[0058] a storage unit, configured to store the hash value corresponding to the physical key into a block chain; wherein the block chain performs whole-process evidence preservation on the hash value corresponding to the physical key after receiving the hash value.
[0059] The fourth aspect of the present application provides a watermark dynamic embedding device applied to a gateway, the watermark dynamic embedding device comprising:
[0060] a sending unit, configured to send a physical key acquisition request of a target device to an authentication center;
[0061] a second receiving unit, configured to receive a physical key of a target device fed back by the authentication center;
[0062] a watermark generation unit, configured to generate a target watermark according to the physical key of the target device and an original video key;
[0063] an embedding unit, configured to embed the target watermark into an original video in a raster form to obtain a watermark video.
[0064] Optionally, the watermark generation unit comprises:
[0065] a chaotic diffusion unit, configured to perform chaotic diffusion on the physical key of the target device and the original video key to obtain a two-dimensional diffusion matrix;
[0066] a scrambling unit, configured to scramble the two-dimensional diffusion matrix to obtain a scrambled chaotic matrix;
[0067] a binding unit, configured to bind the scrambled chaotic matrix and a feature of an original image to obtain the target watermark.
[0068] Optionally, the embedding unit comprises:
[0069] an encoding unit, configured to encode the target watermark into a binary sequence;
[0070] a duty cycle modulation unit, configured to perform duty cycle modulation according to the binary sequence to obtain duty cycle information;
[0071] a raster pattern generation unit, configured to generate a raster pattern according to the duty cycle information, a timestamp of an original video frame and the target watermark;
[0072] a second superimposition unit, configured to superimpose the raster pattern and an infrared light channel of the original video to obtain the watermark video.
[0073] From the above scheme, the application provides a watermark dynamic embedding method and device, target grating parameters are determined through the screen refresh rate of the equipment, the camera frame rate and the wavelength type supported by the equipment, based on the characteristics that screen aging cannot be predicted, the target grating parameter is used to drive the target equipment screen to emit grating emission light signals, the camera is used to capture the light signals to generate a physical key, finally, the physical key and the original video key are combined to generate a watermark embedded in the original video, and a watermark video is obtained, so that the security of the watermark video is effectively improved. BRIEF DESCRIPTION OF DRAWINGS
[0074] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of the provided drawings.
[0075] Figure 1 A specific flowchart of a watermark dynamic embedding method provided by the embodiment of the present application is provided.
[0076] Figure 2 A flowchart of a method for generating a physical key of a target equipment according to image information provided by another embodiment of the present application is provided.
[0077] Figure 3 A flowchart of a method for generating a target watermark according to the physical key of the target equipment and the original video key provided by another embodiment of the present application is provided.
[0078] Figure 4 A flowchart of a method for embedding a target watermark in a grating form in an original video to obtain a watermark video provided by another embodiment of the present application is provided.
[0079] Figure 5 A flowchart of a watermark dynamic embedding method provided by another embodiment of the present application is provided.
[0080] Figure 6 A schematic diagram of a watermark dynamic embedding device (authentication center) provided by another embodiment of the present application is provided.
[0081] Figure 7 A schematic diagram of a watermark dynamic embedding device (gateway) provided by another embodiment of the present application is provided.
[0082] Figure 8 A schematic diagram of an electronic equipment for implementing a watermark dynamic embedding method provided by another embodiment of the present application is provided. DETAILED DESCRIPTION
[0083] Clearly, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by a person of ordinary skill in the art without creative labor fall within the protection scope of the present application.
[0084] The term "comprising" and variations thereof as used herein are open-ended, and mean "including but not limited to". The term "based on" means "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Related definitions are given throughout the description.
[0085] It should be noted that the information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0086] It should be noted that the "first", "second", and the like mentioned in the present application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0087] It should be noted that the modification of "one" or "multiple" in the present application is illustrative and not limiting, and those skilled in the art should understand that unless otherwise explicitly indicated in the context, it should be understood as "one or more".
[0088] The embodiment of the present application provides a watermark dynamic embedding method, as shown in Figure 1 The specific steps include the following steps:
[0089] S101, the gateway sends a physical key acquisition request of the target device to the authentication center.
[0090] The target device can be a smart phone, a tablet computer, a notebook computer, etc., which is not limited here.
[0091] S102, the authentication center receives the physical key acquisition request of the target device sent by the gateway.
[0092] In the specific implementation process of the present application, the communication protocol when the gateway communicates with the authentication center can be but is not limited to HTTPS+JSON Web Token encryption, which is not limited here.
[0093] S103, the authentication center obtains the basic information of the target device.
[0094] The basic information includes a screen refresh rate, a camera frame rate, and a wavelength type supported by the device.
[0095] In the practical application of the present application, the basic information of the device can be collected through, but not limited to, a browser and a special App, which is not limited here.
[0096] Specifically, the GPU model can be obtained through, but not limited to, a WebGL API (WEBGL_debug_renderer_info), but attention should be paid to privacy restrictions (user authorization is required). The screen resolution can be obtained through, but not limited to, window.screen.width and window.screen.height. The camera parameters can be obtained through, but not limited to, navigator.mediaDevices.enumerateDevices(), and then the resolution, frame rate, and whether infrared light is supported can be obtained using MediaTrackSettings, which is not limited here.
[0097] S104, the authentication center determines target grating parameters according to the screen refresh rate, the camera frame rate, and the wavelength type supported by the device, and drives the target device screen to emit a grating emission light signal based on the target grating parameters.
[0098] The grating parameters include, but are not limited to, a grating period and a wavelength mode.
[0099] Specifically, taking an OLED screen as an example, the present application utilizes the pixel-level light control characteristics of the OLED screen to alternately display infrared and green grating in a specific area. The infrared light is emitted by the IR sub-pixel of the screen (supported by some high-end mobile phone screens) or utilizes the natural light emission of the OLED material in the near infrared. The IR sub-pixel of the screen specifically refers to an infrared emitter.
[0100] In the practical application of the present application, the grating period can be determined according to the screen refresh rate and the camera frame rate. If the wavelength type supported by the device is to support infrared light emission, the wavelength mode is determined to emit alternating infrared light and visible light. The interval between the emission of infrared light and visible light is the grating period. If the wavelength type supported by the device is not to support infrared light emission, the wavelength mode is determined to emit visible light. The interval between the emission of every two visible lights is the grating period.
[0101] It can be understood that the safety of the wavelength mode emitting visible light is not as good as that of the wavelength mode emitting alternating infrared light and visible light.
[0102] Specifically, the grating period T is dynamically adjusted according to the screen refresh rate and the camera frame rate. For example, if the screen refresh rate is 60Hz and the camera frame rate is 30fps, T should be set to an integer multiple of the camera frame rate (e.g. 30fps corresponds to 33.3ms / frame, T can be 100ms, i.e. 3 frames per period).
[0103] It should be noted that each grating period should last at least 1 frame (e.g. 60Hz screen, 16.7ms per frame). Therefore, the alternate emission interval cannot be less than the time of one frame. And the alternate emission interval should also be greater than the exposure time of the camera to ensure that the complete grating period can be captured.
[0104] In the practical application of the present application, the determination of the target grating parameters can be realized by the following algorithm:
[0105] function generateGratingParams(deviceInfo){
[0106] / / base period (unit: ms)
[0107] let basePeriod =100; / / default 100ms
[0108] if(deviceInfo.screenRefreshRate >=120){
[0109] basePeriod=50; / / higher refresh rate screen uses shorter period
[0110] }
[0111] / / wavelength pattern: if the screen supports infrared emission, use dual-band alternation; otherwise only visible light
[0112] let pattern=deviceInfo.supportsIREmission?
[0113] ['IR','Visible']:['Visible','Visible']; / / note: visible light mode is less secure
[0114] return{
[0115] period:basePeriod, / / unit: ms
[0116] pattern:pattern
[0117] };
[0118] }
[0119] An example of the finally generated target grating parameter can be as follows:
[0120] {period: 5, pattern: ['IR', 'Visible']} (unit: ms).
[0121] In the practical application of the present application, the emitted infrared light can be 850 nm, and the visible light can be 550 nm, which is not limited here. The 850 nm infrared light is in the near-infrared light band (NIR), which is invisible to the human eye, but most mobile phone cameras can sensitively capture it (because the photosensitive range of the camera sensor is usually 400-1000 nm). In addition, 850 nm is a common wavelength in LED technology and is easy to implement. The 550 nm visible light is in the green light band (555 nm peak) most sensitive to the human eye, and can also be well captured by the camera. Green light is chosen because it has a high signal-to-noise ratio in the RGB channel.
[0122] S105, the authentication center captures image information of the light signal by the camera, generates a physical key of the target device according to the image information, and feeds back the physical key of the target device to the gateway.
[0123] The specific way of capturing image information of the light signal by the camera in the present application is that the user aims the camera at his own screen (selfie mode) or the screen of another device (the user needs to be guided to keep stable). The camera needs to remove or weaken the infrared cut filter (IR Cut Filter) to capture infrared light. The "night vision mode" of some mobile phones will automatically remove the IR Cut. The camera is controlled by software to set appropriate exposure time (matching the grating period) and white balance (fixed value, avoiding automatic adjustment of interference signals).
[0124] It should be emphasized that since the aging degree of each pixel of the screen is different, there will be a deviation when the light signal is emitted, and the aging degree of the pixels of the device screen cannot be predicted, and the aging degree of each pixel is not necessarily the same. Therefore, the physical key generated based on the image information of the light signal captured by the camera in the present application has high security and is not easy to be physically cloned.
[0125] Optionally, in the specific implementation process of the present application, the implementation manner of generating the physical key of the target device according to the image information includes: Figure 2 as shown, comprising:
[0126] S201, extracting RGB channel data in the image data.
[0127] S202, for each pixel in the RGB channel data, determining a target value of the pixel according to a luminance difference value between the pixel and a previous pixel of the pixel.
[0128] Wherein, the target value is 255 or 0, 255 represents pure white, and 0 represents pure black.
[0129] Specifically, a luminance difference threshold value can be set in advance, when the luminance difference between a pixel and the previous pixel of the pixel is greater than the luminance difference threshold value, the pixel is set to pure white, otherwise it is set to pure black.
[0130] S203, generating visible light band feature data according to the target value of all pixels.
[0131] In the practical application process of the present application, the visible light band feature data can be generated by, but not limited to, the following algorithm:
[0132] / / C++ WebAssembly module (visible.cc)
[0133] #include<emscripten.h>
[0134] EMSCRIPTEN_KEEPALIVE
[0135] void extractVisible(uint8_t*input,int width,int height,uint8_t*output){
[0136] for(int y=0;y<height;y++){
[0137] for(int x=0;x<width;x++){
[0138] int idx=(y*width+x)*4;
[0139] / / Separate RGB channels (skip Alpha)
[0140] output[idx]=input[idx]; / / R
[0141] output[idx+1]=input[idx+1]; / / G
[0142] output[idx+2]=input[idx+2]; / / B
[0143] / / Aging feature enhancement: edge detection
[0144] if(x>0&&y >0){
[0145] int diff=abs(input[idx]-input[idx-4]);
[0146] output[idx]=diff>30?255:0; / / High contrast aging boundary
[0147] }
[0148] }
[0149] }
[0150] }
[0151] S204. Perform a windowed Fourier transform on the infrared light data to obtain the infrared light feature spectrum.
[0152] The formula for the windowed Fourier transform is as follows:
[0153] ;in, X[k] represents the total number of frequency subbands after the Fourier transform (i.e., the number of frequency points), and X[k] represents the complex Fourier coefficients of the k-th frequency point. |X[k]| represents the amplitude (modulus) of the k-th frequency point. Let be the amplitude standard deviation of the k-th subband within the time window, where a subband refers to a set of data consisting of amplitude values of the same frequency point k in different time windows.
[0154] In this invention, the physical meaning of the above parameters is as follows:
[0155] X[k] represents the FFT coefficient, which is the complex spectral value of the infrared region ROI (100×100 pixels) on the screen at a specific modulation frequency (such as 10Hz); |X[k]| represents the amplitude spectrum, which is the signal strength at the target modulation frequency k; The standard deviation of the subband represents the amplitude fluctuation of frequency point k within the time window T; N represents the number of subbands, i.e., the number of effective frequency bands participating in feature fusion.
[0156] Specifically, the method for extracting infrared data may include, but is not limited to, using the extractROI() function to extract a fixed region (a 100×100 pixel region starting at 50×50) from the first frame image. This region is preset as the sensitive area of the infrared modulation signal. Then, the FFT class is used to perform a fast Fourier transform on the ROI region of each frame. Finally, by performing feature extraction for the preset modulation frequency, the infrared light feature map is obtained.
[0157] The present invention can be implemented using, but is not limited to, the following algorithms:
[0158] / / The main thread calls WebWorker to avoid blocking.
[0159] const irWorker=new Worker('irProcessor.js');
[0160] irWorker.onmessage = (e) => {
[0161] const { amplitudeMap, phaseMap} = e.data;
[0162] generateKp(amplitudeMap); / / generate physical key
[0163] };
[0164] / / irProcessor.js
[0165] self.onmessage = async (e) => {
[0166] const frames = e.data; / / 30 consecutive frames of image data
[0167] / / 1. Select ROI region (infrared modulation area)
[0168] const roi = extractROI(frames[0], { x: 50, y: 50, w: 100, h: 100});
[0169] / / 2. Time domain to frequency domain conversion (FFT)
[0170] const fft = new FFT(roi.width, roi.height);
[0171] const spectra = [];
[0172] frames.forEach(frame => {
[0173] const gray = grayscale(roi); / / convert to grayscale
[0174] fft.transform(gray);
[0175] spectra.push(fft.getAmplitude()); / / take amplitude spectrum
[0176] });
[0177] / / 3. Extract 10Hz feature point (assuming modulation frequency = 10Hz)
[0178] const baseFreq = 10 * (roi.width * roi.height / 60);
[0179] const ampMap=new Float32Array(roi.width*roi.height);
[0180] for(let i=0;i <ampMap.length;i++){
[0181] const freqData=spectra.map(spec=>spec[i]);
[0182] / / Bandpass filter (8-12Hz)
[0183] const bandPass=bandpassFilter(freqData,8,12,60);
[0184] ampMap[i] = bandPass[0]; / / Amplitude value at 10Hz
[0185] }
[0186] self.postMessage({amplitudeMap:ampMap});
[0187] };
[0188] S205. Perform feature quantization on the visible light band feature data and infrared light feature spectrum to obtain the physical key of the target device.
[0189] In the specific implementation of this invention, the visible light band feature data and infrared light feature spectrum can be quantized by deep model analysis, but not limited to, to obtain the physical key of the target device. This is not limited here.
[0190] Optionally, in another embodiment of the present invention, after generating the physical key of the target device, a hash calculation can be performed on the physical key of the target device to obtain the hash value corresponding to the physical key; then, the hash value corresponding to the physical key is stored in the blockchain.
[0191] In this process, after receiving the hash value corresponding to the physical key, the blockchain performs full-process notarization of the hash value corresponding to the physical key.
[0192] S106. The gateway receives the physical key of the target device from the authentication center.
[0193] S107. The gateway generates a target watermark based on the target device's physical key and the original video key.
[0194] The original video is an original media file without protection processing, and is not limited herein.
[0195] In the specific implementation process of the application, the original video key is used as a digital key, and needs to be prepared in advance through a zero-knowledge proof protocol.
[0196] In the specific implementation process of the application, the target watermark WM can be generated by the following formula:
[0197] WM=α⋅(K p ⊕K d )+(1−α⋅S)⋅Frame;
[0198] K p is a physical key; K d is a digital key generated by a traditional cryptography method; K p ⊕K d indicates that the physical key and the digital key are bound to form a composite key matrix; alpha is a global intensity factor (scalar, controls the intensity of the entire watermark); S: visual saliency map is the same size as the original video (image), and the value is in [0, 1]); Frame is the original video (image).
[0199] In the specific implementation process of the application, the original video can also be preprocessed and enhanced, which is not limited herein.
[0200] Optionally, in another embodiment of the application, an embodiment of step S107 includes, as shown in Figure 3 :
[0201] S301, chaotically diffusing the physical key of the target device and the original video key to obtain a two-dimensional diffusion matrix.
[0202] By chaotically diffusing the physical key of the target device and the original video key, the physical key of the target device and the original video key are nonlinearly bound, so as to realize the avalanche effect, that is, a single-bit change causes a global dramatic change.
[0203] In the specific implementation process of the application, the chaotic diffusion can be realized by using the Logistic chaotic mapping mode, and the formula can be as follows:
[0204] X n+1 =μ*X n *(1−X n )(3.8<μ≤4);
[0205] X nchaos state value of current iteration, ranging between (0, 1), which serves as the input state of the chaotic system and is updated each iteration. It is converted from the first 8 bytes of the physical key K_p (implementation: take the first 8 bytes of K_p as a 32-bit integer, then divide by 0xFFFFFFFF (i.e. 2^32-1) to normalize to the [0, 1] interval.
[0206] μ is the control parameter of the chaotic system, which determines the behavior of the system. Its value range: 3.8 < μ ≤ 4, at this time the system is in a chaotic state, which is extremely sensitive to initial conditions. Recommended value: 3.99, to ensure chaos while avoiding fixed points.
[0207] X n+1 is the next chaotic state value after iteration. It is used to generate a chaotic sequence and serves as the input for the next iteration.
[0208] In the implementation process of the present application, the implementation step (python) can be as follows:
[0209] def chaotic_diffusion(K_p, K_d):
[0210] # Initialize the chaotic system (K_p as the initial value)
[0211] x = float(int(K_p[:8], 16)) / 0xFFFFFFFF
[0212] μ = 3.99 # Chaos parameter
[0213] # Iteratively generate a chaotic sequence
[0214] chaotic_seq = []
[0215] for i in range(len(K_d) * 8): # Cover all bits of K_d
[0216] x = μ * x * (1 - x)
[0217] chaotic_seq.append(int(x * 256) % 2 # Generate a binary stream
[0218] # Bit diffusion
[0219] diffused = []
[0220] for i, bit in enumerate(K_d.bits):
[0221] # Key: XOR with chaotic sequence and cyclic shift
[0222] new_bit=(bit^chaotic_seq[i])^chaotic_seq[(i+7)%len(chaotic_seq)]
[0223] diffused.append(new_bit)
[0224] return diffused_matrix # Outputs the two-dimensional diffusion matrix;
[0225] S302. The two-dimensional diffusion matrix is scrambled to obtain the scrambled chaotic matrix.
[0226] The scrambling methods include, but are not limited to, Arnold scrambling. No specific method is specified here.
[0227] By scrambling the two-dimensional diffusion matrix, the spatial correlation of the watermark is destroyed, making it appear noisy, increasing the difficulty of analysis for attackers, and achieving visual invisibility.
[0228] Where (x, y) are the original coordinates, i.e., the position coordinates of the pixel to be scrambled in the original image. The value range is [0, N−1]∩Z, where Z is a set of integers. The image is regarded as a two-dimensional matrix with coordinates starting from 0 to N-1. This is a linear transformation matrix used to map the original coordinates to new coordinates. It achieves the linear transformation of coordinates through matrix multiplication, thereby scrambling the pixel positions.
[0229] N is the image size, that is, the side length of a square image (in pixels). It is usually required that N is a positive integer. In order to achieve the scrambling effect and periodicity, the value of N will affect the scrambling period (that is, how many times the image will be restored to its original state after scrambling).
[0230] It should be noted that Arnold scrambling is periodic, meaning that the original image will be restored after T iterations. T is related to N, and the period T is different for different N (for example, when N=256, the period T=192 times).
[0231] mod N is a modulo operation that takes the value after coordinate transformation modulo N, ensuring that the new coordinates remain within the range of [0, N-1]. This restricts the coordinates within the image boundaries, achieving cyclic shifting.
[0232] S303. Bind the scrambled chaotic matrix to the features of the original image to obtain the target watermark.
[0233] Specifically, the target watermark WM can be obtained using the following formula. fina ;
[0234] WMfinal =WM scrambled ⊕SaliencyMap;
[0235] Wherein, WM scrambled is a chaotic matrix after permutation, the structure is N*N binary matrix (0 / 1), the characteristics are space position randomization, keeping 0 / 1 binary distribution, and entropy value close to 8.0 (maximum randomness); SaliencyMap is a binary visual saliency map; ⊕ is an exclusive or operator.
[0236] In the practical application process of the application, the improved GBVS algorithm can be used to calculate the visual saliency map S, and the watermark transparency is adjusted: opacity=0.3*(1-S), to ensure that the watermark is more obvious in the non-salient area.
[0237] Wherein, GBVS (Graph-Based Visual Saliency) is a kind of graph-based visual saliency algorithm. The application makes two improvements for the video watermarking scene: (1) time domain consistency enhancement: in the video sequence, the optical flow feature is added to avoid the interframe jitter of the salient area. (2) Edge sensitivity improvement: use Canny edge as an additional feature map to strengthen the saliency of the object contour area.
[0238] Specifically, the core algorithm of saliency adaptation is:
[0239] α(x,y)=1+e-λ(S(x,y)-τ)1·β;Wherein, S(x,y) is the saliency value (0~1) of the pixel point (x,y), which is usually obtained by a saliency detection algorithm (such as a deep learning-based model), and its function is that the higher the saliency of the area (such as a face, text), the more sensitive the human eye is to distortion, so the watermark strength needs to be reduced; on the contrary, stronger watermark can be embedded in low saliency areas (such as the background). λ is the slope factor (recommended 5.0, verified by experiments), the larger the λ value, the steeper the function near τ, that is, the more sensitive the response to saliency changes. The smaller the λ value, the smoother the function changes, and the more smooth the adaptive adjustment. τ is the saliency threshold (0.6, the optimal value of experience), when S(x,y)>τ, α tends to 0 (i.e. high saliency area almost does not embed watermark). When S(x,y)<τ, α tends to β (i.e. low saliency area with maximum strength embedding). β is the basic embedding strength (0.02), which controls the overall visibility of the watermark: the larger the β, the stronger the robustness but the higher the visibility, which is independent of the global intensity reference of the host image content.
[0240] S108, the gateway embeds the target watermark in the original video in the form of a raster, to obtain a watermark video.
[0241] Optionally, in another embodiment of the present application, one implementation of step S108 includes: Figure 4
[0242] S401, encode the target watermark into a binary sequence.
[0243] Wherein, the target watermark is a binary matrix, composed of 0 and 1.
[0244] Specifically, the target watermark can be encoded into a binary sequence in a repetition coding manner, but not limited to, to enhance robustness, which is not limited here.
[0245] For example: each bit is repeated 3 times to form a 384x128 matrix.
[0246] S402, duty cycle modulation according to the binary sequence, get duty cycle information.
[0247] Wherein, the duty cycle is the proportion of high level (infrared emission) in a period.
[0248] In the specific implementation process of the present application, bit 1 can be represented by high duty cycle (for example, 70% of the cycle time is high level), and bit 0 can be represented by low duty cycle (for example, 30% of the cycle time is high level).
[0249] S403, according to the duty cycle information, the timestamp of the original video frame and the target watermark to generate a raster pattern.
[0250] Specifically, the target watermark is mapped to the video frame by block, for example, each watermark bit corresponds to a 128x128 pixel block. According to the timestamp of the current original video frame and the duty cycle information, the vertical direction of the raster stripe is generated.
[0251] The following formula can be used to achieve:
[0252] For position (x, y), the infrared intensity is:
[0253] I_IR(x,y)=
[0254] I_max, if (x / P_x+t / P_t) mod 1 < duty_cycle
[0255] I_min, otherwise
[0256] Wherein, P_x is the raster space period (for example, 128 pixels), P_t is the raster time period (for example, 5ms), duty_cycle is the duty cycle (0.7 or 0.3), and t is the current timestamp.
[0257] S404, superimpose the raster pattern with the infrared channel of the original video to get the watermark video.
[0258] In which, by superimposing the grating pattern with the infrared channel of the original video, the infrared intensity of the watermark area is ensured not to be lower than the background.
[0259] In the specific implementation process of the present application, in order to avoid attention caused by infrared channel saturation, the maximum intensity of the watermark is controlled at about 85% of the original infrared background, which is not limited here.
[0260] In the specific implementation process of the present application, user information and time stamp can also be superimposed on the original video in the form of semi-transparent text, which is not limited here.
[0261] The specific implementation of superimposing user information and time stamp on the original video in the form of semi-transparent text can be to obtain a saliency map through saliency detection and binarization to obtain a "safe area" (non-salient area); then, randomly selecting a text position in the safe area to ensure readability and concealment; finally, dynamically adjusting the text color contrast according to the brightness of the current frame, which is not limited here.
[0262] In the specific implementation process of the present application, after generating the watermark video, adaptive bitrate streaming (HTTP Live Streaming, HLS) can be distributed to users through but not limited to content delivery network (Content Delivery Network, CDN), which is not limited here.
[0263] Based on the present application, there is also a corresponding pirated content detection scheme, which can be implemented by but not limited to the following technical solutions:
[0264] Since the video may contain visible light and infrared information at the time of acquisition, it is necessary to separate the two channels and separate the video into a visible light channel (RGB) and an infrared channel.
[0265] Specifically includes the following steps:
[0266] Step 1: Collect N consecutive frames (N is large enough, for example, 30 frames), calculate the average frame as the background frame (BackgroundFrame); for each frame, the infrared channel (IR Channel) can be obtained by the difference between the current frame and the background frame; since the infrared signal can be a positive and negative alternating modulated signal, the absolute difference value can be taken, or the difference value can be retained and the absolute value is taken as the infrared intensity.
[0267] Step 2: Separate the visible light channel: Use the background frame as the estimate of the visible light channel (since the background frame is an average frame, it can be considered to not contain the infrared modulated signal). Alternatively, if the infrared channel has already been obtained, the visible light channel can be obtained by subtracting the infrared channel from the current frame, but note that the value of the infrared channel can be negative (the modulated signal has positive and negative values), so the sign needs to be considered. However, in practical applications, the background frame is usually used as the estimate of the visible light channel.
[0268] Step 3: Perform morphological operations on the separated infrared channel to eliminate noise and enhance the signal: First, perform threshold processing to binarize the difference image (or retain the grayscale, but perform threshold filtering to only retain areas with significant changes). Then perform morphological opening operation to eliminate small noise points. Then perform closing operation to fill small holes. The structure element can be selected as a circle or a rectangle, and the size is determined according to the noise and signal size. The image processed in this way is the enhanced infrared channel image.
[0269] After separating the infrared channel, the device ID code contained in it needs to be parsed. The device ID is encoded by duty cycle modulation signal. This means that in the infrared channel, the signal exists in the form of a periodic raster, and the duty cycle of each period is changed to represent binary information.
[0270] Step 1: Extract the time series signal: Since the modulated signal changes over time, it is necessary to extract the intensity value that changes over time at the same position (pixel or region) in the video sequence. Therefore, for each spatial position (or a certain region) in the video, a time series signal is extracted. To simplify, first locate the area containing the raster signal (usually located at the edge of the screen or a specific position). Obtain the signal area through template matching or fixed position, and obtain a one-dimensional time signal by averaging the intensity in the area. Let the signal area be ROI, then the time signal S(t) = (x, y) e ROI∑IR_t(x, y) / |ROI|; where IR_t is the infrared channel image of the t-th frame.
[0271] Step 2: Extract the fundamental frequency by FFT analysis: Perform FFT on the time signal S(t) to obtain the frequency spectrum. In the frequency spectrum, the fundamental frequency f_0 corresponds to the frequency of the modulated signal (i.e. f_0 = 1 / T, T is the period). Find the main peak (fundamental frequency) in the frequency spectrum, and calculate the period T = 1 / f0; the frame rate of the video is known (e.g. fps), so the frequency resolution is fps / N (N is the number of sampling points). The fundamental frequency can be found by finding the frequency with the largest amplitude (excluding the direct current component).
[0272] Step 3: Duty cycle decoding: In a period T, the signal behaves as a square wave (or pulse wave), and different duty cycles represent different bits. The specific steps are as follows: according to the period T, the time signal is divided into multiple periods. For each period, the length of the high level (signal intensity exceeding the threshold value) is calculated, and the duty cycle is calculated. According to the preset duty cycle encoding rule, the duty cycle is converted into binary bits.
[0273] For example: assuming that one period T corresponds to 10 frames of video (i.e. T=10 / fps). In each period, the number of frames with signal intensity exceeding the threshold value (e.g. 50% of the maximum value) is counted, denoted as n. The duty cycle is n / (T*fps)=n / 10. If the duty cycle >0.6, it is decoded as 1; otherwise, it is 0.
[0274] Step 4: Device ID reconstruction: The decoded binary bit stream is converted into a device ID according to the encoding rule (Manchester encoding).
[0275] Then, the copyright is verified through zero-knowledge proof (ZKP). The zero-knowledge proof (ZKP) method proves the authenticity of the copyright ownership to the verifier without revealing the core content of the pirate.
[0276] The main steps include the following:
[0277] Request proof stage: the verifier initiates a verification request to the pirate, requiring it to provide copyright proof;
[0278] Generate ZKP stage: the pirate generates a proof (such as based on the work feature hash or the creation process key) through a zero-knowledge proof algorithm to ensure that the work content is not disclosed;
[0279] Verification stage: the verifier verifies the validity of the proof through a mathematical protocol to determine whether the copyright claim is true.
[0280] In the specific implementation process of the present application, evidence can also be stored in the judicial chain. The hash value of the device ID can be submitted to the judicial chain, and the judicial chain returns a storage certificate TxID. When piracy occurs, the suspicious device DeviceID' and the pre-stored salt value SecretSalt' are extracted, the combined value is calculated through the Poseidon hash, and a verification request is initiated to the judicial chain. The judicial chain compares the original hash on the chain and returns a consistency verification result. This is not limited here.
[0281] For example: Figure 5As shown, a watermark dynamic embedding method and related application stage schematic diagram provided by the embodiment of the application, which includes device registration stage, content protection stage, piracy detection stage and traceability authentication stage, the specific implementation mode of each stage can refer to the corresponding part of the above embodiment, which will not be repeated here.
[0282] From the above scheme, the application provides a watermark dynamic embedding method, target grating parameters are determined through the screen refresh rate, camera frame rate and wavelength type supported by the device, based on the characteristics that screen aging cannot be predicted, the target device screen is driven to emit grating emission light signals based on the target grating parameters, the physical key is generated after the camera captures the light signals, finally, the watermark is embedded into the original video by combining the physical key and the original video key, and the watermark video is obtained, thereby effectively improving the security of the watermark video.
[0283] Another embodiment of the application provides a watermark dynamic embedding device applied to an authentication center, such as Figure 6 As shown, the watermark dynamic embedding device specifically includes:
[0284] The first receiving unit 601 is configured to receive the physical key acquisition request of the target device sent by the gateway.
[0285] The acquisition unit 602 is configured to acquire the basic information of the target device.
[0286] The basic information includes the screen refresh rate, the camera frame rate and the wavelength type supported by the device.
[0287] The determination unit 603 is configured to determine the target grating parameters according to the screen refresh rate, the camera frame rate and the wavelength type supported by the device.
[0288] Optionally, in another embodiment of the application, the target grating parameters include the grating period and the wavelength mode, and one embodiment of the determination unit 603 includes:
[0289] The grating period determination unit is configured to determine the grating period according to the screen refresh rate and the camera frame rate.
[0290] The wavelength mode determination unit is configured to determine that the wavelength mode is to emit alternating infrared light and visible light if the wavelength type supported by the device is to support infrared light emission.
[0291] The interval of emitting the infrared light and the visible light is the grating period.
[0292] The wavelength mode determination unit is configured to determine that the wavelength mode is to emit visible light if the wavelength type supported by the device is not to support infrared light emission.
[0293] The interval of emitting every two segments of visible light is the grating period.
[0294] The specific working process of the units disclosed in the above embodiments of the present application can be referred to the corresponding method embodiment contents, which will not be described here.
[0295] The driving unit 604 is configured to drive the target device screen to emit the grating emission light signal based on the target grating parameter.
[0296] The physical key generation unit 605 is configured to capture image information of the light signal by using the camera, and generate the physical key of the target device according to the image information.
[0297] Optionally, in another embodiment of the present application, one embodiment of the physical key generation unit 605 comprises:
[0298] The extraction unit is configured to extract the RGB channel data in the image data.
[0299] The target value determination unit is configured to determine the target value of each pixel in the RGB channel data according to the luminance difference between the pixel and the previous pixel.
[0300] The target image generation unit is configured to generate the visible light band feature data according to the target values of all the pixels.
[0301] The windowed Fourier transform unit is configured to perform windowed Fourier transform on the infrared light data to obtain the infrared light feature spectrum.
[0302] The feature quantization unit is configured to perform feature quantization on the visible light band feature data and the infrared light feature spectrum to obtain the physical key of the target device.
[0303] The specific working process of the units disclosed in the above embodiments of the present application can be referred to the corresponding method embodiment contents, which will not be described here. Figure 2
[0304] The feedback unit 606 is configured to feed back the physical key of the target device to the gateway.
[0305] The specific working process of the units disclosed in the above embodiments of the present application can be referred to the corresponding method embodiment contents, which will not be described here. Figure 1
[0306] Optionally, in another embodiment of the present application, one embodiment of the watermark dynamic embedding device further comprises:
[0307] The hash calculation unit is configured to perform hash calculation on the physical key of the target device to obtain the hash value corresponding to the physical key.
[0308] The storage unit is configured to store the hash value corresponding to the physical key into the blockchain.
[0309] The blockchain stores the hash value corresponding to the physical key in the whole process after receiving the hash value corresponding to the physical key.
[0310] The specific working process of the units disclosed in the above embodiments of the application can be referred to the corresponding method embodiment contents, which will not be described here again.
[0311] Another embodiment of the application provides a watermark dynamic embedding device applied to a gateway, as shown in the figure. Figure 7 The watermark dynamic embedding device specifically includes:
[0312] The sending unit 701 is configured to send a physical key acquisition request of the target device to the authentication center.
[0313] The second receiving unit 702 is configured to receive the physical key of the target device fed back by the authentication center.
[0314] The watermark generating unit 703 is configured to generate a target watermark according to the physical key of the target device and the original video key.
[0315] Optionally, in another embodiment of the application, one embodiment of the watermark generating unit 703 includes:
[0316] The chaotic diffusion unit is configured to perform chaotic diffusion on the physical key of the target device and the original video key to obtain a two-dimensional diffusion matrix.
[0317] The scrambling unit is configured to scramble the two-dimensional diffusion matrix to obtain a scrambled chaotic matrix.
[0318] The binding unit is configured to bind the scrambled chaotic matrix and the features of the original image to obtain the target watermark.
[0319] The specific working process of the units disclosed in the above embodiments of the application can be referred to the corresponding method embodiment contents, as shown in the figure, which will not be described here again. Figure 3
[0320] The embedding unit 704 is configured to embed the target watermark in the original video in a raster form to obtain a watermark video.
[0321] The specific working process of the units disclosed in the above embodiments of the application can be referred to the corresponding method embodiment contents, as shown in the figure, which will not be described here again. Figure 1
[0322] Optionally, in another embodiment of the application, one embodiment of the embedding unit 704 includes:
[0323] The encoding unit is configured to encode the target watermark into a binary sequence.
[0324] a duty cycle modulation unit configured to perform duty cycle modulation on the binary sequence to obtain duty cycle information.
[0325] a raster pattern generation unit configured to generate a raster pattern according to the duty cycle information, a timestamp of the original video frame and a target watermark.
[0326] a second superimposition unit configured to superimpose the raster pattern with an infrared light channel of the original video to obtain a watermark video.
[0327] The specific working process of the units disclosed in the above embodiments of the present application can be referred to the corresponding method embodiments, for example, as shown in the above method embodiments, and will not be described here again. Figure 4
[0328] As can be seen from the above scheme, the present application provides a watermark dynamic embedding device, which determines target raster parameters through the screen refresh rate of the equipment, the camera frame rate and the wavelength type supported by the equipment, and based on the characteristics that the screen aging cannot be predicted, uses the target raster parameters to drive the target equipment screen to emit raster emission light signals, uses the camera to capture the light signals to generate a physical key, and finally combines the physical key and the original video key to generate a watermark embedded in the original video to obtain a watermark video, thereby effectively improving the security of the watermark video.
[0329] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, non-limiting, exemplary types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Application-specific Integrated Circuits (ASICs), Application-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.
[0330] Another embodiment of the present application provides an electronic device, as shown in Figure 8 The electronic device comprises:
[0331] one or more processors 801.
[0332] a storage 802 having stored thereon one or more programs.
[0333] When the one or more programs are executed by the one or more processors 801, the one or more processors 801 implement the watermark dynamic embedding method as described in the above embodiments.
[0334] Another embodiment of the present application provides a computer storage medium having stored thereon a computer program, wherein the computer program is executed by a processor to implement the watermark dynamic embedding method as described in the above embodiments.
[0335] In the context of the present application, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more of: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0336] It is noted that the computer-readable medium described above in the present application can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. The computer-readable storage medium, for example, can be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, the computer-readable storage medium can be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, the computer-readable signal medium can include a computer-readable storage medium in a baseband or propagated as a carrier wave in a propagated signal, where the computer-readable program code can be loaded onto an instruction execution system, apparatus, or device. Such a propagated signal can take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium that is not a computer-readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including, but not limited to, wire, cable, RF, or any suitable combination thereof.
[0337] The computer-readable medium described above can be included in the electronic device described above; or can exist separately from the electronic device and be not assembled into the electronic device.
[0338] Another embodiment of the present application provides a computer program product, which, when executed, performs the watermark dynamic embedding method described above.
[0339] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present application. For example, embodiments of the present application include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program comprising program code for performing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, the above-described functions defined in the methods of embodiments of the present application are performed.
[0340] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
[0341] While the above discussion includes several specific implementation details, these should not be construed as limiting the scope of the application. Certain features described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable sub-combination.
[0342] The above description merely describes preferred embodiments of the present application and the principles of the technology involved. Those skilled in the art should understand that the scope of the present application is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by any combinations of the above technical features or equivalent features, without departing from the above inventive concept. For example, technical solutions formed by replacing the above features with technical features having similar functions, but not limited to, the present application.
Claims
1. A method for dynamically embedding watermarks, characterized in that, Applied to authentication centers, the watermark dynamic embedding method includes: Receive the physical key acquisition request for the target device sent by the gateway; Obtain basic information about the target device; wherein, the basic information includes: screen refresh rate, camera frame rate, and wavelength types supported by the device; The target grating parameters are determined based on the screen refresh rate, the camera frame rate, and the wavelength types supported by the device, and the target device screen emits light signals based on the target grating parameters. The camera captures image information of light signals, generates a physical key for the target device based on the image information, and feeds back the physical key of the target device to the gateway.
2. The watermark dynamic embedding method according to claim 1, characterized in that, The target grating parameters include grating period and wavelength mode. Determining the target grating parameters based on the screen refresh rate, the camera frame rate, and the wavelength types supported by the device includes: The raster period is determined based on the screen refresh rate and the camera frame rate; If the device supports infrared light emission, then the wavelength mode is determined to be the emission of alternating infrared and visible light; wherein the interval between the emission of infrared and visible light is the grating period. If the wavelength type supported by the device is not infrared light emission, then the wavelength mode is determined to be visible light emission; wherein, the interval between every two segments of visible light emission is the grating period.
3. The watermark dynamic embedding method according to claim 1, characterized in that, The step of generating the physical key for the target device based on the image information includes: Extract the RGB channel data from the image data; For each pixel in the RGB channel data, the target value of the pixel is determined based on the brightness difference between the pixel and the pixel preceding it. Based on the target values of all pixels, generate visible light band feature data; Perform a windowed Fourier transform on the infrared light data to obtain the infrared light feature spectrum; The visible light band feature data and infrared light feature spectrum are subjected to feature quantization to obtain the physical key of the target device.
4. The watermark dynamic embedding method according to claim 1, characterized in that, After capturing image information of light signals using a camera and generating the physical key of the target device based on the image information, the method further includes: Perform a hash calculation on the physical key of the target device to obtain the hash value corresponding to the physical key; The hash value corresponding to the physical key is stored in the blockchain; wherein, after receiving the hash value corresponding to the physical key, the blockchain performs full-process notarization of the hash value corresponding to the physical key.
5. A method for dynamically embedding watermarks, characterized in that, Applied to gateways, the dynamic watermark embedding method includes: Send a request to the certification authority to obtain the physical key of the target device; Receive the physical key of the target device fed back by the authentication center; Generate a target watermark based on the physical key and the original video key of the target device; The target watermark is embedded into the original video in the form of a raster to obtain a watermarked video.
6. The watermark dynamic embedding method according to claim 5, characterized in that, The step of generating a target watermark based on the physical key and the original video key of the target device includes: Chaotic diffusion is performed on the physical key and the original video key of the target device to obtain a two-dimensional diffusion matrix; The two-dimensional diffusion matrix is scrambled to obtain a scrambled chaotic matrix. The scrambled chaotic matrix is bound to the features of the original image to obtain the target watermark.
7. The watermark dynamic embedding method according to claim 5, characterized in that, Also includes: User information and timestamps are overlaid onto the original video as semi-transparent text.
8. The watermark dynamic embedding method according to claim 5, characterized in that, The step of embedding the target watermark into the original video in raster form to obtain the watermarked video includes: The target watermark is encoded into a binary sequence; Duty cycle information is obtained by performing duty cycle modulation on the binary sequence. Generate a raster pattern based on duty cycle information, timestamps of the original video frames, and target watermark; The grating pattern is superimposed on the infrared light channel of the original video to obtain a watermarked video.
9. A watermark dynamic embedding device, characterized in that, The watermark dynamic embedding device, applied in an authentication center, includes: The first receiving unit is used to receive the physical key acquisition request of the target device sent by the gateway; The acquisition unit is used to acquire basic information of the target device; wherein, the basic information includes: screen refresh rate, camera frame rate and wavelength types supported by the device; The determining unit is used to determine the target grating parameters based on the screen refresh rate, the camera frame rate, and the wavelength types supported by the device; The driving unit is used to drive the target device screen to emit light signals based on the target grating parameters; A physical key generation unit is used to capture image information of light signals using a camera and generate a physical key for the target device based on the image information. The feedback unit is used to feed back the physical key of the target device to the gateway.
10. A watermark dynamic embedding device, characterized in that, The watermark dynamic embedding device, applied to a gateway, includes: The sending unit is used to send a physical key acquisition request for the target device to the authentication center. The second receiving unit is used to receive the physical key of the target device fed back by the authentication center; A watermark generation unit is used to generate a target watermark based on the physical key and the original video key of the target device; An embedding unit is used to embed the target watermark into the original video in the form of a raster to obtain a watermarked video.