CN111277802B - Video code stream processing method, device, equipment and storage medium - Google Patents

Video code stream processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN111277802B
CN111277802B CN202010138931.3A CN202010138931A CN111277802B CN 111277802 B CN111277802 B CN 111277802B CN 202010138931 A CN202010138931 A CN 202010138931A CN 111277802 B CN111277802 B CN 111277802B
Authority
CN
China
Prior art keywords
code stream
node
scrambling
key
scrambling key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010138931.3A
Other languages
Chinese (zh)
Other versions
CN111277802A (en
Inventor
吴向兵
汤晓斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN202010138931.3A priority Critical patent/CN111277802B/en
Publication of CN111277802A publication Critical patent/CN111277802A/en
Application granted granted Critical
Publication of CN111277802B publication Critical patent/CN111277802B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/2347Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving video stream encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4405Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving video stream decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/91Television signal processing therefor
    • H04N5/913Television signal processing therefor for scrambling ; for copy protection

Abstract

The embodiment of the invention discloses a method, a device and equipment for processing a video code stream and a storage medium. The method comprises the following steps: encrypting the scrambling key original text by adopting a key of the next node to obtain a scrambling key ciphertext; sending the scrambling key ciphertext and the scrambling code stream to the next node so that the next node determines the scrambling key ciphertext; and the scrambling key original text is used for descrambling the scrambling code stream to obtain the target code stream. By adopting the scheme, the scrambled code stream and the scrambling key can be simultaneously transmitted only by performing code stream negotiation key on the code stream transmitting end and the code stream receiving end and encrypting the generated scrambling key aiming at the transmission processing of the scrambled code stream, the scrambling or descrambling of the scrambled code stream can be realized without obtaining the scrambling key by the key server and the management server in the whole process, the normal transmission of the scrambled code stream can be realized, and any node can be normally decoded without generating a screen due to the fact that the server is not required to obtain the scrambling key.

Description

Video code stream processing method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of monitoring, in particular to a method, a device, equipment and a storage medium for processing a video code stream.
Background
In a video monitoring system, scrambling transmission needs to be performed on a video code stream, wherein a common code stream scrambling mode is to realize scrambling and descrambling of the video code stream depending on a scrambling server. For example, both the code stream sending end and the code stream receiving end obtain the scrambling key from the scrambling server to descramble the scrambled code stream.
However, when the scrambling key is obtained, each node for transmitting and receiving the code stream needs to communicate with the scrambling server to obtain the scrambling key for descrambling, that is, the scrambling server needs to be relied on to scramble and descramble the code stream, so that an interaction path is increased, and the transmission of the code stream becomes complicated. Moreover, it takes a certain time to acquire the scrambling key, during which there is a decoding overhead.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a storage medium for processing a video code stream, which are used for realizing the transmission of an encrypted code stream between two nodes without depending on an additional server and can realize normal decoding.
In a first aspect, an embodiment of the present invention provides a method for processing a video bitstream, where the method is executed by a current node, and the method includes:
encrypting the scrambling key original text by adopting a key of the next node to obtain a scrambling key ciphertext;
sending the scrambling key ciphertext and the scrambling code stream to a next node so that the next node determines a scrambling key plaintext; and the scrambling key original text is used for descrambling the scrambling code stream to obtain the target code stream.
In a second aspect, an embodiment of the present invention further provides a method for processing a video bitstream, where the method is executed by a bitstream receiving node, and the method includes:
receiving a scrambling key ciphertext and a scrambling code stream sent by a previous node, wherein the scrambling key ciphertext is obtained by encrypting a scrambling key original text by using a key of a code stream receiving node;
and determining the scrambling key original text for descrambling the scrambling code stream to obtain the target code stream.
In a third aspect, an embodiment of the present invention further provides a device for processing a video bitstream, where the device is configured at a current node, and the device includes:
the key encryption module is used for encrypting the scrambling key text by adopting the key of the next node to obtain a scrambling key ciphertext;
the code stream sending module is used for sending the scrambling key ciphertext and the scrambling code stream to a next node so as to enable the next node to determine a scrambling key original text; and the scrambling key original text is used for descrambling the scrambling code stream to obtain the target code stream.
In a fourth aspect, an embodiment of the present invention further provides a device for processing a video bitstream, where the device is configured to be executed by a bitstream receiving node, and the device includes:
the code stream receiving module is used for receiving a scrambling key ciphertext and a scrambling code stream sent by a previous node, wherein the scrambling key ciphertext is obtained by encrypting a scrambling key original text by using a key of the code stream receiving node;
and the scrambling key determining module is used for determining the scrambling key original text and descrambling the scrambling code stream to obtain the target code stream.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
storage means for storing one or more programs;
the one or more programs are executed by the one or more processors, so that the one or more processors implement the processing method of the video code stream as any of the video code streams provided in the embodiments of the present invention.
In a sixth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the processing method of a video bitstream as any one of the video bitstream processing methods provided in the embodiments of the present invention.
The embodiment of the invention provides a processing method of a video code stream, which comprises the steps of after a scrambling code stream and a scrambling key of the scrambling code stream are obtained, encrypting a scrambling key text by adopting a key of a next node to obtain a scrambling key ciphertext, and then sending the scrambling key ciphertext and the scrambling code stream to the next node to ensure that the next node determines the scrambling key text so as to descramble. By adopting the scheme, the scrambled code stream and the scrambling key can be simultaneously transmitted only by performing code stream negotiation key on the code stream transmitting end and the code stream receiving end and encrypting the generated scrambling key aiming at the transmission processing of the scrambled code stream, the scrambling or descrambling of the scrambled code stream can be realized without obtaining the scrambling key by the key server and the management server in the whole process, the normal transmission of the scrambled code stream can be realized, and any decoding node can normally decode without generating a screen due to the fact that the server cannot be used for obtaining the scrambling key.
The above summary of the present invention is merely an overview of the technical solutions of the present invention, and the present invention can be implemented in accordance with the content of the description in order to make the technical means of the present invention more clearly understood, and the above and other objects, features, and advantages of the present invention will be more clearly understood.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart of a method for processing a video bitstream according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a video monitoring networking and a video stream trend provided in the embodiment of the present invention;
fig. 3 is a schematic diagram of a process of scrambling and descrambling a code stream provided in an embodiment of the present invention;
fig. 4 is a schematic diagram of a process performed on a scrambling key according to an embodiment of the present invention;
fig. 5 is a flowchart of another video bitstream processing method provided in the embodiment of the present invention;
fig. 6 is a schematic diagram of another process of scrambling and descrambling a code stream provided in the embodiment of the present invention;
fig. 7 is a schematic diagram of a process of scrambling and descrambling transmission of a multi-transmission node provided in the embodiment of the present invention;
fig. 8 is a flowchart of a method for processing a video bitstream according to another embodiment of the present invention;
fig. 9 is a block diagram of a processing apparatus for video streams provided in an embodiment of the present invention;
fig. 10 is a block diagram of another video stream processing apparatus provided in the embodiment of the present invention;
fig. 11 is a schematic structural diagram of an electronic device provided in an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Fig. 1 is a flowchart of a method for processing a video bitstream according to an embodiment of the present invention. The embodiment of the invention can be suitable for the condition of processing the video code stream, in particular to the condition of processing the video code stream in a video monitoring system. The method can be executed by a processing device of the video code stream, and the device can be realized in a software and/or hardware mode and is integrated on any electronic equipment with a network communication function. For example, the electronic device includes, but is not limited to, a server, a terminal device, and the like. As shown in fig. 1, the method for processing a video bitstream provided in the embodiment of the present invention may include the following steps:
s110, if the current node is a code stream sending node, determining a scrambling key original text and a target code stream.
In this embodiment, fig. 2 is a schematic diagram of a video monitoring networking and a video stream trend provided in the embodiment of the present invention. Referring to fig. 2, in the video surveillance system, the IPC shown in fig. 2 belongs to an encrypted bitstream source end node device, i.e., a bitstream transmitting node; the IPC client, decoder and NVR client shown in fig. 2 belong to a scrambled code stream terminal node device, i.e., a code stream receiving node; the management platform and NVR shown in fig. 2 belong to a scrambled stream transit node device, i.e., a stream transmission node. In addition, the dashed arrows shown in fig. 2 indicate the transmission trend of the scrambled code stream, and the solid lines indicate the management connection between the devices.
In this embodiment, fig. 3 is a schematic diagram of a process of scrambling and descrambling a code stream provided in an embodiment of the present invention. Referring to fig. 3, the processing method of the video code stream in this embodiment is executed by a current node, where the current node is a code stream sending node and is marked as a source end node of the scrambled code stream, a next node of the current node may be a next code stream transmission node or a code stream receiving node, the code stream receiving node is a terminal node of the scrambled code stream, and the code stream transmission node is a node located between the source end node of the scrambled code stream and the terminal node of the scrambled code stream and used for performing relay transmission of the scrambled code stream.
In this embodiment, referring to fig. 3, taking the current node as a code stream sending node and the next node as a code stream receiving node or a code stream transmitting node as an example, the next node may generate a Public-Private key pair for encrypting the scrambling key, for example, the next node may generate an RSA Public-Private key pair (the RSA Public-Private key pair may be specifically denoted as RSA _ Public, RSA _ Private). And then, the next node can send a code stream request to the current node, and the code stream request carries the public key in the generated public-private key pair. The current node can receive the code stream request sent by the next node and the public key carried in the code stream request. After receiving the code stream request, the current node may randomly generate a scrambling Key original text, here denoted as Key _ a, for scrambling the video code stream.
In an alternative example, taking the RTSP protocol as an example to describe a public key negotiation process for encrypting a "scrambling key", a next node (e.g., a code stream relay node or a code stream receiving node) initiates an RTSP descriptor request, and a current node (e.g., a code stream sending node) responds to the RTSP descriptor request according to whether a code stream scrambling option is configured, so as to determine whether to encrypt a scrambling key original text with a key of the next node to obtain a scrambling key ciphertext. And during the negotiation process, configuration information of the scrambleattribute is also included, and the configuration information is used for indicating whether the code stream is encrypted or not. At the code stream sending node, if the scrambles attribute is not analyzed, processing is carried out according to the normal non-scrambled code stream request flow, if the scrambles attribute is analyzed, a public and private key pair is generated, and a public key field is required to be transmitted through setup signaling. In addition, at the code stream sending node, if the code stream scrambling is configured but the keymgmt attribute and the public key message are not analyzed, the session request is terminated, otherwise, the public key information is saved, and the subsequent code stream signaling negotiation process is completed to complete the public key transmission.
S120, the code stream sending node encrypts the target code stream by adopting the scrambling key original text to obtain the scrambling code stream.
In this embodiment, referring to fig. 3, the current node may further determine an object code stream to be transmitted, and scramble the object code stream to be transmitted by using the scrambling key original text to obtain a scrambled code stream after scrambling. Optionally, the current node may scramble the target code stream to be transmitted by using a scrambling key original text through a preset scrambling algorithm, so as to obtain a scrambled code stream.
S130, the code stream sending node encrypts the scrambling key text by adopting the key of the next node to obtain a scrambling key ciphertext.
In this embodiment, referring to fig. 3, the current node may encrypt the original text of the generated scrambling Key according to the public Key in the public-private Key pair generated by the next node carried in the code stream request, so as to obtain a cipher text of the scrambling Key, which is denoted as RSA (Key _ a). The method has the advantages that the scrambling key needs to be decrypted and re-encrypted in each code stream transmission, the encrypted scrambling key cryptographs transmitted at two ends are different, the scrambling key text included in the encrypted scrambling key cryptographs can be obtained only after the next node decrypts the cryptographs, and the safety is improved.
S140, the code stream sending node sends the scrambling key ciphertext and the scrambling code stream to the next node so that the next node determines the scrambling key ciphertext; and the scrambling key original text is used for descrambling the scrambling code stream to obtain the target code stream.
In this embodiment, referring to fig. 3, after determining the scrambling key ciphertext and the scrambling code stream, the scrambling key ciphertext obtained at the current node may be encapsulated in the extension information of the target code stream, and then the scrambling key ciphertext encapsulated in the scrambling code stream and the extension information of the target code stream may be sent to the next node. For example, the current node encapsulates the scrambling Key ciphertext RSA (Key _ a) into the SEI information of each I frame of the target code stream, and then sends the encapsulated scrambling Key ciphertext and the scrambled code stream to the next node.
In this embodiment, referring to fig. 3, the next node may receive the scrambling key ciphertext and the scrambling code stream sent by the current node, and the next node may obtain the scrambling key ciphertext from the extended information and decrypt the scrambling key ciphertext by using the private key of the generated public-private key pair to obtain the scrambling key plaintext. The scrambling key original text can be used for descrambling the scrambling code stream to obtain the target code stream. For example, after receiving the scrambled code stream, the next node may obtain the scrambling Key ciphertext RSA (Key _ a) from the SEI information of the I-frame header of the scrambled code stream, and decrypt the scrambling Key ciphertext RSA (Key _ a) through the RSA private Key of the generated public-private Key pair to obtain the scrambling Key plaintext. Therefore, if the next node is a code stream receiving node, the scrambling code stream can be descrambled by using the scrambling key original text to obtain the target code stream, and the target code stream is played. If the next node is a code stream transmission node, the scrambling key original text can be re-encrypted and transmission is continued to the next node.
In an optional manner of this embodiment, the code stream sending node may update the generated scrambling key at regular time, so that when the next target code stream is sent, the updated scrambling key may be used to scramble the next target code stream, and the new scrambling key is encrypted to obtain a new scrambling key ciphertext. Therefore, the code stream sending node can continue to send the scrambled code stream scrambled by using the new scrambling key and the new scrambling key ciphertext to the next node. The method has the advantages that the code stream sending node can change the scrambling key at regular time, so that the security is improved, and the situation that the possibility of being cracked is increased because the scrambling key is always fixed is avoided.
In an alternative example, fig. 4 is a schematic diagram of a process performed on a scrambling key according to an embodiment of the present invention. Referring to fig. 4, the code stream transmitting node may scramble the code stream using Key _ S, where Key _ S ═ f (Key _ a, Rand _ B) ═ Checksum (SHA2(Key _ a | | Rand _ a | | | Rand _ B | "JiaraA")). Rand _ a and Rand _ B are pseudo random numbers that are generated by a codestream transmitting node for a seed according to the current hours since 1970, namely, updates are generated once per hour. The code stream sending node can encrypt Key _ A by using an RSA public Key in the code stream request to obtain a scrambling Key ciphertext, and then the scrambling Key ciphertext and the Rand _ B are encapsulated in SEI information of the code stream so as to send the scrambling Key ciphertext and the scrambling code stream to the next node.
The embodiment of the invention provides a method for processing a video code stream, which adopts the scheme of the application, aiming at the transmission processing of the scrambled code stream, only a code stream sending end and a code stream receiving end need to negotiate a key to encrypt the generated scrambling key, so that the scrambled code stream and the scrambling key can be simultaneously transmitted, the scrambling or descrambling of the scrambled code stream can be realized without obtaining the scrambling key by a key server and a management server in the whole process, the normal transmission of the scrambled code stream can be realized, the distributed video scrambling and descrambling which do not depend on a central management server are realized, and the scrambling key can not be obtained by the server, so that any decoding node can normally decode without generating a screen. In addition, the scrambling key can be updated in real time in the transmission process of the code stream, the key is prevented from being cracked after being acquired for a long time, and any decoding node can decode normally without screen waste in the updating process.
Fig. 5 is a flowchart of another processing method for video streams provided in the embodiment of the present invention, and the embodiment of the present invention is further optimized on the basis of the above embodiment, and the embodiment of the present invention may be combined with various alternatives in one or more of the above embodiments. As shown in fig. 5, the method for processing a video bitstream provided in the embodiment of the present invention may include the following steps:
s510, if the current node is a code stream transmission node, receiving a scrambling code stream and a scrambling key ciphertext from a code stream sending node or a previous transmission node; and the scrambling key ciphertext is obtained by encrypting the scrambling key original text by adopting the key of the local node.
In this embodiment, fig. 6 is a schematic diagram of another process of scrambling and descrambling a code stream provided in this embodiment of the present invention. Referring to fig. 6, the processing method of the video code stream in this embodiment is executed by a current node, where the current node is a code stream transmission node and is recorded as a relay node of the scrambled code stream, a node next to the current node may be a code stream receiving node or a next code stream transmission node, and the code stream transmission node is a node located between a source end node of the scrambled code stream and a terminal node of the scrambled code stream and configured to perform relay transmission of the scrambled code stream.
In this embodiment, referring to fig. 6, taking the current node as a code stream transmission node and the next node as a code stream receiving node or a next code stream transmission node as an example, the current code stream transmission node may receive the scrambled code stream and the scrambled key ciphertext from the code stream sending node or the previous transmission node. The scrambling key ciphertext obtained from the previous node is obtained by encrypting the scrambling key original text by the code stream sending node or the previous transmission node by using the key of the local node (namely, the current code stream transmission node).
S520, the code stream transmission node decrypts the scrambling key ciphertext by adopting the key of the local node to obtain the scrambling key plaintext.
In this embodiment, before sending the code stream request to the code stream sending node or the previous transmission node, the code stream transmission node not only generates the public key, but also generates the private key. At this time, after receiving the scrambled code stream and the scrambled key ciphertext from the code stream sending node or the last transmission node, the private key generated by the local node can be used for decrypting the scrambled key ciphertext to obtain the scrambled key original text. For example, the code stream transmission node may decrypt a scrambling Key ciphertext included in SEI information in an I frame of a scrambled code stream by using an RSA private Key to obtain a scrambling Key plaintext Key _ a.
S530, the code stream transmission node encrypts the scrambling key original text by adopting the key of the next node to obtain a scrambling key ciphertext.
In this embodiment, referring to fig. 6, a next node of the code stream transmission node may generate a Public-Private key pair for encrypting the scrambling key, for example, the next node may generate an RSA Public-Private key pair (RSA Public-Private key pair may be specifically denoted as: RSA _ Public, RSA _ Private). And then, the next node can send a code stream request to the code stream transmission node, and the code stream request carries the public key in the generated public-private key pair. The code stream transmission node can receive a code stream request sent by the next node and a public key carried in the code stream request. Therefore, the code stream transmission node can re-encrypt the scrambling key original text obtained after decryption according to the public key in the public-private key pair generated by the next node carried in the code stream request sent by the next node to obtain the scrambling key ciphertext after re-encryption.
S540, the code stream transmission node sends the scrambling key ciphertext and the scrambling code stream to the next node so that the next node determines the scrambling key ciphertext; and the scrambling key original text is used for descrambling the scrambling code stream to obtain the target code stream.
In this embodiment, referring to fig. 6, after determining the scrambling key ciphertext and the scrambling code stream, the code stream transmission node may replace the previous scrambling key ciphertext encapsulated in the extension information of the target code stream with the re-encrypted scrambling key ciphertext, and send the scrambling code stream and the replaced scrambling key ciphertext to the next node.
In this embodiment, referring to fig. 6, the next node may receive the scrambling key ciphertext and the scrambling code stream sent by the code stream transmission node, and the next node may obtain the scrambling key ciphertext from the extended information, and decrypt the scrambling key ciphertext by using the private key of the generated public-private key pair to obtain the scrambling key plaintext. The scrambling key original text can be used for descrambling the scrambling code stream to obtain the target code stream. Therefore, if the next node is a code stream receiving node, the scrambling code stream can be descrambled by using the scrambling key original text to obtain the target code stream, and the target code stream is played. Fig. 7 is a schematic diagram of a process of scrambling and descrambling transmission by multiple transmission nodes according to an embodiment of the present invention. Referring to fig. 7, if the next node is the next code stream transmission node, that is, if there are multiple transmission nodes between the code stream sending node and the code stream receiving node, the scrambling key original text may be re-encrypted and transmitted to the next node.
The embodiment of the invention provides a method for processing a video code stream, which adopts the scheme of the application, aiming at the transmission processing of the scrambled code stream, only a code stream sending end and a code stream receiving end need to negotiate a key to encrypt the generated scrambling key, so that the scrambled code stream and the scrambling key can be simultaneously transmitted, the scrambling or descrambling of the scrambled code stream can be realized without obtaining the scrambling key by a key server and a management server in the whole process, the normal transmission of the scrambled code stream can be realized, the distributed video scrambling and descrambling which do not depend on a central management server are realized, and the scrambling key can not be obtained by the server, so that any decoding node can normally decode without generating a screen. In addition, the scrambling key can be updated in real time in the transmission process of the code stream, the key is prevented from being cracked after being acquired for a long time, and any decoding node can decode normally without screen waste in the updating process.
Fig. 8 is a flowchart of another processing method for video streams provided in the embodiment of the present invention, and the embodiment of the present invention is further optimized on the basis of the above embodiment, and the embodiment of the present invention may be combined with each alternative in one or more of the above embodiments. As shown in fig. 8, the method for processing a video bitstream provided in the embodiment of the present invention may include the following steps:
and S810, the code stream receiving node receives the scrambling key ciphertext and the scrambling code stream sent by the previous node, wherein the scrambling key ciphertext is obtained by encrypting the scrambling key ciphertext by adopting the key of the code stream receiving node.
In this embodiment, the previous node may be a code stream transmission node or a code stream sending node, and after the code stream receiving node sends a code stream request to the previous node, the previous node may determine the scrambling key ciphertext and the scrambling code stream and send the scrambling key ciphertext and the scrambling code stream to the code stream receiving node.
S820, the code stream receiving node determines the scrambling key original text for descrambling the scrambling code stream to obtain the target code stream.
S830, the code stream receiving node descrambles the scrambled code stream by adopting the scrambling key original text to obtain the target code stream.
The embodiment of the invention provides a method for processing a video code stream, and by adopting the scheme, the scrambled code stream and the scrambling key can be simultaneously transmitted only by performing code stream negotiation key on a code stream transmitting end and a code stream receiving end and encrypting the generated scrambling key, the scrambling or descrambling of the scrambled code stream can be realized without obtaining the scrambling key by a key server and a management server in the whole process, the normal transmission of the scrambled code stream can be realized, the distributed video scrambling and descrambling which do not depend on a central management server are realized, and any decoding node can normally decode without generating a screen due to the fact that the server does not need to obtain the scrambling key.
Fig. 9 is a block diagram of a processing apparatus for video streams provided in an embodiment of the present invention. The embodiment of the invention can be suitable for the condition of processing the video code stream, in particular to the condition of processing the video code stream in a video monitoring system. The device can be implemented in software and/or hardware, and is configured at the current node and integrated on any electronic equipment with network communication function. For example, the electronic device includes, but is not limited to, a server, a terminal device, and the like. As shown in fig. 9, the apparatus for processing a video bitstream provided in the embodiment of the present invention may include the following: a key encryption module 910 and a code stream sending module 920. Wherein:
the key encryption module 910 is configured to encrypt the scrambling key plaintext by using a key of a next node to obtain a scrambling key ciphertext;
the code stream sending module 920 is configured to send the scrambling key ciphertext and the scrambling code stream to a next node, so that the next node determines a scrambling key plaintext; and the scrambling key original text is used for descrambling the scrambling code stream to obtain the target code stream.
On the basis of the foregoing embodiment, optionally, if the current node is a code stream sending node, the apparatus further includes:
a code stream determining module 930, configured to determine the scrambling key original text and the target code stream before encrypting the scrambling key original text with the key of the next node;
and a code stream scrambling module 940, configured to encrypt the target code stream by using the scrambling key original text to obtain a scrambled code stream.
On the basis of the foregoing embodiment, optionally, if the current node is a code stream transmission node, the apparatus further includes:
a code stream obtaining module 950, configured to receive the scrambled code stream and the scrambled key ciphertext from the code stream sending node or the previous transmission node before encrypting the scrambled key plaintext with the key of the next node; the scrambling key ciphertext is obtained by encrypting the scrambling key original text by adopting a key of a local node;
and a code stream scrambling module 940, configured to decrypt the scrambled key ciphertext with a key of the local node to obtain a scrambled key plaintext.
The processing device of the video code stream provided in the embodiment of the present invention can execute the processing method of the video code stream provided in any embodiment of the present invention, and has the corresponding functions and beneficial effects of the processing method of the video code stream, and the detailed process refers to the relevant operations of the processing method of the video code stream in the foregoing embodiment.
Fig. 10 is a block diagram of another video stream processing apparatus provided in the embodiment of the present invention. The device can be realized in a software and/or hardware mode, is configured at a code stream receiving node and is integrated on any electronic equipment with a network communication function. For example, the electronic device includes, but is not limited to, a server, a terminal device, and the like. As shown in fig. 10, the apparatus for processing a video bitstream provided in the embodiment of the present invention may include the following: a code stream receiving module 1010 and a scrambling key determining module 1020. Wherein:
the code stream receiving module 1010 is configured to receive a scrambling key ciphertext and a scrambling code stream sent by a previous node, where the scrambling key ciphertext is obtained by encrypting a scrambling key plaintext by using a key of a code stream receiving node;
and a scrambling key determining module 1020, configured to determine a scrambling key original text, and descramble the scrambled code stream to obtain a target code stream.
On the basis of the foregoing embodiment, optionally, the apparatus further includes:
and a code stream descrambling module 1030, configured to descramble the scrambled code stream by using the scrambling key original text after determining the scrambling key original text, so as to obtain the target code stream.
The processing device of the video code stream provided in the embodiment of the present invention can execute the processing method of the video code stream provided in any embodiment of the present invention, and has the corresponding functions and beneficial effects of the processing method of the video code stream, and the detailed process refers to the relevant operations of the processing method of the video code stream in the foregoing embodiment.
Fig. 11 is a schematic structural diagram of an electronic device provided in an embodiment of the present invention. As shown in fig. 11, the electronic device provided in the embodiment of the present invention includes: one or more processors 1110 and storage 1120; the processor 1110 in the electronic device may be one or more, and one processor 1110 is taken as an example in fig. 11; storage 1120 is used to store one or more programs; the one or more programs are executed by the one or more processors 1110, so that the one or more processors 1110 implement the method for processing a video bitstream according to any of the embodiments of the present invention.
The electronic device may further include: an input device 1130 and an output device 1140.
The processor 1110, the storage device 1120, the input device 1130, and the output device 1140 in the electronic apparatus may be connected by a bus or other means, and fig. 11 illustrates an example of connection by a bus.
The storage device 1120 in the electronic device, which is a computer-readable storage medium, may be used to store one or more programs, which may be software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the video bitstream processing method provided in the embodiments of the present invention. The processor 1110 executes various functional applications and data processing of the electronic device by running software programs, instructions and modules stored in the storage device 1120, that is, implements the processing method of the video bitstream in the above method embodiment.
The storage 1120 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device, and the like. Further, the storage 1120 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the storage 1120 may further include memory located remotely from the processor 1110, which may be connected to the devices over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 1130 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic apparatus. The output device 1140 may include a display device such as a display screen.
And, when one or more programs included in the above-mentioned electronic device are executed by the one or more processors 1110, the programs perform the following operations:
encrypting the scrambling key original text by adopting a key of the next node to obtain a scrambling key ciphertext;
sending the scrambling key ciphertext and the scrambling code stream to a next node so that the next node determines a scrambling key plaintext; and the scrambling key original text is used for descrambling the scrambling code stream to obtain the target code stream.
Of course, it can be understood by those skilled in the art that when one or more programs included in the electronic device are executed by the one or more processors 1110, the programs may also perform related operations in the method for processing a video bitstream provided in any embodiment of the present invention.
Further, when the one or more programs included in the electronic device are executed by the one or more processors 1110, the programs perform the following operations:
receiving a scrambling key ciphertext and a scrambling code stream sent by a previous node, wherein the scrambling key ciphertext is obtained by encrypting a scrambling key original text by using a key of a code stream receiving node;
and determining the scrambling key original text for descrambling the scrambling code stream to obtain the target code stream.
An embodiment of the present invention provides a computer-readable medium having stored thereon a computer program, which when executed by a processor, is configured to perform a method for processing a video bitstream, the method including:
encrypting the scrambling key original text by adopting a key of the next node to obtain a scrambling key ciphertext;
sending the scrambling key ciphertext and the scrambling code stream to a next node so that the next node determines a scrambling key plaintext; and the scrambling key original text is used for descrambling the scrambling code stream to obtain the target code stream.
Optionally, the program may be further configured to execute a video stream processing method provided in any embodiment of the present invention when executed by the processor.
Another computer-readable medium is provided in an embodiment of the present invention, and has a computer program stored thereon, where the computer program is used to execute a processing method of a video bitstream when executed by a processor, and the method includes:
receiving a scrambling key ciphertext and a scrambling code stream sent by a previous node, wherein the scrambling key ciphertext is obtained by encrypting a scrambling key original text by using a key of a code stream receiving node;
and determining the scrambling key original text for descrambling the scrambling code stream to obtain the target code stream.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), a flash Memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. A computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take a variety of forms, including, but not limited to: an electromagnetic signal, an optical signal, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, Radio Frequency (RF), etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (8)

