CN110149521B - Data processing method and system - Google Patents

Data processing method and system Download PDF

Info

Publication number
CN110149521B
CN110149521B CN201910279484.0A CN201910279484A CN110149521B CN 110149521 B CN110149521 B CN 110149521B CN 201910279484 A CN201910279484 A CN 201910279484A CN 110149521 B CN110149521 B CN 110149521B
Authority
CN
China
Prior art keywords
frame
image
macro block
encrypted
encryption
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
CN201910279484.0A
Other languages
Chinese (zh)
Other versions
CN110149521A (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.)
Xian Wanxiang Electronics Technology Co Ltd
Original Assignee
Xian Wanxiang Electronics Technology 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 Xian Wanxiang Electronics Technology Co Ltd filed Critical Xian Wanxiang Electronics Technology Co Ltd
Priority to CN202210281222.XA priority Critical patent/CN114640855A/en
Priority to CN201910279484.0A priority patent/CN110149521B/en
Publication of CN110149521A publication Critical patent/CN110149521A/en
Application granted granted Critical
Publication of CN110149521B publication Critical patent/CN110149521B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The present disclosure provides a data processing method and system, which relates to the technical field of electronic information and can solve the problem of large resource consumption in the data encryption and decryption processes. The specific technical scheme is as follows: the data processing method is applied to a data encryption device, and at least one I frame in an image frame sequence is searched by acquiring the image frame sequence; and encrypting the at least one I frame according to a preset encryption algorithm, and generating an encrypted image frame sequence according to the encrypted at least one target frame image and other unencrypted frame images in the image frame sequence. According to the method and the device, when the image frame sequence is encrypted, the selective encryption is carried out according to the content of the frame image, so that the consumption of data processing resources of data encryption equipment is reduced, especially when the image frame sequence is transmitted in real time, the reduction of the encrypted data volume can effectively reduce transmission delay, and the display effect of real-time transmission is improved. The present disclosure is used for data encryption and decryption.

Description

