Video tamper-proofing method and apparatus, electronic device, and storage medium

By parsing and encrypting the video data packets of the video collection equipment, the problem of security risks in data transmission of the video surveillance system is solved, and the effect of reducing hardware upgrade costs and improving data security is achieved.

WO2024187792A1PCT designated stage expired Publication Date: 2024-09-19ZHONGKE INFORMATION SECURITY COMMON TECH NAT ENG RES CENT CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/130479
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-15
Filing Date
2023-11-08
Publication Date
2024-09-19

AI Technical Summary

Technical Problem

Existing video surveillance systems have security risks during the video data transmission process, and the hardware upgrade cost of directly replacing cameras is high.

Method used

By parsing the video data packets of the video collection device, the type of network abstraction layer data is detected, custom network abstraction layer data is generated, and the data is encrypted using the initial key to ensure the security of the video data during transmission.

Benefits of technology

It reduces the hardware upgrade cost of the video surveillance system, improves the security of video data transmission, prevents tampering, and is compatible with domestic cryptographic algorithms, saving transformation costs and personnel costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023130479_19092024_PF_FP_ABST
    Figure CN2023130479_19092024_PF_FP_ABST
Patent Text Reader

Abstract

A video tamper-proofing method, comprising: parsing a video data packet from a video collection device to obtain network abstraction layer data; detecting a type of the network abstraction layer data; after first network abstraction layer data whose type is a sequence parameter set is detected, generating custom network abstraction layer data according to the first network abstraction layer data, and using an initial key to encrypt second network abstraction layer data, following the first network abstraction layer data, whose type is a non-sequence parameter set; and sending the data to a data receiving end. In the present solution, network abstraction layer data in a video data packet is divided into first network abstraction layer data and second network abstraction layer data, custom network abstraction layer data is generated according to the first network abstraction layer data, and then the second network abstraction layer data is encrypted, thereby ensuring that a video cannot be tampered during transmission. Compared with the traditional upgrading mode of replacing a camera, the method can reduce the costs.
Need to check novelty before this filing date? Find Prior Art

Description

Video anti-tampering method, device, electronic device and storage medium Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a video anti-tampering method, device, electronic device and storage medium. Background Art

[0002] In the existing national video surveillance system, network cameras generally transmit the collected video data to the server in plain text, which poses a great security risk.

[0003] The existing technology for protecting network videos requires upgrading the camera. However, directly upgrading and replacing the camera will result in very high hardware costs.

[0004] Summary of the Invention

[0005] In view of this, embodiments of the present application provide a video anti-tampering method, device, electronic device, and storage medium, which can reduce costs.

[0006] In a first aspect, a video anti-tampering method is provided, comprising: parsing a video data packet from a video capture device to obtain network abstraction layer data; detecting a type of the network abstraction layer data; upon detecting first network abstraction layer data of a sequence parameter set type, generating custom network abstraction layer data based on the first network abstraction layer data, wherein the custom network abstraction layer data includes an encrypted initial key; encrypting second network abstraction layer data of a non-sequence parameter set type that follows the first network abstraction layer data based on the initial key; and sequentially sending the custom network abstraction layer data, the first network abstraction layer data, and the encrypted second network abstraction layer data to a data receiving end.

[0007] In a possible implementation method, the step of generating custom type of network abstraction layer data from the first network abstraction layer data is: performing a hash operation on the first network abstraction layer data to obtain a first hash value; and generating custom network abstraction layer data according to the first hash value.

[0008] In one possible implementation, the steps of generating custom network abstraction layer data based on the first hash value are: generating the initial key through a random function; generating signature data based on the first hash value and the initial key; and generating custom network abstraction layer data including the identification code of the video acquisition device and the signature data.

[0009] In a possible implementation method, the steps of generating signature data based on the first hash value and the initial key are: obtaining a timestamp based on the current time; performing a hash operation on the identification code, the timestamp, the initial key and the first hash value to obtain a second hash value; and encrypting the timestamp, the initial key and the second hash value through the private key of the video acquisition device to generate signature data.

[0010] In one possible implementation method, the first network abstraction layer data is hashed using the SM3 hash algorithm to obtain the first hash value; and / or, based on the private key of the video acquisition device, the timestamp, the initial key and the second hash value are encrypted using the SM2 encryption algorithm to obtain the signature data.