1. A method for processing a video bitstream, the method being performed by a current node, the method comprising:
acquiring a carried public key of a public-private key pair generated by a next node from a code stream request sent by the next node to a current node; the current node is a code stream sending node or a code stream transmission node, and the next node is a code stream receiving node or a next code stream transmission node;
encrypting the scrambling key original text by adopting a key generated by the next node to obtain a scrambling key ciphertext;
sending the scrambling key ciphertext and the scrambling code stream to the next node so that the next node decrypts by adopting a private key in the key pair to determine a scrambling key original text; and the scrambling key original text is used for descrambling the scrambling code stream to obtain the target code stream.
2. The method of claim 1, wherein if the current node is a code stream sending node, before encrypting the scrambling key original text with the key of the next node, the method further comprises:
determining a scrambling key original text and a target code stream;
and encrypting the target code stream by adopting the scrambling key original text to obtain a scrambling code stream.
3. The method of claim 1, wherein if the current node is a code stream transmission node, before encrypting the scrambling key original text with the key of the next node, the method further comprises:
receiving a scrambling code stream and a scrambling key ciphertext from a code stream sending node or a previous transmission node; the scrambling key ciphertext is obtained by encrypting the scrambling key original text by adopting a key of a local node;
and decrypting the scrambling key ciphertext by adopting the key of the local node to obtain a scrambling key original text.
4. A method for processing a video bitstream, the method being performed by a bitstream receiving node, the method comprising:
sending a code stream request to a previous node; a public key of a public-private key pair generated by a code stream receiving node carried in the code stream request; the last node is a code stream sending node or a code stream transmission node;
receiving a scrambling key ciphertext and a scrambling code stream sent by a previous node, wherein the scrambling key ciphertext is obtained by encrypting a scrambling key original text by using a key generated by a code stream receiving node;
and decrypting by adopting a private key in the key pair to determine the scrambling key original text, and descrambling the scrambling code stream to obtain the target code stream.
5. An apparatus for processing a video bitstream, configured at a current node, the apparatus comprising:
the secret key encryption module is used for acquiring a public key of a public-private key pair generated by a carried next node from a code stream request sent by the next node to the current node; the current node is a code stream sending node or a code stream transmission node, and the next node is a code stream receiving node or a next code stream transmission node; encrypting the scrambling key original text by adopting the key generated by the next node to obtain a scrambling key ciphertext;
the code stream sending module is used for sending the scrambling key ciphertext and the scrambling code stream to the next node so that the next node can decrypt by adopting a private key in the key pair to determine a scrambling key original text; and the scrambling key original text is used for descrambling the scrambling code stream to obtain the target code stream.
6. An apparatus for processing a video bitstream, the apparatus being configured to be executed at a bitstream receiving node, the apparatus comprising:
the code stream receiving module is used for sending a code stream request to an upper node; a public key of a public-private key pair generated by a code stream receiving node carried in the code stream request; the last node is a code stream sending node or a code stream transmission node; receiving a scrambling key ciphertext and a scrambling code stream sent by a previous node, wherein the scrambling key ciphertext is obtained by encrypting a scrambling key original text by using a key generated by a code stream receiving node;
and the scrambling key determining module is used for determining a scrambling key original text by adopting the private key in the key pair for decryption and descrambling the scrambling code stream to obtain the target code stream.
7. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of processing a video bitstream as recited in any one of claims 1-4.
8. A computer-readable storage medium, on which a computer program is stored, the program, when being executed by a processor, implementing a method for processing a video bitstream according to any one of claims 1 to 4.
CN202010138931.3A 2020-03-03 2020-03-03 Video code stream processing method, device, equipment and storage medium Active CN111277802B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010138931.3A CN111277802B (en) 2020-03-03 2020-03-03 Video code stream processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010138931.3A CN111277802B (en) 2020-03-03 2020-03-03 Video code stream processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111277802A CN111277802A (en) 2020-06-12
CN111277802B true CN111277802B (en) 2021-09-14