Data processing method and system
Technical Field
The present disclosure relates to the field of electronic information technologies, and in particular, to a data processing method and system.
Background
In order to ensure the safety of data, an encryption mode is adopted for transmission in the data processing process.
In the prior art, a data encryption transmission scheme is as follows: after encrypting each piece of source data, the data processing system sends the encrypted source data to the receiving end of the data decryption device through the sending end of the data encryption device, and the data decryption device decrypts the encrypted source data. In this process, since the data encryption device needs to encrypt each piece of data, and correspondingly, the data decryption device needs to decrypt each piece of encrypted data, the resources of data processing of the data encryption device and the data decryption device are very consumed. Especially for the application of transmitting real-time pictures, the resource consumption of encrypting or decrypting at two ends is further increased, and the time delay of image transmission is increased.
Disclosure of Invention
The embodiment of the disclosure provides a data processing method and system, which can solve the problem of resource consumption caused by encrypted data transmission. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a data processing method applied to a data encryption apparatus, the method including:
acquiring an image frame sequence, and finding at least one I frame in the image frame sequence;
encrypting at least one I frame according to a preset encryption algorithm;
an encrypted image frame sequence is generated from the encrypted at least one I frame and other image frames of the image frame sequence that are not encrypted.
In one embodiment, the method for encrypting at least one I frame according to a preset encryption algorithm includes:
identifying at least one macro block in the target frame image, and determining the type corresponding to the at least one macro block in the I frame according to the identification result, wherein the type comprises the following steps: a text type or an image type;
and encrypting at least one I frame according to the type corresponding to at least one macro block in the I frame.
In one embodiment, the method for encrypting at least one I frame according to a preset encryption algorithm includes:
when the type corresponding to at least one macro block in the frame is an image type, acquiring a target pixel value corresponding to at least one image type macro block;
determining at least one image type macro block to be an effective macro block or an invalid macro block according to a comparison result of a target pixel value corresponding to the at least one image type macro block and a preset pixel value;
and encrypting the at least one I frame by encrypting the at least one valid macro block and the macro block corresponding to the character type and not encrypting the at least one invalid macro block.
In one embodiment, the method for encrypting at least one I frame according to a preset encryption algorithm includes:
at least one I frame is encrypted by a macro block corresponding to the encrypted character type and a macro block corresponding to the unencrypted image type.
In one embodiment, the method of generating an encrypted sequence of image frames comprises:
generating encryption information corresponding to at least one image frame in the image frame sequence according to an encryption algorithm and an encryption state corresponding to at least one image frame in the image frame sequence;
after at least one image frame in the image frame sequence is marked according to the encryption information, an encrypted image frame sequence is generated.
The data processing method provided by the embodiment of the disclosure is applied to a data encryption device, and at least one I frame in an image frame sequence is found by acquiring the image frame sequence; and encrypting at least one I frame according to a preset encryption algorithm, and generating an encrypted image frame sequence according to at least one encrypted target frame image and other unencrypted frame images in the image frame sequence. According to the method and the device, when the image frame sequence is encrypted, the selective encryption is carried out according to the content of the frame image, so that the consumption of data processing resources of data encryption equipment is reduced, especially when the image frame sequence is transmitted in real time, the reduction of the encrypted data volume can effectively reduce transmission delay, and the display effect of real-time transmission is improved.
According to a second aspect of the embodiments of the present disclosure, there is provided a data processing method applied to a data decryption apparatus, the method including:
acquiring an image frame sequence, and finding at least one I frame in the image frame sequence;
decrypting at least one I frame according to a preset decryption algorithm;
and generating a decrypted image frame sequence based on the decrypted at least one I frame and other frame images in the image frame sequence which are not decrypted.
In one embodiment, the method for decrypting at least one I-frame image according to a preset decryption algorithm includes:
acquiring code stream structure information corresponding to at least one I frame, wherein the code stream structure information comprises parameter information and encryption information corresponding to at least one macro block in the I frame;
and determining a decryption sequence corresponding to at least one macro block in the I frame according to the code stream structure information.
In one embodiment, the method for decrypting at least one I frame according to a preset decryption algorithm further includes:
determining at least one encrypted macro block in at least one I frame according to encryption information corresponding to the at least one I frame, wherein the encryption information is used for indicating whether the at least one macro block in the at least one I frame is encrypted or not;
the at least one I-frame is decrypted by decrypting the at least one encrypted macroblock and not decrypting the remaining macroblocks of the at least one I-frame that are not encrypted.
The data processing method provided by the embodiment of the disclosure is applied to a data decryption device, and at least one I frame in an image frame sequence is found by acquiring the image frame sequence; and decrypting at least one I frame according to a preset decryption algorithm, and generating a decrypted image frame sequence according to the decrypted at least one I frame and other undecrypted frame images in the image frame sequence. According to the method and the device, when the image frame sequence is decrypted, the image frame sequence is selectively decrypted according to the content of the image frame, so that the consumption of data processing resources in the data decryption process is reduced, especially when the image frame sequence is transmitted in real time, the decryption data volume is reduced, the transmission delay can be effectively reduced, and the display effect of real-time transmission is improved.
According to a third aspect of embodiments of the present disclosure, there is provided a data processing system, the system comprising: data encryption means and data decryption means; the data encryption device is connected with the data decryption device;
the data encryption device is used for acquiring an image frame sequence and searching at least one I frame in the image frame sequence;
encrypting the at least one I frame according to a preset encryption algorithm;
generating an encrypted image frame sequence according to the encrypted at least one I frame and other image frames in the image frame sequence which are not encrypted, and sending the encrypted image frame sequence to the data decryption device;
the data decryption device is used for acquiring the encrypted image frame sequence and finding out at least one I frame in the target video;
decrypting the at least one I frame according to a preset decryption algorithm;
and generating a decrypted image frame sequence according to the decrypted at least one I frame and other undecrypted image frames in the target video.
In one embodiment, the data encryption apparatus in the system is further configured to,
identifying at least one macro block in the target frame image, and determining the type corresponding to the at least one macro block in the I frame according to the identification result, wherein the type comprises the following steps: a text type or an image type;
and encrypting at least one I frame according to the type corresponding to at least one macro block in the I frame.
In one embodiment, the data decryption means in the system is further adapted to,
determining at least one encrypted macro block in the at least one I frame according to encryption information corresponding to the at least one I frame, wherein the encryption information is used for indicating whether the at least one macro block in the at least one I frame is encrypted or not;
decrypting the at least one I-frame by decrypting the at least one encrypted macroblock and not decrypting the remaining macroblocks of the at least one I-frame that are not encrypted.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart of a data processing method provided by an embodiment of the present disclosure;
fig. 2 is a flowchart 1 of a data processing method provided by an embodiment of the present disclosure;
FIG. 3 is a block diagram of a data processing system according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The embodiment of the present disclosure provides a data processing method, which is used for a data encryption device, and as shown in fig. 1, the data processing method includes the following steps:
101. the method comprises the steps of obtaining an image frame sequence and finding at least one I frame in the image frame sequence.
In an alternative embodiment, the sequence of image frames may be generated from the target video data.
The sequence of image frames is classified according to the highly compressed digital video codec standard h.264/AVC (Advanced video Coding) as: carrying out coding and decoding processing on I frame image data, P frame image data and B frame image data; the I frame refers to a complete coding frame image, namely a reference frame for coding processing; the P frame refers to a frame image generated with reference to the previous I frame and containing only the difference portion code; the B frame refers to a frame image encoded with reference to frames before and after.
Therefore, when the image frame sequence is encrypted, at least one I frame in the image frame sequence is screened out firstly, so that the quality of data processing can be ensured, and the safety of data can be ensured.
102. And encrypting the at least one I frame according to a preset encryption algorithm.
In an alternative embodiment, encrypting the at least one I frame according to a preset encryption algorithm includes:
identifying at least one macro block in the target frame image, and determining that the corresponding at least one macro block in the I frame is a character type macro block or an image type macro block according to the identification result;
and encrypting at least one I frame according to the type corresponding to at least one macro block in the I frame.
In the specific encryption processing, at least one I frame is encrypted according to the type corresponding to at least one macro block in the I frame, and the encryption comprises the step of encrypting the macro block corresponding to at least one image type or the macro block corresponding to at least one character type in the I frame according to a preset encryption algorithm. Two specific examples are set forth below for illustration:
in a first example, encrypting at least one I frame by encrypting all macroblocks corresponding to a text type and a portion of macroblocks corresponding to an encrypted image type, wherein encrypting valid macroblocks corresponding to an image type comprises:
when the type corresponding to at least one macro block in the frame is an image type, acquiring a target pixel value corresponding to at least one image macro block;
determining at least one image macro block to be an effective macro block or an invalid macro block according to a comparison result of a target pixel value corresponding to the at least one image macro block and a preset pixel value;
encrypting the at least one I-frame by encrypting the at least one valid macroblock, the macroblock corresponding to the literal type, and not encrypting the at least one invalid macroblock.
A specific example is set forth here to illustrate how a macroblock is divided into active image macroblocks or inactive image macroblocks: the method comprises the following steps:
firstly, determining a preset pixel value, and selecting the pixel value of a target pixel point as the preset pixel value in a current macro block; the target pixel point can be a pixel point at any position in the current macro block or a pixel point at a specified position.
Secondly, calculating a difference value between a target pixel value corresponding to at least one image type macro block and a preset pixel value;
and finally, when the difference value between the target pixel value corresponding to the image type macro block and the preset pixel value is within the preset value, determining the image macro block as an invalid macro block, otherwise, considering the current image block as an effective image block. For example, the color value corresponding to the preset pixel value is 200, and if the difference value between the pixel values corresponding to the other macroblocks and 200 is within the range of 0-3, the difference value between the target pixel value corresponding to the image macroblock and the preset pixel value is within the preset value, and the image macroblock can be regarded as a pure color block without encryption processing.
In this example, since, in the image data processing process, for a macroblock of a pure color, that is, all pixel values are the same color value, it can be considered that there is no image block containing valid content; on the basis, the judgment condition is expanded, for example, when the difference values of the color values of all pixels in a macro block are within a preset value, for example, the 8-bit color depth has 256 color values, and the difference values cannot be identified by naked eyes when the difference values are 1-2, the judgment condition can also be judged to be a pure color block. The method comprises the steps of directly encrypting an effective image block, and directly transmitting an invalid image block without encryption; resources for encryption processing can be saved.
In a second example, at least one I frame is encrypted by encrypting only all macroblocks corresponding to a text type and not encrypting macroblocks corresponding to an image type. The method comprises the following specific steps:
firstly, acquiring an I frame, and dividing the I frame into M multiplied by N macro blocks, wherein M is not less than 1, and N is not less than 1;
secondly, identifying each macro block, and dividing each macro block into a character type macro block or an image type macro block according to an identification result;
and finally, only encrypting the character type macro block and not encrypting the image type macro block.
In the step, all macro blocks corresponding to the character types are directly encrypted to obtain type macro blocks corresponding to the encrypted characters; the macro block corresponding to the image type is directly transmitted without being encrypted.
In this example, after each macro block is classified into an image type or a text type, only the macro blocks corresponding to all the text types are encrypted, and the macro blocks corresponding to the image type are directly transmitted without being encrypted. The scheme is relatively suitable for office occasions and is characterized in that: the transmitted image has more character information and more important key information is involved, and the image information does not need an encrypted scene.
In an alternative embodiment, the present disclosure encrypts the at least one I-frame according to a predetermined encryption algorithm, wherein the predetermined encryption algorithm includes a plurality of encryption algorithms.
The first alternative is as follows: the preset encryption algorithm may include a symmetric encryption algorithm and an asymmetric encryption algorithm.
Alternative two: the preset encryption algorithm can be selected by presetting an encryption algorithm pool and determining the preset encryption algorithm through the encryption algorithm pool; the encryption algorithm pool comprises a preset number of encryption algorithms, and the encryption algorithms are sequentially selected in sequence when the macro block to be encrypted is encrypted, or one encryption algorithm is randomly selected from the encryption algorithm pool for encrypting the current macro block during each encryption.
Further, specific examples are listed to illustrate how the predetermined encryption algorithm is determined by the pool of encryption algorithms. Including selecting the encryption algorithm in a preset order or in a random order.
An example one, selecting a preset encryption algorithm according to a preset sequence includes: the encryption algorithm pool comprises 8 encryption algorithms, a preset sequence is set for the 8 encryption algorithms, for example, numbering is carried out according to 1-8, the encryption algorithms in the encryption algorithm pool are polled in sequence during each encryption, the encryption algorithm used at present is determined, the current macro block to be encrypted is encrypted, the next encryption algorithm is selected during the next encryption, if the last encryption algorithm is 3, the current encryption algorithm is 4, the next encryption algorithm is 5, and the like, and when the last encryption algorithm, namely, the 8 th encryption algorithm is adopted for encryption and then encryption is carried out again, the encryption algorithms are selected from the first encryption algorithm in sequence.
Example two, the preset encryption algorithm is selected according to a random order, namely: the preset encryption algorithm can also be selected to randomly select an encryption algorithm from the encryption algorithm pool when the macro block to be encrypted is encrypted each time, so as to encrypt the current macro block to be encrypted. Presetting a random number generator with a value range from 1 to 8, randomly generating a number by the random number generator during each encryption, and determining an encryption algorithm corresponding to the number as the encryption algorithm used at the time, for example, when the generated number is 7, selecting the 7 th encryption algorithm.
According to the method and the device, when at least one macro block in the I frame is encrypted, a plurality of encryption algorithms are adopted for encryption, so that the difficulty of data decryption is greatly improved, and the security of data encryption is improved.
103. An encrypted image frame sequence is generated from the encrypted at least one I frame and other image frames of the image frame sequence that are not encrypted.
In an alternative embodiment, generating a sequence of encrypted image frames comprises:
generating encryption information corresponding to at least one image frame in the image frame sequence according to an encryption algorithm and an encryption state corresponding to at least one image frame in the image frame sequence;
after at least one image frame in the image frame sequence is marked according to the encryption information, an encrypted image frame sequence is generated.
Specifically, in the process of encrypting the image frame, header information corresponding to at least one macroblock in the image frame is obtained, the header information is used for indicating encryption information of the macroblock, and the header information includes two data bits, one of the data bits is used for indicating an encryption state, that is, whether the current macroblock is encrypted, and the other data bit is used for indicating an encryption algorithm, that is, encryption algorithm information of the current macroblock.
Specific examples are listed here to illustrate: generating two data bits in the header information of the macroblock, where a length corresponding to a data bit in the header information of the macroblock for indicating the encryption status of the current macroblock may be 1bit (bit), that is, indicating whether the macroblock is encrypted by 0 or 1, for example, setting a bit value of the data bit to 0 when the macroblock is encrypted, and setting a bit value of the data bit to 1 when the macroblock is encrypted. The length corresponding to the data bits in the header information of the macroblock for indicating the encryption algorithm of the current macroblock depends on the kind of encryption algorithms in the pool of encryption algorithms, for example, when the number of encryption algorithms is 8, the data bits may be set to at least 3 bits.
In an alternative embodiment, the present disclosure transmits to a receiving device of a sequence of image frames after generating the sequence of encrypted image frames.
The data processing method provided by the embodiment of the disclosure is applied to a data encryption device, and at least one I frame in an image frame sequence is found by acquiring the image frame sequence; and encrypting at least one I frame according to a preset encryption algorithm, and generating an encrypted image frame sequence according to at least one encrypted target frame image and other unencrypted frame images in the image frame sequence. According to the method and the device, when the image frame sequence is encrypted, the selective encryption is carried out according to the content of the frame image, so that the consumption of data processing resources of data encryption equipment is reduced, especially when the image frame sequence is transmitted in real time, the reduction of the encrypted data volume can effectively reduce transmission delay, and the display effect of real-time transmission is improved.
Example two
Based on the data processing method provided by the embodiment corresponding to fig. 1, another embodiment of the present disclosure provides a data processing method, which may be applied to a data decryption device, for example, the data decryption device may be a terminal device or a network server, and the present disclosure is not limited thereto. Referring to fig. 2, the data processing method provided in this embodiment includes the following steps:
201. the method comprises the steps of obtaining an image frame sequence and finding at least one I frame in the image frame sequence.
In an alternative embodiment, decrypting the at least one I-frame image according to a preset decryption algorithm includes:
acquiring code stream structure information corresponding to at least one I frame, wherein the code stream structure information comprises parameter information and encryption information corresponding to at least one macro block in the I frame;
and determining a decryption sequence corresponding to at least one macro block in the I frame according to the code stream structure information.
Further, the code stream structure information corresponding to the I frame is that when the present disclosure obtains the image frame sequence, the present disclosure obtains the data packet header information of at least one macro block by reading the code stream data corresponding to the encoded image frame sequence, where the packet header information is used to identify the type and length of the corresponding macro block, and is also used to identify whether the current macro block is encrypted and the corresponding encryption algorithm. And generating code stream structure information of the I frame according to the packet headers corresponding to all the macro blocks in the I frame.
Therefore, the code stream structure information corresponding to at least one I frame comprises parameter information and encryption information corresponding to at least one macro block in the I frame;
the parameter information comprises the type of the macro block, the setting of the macro block and the corresponding frame;
the encryption information includes whether the macro block is encrypted and the corresponding encryption algorithm
In the specific embodiment, according to the code stream structure information, the sequence of each macro block in the current I frame is confirmed, and the macro blocks are combined into a complete frame picture according to the sequence, including
During transmission, a frame image in an image frame sequence is encoded into at least one macroblock, for example, an I frame includes four macroblocks, which are in turn: the macro blocks A, B, C and D correspond to a preset sequence as follows: the macro blocks A, B, C and D are sequentially transmitted according to a preset sequence; however, due to the influence of network resources, the order of the macroblocks in the frame image acquired by the data decryption device may be disturbed, for example, the macroblocks a, B, D, and C; if the decoded and decrypted image is decoded according to the wrong macro block sequence, the image may have larger deviation with the source image, and the display effect is influenced.
Therefore, when the image frame sequence is obtained, the processing sequence of at least one macro block in the received frame image is adjusted according to the preset sequence, and then decryption and decoding are performed, so that the quality and the efficiency of decryption are further improved.
202. And decrypting the at least one I frame image according to a preset decryption algorithm.
In an alternative embodiment, decrypting the at least one I frame image data is performed, the method further comprising:
determining at least one encrypted macro block in at least one I frame according to encryption information corresponding to the at least one I frame, wherein the encryption information is used for indicating whether the at least one macro block in the I frame is encrypted or not;
the at least one I frame is decrypted by decrypting the at least one encrypted macroblock and not decrypting the remaining macroblocks of the at least one I frame that are not encrypted.
In a specific embodiment, the encrypted macro block in the I frame can be found according to the encryption identification information in the code stream structure information corresponding to the I frame.
Further, when decrypting the encrypted macroblock, the encryption information of the encrypted macroblock can be further parsed,
if the encryption information comprises the encryption algorithm corresponding to the encryption macro block, selecting a corresponding decryption algorithm to decrypt the current macro block according to the encryption algorithm corresponding to the macro block;
if the encrypted information does not include the encryption algorithm corresponding to the encrypted macroblock, a default decryption algorithm may be used for decryption.
According to the method and the device, the encrypted at least one macro block in the I frame is determined through the encryption information corresponding to the at least one I frame, and only the encrypted macro block is decrypted, so that the data size for decryption is reduced, and the technical effect of improving the data decryption efficiency is achieved.
203. A decrypted image frame sequence is generated based on the decrypted at least one I frame and other image frames of the image frame sequence that are not decrypted.
In the encryption algorithm, only the I frame is encrypted, so that only the I frame is decrypted during decryption, and the decryption efficiency is improved.
The data processing method provided by the embodiment of the disclosure is applied to a data decryption device, and at least one I frame in an image frame sequence is found by acquiring the image frame sequence; and decrypting at least one I frame according to a preset decryption algorithm, and generating a decrypted image frame sequence according to the decrypted at least one I frame and other undecrypted frame images in the image frame sequence. According to the method and the device, when the image frame sequence is decrypted, the image frame sequence is selectively decrypted according to the content of the image frame, so that the consumption of data processing resources in the data decryption process is reduced, especially when the image frame sequence is transmitted in real time, the decryption data volume is reduced, the transmission delay can be effectively reduced, and the display effect of real-time transmission is improved.
EXAMPLE III
Based on the data processing method described in the embodiments corresponding to fig. 1 and fig. 2, the following is an embodiment of the system of the present disclosure, which can be used to execute an embodiment of the method of the present disclosure.
The embodiment of the present disclosure provides a data processing system, as shown in fig. 3, the data processing apparatus 30 includes: a data encryption device 301 and a data decryption device 302;
the data encryption device is connected with the data decryption device;
the data encryption device is used for acquiring the image frame sequence and searching at least one I frame in the image frame sequence;
encrypting at least one I frame according to a preset encryption algorithm;
generating an encrypted image frame sequence according to the encrypted at least one I frame and other image frames in the image frame sequence which are not encrypted, and sending the encrypted image frame sequence to a data decryption device;
the data decryption device is used for acquiring the encrypted image frame sequence and searching at least one I frame in the target video;
decrypting at least one I frame according to a preset decryption algorithm;
and generating a decrypted image frame sequence according to the decrypted at least one I frame and other undecrypted image frames in the target video.
In an alternative embodiment, the data encryption device 301 is further configured to,
identifying at least one macro block in the target frame image, and determining the type corresponding to the at least one macro block in the I frame according to the identification result, wherein the type comprises the following steps: a text or an image;
and encrypting at least one I frame according to the type corresponding to at least one macro block in the I frame.
In an optional embodiment, the data encryption apparatus 301 further includes: a receiver, a processor and a transmitter,
the receiver, is used for receiving the image frame sequence;
the processor is used for encrypting at least one I frame according to a preset encryption algorithm;
generating an encrypted image frame sequence from the encrypted at least one I frame and other image frames of the image frame sequence that are not encrypted;
the transmitter is configured to transmit the sequence of encrypted image frames to the data decryption device.
In an alternative embodiment, the data decryption means 302 is also adapted to,
determining at least one encrypted macro block in at least one I frame according to encryption information corresponding to the at least one I frame, wherein the encryption information is used for indicating whether the at least one macro block in the at least one I frame is encrypted or not;
the at least one I-frame is decrypted by decrypting the at least one encrypted macroblock and not decrypting the remaining macroblocks of the at least one I-frame that are not encrypted.
In an alternative embodiment, the data decryption apparatus 302 further includes: a receiver, a processor and a transmitter,
the receiver for receiving an encrypted sequence of image frames;
the processor is used for decrypting at least one I frame according to a preset encryption algorithm;
generating a decrypted image frame sequence from the decrypted at least one I frame and other image frames of the image frame sequence that are not decrypted;
the transmitter is configured to transmit the decrypted image frame sequence to a data display device.
The data processing system provided by the embodiment of the disclosure comprises a data encryption device and a data decryption device, and the system obtains an image frame sequence and finds at least one I frame in the image frame sequence in the process of processing data; encrypting and decrypting at least one I frame according to a preset encryption and decryption algorithm, and generating an encrypted image frame sequence according to the encrypted at least one I frame and other unencrypted frame images in the image frame sequence; or generating an encrypted image frame sequence according to the encrypted at least one I frame and other frame images which are not encrypted in the image frame sequence; the method selectively encrypts and decrypts the image frame sequence according to the content of the frame image when encrypting and decrypting the image frame sequence, thereby reducing the consumption of data processing resources of a data processing system, and particularly reducing the amount of encrypted data when transmitting the image frame sequence in real time, effectively reducing transmission delay and improving the display effect of real-time transmission.
Based on the data processing method described in the embodiment corresponding to fig. 1 and fig. 2, an embodiment of the present disclosure further provides a computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a Read Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores computer instructions for executing the data processing method described in the embodiment corresponding to fig. 1 and fig. 2, which is not described herein again.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (9)

