Audio and video data encryption and decryption methods and devices and playing equipment
Technical Field
The invention relates to the technical field of audio and video security, in particular to an encryption and decryption method and device for audio and video data and playing equipment.
Background
With the rapid development of network and multimedia technologies, more and more audio and video data are beginning to be widely applied to the internet, and meanwhile, with the continuous enhancement of copyright awareness of people, people begin to pay attention to the copyright protection and security and confidentiality problems of the audio and video data. Therefore, the encryption protection of audio-video data is increasingly important in internet communication transmission.
At present, in an encryption mode of audio and video data in the prior art, all data information of a recorded audio and video file is generally encrypted as a whole at the same time, and therefore, all data of the audio and video file are subjected to security protection by using the same key.
Disclosure of Invention
In view of this, the embodiment of the present invention provides an encryption method for audio and video data, so as to solve the problems of poor security and low encryption efficiency of an encryption method for audio and video data in the prior art.
According to a first aspect, an embodiment of the present invention provides an encryption method for audio and video data, including the following steps:
acquiring audio and video stream data and coding the audio and video stream data;
extracting characteristic frame data from the coded audio and video stream data;
acquiring an encryption rule of the characteristic frame data of the current frame;
and encrypting the characteristic frame data frame by frame according to the encryption rule of the characteristic frame data of the current frame until the characteristic frame data of the tail frame is encrypted.
With reference to the first aspect, in a first implementation manner of the first aspect, the step of obtaining an encryption rule of the feature frame data of the current frame further includes:
acquiring the data size of the characteristic frame data of the current frame;
acquiring a first encryption identifier generated by the characteristic frame data of the previous frame of the current frame;
acquiring the identification byte number of the first encryption identification;
setting a preset byte alignment digit;
and generating a second encryption identifier of the characteristic frame data of the current frame according to the sum of the calculated data size, the identifier byte number and the preset byte alignment number.
With reference to the first aspect or the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the characteristic frame data includes: intra-coded frames, forward predicted frames, and bi-directional predicted frames.
With reference to the first implementation manner of the first aspect, in a third implementation manner of the first aspect, the identification byte number is 32 bits, 64 bits, 128 bits, or 256 bits.
According to a second aspect, an embodiment of the present invention provides a method for decrypting audio/video data, including:
acquiring encrypted characteristic frame data;
acquiring a decryption rule of the characteristic frame data of the current frame;
according to the decryption rule of the characteristic frame data of the current frame, decrypting the characteristic frame data frame by frame until the characteristic frame data of the tail frame is decrypted;
and decoding the decrypted characteristic frame data to obtain the audio and video stream data.
With reference to the second aspect, in a first embodiment of the second aspect, the step of obtaining a decryption rule of the feature frame data of the current frame further includes:
acquiring the data size of the characteristic frame data of the current frame;
acquiring a first decryption identifier generated by the characteristic frame data of the previous frame of the current frame;
acquiring the identification byte number of the first decryption identification;
setting a preset byte alignment digit;
and generating a second decryption identifier for decrypting the characteristic frame data of the current frame according to the sum of the calculated data size, the identification byte number and the preset byte alignment number.
With reference to the second aspect or the first embodiment of the second aspect, in a second embodiment of the second aspect, the characteristic frame data includes: intra-coded frames, forward predicted frames, and bi-directional predicted frames.
With reference to the first embodiment of the second aspect, in a third embodiment of the second aspect, the feature frame data includes: intra-coded frames, forward predicted frames, and bi-directional predicted frames.
According to a third aspect, an embodiment of the present invention provides an apparatus for encrypting audio/video data, including:
the first acquisition module is used for acquiring audio and video stream data and encoding the audio and video stream data;
the extraction module is used for extracting characteristic frame data from the coded audio and video stream data;
the second acquisition module is used for acquiring the encryption rule of the characteristic frame data of the current frame;
and the encryption module is used for encrypting the characteristic frame data frame by frame according to the encryption rule of the characteristic frame data of the current frame until the characteristic frame data of the tail frame is encrypted.
According to a fourth aspect, an embodiment of the present invention provides a device for decrypting audio/video data, including:
the third acquisition module is used for acquiring the encrypted characteristic frame data;
the fourth obtaining module is used for obtaining a decryption rule of the characteristic frame data of the current frame;
the decryption module is used for decrypting the characteristic frame data frame by frame according to the decryption rule of the characteristic frame data of the current frame until the characteristic frame data of the tail frame is decrypted;
and the decoding module is used for decoding the decrypted characteristic frame data to obtain the audio and video stream data.
According to a fifth aspect, an embodiment of the present invention provides a storage medium, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method for encrypting audio and video data described in the first aspect or any one of the embodiments of the first aspect are implemented; or, implementing the steps of the decryption method for audio-video data described in the second aspect or any one of the embodiments of the second aspect.
According to a sixth aspect, an embodiment of the present invention provides a playback device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method for encrypting audio and video data according to the first aspect or any implementation manner of the first aspect when executing the program; or, implementing the steps of the decryption method of the audio-video data described in the second aspect or any embodiment of the second aspect.
The technical scheme of the embodiment of the invention has the following advantages:
the invention provides an encryption and decryption method, device and playing equipment of audio and video data, wherein the encryption method comprises the following steps: acquiring audio and video stream data and coding the audio and video stream data; extracting characteristic frame data from the coded audio and video stream data; acquiring an encryption rule of characteristic frame data of a current frame; and encrypting the characteristic frame data frame by frame according to the encryption rule of the characteristic frame data of the current frame until the characteristic frame data of the tail frame is encrypted. The invention utilizes the encryption rule of the characteristic frame data of the current frame to encrypt the coded audio and video stream data frame by frame in real time, can increase the security of the audio and video stream data to a great extent so as to prevent the audio and video stream data from being easily analyzed, and simultaneously, does not need to involve complicated encryption algorithm to occupy excessive data memory, thereby saving the data encryption memory and further improving the transmission speed of the audio and video stream data.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a first flowchart of an encryption method of audio-video data according to an embodiment of the present invention;
fig. 2 is a second flowchart of the encryption method of the audio-video data in the embodiment of the present invention;
FIG. 3 is a diagram illustrating an arrangement structure of feature frame data according to an embodiment of the present invention;
fig. 4 is a first flowchart of a decryption method of audio-video data according to an embodiment of the present invention;
fig. 5 is a second flowchart of the decryption method of the audio-video data in the embodiment of the present invention;
fig. 6 is a block diagram of an encryption apparatus for audio/video data according to an embodiment of the present invention;
fig. 7 is a block diagram of a decryption apparatus for audio/video data according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a hardware structure of a playback device in the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
The embodiment of the invention provides an encryption method of audio and video data, which comprises the following steps as shown in figure 1:
step S1: and acquiring audio and video stream data and coding the audio and video stream data. The audio-video stream data herein refers to audio data and/or video data that is being recorded and continuous by the streaming media device, and is not audio-video data that has been recorded by the streaming media device. Therefore, the audio/video stream data in this embodiment is audio data and/or video data recorded in real time, for example: the audio-video streaming data may be MP3 audio data or MP4 video data. In order to better transmit audio and video stream data, the audio and video stream data needs to be encoded, that is, the audio and video stream data is converted into encoded data in a binary form, the encoding in the embodiment adopts an h264 encoding format, and the audio and video stream data is encoded in real time by using the h264 encoding format and then encrypted.
Step S2: and extracting characteristic frame data from the coded audio and video stream data. The characteristic frame data here are an intra-frame coded frame, a forward predicted frame and a bidirectional predicted frame, wherein the intra-frame coded frame is an I frame in the h264 coding format, the forward predicted frame is a P frame in the h264 format, and the bidirectional predicted frame is a B frame in the h264 coding format. And extracting the I frame, the P frame and the B frame of each frame of audio and video stream data according to the frame identification of each frame of audio and video stream data. The characteristic frame data is used as important information in the audio and video stream data, the safety of the audio and video stream data can be ensured as long as the important information is effectively encrypted, and all content information of the audio and video stream data does not need to be encrypted, so that the data encryption size of the audio and video stream data can be reduced to a great extent, and the data transmission speed can be improved.
Step S3: and acquiring an encryption rule of the characteristic frame data of the current frame. The encryption rule here is the encryption mode of the current frame.
In an embodiment, the step S3 may specifically include, as shown in fig. 2, the following steps in the execution process:
step S31: and acquiring the data size of the characteristic frame data of the current frame. The audio and video stream data are arranged in the frame rate queue frame by frame in sequence, so the characteristic frame data extracted from the audio and video stream data are also arranged frame by frame in sequence. As shown in fig. 3, the audio/video stream data are arranged in the frame rate queue in order, for example: the feature frame data No. 5 in fig. 3 is taken as the feature frame data of the current frame, and the data Size of the feature frame data No. 5 is set to Size, and the data Size of the feature frame data No. 5 is set to 1000KB, that is, Size5=1000KB。
Step S32: and acquiring a first encryption identifier generated by the characteristic frame data of the previous frame of the current frame. For example: and taking the No. 5 characteristic frame data as current frame data, taking the characteristic frame data of the previous frame as No. 4 characteristic frame data, and acquiring a first encryption identifier generated by the No. 4 characteristic frame data, wherein the first encryption identifier can be different types of letters or numbers or different types of letter or number combinations.
Step S33: and acquiring the identification byte number of the first encryption identification. The number of bits of the identification byte of the first encryption identifier may be 32 bits, 64 bits, 128 bits, or 256 bits, preferably 32 bits, but the number of bits of the identification byte of the first encryption identifier may also be 64 bits, 128 bits, or 256 bits, but the higher the number of bits is, the larger the size of the data memory occupied by the first encryption identifier is, so that an appropriate number of bits of the byte is selected as the byte length of the first encryption identifier, so as to prevent the data size of the first encryption identifier from excessively affecting the data transmission of the audio/video stream.
Step S34: and setting a preset byte alignment digit. The preset byte alignment bit number here is a bit number set to achieve byte data alignment on the storage space, that is, an alignment value of a specified data structure or class. The predetermined byte alignment bit number in this embodiment is 2nIn this embodiment, n ≧ 3 is preferred, that is, the number of preset byte alignment bits is preferably 8, and may of course be 16, but the number of preset byte alignment bits is preferably 8 for byte data alignment and for ensuring a proper size of data.
Step S35: and generating a second encryption identifier of the characteristic frame data of the current frame according to the sum of the calculated data size, the first encryption identifier and the preset byte alignment digit. For example: the first encryption identifier is the identifier generated by the feature frame data of the previous frame of the feature frame data No. 5, i.e. the key identifier generated by the feature frame data No. 4, and the data Size of the feature frame data No. 55The number of bits of the predetermined byte alignment is 8, and the number of bits of the identification byte of the first encryption identifier is 32, so that the second encryption identifier is 1040 according to the calculation 1000+8+ 32. For example: the first encryption identifier is the identifier of the generation of the characteristic frame data of the frame before the characteristic frame data No. 2, i.e. the identifier of the key generated by the characteristic frame data No. 1, and the data Size of the characteristic frame data No. 22The number of bits of the predetermined byte alignment is 8, and the number of bits of the identification byte of the first encryption identifier is 32, so that the number of bits of the identification byte of 500+8+32 is 540 according to the calculation, that is, the number of bits of the second encryption identifier is 540.
And generating a second encryption identifier according to the steps from the step S31 to the step S35, namely, the encryption rule of the characteristic frame data of the current frame. The encryption rule is based on SM4ECB mode encryption, the encryption rule is suitable for all frame data in the recording process of audio and video stream data, namely each frame data of the audio and video stream data can be encrypted according to the method, namely the encryption identifier of the characteristic frame data of the next frame depends on the encryption identifier of the characteristic frame data of the previous frame, the audio and video stream data has stronger safety according to the encryption rule, the encryption rule in the embodiment is utilized to encrypt each frame of characteristic frame data in the audio and video stream data, all the characteristic frame data are not easy to analyze, and the safety of the audio and video stream data is enhanced.
Step S4: and encrypting the characteristic frame data frame by frame according to the encryption rule of the characteristic frame data of the current frame until the characteristic frame data of the tail frame is encrypted.
Specifically, for example: in fig. 3, the number of bits of the first encryption flag generated by the data of feature frame number 1 is 32, and the data Size, of the data of feature frame number 2 is 322If the number of preset byte alignment bits is 8 and the number 2 of feature frame data is the current frame, the encryption identifier of the number 2 of feature frame data is 500+8+32, 540. By analogy, the number 3 feature frame data is taken as the current frame, the feature frame data of the previous frame is the number 2 feature frame data, the number of identification byte digits of the number 2 encryption identifier 540 is also 32 digits, and the data Size, and Size of the number 3 feature frame data are also 32 digits3700KB, the encrypted identifier of the frame data of feature number 3 is 700+8+32, 740. And by analogy, the number 4 characteristic frame data is taken as the current frame, the characteristic frame data of the previous frame is the number 3 characteristic frame data, the number of identification byte digits of the number 4 encryption identifier 740 is also 32 digits, and the data Size and Size of the number 3 characteristic frame data are Size3900KB, the encrypted identifier of the frame data of feature number 4 is 900+8+32, 940. By analogy, the feature frame data of number 5 is taken as the current frame, the feature frame data of the previous frame is the feature frame data of number 4, the number of identification byte digits of the encryption identifier 940 of number 4 is also 32, and the data Size of the feature frame data of number 5 is Size3The encryption identifier of the frame data of feature number 5 is 1000+8+ 32-1040 (100 KB). According to the encryption mode, the encryption identifier of the characteristic frame data of the next frame depends on the encryption identifier of the characteristic frame data of the previous frame, the characteristic frame data in the figure 3 is encrypted frame by frame until the N frames of the tail frame are encrypted, the real-time recorded audio and video stream data can be ensured not to be easily cracked, the safety of the audio and video stream data is obviously enhanced, and simultaneously, compared with the traditional method, the method for encrypting all recorded audio and video stream data is used for encrypting all recorded audio and video stream dataThe video data is encrypted by the same key based on a complex encryption algorithm, so that the data size of audio and video stream data transmission can be reduced to a great extent.
The method for encrypting the audio and video data in the embodiment of the invention encrypts the coded audio and video stream data frame by using the encryption rule of the characteristic frame data of the current frame in real time, can increase the safety of the audio and video stream data to a great extent so as to prevent the audio and video stream data from being easily analyzed, and simultaneously does not need to involve a complex encryption algorithm to occupy excessive data memory, so that the data encryption memory can be saved, and the transmission speed of the audio and video stream data can be further increased.
Example 2
An embodiment of the present invention provides a method for decrypting audio/video data, as shown in fig. 4, including:
step S41: and acquiring the encrypted characteristic frame data. The encrypted characteristic frame data is characteristic frame data of all encrypted frames, that is, characteristic frame data of all frames to which the key is added.
Step S42: and acquiring a decryption rule of the characteristic frame data of the current frame. The decryption rule here is the decryption mode of the current frame.
In an embodiment, the step S42 may specifically include, as shown in fig. 5, the following steps in the execution process:
step S51: and acquiring the data size of the characteristic frame data of the current frame. The audio and video stream data are arranged in the frame rate queue frame by frame in sequence, so the characteristic frame data extracted from the audio and video stream data are also arranged frame by frame in sequence. As shown in fig. 3, the audio/video stream data are arranged in the frame rate queue in order, for example: the feature frame data No. 5 in FIG. 3 is taken as the feature frame data of the current frame, and the data Size of the feature frame data No. 5 is set as Size5The data Size of the No. 5 feature frame data is 1000KB, i.e. Size5=1000KB。
Step S52: and acquiring a first decryption identifier generated by the characteristic frame data of the previous frame of the current frame. For example: and taking the No. 5 characteristic frame data as current frame data, taking the characteristic frame data of the previous frame as No. 4 characteristic frame data, and acquiring a first decryption identifier generated by the No. 4 characteristic frame data, wherein the first decryption identifier can be different types of letters or numbers or different types of combinations of letters or numbers.
Step S53: and acquiring the identification byte bit number of the first decryption identification. The number of identification byte bits of the first decryption identifier may be 32 bits, 64 bits, 128 bits, or 256 bits, preferably 32 bits, but the number of identification byte bits of the first decryption identifier may also be 64 bits, 128 bits, or 256 bits, but the higher the number of bits is, the larger the size of the data memory occupied by the first decryption identifier is, so that an appropriate number of byte bits is selected as the byte length of the first decryption identifier, so as to prevent the data size of the first decryption identifier from affecting the data transmission of the audio/video stream.
Step S54: and setting a preset byte alignment digit. The preset byte alignment bit number here is a bit number set to achieve byte data alignment on the storage space, that is, an alignment value of a specified data structure or class. The predetermined byte alignment bit number in this embodiment is 2nIn this embodiment, n ≧ 3 is preferred, that is, the number of preset byte alignment bits is preferably 8, and may of course be 16, but the number of preset byte alignment bits is preferably 8 for byte data alignment and for ensuring a proper size of data.
Step S55: and generating a second decryption identifier for decrypting the characteristic frame data of the current frame according to the sum of the calculated data size, the identification byte digit and the preset byte alignment digit. For example: the current frame is No. 5 characteristic frame data, and the data Size of No. 5 characteristic frame data5The feature frame data of the previous frame is the feature frame data No. 4, the number of the identification byte bits of the first decryption identifier generated by the feature frame data No. 4 is 32 bits, the preset byte alignment bit number is 8, that is, the sum of the data size of the feature frame data No. 5, the number of the identification byte bits and the preset byte alignment bit number is 1040, that is, the second decryption identifier is 1040, and the second decryption identifier of 1040 needs to be decrypted in the data storage space. Reversely shifting according to the identification byte number, the preset byte alignment number and the data size of the No. 5 characteristic frame data of the first decryption identification generated by the No. 4 characteristic frame dataAnd the byte position of the dynamic characteristic frame data further decrypts the second decryption identifier to obtain the coded audio/video stream data.
The second decryption flag generated according to the above steps S51-S55 is the decryption rule of the feature frame data of the current frame. The decryption rule is based on decryption in a SM4ECB mode, the decryption rule is suitable for all frame data of audio and video stream data in the recording process, namely, each frame data of the audio and video stream data can be decrypted in the mode, namely, decryption identification of feature frame data of a next frame depends on decryption identification of feature frame data of a previous frame, and the feature frame data can be quickly decrypted in the mode.
Step S43: and decrypting the characteristic frame data frame by frame according to the decryption rule of the characteristic frame data of the current frame until the decryption of the characteristic frame data of the tail frame is completed. Specifically, for example: in fig. 3, the number of bits of the first decryption identifier generated by the number 1 of feature frame data is 32, and the data Size, of the number 2 of feature frame data is2If the number of the preset byte alignment bits is 8 and the number 2 of the feature frame data is the current frame, the decryption identifier of the number 2 of the feature frame data is 500+8+32, which is 540, and the second decryption identifier of 540 needs to be decrypted on the data storage space. By analogy, the data of the feature frame data # 3 is taken as the current frame, the feature frame data of the previous frame is the feature frame data # 2, the number of identification byte bits of the decryption identifier # 2 540 is also 32, and the data Size, of the feature frame data # 3 is also 323700KB, the decryption identifier of the data of feature frame No. 3 is 700+8+32, 740, and the second decryption identifier of 740 needs to be decrypted on the data storage space. And by analogy, the number 4 feature frame data is taken as the current frame, the feature frame data of the previous frame is the number 3 feature frame data, the number of identification byte digits of the number 4 decryption identifier 740 is also 32 digits, and the data Size and Size of the number 3 feature frame data are Size3When the decryption identifier of the number 4 characteristic frame data is 900+8+32, 940, the second decryption identifier of 940 needs to be decrypted on the data storage space. By analogy, the No. 5 characteristic frame data is taken as the current frame, the characteristic frame data of the previous frame is the No. 4 characteristic frame data,the number of bits of the identifier byte of the decryption identifier 940 # 4 is also 32 bits, and the data Size of the data of the feature frame # 5 is Size3When the decryption identifier of the frame data of feature number 5 is 1000+8+32, 1040, the second decryption identifier of 1040 needs to be decrypted on the data storage space. According to the decryption mode, namely the decryption identifier of the characteristic frame data of the next frame depends on the decryption identifier of the characteristic frame data of the previous frame, the characteristic frame data in the figure 3 is decrypted frame by frame until the N frames of the tail frame are decrypted, the decoding of the coded audio and video stream data can be rapidly realized, and the safety of the audio and video stream data is ensured.
Step S44: and decoding the decrypted characteristic frame data to obtain audio and video stream data. And decoding the characteristic frame data stored in the decrypted binary form to restore the recorded audio and video picture, wherein the audio and video picture can be normally played by using the streaming media playing equipment.
Example 3
An embodiment of the present invention provides an encryption apparatus for audio and video data, as shown in fig. 6, including:
the first obtaining module 61 is configured to obtain audio/video stream data and encode the audio/video stream data.
And the extracting module 62 is configured to extract characteristic frame data from the encoded audio/video stream data.
And a second obtaining module 63, configured to obtain an encryption rule of the feature frame data of the current frame.
And an encryption module 64, configured to encrypt the feature frame data frame by frame according to an encryption rule of the feature frame data of the current frame until the feature frame data of the last frame is encrypted.
In the encryption apparatus of audio/video data in the embodiment of the present invention, in fig. 6, the second obtaining module 63 further includes:
the first obtaining sub-module 631 is configured to obtain a data size of the feature frame data of the current frame;
the second obtaining submodule 632 is configured to obtain a first encryption identifier generated by the feature frame data of the previous frame of the current frame;
a third obtaining submodule 633, configured to obtain an identifier byte number of the first encryption identifier;
a first setting sub-module 634 for setting the preset byte alignment digit number;
the generating submodule 635 is configured to generate a second encrypted identifier of the feature frame data of the current frame according to the sum of the calculated data size, the identifier byte number and the preset byte alignment number.
In the encryption device of audio/video data in the embodiment of the present invention, the characteristic frame data includes: intra-coded frames, forward predicted frames, and bi-directional predicted frames.
In the encryption device for audio and video data in the embodiment of the invention, the bit number of the identification byte is 32 bits or 64 bits or 128 bits or 256 bits.
The audio and video data encryption device in the embodiment of the invention encrypts the coded audio and video stream data frame by using the encryption rule of the characteristic frame data of the current frame in real time, can increase the security of the audio and video stream data to a great extent so as to prevent the audio and video stream data from being easily analyzed, and simultaneously does not need to involve a complex encryption algorithm to occupy excessive data memory, so that the data encryption memory can be saved, and the transmission speed of the audio and video stream data can be further improved.
Example 4
As shown in fig. 7, the apparatus for decrypting audio/video data in the embodiment of the present invention includes:
and a third obtaining module 71, configured to obtain the encrypted feature frame data.
A fourth obtaining module 72, configured to obtain a decryption rule of the feature frame data of the current frame.
And the decryption module 73 is configured to decrypt the feature frame data frame by frame according to the decryption rule of the feature frame data of the current frame until the feature frame data of the last frame is decrypted.
And the decoding module 74 is configured to decode the decrypted feature frame data to obtain audio/video stream data.
In the apparatus for decrypting audio/video data in the embodiment of the present invention, in fig. 7, the fourth obtaining module 72 further includes:
a first obtaining submodule 721 configured to obtain a data size of the feature frame data of the current frame;
the second obtaining submodule 722 is configured to obtain a first decryption identifier generated by feature frame data of a previous frame of the current frame;
a third obtaining sub-module 723, configured to obtain the first decrypted byte-identifying number;
the second setting submodule 724 is used for acquiring a preset alignment digit;
the decryption submodule 725 is configured to decrypt, according to the sum of the calculated data size, the identification byte number and the preset byte alignment number, the second decryption identification generated by the feature frame data of the current frame.
In the apparatus for decrypting audio/video data according to the embodiment of the present invention, the characteristic frame data includes: intra-coded frames, forward predicted frames, and bi-directional predicted frames.
In the decryption device for audio and video data in the embodiment of the invention, the identification byte bit number is 32 bits or 64 bits or 128 bits or 256 bits.
The audio and video data decryption device in the embodiment of the invention can quickly decrypt the characteristic frame data according to the way based on the decryption rule that the decryption of the decryption identification of the characteristic frame data of the next frame depends on the decryption of the decryption identification of the characteristic frame data of the previous frame.
Example 5
An embodiment of the present invention provides a storage medium having stored thereon computer instructions which, when executed by a processor, implement the steps of the method of embodiment 1 or embodiment 2. The storage medium is also stored with audio and video stream data, characteristic frame data, an encryption rule of the characteristic frame data of the current frame, a first encryption identifier, an identifier byte bit number of the first encryption identifier, a preset byte alignment bit number, a decryption rule and the like. The storage medium may be a magnetic Disk, an optical Disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a flash Memory (FlashMemory), a Hard Disk (Hard Disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
Example 6
An embodiment of the present invention provides a playback device, as shown in fig. 8, including a memory 820, a processor 810, and a computer program stored on the memory 820 and being executable on the processor 810, where the processor 810 implements the steps of the method in embodiment 1 or embodiment 2 when executing the program.
Fig. 8 is a schematic diagram of a hardware structure of a playback device for executing a processing method for list item operations according to an embodiment of the present invention, as shown in fig. 8, the playback device includes one or more processors 810 and a memory 820, where one processor 810 is taken as an example in fig. 8.
The playing device executing the processing method of the list item operation may further include: an input device 830 and an output device 840.
The processor 810, the memory 820, the input device 830, and the output device 840 may be connected by a bus or other means, such as the bus connection in fig. 8.
Processor 810 may be a Central Processing Unit (CPU). The Processor 810 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.