[0011] In a possible implementation, the step of encrypting second network abstraction layer data that follows the first network abstraction layer data and is of a non-sequence parameter set type is: generating a key stream using a ZUC algorithm according to the initial key; and encrypting the second network abstraction layer data using the key stream.

[0012] In a second aspect, a video anti-tampering device is provided, including: a parsing module for parsing video data packets from a video acquisition device to obtain network abstraction layer data; a detection module for detecting the type of the network abstraction layer data; a generation module for generating network abstraction layer data of a custom type; when the detection module detects first network abstraction layer data of a sequence parameter set type, the generation module generates network abstraction layer data of a custom type based on the first network abstraction layer data; an encryption module for encrypting second network abstraction layer data that follows the first network abstraction layer data and is of a non-sequence parameter set type; a sending module for sending data to a receiving end; the sent data includes the network abstraction layer data of the custom type, the first network abstraction layer data, and the encrypted second network abstraction layer data.

[0013] In a third aspect, an electronic device is provided, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the method described in the first aspect.

[0014] In a fourth aspect, a computer storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method described in the first aspect is implemented.

[0015] In a fifth aspect, a computer program product is provided, which is tangibly stored on a computer-readable medium and includes computer-executable instructions, which, when executed, cause at least one processor to perform the method as described in the first aspect.

[0016] The video anti-tampering method provided by the above-mentioned scheme parses the video data packet from the video acquisition device to obtain network abstraction layer data, detects the type of the network abstraction layer data, and upon detecting first network abstraction layer data of the type of a sequence parameter set, generates custom network abstraction layer data based on the detected first network abstraction layer data, encrypts the second network abstraction layer data using an initial key, and finally sends the custom network abstraction layer data, the first network abstraction layer data, and the encrypted second network abstraction layer data to the data receiving end. This scheme divides the network abstraction layer data in the video data packet into first network abstraction layer data and second network abstraction layer data, generates custom network abstraction layer data based on the first network abstraction layer data, and then encrypts the second network abstraction layer data. The generated custom network abstraction layer data and the encrypted second network abstraction layer data ensure that the video will not be tampered with during transmission. Compared with the traditional upgrade method of replacing the camera, this method can reduce costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0018] FIG1 is a flow chart of a video anti-tampering method provided by one embodiment of the present application;

[0019] FIG2 is a flow chart of another video anti-tampering method provided by an embodiment of the present application;

[0020] FIG3 is a schematic diagram of a video anti-tampering device provided by an embodiment of the present application;

[0021] FIG4 is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

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

[0023] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0024] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0025] Video anti-tampering method

[0026] FIG1 is a flow chart of a video tampering prevention method provided by an embodiment of the present application. As shown in FIG1 , the video tampering prevention method includes steps 101 to 105:

[0027] Step 101: Parse the video data packet from the video capture device to obtain network abstraction layer data.

[0028] Network cameras or NVRs offer a variety of IP-based transmission protocols. Real-time video streams are transmitted over IP networks, using a combination of protocols to adapt to various complex network transmission environments. The most common are the Real-time Transport Protocol and the Real-time Transport Control Protocol. These protocols essentially package the encoded raw video stream into a TCP or UDP network data stream. Intermediate routers do not modify the TCP / UDP packets.

[0029] By parsing the TCP and UDP video data packets from the video acquisition device, the network abstraction layer data after video encoding is obtained.

[0030] Step 102: Detect the type of network abstraction layer data.

[0031] In the Network Abstraction Layer (NAL) data, images are called sequences (a sequence is a segment of data with common characteristics). When an image differs significantly from the previous one and cannot be generated by reference to the previous frame, the previous sequence ends and the next begins, generating a complete frame for that image. Images are organized into sequences. A sequence is the data stream resulting from the encoding of a segment of images, starting with a keyframe and ending with the next keyframe. Therefore, NAL data is organized into video sequences, which refer to a group of highly correlated images encoded using the same encoding parameters and decoded independently of the rest of the video. In H.264, a video sequence corresponds to the set of images between the two initial, instantaneously decoded frames.

[0032] Each sequence is divided into two types, one is a sequence parameter set and the other is a non-sequence parameter set.

[0033] Step 103: When first network abstraction layer data of a sequence parameter set type is detected, custom network abstraction layer data is generated according to the first network abstraction layer data.