1. A data processing method applied to a data encryption apparatus, the method comprising:
acquiring an image frame sequence, and finding at least one I frame in the image frame sequence;
encrypting the at least one I frame according to a preset encryption algorithm;
generating a sequence of encrypted image frames from the encrypted at least one I frame and other image frames of the sequence of image frames that are not encrypted;
wherein encrypting the at least one I-frame comprises at least:
identifying at least one macro block in a target frame image, acquiring an identification result, and determining a type corresponding to the at least one macro block in the I frame according to the identification result, wherein the type comprises: a text type or an image type;
and according to the type corresponding to at least one macro block in the I frame, carrying out non-encryption processing on an invalid macro block in the I frame, wherein the invalid macro block is determined according to a comparison result of a target pixel value corresponding to the macro block and a preset pixel value.
2. The method according to claim 1, wherein said encrypting said at least one I-frame according to a predetermined encryption algorithm comprises:
when the type corresponding to at least one macro block in the frame is an image type, acquiring a target pixel value corresponding to the at least one image type macro block;
determining that the at least one image type macro block is an effective macro block or an invalid macro block according to a comparison result of a target pixel value corresponding to the at least one image type macro block and a preset pixel value;
and encrypting the at least one I frame by encrypting the at least one effective macro block and the macro block corresponding to the character type and not encrypting the at least one invalid macro block.
3. The method according to claim 1, wherein said encrypting said at least one I-frame according to a predetermined encryption algorithm comprises:
and encrypting the at least one I frame by encrypting the macro block corresponding to the character type and not encrypting the macro block corresponding to the image type.
4. The method of claim 1, wherein the generating the sequence of encrypted image frames comprises:
generating encryption information corresponding to at least one image frame in the image frame sequence according to an encryption algorithm and an encryption state corresponding to at least one image frame in the image frame sequence;
and marking at least one image frame in the image frame sequence according to the encryption information to generate the encrypted image frame sequence.
5. A data processing method applied to a data decryption apparatus, the method comprising:
decrypting at least one I frame according to a preset decryption algorithm;
and generating a decrypted image frame sequence based on the decrypted at least one I frame and other frame images in the image frame sequence which are not decrypted.
6. The method according to claim 5, wherein before decrypting said at least one I-frame image according to a predetermined decryption algorithm, further comprising:
acquiring code stream structure information corresponding to the at least one I frame, wherein the code stream structure information comprises parameter information and encryption information corresponding to at least one macro block in the I frame;
and determining a decryption sequence corresponding to at least one macro block in the I frame according to the code stream structure information.
7. The method of claim 6, wherein the decrypting the at least one I-frame according to a preset decryption algorithm, the method further comprising:
determining at least one encrypted macro block in the at least one I frame according to encryption information corresponding to the at least one I frame, wherein the encryption information is used for indicating whether the at least one macro block in the at least one I frame is encrypted or not;
decrypting the at least one I-frame by decrypting the at least one encrypted macroblock and not decrypting the remaining macroblocks of the at least one I-frame that are not encrypted.
8. A data processing system, comprising: data encryption means and data decryption means;
the data encryption device is connected with the data decryption device;
the data encryption device is used for acquiring an image frame sequence and finding at least one I frame in the image frame sequence, and the image frame sequence is generated at least according to a target video;
generating an encrypted image frame sequence according to the encrypted at least one I frame and other image frames in the image frame sequence which are not encrypted, and sending the encrypted image frame sequence to the data decryption device;
wherein encrypting the at least one I-frame comprises at least:
identifying at least one macro block in a target frame image, acquiring an identification result, and determining a type corresponding to the at least one macro block in the I frame according to the identification result, wherein the type comprises: a text type or an image type;
according to the type corresponding to at least one macro block in the I frame, carrying out non-encryption processing on an invalid macro block in the I frame, wherein the invalid macro block is determined according to a comparison result of a target pixel value corresponding to the macro block and a preset pixel value;
the data decryption device is used for acquiring the encrypted image frame sequence and finding out at least one I frame in the target video;
and generating a decrypted image frame sequence according to the decrypted at least one I frame and other undecrypted image frames in the target video.
9. The system of claim 8, wherein the data decryption device is further configured to,
determining at least one encrypted macro block in the at least one I frame according to encryption information corresponding to the at least one I frame, wherein the encryption information is used for indicating whether the at least one macro block in the at least one I frame is encrypted or not;
decrypting the at least one I-frame by decrypting the at least one encrypted macroblock and not decrypting the remaining macroblocks of the at least one I-frame that are not encrypted.
CN201910279484.0A 2019-04-09 2019-04-09 Data processing method and system Active CN110149521B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210281222.XA CN114640855A (en) 2019-04-09 2019-04-09 Data processing method and system
CN201910279484.0A CN110149521B (en) 2019-04-09 2019-04-09 Data processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910279484.0A CN110149521B (en) 2019-04-09 2019-04-09 Data processing method and system

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202210281222.XA Division CN114640855A (en) 2019-04-09 2019-04-09 Data processing method and system