Family

ID=71002300

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010138931.3A Active CN111277802B (en) 2020-03-03 2020-03-03 Video code stream processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111277802B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113259718B (en) * 2021-04-27 2023-06-09 深圳市锐明技术股份有限公司 Video stream encryption method, device, communication equipment and storage medium
CN113542766B (en) * 2021-06-28 2023-10-27 宜宾中星技术智能系统有限公司 Video encoding method, apparatus, electronic device, and computer-readable medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1284818A (en) * 2000-09-29 2001-02-21 清华大学 Full digital conditioned receiving method for video broadcost in cable TV network
CN102291598A (en) * 2011-09-06 2011-12-21 四川金网通电子科技有限公司 Controllable license management method of digital television hardware function
CN104519013A (en) * 2013-09-27 2015-04-15 华为技术有限公司 Method and system for ensuring security of media stream, and device
CN104853242A (en) * 2015-05-13 2015-08-19 青岛海信电器股份有限公司 Descrambling method and apparatus of digital television set
CN109391846A (en) * 2017-08-07 2019-02-26 浙江宇视科技有限公司 A kind of video scrambling method and device of adaptive model selection

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR0166940B1 (en) * 1995-01-16 1999-03-20 구자홍 Apparatus for restricting a possible number of reproduction of information recording medium
JPH09307546A (en) * 1996-05-14 1997-11-28 Matsushita Electric Ind Co Ltd Ciphering system, information providing device and information using side device in the ciphering system, and scrambler and descrambler in the ciphering system
JP2008294707A (en) * 2007-05-24 2008-12-04 Oki Electric Ind Co Ltd Digital broadcast receiving apparatus
JP2009037095A (en) * 2007-08-03 2009-02-19 Kddi Corp Data scrambling apparatus, data descrambling apparatus, data scrambling method, data descrambling method and program
CN101110831B (en) * 2007-08-24 2010-12-01 中兴通讯股份有限公司 Digital cryptographic key protection method
CN101626484A (en) * 2008-07-07 2010-01-13 北京视博数字电视科技有限公司 Method for protecting control word in condition access system, front end and terminal
CN101409592B (en) * 2008-11-17 2010-10-27 普天信息技术研究院有限公司 Method, system and apparatus for implementing multi-application business based on condition receiving card
US8412954B2 (en) * 2010-05-19 2013-04-02 Innostor Technology Corporation Data encryption device for storage medium
JP2013042331A (en) * 2011-08-15 2013-02-28 Kddi Corp Unidirectional communication system, method, and program
JP5725210B2 (en) * 2012-02-03 2015-05-27 富士通株式会社 Terminal-specific information transmission method and system
EP2802152B1 (en) * 2013-05-07 2017-07-05 Nagravision S.A. Method for secure processing a stream of encrypted digital audio / video data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1284818A (en) * 2000-09-29 2001-02-21 清华大学 Full digital conditioned receiving method for video broadcost in cable TV network
CN102291598A (en) * 2011-09-06 2011-12-21 四川金网通电子科技有限公司 Controllable license management method of digital television hardware function
CN104519013A (en) * 2013-09-27 2015-04-15 华为技术有限公司 Method and system for ensuring security of media stream, and device
CN104853242A (en) * 2015-05-13 2015-08-19 青岛海信电器股份有限公司 Descrambling method and apparatus of digital television set
CN109391846A (en) * 2017-08-07 2019-02-26 浙江宇视科技有限公司 A kind of video scrambling method and device of adaptive model selection

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
胡戈;胡戈;《中国优秀硕士学位论文全文数据库(电子期刊)信息科技辑》;20100430;全文 *

