Video processing method, device, equipment and medium

By continuously extracting frames and dividing regions into conference videos, the watermark code is generated and updated, which solves the problem of easy destruction of watermarks and achieves the anti-attack and traceability of the video.

CN117939056BActive Publication Date: 2024-09-17北京富通亚讯网络信息技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410146267.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-02
Publication Date
2024-09-17
Estimated Expiration
2044-02-02

AI Technical Summary

Technical Problem

When the existing technology processes conference videos, watermarks are easily destroyed, making it difficult to extract conference-related information after the video is secretly photographed or cropped, and effective traceability cannot be achieved.

Method used

By continuously extracting frames from the video to be processed, dividing the multi-frame image into multiple areas, generating a coding sequence and setting watermark coding in each area, and updating the coding sequence based on the preset number of digits to ensure that it can still be extracted under cropping or frame extraction attacks. Complete watermark to achieve accurate traceability of the video.

Benefits of technology

It improves the anti-attack performance of video watermarks, ensuring that watermark encoding can still be effectively extracted under various attack situations, and achieving accurate traceability of conference videos.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117939056B
    Figure CN117939056B
Patent Text Reader

Abstract

The present application relates to the field of digital watermark technology, and in particular to a video processing method, device, equipment and medium. The method includes: continuously extracting frames from a video to be processed to obtain multiple frames of images with a time sequence, and dividing the multiple frames of images into multiple regions; obtaining a coding sequence; determining the first frame of the image from the multiple frames of images, and setting corresponding codes for each region in the first frame of the image in turn according to the coding sequence; updating the coding sequence based on a preset number of bits, and determining the next frame of the image, and executing the step of determining the watermark code until the watermark codes corresponding to all the remaining frames of the image are obtained; adding the watermark codes corresponding to the multiple frames of the image to the image of the corresponding frame, and integrating the multiple frames of the image containing the watermark code to obtain the processed video. The present application can extract the watermark code from the processed video, and can determine the conference information corresponding to the video according to the watermark code, so as to achieve accurate tracing of the video.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of digital watermark technology, and in particular to a video processing method, apparatus, device and medium. Background Art

[0002] Some of the content in the presentation video of the on-site meeting may involve security and confidentiality. If it is secretly filmed or recorded by participants, the content of the meeting may be leaked.

[0003] To address the situation of secretly filming or recording conference videos, relevant technologies extract frames from the video needed to be played at the meeting and add an entire watermark to the extracted image. The watermark contains relevant information about the meeting, so that the video played at the meeting contains the watermark. When a conference video appears on the Internet, relevant information about the meeting can be obtained by identifying the watermark of the video, so that staff can trace the node where the conference video was leaked through the relevant information and take relevant measures.

[0004] In some cases, criminals may extract frames or crop secretly filmed meeting videos. The resulting video can still be watched, but the watermark contained in the video will be destroyed, making it difficult to obtain valid meeting-related information. Summary of the Invention

[0005] In order to improve the anti-attack performance of video watermarks, the present application provides a video processing method, apparatus, device and medium.

[0006] In a first aspect, the present application provides a video processing method, which adopts the following technical solutions:

[0007] A video processing method, comprising:

[0008] Continuously extracting frames from the video to be processed to obtain multiple frames of images with a time sequence, and dividing the multiple frames of images into multiple regions, wherein the video to be processed is the content required to be played at the conference;

[0009] Obtaining a coding sequence, the coding sequence including a start identification code and a valid information coding sequence, the valid information coding sequence corresponding to conference information;

[0010] Determine a first frame of image from the multiple frames of image according to the time sequence;

[0011] Setting corresponding codes for each region in the first frame of image in turn according to the coding sequence to obtain a first watermark code corresponding to the first frame of image;

[0012] updating the coding sequence based on a preset number of bits, determining a next frame of image from the multiple frames of image according to the time sequence, and performing the step of determining a watermark code according to the updated coding sequence until watermark codes corresponding to all remaining frames of image are obtained, wherein the preset number of bits is the number of bits of each code shifted during the process of updating the coding sequence;

[0013] The watermark codes corresponding to the multiple frames of images are added to the images of the corresponding frames, and the multiple frames of images containing the watermark codes are integrated to obtain a processed video.

[0014] By adopting the above technical solution, a multi-frame image with a time sequence of the video to be processed is obtained, and the multi-frame image is divided into multiple regions respectively; the first frame image is determined from the multi-frame image, and the corresponding code is set for each region in the first frame image in turn. Setting the code for each region can still extract the code from other regions under cropping attacks; the code sequence is updated based on the preset number of bits, and the next frame image is determined, and the step of determining the watermark code is executed until the watermark codes corresponding to all the remaining frame images are obtained. The watermarks corresponding to the multi-frame images are different, and the complete watermark can still be extracted under attacks such as cropping and frame extraction; the watermark codes corresponding to the multi-frame images are added to the images of the corresponding frames, and the multi-frame images containing the watermark codes are integrated to obtain the processed video. The processed video contains a watermark. Extracting the video watermark can obtain the watermark code contained therein. According to the watermark code, the conference information corresponding to the video can be determined, thereby realizing accurate tracing of the video.

[0015] In a preferred example, the present application may be further configured as follows: updating the coding sequence based on a preset number of bits includes:

