CN117220856A - Video data processing method, device, system, storage medium and processor - Google Patents
Video data processing method, device, system, storage medium and processor Download PDFInfo
- Publication number
- CN117220856A CN117220856A CN202311270219.9A CN202311270219A CN117220856A CN 117220856 A CN117220856 A CN 117220856A CN 202311270219 A CN202311270219 A CN 202311270219A CN 117220856 A CN117220856 A CN 117220856A
- Authority
- CN
- China
- Prior art keywords
- data
- video
- frame
- check
- transmitting end
- 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
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 39
- 238000012545 processing Methods 0.000 claims abstract description 47
- 238000000034 method Methods 0.000 claims abstract description 34
- 238000012795 verification Methods 0.000 claims description 48
- 238000004590 computer program Methods 0.000 claims description 17
- 230000005540 biological transmission Effects 0.000 claims description 9
- 238000004364 calculation method Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 17
- 238000004422 calculation algorithm Methods 0.000 description 14
- 230000006870 function Effects 0.000 description 5
- 230000008569 process Effects 0.000 description 4
- 230000006835 compression Effects 0.000 description 3
- 238000007906 compression Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000008094 contradictory effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
Landscapes
- Television Signal Processing For Recording (AREA)
Abstract
The embodiment of the application provides a video data processing method, a video data processing device, a video data processing processor and a storage medium. The method is applied to a video data transmitting end and comprises the following steps: carrying out Hash operation on video frame data to be transmitted to obtain a Hash value of the video frame data, wherein the video frame data comprises key frames and/or difference frames; processing the Hash value of the video frame data to construct a transmitting end data check frame; and transmitting the video frame data and the transmitting end data check frame to a video data receiving end. By the technical scheme, the problem that each video data frame is encrypted to generate huge calculation power overhead can be avoided, and the storage space is saved.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, a system, a storage medium, and a processor for processing video data.
Background
With the rapid popularization of the internet of things and the continuous reduction of network bandwidth cost, the security of video data transmission on the internet of things is gradually paid attention to. To prevent the video stream from being tampered with during transmission, currently, video data is transmitted mainly using a full data encryption or key frame encryption method.
Taking a full frame encryption mode as an example, in the prior art, encryption processing is performed on each frame of data transmitted, and the specific scheme is as follows:
(1) The video producer and the consumer agree on encryption and decryption keys in advance;
(2) As shown in fig. 1, a video producer encrypts video data frame by frame according to an encryption key and pushes the video data to a video receiver;
(3) As shown in fig. 2, after receiving video data frame by frame, the video receiver decrypts the video stream by using the decryption key, and performs actions such as video playing or storing after decrypting.
The existing scheme has the following defects:
(1) Encryption operation is needed to be carried out on each frame in a video stream generator, and a large computing pressure is generated on the video generator;
(2) Compared with the original data, the encrypted frame data has larger capacity overhead and larger overhead for a network transmission link;
(3) The video stream receiver needs to perform decryption operation when receiving each frame of data, and a large computing pressure is generated on the video receiver.
Disclosure of Invention
The embodiment of the application aims to provide a video data processing method, a device, a system, a storage medium and a processor. By the video processing method, the calculation power expenditure can be saved, and the storage space can be saved.
To achieve the above object, a first aspect of the present application provides a video data processing method, which is applied to a video data transmitting end, the method comprising:
carrying out Hash operation on video frame data to be transmitted to obtain a Hash value of the video frame data, wherein the video frame data comprises key frames and/or difference frames;
processing the Hash value of the video frame data to construct a transmitting end data check frame;
and transmitting the video frame data and the transmitting end data check frame to a video data receiving end.
In the embodiment of the application, the Hash value of the video frame data is processed to construct a transmitting end data check frame, which comprises the following steps:
taking a remainder from initial verification data aiming at a Hash value of the video frame data, wherein the initial verification data comprises a plurality of data bits, and an initial value of each data bit is a first character;
changing data bits of the initial verification data corresponding to the remainder into a second character, and keeping the rest data bits as first characters to obtain verification data of the video frame data;
and obtaining a transmitting end data check frame by taking a union set of check data of a plurality of video frame data.
In the embodiment of the application, obtaining the transmitting end data check frame by taking the union set of the check data of a plurality of video frame data comprises the following steps:
For the same data bit of the verification data of a plurality of video frame data, when at least one second character exists, changing the corresponding data bit of the initial verification data into the second character;
repeating the operation until each data bit of the check data is traversed, and taking the changed initial check data as a transmitting end data check frame.
In an embodiment of the present application, the method further includes:
when two adjacent characters of the data check frame of the transmitting end are different, a break point is arranged between the two adjacent characters so as to divide the data check frame of the transmitting end into at least one section, and the characters of data bits of each section of data check frame are identical;
and converting each section of transmitting end data check frame into codes in the form of < n, v >, and sequentially splicing all the codes to obtain the optimized transmitting end data check frame, wherein n represents the number of first characters or second characters in the section of transmitting end data check frame, and v represents the characters of data bits of the section of transmitting end data check frame.
A second aspect of the present application provides a method for processing video data, where the method is applied to a video data receiving end, and includes:
receiving video frame data and a transmitting end data check frame sent by a video data transmitting end;
Performing Hash operation on the video frame data to obtain a Hash value of the video frame data, wherein the video frame data comprises a key frame and/or a difference frame;
processing the Hash value of the video frame data to construct a receiving end data check frame;
and comparing the receiving end data check frame with the transmitting end data check frame, and if the receiving end data check frame and the transmitting end data check frame are consistent, determining that the video data is not tampered.
In the embodiment of the application, the Hash value of the video frame data is processed to construct a receiving end data check frame, which comprises the following steps:
taking a remainder from initial verification data aiming at a Hash value of the video frame data, wherein the initial verification data comprises a plurality of data bits, and an initial value of each data bit is a first character;
changing data bits of the initial verification data corresponding to the remainder into a second character, and keeping the rest data bits as first characters to obtain verification data of the video frame data;
and obtaining a receiving end data check frame by taking a union set of check data of a plurality of video frame data.
In the embodiment of the application, obtaining the receiving end data check frame by taking the union set of the check data of a plurality of video frame data comprises the following steps:
For the same data bit of the verification data of a plurality of video frame data, when at least one second character exists, changing the corresponding data bit of the initial verification data into the second character;
repeating the operation until each data bit of the check data is traversed, and taking the changed initial check data as a receiving end data check frame.
In the embodiment of the invention, the transmitting end data check frame is an optimized transmitting end data check frame obtained by the video data transmitting end through the following modes:
when two adjacent characters of the data check frame of the transmitting end are different, a break point is arranged between the two adjacent characters so as to divide the data check frame into at least one section, and the characters of data bits of each section of data check frame are the same;
converting each section of transmitting end data check frame into codes in the form of < n, v > and sequentially splicing all the codes to obtain an optimized transmitting end data check frame, wherein n represents the number of first characters or second characters in the section of transmitting end data check frame, and v represents the characters of data bits of the section of transmitting end data check frame;
the method further comprises the steps of: and the video data receiving end sequentially restores all codes of the optimized transmitting end data check frame into n v character forms, and splices the n v character forms to obtain the transmitting end data check frame.
A third aspect of the present application provides a video data processing apparatus applied to a video data transmitting end, the apparatus comprising:
the verification frame generation module is used for carrying out Hash operation on video frame data to be transmitted so as to obtain a Hash value of the video frame data, wherein the video frame data comprises key frames and/or difference frames; and
processing the Hash value of the video frame data to construct a transmitting end data check frame;
and the data transmission module is used for transmitting the video frame data and the transmitting end data check frame to the video data receiving end.
A fourth aspect of the present application provides a video data processing apparatus, for use in a video data receiving terminal, the apparatus comprising:
the receiving module is used for receiving the video frame data sent by the video data sending end and the sending end data check frame;
the receiving end check frame generation module is used for carrying out Hash operation on the video frame data to obtain a Hash value of the video frame data, wherein the video frame data comprises a key frame and/or a difference frame; and
processing the Hash value of the video frame data to construct a receiving end data check frame;
and the verification module is used for comparing the data check frame of the receiving end with the data check frame of the transmitting end, and determining that the video data is not tampered if the data check frame of the receiving end and the data check frame of the transmitting end are consistent.
A fifth aspect of the present application provides a video data processing system, the system comprising the video data processing apparatus applied to a video data transmitting end and the video data processing apparatus applied to a video data receiving end.
A sixth aspect of the present application provides a processor configured to perform the video data processing method applied to a video data transmitting end or the video data processing method applied to a video data receiving end.
A seventh aspect of the application provides a machine-readable storage medium having stored thereon instructions that, when executed by a processor, cause the processor to be configured to perform the video data processing method applied to a video data transmitting side or the video data processing method applied to a video data receiving side.
An eighth aspect of the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the video data processing method applied to a video data transmitting side or the video data processing method applied to a video data receiving side.
According to the technical scheme, the video sending end carries out Hash operation on video frame data to be transmitted to obtain a Hash value, builds sending end check frame data based on the Hash value, the video receiving end receives the video frame data and the sending end data check frame, builds receiving end data check frame, and determines whether the video data is tampered or not by comparing the sending end data check frame with the receiving end data check frame, so that the problem of huge calculation overhead generated by encrypting each video data frame can be avoided, and the storage space is saved.
Additional features and advantages of embodiments of the application will be set forth in the detailed description which follows.
Drawings
The accompanying drawings are included to provide a further understanding of embodiments of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain, without limitation, the embodiments of the application. In the drawings:
fig. 1 schematically illustrates a prior art method in which a video producer encrypts video data frame by frame according to an encryption key;
fig. 2 schematically illustrates a schematic diagram of video stream decryption by a decryption key after a video receiver receives video data frame by frame in the prior art;
fig. 3 schematically illustrates an application environment of a video processing method according to an embodiment of the present application;
fig. 4 schematically shows a flowchart of a video data processing method applied to a video transmitting end according to an embodiment of the present application;
FIG. 5 schematically illustrates an exploded view of a video frame according to an embodiment of the application;
fig. 6 schematically illustrates a schematic diagram of a bit memory with an initialization length M at a video data transmitting end according to an embodiment of the present application;
fig. 7 schematically shows a schematic diagram of verification data of video frame data according to an embodiment of the application;
FIG. 8 schematically illustrates a diagram of a checksum of a plurality of video frame data to obtain a sender data checksum in accordance with an embodiment of the present application;
fig. 9 schematically shows a flowchart of a video data processing method applied to a video receiving end according to an embodiment of the present application;
fig. 10 schematically illustrates a schematic diagram of a bit memory with an initialization length M at a video data receiving end according to an embodiment of the present application;
fig. 11 schematically shows a schematic diagram of verification data of video frame data according to an embodiment of the application;
fig. 12 schematically shows a schematic diagram of determining whether video frame data is tampered with according to an embodiment of the present application;
fig. 13 schematically shows a block diagram of a video processing apparatus for a video data transmitting end according to an embodiment of the present application;
fig. 14 schematically shows a block diagram of a video processing apparatus for a video data receiving end according to an embodiment of the present application;
fig. 15 schematically shows an internal structural view of a computer device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it should be understood that the detailed description described herein is merely for illustrating and explaining the embodiments of the present application, and is not intended to limit the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be noted that, if there is a description of "first", "second", etc. in the embodiments of the present application, the description of "first", "second", etc. is only for descriptive purposes, and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present application.
The video data processing method provided by the application can be applied to an application environment shown in fig. 3. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 110 (or the server 120) performs a Hash operation on video frame data to be transmitted to obtain a Hash value of the video frame data; processing the Hash value of the video frame data to construct a transmitting end data check frame; and transmitting the video frame data and the transmitting end data check frame to a video data receiving end. The server 120 (or the terminal 110) receives video frame data and a transmitting-end data check frame transmitted by a transmitting end of the video data; performing Hash operation on the video frame data to obtain a Hash value of the video frame data, wherein the video frame data comprises a key frame and/or a difference frame; processing the Hash value of the video frame data to construct a receiving end data check frame; and comparing the receiving end data check frame with the transmitting end data check frame, and if the receiving end data check frame and the transmitting end data check frame are consistent, determining that the video data is not tampered. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smartphones, tablet computers, and portable wearable devices, and the server 104 may be implemented by a stand-alone server or a server cluster composed of a plurality of servers.
Fig. 4 schematically shows a flow chart of a video data processing method according to an embodiment of the application. As shown in fig. 4, in an embodiment of the present application, a video data processing method is provided, and this embodiment is mainly exemplified by the application of the method to the terminal 110 (or the server 120) in fig. 3, and includes the following steps:
step 410, performing a Hash operation on video frame data to be transmitted to obtain a Hash value of the video frame data;
the video to be transmitted may be converted into video frame data by an existing method, for example, may be converted into video frame data by a video data amplifier and a video encoder.
As shown in fig. 5, the video frame data includes key frames and/or difference frames. Wherein the key frame (I-frame) is usually the first frame of each GOP (one of the video compression techniques used by MPEG), and is moderately compressed, and can be used as a reference point for random access. An I-frame can be seen as the product of a compressed image, which can be decoded independently. The difference frames include forward predictive-frame (P-frame) and bi-predictive interpolation-frame (bi-directional interpolated prediction frame, B-frame), and the P-frame image adopts forward temporal prediction, so that the compression efficiency and the image quality can be improved, and the B-frame can be used to improve the compression multiple.
The Hash operation is to change the input data with any length into the output with fixed length through the Hash algorithm, and the output result is the Hash value. For example, the Hash value of the video frame data may be obtained by performing a Hash operation on the video frame data using a commonly used Hash algorithm MD2, MD4, MD5, SHA-1, and the like.
For example, a plurality of Hash operations are performed on each video frame data, a first Hash value of the video frame data may be obtained by the Hash algorithm 1, a second Hash value of the video frame data may be obtained by the Hash algorithm 2, and a third Hash value of the video frame data may be obtained by the Hash algorithm 3.
Step 420, processing the Hash value of the video frame data to construct a transmitting end data check frame;
step 420 may take a remainder from initial check data for the Hash value of the video frame data when the Hash value of the video frame data is processed to construct a transmitting end data check frame, where the initial check data includes a plurality of data bits, and an initial value of each data bit is a first character;
changing data bits of the initial verification data corresponding to the remainder into a second character, and keeping the rest data bits as first characters to obtain verification data of the video frame data;
And obtaining a transmitting end data check frame by taking a union set of check data of a plurality of video frame data.
For example, a plurality of Hash operations are performed on each video frame data, a first Hash value of the video frame data is obtained through a Hash algorithm 1, a second Hash value of the video frame data is obtained through a Hash algorithm 2, and a third Hash value of the video frame data is obtained through a Hash algorithm 3.
Further, as shown in fig. 6, a bit memory having a length of M may be initialized at the video data transmitting end for storing initial verification data, wherein an initial value of each data bit of the initial verification data may be set to character 0.
Further, the following operations are performed for each video frame data to obtain verification data of the video frame data:
as shown in fig. 7, if the first hash value is left to the initial check data to obtain a remainder 5, the 5 th data bit of the initial check data is changed to 1, if the second hash value is left to the initial check data to obtain a remainder 3, the 3 rd data bit of the initial check data is changed to 1, and if the second hash value is left to the initial check data to obtain a remainder 7, the 7 th data bit of the initial check data is changed to 1, thereby obtaining the data check frame 00010101..0 of the M-bit of the video frame data.
Repeating the operation on each video frame data to obtain the check data of a plurality of video frame data, and then obtaining the union set of the check data of the plurality of video frame data to obtain the data check frame of the transmitting end.
In a preferred embodiment, the sending-end data check frame may be obtained by taking a union of check data of a plurality of video frame data in the following manner:
for the same data bit of the verification data of a plurality of video frame data, when at least one second character exists, changing the corresponding data bit of the initial verification data into the second character;
repeating the operation until each data bit of the check data is traversed, and taking the changed initial check data as a transmitting end data check frame.
For example, as shown in fig. 8, N video frames include N pieces of check data, and assuming that the check data of the first video frame data is 11100000..0, the check data of the second video frame data is 00010101..0, and the check data of the nth video frame data is 00111000..0, the data check frame obtained by combining the check data of the N video frame data is: 11111101...0. Specifically, for the 0 th data bit, the check data of the first video frame data is 1, the check data of the second video frame data is 0, and the check data of the nth video frame data is 0, and since the check data of the first video frame data is 1, the 0 th data of the data check frame can be changed to 1. For the 1 st data bit, the check data of the first video frame data is 1, the check data of the second video frame data is 0, and the check data of the nth video frame data is 0, and since the check data of the first video frame data is 1, the 1 st data of the data check frame can be changed to 1. Repeating the operation until each data bit of the check data is traversed, and taking the changed initial check data as a transmitting end data check frame.
In some preferred embodiments, the video data processing method further comprises:
when two adjacent characters of the data check frame of the transmitting end are different, a break point is arranged between the two adjacent characters so as to divide the data check frame of the transmitting end into at least one section, and the characters of data bits of each section of data check frame are identical;
and converting each section of transmitting end data check frame into codes in the form of < n, v >, and sequentially splicing all the codes to obtain the optimized transmitting end data check frame, wherein n represents the number of first characters or second characters in the section of transmitting end data check frame, and v represents the characters of data bits of the section of transmitting end data check frame.
For example, if bits 0-6 and 8 of data check frame 1111111010..0 are changed to 1, the data check frame may be divided into 4 segments, the first segment is 1111111, the second segment is 0, the third segment is 1, the 4 th segment is 00..0, then each segment is converted into a code <7,1>, <1,0>, <1,1> and < several, 0>, all codes are sequentially concatenated, i.e., "<7,1> <1,0> <1,1> < several, 0>" to constitute an optimized sender data check frame.
In the embodiment of the application, the execution efficiency of the Hash algorithm is far higher than that of the encryption algorithm, meanwhile, the video frame data is unchanged, and the added data check frame of the transmitting end is far lower than the storage space of the bit memory after being encoded and spliced. Assuming that the bit memory is 10000 bits, if every 10 frames contain a key frame according to the algorithm, the bit memory contains at most 30 data bits of 1, and according to the subsequent encoding and splicing steps, the data check frame at the transmitting end cannot exceed 100 bits, which is greatly lower than the storage cost brought by encrypting each data frame, thereby greatly saving the storage space.
And step 430, transmitting the video frame data and the transmitting end data check frame to a video data receiving end.
FIG. 4 is a flow chart of a video processing method in one embodiment. It should be understood that, although the steps in the flowchart of fig. 4 are shown in order as indicated, the steps are not necessarily performed in the order indicated. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 4 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the sub-steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of the sub-steps or stages of other steps or other steps.
The embodiment of the invention also provides a processing method of video data, as shown in fig. 9, the method is applied to a video data receiving end, and comprises the following steps:
step 910, receiving video frame data and a transmitting end data check frame sent by a video data transmitting end;
In a preferred embodiment, the sender data check frame is an optimized sender data check frame obtained by the video data sender through the following manner:
when two adjacent characters of the data check frame of the transmitting end are different, a break point is arranged between the two adjacent characters so as to divide the data check frame into at least one section, and the characters of data bits of each section of data check frame are the same;
converting each section of transmitting end data check frame into codes in the form of < n, v > and sequentially splicing all the codes to obtain an optimized transmitting end data check frame, wherein n represents the number of first characters or second characters in the section of transmitting end data check frame, and v represents the characters of data bits of the section of transmitting end data check frame;
when the video data receiving end receives the optimized transmitting end data check frame, the video data receiving end sequentially restores all codes of the optimized transmitting end data check frame into n v character forms, and the restored transmitting end data check frame is obtained by splicing.
For example, if the sender data check frame received by the video data receiving end is "<7,1> <1,0> <1,1> < several, 0>", the video data receiving end sequentially restores all the codes of the sender data check frame to n v character forms, and performs concatenation to obtain a sender data check frame, and the sender data check frame after restoring all the codes of the sender data check frame is "11111101..0".
Step 920, performing a Hash operation on the video frame data to obtain a Hash value of the video frame data, where the video frame data includes a key frame and/or a difference frame;
the method for performing Hash operation by the video data receiving end is the same as that of the video data transmitting end, and will not be described here again.
Step 930, processing the Hash value of the video frame data to construct a receiving end data check frame;
in step 930, when the Hash value of the video frame data is processed to construct a receiving end data check frame, a remainder may be taken for initial check data with respect to the Hash value of the video frame data, where the initial check data includes a plurality of data bits, and an initial value of each data bit is a first character;
changing data bits of the initial verification data corresponding to the remainder into a second character, and keeping the rest data bits as first characters to obtain verification data of the video frame data;
and obtaining a receiving end data check frame by taking a union set of check data of a plurality of video frame data.
For example, a plurality of Hash operations are performed on each video frame data, a first Hash value of the video frame data is obtained through a Hash algorithm 1, a second Hash value of the video frame data is obtained through a Hash algorithm 2, and a third Hash value of the video frame data is obtained through a Hash algorithm 3.
Further, as shown in fig. 10, a bit memory having a length of M may be initialized at the video data transmitting end for storing initial verification data, wherein an initial value of each data bit of the initial verification data may be set to character 0.
Further, the following operations are performed for each video frame data to obtain verification data of the video frame data:
as shown in fig. 11, if the first hash value is left to the initial check data to obtain a remainder 5, the 5 th data bit of the initial check data is changed to 1, if the second hash value is left to the initial check data to obtain a remainder 3, the 3 rd data bit of the initial check data is changed to 1, and if the second hash value is left to the initial check data to obtain a remainder 7, the 7 th data bit of the initial check data is changed to 1, thereby obtaining the data check frame 00010101..0 of the M-bit of the video frame data.
Repeating the operation on each video frame data to obtain the check data of a plurality of video frame data, and then obtaining the check data of the plurality of video frame data and the union set to obtain the check frame of the data of the receiving end.
In a preferred embodiment, the receiving-end data check frame may be obtained by taking a union of check data of a plurality of video frame data in the following manner:
For the same data bit of the verification data of a plurality of video frame data, when at least one second character exists, changing the corresponding data bit of the initial verification data into the second character;
repeating the operation until each data bit of the check data is traversed, and taking the changed initial check data as a receiving end data check frame.
Step 940, comparing the receiving end data check frame with the transmitting end data check frame, and if the two frames are consistent, determining that the video data is not tampered.
For example, if the data check frame of the receiving end is 11111101..0 and the data check frame of the transmitting end is 11111101..0, it indicates that the video data is not tampered.
In some optional implementations, the present embodiments further provide a method for determining which particular frame of video data has been tampered with, including: comparing the data bit with 1 character in the check data of the video frame data with the corresponding data bit of the data check frame of the transmitting end, if the corresponding data bit of the data check frame of the transmitting end is also 1, determining that the video data frame is not tampered, otherwise, determining that the video frame data is tampered. As shown in fig. 12, the upper half part of the diagram is the check data of a certain video frame data, and the lower half part is the transmitting end data check frame, and since the data bit of the character "1" in the video frame data is also the corresponding data bit of the transmitting end data check frame is also 1, it can be determined that the video frame is not tampered.
In one embodiment, as shown in fig. 13, there is provided a video data processing apparatus, including a check frame generation module and a data transmission module, wherein:
the verification frame generation module is used for carrying out Hash operation on video frame data to be transmitted so as to obtain a Hash value of the video frame data, wherein the video frame data comprises key frames and/or difference frames; and
processing the Hash value of the video frame data to construct a transmitting end data check frame;
and the data transmission module is used for transmitting the video frame data and the transmitting end data check frame to the video data receiving end.
In one embodiment, as shown in fig. 14, there is provided a video data processing apparatus, which is applied to a video data receiving end, and includes a receiving module, a receiving end check frame generating module, and a verification module, wherein:
the receiving module is used for receiving the video frame data sent by the video data sending end and the sending end data check frame;
the receiving end check frame generation module is used for carrying out Hash operation on the video frame data to obtain a Hash value of the video frame data, wherein the video frame data comprises a key frame and/or a difference frame; and
processing the Hash value of the video frame data to construct a receiving end data check frame;
And the verification module is used for comparing the data check frame of the receiving end with the data check frame of the transmitting end, and determining that the video data is not tampered if the data check frame of the receiving end and the data check frame of the transmitting end are consistent.
The video data processing device comprises a processor and a memory, wherein the receiving module, the receiving end check frame generating module, the verification module and the like are all stored in the memory as program units, and the processor executes the program modules stored in the memory to realize corresponding functions.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one, and the video data processing method is realized by adjusting kernel parameters.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
The embodiment of the application provides a video data processing system, which comprises the video data processing device applied to a video data transmitting end and the video data processing device applied to a video data receiving end.
The embodiment of the application provides a storage medium, wherein a program is stored on the storage medium, and the program is executed by a processor to realize the video data processing method applied to a video data transmitting end or the video data processing method applied to a video data receiving end.
The embodiment of the application provides a processor, which is used for running a program, wherein the program runs to execute the video data processing method applied to a video data transmitting end or the video data processing method applied to a video data receiving end.
In one embodiment, a computer device is provided, which may be a server, and the internal structure thereof may be as shown in fig. 15. Fig. 15 schematically shows an internal structural view of a computer device according to an embodiment of the present application. The computer device includes a processor a01, a network interface a02, a memory (not shown) and a database (not shown) connected by a system bus. Wherein the processor a01 of the computer device is adapted to provide computing and control capabilities. The memory of the computer device includes internal memory a03 and nonvolatile storage medium a04. The nonvolatile storage medium a04 stores an operating system B01, a computer program B02, and a database (not shown in the figure). The internal memory a03 provides an environment for the operation of the operating system B01 and the computer program B02 in the nonvolatile storage medium a04. The network interface a02 of the computer device is used for communication with an external terminal through a network connection. The computer program B02, when executed by the processor a01, implements a video processing method.
It will be appreciated by those skilled in the art that the structure shown in fig. 15 is merely a block diagram of a portion of the structure associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements are applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the video processing apparatus provided by the present application may be implemented in the form of a computer program that is executable on a computer device as shown in fig. 15. The memory of the computer device may store therein respective program modules constituting the video processing apparatus, and a computer program constituted by the respective program modules causes a processor to execute the steps in the video processing method of the respective embodiments of the present application described in the present specification.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer-readable media include both permanent and non-permanent, removable and non-removable media, and information storage may be implemented by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that 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 an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.
Claims (14)
1. A video data processing method, wherein the method is applied to a video data transmitting end, the method comprising:
carrying out Hash operation on video frame data to be transmitted to obtain a Hash value of the video frame data, wherein the video frame data comprises key frames and/or difference frames;
Processing the Hash value of the video frame data to construct a transmitting end data check frame;
and transmitting the video frame data and the transmitting end data check frame to a video data receiving end.
2. The video data processing method according to claim 1, wherein processing the Hash value of the video frame data to construct a sender-side data check frame comprises:
taking a remainder from initial verification data aiming at a Hash value of the video frame data, wherein the initial verification data comprises a plurality of data bits, and an initial value of each data bit is a first character;
changing data bits of the initial verification data corresponding to the remainder into a second character, and keeping the rest data bits as first characters to obtain verification data of the video frame data;
and obtaining a transmitting end data check frame by taking a union set of check data of a plurality of video frame data.
3. The method according to claim 2, wherein obtaining the sender-side data check frame by taking a union of check data of a plurality of the video frame data, comprises:
for the same data bit of the verification data of a plurality of video frame data, when at least one second character exists, changing the corresponding data bit of the initial verification data into the second character;
Repeating the operation until each data bit of the check data is traversed, and taking the changed initial check data as a transmitting end data check frame.
4. The video data processing method according to claim 2, characterized in that the method further comprises:
when two adjacent characters of the data check frame of the transmitting end are different, a break point is arranged between the two adjacent characters so as to divide the data check frame of the transmitting end into at least one section, and the characters of data bits of each section of data check frame are identical;
and converting each section of transmitting end data check frame into codes in the form of < n, v >, and sequentially splicing all the codes to obtain the optimized transmitting end data check frame, wherein n represents the number of first characters or second characters in the section of transmitting end data check frame, and v represents the characters of data bits of the section of transmitting end data check frame.
5. A method for processing video data, the method being applied to a video data receiving end, the method comprising:
receiving video frame data and a transmitting end data check frame sent by a video data transmitting end;
performing Hash operation on the video frame data to obtain a Hash value of the video frame data, wherein the video frame data comprises a key frame and/or a difference frame;
Processing the Hash value of the video frame data to construct a receiving end data check frame;
and comparing the receiving end data check frame with the transmitting end data check frame, and if the receiving end data check frame and the transmitting end data check frame are consistent, determining that the video data is not tampered.
6. The video data processing method according to claim 5, wherein processing the Hash value of the video frame data to construct a receiver-side data check frame comprises:
taking a remainder from initial verification data aiming at a Hash value of the video frame data, wherein the initial verification data comprises a plurality of data bits, and an initial value of each data bit is a first character;
changing data bits of the initial verification data corresponding to the remainder into a second character, and keeping the rest data bits as first characters to obtain verification data of the video frame data;
and obtaining a receiving end data check frame by taking a union set of check data of a plurality of video frame data.
7. The method according to claim 6, wherein the step of obtaining the receiving-side data check frame by taking a union of check data of a plurality of the video frame data, comprises:
for the same data bit of the verification data of a plurality of video frame data, when at least one second character exists, changing the corresponding data bit of the initial verification data into the second character;
Repeating the operation until each data bit of the check data is traversed, and taking the changed initial check data as a receiving end data check frame.
8. The video data processing method according to claim 6, wherein the sender data check frame is an optimized sender data check frame obtained by the video data sender by:
when two adjacent characters of the data check frame of the transmitting end are different, a break point is arranged between the two adjacent characters so as to divide the data check frame into at least one section, and the characters of data bits of each section of data check frame are the same;
converting each section of transmitting end data check frame into codes in the form of < n, v > and sequentially splicing all the codes to obtain an optimized transmitting end data check frame, wherein n represents the number of first characters or second characters in the section of transmitting end data check frame, and v represents the characters of data bits of the section of transmitting end data check frame;
the method further comprises the steps of: and the video data receiving end sequentially restores all codes of the optimized transmitting end data check frame into n v character forms, and splices the n v character forms to obtain the transmitting end data check frame.
9. A video data processing apparatus, for use at a video data transmitting end, comprising:
the verification frame generation module is used for carrying out Hash operation on video frame data to be transmitted so as to obtain a Hash value of the video frame data, wherein the video frame data comprises key frames and/or difference frames; and
processing the Hash value of the video frame data to construct a transmitting end data check frame;
and the data transmission module is used for transmitting the video frame data and the transmitting end data check frame to the video data receiving end.
10. A video data processing apparatus for use in a video data receiving terminal, the apparatus comprising:
the receiving module is used for receiving the video frame data sent by the video data sending end and the sending end data check frame;
the receiving end check frame generation module is used for carrying out Hash operation on the video frame data to obtain a Hash value of the video frame data, wherein the video frame data comprises a key frame and/or a difference frame; and
processing the Hash value of the video frame data to construct a receiving end data check frame;
and the verification module is used for comparing the data check frame of the receiving end with the data check frame of the transmitting end, and determining that the video data is not tampered if the data check frame of the receiving end and the data check frame of the transmitting end are consistent.
11. A video data processing system comprising a video data processing apparatus according to claim 9 applied to a video data transmitting end and a video data processing apparatus according to claim 10 applied to a video data receiving end.
12. A processor configured to perform the video data processing method applied to a video data transmitting end according to any one of claims 1 to 4 or the video data processing method applied to a video data receiving end according to any one of claims 5 to 8.
13. A machine-readable storage medium having instructions stored thereon, which when executed by a processor, cause the processor to be configured to perform the video data processing method applied to a video data transmitting end according to any one of claims 1 to 4 or the video data processing method applied to a video data receiving end according to any one of claims 5 to 8.
14. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the video data processing method applied to a video data transmitting end according to any one of claims 1 to 4 or the video data processing method applied to a video data receiving end according to any one of claims 5 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311270219.9A CN117220856A (en) | 2023-09-27 | 2023-09-27 | Video data processing method, device, system, storage medium and processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311270219.9A CN117220856A (en) | 2023-09-27 | 2023-09-27 | Video data processing method, device, system, storage medium and processor |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117220856A true CN117220856A (en) | 2023-12-12 |
Family
ID=89042361
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311270219.9A Pending CN117220856A (en) | 2023-09-27 | 2023-09-27 | Video data processing method, device, system, storage medium and processor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117220856A (en) |
-
2023
- 2023-09-27 CN CN202311270219.9A patent/CN117220856A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10404467B1 (en) | Blockchain digest augmention of media files including group-of-pictures video streams for MXF files | |
US9009460B2 (en) | Node computing data encryption method | |
US7558954B2 (en) | Method and apparatus for ensuring the integrity of data | |
CN109635586B (en) | Media file encryption key management method, system, device and storage medium | |
US8189776B2 (en) | Method and system for encoding multimedia content based on secure coding schemes using stream cipher | |
WO2016119625A1 (en) | Limited one-way transformation and encryption/decryption application method, device and circuit for gibberish text | |
CN111698576B (en) | Information encryption method, decryption method, server, client, and medium | |
KR20150073753A (en) | Apparatus and methdo for giving the compressed encryption functionality to integer-based homomorphic encryption schemes | |
US7751556B2 (en) | Apparatus and method of generating falsification detecting data of encrypted data in the course of process | |
WO2006001996A1 (en) | Methods and systems for utilizing a single cryptographic integrity check to generate multiple cryptographic integrity check values for components of transcodable content | |
JP2023529948A (en) | System and method for data compression and encryption | |
US8677123B1 (en) | Method for accelerating security and management operations on data segments | |
CN108737353B (en) | Data encryption method and device based on data analysis system | |
CN113051592A (en) | File encryption method and device, electronic equipment and storage medium | |
CN113032810A (en) | Information processing method, information processing apparatus, electronic device, information processing medium, and program product | |
CN117220856A (en) | Video data processing method, device, system, storage medium and processor | |
US20070263876A1 (en) | In-memory compression and encryption | |
Yu et al. | Reversible data hiding with pixel prediction and additive homomorphism for encrypted image | |
Xie et al. | Multimedia data encryption via random rotation in partitioned bit streams | |
CN113704206B (en) | Metadata processing method and device, electronic equipment and storage medium | |
KR101240243B1 (en) | Encryption apparatus and method according to CTR mode of AES(advanced encryption standard) | |
CN115484082A (en) | Data transmission method, data transmission device and server | |
CN111414341B (en) | Data normalization description method in Internet of things environment | |
KR20230086038A (en) | Apparatus and Method for Encrypting and Compressing Image | |
Külekci | An ambiguous coding scheme for selective encryption of high entropy volumes |
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 |