Publications (2)

Publication Number Publication Date
CN110149521A CN110149521A (en) 2019-08-20
CN110149521B true CN110149521B (en) 2022-03-22

Family

ID=67588281

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201910279484.0A Active CN110149521B (en) 2019-04-09 2019-04-09 Data processing method and system
CN202210281222.XA Pending CN114640855A (en) 2019-04-09 2019-04-09 Data processing method and system

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202210281222.XA Pending CN114640855A (en) 2019-04-09 2019-04-09 Data processing method and system

Country Status (1)

Country Link
CN (2) CN110149521B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111683271B (en) * 2020-04-27 2022-05-06 中国科学院微电子研究所 Video encryption method, terminal equipment and computer storage medium
CN111800634A (en) * 2020-06-30 2020-10-20 西安万像电子科技有限公司 Image processing method and device
CN115278311A (en) * 2022-07-26 2022-11-01 中国工商银行股份有限公司 Video encryption method and device based on macro block

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1617584A (en) * 2004-12-06 2005-05-18 武汉大学 Dynamic random mess correction and enciphering-deenciphering method for video frequency information
CN101106527A (en) * 2007-07-31 2008-01-16 中国网络通信集团公司 Point-to-point information transfer method, system and network gateway unit
CN102281261A (en) * 2010-06-10 2011-12-14 杭州华三通信技术有限公司 Data transmission method, system and apparatus
JP2014155041A (en) * 2013-02-08 2014-08-25 Nippon Telegr & Teleph Corp <Ntt> Remote video distribution method and remote video distribution system
CN105471860A (en) * 2015-11-19 2016-04-06 浙江宇视科技有限公司 Video data transmission method and apparatus
CN105959708A (en) * 2016-06-07 2016-09-21 浪潮软件股份有限公司 Encryption method of video data
CN108900849A (en) * 2018-07-26 2018-11-27 苏州科达科技股份有限公司 Video data encryption method, system, equipment and storage medium