Also Published As

Publication number Publication date
CN111277802A (en) 2020-06-12

Similar Documents

Publication Publication Date Title
KR100957121B1 (en) Key distribution method and authentication server
KR100924106B1 (en) Method of secure transmission of digital data from a source to a receiver
US8675872B2 (en) Secure content distribution apparatus, systems, and methods
KR101021708B1 (en) Group Key Distribution Method and Server and Client for Implementing the Same
CN109218825B (en) Video encryption system
CN109151508B (en) Video encryption method
JP2008113172A (en) Content transmitter, content receiver and content ciphering method
CN110912690A (en) Data encryption and decryption method, vehicle and storage medium
JP2004289847A (en) Updatable conditional access system
WO2011120901A1 (en) Secure descrambling of an audio / video data stream
KR101508859B1 (en) Method and apparatus for establishing secure session between client and server
CN111277802B (en) Video code stream processing method, device, equipment and storage medium
CN113225352A (en) Data transmission method and device, electronic equipment and storage medium
WO2018157724A1 (en) Method for protecting encrypted control word, hardware security module, main chip and terminal
TWI523534B (en) Method for transmitting and receiving a multimedia content
CN111372056A (en) Video data encryption and decryption processing method and device
JP2005244534A (en) Device and method for cipher communication
CN100521771C (en) A conditional reception system merging Internet and cable television network environments
US20110179444A1 (en) Apparatus and method for downloading conditional access images
JP4447908B2 (en) Local digital network and method for introducing new apparatus, and data broadcasting and receiving method in the network
TWI510045B (en) Protection method, decrypting method, recording medium and terminal for this protection method
WO2015034020A1 (en) Transmission device, reception device, limited reception system, and limited reception method
US11457254B2 (en) Systems and methods for secure communications between media devices
CN115118458A (en) Data processing method and device, computer equipment and storage medium
KR20100040366A (en) Conditional access system for ts packet processing based on memory card

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant