CN116962603A - Video storage method and device and electronic equipment - Google Patents

Video storage method and device and electronic equipment Download PDF

Info

Publication number
CN116962603A
CN116962603A CN202210381399.7A CN202210381399A CN116962603A CN 116962603 A CN116962603 A CN 116962603A CN 202210381399 A CN202210381399 A CN 202210381399A CN 116962603 A CN116962603 A CN 116962603A
Authority
CN
China
Prior art keywords
data
key frame
picture group
sequence
storage
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
CN202210381399.7A
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.)
China Mobile Communications Group Co Ltd
China Mobile Shanghai ICT Co Ltd
CM Intelligent Mobility Network Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Shanghai ICT Co Ltd
CM Intelligent Mobility Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Shanghai ICT Co Ltd, CM Intelligent Mobility Network Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202210381399.7A priority Critical patent/CN116962603A/en
Publication of CN116962603A publication Critical patent/CN116962603A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • 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
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/085Secret sharing or secret splitting, e.g. threshold schemes
    • 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/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Power Engineering (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The disclosure provides a video storage method, a video storage device and electronic equipment, and relates to the technical field of data storage, wherein the video storage method comprises the following steps: performing compression coding processing on the initial video data to obtain compressed data, wherein the compressed data comprises a first picture group sequence; obtaining a key frame from the first picture group sequence; encrypting the key frame to obtain n data fragments corresponding to the key frame, wherein the n data fragments are used for reconstructing the key frame, and n is an integer greater than 1; and storing the n data fragments in n storage nodes correspondingly, wherein one data fragment corresponds to one storage node. The technical scheme of the disclosure can at least improve the security of storing video data.

Description

Video storage method and device and electronic equipment
Technical Field
The disclosure relates to the technical field of data storage, and in particular relates to a video storage method, a video storage device and electronic equipment.
Background
In many fields, there is a high demand for security of stored data. Currently, in order to improve the security of stored data, the data is generally stored in an encrypted manner. The existing encryption mode mainly adopts a conventional encryption means to directly encrypt data to be stored so as to obtain an encrypted file, and stores the encrypted file. However, when the encrypted file is decrypted, the stored data set will be stolen, and thus, there is a problem in that the security of data storage is low in the prior art.
Disclosure of Invention
The video storage method, the video storage device and the electronic equipment can solve the problem of low security of data storage in the prior art.
In a first aspect, an embodiment of the present disclosure provides a video storage method, including:
performing compression coding processing on the initial video data to obtain compressed data, wherein the compressed data comprises a first picture group sequence;
obtaining a key frame from the first picture group sequence;
encrypting the key frame to obtain n data fragments corresponding to the key frame, wherein the n data fragments are used for reconstructing the key frame, and n is an integer greater than 1;
and storing the n data fragments in n storage nodes correspondingly, wherein one data fragment corresponds to one storage node.
In a second aspect, embodiments of the present disclosure provide a video storage device, including:
the coding module is used for carrying out compression coding processing on the initial video data to obtain compressed data, wherein the compressed data comprises a first picture group sequence;
the acquisition module is used for acquiring key frames from the first picture group sequence;
the encryption module is used for carrying out encryption processing on the key frame to obtain n data fragments corresponding to the key frame, wherein the n data fragments are used for reconstructing the key frame, and n is an integer greater than 1;
and the storage module is used for respectively storing the n data fragments in n storage nodes, wherein one data fragment corresponds to one storage node.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor, a memory, and a program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the video storage method of the first aspect described above.
In a fourth aspect, an embodiment of the present disclosure provides a computer readable storage medium, where a computer program is stored, where the computer program is executed by a processor to implement the steps of the video storage method described in the first aspect.
In the embodiment of the disclosure, the key frames in the compressed data of the video data are encrypted, and the encrypted n data fragments are stored in n different storage nodes, so that the security of storing the video data can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings that are needed in the description of the embodiments of the present disclosure will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
Fig. 1 is a flowchart of a video storage method provided in an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a video storage system according to an embodiment of the present disclosure;
FIG. 3 is a flow diagram of a process for storing initial video data in one embodiment of the present disclosure;
FIG. 4 is a flow chart illustrating a playback process of initial video data in one embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a video storage device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
The following description of the technical solutions in the embodiments of the present disclosure will be made clearly and completely with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
Referring to fig. 1, fig. 1 is a flowchart of a video storage method according to an embodiment of the disclosure, where the video storage method includes:
step 101, performing compression coding processing on initial video data to obtain compressed data, wherein the compressed data comprises a first picture group sequence;
102, acquiring a key frame from the first picture group sequence;
step 103, carrying out encryption processing on the key frame to obtain n data fragments corresponding to the key frame, wherein the n data fragments are used for reconstructing the key frame, and n is an integer greater than 1;
and 104, storing the n data fragments in n storage nodes correspondingly, wherein one data fragment corresponds to one storage node.
The initial video data may be video data that needs to be stored encrypted. The compression encoding processing of the initial video data may specifically be: the initial video data is compression encoded by means of h.264 or h.265 to obtain the first group of pictures (Group Of Pictures, GOP) sequence.
In the first GOP sequence, the pixel difference, the luminance difference, and the chromaticity difference between any two adjacent frames are within a certain range. And the first GOP sequence includes complete data of a first frame (IDR/I frame), both P-frames and B-frames in the first GOP sequence are calculated with reference to I frames. When the technical scheme disclosed by the invention is applied to a video evidence scene, as the video evidence scene has low requirements on the change of chromaticity and brightness caused by the change of light and shadow in video, and focuses on the difference information required by Motion Estimation (Motion), the chromaticity and brightness threshold value can be adjusted to be higher in the process of carrying out compression coding processing on the initial video data, so that fewer GOP sequences and key frames in the sequences are created.
It will be appreciated that after the compression encoding process is performed on the initial video data, a plurality of first GOP sequences may be obtained. Accordingly, the acquiring the key frame from the first group of pictures sequence may refer to: a key frame is obtained from each first GOP sequence. The encrypting the key frame may refer to: and respectively carrying out encryption processing on the key frames in each first GOP sequence. The storing the n data slices in the n storage nodes respectively and correspondingly may refer to: and respectively storing n data corresponding to each key frame in n storage nodes. For ease of understanding, the method provided by the embodiments of the present disclosure will be further explained below by taking processing one of the first GOP sequences as an example.
The above encryption processing of the key frame may be encryption processing of the key frame based on a Secret Sharing scheme (VSS).
It is to be appreciated that the n storage nodes may be n storage servers in a server cluster. Namely, n data slices corresponding to the key frames are stored in n storage servers in a one-to-one correspondence manner, so that the key frames cannot be reconstructed only according to one data slice because one storage server only stores one data slice, and even if the data slice in one storage server is lost, the key frames cannot be lost. Thereby improving the security of data storage.
The acquiring the key frame in the first group of pictures sequence may include: and dividing the first picture group sequence to obtain a key frame and a second picture group sequence (a second GOP sequence), wherein the second GOP sequence is the first picture group sequence with the key frame deleted. In the embodiment of the present disclosure, the second GOP sequence may also be stored separately, so that even if the key frame is stolen, the first group of pictures sequence cannot be reconstructed without simultaneously stealing the second GOP sequence.
In this embodiment, the key frame in the compressed data of the video data is encrypted, and the encrypted n data slices are stored in n different storage nodes, so that the security of storing the video data can be improved.
Optionally, the first frame group sequence includes pixel information of the key frame, and the encrypting the key frame to obtain n data slices corresponding to the key frame includes:
using K as a modulus, using the pixel information as encryption information, and carrying out encryption processing on the key frame to obtain n data fragments corresponding to the key frame, wherein K is a prime number;
the encryption processing is performed on the key frame by taking K as a modulus and the pixel information as encryption information to obtain n data fragments corresponding to the key frame, and the method comprises the following steps:
acquiring brightness values of r position points in the pixel information, wherein r is an integer smaller than n;
taking the K as a modulus, and taking the brightness value of the r position points as a coefficient to construct a target polynomial;
generating the n data slices based on the target polynomial.
The pixel information may refer to brightness values of three channels of RGB, i.e. the first group of pictures sequenceAnd the brightness value of RGB three channels of each position point in the key frame is included. In one embodiment of the present disclosure, pixel information of R position points, i.e., { R }, may be arbitrarily taken in the first group of pictures sequence i ,G i ,B i And the i is more than or equal to 1 and less than or equal to r. And the pixel information of the r position points can be encrypted according to the following formula (i.e., target polynomial) to obtain n data slices:
wherein the R is j For the R channel brightness value in the j-th position point, the G j For the G channel brightness value in the j-th position point, B j Is the B-channel luminance value in the j-th position point.
It will be appreciated that since x has n values, any value of n can be brought into the above formula, and a data slice can be correspondingly calculated, for example, when x is equal to r, the corresponding data slice is
Since the pixel information of the r position points respectively form r coefficients of the polynomial, when the key frame is reconstructed based on the n data slices, only the polynomial is required to be constructed, and then r data slices in the n data slices are brought into the constructed polynomial, so that the r coefficients of the polynomial can be calculated, and the decryption process is completed. That is, when decryption is performed, the decryption process is not completed by acquiring n data slices, but only r data slices in the n data slices, so that when part of the data slices in the n data slices are lost or tampered, the decryption process is not affected.
Accordingly, when the number of the stolen data fragments is smaller than r, the decryption process cannot be completed, so that the security of data storage can be further improved.
Optionally, the storing the n data slices in n storage nodes respectively includes:
inserting the n data fragments into n carrier images correspondingly to obtain n shadow images, wherein one data fragment corresponds to one carrier image;
and storing the n shadow images in the n storage nodes correspondingly.
Specifically, the above-mentioned data slices may be inserted into the carrier image in the form of pixels. Of course, other forms of inserting the carrier image are possible.
In this embodiment, n pieces of data are inserted into n carrier images to obtain n shadow images, and then the n shadow images are stored in n storage nodes, so that compared with the case of directly storing the pieces of data, the concealment of the storage of the pieces of data can be further improved, and the security of data storage can be further improved.
Optionally, the value range of K is between 257 and 499, the value range of a numerical value in the data slice is between 0 and 499, and the inserting the n data slices into n carrier images correspondingly, to obtain n shadow images, includes:
respectively converting the numerical values in the n data fragments into integers between 0 and 255 to obtain n target data fragments;
and correspondingly inserting the n pieces of target data into the n carrier images in the form of pixel points to obtain the n shadow images.
In an embodiment of the present disclosure, the compressed data may include S first GOP sequences, where S is an integer greater than 1, and since one first GOP sequence corresponds to one key frame, the compressed data includes S key frames, when the S key frames are encrypted, the S key frames may be in one-to-one correspondence with S moduli, where the S moduli are prime numbers between 257 and 499, and the values of the S moduli are different. In this way, compared with the mode number K which is made to be a fixed value, the mode numbers corresponding to the key frames are different, so that the cracking difficulty can be further improved, and the safety of data storage can be further improved.
Since the value range of K is between 257 and 499, the value is calculated based on the target polynomialAnd->The range of values lies between 0 and 499. And said->And->Three different coordinate values in the data slice are respectively formed.
In addition, since the three-channel brightness value of the pixel point is located in the range of 0 to 255, in order to ensure that the data slices can be stored in the corresponding carrier image in the form of the pixel point, the coordinate values in the data slices can be converted into integers located between 0 and 255 before the data slices are stored, so as to obtain n target data slices. That is, the above conversion of the values in the n data slices into integers between 0 and 255 may refer to: each coordinate value in the n data slices is converted into an integer between 0 and 255, respectively.
The specific conversion mode can be as follows: under the condition that the coordinate value in the data slice is odd, converting the coordinate value according to the formula (y+1)/2; in the case that the coordinate values in the data fragment are even, the coordinate values are converted according to the formula y/2. And the parity of three coordinate values in the data fragment before conversion is recorded through an Alpha channel, wherein the specific recording rule is as follows:
original RGB parity Alpha value
R is only an odd number [0,0.14)
Only G is an odd number [0.14,0.3)
Only B is an odd number [0.3,0.44)
R, G is an odd number [0.44,0.6)
R, B is an odd number [0.6,0.74)
B, G is an odd number [0.74,0.9)
All being odd [0.9,1]
Thus, in the decryption stage, when the target data slice is acquired, the original parity of the numerical value in the target data slice can be determined through the data of the Alpha channel corresponding to the target data slice, and the target data slice is restored to the corresponding data slice based on the numerical value of the Alpha channel. For example, when the target data slice is (r=10, g=20, b=30), and the value of the Alpha channel is 0.5, since the value of the Alpha channel is 0.5, R, G is an odd number, and B is an even number, that is, R, G in the target data slice is calculated according to the formula (y+1)/2, and B is an even number, that is, B in the target data slice is calculated according to the formula y/2. The value of the R channel after reduction is: (10×2) -1=19, the value of G channel after reduction is: (20×2) -1=39, the value of the B channel after reduction is: 30×2=60, i.e. the restored data fragments are (19, 39, 60).
Optionally, the storing the n shadow images in the n storage nodes includes:
inserting the n shadow images into n carrier videos correspondingly to obtain n shadow videos, wherein one shadow image corresponds to one carrier video;
and storing the n shadow videos in the n storage nodes correspondingly respectively.
Specifically, when storing the shadow video in the corresponding storage node, each storage node may calculate a secure hash value (hereinafter referred to as a target secure hash value) of the stored shadow video by using the SHA512 algorithm, where the target secure hash value is used as a unique identifier of the shadow video, and store the target secure hash value. Since the secure hash value of a shadow video stored in a storage node will change when it is tampered with. Therefore, when the subsequent storage node receives the video playing request sent by the client, the storage node may first calculate the secure hash value of the shadow video, then compare the calculated secure hash value with the target secure hash value to determine whether the shadow video is tampered, and if the calculated secure hash value is consistent with the target secure hash value, determine that the shadow video is not tampered, and send the shadow image in the shadow video to the calculation node. And under the condition that the calculated secure hash value is inconsistent with the target secure hash value, determining that the shadow video is tampered, at the moment, not sending the tampered shadow image to the computing node, and simultaneously, sending tamper early warning to the computing node.
It can be appreciated that the storage node may further record an insertion position of the shadow image in the shadow video, so that when the shadow image needs to be sent to the computing node, the position of the shadow image in the shadow video may be determined according to the insertion position, so as to quickly obtain the shadow image.
In this embodiment, the shadow images may be inserted into the corresponding carrier video in the form of video frames to obtain n shadow videos, and then the n shadow videos are stored in the corresponding storage nodes respectively, so as to further improve the concealment of the stored data, and further improve the difficulty of data cracking.
Optionally, the key frame is a first frame of the first group of pictures sequence, and before the key frame is acquired from the first group of pictures sequence, the method further includes:
dividing the first picture group sequence into a key frame and a second picture group sequence, wherein the second picture group sequence is the first picture group sequence with the key frame deleted; the method further comprises the steps of:
inserting a blank frame into the second picture group sequence to obtain a third picture group sequence, wherein the blank frame forms a first frame of the third picture group sequence;
and storing the K in the empty frame and storing the third picture group sequence.
Specifically, the K may be stored in a frame header of the null frame. Because each key frame corresponds to a modulus K, the modulus K corresponding to the key frame in the encryption stage is correspondingly stored in the empty frame of the third picture group sequence which lacks the key frame, and therefore, even if all the n data fragments are stolen, the reconstruction process of the key frame cannot be completed under the condition that the modulus K is not acquired, and the safety of data storage is further improved.
Optionally, after generating the n data slices based on the target polynomial, the method further includes:
under the condition that a video playing request sent by a client is received, acquiring the r data fragments from the n storage nodes;
reconstructing the initial video data based on the r data slices and the third group of pictures sequence;
transmitting the initial video data to the client;
wherein said reconstructing said initial video data based on said r data slices and said third group of pictures sequence comprises:
analyzing the third picture group sequence to obtain K second picture group sequences;
reconstructing the key frame according to a Lagrangian difference formula based on the r data slices and the K;
reconstructing the initial video data based on the key frame and the second group of pictures sequence.
In one embodiment of the present disclosure, when the storage node stores the target data slices, the acquiring r data slices from the n storage nodes includes: and acquiring the r target data fragments from the n storage nodes, and converting the r target data fragments into r data fragments. For specific conversion rules, reference may be made to the above embodiments, and in order to avoid repetition, details are not repeated here.
The Lagrangian formula above may be expressed as:
after the K and the r data slices are acquired, since r data slices include r y R R are y G R are y B Thus, the values of the R, G, B three channels can be respectively brought into the above formula (i.e., the K and K are addedr are y R Bringing the above formula into the above formula, and adding the K and r y G Bringing the above formula into the above formula, and adding the K and r y B Bringing into the above formula), the corresponding key frame can be restored.
After the key frame is obtained through reconstruction, the key frame can be inserted into a corresponding second picture group sequence, and then the first picture group sequence before encryption can be obtained. After the reconstruction of all the first group of pictures sequences is completed, the encoded data of the initial video data may then be gradually streamed to the client according to the NAL layer slice format of h.264, thereby completing the display process of the initial video data.
Referring to fig. 2, a schematic frame diagram of a video data storage system provided by an embodiment of the present disclosure is shown, where the storage system includes n storage nodes and a computing node, when video data needs to be encrypted and stored, the video data may be stored in a local database of the computing node, the computing node obtains video data to be stored from the local database and encrypts the video data, and then the encrypted data is stored in the n storage nodes in a fragmentation manner, and at the same time, the third image group sequence may be stored in the local database of the computing node. When a client sends a video playing request to the computing node, the computing node acquires r target data fragments from the storage node, acquires a corresponding third picture group sequence from a local storage node to reconstruct corresponding video data, and transmits the video data to the client for display. After the client closes the displayed video data, the reconstructed video data may be deleted in the computing node.
Referring to fig. 3, in an embodiment of the disclosure, a flow chart of encrypting and storing the initial video data specifically includes the following steps: performing compression coding processing on the initial video data to obtain compressed data, wherein the compressed data comprises S first picture group sequences; dividing a first picture group sequence into a key frame and a second picture group sequence, taking K as a modulus, taking pixel information in the key frame as encryption information, and carrying out encryption processing on the key frame to obtain n data fragments corresponding to the key frame; and converting the numerical value in the data fragments into a numerical value between 0 and 255 to obtain n target data fragments, and recording the parity of the numerical value in the original data fragments through an Alpha channel. Inserting n pieces of target data into n shadow images, inserting a null frame into the second picture group sequence, and storing K in the null frame to obtain a third picture group sequence. And respectively inserting the n shadow images into the n carrier videos to obtain n shadow videos, and correspondingly storing the n shadow videos in the n data storage nodes. And carrying out encryption storage on the next first picture group sequence according to the steps until the encryption storage of the S first picture group sequences is completed.
Referring to fig. 4, in an embodiment of the disclosure, a flow chart for playing the initial video data specifically includes the following steps: under the condition that a video playing request sent by a client is received by a computing node, sending an image obtaining request to n storage nodes, comparing n storage nodes to judge whether a shadow video is tampered or not through a secure hash value, if not, sending the shadow image in the shadow video to the computing node, obtaining r shadow images sent by r storage nodes responding first, analyzing the r shadow images to obtain r target data fragments, then converting the r target data fragments into r data fragments, obtaining K, reconstructing the key frame according to a Lagrangian difference formula based on the r data fragments and the K, inserting the key frame into a corresponding second picture group sequence to obtain a corresponding first picture group sequence, judging whether S first picture group sequences are all reconstructed, and if yes, pulling stream to the client. And judging whether to close the playing/downloading component, if so, deleting the reconstructed video in the computing node.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a video storage device 500 according to an embodiment of the disclosure, where the video storage device 500 includes:
the encoding module 501 is configured to perform compression encoding processing on the initial video data to obtain compressed data, where the compressed data includes a first group of pictures sequence;
an obtaining module 502, configured to obtain a key frame from the first group of pictures sequence;
an encryption module 503, configured to encrypt the key frame to obtain n data slices corresponding to the key frame, where the n data slices are used to reconstruct the key frame, and n is an integer greater than 1;
and the storage module 504 is configured to store the n data slices in n storage nodes respectively, where one data slice corresponds to one storage node.
Optionally, the first frame group sequence includes pixel information of the key frame, and the encryption module 503 is specifically configured to encrypt the key frame with K as a modulus and the pixel information as encryption information, so as to obtain n data slices corresponding to the key frame, where K is a prime number.
Optionally, the encryption module 503 includes:
the acquisition sub-module is used for acquiring brightness values of r position points in the pixel information, wherein r is an integer smaller than n;
the constructing submodule is used for constructing a target polynomial by taking the K as a modulus and taking the brightness values of the r position points as coefficients;
and the generation sub-module is used for generating the n data fragments based on the target polynomial.
Optionally, the storage module 504 includes:
the inserting sub-module is used for correspondingly inserting the n data fragments into the n carrier images to obtain n shadow images, wherein one data fragment corresponds to one carrier image;
and the storage submodule is used for respectively storing the n shadow images in the n storage nodes correspondingly.
Optionally, the inserting sub-module is further configured to insert the n shadow images into n carrier videos correspondingly, so as to obtain n shadow videos, where one shadow image corresponds to one carrier video;
and the storage submodule is also used for respectively and correspondingly storing the n shadow videos in the n storage nodes.
Optionally, the value range of K is between 257 and 499, the value range of the numerical value in the data slice is between 0 and 499, and the inserting sub-module includes:
the conversion unit is used for respectively converting the numerical values in the n data fragments into integers between 0 and 255 to obtain n target data fragments;
and the inserting unit is used for correspondingly inserting the n target data fragments into the n carrier images in the form of pixel points to obtain n shadow images.
Optionally, the key frame is a first frame of the first group of pictures sequence, and the apparatus further includes:
the dividing module is used for dividing the first picture group sequence into a key frame and a second picture group sequence, wherein the second picture group sequence is the first picture group sequence with the key frame deleted; the method further comprises the steps of:
an inserting module, configured to insert a null frame into the second picture group sequence to obtain a third picture group sequence, where the null frame forms a first frame of the third picture group sequence;
the storage module 504 is further configured to store the K in the null frame and store the third group of pictures sequence.
Optionally, the obtaining module 502 is further configured to obtain r data slices from the n storage nodes when receiving a video playing request sent by the client;
the apparatus further comprises:
a reconstruction module configured to reconstruct the initial video data based on the r data slices and the third group of pictures sequence;
and the sending module is used for sending the initial video data to the client.
Optionally, the reconstruction module includes:
the analysis submodule is used for analyzing the third picture group sequence to obtain K second picture group sequences;
a first reconstruction sub-module, configured to reconstruct the key frame according to a lagrangian difference formula based on the r data slices and the K;
a second reconstruction sub-module for reconstructing the initial video data based on the key frame and the second group of pictures sequence.
The video storage device 500 can implement the processes in the above method embodiments and achieve the same technical effects, and for avoiding repetition, the description is omitted here.
The embodiment of the disclosure also provides an electronic device, including: the program is executed by the processor, and the processes of the video storage method embodiment can be achieved and the same technical effects can be achieved.
Referring to fig. 6, the disclosed embodiment also provides an electronic device comprising a bus 601, a transceiver 602, an antenna 603, a bus interface 604, a processor 605 and a memory 606. The processor 605 can implement the various processes of the video storage method embodiment described above, and achieve the same technical effects, and for avoiding repetition, the description is omitted here.
In fig. 6, a bus architecture (represented by bus 601), the bus 601 may include any number of interconnected buses and bridges, with the bus 601 linking together various circuits, including one or more processors, represented by processor 605, and memory, represented by memory 606. The bus 601 may also link together various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., which are well known in the art and, therefore, will not be described further herein. Bus interface 604 provides an interface between bus 601 and transceiver 602. The transceiver 602 may be one element or may be multiple elements, such as multiple receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor 605 is transmitted over a wireless medium via an antenna 603, and further, the antenna 603 also receives data and transmits the data to the processor 605.
The processor 605 is responsible for managing the bus 601 and general processing, and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And memory 606 may be used to store data used by processor 605 in performing operations.
Alternatively, the processor 605 may be CPU, ASIC, FPGA or a CPLD.
The embodiments of the present disclosure further provide a computer readable storage medium, on which a computer program is stored, where the computer program when executed by a processor implements each process of the foregoing method embodiments, and the same technical effects can be achieved, and for avoiding repetition, a detailed description is omitted herein. Among them, a computer-readable storage medium such as Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk, and the like.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present disclosure may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a second terminal device, etc.) to perform the method according to the embodiments of the present disclosure.
The embodiments of the present disclosure have been described above with reference to the accompanying drawings, but the present disclosure is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the disclosure and the scope of the claims, which are all within the protection of the present disclosure.