Family Cites Families (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2842796B2 (en) * 1994-12-06 1999-01-06 富士通株式会社 Moving image encryption processing method and apparatus, and encrypted moving image decryption processing method and apparatus
SE513356C2 (en) * 1998-11-20 2000-08-28 Ericsson Telefon Ab L M Method and apparatus for encrypting images
GB2379299B (en) * 2001-09-04 2006-02-08 Imagination Tech Ltd A texturing system
JP4217969B2 (en) * 2003-12-08 2009-02-04 富士ゼロックス株式会社 Image processing apparatus and program
JP4826378B2 (en) * 2006-07-28 2011-11-30 富士ゼロックス株式会社 Image processing apparatus, image processing method, and program
WO2011125188A1 (en) * 2010-04-07 2011-10-13 三菱電機株式会社 Video encryption device, video decoding device, video encryption program, and video encryption method
CN102176759A (en) * 2011-02-15 2011-09-07 天津理工大学 Method for encrypting video streaming information based on hyper-chaotic sequence
CN103235946A (en) * 2013-04-08 2013-08-07 上海合合信息科技发展有限公司 Divulgence-preventive processing method for artificially identifying information of business cards
CN103747261B (en) * 2013-12-31 2017-06-27 北京工业大学 H.264 compression domain hierarchical perception encryption method based on motion reference structure
CN103716637A (en) * 2014-01-15 2014-04-09 北京工业大学 H.264 compressed domain layered video encryption method based on content analysis
CN103747258B (en) * 2014-01-27 2015-02-04 中国科学技术大学 Encryption processing method for high-performance video coding standard
CN104036447B (en) * 2014-03-12 2017-04-05 西南交通大学 PNG electronic invoices image watermark based on block sort is embedded in and authentication method
CN104301727B (en) * 2014-09-22 2018-02-23 中国人民解放军重庆通信学院 Quality controllable H.264 video-aware AES based on CABAC
CN104581201A (en) * 2014-12-31 2015-04-29 乐视网信息技术(北京)股份有限公司 Video encryption method and device
CN104735457A (en) * 2015-03-27 2015-06-24 南京中新赛克科技有限责任公司 Video encryption and decryption method based on H.264 code
KR20160118117A (en) * 2015-04-01 2016-10-11 세종대학교산학협력단 Apparatus and method for secure transmission of video data
CN105049877A (en) * 2015-06-02 2015-11-11 阔地教育科技有限公司 Encryption method and device for live and recorded broadcast interaction system
CN106470345B (en) * 2015-08-21 2020-02-14 阿里巴巴集团控股有限公司 Video encryption transmission method, video decryption method, video encryption transmission device, video decryption device and video encryption transmission system
CN106850515A (en) * 2015-12-07 2017-06-13 中国移动通信集团公司 A kind of data processing method and video acquisition device, decoding apparatus
CN105472392B (en) * 2015-12-11 2018-11-20 西安万像电子科技有限公司 Screen video decoding method and codec based on the compression of gradual character block
CN106203131A (en) * 2016-06-24 2016-12-07 维沃移动通信有限公司 A kind of image encryption method and mobile terminal
CN107172433A (en) * 2017-04-28 2017-09-15 安徽四创电子股份有限公司 A kind of video encryption method
CN107426172A (en) * 2017-06-05 2017-12-01 国政通科技股份有限公司 The matching method for pushing and device of a kind of identity information

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1617584A (en) * 2004-12-06 2005-05-18 武汉大学 Dynamic random mess correction and enciphering-deenciphering method for video frequency information
CN101106527A (en) * 2007-07-31 2008-01-16 中国网络通信集团公司 Point-to-point information transfer method, system and network gateway unit
CN102281261A (en) * 2010-06-10 2011-12-14 杭州华三通信技术有限公司 Data transmission method, system and apparatus
JP2014155041A (en) * 2013-02-08 2014-08-25 Nippon Telegr & Teleph Corp <Ntt> Remote video distribution method and remote video distribution system
CN105471860A (en) * 2015-11-19 2016-04-06 浙江宇视科技有限公司 Video data transmission method and apparatus
CN105959708A (en) * 2016-06-07 2016-09-21 浪潮软件股份有限公司 Encryption method of video data
CN108900849A (en) * 2018-07-26 2018-11-27 苏州科达科技股份有限公司 Video data encryption method, system, equipment and storage medium

Also Published As

Publication number Publication date
CN114640855A (en) 2022-06-17
CN110149521A (en) 2019-08-20

Similar Documents

Publication Publication Date Title
CN110149521B (en) Data processing method and system
US7636439B2 (en) Encryption method, encryption apparatus, data storage distribution apparatus and data delivery system
EP2832102B1 (en) Methods and systems for cryptographic access control of video
JP5615273B2 (en) Method and apparatus for selective data encryption
JP4188958B2 (en) ENCRYPTION METHOD, DATA DISTRIBUTION SYSTEM, ENCRYPTION DEVICE, AND DATA STORAGE / DISTRIBUTION DEVICE
EP3668104B1 (en) Video scrambling method and device with adaptive mode selection, network camera and readable storage medium
CN106254382B (en) Media data processing method and device
CN109639691B (en) Method and device for monitoring data encryption, computer equipment and storage medium
US10320557B2 (en) Encoder, decoder and methods employing partial data encryption
Tew et al. Separable authentication in encrypted HEVC video
CN112511299B (en) Interface data transmission method and device, electronic equipment and storage medium
CN108322750B (en) Encrypted domain HEVC video data hiding method based on residual coefficient modulation
WO2021196960A1 (en) Encrypted video call method and apparatus, and device and storage medium
CN102265634B (en) Transmission, reception and identification methods, security processor and information recording medium for said methods
US11276138B2 (en) Image data encryption and rendering system
CN107294946A (en) Data protection method
KR101899554B1 (en) Security system for transmitting video data
US10489559B2 (en) Method for providing protected multimedia content
CN112104874A (en) Data transmission method and system
CN111131270B (en) Data encryption and decryption method and device, electronic equipment and storage medium
Khan et al. A joint watermarking and encryption scheme for DCT based codecs
CN111698534B (en) Video processing method and device, electronic equipment and storage medium
Veličković et al. „CB-SVD Watermarking Algorithm for Video Protection with Reduced Cyclic Insertion Scheme “
CN102687519B (en) The reception of video stream and transfer approach, recording medium, conveyer and reversal block
CN117857844A (en) Video code stream encryption method, video code stream decryption method and related devices

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