[go: up one dir, main page]

CN108777803A - Broadcasting and TV cloud platform video stream processing method, device, equipment and medium - Google Patents

Broadcasting and TV cloud platform video stream processing method, device, equipment and medium Download PDF

Info

Publication number
CN108777803A
CN108777803A CN201810568340.2A CN201810568340A CN108777803A CN 108777803 A CN108777803 A CN 108777803A CN 201810568340 A CN201810568340 A CN 201810568340A CN 108777803 A CN108777803 A CN 108777803A
Authority
CN
China
Prior art keywords
data blocks
data
encrypted
video stream
data block
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.)
Pending
Application number
CN201810568340.2A
Other languages
Chinese (zh)
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.)
Chengdu Acrie Technology Co Ltd
Sichuan Normal University
Original Assignee
Chengdu Acrie Technology Co Ltd
Sichuan Normal University
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 Chengdu Acrie Technology Co Ltd, Sichuan Normal University filed Critical Chengdu Acrie Technology Co Ltd
Priority to CN201810568340.2A priority Critical patent/CN108777803A/en
Publication of CN108777803A publication Critical patent/CN108777803A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2347Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving video stream encryption
    • H04N21/23476Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving video stream encryption by partially encrypting, e.g. encrypting the ending portion of a movie
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Power Engineering (AREA)
  • Computer Security & Cryptography (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

本发明提供的广电云平台视频流处理方法、装置、设备及介质,属于视频处理技术领域。该广电云平台视频流处理方法通过将待处理视频流数据分割为多个数据块;根据预设规则选取所述多个数据块中的部分数据块作为待加密数据块;对每个待加密数据块进行加密;将加密后的数据块和多个数据块中未加密的数据块进行分布式云端存储,其中加密后的数据块和未加密的数据块的存储顺序与在待处理视频流中的位置顺序不同,从而在广电云平台开放的环境下,使得不法分子尽管可以读取所有存储于云服务器上的视频流数据块,但到底哪些数据块属于同一个文件并按怎样的顺序组成该文件,非法入侵者无从知道,进而降低了广电云平台的新媒体新闻视频被不法者篡改的风险。

The video stream processing method, device, equipment and media provided by the present invention belong to the technical field of video processing. The broadcasting cloud platform video stream processing method divides the video stream data to be processed into a plurality of data blocks; selects some data blocks in the plurality of data blocks as data blocks to be encrypted according to preset rules; The encrypted data block and the unencrypted data block among multiple data blocks are distributed and stored in the cloud. The order of positions is different, so that in the open environment of the radio and television cloud platform, although criminals can read all the video stream data blocks stored on the cloud server, which data blocks belong to the same file and in what order to form the file , illegal intruders have no way of knowing, thereby reducing the risk of new media news videos on the radio and television cloud platform being tampered with by lawbreakers.

Description

广电云平台视频流处理方法、装置、设备及介质Broadcasting and television cloud platform video stream processing method, device, equipment and medium

技术领域technical field

本发明涉及视频处理技术领域,具体而言,涉及广电云平台视频流处理方法、装置、设备及介质。The present invention relates to the technical field of video processing, in particular to a video stream processing method, device, equipment and medium of a radio and television cloud platform.

背景技术Background technique

广电新媒体新闻视频具有海量性、官方性、公共性、开放性、点播方便性等特点,它已成为社会公众、企事业单位获取政府相关信息的重要依据。但基于Internet的新媒体视频流在传输过程中,它很容易受到国内外敌对黑客对正常信号进行篡改的攻击,一经播出,将严重损害党和政府的形象。然而现有的要么是采用传统信息加密机制,但对海量视频流数据整体加密过于复杂,会严重影响视频流播放的系统性能,从而极大地限制此方法的视频流数据规模和可扩展性;要么是使用瞬时电磁脉冲发射监测电磁环境安防TEMPEST技术。但TEMPEST的理论和技术方法均以电磁兼容EMC为基础,侧重于解决电子设备在工作时形成的电子信息泄漏,以防电磁信息在截获后被还原出一些重要内容,但对海量视频流来说,此方法的处理效率会大大降低。Radio and TV new media news video has the characteristics of mass, official, public, open, and on-demand convenience. It has become an important basis for the public, enterprises and institutions to obtain government-related information. However, during the transmission of Internet-based new media video streams, it is vulnerable to attacks by hostile hackers at home and abroad to tamper with normal signals. Once it is broadcast, it will seriously damage the image of the party and the government. However, the existing ones either use the traditional information encryption mechanism, but the overall encryption of massive video stream data is too complicated, which will seriously affect the system performance of video stream playback, thereby greatly limiting the video stream data scale and scalability of this method; or It uses instantaneous electromagnetic pulse emission to monitor the electromagnetic environment security TEMPEST technology. However, TEMPEST's theory and technical methods are based on electromagnetic compatibility EMC, focusing on solving the electronic information leakage formed by electronic equipment during work, in case electromagnetic information is restored to some important content after interception, but for massive video streams , the processing efficiency of this method will be greatly reduced.

发明内容Contents of the invention

本发明实施例提供的广电云平台视频流处理方法、装置、设备及介质,可以解决现有技术中的存在的视频被不法者篡改的风险较大的技术问题。The video stream processing method, device, equipment, and medium of the radio and television cloud platform provided by the embodiments of the present invention can solve the technical problem in the prior art that there is a high risk of video tampering by lawbreakers.

第一方面,本发明实施例提供的一种广电云平台视频流处理方法,包括将待处理视频流数据分割为多个数据块;根据预设规则选取所述多个数据块中的部分数据块作为待加密数据块;对每个所述待加密数据块进行加密;将加密后的数据块和所述多个数据块中未加密的数据块进行分布式云端存储,其中所述加密后的数据块和所述未加密的数据块的存储顺序与在所述待处理视频流中的位置顺序不同。In the first aspect, a method for processing a video stream on a radio and television cloud platform provided by an embodiment of the present invention includes dividing the video stream data to be processed into a plurality of data blocks; selecting some data blocks in the plurality of data blocks according to preset rules As a data block to be encrypted; each of the data blocks to be encrypted is encrypted; the encrypted data block and the unencrypted data block in the plurality of data blocks are stored in a distributed cloud, wherein the encrypted data The chunks and said unencrypted data chunks are stored in a different order than their positional order in said video stream to be processed.

结合第一方面,第一方面的一种实施方式,所述的对每个所述待加密数据块进行加密,包括:获取每个数据块在所述待处理视频流数据中的位置顺序编号;基于经典Rinjdael算法对每个所述待加密数据块进行加密,生成第一密文;对所述多个数据块分别进行MD5运算,生成每个数据块的全局唯一标识符;基于所述位置顺序编号、所述全局唯一标识符和所述待加密数据块的序号生成重构文件;基于所述经典Rinjdael算法对所述重构文件进行加密,生成第二密文。With reference to the first aspect, an implementation manner of the first aspect, the encrypting each of the data blocks to be encrypted includes: obtaining the sequence number of each data block in the video stream data to be processed; Encrypt each of the data blocks to be encrypted based on the classic Rinjdael algorithm to generate a first ciphertext; respectively perform MD5 operations on the multiple data blocks to generate a globally unique identifier for each data block; based on the position sequence number, the globally unique identifier and the sequence number of the data block to be encrypted to generate a reconstructed file; based on the classic Rinjdael algorithm, encrypt the reconstructed file to generate a second ciphertext.

结合第一方面,在第一方面的另一种实施方式,所述的将加密后的数据块和所述多个数据块中未加密的数据块进行分布式云端存储,其中所述加密后的数据块和所述未加密的数据块的存储顺序与在所述待处理视频流中的位置顺序不同,包括:对所述位置顺序编号、所述全局唯一标识符以及所述多个数据块进行打乱,记录被打乱的数据块的目标编号;将加密后的数据块所对应的所述第一密文和所述第二密文以及所述多个数据块中未加密的数据块所对应的所述位置顺序编号和所述目标编号进行存储。With reference to the first aspect, in another implementation manner of the first aspect, the encrypted data block and the unencrypted data block among the plurality of data blocks are stored in a distributed cloud, wherein the encrypted The storage sequence of the data block and the unencrypted data block is different from the position sequence in the video stream to be processed, including: performing a sequence number on the position sequence number, the globally unique identifier, and the plurality of data blocks scrambling, recording the target number of the scrambled data block; the first ciphertext and the second ciphertext corresponding to the encrypted data block and the unencrypted data block among the multiple data blocks The corresponding position sequence number and the target number are stored.

结合第一方面,在第一方面的另一种实施方式,所述的生成每个数据块的全局唯一标识符,包括:令D←(D\A)∪A′,所述D表示所述待处理视频流数据,所述A表示所述k个元素的一维数组,所述A′表示对所述A经过加密的数据块的集合,所述D\A表示未加密的数据块的集合,则对所述D中的任意的数据块进行MD5运算,生成MD5(di),将所述MD5(di)作为di的名称和全局唯一标识符gi,其中,所述di表示所述D中的第i个数据块。With reference to the first aspect, in another implementation manner of the first aspect, the generation of the globally unique identifier of each data block includes: let D←(D\A)∪A', the D represents the The video stream data to be processed, the A represents the one-dimensional array of the k elements, the A' represents the set of encrypted data blocks for the A, and the D\A represents the set of unencrypted data blocks , the MD5 operation is performed on any data block in D to generate MD5(d i ), and the MD5(d i ) is used as the name of d i and the globally unique identifier g i , wherein the d i Indicates the i-th data block in D.

结合第一方面,在第一方面的另一种实施方式,所述的对每个所述待加密数据块进行加密,生成第一密文,包括:基于经典Rinjdael算法生成长度为128位的密钥K;通过所述密钥K分别对所述K个所述待加密数据块进行加密,生成所述K个第一密文其中,所述表示所述一维数组A中的ai进行加密。In conjunction with the first aspect, in another implementation manner of the first aspect, the encrypting each of the data blocks to be encrypted to generate the first ciphertext includes: generating a ciphertext with a length of 128 bits based on the classic Rinjdael algorithm key K; respectively encrypt the K data blocks to be encrypted by the key K to generate the K first ciphertexts Among them, the Indicates that ai in the one-dimensional array A is encrypted.

第二方面,本发明实施例提供的广电云平台视频流处理方法,包括:获取所述的广电云平台视频流处理方法所存储的加密后的数据块和所述多个数据块中未加密的数据块以及存储顺序;对所述加密后的数据块进行解密,得到每个被加密的数据块所对应的明文;根据所述存储顺序,重排所述明文与所述多个数据块中未加密的数据块的位置顺序,得到待播放视频流数据。In the second aspect, the video stream processing method of the radio and television cloud platform provided by the embodiment of the present invention includes: obtaining the encrypted data block stored in the video stream processing method of the radio and television cloud platform and the unencrypted data block among the plurality of data blocks. data block and storage sequence; decrypt the encrypted data block to obtain the plaintext corresponding to each encrypted data block; The position order of the encrypted data blocks is used to obtain the video stream data to be played.

第三方面,本发明实施例提供的广电云平台视频流处理装置,包括数据分割模块,用于将待处理视频流数据分割为多个数据块;数据选取模块,用于根据预设规则选取所述多个数据块中的部分数据块作为待加密数据块;数据加密模块,用于对每个所述待加密数据块进行加密;存储模块,用于将加密后的数据块和所述多个数据块中未加密的数据块进行分布式云端存储,其中所述加密后的数据块和所述未加密的数据块的存储顺序与在所述待处理视频流中的位置顺序不同。In the third aspect, the video stream processing device of the radio and television cloud platform provided by the embodiment of the present invention includes a data segmentation module, which is used to divide the video stream data to be processed into a plurality of data blocks; a data selection module, which is used to select the selected Part of the data blocks in the plurality of data blocks are used as data blocks to be encrypted; a data encryption module is used to encrypt each of the data blocks to be encrypted; a storage module is used to store encrypted data blocks and the plurality of data blocks The unencrypted data blocks in the data blocks are stored in a distributed cloud, wherein the storage order of the encrypted data blocks and the unencrypted data blocks is different from the position order in the video stream to be processed.

第四方面,本发明实施例提供的广电云平台视频流处理装置,包括:数据获取单元,用于获取所述的广电云平台视频流处理方法所存储的加密后的数据块和所述多个数据块中未加密的数据块以及存储顺序;数据解密单元,用于对所述加密后的数据块进行解密,得到每个被加密的数据块所对应的明文;数据生成单元,用于根据所述存储顺序,重排所述明文与所述多个数据块中未加密的数据块的位置顺序,得到待播放视频流数据。In a fourth aspect, the video stream processing device of the radio and television cloud platform provided by the embodiment of the present invention includes: a data acquisition unit configured to acquire the encrypted data block stored in the video stream processing method of the radio and television cloud platform and the plurality of Unencrypted data blocks and storage order in the data block; data decryption unit, used to decrypt the encrypted data block, to obtain the plaintext corresponding to each encrypted data block; data generation unit, used for according to the The above storage sequence is rearranged to obtain the video stream data to be played.

第五方面,本发明实施例提供的一种电子设备,包括:存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如第一方面任一项所述广电云平台视频流处理方法的步骤;或者,所述处理器执行所述计算机程序时实现如第二方面所述广电云平台视频流处理方法的步骤。In the fifth aspect, an electronic device provided by an embodiment of the present invention includes: a memory, a processor, and a computer program stored in the memory and operable on the processor, wherein the processor executes The computer program realizes the steps of the video stream processing method of the radio and television cloud platform as described in any one of the first aspect; or, when the processor executes the computer program, realizes the video stream processing of the radio and television cloud platform as described in the second aspect method steps.

第六方面,本发明实施例提供的一种存储介质,所述存储介质上存储有指令,当所述指令在计算机上运行时,使得所述计算机执行如第一方面任一项所述的广电云平台视频流处理方法;或者使得所述计算机执行如第二方面所述的广电云平台视频流处理方法的步骤。In a sixth aspect, an embodiment of the present invention provides a storage medium, where instructions are stored on the storage medium, and when the instructions are run on a computer, the computer is made to perform the broadcasting and television broadcasting program described in any one of the first aspect. A method for processing video streams on a cloud platform; or causing the computer to execute the steps of the method for processing video streams on a broadcasting cloud platform as described in the second aspect.

与现有技术相比,本发明实施例提供的广电云平台视频流处理方法、装置、设备及介质的有益效果是:通过将待处理视频流数据分割为多个数据块;根据预设规则选取所述多个数据块中的部分数据块作为待加密数据块;对每个所述待加密数据块进行加密;将加密后的数据块和所述多个数据块中未加密的数据块进行分布式云端存储,其中所述加密后的数据块和所述未加密的数据块的存储顺序与在所述待处理视频流中的位置顺序不同,从而在网络开放的环境下,使得不法分子尽管可以读取所有存储于云服务器上的海量视频流数据块,但到底哪些数据块属于同一个文件并按怎样的顺序组成该文件,非法入侵者无从知道,进而降低了广电云平台的新媒体新闻视频被不法者篡改的风险。Compared with the prior art, the beneficial effects of the broadcasting cloud platform video stream processing method, device, equipment and medium provided by the embodiment of the present invention are: by dividing the video stream data to be processed into multiple data blocks; selecting according to preset rules Part of the data blocks in the plurality of data blocks are used as data blocks to be encrypted; each of the data blocks to be encrypted is encrypted; and the encrypted data blocks and the unencrypted data blocks in the plurality of data blocks are distributed cloud storage, wherein the storage order of the encrypted data block and the unencrypted data block is different from the position order in the video stream to be processed, so that in an open network environment, criminals can Read all the massive video stream data blocks stored on the cloud server, but which data blocks belong to the same file and in what order to form the file, illegal intruders have no way of knowing, which reduces the new media news video of the radio and television cloud platform Risk of tampering by wrongdoers.

为使本发明的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present invention more comprehensible, preferred embodiments will be described in detail below together with the accompanying drawings.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本发明的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention, and thus It should be regarded as a limitation on the scope, and those skilled in the art can also obtain other related drawings based on these drawings without creative work.

图1为本发明第一实施例提供的广电云平台视频流处理方法的流程图;Fig. 1 is the flowchart of the method for processing the video stream of the radio and television cloud platform provided by the first embodiment of the present invention;

图2为本发明第二实施例提供的广电云平台视频流处理装置的功能模块示意图;FIG. 2 is a schematic diagram of functional modules of a broadcasting cloud platform video stream processing device provided by a second embodiment of the present invention;

图3为本发明第三实施例提供的广电云平台视频流处理方法的流程图;3 is a flowchart of a method for processing video streams on a radio and television cloud platform according to a third embodiment of the present invention;

图4为本发明第四实施例提供的广电云平台视频流处理装置的功能模块示意图;4 is a schematic diagram of functional modules of a broadcasting cloud platform video stream processing device provided by a fourth embodiment of the present invention;

图5为本发明第五实施例提供的一种电子设备的示意图。Fig. 5 is a schematic diagram of an electronic device provided by a fifth embodiment of the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。因此,以下对在附图中提供的本发明的实施例的详细描述并非旨在限制要求保护的本发明的范围,而是仅仅表示本发明的选定实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, 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 in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention. Accordingly, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本发明的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。It should be noted that like numerals and letters denote similar items in the following figures, therefore, once an item is defined in one figure, it does not require further definition and explanation in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish descriptions, and cannot be understood as indicating or implying relative importance.

下面结合附图,对本发明的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Some embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.

第一实施例first embodiment

请参阅图1,是本发明实施例提供的广电云平台视频流处理方法的流程图。下面将对图1所示的具体流程进行详细阐述。Please refer to FIG. 1 , which is a flowchart of a method for processing video streams on a broadcasting cloud platform provided by an embodiment of the present invention. The specific process shown in FIG. 1 will be described in detail below.

步骤S101,将待处理视频流数据分割为多个数据块。Step S101, dividing the video stream data to be processed into multiple data blocks.

其中,所述待处理视频流数据分布式存储于云HDFS。Wherein, the video stream data to be processed is distributed and stored in cloud HDFS.

作为一种实施方式,将所述待处理视频流数据按照预设大小分割为多个数据块,将所述多个数据块的个数记为N。例如,所述待处理视频流数据D的大小为size,并按照mKB进行分割,则分块数N=|size/m|。As an implementation manner, the video stream data to be processed is divided into multiple data blocks according to a preset size, and the number of the multiple data blocks is denoted as N. For example, the size of the video stream data D to be processed is size, and it is divided according to mKB, then the number of blocks N=| size / m |.

可选地,令分割后的数据块为d1,d2,...,dn,并记di(di∈D)在原文件中的位置顺序编号记为oiOptionally, let the divided data blocks be d 1 , d 2 ,..., d n , and record the sequence number of d i (d i ∈ D) in the original file as o i .

可选地,在步骤S101之前,还包括:Optionally, before step S101, it also includes:

对原始视频流数据进行压缩,将压缩后的视频流数据作为待处理视频流数据。The original video stream data is compressed, and the compressed video stream data is used as the video stream data to be processed.

步骤S102,根据预设规则选取所述多个数据块中的部分数据块作为待加密数据块。Step S102, selecting some data blocks in the plurality of data blocks as data blocks to be encrypted according to preset rules.

其中,所述部分数据块的数量小于所述多个数据块所对应的数量。Wherein, the number of the partial data blocks is smaller than the number corresponding to the plurality of data blocks.

继续以前述例子为例来说,例如部分数据块的数量为k,则所述k小于分块总数N。Continuing to take the foregoing example as an example, for example, if the number of partial data blocks is k, then said k is smaller than the total number N of blocks.

作为一种实施方式,随机选取所述多个数据块中的部分数据块作为待加密数据块。如,随机生成被加密的数据块的个数,所述个数记为k,所述k大于或等于零,且小于所述多个数据块的总和N;再生成所述k个元素的一维数组A,令A={a1,a2,...,ak},其中,ai取[0,N]的随机整数,表示将被加密的数据块在所述待处理视频流中的位置顺序编号;则所述k个数据块即为所述待加密数据块。As an implementation manner, some data blocks among the plurality of data blocks are randomly selected as data blocks to be encrypted. For example, randomly generate the number of encrypted data blocks, said number is denoted as k, said k is greater than or equal to zero, and less than the sum N of said multiple data blocks; Array A, let A={a 1 , a 2 ,..., a k }, where a i is a random integer of [0, N], indicating that the data block to be encrypted is in the video stream to be processed The sequence numbers of the positions; then the k data blocks are the data blocks to be encrypted.

步骤S103,对每个所述待加密数据块进行加密。Step S103, encrypting each of the data blocks to be encrypted.

作为一种实施方式,获取每个数据块在所述待处理视频流数据中的位置顺序编号;基于经典Rinjdael算法对每个所述待加密数据块进行加密,生成第一密文;对所述多个数据块分别进行MD5运算,生成每个数据块的全局唯一标识符;基于所述位置顺序编号、所述全局唯一标识符和所述待加密数据块的序号生成重构文件;基于所述经典Rinjdael算法对所述重构文件进行加密,生成第二密文。As an implementation manner, obtain the position sequence number of each data block in the video stream data to be processed; encrypt each data block to be encrypted based on the classic Rinjdael algorithm, and generate a first ciphertext; A plurality of data blocks are respectively subjected to MD5 calculations to generate a globally unique identifier of each data block; a reconstructed file is generated based on the sequence number of the position, the globally unique identifier and the sequence number of the data block to be encrypted; based on the The classic Rinjdael algorithm encrypts the reconstructed file to generate a second ciphertext.

继续以前述例子为例来说,具体地,先获取每个数据块在所述待处理视频流数据中位置顺序编号oi,然后基于经典Rinjdael算法生成长度为128位的密钥K;通过所述密钥K分别对所述K个所述待加密数据块进行加密,生成所述K个第一密文其中,所述表示所述一维数组A中的ai进行加密。接着再令D←(D\A)∪A′,所述A′表示对所述A中的数据进行加密后的数据,所述D\A表示未加密的数据块,则对所述D中的任意的数据块进行MD5运算,生成MD5(di),将MD5(di)作为di的名称和全局唯一标识符gi,其中,所述di表示所述D中的第i个数据块。然后再将oi、gi的对应关系用Merkle可信树存储,同时和所述待加密数据块的序号一并生成重构文件f,并使用经典Rinjdael算法对所述f加密,生成第二密文EK(f)。Continuing to take the aforementioned example as an example, specifically, first obtain the position sequence number o i of each data block in the video stream data to be processed, and then generate a key K with a length of 128 bits based on the classic Rinjdael algorithm; through the The key K encrypts the K data blocks to be encrypted respectively to generate the K first ciphertexts Among them, the Indicates that a i in the one-dimensional array A is encrypted. Then let D←(D\A)∪A', said A' represents the data encrypted to the data in A, and said D\A represents an unencrypted data block, then in said D Perform MD5 operation on any data block of , generate MD5(d i ), use MD5(d i ) as the name of d i and globally unique identifier g i , where the d i represents the i-th in the D data block. Then store the corresponding relationship of o i and g i with the Merkle trusted tree, and generate the reconstructed file f together with the sequence number of the data block to be encrypted, and encrypt the f by using the classic Rinjdael algorithm to generate the second Ciphertext E K (f).

其中,所述oi、gi的对应关系是指所述oi表示的是第i个数据块的顺序,所述gi表示的是第i个数据块经过MD5运算后的全局唯一标识符。Wherein, the corresponding relationship between o i and g i means that the o i represents the order of the i-th data block, and the g i represents the globally unique identifier of the i-th data block after the MD5 operation .

步骤S104,将加密后的数据块和所述多个数据块中未加密的数据块进行分布式云端存储,其中所述加密后的数据块和所述未加密的数据块的存储顺序与在所述待处理视频流中的位置顺序不同。Step S104, storing the encrypted data block and the unencrypted data block among the plurality of data blocks in a distributed cloud, wherein the storage sequence of the encrypted data block and the unencrypted data block is the same as that in the The order of positions in the video stream to be processed is different.

其中,所述存储顺序是指所有的数据块在存储时存入云HDFS中的顺序,且不与所述待处理视频流中的位置顺序相同。所述位置顺序是指每个数据块在初始时,排在待处理视频流中先后位置关系。Wherein, the storage order refers to the order in which all data blocks are stored in the cloud HDFS during storage, and is not the same as the position order in the video stream to be processed. The position order refers to the positional relationship of each data block in the video stream to be processed at the beginning.

作为一种实施方式,对所述位置顺序编号、所述全局唯一标识符以及所述多个数据块进行打乱,记录被打乱的数据块的目标编号;将加密后的数据块所对应的所述第一密文和所述第二密文以及所述多个数据块中未加密的数据块所对应的所述位置顺序编号和所述目标编号进行存储。As an implementation, the sequence number of the position, the globally unique identifier, and the plurality of data blocks are scrambled, and the target numbers of the scrambled data blocks are recorded; The first ciphertext and the second ciphertext, and the position sequence number and the target number corresponding to the unencrypted data block in the plurality of data blocks are stored.

其中,可以是在加密后对每个数据块进行打乱存储,也可以是在加密前对多个数据块进行打乱,然后在选取待加密的数据块,总之,本领域技术人员可以根据需求进行选取,在此,不作具体限定。Among them, each data block can be scrambled and stored after encryption, or multiple data blocks can be scrambled before encryption, and then the data block to be encrypted is selected. In short, those skilled in the art can selection, which is not specifically limited here.

例如,先生成1-N之间的随机数i,利用随机置乱线性同余法完成对oi、gi及视频流数据块di的错误链接,生成顺序错乱数据块的编号,即被打乱的数据块的目标编号Xi。然后将f的密文EK(f)、Xi以及D\A上传至广电云中心进行存储,以确保数据的安全性和可靠性。For example, first generate a random number i between 1-N, use the random scrambling linear congruence method to complete the wrong link of o i , g i and video stream data block d i , and generate the number of the data block in disordered order, that is, be The target number X i of the shuffled data block. Then the ciphertext E K (f), X i , And D\A is uploaded to the radio and television cloud center for storage to ensure data security and reliability.

本实施例提供的广电云平台视频流处理方法,通过将待处理视频流数据分割为多个数据块;根据预设规则选取所述多个数据块中的部分数据块作为待加密数据块;对每个所述待加密数据块进行加密;将加密后的数据块和所述多个数据块中未加密的数据块进行分布式云端存储,其中所述加密后的数据块和所述未加密的数据块的存储顺序与在所述待处理视频流中的位置顺序不同,从而在网络开放的环境下,使得不法分子尽管可以读取所有存储于云服务器上的海量视频流数据块,但到底哪些数据块属于同一个文件并按怎样的顺序组成该文件,非法入侵者无从知道,进而降低了广电云平台的新媒体新闻视频被不法者篡改的风险。The broadcasting and television cloud platform video stream processing method provided by the present embodiment divides the video stream data to be processed into a plurality of data blocks; selects part of the data blocks in the plurality of data blocks according to preset rules as data blocks to be encrypted; Each of the data blocks to be encrypted is encrypted; the encrypted data blocks and the unencrypted data blocks in the plurality of data blocks are stored in a distributed cloud, wherein the encrypted data blocks and the unencrypted The storage order of the data blocks is different from the position order in the video stream to be processed, so that in an open network environment, criminals can read all the massive video stream data blocks stored on the cloud server, but which ones The data blocks belong to the same file and the order in which the file is composed is unknown to illegal intruders, thereby reducing the risk of new media news videos on the broadcasting cloud platform being tampered with by lawbreakers.

第二实施例second embodiment

对应于第一实施例中的广电云平台视频流处理方法,图2示出了采用第一实施例所示的广电云平台视频流处理方法一一对应的广电云平台视频流处理装置。如图2所示,所述广电云平台视频流处理装置400包括数据分割模块410、数据选取模块420、数据加密模块430和存储模块440的实现功能与第一实施例中对应的步聚一一对应,为避免赘述,本实施例不一一详述。Corresponding to the video stream processing method of the radio and television cloud platform in the first embodiment, FIG. 2 shows a one-to-one corresponding video stream processing device of the radio and television cloud platform using the video stream processing method of the radio and television cloud platform shown in the first embodiment. As shown in Figure 2, the video stream processing device 400 of the broadcasting and television cloud platform includes a data segmentation module 410, a data selection module 420, a data encryption module 430 and a storage module 440. Correspondingly, to avoid redundant description, this embodiment does not describe in detail one by one.

数据分割模块410,用于将待处理视频流数据分割为多个数据块。The data splitting module 410 is configured to split the video stream data to be processed into multiple data blocks.

作为一种实施方式,所述数据分割模块410用于将所述待处理视频流数据按照预设大小分割为多个数据块。As an implementation manner, the data splitting module 410 is configured to split the video stream data to be processed into multiple data blocks according to a preset size.

数据选取模块420,用于根据预设规则选取所述多个数据块中的部分数据块作为待加密数据块。The data selection module 420 is configured to select some data blocks in the plurality of data blocks as data blocks to be encrypted according to preset rules.

作为一种实施方式,所述数据选取模块420用于随机选取所述多个数据块中的部分数据块作为待加密数据块,具体地,随机生成被加密的数据块的个数,所述个数记为k,所述k大于或等于零,且小于或等于所述多个数据块的总和N;生成所述k个元素的一维数组A,令A={a1,a2,...,ak},其中,ai取[0,N]的随机整数,表示将被加密的数据块所对应的所述位置顺序编号;将所述k个数据块作为待加密数据块。As an implementation, the data selection module 420 is configured to randomly select some data blocks in the multiple data blocks as data blocks to be encrypted, specifically, randomly generate the number of encrypted data blocks, the number The number is denoted as k, and the k is greater than or equal to zero and less than or equal to the sum N of the plurality of data blocks; a one-dimensional array A of the k elements is generated, and A={a 1 ,a 2 ,.. ., a k }, wherein, a i is a random integer of [0, N], indicating the sequential numbering of the positions corresponding to the data blocks to be encrypted; the k data blocks are used as data blocks to be encrypted.

数据加密模块430,用于对每个所述待加密数据块进行加密。A data encryption module 430, configured to encrypt each of the data blocks to be encrypted.

作为一种实施方式,所述数据加密模块430用于获取每个数据块在所述待处理视频流数据中的位置顺序编号;基于经典Rinjdael算法对每个所述待加密数据块进行加密,生成第一密文;对所述多个数据块分别进行MD5运算,生成每个数据块的全局唯一标识符;基于所述位置顺序编号、所述全局唯一标识符和所述待加密数据块的序号生成重构文件;基于所述经典Rinjdael算法对所述重构文件进行加密,生成第二密文EK(f)。As an implementation, the data encryption module 430 is used to obtain the sequence number of each data block in the video stream data to be processed; encrypt each data block to be encrypted based on the classic Rinjdael algorithm, and generate The first ciphertext; respectively performing MD5 calculation on the multiple data blocks to generate a globally unique identifier for each data block; based on the position sequence number, the globally unique identifier and the sequence number of the data block to be encrypted Generate a reconstructed file; encrypt the reconstructed file based on the classic Rinjdael algorithm to generate a second ciphertext E K (f).

其中,所述的生成每个数据块的全局唯一标识符,包括:令D←(D\A)∪A′,所述D表示所述待处理视频流数据,所述A表示所述k个元素的一维数组,所述A′表示对所述A经过加密的数据块的集合,所述D\A表示未加密的数据块的集合,则对所述D中的任意的数据块进行MD5运算,生成MD5(di),将所述MD5(di)作为di的名称和全局唯一标识符gi,其中,所述di表示所述D中的第i个数据块。Wherein, the generating the globally unique identifier of each data block includes: order D←(D\A)∪A′, the D represents the video stream data to be processed, and the A represents the k A one-dimensional array of elements, the A' represents the set of encrypted data blocks of the A, and the D\A represents the set of unencrypted data blocks, then perform MD5 on any data block in the D operation to generate MD5(d i ), and use the MD5(d i ) as the name of d i and the globally unique identifier g i , wherein the d i represents the i-th data block in the D.

所述的对每个所述待加密数据块进行加密,生成第一密文,包括:基于经典Rinjdael算法生成长度为128位的密钥K;通过所述密钥K分别对所述K个所述待加密数据块进行加密,生成所述K个第一密文其中,所述表示所述一维数组A中的ai进行加密。Encrypting each of the data blocks to be encrypted to generate the first ciphertext includes: generating a key K with a length of 128 bits based on the classic Rinjdael algorithm; The data block to be encrypted is encrypted to generate the K first ciphertexts Among them, the Indicates that a i in the one-dimensional array A is encrypted.

存储模块440,用于将加密后的数据块和所述多个数据块中未加密的数据块进行分布式云端存储,其中所述加密后的数据块和所述未加密的数据块的存储顺序与在所述待处理视频流中的位置顺序不同。The storage module 440 is configured to perform distributed cloud storage of the encrypted data block and the unencrypted data block among the plurality of data blocks, wherein the storage order of the encrypted data block and the unencrypted data block is Different from the order of position in the pending video stream.

作为一种实施方式,所述存储模块440用于对所述位置顺序编号、所述全局唯一标识符以及所述多个数据块进行打乱,记录被打乱的数据块的目标编号;将加密后的数据块所对应的所述第一密文和所述第二密文以及所述多个数据块中未加密的数据块所对应的所述位置顺序编号和所述目标编号进行存储。As an implementation, the storage module 440 is used to scramble the position sequence number, the globally unique identifier, and the multiple data blocks, and record the target number of the scrambled data block; The first ciphertext and the second ciphertext corresponding to the subsequent data block, and the position sequence number and the target number corresponding to the unencrypted data block in the plurality of data blocks are stored.

第三实施例third embodiment

请参阅图3,是本发明实施例提供的广电云平台视频流处理方法的流程图,该方法应用于用户端。下面将对图3所示的具体流程进行详细阐述。Please refer to FIG. 3 , which is a flow chart of a method for processing video streams on a broadcasting cloud platform provided by an embodiment of the present invention, and the method is applied to a client. The specific process shown in FIG. 3 will be described in detail below.

步骤S201,获取广电云平台视频流处理方法所存储的加密后的数据块和所述多个数据块中未加密的数据块以及存储顺序。In step S201, the encrypted data block stored in the video stream processing method of the radio and television cloud platform, the unencrypted data block and the storage order of the plurality of data blocks are acquired.

通过获取第一实施例所提供的广电云平台视频流处理方法所存储的加密后的数据块和所述多个数据块中未加密的数据块以及存储顺序,来实现视频流的解密过程。The decryption process of the video stream is realized by obtaining the encrypted data block stored in the video stream processing method of the radio and television cloud platform provided by the first embodiment, the unencrypted data block and the storage order of the plurality of data blocks.

作为一种实施方式,继续以第一实施例的例子为例来说,从云存储端下载EK(f)、和diAs an implementation manner, continue to take the example of the first embodiment as an example, download E K (f), and d i .

步骤S202,对所述加密后的数据块进行解密,得到每个被加密的数据块所对应的明文。Step S202, decrypting the encrypted data block to obtain the plaintext corresponding to each encrypted data block.

作为一种实施方式,对所述加密后的数据块所对应的EK(f)进行解密,以得到重构文件f,在通过重构文件f得到oi、gi的对应关系和被加密数据块的编号ai(i∈[0,k])。然后再对第一密文进行解密,以得到ai的明文。As an implementation, the E K (f) corresponding to the encrypted data block is decrypted to obtain the reconstructed file f, and the corresponding relationship between o i and g i is obtained through the reconstructed file f and the encrypted The number a i (i∈[0,k]) of the data block. Then for the first ciphertext Decrypt to get the plaintext of a i .

步骤S203,根据所述存储顺序,重排所述明文与所述多个数据块中未加密的数据块的位置顺序,得到待播放视频流数据。Step S203, according to the storage order, rearrange the positions of the plaintext and the unencrypted data blocks in the plurality of data blocks to obtain video stream data to be played.

在本实施例中,根据到oi、gi的对应关系和被加密数据块的编号ai(i∈[0,k]),重排所述明文与所述多个数据块中未加密的数据块的位置顺序,得到待播放视频流数据。从而使得用户能够基于所得到的待播放视频流数据进行播放。In this embodiment, according to the correspondence between o i and g i and the number a i (i∈[0,k]) of the encrypted data block, the plaintext and the unencrypted data blocks in the multiple data blocks are rearranged The position order of the data blocks of the data block is obtained to obtain the video stream data to be played. Thus, the user can play based on the obtained video stream data to be played.

本实施例通过的广电云平台视频流处理方法,通过先从获取第一实施例所提供的广电云平台视频流处理方法所存储的加密后的数据块和所述多个数据块中未加密的数据块以及存储顺序,然后对所述加密后的数据块进行解密,得到每个被加密的数据块所对应的明文,最后根据所述存储顺序,重排所述明文与所述多个数据块中未加密的数据块的位置顺序,得到待播放视频流数据,从而使得用户能够基于合法途径解析被加密的视频文件,进而使得用户能够正常进行播放,以及避免了不法分子尽管可以读取所有存储于云服务器上的海量视频流数据块,但到底哪些数据块属于同一个文件并按怎样的顺序组成该文件,非法入侵者无从知道,进一步降低了广电云平台的新媒体新闻视频被不法者篡改的风险。The broadcasting and television cloud platform video stream processing method adopted in this embodiment first obtains the encrypted data blocks stored in the broadcasting and television cloud platform video stream processing method provided in the first embodiment and the unencrypted data blocks in the plurality of data blocks. data blocks and storage order, and then decrypt the encrypted data blocks to obtain the plaintext corresponding to each encrypted data block, and finally rearrange the plaintext and the plurality of data blocks according to the storage order The position sequence of the unencrypted data blocks in the file is obtained to obtain the video stream data to be played, so that the user can analyze the encrypted video file based on legal means, so that the user can play it normally, and avoid criminals who can read all stored files. There are a large number of video stream data blocks on the cloud server, but which data blocks belong to the same file and in what order constitute the file, illegal intruders have no way of knowing, further reducing the new media news video on the radio and television cloud platform being tampered with by lawbreakers risks of.

第四实施例Fourth embodiment

对应于第三实施例中的广电云平台视频流处理方法,图4示出了采用第三实施例所示的广电云平台视频流处理方法一一对应的广电云平台视频流处理装置。如图4所示,所述广电云平台视频流处理装置500包括数据获取单元510、数据解密单元520和数据生成单元530的实现功能与第三实施例中对应的步聚一一对应,为避免赘述,本实施例不一一详述。Corresponding to the video stream processing method of the radio and television cloud platform in the third embodiment, FIG. 4 shows a one-to-one corresponding video stream processing device of the radio and television cloud platform using the video stream processing method of the radio and television cloud platform shown in the third embodiment. As shown in Figure 4, the video stream processing device 500 of the radio and television cloud platform includes a data acquisition unit 510, a data decryption unit 520, and a data generation unit 530. To repeat, this embodiment does not describe in detail one by one.

数据获取单元510,用于获取广电云平台视频流处理方法所存储的加密后的数据块和所述多个数据块中未加密的数据块以及存储顺序。The data acquisition unit 510 is configured to acquire the encrypted data block stored in the broadcasting cloud platform video stream processing method, the unencrypted data block and the storage sequence among the plurality of data blocks.

数据解密单元520,用于对所述加密后的数据块进行解密,得到每个被加密的数据块所对应的明文。The data decryption unit 520 is configured to decrypt the encrypted data blocks to obtain plaintext corresponding to each encrypted data block.

数据生成单元530,用于根据所述存储顺序,重排所述明文与所述多个数据块中未加密的数据块的位置顺序,得到待播放视频流数据。The data generation unit 530 is configured to rearrange the positions of the plaintext and the unencrypted data blocks in the plurality of data blocks according to the storage order, so as to obtain video stream data to be played.

第五实施例fifth embodiment

如图5所示,是电子设备300的示意图。所述电子设备300包括存储器302、处理器304以及存储在所述存储器302中并可在所述处理器304上运行的计算机程序303,所述计算机程序303被处理器304执行时实现第一实施例中的所述广电云平台视频流处理方法,为避免重复,此处不再赘述。或者,所述计算机程序303被处理器304执行时实现第三实施例所述广电云平台视频流处理方法中各步骤的功能,为避免重复,此处不再赘述。或者,所述计算机程序303被处理器304执行时实现第二实施例所述广电云平台视频流处理装置中各模型/单元的功能,为避免重复,此处不再赘述。或者,所述计算机程序303被处理器304执行时实现第四实施例所述广电云平台视频流处理装置中各模型/单元的功能,为避免重复,此处不再赘述。As shown in FIG. 5 , it is a schematic diagram of an electronic device 300 . The electronic device 300 includes a memory 302, a processor 304, and a computer program 303 stored in the memory 302 and operable on the processor 304. When the computer program 303 is executed by the processor 304, the first embodiment is realized. In order to avoid repetition, the video stream processing method of the radio and television cloud platform described in the example will not be repeated here. Alternatively, when the computer program 303 is executed by the processor 304, the functions of each step in the video stream processing method of the radio and television cloud platform described in the third embodiment are realized, and to avoid repetition, details are not repeated here. Alternatively, when the computer program 303 is executed by the processor 304, the functions of each model/unit in the video stream processing device of the radio and television cloud platform described in the second embodiment are implemented. To avoid repetition, details are not repeated here. Alternatively, when the computer program 303 is executed by the processor 304, the functions of each model/unit in the video stream processing device of the radio and television cloud platform described in the fourth embodiment are implemented. To avoid repetition, details are not repeated here.

示例性的,计算机程序303可以被分割成一个或多个模块/单元,一个或者多个模块/单元被存储在存储器302中,并由处理器304执行,以完成本发明。一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述计算机程序303在电子设备300中的执行过程。例如,计算机程序303可以被分割成第二实施例中的数据分割模块410、数据选取模块420、数据加密模块430和存储模块440,各模块的具体功能如第一实施例或第二实施例所述,在此不一一赘述。Exemplarily, the computer program 303 can be divided into one or more modules/units, and one or more modules/units are stored in the memory 302 and executed by the processor 304 to implement the present invention. One or more modules/units may be a series of computer program instruction segments capable of accomplishing specific functions, and the instruction segments are used to describe the execution process of the computer program 303 in the electronic device 300 . For example, the computer program 303 can be divided into the data segmentation module 410, the data selection module 420, the data encryption module 430 and the storage module 440 in the second embodiment, and the specific functions of each module are as described in the first embodiment or the second embodiment. , and will not be repeated here.

电子设备300可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。The electronic device 300 may be computing devices such as desktop computers, notebooks, palmtop computers, and cloud servers.

其中,存储器302可以是,但不限于,随机存取存储器(Random Access Memory,RAM),只读存储器(Read Only Memory,ROM),可编程只读存储器(Programmable Read-Only Memory,PROM),可擦除只读存储器(Erasable Programmable Read-Only Memory,EPROM),电可擦除只读存储器(Electric Erasable Programmable Read-Only Memory,EEPROM)等。其中,存储器302用于存储程序,所述处理器304在接收到执行指令后,执行所述程序,前述本发明实施例任一实施例揭示的流程定义的方法可以应用于处理器304中,或者由处理器304实现。Wherein, the memory 302 can be, but not limited to, random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only Memory, PROM), can Erasable Programmable Read-Only Memory (EPROM), Electric Erasable Programmable Read-Only Memory (EEPROM), etc. Wherein, the memory 302 is used to store a program, and the processor 304 executes the program after receiving an execution instruction, and the process definition method disclosed in any embodiment of the foregoing embodiments of the present invention can be applied to the processor 304, or implemented by processor 304 .