[0016] Moving the first bit of the coding sequence to the last bit of the coding sequence to obtain a first coding sequence;

[0017] The first code in the first code sequence is moved to the last code in the first code sequence to obtain a second code sequence, and so on, until the number of moves reaches the preset number of bits, to obtain an updated code sequence.

[0018] By adopting the above technical solution, each bit of the coding sequence is moved according to the preset bit number to obtain an updated coding sequence, thereby avoiding multiple frames of images using the same coding sequence and improving the anti-attack performance of the watermark coding.

[0019] In a preferred example, the present application may be further configured to: obtain a coding sequence, including:

[0020] Obtaining conference information, including the terminal ID that plays the video to be processed, the conference time, the conference address, and the attendees;

[0021] According to the conference information, a valid information coding sequence corresponding to the conference information is generated,

[0022] A coding sequence is generated according to the effective information coding sequence, where the number of bits of the coding sequence is not greater than the number of regions corresponding to each frame of image.

[0023] By adopting the above technical solution, a coding sequence is generated according to the conference information corresponding to the video to be processed, and a valid information coding sequence can be obtained according to the watermark code extracted from the video, thereby determining the conference information corresponding to the video and accurately tracing the video.

[0024] In a preferred example, the present application can be further configured as follows: setting corresponding codes for each region in the first frame image in sequence according to the coding sequence to obtain a first watermark code corresponding to the first frame image, including:

[0025] Setting a first bit of the coding sequence for a first region in the first frame of image, setting a second bit of the coding sequence for a second region in the first frame of image, and so on, until a first number of regions in the first frame of image are all set with a single bit of coding, where the first number is the number of coding bits in the coding sequence;

[0026] The first bit of the coding sequence is set for the next region of the last coding-set region in the first frame image, and so on, until a first bit of coding is set for each region in the first frame image.

[0027] By adopting the above technical solution, a corresponding code is set for each area in the first frame image according to the coding sequence. Since the number of coding bits of the coding sequence is not greater than the number of areas corresponding to the image, the coding sequence can be displayed cyclically in multiple areas corresponding to the image, making the watermark code difficult to be destroyed, thereby improving the anti-attack performance of the processed video.

[0028] In a preferred example, the present application may be further configured to: add the watermark codes corresponding to the multiple frames of images to the images of the corresponding frames, including:

[0029] Determining a target pixel point from a target area of ​​a target image, wherein the target image is any frame of the multiple frames of images, and the target area is any one of multiple areas of the target image;

[0030] The parameters of the target pixel are changed so as to add the watermark codes corresponding to the multiple frames of images to the images of the corresponding frames, wherein the parameters include brightness, chroma and frequency.

[0031] By adopting the above technical solution, the target pixel points are determined from the target image, and the watermark codes corresponding to the multiple frames of images are added to the images of the corresponding frames by changing the parameters of the target pixel points. The watermark codes can be embedded in the video invisibly, and the embedded watermark codes are not easy to be detected, thereby improving the concealment of the watermark codes.

[0032] In a preferred example, the present application may be further configured as follows: the method further includes:

[0033] Acquire a video to be detected, and continuously extract frames from the video to be detected to obtain multiple frames of images to be detected;

[0034] Extracting a watermark code from a target image to be detected, and determining whether the extracted watermark code is complete, wherein the target image to be detected is any frame among the multiple frames of images to be detected;

[0035] If the extracted watermark code is incomplete, the extracted watermark codes are spliced ​​according to a preset template to obtain a complete watermark code, and the conference information corresponding to the video to be detected is determined according to the complete watermark code.

[0036] By adopting the above technical solution, the incomplete watermark extracted from the target image to be detected is spliced ​​and completed according to the preset template. The conference information corresponding to the video to be detected can be determined based on the obtained complete watermark code, and the video to be detected can be accurately traced based on the conference information.

[0037] In a preferred example, the present application may be further configured to: add the watermark codes corresponding to the multiple frames of images to the images of the corresponding frames, including:

[0038] Setting the last bit of the watermark code corresponding to the first frame of image to the first bit of the code sequence to obtain an updated watermark code corresponding to the first frame of image;

[0039] Setting the last bit of the coding sequence corresponding to the second frame of the multiple images to the second bit of the coding sequence to obtain an updated watermark code corresponding to the second frame of the multiple images, and so on, until obtaining updated watermark codes corresponding to each of the multiple frames of the images;

[0040] The updated watermark codes corresponding to the multiple frames of images are added to the images of the corresponding frames.

[0041] By adopting the above technical solution, the last bit of the watermark code in each frame of the image is updated according to the coding sequence, and the updated watermark code is embedded in the corresponding image, which can improve the anti-attack performance of the watermark code.

[0042] In a second aspect, the present application provides a video processing device, which adopts the following technical solution:

[0043] A video processing device, comprising:

[0044] A division module is used to continuously extract frames from the video to be processed to obtain multiple frames of images with a time sequence, and to divide the multiple frames of images into multiple regions, wherein the video to be processed is the content required to be played at the conference;

[0045] An acquisition module, configured to acquire a coding sequence, wherein the coding sequence includes a start identification code and a valid information coding sequence, and the valid information coding sequence corresponds to conference information;

[0046] a determining module, configured to determine a first frame of image from the plurality of frames of image according to the time sequence;