Claims (12)

1. A video storage method, comprising:
performing compression coding processing on the initial video data to obtain compressed data, wherein the compressed data comprises a first picture group sequence;
obtaining a key frame from the first picture group sequence;
encrypting the key frame to obtain n data fragments corresponding to the key frame, wherein the n data fragments are used for reconstructing the key frame, and n is an integer greater than 1;
and storing the n data fragments in n storage nodes correspondingly, wherein one data fragment corresponds to one storage node.
2. The method according to claim 1, wherein the first group of pictures sequence includes pixel information of the key frame, and the encrypting the key frame to obtain n pieces of data corresponding to the key frame includes:
and encrypting the key frame by taking K as a modulus and the pixel information as encryption information to obtain n data fragments corresponding to the key frame, wherein K is a prime number.
3. The method according to claim 2, wherein the encrypting the key frame with K as a modulus and the pixel information as encryption information to obtain n pieces of data corresponding to the key frame includes:
acquiring brightness values of r position points in the pixel information, wherein r is an integer smaller than n;
taking the K as a modulus, and taking the brightness value of the r position points as a coefficient to construct a target polynomial;
generating the n data slices based on the target polynomial.
4. The method according to claim 2, wherein storing the n data slices in n storage nodes respectively includes:
inserting the n data fragments into n carrier images correspondingly to obtain n shadow images, wherein one data fragment corresponds to one carrier image;
and storing the n shadow images in the n storage nodes correspondingly.
5. The method of claim 4, wherein storing the n shadow images in the n storage nodes respectively comprises:
inserting the n shadow images into n carrier videos correspondingly to obtain n shadow videos, wherein one shadow image corresponds to one carrier video;
and storing the n shadow videos in the n storage nodes correspondingly respectively.
6. The method according to claim 4, wherein the value range of K is between 257 and 499, the value range of the numerical value in the data slice is between 0 and 499, the inserting the n data slices into n carrier images correspondingly, to obtain n shadow images, includes:
respectively converting the numerical values in the n data fragments into integers between 0 and 255 to obtain n target data fragments;
and correspondingly inserting the n pieces of target data into the n carrier images in the form of pixel points to obtain the n shadow images.
7. The method of claim 3, wherein the key frame is a first frame of the first group of pictures sequence, and wherein prior to the obtaining the key frame from the first group of pictures sequence, the method further comprises:
dividing the first picture group sequence into a key frame and a second picture group sequence, wherein the second picture group sequence is the first picture group sequence with the key frame deleted; the method further comprises the steps of:
inserting a blank frame into the second picture group sequence to obtain a third picture group sequence, wherein the blank frame forms a first frame of the third picture group sequence;
and storing the K in the empty frame and storing the third picture group sequence.
8. The method of claim 7, wherein after generating the n data slices based on the target polynomial, the method further comprises:
under the condition that a video playing request sent by a client is received, r data fragments are obtained from the n storage nodes;
reconstructing the initial video data based on the r data slices and the third group of pictures sequence;
and sending the initial video data to the client.
9. The method of claim 8, wherein reconstructing the initial video data based on the r data slices and the third group of pictures sequence comprises:
analyzing the third picture group sequence to obtain K second picture group sequences;
reconstructing the key frame according to a Lagrangian difference formula based on the r data slices and the K;
reconstructing the initial video data based on the key frame and the second group of pictures sequence.
10. A video storage device, comprising:
the coding module is used for carrying out compression coding processing on the initial video data to obtain compressed data, wherein the compressed data comprises a first picture group sequence;
the acquisition module is used for acquiring key frames from the first picture group sequence;
the encryption module is used for carrying out encryption processing on the key frame to obtain n data fragments corresponding to the key frame, wherein the n data fragments are used for reconstructing the key frame, and n is an integer greater than 1;
and the storage module is used for respectively storing the n data fragments in n storage nodes, wherein one data fragment corresponds to one storage node.
11. An electronic device, comprising: a processor, a memory and a program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the video storage method of any one of claims 1 to 9.
12. A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the video storage method of any of claims 1 to 9.
CN202210381399.7A 2022-04-12 2022-04-12 Video storage method and device and electronic equipment Pending CN116962603A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210381399.7A CN116962603A (en) 2022-04-12 2022-04-12 Video storage method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210381399.7A CN116962603A (en) 2022-04-12 2022-04-12 Video storage method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN116962603A true CN116962603A (en) 2023-10-27

