Video recompression forensics method considering the validity of syntax element subtypes
By extracting and analyzing the source matrix and information entropy of the syntax element subtype of the video code stream, the advanced code stream feature matrix is constructed, which solves the problem of low accuracy of video compression forensics in the existing technology, and achieves higher video code streaming Compression forensic accuracy and robustness.
Patent Information
- Application Number
- CN202411079767.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-08-07
AI Technical Summary
The existing video recompression forensics ignores the impact of different grammatical element subtypes on the accuracy of compression forensics, resulting in a low accuracy of video recompression forensics.
By extracting the basic code stream features of the video code stream, determine the subtype source matrix of the brightness domain and chroma domain syntax element, calculate the compression sensitivity and information entropy of each subtype, build a high-level code stream feature matrix, and input the pre-trained Classification model to determine whether the video code stream has been tampered with.
It improves the accuracy and robustness of video compression forensics, can effectively identify whether the video has been tampered with, and is suitable for video code streams such as H.266/VVC, H.265/HEVC, H.264/AVC, etc.
Smart Images

Figure CN118612419B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of video forensics, and in particular relates to a video recompression forensics method considering the validity of syntax element subtypes. Background Art
[0002] With the rapid development of science and technology, the functions of video processing software are constantly enhanced, making it easy to tamper with videos to the extent that it is difficult to detect visually. Video has become one of the important sources of information for people. It is transmitted and stored in the form of compressed code streams on the network, and the compressed code streams are easily stolen and tampered with during transmission. Criminals spread rumors, distort facts, and even erase criminal records on the Internet by tampering with videos, which seriously affects social security. Therefore, it is particularly important to identify the authenticity of videos. During the transmission process, videos need to go through operations such as acquisition, encoding and compression, transmission, storage, decoding, and display. Criminals must decode the compressed code stream into video, and then tamper with the video information and encode it into a compressed code stream again to complete the entire tampering operation. Therefore, the number of encoding compressions corresponding to the compressed code stream has become a necessary condition for detecting whether the video has been tampered with, that is, the tampered video must have been encoded and compressed twice or more. Accordingly, a video recompression forensics method that detects the number of video compressions to identify the authenticity of the video has emerged.
[0003] Currently, some video re-compression forensics methods have been proposed, but these methods still have the following problems: A technical key to video re-compression forensics methods is to extract syntax elements that are closely related to the number of video compressions. Video coding standards correspond to a large number of syntax elements, and each syntax element usually corresponds to many optional subtypes. For example, in the H.266 / VVC standard, the brightness domain coding unit in the video frame corresponds to 17 optional subtypes. The degree of closeness between these subtypes and the number of video compressions is different, but the currently proposed video re-compression forensics methods ignore the different effects of different subtypes on the accuracy of re-compression forensics, which ultimately leads to a low accuracy rate of video re-compression forensics. Summary of the invention
[0004] In order to solve the above problems existing in the prior art, the present invention provides a video recompression forensics method considering the validity of syntax element subtypes. The technical problem to be solved by the present invention is achieved through the following technical solutions:
[0005] A video recompression forensics method considering the validity of syntax element subtypes, comprising:
[0006] S100, for a video bitstream to be tested, executing a syntax element subtype source matrix acquisition step, including: extracting basic bitstream features of the video bitstream, determining a luminance domain syntax element subtype source matrix and a chrominance domain syntax element subtype source matrix; wherein the basic bitstream features include a quantization parameter, a subtype of a chrominance domain coding unit syntax element, and a subtype of a luminance domain coding unit syntax element;
[0007] S200, performing at least one recompression data processing operation on the video bitstream to be tested, including: obtaining a recompressed video bitstream based on the quantization parameter, and performing the syntax element subtype source matrix acquisition step again;
[0008] S300, based on all obtained luminance domain syntax element subtype source matrices, determine the compression sensitivity of each subtype source symbol under each syntax element determined in the luminance domain coding unit; based on all obtained chrominance domain syntax element subtype source matrices, determine the compression sensitivity of each subtype source symbol under each syntax element determined in the chrominance domain coding unit; mix all the compression sensitivities and sort them from high to low to obtain a compression sensitivity sequence;
[0009] S400, based on the obtained luma domain syntax element subtype source matrix, by determining the luma domain syntax element subtype source event distribution matrix, determine the luma domain syntax element subtype average information entropy result; based on the obtained chroma domain syntax element subtype source matrix, by determining the chroma domain syntax element subtype source event distribution matrix, determine the chroma domain syntax element subtype average information entropy result;
[0010] S500, selecting a plurality of compression sensitivities that are ranked first in the compression sensitivity sequence, and using corresponding syntax element subtype average information entropy results to obtain a high-level bitstream feature matrix;
[0011] S600, inputting the high-level bitstream feature matrix into a pre-trained classification model, and outputting a re-compression forensic result of the video bitstream to be tested, so as to indicate whether the video bitstream to be tested has been tampered with.
[0012] Beneficial effects of the present invention:
[0013] In the solution provided by the embodiment of the present invention, the influence of different bit rate partitions and syntax element subtypes on the accuracy of forensics is considered, and an effective video recompression forensics method is provided. By determining the source event distribution matrix of the syntax element subtype in the luminance domain and chrominance domain, determining the average information entropy results of the syntax element subtype in the luminance domain and chrominance domain, determining the compression sensitivity of each subtype source symbol under each syntax element determined in the luminance domain and chrominance domain coding units, and determining the compression sensitivity sequence, the problem that the existing video recompression forensics method ignores the different influences of different subtypes on the accuracy of recompression forensics is solved. The advanced bitstream feature matrix of the present invention solves the problem of low accuracy of the video recompression forensics method. The present invention has the advantages of high accuracy and robustness of video recompression forensics, and can be used in the field of video bitstream recompression forensics technology that supports coding unit syntax element subtype technical standards such as H.266 / VVC, H.265 / HEVC, and H.264 / AVC. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 A flowchart of a video recompression forensics method considering the validity of syntax element subtypes provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0015] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.
[0016] The embodiment of the present invention provides a video recompression evidence collection method considering the validity of syntax element subtypes, such as Figure 1 As shown, the method may include the following steps S100 to S600:
[0017] S100, for a video bitstream to be tested, executing a syntax element subtype source matrix acquisition step, including: extracting basic bitstream features of the video bitstream, determining a luminance domain syntax element subtype source matrix and a chrominance domain syntax element subtype source matrix; wherein the basic bitstream features include a quantization parameter, a subtype of a chrominance domain coding unit syntax element, and a subtype of a luminance domain coding unit syntax element;
[0018] In the embodiment of the present invention, the extraction of basic bitstream features of the video bitstream can be implemented using existing decoding analysis software, which will not be described in detail herein.
[0019] Those skilled in the art can understand that there can be multiple syntax elements for both chroma domain coding units and luma domain coding units, and each syntax element can have multiple subtypes. The embodiment of the present invention uses the extracted subtypes of the chroma domain coding unit syntax elements and the subtypes of the luma domain coding unit syntax elements as determined subtypes for subsequent processing.
[0020] For ease of understanding, Table 1 shows the types of syntax elements extracted from the luminance domain coding unit. The types of syntax elements extracted from the luminance domain coding unit of the video bitstream are numbered as follows: express, Different values represent different types of syntax elements. For the types of syntax elements extracted from the chrominance domain coding unit, for the number There are also the same contents as shown in Table 1.
[0021] Table 1 Examples of types of syntax elements extracted from luma domain coding units
[0022]
[0023] Wherein, in the syntax element subtype source matrix acquisition step, determining the luminance domain syntax element subtype source matrix includes:
[0024] 1) For the first Numbering each syntax element extracted from the brightness domain coding unit of the predicted frame, and numbering the subtype of each syntax element;
[0025] The embodiment of the present invention processes each prediction frame separately.
[0026] 2) after normalizing the subtypes of the syntax elements in the luminance domain coding unit according to the preset minimum unit, determining the luminance domain syntax element subtype source matrix according to the first formula;
[0027] The purpose of normalization is to unify the data dimension and facilitate subsequent data processing. The preset minimum unit is expressed as:
[0028] (1);
[0029] in, Indicates the length of the minimum unit of the preset, , is the length of the predicted frame of the video code stream; Indicates the width of the preset minimum unit, , is the width of the prediction frame of the video bitstream. It should be noted that, for the video bitstream to be tested, all the prediction frames have the same length and the same width.
[0030] Wherein, the first formula is expressed as:
[0031] (2);
[0032] in, Indicates the number of the predicted frame in the video stream. ; is the total number of predicted frames of the video stream, is a finite positive integer; Indicates the type of syntax element extracted from the luma domain coding unit of the video bitstream. , Indicates the total number of syntax element types extracted from the luma domain coding unit of the video bitstream. is a finite positive integer; and Subscript Indicates the number of times the video stream has been compressed. The number of times the syntax element subtype source matrix acquisition step has been executed is the same; Indicates the number of compressions When the video stream Luma domain coding unit in the predicted frame A luminance domain syntax element subtype source matrix corresponding to the syntax element; express Elements in Indicates the number of compressions When the video stream In the predicted frame, the coordinate The luminance domain coding unit at In the syntax element, the subtype number is The source symbol of Indicates the luminance domain coding unit of the video bitstream The number of subtypes in the syntax element, , Indicates the value of the luminance domain coding unit syntax element subtype number supported by the video coding standard. is a finite positive integer, and Represents the coordinates of the source symbol; is a natural number greater than or equal to 1;
[0033] Similarly, in the syntax element subtype source matrix acquisition step, determining the chrominance domain syntax element subtype source matrix includes:
[0034] 1) For the first Numbering each syntax element extracted from the chrominance domain coding unit of the predicted frame, and numbering the subtype of each syntax element;
[0035] 2) After normalizing the subtype of the syntax element in the chrominance domain coding unit according to the preset minimum unit, determine the chrominance domain syntax element subtype source matrix according to the second formula; wherein the second formula is expressed as:
[0036] (3);
[0037] in, The number of the syntax element type extracted from the chroma domain coding unit of the video bitstream. , Indicates the total number of syntax element types extracted from the chroma domain coding unit of the video bitstream. is a finite positive integer; and Subscript Indicates the number of times the video stream has been compressed. The number of times the syntax element subtype source matrix acquisition step has been executed is the same; Indicates the number of compressions When the video stream Chroma domain coding unit in the predicted frame A chrominance domain syntax element subtype source matrix corresponding to the syntax element; express Elements in Indicates the number of compressions When the video stream In the predicted frame, the coordinate The chroma domain coding unit at In the syntax element, the subtype number is The source symbol of Indicates the chroma domain coding unit of the video stream The number of subtypes in the syntax element, , Indicates the value of the chroma domain coding unit syntax element subtype number supported by the video coding standard. is a finite positive integer.
[0038] Since the video code stream to be tested is compressed, the syntax element subtype source matrix acquisition step is performed in S100 to obtain the luminance domain syntax element subtype source matrix and chrominance domain syntax element subtype source matrix hour, The value is 1.
[0039] Through formula (2) and formula (3), for each predicted frame, in the luminance domain, for each syntax element, a luminance domain syntax element subtype source matrix can be obtained: ; For each predicted frame, in the chrominance domain, a chrominance domain syntax element subtype source matrix can be obtained for each syntax element .
[0040] S200, performing at least one recompression data processing operation on the video bitstream to be tested, including: obtaining a recompressed video bitstream based on the quantization parameter, and performing the syntax element subtype source matrix acquisition step again;
[0041] In S200, based on the quantization parameter, obtaining a re-compressed video stream includes:
[0042] 1) Use the codec software recommended by the video coding standard to decode the current video stream to obtain the decoded video;
[0043] 2) Compressing the current decoded video using the quantization parameter to obtain a re-compressed video stream corresponding to the video stream to be tested.
[0044] It should be noted that each time the recompression data processing operation is performed, the latest video code stream before the operation is performed is processed. Through such repeated recompression processing, the video code stream to be tested can be recompressed at least once. The number of times the recompression data processing operation is performed can be selected as needed.
[0045] Each time after obtaining the re-compressed video code stream, the syntax element subtype source matrix acquisition step is performed again, so the luminance domain syntax element subtype source matrix is obtained through formula (2) and formula (3): and chrominance domain syntax element subtype source matrix , the difference is that, as the number of times the syntax element subtype source matrix acquisition step is performed is different, The value of changes, for example, after the first recompression data processing operation, the obtained and middle The value of is 2, so for the video code stream to be tested that has already been compressed, performing the recompression data processing operation again is equivalent to compressing it for the second time, so The number of compressions indicated is 2.
[0046] Specifically, the syntax element subtype source matrix acquisition step is performed for the first time, and the luminance domain syntax element subtype source matrix is obtained by formula (2) and formula (3): , the chrominance domain syntax element subtype source matrix is ;
[0047] In order to distinguish the subtypes, the syntax element subtype source matrix acquisition step is performed for the second time. By using formula (2) and formula (3), the luminance domain syntax element subtype source matrix is obtained as follows: , the chrominance domain syntax element subtype source matrix is ; ; .
[0048] The present invention performs at least one recompression data processing operation in order to compare the changes between two consecutive compressed video code streams and take this change as a feature.
[0049] S300, based on all obtained luminance domain syntax element subtype source matrices, determine the compression sensitivity of each subtype source symbol under each syntax element determined in the luminance domain coding unit; based on all obtained chrominance domain syntax element subtype source matrices, determine the compression sensitivity of each subtype source symbol under each syntax element determined in the chrominance domain coding unit; mix all the compression sensitivities and sort them from high to low to obtain a compression sensitivity sequence;
[0050] In S300, the calculation formulas for the compression sensitivity of each sub-type source symbol under each syntax element determined in the luma domain coding unit and the compression sensitivity of each sub-type source symbol under each syntax element determined in the chroma domain coding unit are respectively:
[0051] (4);
[0052] (5);
[0053] in,
[0054] (6);
[0055] (7);
[0056] in, Indicates the first Syntax element with subtype number The compression sensitivity of the source symbols; Indicates the chroma domain coding unit Syntax element with subtype number The compression sensitivity of the source symbols; Represents the brightness domain; Represents the chromaticity domain; Indicates the total number of times the video code stream to be tested has been compressed, which is consistent with the total number of times the syntax element subtype source matrix acquisition step is executed. Indicates the current number of compressions. , Indicates the number of compressions When Syntax element with subtype number The source symbol and The average ratio of all subtypes of syntactic elements, Indicates the number of compressions When the chroma domain coding unit is Syntax element with subtype number The source symbol and The average ratio of all subtypes of syntactic elements, Indicates the number of compressions At that time, In the luminance domain coding unit of the predicted frame, the Syntax element with subtype number The total number of source symbols, is a finite positive integer, Indicates the number of compressions At that time, In the chroma domain coding unit of the predicted frame, the Syntax element with subtype number The total number of source symbols, is a finite positive integer.
[0057] Since different syntax element subtypes respond differently to changes before and after video bitstream compression, the embodiment of the present invention introduces the concept of compression sensitivity, which fully considers the effectiveness of syntax element subtypes in the compression process, so as to accurately perform heavy compression forensics detection. Specifically, the formula for calculating compression sensitivity of the present invention adopts the formula for calculating variance. The smaller the variance of the subtype (that is, the compression sensitivity), the smaller the impact of the number of compressions on the degree of change of the subtype, the less obvious the traces left by the compression, and the less easy it is for the classifier to classify. This will increase the difficulty of classification for the classifier and affect the classification effect. The greater the compression sensitivity, the greater the impact of the number of compressions on the degree of change of the subtype, the more obvious the traces left by the compression, and the easier it is for the classifier to classify. It is an optional subtype for heavy compression forensics.
[0058] The purpose of sorting in the embodiment of the present invention is to obtain multiple higher values among all compression sensitivities;
[0059] In S300, the compression sensitivity sequence is expressed as:
[0060] (8);
[0061] in, represents the value of the quantization parameter; Represents the quantization parameter Corresponding compression sensitivity sequence; for different video streams to be tested, , Indicates the value of the quantization parameter supported by the video coding standard. is a finite positive integer; express The element in is the sequence number in the compressed sensitivity sequence The compression sensitivity of the syntax element subtype source symbol, , Represents the total number of all subtypes in the compression sensitivity sequence, is a finite positive integer.
[0062] In the embodiment of the present invention, all compression sensitivities obtained in the luminance domain and the chrominance domain are mixed and sorted from high to low to obtain a compression sensitivity sequence, so as to subsequently find out the syntax element subtypes corresponding to multiple values with higher compression sensitivities.
[0063] In practical applications, due to the different video bitstreams to be tested, the quantization parameters For ease of understanding, the following As an example, the table corresponding to the compression sensitivity sequence is given. , the table is the same. See Table 2 for details. In practice, there are Examples are not given here.
[0064] Table 2 Compression sensitivity ranking of all subtypes of color and brightness domain division shapes and prediction modes
[0065]
[0066]
[0067]
[0068]
[0069]
[0070]
[0071] For Table 2, each The three subscripts indicate the subtype number, whether it belongs to the luminance domain or the chrominance domain, and the type of syntax element; represents the brightness domain; Indicates the chrominance domain; please refer to Table 1 for the types of syntax elements. When the third value of the subscript is 2, it means that the syntax element type is prediction mode. When the syntax element type in the luminance domain coding unit of the video bitstream is prediction mode, the value range of the subtype number is , when the syntax element type in the chrominance domain coding unit of the video bitstream is the prediction mode, the value range of the subtype number is .each When the third value of the subscript is 1, it means that the syntax element type is a partition shape. When the syntax element type in the luminance domain coding unit of the video bitstream is a partition shape, the value range of the subtype number is , when the syntax element type in the chroma domain coding unit of the video bitstream is a partition shape, the value range of the subtype number is .
[0072] S400, based on the obtained luma domain syntax element subtype source matrix, by determining the luma domain syntax element subtype source event distribution matrix, determine the luma domain syntax element subtype average information entropy result; based on the obtained chroma domain syntax element subtype source matrix, by determining the chroma domain syntax element subtype source event distribution matrix, determine the chroma domain syntax element subtype average information entropy result;
[0073] S400 and S300 may be executed in any order and in parallel. Figure 1 Take S300 in front and S400 in the back as an example.
[0074] S400, including:
[0075] S410, for the number of compressions and , respectively using the obtained luminance domain syntax element subtype source matrix to calculate the corresponding luminance domain syntax element subtype source event distribution matrix, and respectively using the obtained chrominance domain syntax element subtype source matrix to calculate the corresponding chrominance domain syntax element subtype source event distribution matrix;
[0076] S420, using the calculated brightness domain syntax element subtype source event distribution matrix, calculate the number of compressions: and The corresponding luminance domain syntax element subtype average information entropy, and the calculated chrominance domain syntax element subtype source event distribution matrix, calculate the number of compressions: and The average information entropy of the chrominance domain syntax element subtype corresponding to the time;
[0077] S430, after all the compression times are traversed, the average value of the average information entropy of all luminance domain syntax element subtypes is calculated as the average information entropy result of the luminance domain syntax element subtype, and the average value of the average information entropy of all chrominance domain syntax element subtypes is calculated as the average information entropy result of the chrominance domain syntax element subtype.
[0078] In the embodiment of the present invention, Initially, for a group consisting of two adjacent compressed times, S410 to S420 are executed to obtain the corresponding luminance domain syntax element subtype average information entropy and chrominance domain syntax element subtype average information entropy, and then the luminance domain syntax element subtype average information entropy obtained from all traversed groups is averaged as the luminance domain syntax element subtype average information entropy result, and the chrominance domain syntax element subtype average information entropy obtained from all traversed groups is averaged as the chrominance domain syntax element subtype average information entropy result.
[0079] Specifically, in S410, for the number of compressions and When , the corresponding luminance domain syntax element subtype source event distribution matrix is calculated using the obtained luminance domain syntax element subtype source matrix, which is expressed as:
[0080] (9);
[0081] (10);
[0082] in, Indicates the number of compressions When the video stream In the predicted frames, at each coordinate The luminance domain coding unit at In the syntax element, the subtype number is The source event distribution matrix; Indicates the number of compressions When the video stream In the prediction frames, the same coordinate The luminance domain coding unit at In this syntax element, the subtype number is determined by becomes The source event distribution matrix; express The elements in Each element in corresponds to a different coordinate ,against The elements in , , is the length of the predicted frame of the video code stream, is the width of the predicted frame of the video code stream; Indicates the number of compressions When the luminance domain syntax element subtype source matrix The corresponding element the events that occurred; express The elements in Each element in corresponds to a different coordinate ,against The elements in , ; Indicates the number of compressions When the contrast brightness domain syntax element subtype source matrix and At the same coordinates Element and The number is determined by becomes events; ; represents the brightness domain;
[0083] It should be noted that Represents different coordinates of a predicted frame Type No. The source event matrix, It is changing, not a certain coordinate The source event matrix, It is a different location Corresponding constituted. Represents a predicted frame and Same coordinates The subtype number is becomes The source event matrix, It is changing, not a certain coordinate The source event matrix, It is a different location Corresponding constituted.
[0084] Similarly, for the number of compressions and When , the corresponding chrominance domain syntax element subtype source event distribution matrix is calculated using the obtained chrominance domain syntax element subtype source matrix, which is expressed as:
[0085] (11);
[0086] (12);
[0087] in, Indicates the number of compressions When the video stream In the predicted frames, at each coordinate The chroma domain coding unit at In the syntax element, the subtype number is The source event distribution matrix; Indicates the number of compressions When the video stream In the prediction frames, the same coordinate The chroma domain coding unit at In this syntax element, the subtype number is determined by becomes The source event distribution matrix; express The elements in The elements in correspond to different coordinates ,against The elements in , , is the length of the predicted frame of the video code stream, is the width of the predicted frame of the video code stream; Indicates the number of compressions When the chrominance domain syntax element subtype source matrix The corresponding element the events that occurred; express The elements in Each element in corresponds to a different coordinate ,against The elements in , ; Indicates the number of compressions When comparing the chrominance domain syntax element subtype source matrix and At the same coordinates Element and The number is determined by becomes events; ; Indicates the chromaticity domain.
[0088] Likewise, Represents different coordinates of a predicted frame Type No. The source event matrix, It is changing, not a certain coordinate The source event matrix, It is a different location Corresponding constituted. Represents a predicted frame and Same coordinates The subtype number is becomes The source event matrix, It is changing, not a certain coordinate The source event matrix, It is a different location Corresponding constituted.
[0089] In S420, the calculated brightness domain syntax element subtype source event distribution matrix is used to calculate the number of compressions: and The corresponding average information entropy of the luminance domain syntax element subtype is expressed as:
[0090] (13);
[0091] in,
[0092] (14);
[0093] (15);
[0094] in, Indicates the number of compressions and The corresponding The subtype number in this syntax element is Average information entropy of the luminance domain syntax element subtype; Indicates an event Number of occurrences; Indicates an event The number of occurrences, and are all finite positive integers; is the length of the predicted frame of the video stream, is the width of the predicted frame of the video code stream;
[0095] It should be noted that, in the embodiment of the present invention, for formula (14), each position There will be an event The count is 1, by calculating the different positions The sum of Can represent events The total number of occurrences; the calculation of formula (15) is similar.
[0096] Similarly, using the calculated chrominance domain syntax element subtype source event distribution matrix, the number of compressions is calculated as and The corresponding chrominance domain syntax element subtype average information entropy is expressed as:
[0097] (16);
[0098] in,
[0099] (17);
[0100] (18);
[0101] in, Indicates the number of compressions and The corresponding The subtype number in this syntax element is The average information entropy of the chroma domain syntax element subtype; Indicates an event Number of occurrences; Indicates an event The number of occurrences, and are all finite positive integers.
[0102] It should be noted that, in the embodiment of the present invention, for formula (17), each position There will be an event The count is 1, by calculating the different positions The sum of Can represent events The total number of occurrences; the calculation of formula (18) is similar.
[0103] In an optional embodiment It can be 2, that is, only one recompression data processing operation is performed. Therefore, according to formulas (9) and (10), the corresponding luminance domain syntax element subtype source event distribution matrix is expressed as:
[0104] (19);
[0105] (20);
[0106] According to formulas (11) and (12), the corresponding chrominance domain syntax element subtype source event distribution matrix is expressed as:
[0107] (twenty one);
[0108] (twenty two);
[0109] According to formulas (13) to (15), the corresponding average information entropy of the luminance domain syntax element subtype is expressed as:
[0110] (twenty three);
[0111] in,
[0112] (twenty four);
[0113] (25);
[0114] According to formulas (16) to (18), the corresponding chrominance domain syntax element subtype average information entropy is expressed as:
[0115] (26);
[0116] in,
[0117] (27);
[0118] (28);
[0119] S500, selecting a plurality of compression sensitivities that are ranked first in the compression sensitivity sequence, and using corresponding syntax element subtype average information entropy results to obtain a high-level bitstream feature matrix;
[0120] In S500, the high-level code stream feature matrix is expressed as:
[0121] (29);
[0122] in, express Center front The average information entropy result of the syntax element subtype corresponding to the compression sensitivity is: That is, S500 selects the first one in the compression sensitivity sequence. Compression sensitivity.
[0123] In the embodiment of the present invention, for different executions of the video recompression evidence collection method considering the validity of the syntax element subtype, due to the different video bit streams to be tested, the quantization parameters Different, you can set a corresponding Therefore, when using it, you can use the pre-built quantization parameters and The corresponding relationship between Value. Quantization parameter The compression sensitivity of the syntax element subtype is different, so is a variable, which can avoid the problem of inaccurate classification caused by using grammatical element subtypes with low compression sensitivity for training, and also avoid the waste of resources caused by data redundancy.
[0124] As an example, when 1≤ <26, =20; when 26≤ <40, =30; when 41≤ < , =100.
[0125] In the prior art, for the advanced code stream feature matrix, a commonly used approach is to regard all subtypes of the basic code stream feature as a whole to construct the advanced code stream feature. The embodiment of the present invention uses the average information entropy results of the syntax element subtypes with higher compression sensitivity to construct the advanced code stream feature matrix. Compared with the prior art, the forensic results of the present invention are more accurate and robust, and the problem of waste of redundant information resources is avoided.
[0126] S600, inputting the high-level bitstream feature matrix into a pre-trained classification model, and outputting a re-compression forensic result of the video bitstream to be tested, so as to indicate whether the video bitstream to be tested has been tampered with.
[0127] The classification model in the embodiment of the present invention can be implemented by using any existing open source model for classification, and is not limited here.
[0128] For example, in an optional implementation, the classification model can be a support vector machine model, which is a classifier. It is trained using a sample high-level code stream feature matrix with label information, and the label information represents whether the sample video code stream corresponding to the sample high-level code stream feature matrix has been tampered with. The specific training process can be understood by referring to the relevant technology and will not be explained here. The trained support vector machine model can output a binary classification data, such as 0 and 1, and the corresponding confidence probability values of 0 and 1 for the input high-level code stream feature matrix. 0 can indicate that the video code stream corresponding to the input high-level code stream feature matrix has not been tampered with, and 1 can indicate that the video code stream corresponding to the input high-level code stream feature matrix has been tampered with. The binary classification data represents the recompression forensics result of the video code stream.
[0129] Table 3 shows the evidence collection accuracy results of the method of the present invention.
[0130] Table 3 The accuracy of evidence collection of the method of the present invention
[0131]
[0132] In the solution provided by the embodiment of the present invention, the influence of different bit rate partitions and syntax element subtypes on the accuracy of forensics is considered, and an effective video recompression forensics method is provided. By determining the source event distribution matrix of the syntax element subtype in the luminance domain and chrominance domain, determining the average information entropy results of the syntax element subtype in the luminance domain and chrominance domain, determining the compression sensitivity of each subtype source symbol under each syntax element determined in the luminance domain and chrominance domain coding units, and determining the compression sensitivity sequence, the problem that the existing video recompression forensics method ignores the different influences of different subtypes on the accuracy of recompression forensics is solved. The advanced bitstream feature matrix of the present invention solves the problem of low accuracy of the video recompression forensics method. The present invention has the advantages of high accuracy and robustness of video recompression forensics, and can be used in the field of video bitstream recompression forensics technology that supports coding unit syntax element subtype technical standards such as H.266 / VVC, H.265 / HEVC, and H.264 / AVC.
[0133] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A video recompression forensics method considering the validity of syntax element subtypes, characterized in that: include: S100, for the video bitstream to be tested, executing the syntax element subtype source matrix acquisition step, including: extracting the basic bitstream features of the video bitstream, determining the luminance domain syntax element subtype source matrix and the chrominance domain syntax element subtype source matrix; wherein the basic bitstream features include quantization parameters, subtypes of chrominance domain coding unit syntax elements, and subtypes of luminance domain coding unit syntax elements; chrominance domain coding unit syntax elements include partition shape, prediction mode, bit depth, motion vector, multi-core transform selection, sub-block transform, and transform coefficient; luminance domain coding unit syntax elements include partition shape, prediction mode, multiple reference rows, bit depth, motion vector, multi-core transform selection, sub-block transform, and transform coefficient; S200, performing at least one recompression data processing operation on the video bitstream to be tested, including: obtaining a recompressed video bitstream based on the quantization parameter, and performing the syntax element subtype source matrix acquisition step again; S300, based on the obtained sub-type source matrices of all luma domain syntax elements, determine the compression sensitivity of each sub-type source symbol under each syntax element determined in the luma domain coding unit; based on the obtained sub-type source matrices of all chroma domain syntax elements, determine the compression sensitivity of each sub-type source symbol under each syntax element determined in the chroma domain coding unit; after mixing all the compression sensitivities, sort them from high to low to obtain a compression sensitivity sequence; wherein, the calculation formulas for the compression sensitivity of each sub-type source symbol under each syntax element determined in the luma domain coding unit and the compression sensitivity of each sub-type source symbol under each syntax element determined in the chroma domain coding unit are respectively: ; ; in, ; ; in, Indicates the first Syntax element with subtype number The compression sensitivity of the source symbols; Indicates the chroma domain coding unit Syntax element with subtype number The compression sensitivity of the source symbols; Represents the brightness domain; Represents the chromaticity domain; Indicates the total number of times the video code stream to be tested has been compressed, which is consistent with the total number of times the syntax element subtype source matrix acquisition step is executed. Indicates the current number of compressions. , Indicates the number of compressions When Syntax element with subtype number The source symbol and The average ratio of all subtypes of syntactic elements, Indicates the number of compressions When the chroma domain coding unit is Syntax element with subtype number The source symbol and The average ratio of all subtypes of syntactic elements, Indicates the number of compressions At that time, In the luminance domain coding unit of the predicted frame, the Syntax element with subtype number The total number of source symbols, is a finite positive integer, Indicates the number of compressions At that time, In the chroma domain coding unit of the predicted frame, the Syntax element with subtype number The total number of source symbols, is a finite positive integer; is the total number of predicted frames of the video stream, is a finite positive integer; Indicates the number of the predicted frame in the video bitstream. ; Indicates the value of the subtype number of the luminance domain coding unit syntax element supported by the video coding standard; Indicates the value of the chroma domain coding unit syntax element subtype number supported by the video coding standard; The compression sensitivity sequence is expressed as follows: ; in, represents the value of the quantization parameter; Represents the quantization parameter Corresponding compression sensitivity sequence; for different video streams to be tested, , Indicates the value of the quantization parameter supported by the video coding standard. is a finite positive integer; express The element in is the sequence number in the compressed sensitivity sequence The compression sensitivity of the syntax element subtype source symbol, , Represents the total number of all subtypes in the compression sensitivity sequence, is a finite positive integer; S400, based on the obtained luma domain syntax element subtype source matrix, by determining the luma domain syntax element subtype source event distribution matrix, determine the luma domain syntax element subtype average information entropy result; based on the obtained chroma domain syntax element subtype source matrix, by determining the chroma domain syntax element subtype source event distribution matrix, determine the chroma domain syntax element subtype average information entropy result; wherein S400 includes: S410, for the number of compressions and When , the corresponding luminance domain syntax element subtype source event distribution matrix is calculated using the obtained luminance domain syntax element subtype source matrix, which is expressed as: ; ; in, Indicates the number of compressions When the video stream In the predicted frames, at each coordinate The luminance domain coding unit at In the syntax element, the subtype number is The source event distribution matrix; Indicates the number of compressions When the video stream In the prediction frames, the same coordinate The luminance domain coding unit at In this syntax element, the subtype number is determined by becomes The source event distribution matrix; express The elements in Each element in corresponds to a different coordinate ,against The elements in , , is the length of the predicted frame of the video stream, is the width of the predicted frame of the video code stream; Indicates the number of compressions When the luminance domain syntax element subtype source matrix The corresponding element the events that occurred; express The elements in Each element in corresponds to a different coordinate ,against The elements in , ; Indicates the number of compressions When the contrast luminance domain syntax element subtype source matrix and At the same coordinates Element and The number is determined by becomes events; ; represents the brightness domain; And, the obtained chrominance domain syntax element subtype source matrix is used to calculate the corresponding chrominance domain syntax element subtype source event distribution matrix, which is expressed as: ; ; in, Indicates the number of compressions When the video stream In the predicted frames, at each coordinate The chroma domain coding unit at In the syntax element, the subtype number is The source event distribution matrix; Indicates the number of compressions When the video stream In the prediction frames, the same coordinate The chroma domain coding unit at In this syntax element, the subtype number is determined by becomes The source event distribution matrix; express The elements in The elements in correspond to different coordinates ,against The elements in , , is the length of the predicted frame of the video stream, is the width of the predicted frame of the video code stream; Indicates the number of compressions When the chrominance domain syntax element subtype source matrix The corresponding element the events that occurred; express The elements in Each element in corresponds to a different coordinate ,against The elements in , ; Indicates the number of compressions When comparing the chrominance domain syntax element subtype source matrix and At the same coordinates Element and The number is determined by becomes events; ; Represents the chromaticity domain; S420, using the calculated brightness domain syntax element subtype source event distribution matrix, calculate the number of compressions: and The corresponding average information entropy of the luminance domain syntax element subtype is expressed as: ; in, ; ; in, Indicates the number of compressions and The corresponding The subtype number in this syntax element is Average information entropy of the luminance domain syntax element subtype; Indicates an event Number of occurrences; Indicates an event The number of occurrences, and are all finite positive integers; is the length of the predicted frame of the video stream, is the width of the predicted frame of the video code stream; And, using the calculated chrominance domain syntax element subtype source event distribution matrix, calculate the number of compressions: and The corresponding chrominance domain syntax element subtype average information entropy is expressed as: ; in, ; ; in, Indicates the number of compressions and The corresponding The subtype number in this syntax element is The average information entropy of the chroma domain syntax element subtype; Indicates an event Number of occurrences; Indicates an event The number of occurrences, and are all finite positive integers; S430, after all the compression times are traversed, the average value of the average information entropies of all the luminance domain syntax element subtypes is calculated as the average information entropy result of the luminance domain syntax element subtype, and the average value of the average information entropies of all the chrominance domain syntax element subtypes is calculated as the average information entropy result of the chrominance domain syntax element subtype; S500, selecting a plurality of compression sensitivities that are ranked first in the compression sensitivity sequence, and using the corresponding syntax element subtype average information entropy results to obtain a high-level bitstream feature matrix; the high-level bitstream feature matrix is expressed as: ; in, express Center front The average information entropy result of the syntax element subtype corresponding to the compression sensitivity is: ; S600, inputting the high-level bitstream feature matrix into a pre-trained classification model, and outputting a re-compression forensic result of the video bitstream to be tested, so as to indicate whether the video bitstream to be tested has been tampered with.
2. The video recompression forensics method considering the validity of syntax element subtypes according to claim 1, characterized in that: In the syntax element subtype source matrix acquisition step, determining the luminance domain syntax element subtype source matrix includes: For the first Numbering each syntax element extracted from the brightness domain coding unit of the predicted frame, and numbering the subtype of each syntax element; After normalizing the subtype of the syntax element in the luminance domain coding unit according to the preset minimum unit, the luminance domain syntax element subtype source matrix is determined according to the first formula; wherein the first formula is expressed as: ; in, ; Indicates the type of syntax element extracted from the luma domain coding unit of the video bitstream. , Indicates the total number of syntax element types extracted from the luma domain coding unit of the video bitstream. is a finite positive integer; and Subscript Indicates the number of times the video stream has been compressed. The number of times the syntax element subtype source matrix acquisition step has been executed is the same; Indicates the number of compressions When the video stream Luma domain coding unit in the predicted frame A luminance domain syntax element subtype source matrix corresponding to the syntax element; express Elements in Indicates the number of compressions When the video stream In the predicted frame, the coordinate The luminance domain coding unit at In the syntax element, the subtype number is The source symbol of Indicates the luminance domain coding unit of the video bitstream The number of subtypes in the syntax element, , is a finite positive integer, and Represents the coordinates of the source symbol; is a natural number greater than or equal to 1; In the syntax element subtype source matrix acquisition step, determining the chrominance domain syntax element subtype source matrix includes: For the first Numbering each syntax element extracted from the chrominance domain coding unit of the predicted frame, and numbering the subtype of each syntax element; After normalizing the subtype of the syntax element in the chrominance domain coding unit according to the preset minimum unit, the chrominance domain syntax element subtype source matrix is determined according to the second formula; wherein the second formula is expressed as: ; in, The number of the syntax element type extracted from the chroma domain coding unit of the video bitstream. , Indicates the total number of syntax element types extracted from the chroma domain coding unit of the video bitstream. is a finite positive integer; and Subscript Indicates the number of times the video stream has been compressed. The number of times the syntax element subtype source matrix acquisition step has been executed is the same; Indicates the number of compressions When the video stream Chroma domain coding unit in the predicted frame A chrominance domain syntax element subtype source matrix corresponding to the syntax element; express Elements in Indicates the number of compressions When the video stream In the predicted frame, the coordinate The chroma domain coding unit at In the syntax element, the subtype number is The source symbol of Indicates the chroma domain coding unit of the video stream The number of subtypes in the syntax element, , is a finite positive integer.
3. The video recompression forensics method considering the validity of syntax element subtypes according to claim 2, characterized in that: The preset minimum unit is expressed as: ; in, Indicates the length of the minimum unit of the preset, , is the length of the predicted frame of the video code stream; Indicates the width of the preset minimum unit, , The width of the predicted frame of the video stream.
4. The video recompression forensics method considering the validity of syntax element subtypes according to claim 2, characterized in that: In S200, based on the quantization parameter, obtaining a re-compressed video stream includes: Use the codec software recommended by the video coding standard to decode the current video code stream to obtain a decoded video; The currently decoded video is compressed using the quantization parameter to obtain a re-compressed video stream corresponding to the video stream to be tested.