[0047] A setting module, configured to set corresponding codes for each region in the first frame of image in sequence according to the coding sequence, to obtain a first watermark code corresponding to the first frame of image;

[0048] an execution module, configured to update the coding sequence based on a preset number of bits, determine the next frame of image from the multiple frames of image according to the time sequence, and execute the step of determining the watermark code according to the updated coding sequence until the watermark codes corresponding to all the remaining frames of image are obtained, wherein the preset number of bits is the number of bits of each code shifted during the process of updating the coding sequence;

[0049] The integration module is used to add the watermark codes corresponding to the multiple frames of images to the images of the corresponding frames, and integrate the multiple frames of images containing the watermark codes to obtain a processed video.

[0050] In a third aspect, the present application provides an electronic device, which adopts the following technical solution:

[0051] one or more processors;

[0052] Memory;

[0053] At least one application, wherein the at least one application is stored in a memory and configured to be executed by at least one processor, and the at least one application is configured to: execute the video processing method as described in any one of the first aspects.

[0054] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution:

[0055] A computer-readable storage medium stores a computer program, which, when executed in a computer, causes the computer to execute the video processing method as described in any one of the first aspects.

[0056] In summary, this application has the following beneficial technical effects:

[0057] This application obtains multiple frames of images with a time sequence of the video to be processed, and divides the multiple frames into multiple areas respectively; determines the first frame from the multiple frames, and sets corresponding codes for each area in the first frame in turn. Setting codes for each area can still extract codes from other areas under cropping attacks; updates the code sequence based on a preset number of bits, and determines the next frame, and executes the step of determining the watermark code until the watermark codes corresponding to all the remaining frames are obtained. The watermarks corresponding to the multiple frames are different, and the complete watermark can still be extracted under attacks such as cropping and frame extraction; adds the watermark codes corresponding to the multiple frames to the images of the corresponding frames, and integrates the multiple frames containing the watermark codes to obtain a processed video. The processed video contains a watermark, and extracting the video watermark can obtain the watermark code contained therein. According to the watermark code, the conference information corresponding to the video can be determined, thereby realizing accurate tracing of the video. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 This is a flow chart of a video processing method provided in an embodiment of the present application;

[0059] Figure 2 This is an incomplete schematic diagram of the watermark code extracted from the target image to be detected provided by the embodiment of the present application;

[0060] Figure 3 is a structural diagram of a video processing device provided in an embodiment of the present application;

[0061] Figure 4 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0062] The following is combined with Figure 1-4 This application is described in further detail.

[0063] This specific embodiment is merely an explanation of the present application and is not a limitation of the present application. After reading this specification, those skilled in the art may make non-creative modifications to the present embodiment as needed, but as long as they are within the scope of the claims of the present application, they are protected by the patent law.

[0064] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0065] In this document, the term "and / or" simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document, unless otherwise specified, generally indicates an "or" relationship between the related objects.

[0066] The embodiment of the present application provides a video processing method, such as Figure 1 As shown, the method provided in the embodiment of the present application can be executed by an electronic device, which can be a server or a terminal device, wherein the server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited thereto. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present application. The method includes steps S101 to S106, wherein:

[0067] S101 , continuously extracting frames from a video to be processed to obtain multiple frames of images in a time sequence, and dividing the multiple frames of images into multiple regions, wherein the video to be processed is content required to be played at a conference.

[0068] In this embodiment, video playback software or a programming language library (such as OpenCV) can be used to continuously extract frames from the video being processed, generating a multi-frame image sequence. For each frame in the multi-frame image, the image can be divided into multiple regions based on a preset template. The size of the preset template corresponds to the image. The preset template includes multiple regions, each of which is assigned a region number. The number of regions in the preset template is represented by M. The multiple regions in the preset template can be represented as [1, 2, ..., M]. The size and shape of each region can be customized based on actual needs.

[0069] S102: Obtain a coding sequence, where the coding sequence includes a start identification code and a valid information coding sequence, and the valid information coding sequence corresponds to conference information.

[0070] In one possible scenario, a meeting number can be set for each meeting, the meeting number corresponds to the meeting information, and the meeting number and the meeting information corresponding to the meeting number are stored in a preset database. The meeting number can be binary or other bases. If the meeting number is in other bases, the meeting number in other bases is converted into binary, and the binary meeting number can be used as a valid information coding sequence corresponding to the meeting. In another possible scenario, a valid information coding sequence can be directly and randomly set for each meeting, the valid information coding sequence corresponds to the meeting information of the meeting, and is stored in a preset database. The number of bits of the coding sequence is not greater than the number of areas in the preset template. The starting identification code is used to indicate the beginning of the coding sequence. The starting identification code is different from "0" and "1" in the valid information code. The starting identification code can be set to a specific shape. Optionally, the starting identification code can be set to "*" or "#".

[0071] S103 : Determine a first frame of image from multiple frames of image according to a time sequence.

[0072] The first frame of image is the earliest image at the corresponding moment in the time series.

[0073] S104 , setting corresponding codes for each region in the first frame image in sequence according to the coding sequence, to obtain a first watermark code corresponding to the first frame image.