Family

ID=88449750

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210381399.7A Pending CN116962603A (en) 2022-04-12 2022-04-12 Video storage method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN116962603A (en)

Similar Documents

Publication Publication Date Title
Lin et al. Issues and solutions for authenticating MPEG video
US10368051B2 (en) 3D-HEVC inter-frame information hiding method based on visual perception
Yang et al. Image secret sharing method with two-decoding-options: Lossless recovery and previewing capability
US8055900B2 (en) Information processing apparatus, information processing system, information processing method, storage medium and program
US8938095B2 (en) Verification method, verification device, and computer product
US7167988B2 (en) Information processing method and information processing apparatus
US20160330492A1 (en) Method and Device for Compressing and Expanding Image Intended for Encrypted Communication, Program, and Storage Medium
Rabie et al. The pixogram: Addressing high payload demands for video steganography
CN102932650B (en) Video data integrity protection and verification method, equipment and system
CN109640089B (en) Image coding and decoding method and device
KR20090098789A (en) Method and device for managing a transmission of keys
Manupriya et al. V⊕ SEE: Video secret sharing encryption technique
KR101338341B1 (en) Cctv media secure transmission system and method thereof
US20050078820A1 (en) Information processing method, information processing apparatus, program, and storage medium
US6571015B1 (en) Method for compressing image information at high speed and method for transferring real-time moving images utilizing the same
Barannik et al. A Method of Scrambling for the System of Cryptocompression of Codograms Service Components
US20130156257A1 (en) Image processing device, tampering prevention method, and tampering detection method
Puteaux et al. Rebuttal: On the security of reversible data hiding in encrypted images by MSB prediction
CN116962603A (en) Video storage method and device and electronic equipment
WO2007085632A1 (en) Method of watermarking digital data
Johnson et al. Homomorphic signatures for digital photographs
Shiu et al. Reversible data hiding in permutation-based encrypted images with strong privacy
Babel et al. Preserving data integrity of encoded medical images: the LAR compression framework
CN111353133B (en) Image processing method, device and readable storage medium
Yang et al. An image secret sharing scheme with the capability of previvewing the secret image

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