处理器304可能是一种集成电路芯片,具有信号的处理能力。上述的处理器304可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(NetworkProcessor,NP)等;还可以是数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor 304 may be an integrated circuit chip with signal processing capability. The above-mentioned processor 304 can be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (NetworkProcessor, NP), etc.; it can also be a digital signal processor (Digital Signal Processor, DSP), a dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Various methods, steps and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.

可以理解的是,图5所示的结构仅为电子设备300的一种结构示意图,电子设备300还可以包括比图5所示更多或更少的组件。图5中所示的各组件可以采用硬件、软件或其组合实现。It can be understood that the structure shown in FIG. 5 is only a schematic structural diagram of the electronic device 300 , and the electronic device 300 may also include more or fewer components than those shown in FIG. 5 . Each component shown in Fig. 5 may be implemented by hardware, software or a combination thereof.

第六实施例Sixth embodiment

本发明实施例还提供一种存储介质,所述存储介质上存储有指令,当所述指令在计算机上运行时,所述计算机程序被处理器执行时实现第一实施例中的所述广电云平台视频流处理方法,为避免重复,此处不再赘述。或者,所述计算机程序被处理器执行时实现第三实施例所述广电云平台视频流处理方法中各步骤的功能,为避免重复,此处不再赘述。或者,所述计算机程序被处理器执行时实现第二实施例所述广电云平台视频流处理装置中各模型/单元的功能,为避免重复,此处不再赘述。或者,所述计算机程序被处理器执行时实现第四实施例所述广电云平台视频流处理装置中各模型/单元的功能,为避免重复,此处不再赘述。An embodiment of the present invention also provides a storage medium, on which instructions are stored. When the instructions are run on a computer, the computer program is executed by a processor to implement the radio and television cloud in the first embodiment. In order to avoid repetition, the platform video stream processing method will not be repeated here. Alternatively, when the computer program is executed by the processor, the functions of each step in the method for processing the video stream on the broadcasting and television cloud platform of the third embodiment are realized, and details are not repeated here to avoid repetition. Alternatively, when the computer program is executed by the processor, the functions of each model/unit in the video stream processing device of the broadcasting and television cloud platform in the second embodiment are implemented, and in order to avoid repetition, details are not repeated here. Alternatively, when the computer program is executed by the processor, the functions of each model/unit in the video stream processing device of the radio and television cloud platform described in the fourth embodiment are implemented. To avoid repetition, details are not repeated here.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本发明可以通过硬件实现,也可以借助软件加必要的通用硬件平台的方式来实现,基于这样的理解,本发明的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施场景的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by hardware, or by means of software plus a necessary general-purpose hardware platform. Based on this understanding, the technical solution of the present invention It can be embodied in the form of software products, which can be stored in a non-volatile storage medium (which can be CD-ROM, U disk, mobile hard disk, etc.), and include several instructions to make a computer device (which can be It is a personal computer, a server, or a network device, etc.) to execute the method of each implementation scenario of the present invention.