[0074] In this embodiment, the regions in each frame image correspond to the regions in the preset template, so each frame image contains M regions. The number of coding bits in the coding sequence is represented by N, where M is greater than N. According to the coding sequence, one bit of code is set for each region in the first frame image. After one bit of code is set for the first N regions in the first frame image, one bit of code is set for each region starting from the N+1th region in the first frame image according to the coding sequence, and so on, until one bit of code is set for each region in the first frame image. The code corresponds to the region number, and the first watermark code consists of M bits of code.

[0075] S105. Update the coding sequence based on a preset number of bits, determine the next frame image from the multiple frames according to the time sequence, and perform the step of determining the watermark code according to the updated coding sequence until the watermark codes corresponding to all the remaining frames are obtained. The preset number of bits is the number of bits of each code shift during the process of updating the coding sequence.

[0076] The coding sequence corresponding to the first frame image is used as the first coding sequence, and the first coding sequence is updated according to the preset bit number to obtain the second coding sequence. The second frame image is determined from the multiple frames according to the time sequence, and the corresponding coding is set for each area in the second frame image according to the second coding sequence to obtain the second watermark code corresponding to the second frame image.

[0077] Furthermore, the second coding sequence is updated according to the preset number of bits to obtain a third coding sequence, and the third frame image is determined from the multiple frame images according to the time sequence. The corresponding code is set for each area in the third frame image according to the third coding sequence to obtain the third watermark code corresponding to the third frame image, and so on, until the watermark code corresponding to each frame image is obtained.

[0078] S106: adding the watermark codes corresponding to the multiple frames of images to the images of the corresponding frames, and integrating the multiple frames of images containing the watermark codes to obtain a processed video.

[0079] Any frame in the multi-frame image is taken as the target image, and the target image contains M areas, each area corresponds to one bit of code, and any area in the target image is taken as the target area. In order to reduce the impact of modifying a large number of pixels on the image, for the effective information coding sequence, a preset number of pixels can be selected from the target area, and the code corresponding to the target area can be embedded in the least significant bit of the preset number of pixels, wherein the preset number can be set manually based on actual experience, so as to realize the embedding of the corresponding watermark code into each frame of the image; for the start identifier code, the size and embedding position of the embedded start identifier code can be determined in the area corresponding to the start identifier code, the embedded start identifier code needs to be completely embedded in the corresponding area, and the embedding position can be set manually and flexibly, and the pixel value of the start identifier code is replaced with the pixel value corresponding to the embedding position in the area, so as to realize the embedding of the start identifier code.

[0080] Furthermore, multiple frames of images can be integrated into a video in a time sequence through video processing software or programming language libraries (such as FFmpeg).

[0081] The embodiment of the present application obtains a multi-frame image with a time sequence of the video to be processed, and divides the multi-frame image into multiple regions respectively; determines the first frame image from the multi-frame image, and sets corresponding codes for each region in the first frame image in turn. Setting codes for each region can still extract codes from other regions under cropping attacks; updates the coding sequence based on a preset number of bits, and determines the next frame image, and executes the step of determining the watermark code until the watermark codes corresponding to all the remaining frame images are obtained. The watermarks corresponding to the multi-frame images are different, and the complete watermark can still be extracted under attacks such as cropping and frame extraction; adds the watermark codes corresponding to the multi-frame images to the images of the corresponding frames, and integrates the multi-frame images containing the watermark codes to obtain a processed video. The processed video contains a watermark. Extracting the video watermark can obtain the watermark code contained therein. According to the watermark code, the conference information corresponding to the video can be determined, thereby realizing accurate tracing of the video.

[0082] A possible implementation of the embodiment of the present application, updating the coding sequence based on a preset number of bits, includes:

[0083] Move the first bit of the code sequence to the last bit of the code sequence to obtain a first code sequence;

[0084] The first code in the first code sequence is moved to the last code in the first code sequence to obtain a second code sequence, and so on, until the number of moves reaches a preset number of bits, to obtain an updated code sequence.

[0085] In this embodiment, the preset number of bits is the number of bits that each code moves in the process of updating the coding sequence. It can be set manually according to actual needs. The last code in the coding sequence is used as the previous code of the first code. Each code in the coding sequence can be moved forward or backward by the preset number of bits to obtain an updated coding sequence.

[0086] Exemplarily, the preset number of bits is one, the coding sequence is nine bits, the coding sequence includes a starting identification code and eight valid information codes, and the direction of movement of each code in the process of updating the coding sequence is forward. The first code in the coding sequence, i.e., the starting identification code, moves to the last bit of the coding sequence, and the remaining eight valid information codes all move forward one bit to obtain an updated coding sequence.

[0087] Specifically, the coding sequence corresponding to the first frame image is used as the first coding sequence, and the updated coding sequence obtained by updating the first coding sequence according to the preset number of bits is used as the second coding sequence, and the second coding sequence is the coding sequence corresponding to the second frame image; the process of updating the second coding sequence according to the preset number of bits is: moving the first bit of the second coding sequence to the last bit of the second coding sequence, and moving the remaining eight bits of the coding forward by one bit to obtain a third coding sequence, and the third coding sequence is the coding sequence corresponding to the third frame image. And so on, the coding sequence corresponding to each frame image is obtained, and the watermark code corresponding to each frame image can be determined according to the corresponding coding sequence.

[0088] The embodiment of the present application moves each bit of the coding sequence according to a preset number of bits to obtain an updated coding sequence, thereby avoiding using the same coding sequence for multiple frames of images and improving the anti-attack performance of the watermark coding.