[0034] The custom network abstraction layer data includes the encrypted initial key.

[0035] 5-bit binary can represent 32 different types of custom network abstraction layer data. 0-23 are used by the RTP network high-level protocol, 24-31 are user-defined types, and the custom network abstraction layer data in this solution uses 30.

[0036] Before sending the first network abstraction layer data of the sequence parameter set type, it is necessary to insert a custom network abstraction layer data, wherein the custom network abstraction layer data is generated according to the first network abstraction layer data.

[0037] Step 104: Encrypt the second network abstraction layer data that follows the first network abstraction layer data and is of a non-sequence parameter set type according to the initial key.

[0038] When second network abstraction layer data with a non-sequence parameter set is detected, the initial key in the custom network abstraction layer data is used to encrypt the second network abstraction layer data, ensuring that the second network abstraction layer data will not be tampered with at will during transmission, thereby ensuring the security of the second network abstraction layer data transmission.

[0039] Step 105: Send the custom network abstraction layer data, the first network abstraction layer data, and the encrypted second network abstraction layer data to the data receiving end in sequence.

[0040] In an embodiment of the present application, the video data packet of the video capture device is parsed to obtain network abstraction layer data, the type of the network abstraction layer data is detected, and after the first network abstraction layer data of the detected type is a sequence parameter set, custom network abstraction layer data is generated based on the first network abstraction layer data, and then the second network abstraction layer data of the non-sequence parameter set type is detected and the second network abstraction layer data is encrypted. Finally, the custom network abstraction layer data, the first network abstraction layer data and the encrypted second network abstraction layer data are sent to the data receiving end. After the data receiving end receives these data, it is necessary to use the stored public key and the identification code of the video capture device to parse and verify the network abstraction layer data. The verification ensures that the network abstraction layer data will not be tampered with. Compared with the traditional upgrade method of replacing the camera, this method can reduce costs.

[0041] In a possible implementation, generating network abstraction layer data of a user-defined type according to the first network abstraction layer data includes:

[0042] Perform a hash operation on the first network abstraction layer data to obtain a first hash value.

[0043] Generate custom network abstraction layer data according to the first hash value.

[0044] The type of the first network abstraction layer data is a sequence parameter set, which is used to transmit parameter encoding of the sequence segment. Therefore, in order to ensure that the first network abstraction layer data can be encoded normally, the sequence parameter set must be transmitted first. Usually, the sequence parameter set is given a higher transmission priority or a more secure channel is used to transmit the sequence parameter set.

[0045] This solution is to transmit the sequence parameter set by generating a more secure channel, namely, custom network abstraction layer data.

[0046] By performing a hash operation on the first network abstraction layer data, the first network abstraction layer data generates an information summary code, that is, a first hash value; and according to the first hash value, the custom network abstraction layer data is generated.

[0047] In an embodiment of the present application, custom network abstraction layer data is generated according to the first network abstraction layer data, and is used to transmit the first network abstraction layer data of a sequence parameter set type, so that the sequence parameter set has a transmission priority.

[0048] In one possible implementation, generating custom network abstraction layer data according to the first hash value includes:

[0049] Generate the initial secret key through a random function.

[0050] An initial key is randomly generated according to a random function, and the initial key is used by a data receiving end to parse received video data.

[0051] Signature data is generated according to the first hash value and the initial key.

[0052] The first Network Abstraction Layer data identified as a sequence parameter set is small and critical data. Therefore, the first Network Abstraction Layer data must be signed to ensure that it cannot be tampered with. Since the first hash value is obtained by performing a hash operation on the first Network Abstraction Layer data, generating signature data based on the first hash value and the initial key essentially means signing the first Network Abstraction Layer data.

[0053] Generate custom network abstraction layer data including the identification code and signature data of the video acquisition device.

[0054] The video capture device identification code is not encrypted, but the signature data is encrypted. The generated custom network abstraction layer data includes the video capture device identification code and signature data.

[0055] In an embodiment of the present application, signature data is generated based on the first hash value and the initial key, and finally custom network abstraction layer data including the identification code and signature data of the video acquisition device is generated, which is used for wired transmission of the first network abstraction layer data of the sequence parameter set type.

[0056] In one possible implementation, generating signature data according to the first hash value and the initial key includes:

[0057] Get the timestamp based on the current time.