以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention. It should be noted that like numerals and letters denote similar items in the following figures, therefore, once an item is defined in one figure, it does not require further definition and explanation in subsequent figures.

Claims (10)

1.一种广电云平台视频流处理方法,其特征在于,包括:1. A broadcasting and television cloud platform video stream processing method, is characterized in that, comprises: 将待处理视频流数据分割为多个数据块;Divide the video stream data to be processed into multiple data blocks; 根据预设规则选取所述多个数据块中的部分数据块作为待加密数据块;selecting some data blocks among the plurality of data blocks as data blocks to be encrypted according to preset rules; 对每个所述待加密数据块进行加密;Encrypt each of the data blocks to be encrypted; 将加密后的数据块和所述多个数据块中未加密的数据块进行分布式云端存储,其中所述加密后的数据块和所述未加密的数据块的存储顺序与在所述待处理视频流中的位置顺序不同。The encrypted data block and the unencrypted data block in the plurality of data blocks are stored in a distributed cloud, wherein the storage order of the encrypted data block and the unencrypted data block is the same as that in the to-be-processed The order of positions in the video stream is different. 2.根据权利要求1所述的方法,其特征在于,所述的对每个所述待加密数据块进行加密,包括:2. The method according to claim 1, wherein said encrypting each said data block to be encrypted comprises: 获取每个数据块在所述待处理视频流数据中的位置顺序编号;Obtain the sequence number of the position of each data block in the video stream data to be processed; 基于经典Rinjdael算法对每个所述待加密数据块进行加密,生成第一密文;Encrypt each of the data blocks to be encrypted based on the classic Rinjdael algorithm to generate the first ciphertext; 对所述多个数据块分别进行MD5运算,生成每个数据块的全局唯一标识符;Perform MD5 calculations on the multiple data blocks to generate a globally unique identifier for each data block; 基于所述位置顺序编号、所述全局唯一标识符和所述待加密数据块的序号生成重构文件;generating a reconstructed file based on the sequence number of the position, the globally unique identifier and the sequence number of the data block to be encrypted; 基于所述经典Rinjdael算法对所述重构文件进行加密,生成第二密文。Encrypt the reconstructed file based on the classic Rinjdael algorithm to generate a second ciphertext. 3.根据权利要求2所述的方法,其特征在于,所述的将加密后的数据块和所述多个数据块中未加密的数据块进行分布式云端存储,其中所述加密后的数据块和所述未加密的数据块的存储顺序与在所述待处理视频流中的位置顺序不同,包括:3. The method according to claim 2, wherein the encrypted data block and the unencrypted data block in the plurality of data blocks are stored in a distributed cloud, wherein the encrypted data The storage order of chunks and said unencrypted data chunks is different from the order of position in said pending video stream, including: 对所述位置顺序编号、所述全局唯一标识符以及所述多个数据块进行打乱,记录被打乱的数据块的目标编号;Scrambling the position sequence number, the globally unique identifier, and the plurality of data blocks, and recording the target numbers of the scrambled data blocks; 将加密后的数据块所对应的所述第一密文和所述第二密文以及所述多个数据块中未加密的数据块所对应的所述位置顺序编号和所述目标编号进行存储。storing the first ciphertext and the second ciphertext corresponding to the encrypted data block, and the position sequence number and the target number corresponding to the unencrypted data block among the plurality of data blocks . 4.根据权利要求2所述的方法,其特征在于,所述的生成每个数据块的全局唯一标识符,包括:4. The method according to claim 2, wherein said generating the globally unique identifier of each data block comprises: 令D←(D\A)∪A′,所述D表示所述待处理视频流数据,所述A表示所述k个元素的一维数组,所述A′表示对所述A经过加密的数据块的集合,所述D\A表示未加密的数据块的集合,则对所述D中的任意的数据块进行MD5运算,生成MD5(di),将所述MD5(di)作为di的名称和全局唯一标识符gi,其中,所述di表示所述D中的第i个数据块。Let D←(D\A)∪A′, the D represents the video stream data to be processed, the A represents the one-dimensional array of k elements, and the A′ represents the encrypted A collection of data blocks, the D\A represents a collection of unencrypted data blocks, then an MD5 operation is performed on any data block in the D to generate MD5(d i ), and the MD5(d i ) is used as The name of d i and the globally unique identifier g i , wherein said d i represents the i-th data block in said D. 5.根据权利要求4所述的方法,其特征在于,所述的对每个所述待加密数据块进行加密,生成第一密文,包括:5. The method according to claim 4, wherein said encrypting each said data block to be encrypted to generate a first ciphertext comprises: 基于经典Rinjdael算法生成长度为128位的密钥K;Generate a key K with a length of 128 bits based on the classic Rinjdael algorithm; 通过所述密钥K分别对所述K个所述待加密数据块进行加密,生成所述K个第一密文其中,所述表示所述一维数组A中的ai进行加密。Encrypt the K data blocks to be encrypted respectively by using the key K to generate the K first ciphertexts Among them, the Indicates that a i in the one-dimensional array A is encrypted. 6.一种广电云平台视频流处理方法,其特征在于,包括:6. A method for processing video streams on a radio and television cloud platform, comprising: 获取如权利要求1-5任意一项所述的广电云平台视频流处理方法所存储的加密后的数据块和所述多个数据块中未加密的数据块以及存储顺序;Obtaining the encrypted data blocks stored in the video stream processing method of the radio and television cloud platform described in any one of claims 1-5 and the unencrypted data blocks and storage order in the plurality of data blocks; 对所述加密后的数据块进行解密,得到每个被加密的数据块所对应的明文;Decrypting the encrypted data blocks to obtain plaintext corresponding to each encrypted data block; 根据所述存储顺序,重排所述明文与所述多个数据块中未加密的数据块的位置顺序,得到待播放视频流数据。According to the storage order, rearrange the positions of the plaintext and the unencrypted data blocks in the plurality of data blocks to obtain video stream data to be played. 7.一种广电云平台视频流处理装置,其特征在于,包括:7. A broadcasting and television cloud platform video stream processing device, characterized in that, comprising: 数据分割模块,用于将待处理视频流数据分割为多个数据块;A data segmentation module, configured to divide the video stream data to be processed into multiple data blocks; 数据选取模块,用于根据预设规则选取所述多个数据块中的部分数据块作为待加密数据块;A data selection module, configured to select some of the multiple data blocks as data blocks to be encrypted according to preset rules; 数据加密模块,用于对每个所述待加密数据块进行加密;A data encryption module, configured to encrypt each of the data blocks to be encrypted; 存储模块,用于将加密后的数据块和所述多个数据块中未加密的数据块进行分布式云端存储,其中所述加密后的数据块和所述未加密的数据块的存储顺序与在所述待处理视频流中的位置顺序不同。A storage module, configured to store the encrypted data block and the unencrypted data block in the plurality of data blocks in a distributed cloud, wherein the storage order of the encrypted data block and the unencrypted data block is the same as The order of positions in the video stream to be processed is different. 8.一种广电云平台视频流处理装置,其特征在于,包括:8. A radio and television cloud platform video stream processing device, characterized in that it comprises: 数据获取单元,用于获取如权利要求1-5任意一项所述的广电云平台视频流处理方法所存储的加密后的数据块和所述多个数据块中未加密的数据块以及存储顺序;The data acquisition unit is used to acquire the encrypted data blocks stored in the broadcasting cloud platform video stream processing method according to any one of claims 1-5 and the unencrypted data blocks and storage order of the plurality of data blocks ; 数据解密单元,用于对所述加密后的数据块进行解密,得到每个被加密的数据块所对应的明文;A data decryption unit, configured to decrypt the encrypted data blocks to obtain plaintext corresponding to each encrypted data block; 数据生成单元,用于根据所述存储顺序,重排所述明文与所述多个数据块中未加密的数据块的位置顺序,得到待播放视频流数据。The data generating unit is configured to rearrange the positions of the plaintext and the unencrypted data blocks in the plurality of data blocks according to the storage order, so as to obtain video stream data to be played. 9.一种电子设备,其特征在于,包括:存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至5任一项所述广电云平台视频流处理方法的步骤;或者,所述处理器执行所述计算机程序时实现如权利要求6所述广电云平台视频流处理方法的步骤。9. An electronic device, comprising: a memory, a processor, and a computer program stored in the memory and operable on the processor, wherein the processor executes the computer program When realizing the step of the video stream processing method of the radio and television cloud platform as described in any one of claims 1 to 5; or, when the processor executes the computer program, realize the video stream processing method of the radio and television cloud platform as claimed in claim 6 step. 10.一种存储介质,其特征在于,所述存储介质上存储有指令,当所述指令在计算机上运行时,使得所述计算机执行如权利要求1-5任一项所述的广电云平台视频流处理方法;或者使得所述计算机执行如权利要求6所述的广电云平台视频流处理方法的步骤。10. A storage medium, characterized in that instructions are stored on the storage medium, and when the instructions are run on a computer, the computer is made to execute the broadcasting cloud platform according to any one of claims 1-5 A video stream processing method; or causing the computer to execute the steps of the broadcasting and television cloud platform video stream processing method according to claim 6.
CN201810568340.2A 2018-06-05 2018-06-05 Broadcasting and TV cloud platform video stream processing method, device, equipment and medium Pending CN108777803A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810568340.2A CN108777803A (en) 2018-06-05 2018-06-05 Broadcasting and TV cloud platform video stream processing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810568340.2A CN108777803A (en) 2018-06-05 2018-06-05 Broadcasting and TV cloud platform video stream processing method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN108777803A true CN108777803A (en) 2018-11-09