[0089] A possible implementation of the embodiment of the present application is to obtain a coding sequence, including:

[0090] Obtain conference information, including the terminal ID that plays the video to be processed, the conference time, the conference address, and the attendees;

[0091] According to the meeting information, generate the valid information coding sequence corresponding to the meeting information,

[0092] A coding sequence is generated according to the effective information coding sequence, and the number of bits of the coding sequence is not greater than the number of regions corresponding to each frame of the image.

[0093] In this embodiment, a code can be embedded in the playback device corresponding to the video to be processed to obtain the terminal ID corresponding to the video to be processed. The terminal ID can be the serial number of the device that plays the video to be processed. The attendees can be represented by a manually entered list of people, and the meeting address can be represented by the IP address of the playback device corresponding to the video to be processed.

[0094] In one possible scenario, the valid information code is randomly generated, and the valid information code is corresponded to the meeting information so that the meeting information can be determined according to the correspondence after the watermark code is extracted; in another possible scenario, the terminal ID and / or meeting address can be used as the watermark code, and the participants correspond to the watermark code.

[0095] The embodiment of the present application generates a coding sequence based on the conference information corresponding to the video to be processed, and can obtain a valid information coding sequence based on the watermark code extracted from the video, thereby determining the conference information corresponding to the video and accurately tracing the video.

[0096] A possible implementation of the embodiment of the present application is to set corresponding codes for each region in the first frame image in sequence according to the coding sequence to obtain a first watermark code corresponding to the first frame image, including:

[0097] Setting a first bit of the coding sequence for a first region in a first frame of image, setting a second bit of the coding sequence for a second region in the first frame of image, and so on, until a first number of regions in the first frame of image are all set with a single bit of coding, where the first number is the number of coding bits in the coding sequence;

[0098] The first bit of the coding sequence is set for the next region of the last region in the first frame image, and so on, until a bit of coding is set for each region in the first frame image.

[0099] In this embodiment, the M regions in the first frame image are represented as [1, 2...M], the number of coding bits of the coding sequence is N, and the coding sequence is represented as [1, 3...N]. The first code is assigned to the first region, the second code is assigned to the second region, and so on, until the Nth code N is assigned to the Nth region, the first code is assigned to the N+1th region, the second code is assigned to the N+2th region, and so on, until a one-bit code is set for each region in the first frame image. According to the process of setting a corresponding code for each region in the first frame image, a corresponding code can be set for each region in each frame image of multiple frames, thereby obtaining a watermark code corresponding to each of the multiple frames.

[0100] The embodiment of the present application sets a corresponding code for each area in the first frame image according to the coding sequence. Since the number of coding bits of the coding sequence is not greater than the number of areas corresponding to the image, the coding sequence can be displayed cyclically in multiple areas corresponding to the image, making the watermark code difficult to be destroyed, thereby improving the anti-attack performance of the processed video.

[0101] A possible implementation of the embodiment of the present application is to add the watermark codes corresponding to the multiple frames of images to the images of the corresponding frames, including:

[0102] Determine a target pixel point from a target area of ​​a target image, where the target image is any frame of the multiple frames, and the target area is any one of the multiple areas of the target image;

[0103] By changing the parameters of the target pixel points, the watermark codes corresponding to the multiple frames of images are added to the images of the corresponding frames. The parameters include brightness, chroma and frequency.

[0104] In this embodiment, to improve the robustness of watermark encoding, a first number of pixels can be selected as target pixels. The first number can be manually set based on actual needs. To reduce the impact of changing the target pixel parameters on the image, the first number of target pixels is evenly distributed in the target area. For any target pixel, one or more parameters of the pixel can be flexibly changed, and this embodiment of the application does not impose specific limitations.

[0105] Specifically, when modifying the parameters of the target pixel point, if the binary code corresponding to the area is 0, the parameters of the target pixel point can be left unchanged, and the target pixel point will generate a set of parameters corresponding to the code (such as embedding position, watermark size, embedding direction, etc.). This set of parameters can be used as an identifier for extracting the watermark code; if the binary code corresponding to the area is 1, the embedding of the code is completed by modifying the parameters of the target pixel point. For example, the process of modifying the parameters of the target pixel point can be to increase the parameters corresponding to each target pixel point in the area by a numerical value.

[0106] Furthermore, a variety of watermark embedding algorithms can be used to change the parameters of pixel points to embed the corresponding code into the image. The optional watermark embedding algorithms include the least significant bit algorithm and the discrete cosine transform algorithm. Among them, the least significant bit algorithm embeds the code into the least significant bit of the target pixel point, which is invisible to the human eye. When extracting the watermark code, only the least significant bit of the target pixel point needs to be extracted to restore the watermark code; the discrete cosine transform algorithm processes the image in the frequency domain and embeds the code into the coefficients of the discrete cosine transform. When extracting the watermark code, the watermark code can be restored through the inverse discrete cosine transform operation.

[0107] The embodiment of the present application determines the target pixel point from the target image, and adds the watermark code corresponding to each of the multiple frames of image to the image of the corresponding frame by changing the parameters of the target pixel point. The watermark code can be embedded in the video invisibly, and the embedded watermark code is not easy to be detected, thereby improving the concealment of the watermark code.