[0058] In an implementable example, the timestamp may be recorded in the format of year, month, and day, such as 2022.1.1.

[0059] A hash operation is performed on the identification code, the timestamp, the initial key, and the first hash value to obtain a second hash value.

[0060] Since the total data volume of the identification code, timestamp, initial key and first hash value may reach more than 1kB, the large data volume will take up a lot of time and space, so the identification code, the timestamp, the initial key and the first hash value must be hashed to obtain the second hash value.

[0061] The timestamp, the initial key and the second hash value are encrypted using the private key of the video acquisition device to obtain signature data.

[0062] In this embodiment of the present application, when all important parameters are carried in a custom type of network abstraction layer data, the data volume is large, which consumes a considerable amount of time and space. Therefore, a second hash operation is performed on the identification code, the timestamp, the initial key, and the first hash value to obtain a second hash value. The timestamp, the initial key, and the second hash value are then encrypted using the private key of the video capture device to obtain signature data. This ensures that the custom type of network abstraction layer data carries a small amount of data and that the encrypted data cannot be easily tampered with, thus ensuring secure data transmission.

[0063] In one possible implementation, performing a hash operation on the first network abstraction layer data to obtain a first hash value includes:

[0064] A hash operation is performed on the first network abstraction layer data using the SM3 hash algorithm to obtain a first hash value.

[0065] When detecting first network abstraction layer data whose type is a sequence parameter set, a first hash value is obtained by performing calculation using an SM3 hash function. The first hash value may be a digest value.

[0066] Encrypting the timestamp, the initial key, and the second hash value using a private key of the video capture device to obtain signature data includes:

[0067] According to the private key of the video acquisition device, the timestamp, the initial key and the second hash value are encrypted by the SM2 encryption algorithm to obtain signature data.

[0068] The timestamp, the initial key and the second hash value may be tampered with during the data transmission process, so they need to be encrypted using the SM2 encryption algorithm based on the private key of the video acquisition device to obtain signature data.

[0069] In an embodiment of the present application, a hash operation is performed on the first network abstraction layer data using the SM3 hash algorithm to obtain a first hash value, so that less space and time are occupied during data transmission. The timestamp, the initial key and the second hash value are encrypted using the SM2 encryption algorithm to obtain signature data, so that the data is not tampered with, thereby ensuring the security of data transmission.

[0070] FIG2 is a flowchart of another video anti-tampering method provided by an embodiment of the present application. As shown in FIG2, step 104 of encrypting the second network abstraction layer data of the non-sequential parameter set type following the first network abstraction layer data according to the initial key includes sub-steps 1041 to 1042:

[0071] Sub-step 1041: Generate a key stream using the ZUC algorithm according to the initial key.

[0072] The ZUC (Zu Chongzhi) algorithm is a stream cipher standard that generates a key stream based on an initial key using the ZUC algorithm.

[0073] Sub-step 1042: Encrypt the second network abstraction layer data using the key stream.

[0074] In the embodiment of the present application, the second network abstraction layer data is encrypted by using the generated key stream, so that the second network abstraction layer data will not be tampered with at will during the transmission process, thereby ensuring real-time and secure transmission of video data.

[0075] Optimally, by using the SM2 encryption algorithm, SM3 hashing algorithm, and ZUC algorithm, all of which are domestic cryptographic algorithms, video capture equipment can be modified to adopt domestic cryptographic algorithms, eliminating the need for manual training or software integration, and can simply be connected to the network cable, significantly reducing the engineering and personnel costs associated with domestic cryptographic modification. This can authenticate online video content, prevent tampering, and provide copyright protection, especially for traceable video sources on self-media websites. Any video content transmitted over the network can be authenticated and encrypted, providing strong compatibility.

[0076] Video anti-tampering device

[0077] FIG3 is a schematic diagram of a video anti-tampering device provided in an embodiment of the application. As shown in FIG3 , the video anti-tampering device includes:

[0078] The parsing module 301 is used to parse the video data packets from the video acquisition device to obtain network abstraction layer data;

[0079] Detection module 302, used to detect the type of network abstraction layer data;

[0080] The generating module 303 is configured to generate network abstraction layer data of a user-defined type; when the detecting module detects first network abstraction layer data of a sequence parameter set type, the generating module generates network abstraction layer data of a user-defined type based on the first network abstraction layer data;