Family

ID=64024765

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810568340.2A Pending CN108777803A (en) 2018-06-05 2018-06-05 Broadcasting and TV cloud platform video stream processing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN108777803A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110035327A (en) * 2019-04-17 2019-07-19 深圳市摩天之星企业管理有限公司 A kind of safe playback method
CN113727146A (en) * 2021-08-30 2021-11-30 四川师范大学 Cloud television video stream processing device and method based on block chain
CN114285562A (en) * 2021-12-27 2022-04-05 元心信息科技集团有限公司 Data encryption method and device
CN115225933A (en) * 2022-07-18 2022-10-21 北京国盛华兴科技有限公司 Encryption method and decryption method of video file, server and terminal equipment
CN115310636A (en) * 2022-09-05 2022-11-08 郑州华隆机械制造有限公司 Press machine cloud data intelligent monitoring, analyzing and processing platform and method
CN115802106A (en) * 2022-11-15 2023-03-14 上海游密信息科技有限公司 Video encryption transmission method and device, electronic equipment and storage medium
CN120524529A (en) * 2025-07-22 2025-08-22 苏州元脑智能科技有限公司 Data security processing method, device, computer equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100094957A1 (en) * 2008-10-15 2010-04-15 Patentvc Ltd. Methods and systems for fast segment reconstruction
CN101854241A (en) * 2009-03-30 2010-10-06 上海聚力传媒技术有限公司 Method and device for verifying data block transmitted in network
CN102624708A (en) * 2012-02-23 2012-08-01 浙江工商大学 An Efficient Data Encryption, Update and Access Control Method for Cloud Storage
CN103457727A (en) * 2012-05-29 2013-12-18 华为技术有限公司 Method, device and system for processing media data
US20140136856A1 (en) * 2005-02-02 2014-05-15 Insyde Software Corp. System and method for updating firmware
US20160192194A1 (en) * 2014-12-29 2016-06-30 Gongming Yang Secure way to build internet credit system and protect private information
CN106156653A (en) * 2016-07-05 2016-11-23 浪潮(北京)电子信息产业有限公司 A kind of method and system of data storage
CN106462605A (en) * 2014-05-13 2017-02-22 云聚公司 Distributed secure data storage and transmission of streaming media content
CN107220559A (en) * 2017-06-11 2017-09-29 南京安链数据科技有限公司 A kind of encryption storage method for that can not tamper with a document
CN107609416A (en) * 2017-09-11 2018-01-19 浙江志诚软件有限公司 Safe encryption method, system, computer installation and the computer-readable recording medium of user data

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140136856A1 (en) * 2005-02-02 2014-05-15 Insyde Software Corp. System and method for updating firmware
US20100094957A1 (en) * 2008-10-15 2010-04-15 Patentvc Ltd. Methods and systems for fast segment reconstruction
CN101854241A (en) * 2009-03-30 2010-10-06 上海聚力传媒技术有限公司 Method and device for verifying data block transmitted in network
CN102624708A (en) * 2012-02-23 2012-08-01 浙江工商大学 An Efficient Data Encryption, Update and Access Control Method for Cloud Storage
CN103457727A (en) * 2012-05-29 2013-12-18 华为技术有限公司 Method, device and system for processing media data
CN106462605A (en) * 2014-05-13 2017-02-22 云聚公司 Distributed secure data storage and transmission of streaming media content
US20160192194A1 (en) * 2014-12-29 2016-06-30 Gongming Yang Secure way to build internet credit system and protect private information
CN106156653A (en) * 2016-07-05 2016-11-23 浪潮(北京)电子信息产业有限公司 A kind of method and system of data storage
CN107220559A (en) * 2017-06-11 2017-09-29 南京安链数据科技有限公司 A kind of encryption storage method for that can not tamper with a document
CN107609416A (en) * 2017-09-11 2018-01-19 浙江志诚软件有限公司 Safe encryption method, system, computer installation and the computer-readable recording medium of user data

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110035327B (en) * 2019-04-17 2020-07-17 深圳市摩天之星企业管理有限公司 A safe playback method
CN110035327A (en) * 2019-04-17 2019-07-19 深圳市摩天之星企业管理有限公司 A kind of safe playback method
CN113727146B (en) * 2021-08-30 2023-08-22 四川师范大学 Cloud television video stream processing device and method based on block chain
CN113727146A (en) * 2021-08-30 2021-11-30 四川师范大学 Cloud television video stream processing device and method based on block chain
CN114285562A (en) * 2021-12-27 2022-04-05 元心信息科技集团有限公司 Data encryption method and device
CN114285562B (en) * 2021-12-27 2023-05-09 元心信息科技集团有限公司 Data encryption method and device
CN115225933A (en) * 2022-07-18 2022-10-21 北京国盛华兴科技有限公司 Encryption method and decryption method of video file, server and terminal equipment
CN115225933B (en) * 2022-07-18 2024-07-09 北京国盛华兴科技有限公司 Video file encryption method, video file decryption method, server and terminal equipment
CN115310636A (en) * 2022-09-05 2022-11-08 郑州华隆机械制造有限公司 Press machine cloud data intelligent monitoring, analyzing and processing platform and method
CN115310636B (en) * 2022-09-05 2023-06-02 郑州华隆机械制造有限公司 Intelligent monitoring, analyzing and processing platform and method for cloud data of press equipment
CN115802106A (en) * 2022-11-15 2023-03-14 上海游密信息科技有限公司 Video encryption transmission method and device, electronic equipment and storage medium
CN120524529A (en) * 2025-07-22 2025-08-22 苏州元脑智能科技有限公司 Data security processing method, device, computer equipment and storage medium
CN120524529B (en) * 2025-07-22 2025-10-21 苏州元脑智能科技有限公司 Data security processing method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108777803A (en) Broadcasting and TV cloud platform video stream processing method, device, equipment and medium
CN110213354B (en) Cloud storage data confidentiality protection method
CN109635586B (en) Media file encryption key management method, system, device and storage medium
US10721062B2 (en) Utilizing error correction for secure secret sharing
CN104255009B (en) Systems and methods for segment integrity and authenticity of adaptive streaming media
US10608815B2 (en) Content encryption and decryption using a custom key
US9342666B2 (en) Providing security support for digital rights management in different formats
US8681975B2 (en) Encryption method and apparatus using composition of ciphers
US20170163413A1 (en) System and Method for Content Encryption in a Key/Value Store
EP3499791A1 (en) File encryption and decryption method and apparatus
US20100077212A1 (en) On-Demand Protection And Authorization Of Playback Of Media Assets
Abdul Hussien et al. [Retracted] A Secure Environment Using a New Lightweight AES Encryption Algorithm for E‐Commerce Websites
WO2014007296A1 (en) Order-preserving encryption system, encryption device, decryption device, encryption method, decryption method, and programs thereof
US20230275759A1 (en) Method and system of encoding data over distributed networks and method of assuring integrity of data transmission between sender and receiver in a communication system
CN114553557B (en) Key calling method, device, computer equipment and storage medium
Cao et al. A Privacy‐Preserving Outsourcing Data Storage Scheme with Fragile Digital Watermarking‐Based Data Auditing
CN114443718A (en) A data query method and system
CN112954388B (en) A method, device, terminal device and storage medium for obtaining data files
CN117979051B (en) Audio anti-counterfeiting method, equipment and medium
CN113408729A (en) Data processing method for DNA calculation
CN114117406A (en) Data processing method, device, equipment and storage medium
Chandrasekaran et al. Ensemble of chaotic and naive approaches for performance enhancement in video encryption
Kamboj et al. DEDUP: Deduplication system for encrypted data in cloud
Wu et al. A flexible and lightweight user‐demand DRM system for multimedia contents over multiple portable device platforms
CN114817970B (en) Data analysis method and system based on data source protection and related equipment

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181109