[0108] In a possible implementation of the embodiment of the present application, the method further includes: acquiring a video to be detected, and continuously extracting frames from the video to be detected to obtain multiple frames of images to be detected;

[0109] Extracting watermark code from the target image to be detected and determining whether the extracted watermark code is complete, where the target image to be detected is any frame among the multiple frames of images to be detected;

[0110] If the extracted watermark code is incomplete, the extracted watermark codes are spliced ​​according to a preset template to obtain a complete watermark code, and the conference information corresponding to the video to be detected is determined based on the complete watermark code.

[0111] In this embodiment, the video to be tested can be a video obtained online by relevant personnel and suspected to be played during a confidential meeting. Using a watermark extraction algorithm corresponding to the embedded watermark, the watermark code can be extracted from multiple frames corresponding to the video to be tested. If the extracted watermark code is incomplete, a preset template can be compared with the position of the extracted watermark code in the target image to determine the missing parts of the preset extracted watermark code, and the extracted watermark code can be supplemented based on the preset code.

[0112] Figure 2 This is an incomplete schematic diagram of the watermark code extracted from the target image to be detected. Figure 2 The 0-9 in the code sequence does not represent the code value, but only represents the area where the code is located. 0 represents the starting identification code in the code sequence. The effective information code sequence is eight bits. The preset template is divided into 36 areas of 6×6. Each area corresponds to one code. The code sequence is displayed cyclically in the area corresponding to the target image to be detected. Figure 2 The dotted line in the image represents the missing portion of the watermark code. By comparing the incomplete watermark code with the preset template, we can deduce the code corresponding to the missing area, thus obtaining the complete watermark code. The watermark code contains a code sequence, which can be used to determine the conference information corresponding to the video being tested. If the extracted code sequence does not exist in the preset database, it indicates that the video being tested is not a video played in a confidential meeting.

[0113] The embodiment of the present application splices and completes the incomplete watermark extracted from the target image to be detected according to a preset template. The conference information corresponding to the video to be detected can be determined based on the obtained complete watermark code, and the video to be detected can be accurately traced based on the conference information.

[0114] A possible implementation of the embodiment of the present application is to add the watermark codes corresponding to the multiple frames of images to the images of the corresponding frames, including:

[0115] The last bit of the watermark code corresponding to the first frame image is set as the first bit of the coding sequence to obtain the updated watermark code corresponding to the first frame image;

[0116] The last bit of the coding sequence corresponding to the second frame image in the multiple frames is set to the second bit of the coding sequence to obtain the updated watermark code corresponding to the second frame image, and so on, until the updated watermark codes corresponding to the multiple frames are obtained;

[0117] The updated watermark codes corresponding to the multiple frames of images are added to the images of the corresponding frames.

[0118] In the embodiment of the present application, the last bit of the watermark code in each frame of the image is updated according to the coding sequence, and the updated watermark code is embedded in the corresponding image, which can improve the anti-attack performance of the watermark code. According to the extracted watermark codes corresponding to each frame of the image, the integrity of the video can be determined.

[0119] The above embodiment introduces a video processing method from the perspective of method flow, and the following embodiment introduces a video processing device from the perspective of a virtual module or a virtual unit. Please refer to the following embodiment for details.

[0120] The embodiment of the present application provides a video processing device, such as Figure 3 As shown, the device may include:

[0121] The division module 301 is used to continuously extract frames from the video to be processed to obtain multiple frames of images with a time sequence, and divide the multiple frames of images into multiple regions. The video to be processed is the content required to be played in the conference;

[0122] An acquisition module 302 is configured to acquire a coding sequence, the coding sequence including a start identification code and a valid information coding sequence, the valid information coding sequence corresponding to conference information;

[0123] A determination module 303 is configured to determine a first frame of image from multiple frames of image according to a time sequence;

[0124] The setting module 304 is configured to set a corresponding code for each region in the first frame image in sequence according to the coding sequence to obtain a first watermark code corresponding to the first frame image;

[0125] An execution module 305 is configured to update the code sequence based on a preset number of bits, determine the next frame of image from the multiple frames according to the time sequence, and execute the step of determining the watermark code according to the updated code sequence until the watermark codes corresponding to all the remaining frames of image are obtained. The preset number of bits is the number of bits that each code moves during the process of updating the code sequence.

[0126] The integration module 306 is configured to add the watermark codes corresponding to the multiple frames of images to the images of the corresponding frames, and integrate the multiple frames of images containing the watermark codes to obtain a processed video.

[0127] In a preferred example, the present application may be further configured as follows: when the execution module 305 updates the code sequence based on the preset number of bits, it is specifically configured to: move the first bit of the code sequence to the last bit of the code sequence to obtain a first code sequence;

[0128] The first code in the first code sequence is moved to the last code in the first code sequence to obtain a second code sequence, and so on, until the number of moves reaches a preset number of bits, to obtain an updated code sequence.

[0129] In a preferred example, the present application may be further configured as follows: when the acquisition module 302 executes the acquisition of the coding sequence, it is specifically configured to:

[0130] Obtain conference information, including the terminal ID that plays the video to be processed, the conference time, the conference address, and the attendees;

[0131] According to the meeting information, generate the valid information coding sequence corresponding to the meeting information,

[0132] A coding sequence is generated according to the effective information coding sequence, and the number of bits of the coding sequence is not greater than the number of regions corresponding to each frame of the image.