[0081] An encryption module 304 is configured to encrypt, according to an initial key, second network abstraction layer data following the first network abstraction layer data and of a non-sequence parameter set type;

[0082] The sending module 305 is used to send data to the receiving end; the sent data includes network abstraction layer data of a user-defined type, first network abstraction layer data and encrypted second network abstraction layer data.

[0083] In an embodiment of the present application, parsing module 301 parses video data packets from a video capture device to obtain network abstraction layer data. Detection module 302 detects the type of the network abstraction layer data. Generation module 303, upon detecting first network abstraction layer data of a sequence parameter set type, generates custom network abstraction layer data based on the detected first network abstraction layer data. Encryption module 304 encrypts second network abstraction layer data using an initial key. Transmission module 305 finally transmits the custom network abstraction layer data, the first network abstraction layer data, and the encrypted second network abstraction layer data to a data receiving end. This solution separates the network abstraction layer data in the video data packet into first network abstraction layer data and second network abstraction layer data, generates custom network abstraction layer data based on the first network abstraction layer data, and then encrypts the second network abstraction layer data. The generated custom network abstraction layer data and the encrypted second network abstraction layer data ensure that the video is not tampered with or eavesdropped during transmission. This solution can also be used to authenticate the source or copyright of the video. Compared to traditional camera upgrade methods, this method can reduce costs.

[0084] It should be noted that the above-mentioned video anti-tampering device and the above-mentioned video anti-tampering method embodiment are based on the same concept. The specific content can be found in the description of the above-mentioned video anti-tampering method embodiment, which will not be repeated here.

[0085] electronic devices

[0086] 4 , a schematic structural diagram of an electronic device according to an embodiment of the present application is provided. The specific embodiment of the present application does not limit the specific implementation of the electronic device.

[0087] As shown in FIG. 4 , the electronic device 400 may include a processor 402 , a communications interface 404 , a memory 406 , and a communication bus 408 .

[0088] in:

[0089] The processor 402 , the communication interface 404 , and the memory 406 communicate with each other via a communication bus 408 .

[0090] The communication interface 404 is used to communicate with other electronic devices or servers.

[0091] The processor 402 is configured to execute the program 410 , and specifically to execute the relevant steps in the above-mentioned video anti-tampering method embodiment.

[0092] Specifically, the program 410 may include program codes, which include computer operation instructions.

[0093] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs, or may be processors of different types, such as one or more CPUs and one or more ASICs.

[0094] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0095] The program 410 may be specifically configured to enable the processor 402 to execute the video anti-tampering method in any of the aforementioned embodiments.

[0096] The specific implementation of each step in program 410 can refer to the corresponding description of the corresponding steps and units in any of the aforementioned video anti-tampering method embodiments, and will not be repeated here. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the aforementioned method embodiments, and will not be repeated here.

[0097] In an embodiment of the present application, the video data packet of the video capture device is parsed to obtain network abstraction layer data, the type of the network abstraction layer data is detected, and after the first network abstraction layer data of the detected type is a sequence parameter set, custom network abstraction layer data is generated based on the first network abstraction layer data, and then the second network abstraction layer data of the non-sequence parameter set type is detected and the second network abstraction layer data is encrypted. Finally, the custom network abstraction layer data, the first network abstraction layer data and the encrypted second network abstraction layer data are sent to the data receiving end. After the data receiving end receives these data, it is necessary to use the stored public key and the identification code of the video capture device to parse and verify the network abstraction layer data. The verification ensures that the network abstraction layer data will not be tampered with. Compared with the traditional upgrade method of replacing the camera, this method can reduce costs.

[0098] Computer storage media

[0099] The present application also provides a computer-readable storage medium storing instructions for causing a machine to execute the video anti-tampering method described herein. Specifically, a system or device equipped with a storage medium can be provided, wherein the storage medium stores software program code that implements the functions of any of the above embodiments, and a computer (or CPU or MPU) of the system or device can read and execute the program code stored in the storage medium.

[0100] In this case, the program code read from the storage medium itself can realize the function of any one of the above embodiments, so the program code and the storage medium storing the program code constitute part of this application.

[0101] Examples of storage media for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code can be downloaded from a server computer via a communication network.

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

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

[0104] Computer program product

[0105] An embodiment of the present application also provides a computer program product, including computer instructions, which instruct a computing device to execute operations corresponding to any one of the above-mentioned multiple method embodiments.