[0133] In a preferred example, the present application may be further configured as follows: when the setting module 304 sets corresponding codes for each region in the first frame image in sequence according to the coding sequence to obtain the first watermark code corresponding to the first frame image, it is specifically configured to:

[0134] Setting a first bit of the coding sequence for a first region in a first frame of image, setting a second bit of the coding sequence for a second region in the first frame of image, and so on, until a first number of regions in the first frame of image are all set with a single bit of coding, where the first number is the number of coding bits in the coding sequence;

[0135] The first bit of the coding sequence is set for the next region of the last region in the first frame image, and so on, until a bit of coding is set for each region in the first frame image.

[0136] In a preferred example, the present application may be further configured as follows: when the integration module 306 adds the watermark codes corresponding to the multiple frames of images to the images of the corresponding frames, it is specifically configured to:

[0137] Determine a target pixel point from a target area of ​​a target image, where the target image is any frame of the multiple frames, and the target area is any one of the multiple areas of the target image;

[0138] By changing the parameters of the target pixel points, the watermark codes corresponding to the multiple frames of images are added to the images of the corresponding frames. The parameters include brightness, chroma and frequency.

[0139] In a preferred example, the present application may be further configured as follows: the apparatus further includes an extraction module, specifically configured to:

[0140] Obtain the video to be detected, and continuously extract frames from the video to be detected to obtain multiple frames of images to be detected;

[0141] Extracting watermark code from the target image to be detected and determining whether the extracted watermark code is complete, where the target image to be detected is any frame among the multiple frames of images to be detected;

[0142] If the extracted watermark code is incomplete, the extracted watermark codes are spliced ​​according to a preset template to obtain a complete watermark code, and the conference information corresponding to the video to be detected is determined based on the complete watermark code.

[0143] In a preferred example, the present application may be further configured as follows: when the integration module 306 adds the watermark codes corresponding to the multiple frames of images to the images of the corresponding frames, it is specifically configured to:

[0144] The last bit of the watermark code corresponding to the first frame image is set as the first bit of the coding sequence to obtain the updated watermark code corresponding to the first frame image;

[0145] The last bit of the coding sequence corresponding to the second frame image in the multiple frames is set to the second bit of the coding sequence to obtain the updated watermark code corresponding to the second frame image, and so on, until the updated watermark codes corresponding to the multiple frames are obtained;

[0146] The updated watermark codes corresponding to the multiple frames of images are added to the images of the corresponding frames.

[0147] A video processing device provided in an embodiment of the present application is applicable to the above method embodiment and will not be described in detail here.

[0148] An electronic device is provided in an embodiment of the present application, such as Figure 4 As shown, Figure 4The electronic device 400 shown includes a processor 401 and a memory 403. The processor 401 and the memory 403 are connected, for example, via a bus 402. Optionally, the electronic device 400 may further include a transceiver 404. It should be noted that in actual applications, the number of transceivers 404 is not limited to one, and the structure of the electronic device 400 does not constitute a limitation on the embodiments of the present application.

[0149] Processor 401 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 401 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, or a combination of a DSP and a microprocessor.

[0150] Bus 402 may include a path for transmitting information between the above components. Bus 402 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. Bus 402 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but it does not mean that there is only one bus or one type of bus.

[0151] The memory 403 may be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0152] The memory 403 is used to store application code for executing the solution of the present application, and is controlled by the processor 401. The processor 401 is used to execute the application code stored in the memory 403 to implement the content shown in the above embodiment of the video processing method.

[0153] Figure 4 The electronic device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.

[0154] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer-readable storage medium is run on a computer, the computer can execute the corresponding contents of the aforementioned method embodiment.

[0155] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0156] The above are only some of the implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A video processing method, characterized in that: include: Continuously extracting frames from the video to be processed to obtain multiple frames of images with a time sequence, and dividing the multiple frames of images into multiple regions, respectively, wherein the video to be processed is the content required to be played at the conference; Acquire a coding sequence, wherein the coding sequence includes a start identification code and a valid information coding sequence, and the valid information coding sequence corresponds to conference information; Determine a first frame of image from the multiple frames of image according to the time sequence; According to the coding sequence, set corresponding codes for each region in the first frame of image in turn to obtain a first watermark code corresponding to the first frame of image; The coding sequence is updated based on a preset number of bits, and a next frame of image is determined from the multiple frames of image according to the time sequence, and a step of determining a watermark code is performed according to the updated coding sequence until the watermark codes corresponding to all the remaining frames of image are obtained, wherein the preset number of bits is the number of bits of each code shift in the process of updating the coding sequence; Adding the watermark codes corresponding to the multiple frames of images to the images of the corresponding frames, and integrating the multiple frames of images containing the watermark codes to obtain a processed video; The step of sequentially setting corresponding codes for each region in the first frame image according to the coding sequence to obtain a first watermark code corresponding to the first frame image includes: Setting a first bit of the coding sequence for a first region in the first frame of image, setting a second bit of the coding sequence for a second region in the first frame of image, and so on, until a first number of regions in the first frame of image are all set with a first bit of coding, where the first number is the number of coding bits in the coding sequence; Setting the first bit of the coding sequence for the next region of the last region in the first frame of image to which coding is set, and so on, until a first bit of coding is set for each region in the first frame of image; The updating of the coding sequence based on a preset number of bits comprises: Move the first bit of the coding sequence to the last bit of the coding sequence to obtain a first coding sequence; Move the first bit of the first coding sequence to the last bit of the first coding sequence to obtain a second coding sequence, and so on, until the number of moves reaches the preset number of bits, to obtain an updated coding sequence; The step of adding the watermark codes corresponding to the multiple frames of images to the images of the corresponding frames comprises: Setting the last bit of the watermark code corresponding to the first frame of image to the first bit of the coding sequence to obtain an updated watermark code corresponding to the first frame of image; The last bit of the coding sequence corresponding to the second frame image in the multiple frames of images is set to the second bit of the coding sequence to obtain the updated watermark code corresponding to the second frame image, and so on, until the updated watermark codes corresponding to each of the multiple frames of images are obtained; The updated watermark codes corresponding to the multiple frames of images are added to the images of the corresponding frames.

2. The video processing method according to claim 1, characterized in that: Get the coding sequence, including: Acquire conference information, wherein the conference information includes the terminal ID that plays the video to be processed, the conference time, the conference address, and the participants; generating a valid information coding sequence corresponding to the conference information according to the conference information, A coding sequence is generated according to the effective information coding sequence, and the number of bits of the coding sequence is not greater than the number of regions corresponding to each frame of the image.

3. The video processing method according to claim 1, characterized in that: Adding the watermark codes corresponding to the multiple frames of images to the images of the corresponding frames includes: Determine a target pixel point from a target area of ​​a target image, wherein the target image is any frame of the multiple frames of images, and the target area is any one of multiple areas of the target image; The parameters of the target pixel are changed so as to add the watermark codes corresponding to the multiple frames of images to the images of the corresponding frames, wherein the parameters include brightness, chroma and frequency.

4. The video processing method according to claim 1, characterized in that: The method further comprises: Acquire a video to be detected, and continuously extract frames of the video to be detected to obtain multiple frames of images to be detected; Extracting watermark code from a target image to be detected, and determining whether the extracted watermark code is complete, wherein the target image to be detected is any frame among the multiple frames of images to be detected; If the extracted watermark code is incomplete, the extracted watermark codes are spliced ​​according to a preset template to obtain a complete watermark code, and the conference information corresponding to the video to be detected is determined according to the complete watermark code.

5. A video processing device, characterized in that: include: A division module is used to continuously extract frames from the video to be processed to obtain multiple frames of images with a time sequence, and to divide the multiple frames of images into multiple regions, wherein the video to be processed is the content required to be played at the conference; An acquisition module, used to acquire a coding sequence, wherein the coding sequence includes a start identification code and a valid information coding sequence, and the valid information coding sequence corresponds to conference information; A determination module, used for determining a first frame of image from the multiple frames of image according to the time sequence; A setting module, used for setting corresponding codes for each region in the first frame image in turn according to the coding sequence, to obtain a first watermark code corresponding to the first frame image; an execution module, configured to update the coding sequence based on a preset number of bits, determine the next frame of image from the multiple frames of image according to the time sequence, and execute the step of determining the watermark code according to the updated coding sequence until the watermark codes corresponding to all the remaining frames of image are obtained, wherein the preset number of bits is the number of bits of each code shift in the process of updating the coding sequence; An integration module, used for adding the watermark codes corresponding to the multiple frames of images to the images of the corresponding frames, and integrating the multiple frames of images containing the watermark codes to obtain a processed video; Wherein, the setting module, when executing the step of setting corresponding codes for each region in the first frame image in sequence according to the coding sequence to obtain the first watermark code corresponding to the first frame image, is specifically used to: Setting a first bit of the coding sequence for a first region in the first frame of image, setting a second bit of the coding sequence for a second region in the first frame of image, and so on, until a first number of regions in the first frame of image are all set with a first bit of coding, where the first number is the number of coding bits in the coding sequence; Setting the first bit of the coding sequence for the next region of the last region in the first frame of image to which coding is set, and so on, until a first bit of coding is set for each region in the first frame of image; The execution module, when executing the updating of the coding sequence based on the preset number of bits, is specifically used to: Move the first bit of the coding sequence to the last bit of the coding sequence to obtain a first coding sequence; Move the first bit of the first coding sequence to the last bit of the first coding sequence to obtain a second coding sequence, and so on, until the number of moves reaches the preset number of bits, to obtain an updated coding sequence; The integration module, when executing the step of adding the watermark codes corresponding to the multiple frames of images to the images of the corresponding frames, is specifically used to: Setting the last bit of the watermark code corresponding to the first frame of image to the first bit of the coding sequence to obtain an updated watermark code corresponding to the first frame of image; The last bit of the coding sequence corresponding to the second frame image in the multiple frames of images is set to the second bit of the coding sequence to obtain the updated watermark code corresponding to the second frame image, and so on, until the updated watermark codes corresponding to each of the multiple frames of images are obtained; The updated watermark codes corresponding to the multiple frames of images are added to the images of the corresponding frames.

6. An electronic device, characterized in that: include: at least one processor; Memory; At least one application, wherein the at least one application is stored in a memory and configured to be executed by at least one processor, and the at least one application is configured to: execute the video processing method according to any one of claims 1-4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed in a computer, the computer is caused to execute the video processing method according to any one of claims 1 to 4.