[0106] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.

[0107] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or as computer code that is originally stored in a remote recording medium or a non-temporary machine-readable medium and will be stored in a local recording medium, which is implemented by downloading the computer code through a network, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor or programmable or dedicated hardware (such as an ASIC or FPGA). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (for example, RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the image annotation method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the image annotation method shown herein, the execution of the code converts the general-purpose computer into a dedicated computer for executing the verification code generation method shown herein.

[0108] Those skilled in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of this application.

[0109] The above implementation methods are only used to illustrate the embodiments of the present application, and are not intended to limit the embodiments of the present application. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of the present application, and the scope of patent protection of the embodiments of the present application should be defined by the claims.

Claims

1. A video anti-tampering method, characterized in that: The video anti-tampering method comprises: Parse the video data packets from the video acquisition device to obtain network abstraction layer data; Detecting the type of the network abstraction layer data; After detecting the first network abstraction layer data of the type of sequence parameter set, generating custom network abstraction layer data according to the first network abstraction layer data, wherein the custom network abstraction layer data includes an encrypted initial key; Encrypting, according to the initial key, second network abstraction layer data following the first network abstraction layer data and of a non-sequence parameter set type; The custom network abstraction layer data, the first network abstraction layer data and the encrypted second network abstraction layer data are sent to a data receiving end in sequence.

2. A video anti-tampering method according to claim 1, characterized in that: The step of generating custom network abstraction layer data from the first network abstraction layer data is: Performing a hash operation on the first network abstraction layer data to obtain a first hash value; Generate custom network abstraction layer data according to the first hash value.

3. A video anti-tampering method according to claim 2, characterized in that: The steps of generating custom network abstraction layer data according to the first hash value are: Generate the initial secret key through a random function; Generate signature data according to the first hash value and the initial key; Generate custom network abstraction layer data including the identification code of the video acquisition device and the signature data.

4. A video anti-tampering method according to claim 3, characterized in that: The steps of generating signature data according to the first hash value and the initial key are: Get the timestamp based on the current time; Performing a hash operation on the identification code, the timestamp, the initial key, and the first hash value to obtain a second hash value; The timestamp, the initial key and the second hash value are encrypted using the private key of the video acquisition device, and signature data is generated.

5. A video anti-tampering method according to claim 4, characterized in that: The algorithm for obtaining the first Hash value is the SM3 hash algorithm; the algorithm for encrypting the timestamp, the initial key and the second Hash value is the SM2 encryption algorithm.

6. A video anti-tampering method according to any one of claims 1 to 5, characterized in that: The step of encrypting the second network abstraction layer data which follows the first network abstraction layer data and is of a non-sequence parameter set type is: Generate a key stream using a ZUC algorithm according to the initial key; The second network abstraction layer data is encrypted using the key stream.

7. A video anti-tampering device, characterized in that: The video anti-tampering device comprises: The parsing module is used to parse the video data packets from the video acquisition device to obtain the network abstraction layer data; A detection module, used to detect the type of the network abstraction layer data; a generating module, configured to generate network abstraction layer data of a user-defined type; and when the detecting module detects that the type of the network abstraction layer data is the first network abstraction layer data of a sequence parameter set, generating network abstraction layer data of a user-defined type according to the first network abstraction layer data; an encryption module, configured to encrypt second network abstraction layer data following the first network abstraction layer data and of a non-sequence parameter set type; The sending module is used to send data to the receiving end; the sent data includes the network abstraction layer data of the user-defined type, the first network abstraction layer data and the encrypted second network abstraction layer data.

8. An electronic device, characterized in that: The electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the method according to any one of claims 1 to 6.

9. A computer storage medium, characterized in that: The computer storage medium stores a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.

10. A computer program product, characterized in that: The computer program product is tangibly stored on a computer-readable medium and comprises computer-executable instructions which, when executed, cause at least one processor to perform the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Media file encryption key management method, system and device and storage medium

    CN109635586A

  • Audio and video encryption transmission method and device, electronic device and storage medium

    CN111083424A

  • Video tamper-proofing method and device, electronic equipment and storage medium

    CN115866299A

  • Video tamper-proofing method and device, electronic equipment and storage medium

    CN116346444A

  • Method of encoding and decoding bytestream with NAL structure

    KR1020140133690A