Video publishing method and device, electronic equipment and storage medium

By performing summary calculation and signature processing on the original video and combining it with the publisher's identity information, the problem of low reliability of video publishing is solved, and the reliability and anti-counterfeiting ability of video content are improved.

CN115550730BActive Publication Date: 2025-10-17SUZHOU KEDA TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211181374.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-27
Publication Date
2025-10-17
Estimated Expiration
2042-09-27

AI Technical Summary

Technical Problem

Existing video publishing methods cannot effectively guarantee the reliability of video content and are easily tampered with and forged.

Method used

By performing summary calculation on the original video, a video summary indicator is generated, and the signature is processed in combination with the publisher's identity information. It is then encoded into the video bitstream to form a signature reference summary to ensure the reliability and anti-counterfeiting ability of the video content.

Benefits of technology

It improves the reliability and anti-counterfeiting ability of video publishing, while maintaining the public accessibility of video content, reducing the amount of data and improving publishing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115550730B_ABST
    Figure CN115550730B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of video processing, and particularly relates to a video publishing method and device, electronic equipment and storage medium, the method comprising: obtaining an original video of a to-be-published video and publisher identity information of the to-be-published video; performing abstract calculation on the content of the original video to determine a video abstract index; determining a reference abstract based on the publisher identity information and the video abstract index, and signing the reference abstract to obtain a digital signature; splicing the reference abstract and the digital signature to determine a signed reference abstract; and encoding the signed reference abstract into a video bitstream of the to-be-published video to determine and publish a target published video, wherein the video bitstream is a compressed and encoded bitstream of the to-be-published video. An image has an invariant quantity associated therewith, and abstract calculation based on the invariant quantity can ensure the reliability of the video abstract index; meanwhile, the publisher identity information is combined to enable the published video to carry the identity mark of the publisher, thereby having good anti-counterfeiting capability.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of video processing, and in particular to a video publishing method and device, an electronic device and a storage medium. BACKGROUND

[0002] With the gradual widespread application of intelligent technology in the video field, current intelligent video compilation technology can already edit videos, and it is very difficult to distinguish the authenticity of video content by naked eyes. For example, by obtaining several photos and a reference video, a person in the photos can perform imitation according to a predetermined role in the reference video to generate content in the reference video, thereby generating untrustworthy video content about the person in the photos. Therefore, the reliability of the published video by the existing method is low. SUMMARY

[0003] In view of this, the embodiments of the present application provide a video publishing method and device, an electronic device and a storage medium to improve the reliability of published videos.

[0004] According to a first aspect, the embodiments of the present application provide a video publishing method, comprising:

[0005] obtaining an original video of a to-be-published video and publisher identity information of the to-be-published video;

[0006] performing abstract calculation on the content of the original video to determine a video abstract index;

[0007] determining a reference abstract based on the publisher identity information and the video abstract index, and signing the reference abstract to obtain a digital signature;

[0008] splicing the reference abstract and the digital signature to determine a signed reference abstract;

[0009] encoding the signed reference abstract into a video bitstream of the to-be-published video to determine and publish a target published video, wherein the video bitstream is a bitstream after compression and encoding of the to-be-published video.

[0010] In the video publishing method provided by the embodiment of the present invention, the original video can be regarded as a sequence of images at continuous video points. Since the images have their own unique content, each image can obtain a certain invariant with respect to its content through mathematical calculation. That is, there are invariants associated with the images. The invariants of the images can be obtained by decomposing the video into images. Summary calculation based on the invariants can ensure that the results of the video summary indicators are not affected by external factors, thereby ensuring the reliability of the video summary indicators. At the same time, based on this, combined with the publisher's identity information, the published video carries the publisher's identity imprint and has good anti-counterfeiting capabilities. At the same time, since the video content of the published video is publicly accessible and maintains the non-encryption property of the public domain, the reliability of the published video can be guaranteed without affecting the public accessibility of the published video.

[0011] In some implementations, performing summary calculation on the content of the original video to determine a video summary index includes:

[0012] Performing feature processing on the original video image in the original video to determine a feature processing result;

[0013] The feature processing result is determined as a video summary indicator.

[0014] In some embodiments, performing feature processing on the original video image in the original video and determining a feature processing result includes:

[0015] Reducing the size of the original video image to a preset size to obtain a thumbnail of the original video to determine the feature processing result;

[0016] and / or,

[0017] The color feature and / or brightness feature of the original video image is analyzed to determine the feature processing result.

[0018] The video publishing method provided by the embodiment of the present invention determines the feature processing result by reducing the analysis result of size, color characteristics or brightness and darkness characteristics. The calculation is simple, fast and effective, and the real-time performance of video publishing is improved.

[0019] In some implementations, performing summary calculation on the content of the original video to determine a video summary index includes:

[0020] Get data of preset length;

[0021] Numerical calculation is performed on the original video image in the original video and the data of the preset length to determine the video summary index.

[0022] The video publishing method provided by the embodiment of the present application combines preset length data in the calculation process, the preset length data can be different according to different use scenarios, so that the video summary index calculation can be applied to different use scenarios.

[0023] In some embodiments, the determining the reference summary based on the publisher identity information and the video summary index and signing the reference summary to obtain a digital signature comprises:

[0024] obtaining a first reference summary, the first reference summary comprising the publisher identity information and a calculation description used for the summary calculation;

[0025] signing the first reference summary to determine a first signature;

[0026] determining the video summary index as a second reference summary and signing the second reference summary to determine a second signature.

[0027] The video publishing method provided by the embodiment of the present application can be used in one video publishing process because the publisher identity information and the calculation description used for the summary calculation do not change with the video content, so storing them directly and extracting them when needed can avoid repeated calculation and improve the efficiency of video publishing.

[0028] In some embodiments, the obtaining the first reference summary comprises:

[0029] obtaining a video description of the video to be published;

[0030] splicing the publisher identity information, the video description and the calculation description to determine the first reference summary.

[0031] The video publishing method provided by the embodiment of the present application uses the video description to represent some accompanying information of the video, such as the video use range, to facilitate subsequent video distribution, etc.

[0032] In some embodiments, the determining and publishing the target published video by incorporating the signed reference summary into the video code stream of the video to be published comprises:

[0033] incorporating a first signature reference summary into a target position of the video code stream, the first signature reference summary being obtained by splicing the first reference summary and the first signature;

[0034] incorporating a second signature reference summary into a target position of each compressed and encoded video stream in the video code stream, the second signature reference summary being obtained by splicing the second reference summary and the second signature;

[0035] determine and publish the target published video based on a video stream in which the first signature reference digest and the second signature reference digest are incorporated.

[0036] The video publishing method provided by the embodiment of the present application can shorten the data amount of the published video, because the first reference digest is data that remains unchanged for a long time and is only used in the current publishing process, and the first reference digest is incorporated into the target position of the video stream instead of each compressed and encoded video stream. When all the necessary information is conveyed, the less the data amount is, the better. The second reference digest changes over time, and therefore the second signature reference digest corresponding to the second reference digest is incorporated into each compressed and encoded video stream, thereby improving the reliability of the published video on the basis of the shortened data amount of the published video.

[0037] According to a second aspect, the embodiment of the present application further provides a video publishing device, comprising:

[0038] an acquisition module, configured to acquire an original video of a to-be-published video and publisher identity information of the to-be-published video;

[0039] a digest calculation module, configured to perform digest calculation on the content of the original video to determine a video digest index;

[0040] a signature module, configured to determine a reference digest based on the publisher identity information and the video digest index, and perform signature on the reference digest to obtain a digital signature;

[0041] a splicing module, configured to splice the reference digest and the digital signature to determine a signature reference digest;

[0042] a publishing module, configured to incorporate the signature reference digest into a video stream of the to-be-published video to determine and publish a target published video, wherein the video stream is a compressed and encoded stream of the to-be-published video.

[0043] According to a third aspect, the embodiment of the present application provides an electronic device, comprising a memory and a processor, which are in communication connection with each other, and the memory stores computer instructions, and the processor executes the computer instructions to perform the video publishing method in the first aspect or any one of the implementation manners of the first aspect.

[0044] According to a fourth aspect, the embodiment of the present application provides a computer readable storage medium, which stores computer instructions, and the computer instructions are used to make the computer execute the video publishing method in the first aspect or any one of the implementation manners of the first aspect.

[0045] It should be noted that the corresponding beneficial effects of the video publishing device, the electronic device and the computer readable storage medium provided by the embodiments of the present application are described above in the description of the video publishing method, and will not be described here. BRIEF DESCRIPTION OF DRAWINGS

[0046] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings needed to be used in the description of the specific embodiments or the prior art. Obviously, the drawings described below are some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.

[0047] Figure 1 is a flowchart of a video publishing method according to an embodiment of the present application;

[0048] Figure 2 is a flowchart of a video publishing method according to an embodiment of the present application;

[0049] Figure 3 is a flowchart of a video publishing method according to an embodiment of the present application;

[0050] Figure 4 is a flowchart of a video publishing method according to an embodiment of the present application;

[0051] Figure 5 is a flowchart of a video publishing method according to an embodiment of the present application;

[0052] Figure 6 is a structural block diagram of a video publishing device according to an embodiment of the present application;

[0053] Figure 7 is a hardware structure schematic diagram of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical scheme and advantages of the embodiments of the present application more clear, the technical scheme in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0055] In the whole process of video generation and playing, the process can be mainly divided into video publishing, video distribution and video playing. The video publishing is a process of a video publishing server or the like to publish a to-be-published video, to obtain a target published video, and to send the target published video to a video distribution server or the like. Taking the video distribution server as an example, the target published video is made into target distribution videos of different preset qualities of service, and the target distribution videos of different preset qualities of service are sent to corresponding terminals for playing; after the terminal receives the target distribution video of the corresponding quality of service, the target distribution video is decoded and played.

[0056] It should be noted that the video publishing, video distribution and video playing are not necessarily processed in the above order. For example, for the video distribution server, the video obtained thereby can be published by the video publishing server, or processed by the video distribution server of the previous stage, etc.; for the terminal playing the video, the video played thereby can be sent by the video distribution server, or sent by the video publishing server, etc., and the terminal playing the video does not know whether the target video received thereby is from the video distribution or the video publishing.

[0057] The video publishing method provided by the embodiment of the application is to calculate a video abstract index by abstracting an original video in a to-be-published video, to form a signature reference abstract on the basis, and to encode the signature reference abstract into a code stream of the to-be-published video after compression and coding, to obtain a target published video. The original video includes an original video image, which is a large block of data stacked by pixel points; the video code stream is a media data stream after compression and coding, including data streams of audio media and video media, which is usually obtained by using a lossy compression method to greatly compress the original media, has a small data amount, is suitable for transmission, but is not suitable for analysis and processing of media content. Therefore, in the embodiment of the application, the reference abstract is for the original video, but not for the video media code stream after compression and coding.

[0058] The original video can be regarded as a sequence of images on continuous video points, and each image can be obtained by mathematical calculation of a certain invariant quantity in terms of its content, which describes a quantity that does not change or is not sensitive to change within a certain range when the video image is deformed or adjusted. The characteristic of the invariant quantity of the image is that a good invariant quantity will not change significantly due to the change in the quality of the image as long as the content of the image does not change significantly. However, the invariant quantity should change sensitively along with the content of the image as long as the content of the image changes significantly. The invariant quantity of the image reflects the content described by the image. The invariant quantity obtained by disassembling the video into images and arranging and counting in time sequence can be regarded as a kind of invariant quantity of the video content, which reflects the video content within a period of time. Therefore, the processing object of the video summary index generation is the content of the original video.

[0059] For example, the average brightness of all pixels of an image can be obtained as a kind of invariant quantity, which will not change significantly due to the enlargement or reduction of the image as long as the brightness of the image is not adjusted; for another example, the center of gravity position of an image can be calculated as another kind of invariant quantity, which will not change significantly due to the enlargement or reduction or brightness adjustment of the image; for another example, the N-order central moment of the image can also be calculated as a kind of geometric invariant quantity similar to the center of gravity position; for another example, the eigenvalue / singular value of the numerical matrix of the image after normalization processing will not change significantly as a main part after many processing of the image; for another example, the spectrum of the image can be calculated, and the features of the high-frequency and low-frequency positions can be extracted as a kind of invariant quantity; for another example, a plurality of representative key points can be selected from the image and the appearance similar feature descriptors near the key points can be appended to be arranged as a kind of invariant quantity.

[0060] Therefore, the summary calculation based on the content of the original video can be regarded as an invariant quantity summary calculation. The target published video is obtained by encoding the signature reference summary in the code stream of the published video after compression and encoding, so that the target published video carries the identity information of the publisher and has good anti-fake ability.

[0061] According to the embodiment of the present application, a video publishing method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0062] In this embodiment, a video publishing method is provided, which can be used in electronic devices such as video publishing servers, computers, mobile terminals, etc. Figure 1is a flow chart of a video publishing method according to an embodiment of the present application, as shown in the figure, the flow comprises the following steps: Figure 1

[0063] S11, obtaining an original video of a to-be-published video and publisher identity information of the to-be-published video.

[0064] The original video of the to-be-published video can be a video of a target time length in the to-be-published video, for example, a video of a target time length is extracted from the to-be-published video every preset time length, which is taken as the original video for subsequent video summary index calculation.

[0065] The target time length can be as small as 0 seconds, that is, the video of the target time length does not include any original video image at this time, and the corresponding video summary index is empty, which can be represented by a corresponding data length of 0. A length of 0 means that the content is empty, that is, there is no content. As can be known from the description of the subsequent steps, the reference summary not only contains the video summary index, but also can constitute a reasonable reference summary in the case that the result of the video summary index is empty, which can be used for functional or identifying purposes.

[0066] Alternatively, the target time length can be 1-10 seconds, etc. The specific length of the target time length is not limited here and can be set according to actual needs.

[0067] For example, the to-be-published video is 30 minutes, the preset time length is 5 minutes, and the target time length is 1 second. That is, a 1s original video is extracted from 0-5 minutes of the to-be-published video for video summary index calculation; a 1s original video is extracted from 6-10 minutes of the to-be-published video for video summary index calculation; and so on.

[0068] The publisher identity information of the to-be-published video can include a publisher general name, a publisher unit name, a publisher address, an author name, an author contact method, a publisher digital certificate, a publisher digital certificate access descriptor, a publisher identity public key, a publisher identity public key access descriptor, a publisher identity description number, and can also include business-related general description extension data added due to a special requirement, which is used to submit to a specific business system or access descriptor to obtain a digital certificate or identity public key. The specific publisher identity information included is set according to actual needs, which is not limited here.

[0069] S12, performing summary calculation on the content of the original video to determine a video summary index.

[0070] ​As described above, the summary calculation of the content of the original video is the construction of an invariant of the video. A video is a sequence of images in time, and an invariant is a summary data description of the images, the video content. The same video content can be observed from multiple perspectives to obtain an invariant data description, i.e., an invariant. The advantage of using an invariant is that the calculation of the video summary indicator is not concerned with the data of the video, but with the content of the video.

[0071] In the summary calculation, the brightness or picture of the original video image in the original video can be analyzed, or the original video image in the original video can be numerically calculated, etc. Alternatively, the video summary indicator includes at least one video summary sub-indicator, which includes but is not limited to brightness, chroma, etc.

[0072] S13, determining a reference summary based on the publisher identity information and the video summary indicator, and signing the reference summary to obtain a digital signature.

[0073] The reference summary includes the publisher identity information and the video summary indicator, or other information such as video description information, etc. on this basis. After the reference summary is determined, it is signed to obtain a digital signature.

[0074] The signature method includes but is not limited to digital certificate and private key, quantum entanglement technology or other technology, etc. Taking the example of signing the reference summary by using the digital certificate and the private key, the digital certificate is signed by a widely recognized authority or a digital certificate center, or by a small range accepted digital certificate center, or a self-signed digital certificate not widely accepted, or only a non-symmetric public key not widely recognized. Of course, the form and source of the digital certificate selected by the publisher will have a corresponding indirect impact on the reliability of the video stream published by the publisher.

[0075] S14, splicing the reference summary and the digital signature to determine a signed reference summary.

[0076] The signed reference summary is obtained by splicing the reference summary and the corresponding digital signature, wherein the splicing of the two can be placing the reference summary before or after the digital signature.

[0077] S15, encoding the signed reference summary into the video code stream of the video to be published to determine and publish the target published video.

[0078] The video code stream is the code stream of the compressed and encoded video to be published.

[0079] The to-be-published video is compressed and encoded to obtain a video code stream of the to-be-published video. The signature reference digest is written into the corresponding position of the video code stream to determine the target published video. Since the reference digest and the digital signature included in the signature reference digest are related to the original video and change with the video content, the position of the original video in which the video reference index is generated can be processed when the signature reference digest is written in.

[0080] This step will be described in detail below.

[0081] The original video can be regarded as a sequence of images on continuous video points. Each image has its own unique content, and each image can obtain an invariant through mathematical calculation in terms of its content. The video can be divided into images to obtain the invariant of the images. The calculation of the digest based on the invariant can ensure that the result of the video digest index is not affected by the outside world, and the reliability of the video digest index is ensured. Meanwhile, the identity information of the publisher is combined to carry the identity mark of the publisher in the published video, and the video has good anti-counterfeiting ability. Since the video content of the published video is publicly accessible, the non-encryption of the public domain is maintained, and the reliability of the published video is ensured without affecting the public access of the published video.

[0082] In this embodiment, a video publishing method is provided, which can be used in electronic devices such as a video publishing server, a computer, a mobile terminal, etc. Figure 2 The flowchart of the video publishing method according to an embodiment of the present application is shown in FIG. 1, which includes the following steps: Figure 2

[0083] S21, obtaining the original video of the to-be-published video and the identity information of the publisher of the to-be-published video.

[0084] For details, please refer to S11 of the embodiment shown in FIG. 1, which will not be repeated here. Figure 1

[0085] S22, performing digest calculation on the content of the original video to determine a video digest index.

[0086] Specifically, the above S22 includes:

[0087] S221, performing feature processing on the original video images in the original video to determine a feature processing result.

[0088] S222, determining the feature processing result as the video digest index.

[0089] ​​In the abstract calculation, the original video images in the original video are processed. The original video includes at least one original video image. If the original video includes at least two original video images, the features of each original video image can be processed respectively, and the feature processing results of the at least two original video images are fused to obtain the feature processing result of the original video. The fusion mode includes but is not limited to mean, weighted sum, etc. Alternatively, if the original video includes at least two original video images, only one of them can be extracted as the original video image for feature processing.

[0090] In some embodiments, S221 includes: reducing the size of the original video image to a preset size to obtain a thumbnail of the original video, to determine the feature processing result.

[0091] For example, the first video image in the original video is determined as the original video image for feature processing, and the size of the original video image is reduced to a preset size, for example, to a 64*32 thumbnail, thereby obtaining the feature processing result.

[0092] Alternatively, a preset number of original video images are extracted from the original video, and their sizes are reduced to a preset size respectively, and then an average thumbnail is obtained by pixel superposition and averaging, and the average thumbnail is determined as the feature processing result. For example, the video images near the 1 / 3 time point, the 2 / 3 time point and the 3 / 3 time point in the original video are taken to obtain three original video images, which are made into thumbnails respectively, and then an average thumbnail is made by pixel superposition and averaging, to determine the feature processing result.

[0093] In some embodiments, S221 includes: analyzing the color feature and / or the light and dark feature of the original video image to determine the feature processing result.

[0094] The color feature and / or the light and dark feature can be obtained based on part of the area in the original video image, or based on the whole area in the original video image, etc.

[0095] For example, for each original video image, the average division is made according to 16 horizontal blocks and 9 vertical blocks, the average brightness value of the pixels in the central part of each divided small block is counted to represent the small block, so each original video image can be represented by a 16*9 brightness vector; after the brightness vectors of all original video images are superimposed and averaged, a 16*9 brightness vector is obtained, to determine the feature processing result.

[0096] In some embodiments, S22 includes:

[0097] (1) Obtain data of a preset length.

[0098] (2) Numerically calculate the original video images in the original video and the data of the preset length to determine the video summary index.

[0099] The data of the preset length is auxiliary configuration data. Different configuration data of corresponding lengths need to be input for different summary index calculation programs. These configuration data arranged constitute a finite-length data column, and the arrangement of one data is a vector. The data of the preset length can be generated from pre-configured data or generated by user selection. The data of the preset length is different for different modes, programs, etc. selected by the user.

[0100] For example, all original video images in the original video are taken as input factors, and the data of the preset length is taken as an additional input factor. Through finite-time data sampling, finite-time data comparison operation, finite-time data lookup operation, finite-time logical operation, finite-time elementary mathematical calculation, finite-time linear operation, finite-time convolution operation, finite-time spectral analysis operation, finite-time matrix transformation, finite-time data block transformation, finite-time matrix decomposition operation, finite-time Euclidean space operation such as distance / rotation / similarity, finite-time Lie algebra operation, finite-time Riemannian geometry operation, finite-time hash calculation, finite-time encryption and decryption operation, finite-time image encoding and decoding operation, and finite-time combination of the above-listed various calculations / operations, a fixed operation program is composed to calculate a finite-dimensional numerical vector, that is, a group of numbers composed of several numerical values, to obtain a video summary index obtained by numerically calculating the original video images and the data of the preset length.

[0101] The specific manner of numerical calculation is not limited to the above, and other manners can also be used. Herein, the specific manner of data calculation is not limited in any way.

[0102] The data of the preset length can be different for different use scenarios in the calculation process, so that the calculation of the video summary index can be adapted to different use scenarios.

[0103] It should be noted that the above-mentioned manner of determining the video summary index in S22 can be obtained based on one or more of the feature processing results, or can be obtained based on numerical calculation, or can be obtained based on the combination of feature processing results and numerical calculation, etc. Herein, it is not limited in any way, and is set according to actual needs.

[0104] S23, determine the reference summary based on the publisher identity information and the video summary index, and sign the reference summary to obtain a digital signature.

[0105] For details, please refer to Figure 1S13 of the embodiment shown, which will not be repeated here.

[0106] S24, splice the reference digest and the digital signature to determine the signed reference digest.

[0107] For details, please refer to Figure 1 S14 of the embodiment shown, which will not be repeated here.

[0108] S25, encode the signed reference digest into the video code stream of the video to be published, determine and publish the target published video.

[0109] The video code stream is the code stream after compression and encoding of the video to be published.

[0110] For details, please refer to Figure 1 S15 of the embodiment shown, which will not be repeated here.

[0111] The video publishing method provided in the embodiment determines the feature processing result through the analysis result of the size, color feature or light and dark feature, which is simple, fast and effective, and improves the real-time performance of video publishing.

[0112] A video publishing method is provided in the embodiment, which can be used in electronic devices such as video publishing servers, computers, mobile terminals and the like, Figure 3 is a flowchart of the video publishing method according to the embodiment of the application, which includes the following steps as shown in the figure: Figure 3

[0113] S31, obtain the original video of the video to be published and the publisher identity information of the video to be published.

[0114] For details, please refer to Figure 1 S11 of the embodiment shown, which will not be repeated here.

[0115] S32, calculate the digest of the content of the original video to determine the video digest index.

[0116] For details, please refer to Figure 2 S22 of the embodiment shown, which will not be repeated here.

[0117] S33, determine the reference digest based on the publisher identity information and the video digest index, and sign the reference digest to obtain the digital signature.

[0118] Specifically, the above S33 includes:

[0119] S331, obtain the first reference digest.

[0120] The first reference digest includes the publisher identity information and the calculation description used for digest calculation.

[0121] ​The calculation description for the summary calculation includes, but is not limited to, the calculation program name used, the number of original video images for generating the first reference summary, and a list of configuration parameters required for the calculation using the specified calculation program, and the like.

[0122] In some embodiments, S331 includes:

[0123] (1) Obtain the video description of the video to be published.

[0124] (2) Concatenate the publisher identity information, the video description, and the calculation description to determine the first reference summary.

[0125] When generating the first reference summary, the video description of the video to be published also needs to be combined. The video description includes, but is not limited to, the program title, the program duration, the program content text introduction, the program cover image, the program classification, the program related participants, the program related contributors, and the like. By concatenating the publisher identity information, the video description, and the calculation description, the first reference summary is obtained. As can be seen, the first reference summary includes some description information, which will not change with the change of the video content without external modification. Therefore, the first reference summary can be stored as a common backup, and when it is needed to be included in the video code stream of the video to be published, the first signature reference summary is obtained by signing it.

[0126] The video description is used to represent some accompanying information of the video, such as the video usage range, and the like, so as to facilitate the subsequent video distribution, and the like.

[0127] S332, sign the first reference summary to determine the first signature.

[0128] In this embodiment, the specific way of signing is not limited, for example, the digital certificate and private key are used to sign, and the first signature is obtained after signing the first reference summary.

[0129] S333, determine the video summary index as the second reference summary, and sign the second reference summary to determine the second signature.

[0130] Since the video summary index is obtained by using the original video image of the original video for summary calculation, it changes with the change of the original video image. Therefore, it needs to be calculated for each extracted original video image. The video summary index is determined as the second reference summary, and the second signature is determined by signing the second reference summary using the corresponding signature method.

[0131] S34, concatenate the reference summary and the digital signature to determine the signature reference summary.

[0132] The first reference digest is spliced with the first signature to obtain a first signature reference digest; and the second reference digest is spliced with the second signature to obtain a second signature reference digest.

[0133] S35, the signature reference digest is written into the video code stream of the video to be published to determine and publish the target published video.

[0134] The video code stream is the code stream after compression and encoding of the video to be published.

[0135] Specifically, the above S35 includes:

[0136] S351, the first signature reference digest is written into the target position of the video code stream.

[0137] As described above, the first reference digest is a common backup, and the first signature reference digest obtained therefrom can be written into the first frame or before the first frame of the video code stream, etc. For example, the first signature reference digest is written into the video code stream every odd number of times or every N integer remainder 1 time.

[0138] Since it is a common backup, it should not be included in every compressed and encoded video stream, but only once every few compressed and encoded video streams. However, it is not only included once at the beginning, but also inserted or redundantly included several times in the middle. The advantage of this is that if the total content is very long, it does not need to go back a long time to find this data, but only needs to go back a short time to find it.

[0139] S352, the second signature reference digest is written into the target position of each compressed and encoded video stream of the video code stream.

[0140] Each compressed and encoded video stream is the original video used to generate the video digest index. Since the second signature reference digest changes with the change of the original video, i.e., changes over time. Therefore, when writing the second signature reference digest, the position of the original video generating the second signature reference digest in the video to be published needs to be combined. After determining the position, the second signature reference digest can be written into the first frame or the last frame of the compressed and encoded video stream corresponding to this segment of the original video.

[0141] S353, based on the video code stream in which the first signature reference digest and the second signature reference digest are written, the target published video is determined and published.

[0142] The target published video is the video code stream including the first signature reference digest and the second signature reference digest. The timing of writing the first signature reference digest and the second signature reference digest is not limited. For example, the second signature reference digest can be written first, and then the first signature reference digest can be written; or both can be written at the same time, etc.

[0143] The video publishing method provided by the embodiment can be used in a video publishing process, and the publisher identity information and the calculation description used for the summary calculation do not change with the video content, so that the video publishing efficiency is improved. The first reference summary is unchanged for a long time, is used only for the current publishing process, and is written into the target position of the video code stream, instead of each compressed and encoded video stream, so that the data amount of the published video is shortened. When all the necessary information is conveyed, the less the data amount is, the better. The second signature reference summary changes with time, so that it is written into each compressed and encoded video stream, thereby improving the reliability of the published video on the basis of shortening the data amount of the published video.

[0144] As a specific application example of the embodiment, the generated signature reference summary is divided into two categories, one is the first signature reference summary, hereinafter referred to as RA, and the other is the second signature reference summary, hereinafter referred to as RB. The first reference summary forming the RA contains the publisher identity information, the video description, and the calculation description used for the summary calculation. The second reference summary forming the RB contains only the video summary index.

[0145] For example, JSON is used to organize information and encode into a data block in the RA, or other forms such as XML, or protobuf, or the Box structure of ISOBMFF can be used to organize information and encode into a data block.

[0146] Taking JSON as an example, the structure of the RA is as follows:

[0147]

[0148]

[0149] As shown in the structure code above, the author represents the publisher identity information, in which sn, cn, and cert represent the display name, the general name, and the digital certificate respectively, and the three items must be provided and are not allowed to be provided anonymously. The other data items in the author are optional. Other data items that do not conflict with the definition in the table above are allowed to be added.

[0150] The video represents the video description, and each data item of the video description is an optional item. The video description item is allowed to be empty. Other data items that do not conflict with the definition in the table above are allowed to be added.

[0151] feature represents the description of the calculation of the video summary indicator, where program represents the name of the calculation program used, length represents the number of images of a small video, and init represents the list of configuration parameters required when using the specified calculation program. The program must be provided, and it is allowed to have no length, init, and to add other data items, depending on the name of the calculation program selected.

[0152] An array of feature objects can also be included in the RA, and each feature object needs to use a unique id to indicate which video summary sub-indicator is currently described when multiple video summary sub-indicators are included in the video summary indicator. When multiple feature objects appear in an array form, the id is a mandatory data item.

[0153] sign represents the digital signature of the RA, where digest represents the hash algorithm used when calculating the digital signature, and signature represents the calculated digital signature result, represented in Base64 encoding. Both digest and signature must be provided and cannot be missing, and sign must be provided. The available hash algorithms include SHA-256, SM3, etc.

[0154] Since the JSON-formatted data is not convenient to directly store in binary data, wherever binary data values are involved, the binary data is encoded using Base64 encoding or any other suitable encoding.

[0155] When calculating the signature, the hash code of the RA encoded data block without the sign object / data block is calculated using the hash algorithm described by digest, or the hash code is calculated after the sign object / data block is removed from the RA encoded data block. Then the private key associated with the data certificate cert in the publisher identity description is used to sign the hash code calculated above, and the result is encoded in Base64 to form the value of signature.

[0156] The private key associated with cert here is not public information, and is the key information that the publisher owns its real identity, which needs to be properly preserved by the publisher. According to the X.509 public key encryption system, because the publisher owns this private key that no one else has, it is believed that no one else can forge a digital signature with consistent encryption effect in a short period of time.

[0157] JSON, or XML, or protobuf, or ISOBMFF Box structure, etc. is used in RB to organize information and encode it into a data block. Taking JSON as an example, the specific structure of RB is as follows:

[0158]

[0159]

[0160] In RB, only feature object and sign object are needed. The calculation of sign object is the same as that of RA, and the private key associated with cert described in RA is needed.

[0161] In RB, feature object has id, program, length, init data items as RA does, but program, length and init data items can be ignored. When RB with ignored program, length and init data items is encountered, the feature object in RA can be used to fill in. The biggest difference between feature object in RB and that in RA is that the former has a data item result, which is the video summary index, and the specific calculation method is described in program and init.

[0162] Since the id, program, length, init and other data items of feature object in RA and RB are essentially identical, the following description can be treated without distinction, and the same applies to sign object.

[0163] In this embodiment, the feature object provided can select the calculation model, i.e., the calculation model for summary calculation, and the name program has two selectable models / programs, thumbnail and blocks.

[0164] The index calculation model / program thumbnail calculates the index result by enumerating the picture image to make an average thumbnail. The configuration parameters of this model are: "init":["thumbnail width", "thumbnail height", "sampling mode"]. Here, thumbnail width is used to configure the pixel width of the thumbnail generated by program thumbnail, thumbnail height is used to configure the final pixel height, and sampling mode can take...-2, -1, 0, 1, 2,... integers to represent the mode of extracting which images.

[0165] thumbnail's sampling mode n, when n <= 0, means take the first n images to generate thumbnails; when n > 0, means take every n-1 original video images to generate thumbnails, then get the average thumbnail. For example, when n = 1, means take all original video images; when n = 2, means take the first one and then every other original video image; when n = 3, means take the first one and then every 2nd original video image. When generating the average thumbnail, add up each thumbnail pixel by pixel and then divide by the number of images added up. The thumbnail is encoded in jpeg to make a data block, then Base64 encoded to make the value of the result data item.

[0166] blocks, which is divided into equal blocks by enumerating the picture image, then divided into a nine-square grid in each block, and the average brightness of the central small block is taken as the representative, and a set of representative brightness of each block is obtained for each picture, and these brightness matrixes are combined into a brightness tensor to make the value of the result data item.

[0167] blocks, which has the following model configuration parameters: "init": ["number of columns of equal blocks", "number of rows of equal blocks", "sampling mode"]. The "sampling mode" here has the same meaning as thumbnail, which is used to describe the mode of extracting images from the image group for calculation.

[0168] As a specific application example of the above embodiment, the video publishing method includes: shooting 30 color original images of BT.601 specification with a width of 1920 pixels and a height of 1080 pixels per second, and the data format of the image is YUV420P, which is referred to as a video to be published. The image compression encoding operation is performed on the video to be published, specifically, for each input 1920*1080 YUV420P image, it is compressed and encoded to obtain compressed and encoded frame data. By default, the H.264 image frame Slice compressed data block is obtained, for example, I-Slice frame data block, B-Slice frame data block, P-Slice frame data block, etc.

[0169] When encoding an image, you can specify encoding of an H.264 key image I-Slice compressed data block, obtain the SPS data block and PPS data block, and piece together the SPS data block, PPS data block, and I-Slice compressed data block to form a key frame image data block IDR frame data block. The encoding of the image corresponds to the capture of the above image. For example, 30 1920*1080 YUV420P color images are received per second and 30 H.264 frame data blocks are output. During image encoding, after each key frame IDR frame is output, another IDR frame is output for every 300th frame data block.

[0170] When calculating the summary of the original video images in the original video, the summary metric is calculated according to the metric calculation model / procedure described above for blocks. An image is divided into blocks with 16 columns and 9 rows. The sampling mode is configured as 6, which means that after sampling one YUV420 image, the sixth YUV420 image is taken after every five images. The length is configured as 30, which means that a video summary metric is output after every 30 images are input. During the summary calculation, each video summary metric is converted into a RB.

[0171] When an IDR frame is received, an RA is obtained and the calculation of the summary indicator calculation module is reset. When an RA or RB summary is obtained, the RA or RB summary is converted into an auxiliary data block (SEI) and an SEI NAL unit containing a signed reference digest is generated according to the Annex B specifications of the IEC / ISO-14496-10 standard and output to the data interface of the video stream.

[0172] In particular, in order to prevent the signed reference digest from being semantically confused with the SEI data block generated by any other application in the created SEI data block, SEI PayloadType 5, that is, the auxiliary data payload of user_data_unregistered, is used, and a UUID is specially introduced here to be assigned to the signed reference digest for use, which is placed in the first 16 bytes of the SEI data block to guide a signed reference digest.

[0173] For example, the above UUID is defined as 1e2bc68c-33d2-5ca2-af3b-0b5e5469c7b8.

[0174] When an IDR frame or a Slice frame is obtained, a NAL Unit is created according to the Annex B rule, and output to the data interface of the video stream. When the summary SEI NAL Unit and the IDR frame or the Slice frame arrive at the same time, the SEI NAL Unit containing the RA summary is placed in front of the frame NAL Unit, and the SEI NAL Unit containing the RB summary is placed behind the frame NAL Unit.

[0175] The video publishing method provided by the embodiment allows a publisher of a video to publish a trusted video based on a signature reference summary to the public domain. The video has anti-forgery features and carries the identity mark of the publisher, but at the same time, the video content is publicly accessible without encryption. The anti-forgery features of the video mainly include three aspects: first, the video summary index can be calculated from the video content and compared with the index in the signature reference summary; second, the signature reference summary is a reference summary plus its signature, and a person without a private key cannot calculate a new reference summary from a forged video content to generate a qualified signature; and third, the signature reference summary carries a digital certificate indicating the identity of the publisher, and the digital certificate can be managed by an authority. Therefore, if the digital certificate is verified to be true, the signature of the reference summary is verified to be true, and the calculated and compared summary index is highly consistent, the video must be published by a person holding the valid digital certificate and the private key.

[0176] In the embodiment, a video distribution method is provided, which can be used for a video distribution server, a mobile terminal, etc. Figure 4 The flowchart of the video distribution method according to the embodiment of the present application is shown in FIG. 1, which includes the following steps: Figure 4

[0177] S41, obtaining a target published video.

[0178] The target published video includes a signature reference summary and a compressed and encoded video stream, the signature reference summary includes a reference summary and a signature of the reference summary, and the reference summary is obtained by splicing the summary calculation result of the content of the original video in the compressed and encoded video stream and the identity information of the publisher of the published video.

[0179] It should be noted that the target published video herein is not particularly intended to be a video issued from a video publishing server, but can also be obtained from a video distribution server at a higher level, etc.

[0180] The generation process of the target published video is described above and will not be repeated here.

[0181] S42, separating the signature reference summary and the compressed and encoded video stream from the target published video based on the signature reference summary.​

[0182] When the signed reference digest is included in the compressed video stream, it is distinguished from the compressed video stream using a corresponding identifier. For example, the signed reference digest is included as an SEI field in the compressed video stream. Therefore, this field can be used to identify the signed reference digest in the target published video.

[0183] The signature reference digests may include multiple signature reference digests of the same type or multiple signature reference digests of different types. "Same type" means that the signature reference digests are all derived based on the content of the original video, such as the second signature reference digest described above. "Different types" means that the signature reference digests may be derived based on the content of the original video or in combination with the publisher's identity information, such as the first signature reference digest described above.

[0184] As mentioned above, the signature reference digest can correspond to a compressed encoded video stream. Accordingly, the signature reference digest separated from the target release video corresponds to the compressed encoded video stream. For example, for a video to be released, based on the need to generate a second signature reference digest, the original video of the target duration is extracted from the video to be released at preset duration intervals. Continuing with the above example, if the video to be released is 30 minutes long, the preset duration is 5 minutes, and the target duration is 10 seconds, then the processing of the video to be released is as follows:

[0185] Sub-video 1 to be released: represents the video of [0, 5] minutes in the video to be released. After compression encoding, compressed encoded video stream 1 is obtained. 10 seconds of original video is extracted from sub-video 1 to be released to generate the second signature reference digest 1.

[0186] Sub-video 2 to be released: represents the (5, 10] minutes of video in the video to be released. After compression encoding, compressed encoded video stream 2 is obtained. 10 seconds of original video is extracted from sub-video 2 to be released to generate the second signature reference digest 2.

[0187] Sub-video 3 to be released: represents a video of (10, 15] minutes in the video to be released. After compression encoding, compressed encoded video stream 3 is obtained. 10 seconds of original video is extracted from sub-video 3 to be released, and the second signature reference digest 3 is generated.

[0188] And so on;

[0189] Sub-video 6 to be released: represents a video of (25, 30] minutes in the video to be released. After compression encoding, a compressed encoded video stream 6 is obtained. 10 seconds of original video is extracted from sub-video 6 to be released to generate a second signature reference summary 6.

[0190] As shown above, the second signature reference digest is one-to-one corresponding to the compressed encoded video stream, thus, the second signature reference digest can be separated out by using the identification of the second signature reference digest, and the corresponding compressed encoded video stream can be separated out.

[0191] S43, processing the compressed encoded video stream to obtain a preset quality of service video to be distributed.

[0192] The preset quality of service includes but is not limited to 8K, 4K, high definition, standard definition, smoothness, etc. The preset quality of service is determined according to actual needs. The compressed encoded video stream is processed according to the determined preset quality of service to obtain a preset quality of service video to be distributed. That is, after the processing of this step, for the same compressed encoded video stream, different quality of service videos to be distributed can be obtained.

[0193] In some embodiments, the above S43 further includes: verifying the publisher identity information based on the signature reference digest; and when the verification is passed, performing the above S43 step.

[0194] For example, the authenticity of the digital certificate of the publisher identity carried in the signature reference digest can be verified, and a warning can be issued and a warning information log can be recorded for the false identity digital certificate, etc. Further, the further distribution of the untrusted video stream can be prevented.

[0195] Alternatively, the signature in the signature reference digest can be verified, and a warning can be issued and a warning information log can be recorded for the false signature, etc. Further, the further distribution of the untrusted video stream can be prevented.

[0196] In some embodiments, when the preset quality of service video to be distributed is obtained, the compressed encoded video stream needs to be processed, at this time, the images of the compressed encoded video stream can be scanned, and the video content can be verified whether it meets the preset publishing condition. For the video that does not meet the preset publishing condition, a warning event can be issued and a warning information log can be recorded, etc. Alternatively, the publication of the video can be limited, etc.

[0197] S44, encoding the signature reference digest into the video to be distributed, determining and distributing the target distribution video of the preset quality of service.

[0198] When the signature reference digest is encoded into the video to be distributed, the description of the encoding of the signature reference digest in the generation of the target distribution video can be referred to. Alternatively, when the compressed encoded video stream and the signature reference digest are separated out, the position of the signature reference digest is recorded. After the video to be distributed is obtained, the signature reference digest is encoded into the recorded position, so as to determine the target distribution video. Finally, the target distribution video is distributed to the corresponding terminal.

[0199] In some embodiments, the signature reference digest includes a first signature reference digest and a second signature reference digest, the first signature reference digest includes the publisher identity information and the calculation description for the digest calculation, and the second signature reference digest includes the digest calculation result of the content of the original video in the compressed and encoded video stream. The video to be distributed includes a to-be-distributed sub-video corresponding to the compressed and encoded video stream. Based on this, S44 includes:

[0200] (1) The second signature reference digest is written into the corresponding to-be-distributed sub-video to obtain the target distribution sub-video of the preset quality of service.

[0201] (2) The target distribution sub-video of the preset quality of service is spliced, and the first signature reference digest is written into the splicing result to determine and distribute the target distribution video of the preset quality of service.

[0202] It should be noted that the target distribution video includes multiple compressed and encoded video streams, and through the above steps, each compressed and encoded video stream can obtain a to-be-distributed sub-video of the preset quality of service. Based on the corresponding relationship between the compressed and encoded video stream and the second signature reference digest, the corresponding relationship between the to-be-distributed sub-video and the second signature reference digest can be determined. Based on this, the second signature reference digest is written into the corresponding to-be-distributed sub-video to form the target distribution sub-video of the preset quality of service.

[0203] The target distribution sub-video is spliced to obtain a splicing result, and then the first signature reference digest is written into the splicing result to obtain the target distribution video. The number of first signature reference digests written can be determined according to the length of the splicing result. If the length of the splicing result is relatively long, multiple first signature reference digests can be written, and the writing positions of the signature reference digests are distributed at different positions of the splicing result. If the length of the splicing result is relatively short, only one first signature reference digest can be written, and so on. The writing position of the first signature reference digest is set according to actual needs, and it is not limited here.

[0204] It should be noted that the first signature reference digest is not limited to being written after the splicing result is obtained as shown above. The number of first signature reference digests to be written can be determined first, and then the number of compressed and encoded video streams between two adjacent first signature reference digests is determined according to the number of first signature reference digests. Finally, when the second signature reference digest is written, the number of written second signature reference digests is counted to determine the writing position of the first signature reference digest.

[0205] The first signature reference digest represents some description information, which does not change with time; and the second signature reference digest is closely related to the video content, therefore, different encoding methods are used for different signature reference digests, so that the data amount of the target distribution video increased due to the encoding of the signature reference digest can be reduced on the basis of ensuring the reliability of the target distribution video.

[0206] The video distribution method provided by the embodiment carries the signature reference digest in the target distribution video, and the signature reference digest is obtained by digest calculation based on the content of the original video in the compressed encoded video stream, because the image has its own unique content, i.e., the image has an invariant related thereto, the reliability of the signature reference digest calculated based on the invariant; meanwhile, the identity information of the publisher is also included in the signature reference digest, so that the target distribution video obtained finally has the identity mark of the publisher, and has good anti-counterfeiting capability, thereby ensuring that the target distribution video obtained with the preset service quality has high reliability.

[0207] As a specific application example of the video distribution method of the embodiment, the video distribution method comprises: obtaining a target distribution video of 30 frames per second and a signature reference digest RA or RB, etc., and performing separation processing of the signature reference digest.

[0208] In the separation processing, the signature reference digest is extracted from the SEI data block with the PayloadType of 5 and the UUID{1e2bc68c-33d2-5ca2-af3b-0b5e5469c7b8} defined in the above embodiment, and any other video frame data is used for subsequent production of the preset service quality.

[0209] In the production of the video of different service qualities, each input video frame or multiple video frame compression data needs to be decoded first, and one or more video frame images are output, and 30 decoded 1920x1080 video picture images are obtained per second.

[0210] Each input video image is then reduced or enlarged according to a specified configuration, and then video compression encoding is performed, and one or more video frame images of different sizes or different video code rates are output. For example, for the input video image of 1920*1080, three small size video compression encodings of 1280*720, 704*576 and 372*288 are obtained through production processing, and then H.264 compression encoding is performed to obtain three compressed video frames.

[0211] After the image is scaled down or scaled up, the original video aspect ratio information can be kept in the encoded video frames or related description information. For example, after a 1920*1080 size image is scaled down to a 704*576 size image and encoded, the original video aspect ratio of 16:9 can be described in the encoded frame data.

[0212] During the decoding process, if an IDR frame is received and decoded, the encoding process also synchronously encodes each IDR frame of different sizes / video code rates.

[0213] When a RA is received from the reference abstract separation module, it is temporarily stored until the next signed RA is received. When an IDR frame is received from the image encoding module, the temporarily stored signed RA is first output to the video stream data interface of the corresponding size, and then the IDR frame of the corresponding size is output to the output interface. For example, when a 704*576 size IDR encoded frame is received from the image encoding module, the temporarily stored RA is first output to the 704*576 size video output data interface, and then the 704*576 size video encoded frame is output.

[0214] When a non-IDR frame is received from the image encoding module, the video frame is directly output to the corresponding video stream data output interface.

[0215] When an RB is received, the RB is simultaneously output to the video stream data output interfaces of all streams.

[0216] When an RA or an RB is separated, if an RA is received, the digital certificate in the RA is first verified. If the digital certificate carried in the RA is signed by a trusted CA certificate that has been locally trusted for playing, the certificate is confirmed to be true. If a valid certificate cannot be extracted, a warning event is issued, a log is recorded, and a suggestion is made to the system to stop the distribution process.

[0217] Alternatively, the value of the CN data field of the real trusted digital certificate can be extracted, compared with the value of the authorcn data field in the RA, and if they are not the same or do not have a certain containing relationship, a warning event is issued, a log is recorded, and a potential risk is reported.

[0218] Or, the sign object is taken out from the RA and the sign object is deleted from the RA. Then the publisher's public key is extracted from the digital certificate, the hash algorithm is obtained from the digest data field of the sign object, the hash value is calculated using the hash algorithm on the reference digest data block after the sign object is deleted, the signature data of the sign is decrypted using the publisher's public key to obtain another hash value. The two hash values are compared, if the same, the original signature reference digest is identified as true. Otherwise, a warning event can be issued, the log is recorded and the system is suggested to prevent the distribution process.

[0219] When the preset quality of service video is made, the video that does not meet the distribution condition can also be screened out by scanning the video. Specifically, when the RA is received, the author object therein is extracted, the video object therein is extracted, and relevant records are made. When the original video image is received, it is sent to the back-end image intelligent processing. When the event of not meeting the distribution condition is triggered, the record is made and the system is suggested to prevent the distribution process or to use the suggested image processing method to properly process the image.

[0220] The video distribution method provided by the embodiment does not need to encrypt the content of the video. The video tool or service has the ability to distribute the video content according to different quality of service without reducing the reliability of the video stream, and has the ability to scan the video content and take necessary supervision measures without reducing the reliability of the video stream.

[0221] In the embodiment, a video playing method is provided, which can be used for a playing terminal such as a computer, a mobile terminal, etc. Figure 5 The flowchart of the video playing method according to the embodiment of the application is shown in FIG. 2, which includes the following steps: Figure 5 S51, obtaining a target video.

[0222] S51, obtaining a target video.

[0223] The target video includes a signature reference digest and a compressed and encoded video stream. The signature reference digest includes a reference digest and a signature of the reference digest. The reference digest is obtained by splicing the digest calculation result of the content of the original video in the compressed and encoded video stream and the identity information of the publisher of the target distribution video.

[0224] When the target video is a target distribution video, the generation method of the target distribution video is described above and will not be repeated here. When the target video is a target publishing video, the generation method of the target publishing video is also described above and will not be repeated here.

[0225] S52, separating the signature reference digest and the compressed video stream from the target video based on the identification of the signature reference digest.

[0226] As to the way of separating the signature reference digest and the compressed video stream from the target video, it is similar to the way of separating the signature reference digest and the compressed video stream from the target distribution video as described in S42 of the above embodiment, which will not be repeated here. Figure 4

[0227] In some embodiments, the signature reference digest includes a first signature reference digest and a second signature reference digest, the first signature reference digest including the publisher identity information and the calculation description for digest calculation, and the second signature reference digest including the digest calculation result of the content of the original video in the compressed video stream. Based on this, the above S52 includes:

[0228] (1) separating the first signature reference digest from the target distribution video based on the identification of the first signature reference digest.

[0229] (2) separating the second signature reference digest and the compressed video stream corresponding to the second signature reference digest from the target distribution video based on the identification of the second signature reference digest.

[0230] As to the specific content of the first signature reference digest and the second signature reference digest, please refer to the above description, which will not be repeated here.

[0231] For example, a video frame queue is used to process the received target distribution video, and when a compressed video frame is found, the video frame is put into the video frame queue. When a second signature reference digest is found, all the video frames in the video frame queue are taken out as a compressed video stream in a short period of time.

[0232] Alternatively, the above situation that the video frame queue is empty when a second signature reference digest is encountered again may occur, in which case the length of the compressed video stream is considered to be 0, i.e., an empty video stream is obtained.

[0233] When putting the video frame into the above video frame queue, the compressed video frame can also be decoded to obtain a video frame image, and the image instead of the compressed video data is put into the video frame, so that the effect of the video stream authenticity verification is the same.

[0234] In the target distribution video, two types of signature reference digests are included, and each can be accurately separated from the target distribution video based on the corresponding identification.

[0235] S53, decoding the compressed video stream to determine the decoded video in the compressed video stream.

[0236] ​The compressed and encoded video stream is sent into a video decoder to be decoded, and a decoded video in the compressed and encoded video stream is obtained.

[0237] S54, based on the content of the decoded video, a decoded abstract index is determined by abstract calculation.

[0238] The abstract calculation mode is consistent with the calculation mode of the abstract calculation result.

[0239] Specifically, the calculation mode of the abstract calculation result is described in S22 of the embodiment shown in the above Figure 2 The detailed description is omitted here.

[0240] For example, when the calculation mode of the abstract calculation result is the first thumbnail of 64*32, the first original video image of the decoded video is reduced to the size of 64*32, and the decoded abstract index is obtained.

[0241] For example, when the calculation mode of the abstract calculation result is the average thumbnail of three specified images of 64*32, three original video images near the time points of 1 / 3, 2 / 3 and 3 / 3 of the decoded video are reduced to the size of 64*32, and then the average image is calculated, i.e. the average thumbnail is obtained by averaging each pixel, as the decoded abstract index.

[0242] For example, when the calculation mode of the abstract calculation result is the average brightness of 16*9 blocks of specified images, the brightness of the central part of each block of the specified images is calculated, and then the average brightness of the pixels in the central part of each block is calculated to represent the block. Thus, each of the specified images can be represented by a 16*9 brightness vector, and the group of representative vectors is stacked and averaged to form a 16*9 brightness vector, which is taken as a decoded abstract index.

[0243] For example, when the calculation mode of the abstract calculation result is the singular value of the average brightness of 32*18 blocks of specified images, the average brightness of each 32*18 block of the specified images is calculated to obtain a 32*18 numerical matrix, and then the singular value decomposition is performed on the accumulated numerical matrix to obtain a variable-length vector composed of non-zero singular values, which is taken as a decoded abstract index.

[0244] For example, when the calculation mode of the abstract calculation result is the joint vector of the average brightness of 16*9 blocks of specified images, the average brightness numerical matrix of 16*9 blocks of the specified images is obtained, and then the long numerical vector is directly concatenated to form a decoded abstract index.

[0245] S55, based on the decoded abstract index and the signature reference abstract, the target video is verified.

[0246] When verifying the target video, the calculated decoding digest index is compared with the video digest index, and the difference is recorded. When the difference is large, a relevant warning is given or relevant records are made, indicating that the compressed and encoded video stream has a certain degree of inauthenticity.

[0247] In some embodiments, the first signature reference digest includes a first reference digest and a first signature of the first reference digest, and the first reference digest includes the publisher identity information and a calculation description for the digest calculation. Based on this, S54 above includes:

[0248] (1) Extracting the publisher identity information and / or the first signature in the first signature reference digest.

[0249] (2) Verifying the publisher identity information and / or the first signature to determine the verification result of the target video.

[0250] When verifying using the first signature reference digest, the digital certificate in the publisher identity information and / or the authenticity of the first signature can be verified. When the publisher digital certificate is obtained, the authenticity of the digital certificate is verified, and when the authenticity cannot be verified due to missing information, a relevant warning is given or relevant records are made, indicating that the authenticity of the publisher identity is questionable.

[0251] When the obtained publisher digital certificate is not signed by a trusted institution or CA center, a relevant warning is given or relevant records are made, indicating that the authenticity of the publisher identity is questionable.

[0252] When there is no publisher digital certificate, no trusted publisher digital certificate access descriptor is provided, and no trusted publisher identity public key access descriptor is provided, a relevant warning is given or relevant records are made, indicating that the authenticity of the publisher identity is questionable.

[0253] When the publisher digital certificate is obtained, a verification failure occurs in the process of verifying the digital certificate, and a relevant warning is given or relevant records are made, indicating that the authenticity of the publisher identity is false and not worth relying on.

[0254] The reference digest data in the signature reference digest except for the signature part is used as input to verify the authenticity of the digital signature using the obtained publisher public key, and if the verification fails, a relevant warning is given or relevant records are made, indicating that the signature reference digest is not authentic and not worth relying on.

[0255] The first signature reference digest includes some description information that does not change with the changes in the images in the video, and therefore, the first signature reference digest can be used to represent the overall situation of the target publisher video.

[0256] In some embodiments, S54 above includes:

[0257] (1) extracting the reference digest in the second signature reference digest to obtain a video digest index, which is a calculation result of a digest of the content of the original video in the compressed and encoded video stream.

[0258] (2) calculating the similarity of the decoded digest index and the video digest index.

[0259] (3) determining the verification result of the target video based on the size of the similarity.

[0260] For example, when comparing the vector of the decoded digest index with the vector of the video digest index, the absolute difference can be calculated and then averaged, the cosine of the included angle of the two vectors can be calculated, the covariance can be calculated, the correlation coefficient of the two vectors can be calculated, the structural similarity of the two vectors can be calculated, etc.

[0261] Or, taking the cosine of the included angle of the vector of the decoded digest index and the vector of the video digest index as an example, when the cosine of the included angle of the two digest index result vectors is close to 1.0, it indicates that the authenticity of the compressed and encoded video stream is very high; when the cosine is close to 0.0, it indicates that the authenticity of the compressed and encoded video stream is very low; when the cosine is > 0.7, it can be determined as good authenticity; when the cosine is < 0.5, it can be determined as poor authenticity.

[0262] When the calculation method of the video digest index is the average thumbnail, the average thumbnail representing the decoded digest index can be compared with the average thumbnail representing the video digest index pixel by pixel, and then the pixel difference is compared. The representative area corresponding to the pixel difference > 30% is dyed and displayed in the playing to warn and make relevant records.

[0263] The second signature reference digest is one-to-one corresponding to the compressed and encoded video stream, so the second signature reference digest can be used to represent the situation of the compressed and encoded video stream it corresponds to, thereby determining the verification result of the target video.

[0264] S56, when the verification passes, playing the decoded video.

[0265] When the verification passes, it can be determined that the obtained decoded video is a reliable video, so as to play it.

[0266] When the verification does not pass, a warning mark can be made in the video image when the decoded video is rendered according to the verification result, for example, displaying the target image, etc. Herein, it is not limited.

[0267] The video playing method provided by the embodiment carries a signature reference digest in the target published video, and the signature reference digest is obtained by digest calculation based on the content of the original video in the compressed and encoded video stream. Since the image has its own unique content, i.e., the image has an invariant related thereto, the reliability of the signature reference digest obtained by digest calculation based on the invariant; meanwhile, the identity information of the publisher is also included in the signature reference digest, so that the target video obtained finally has the identity mark of the publisher and has good anti-counterfeiting capability. When the target published video is decoded and played, the target published video is verified based on the signature reference digest, so as to ensure the reliability of the decoded video played.

[0268] As a specific application example of the video playing method, the video playing method comprises: obtaining a target video, and separating a signature reference digest and a compressed and encoded video stream without the reference digest from the target video. For example, a video frame of 30 frames per second and a signature reference digest RA or RB, etc. are obtained for subsequent separation processing.

[0269] In the separation processing, the signature reference digest data is extracted from the SEI data block with PayloadType of 5 and with the UUID {1e2bc68c-33d2-5ca2-af3b-0b5e5469c7b8} defined in the specific application example, for signature verification. Any other video frame data is used for decoding.

[0270] In the decoding, each video frame or multiple video frame compressed data is decoded, and one or more video frame images are output. For example, 30 video picture images of 1920*1080 after decoding are obtained per second.

[0271] In the verification, when a signature reference digest data block is received from the reference digest separation module, it is determined whether RA or RB is received by judging whether the characteristic result is included.

[0272] When RA is received, the digital certificate in the RA is verified first. If the digital certificate carried in the RA is signed by a trusted CA certificate for playing in the local, the certificate is confirmed to be true. Or the authenticity of the certificate can be confirmed by a certain trusted way for playing. When the certificate is confirmed to be authentic and trusted, the authentication of the certificate is performed, and further identification and verification operations are enabled. If no valid certificate can be extracted, the image rendering module is reported of potential risks. The image rendering module will warn the risks in the video display window.

[0273] Optionally, for a real and trusted digital certificate, the value of its CN data field is extracted and compared with the value of the author cn data field in the RA. If they are not the same or there is no certain inclusion relationship, the potential CN impersonation risk is reported to the image rendering module, and the author information in the RA and the CN data field or more data fields of the actual certificate are displayed in the image rendering module to prompt the audience of the possible CN impersonation risk.

[0274] The sign object is taken out from the signed reference digest data block and deleted from the signed reference digest data block. Then the publisher's public key is extracted from the digital certificate, the hash algorithm is obtained from the digest data field of the sign object, the hash value is calculated using the hash algorithm on the reference digest data block after deleting the sign object, and the signature data of the sign is decrypted using the publisher's public key to obtain another hash value. The two hash values are compared. If they are the same, the original signed reference digest is identified as true. Otherwise, it is a fake reference digest that should not be trusted, and a warning is issued to the image rendering module, and the further index verification work is terminated until the next RA is encountered.

[0275] When the RA is received, the author object is extracted, the video object is extracted, and the image rendering module is informed to make appropriate display.

[0276] When each frame of video compression encoded key frame IDR frame data is received, a configuration signed reference digest RA has been necessarily received, and it can be known from the RA whether the received video stream is a video stream with signed reference digest. When the received is a video stream without signed reference digest, the processing of the video stream does not need to pass through the signed authentication and verification processing, and only the processing of digest separation, decoding and rendering is needed to complete the related playing.

[0277] In the digest index verification, the index calculation model / process described in the above example is used, thumbnail and blocks. After the sign configuration in the RA is used, each image received from the image decoding module is used to calculate the data contribution part of the image in a short period of time using the configured program thumbnail or blocks.

[0278] For example, take thumbnail as an example. If the sequence number of the current image since the reset of the image self module does not conform to the sampling mode of thumbnail, the image is directly discarded / ignored. If it conforms to the sampling mode, the image is reduced to the specified width and height of the thumbnail by a faster algorithm, such as the bilinear method, and is accumulated on the preset floating-point thumbnail base map. This thumbnail base map is created when the thumbnail program is reset and configured. When the received image sequence number is the same as the value of feature::length, it means that the current short video has been processed, and at this time, the floating-point value of each pixel on the accumulated floating-point thumbnail base map is averaged according to the number of accumulated images, and an integer thumbnail image is arranged. That is, an index result is calculated according to the thumbnail description, but no jpeg compression is performed.

[0279] When the feature result of the RB is received, the image carried in feature::result is Base64 decoded and JPEG decompressed to obtain an integer thumbnail. At this time, the thumbnail calculated above is compared with the current decompressed thumbnail pixel by pixel, and when the pixel difference is greater than 50%, the pixel is marked as not real (value 2), when the pixel difference is greater than 30%, the pixel is marked as possibly not real (value 1), and when the pixel difference is less than 30%, the pixel is marked as acceptable (value 0). In this way, a real score thumbnail is obtained. The abstract index verification module sends the real score thumbnail to the image rendering module to guide the image rendering module to perform dyeing according to the score on the video picture being played / rendered. At the same time, all scores are accumulated and then divided by the total number of pixels of the thumbnail to obtain a comprehensive score. When the comprehensive score is 2, it means not real, when the comprehensive score is 1, it means possibly not real, and when the comprehensive score is 0, it means that the real degree is acceptable. The comprehensive score is reported to the image rendering module.

[0280] When each complete index verification is completed, that is, after the feature result of the RB is received and the verification report is completed, the calculation parameters are cleaned up to prepare for the index calculation of the next batch of decoded videos.

[0281] When the configured blocks program is encountered, the calculation is performed in a similar manner to thumbnail, and a dyeing guide map and a comprehensive score are obtained to perform subsequent image rendering and display.

[0282] After the display of the obtained real degree information and the processing of the image rendering function, the video viewer can directly understand the possible untrustworthy behavior of the video during the playback of the video.

[0283] During rendering, the following image can be drawn on the video drawing window:

[0284] When receiving an author object, the content in the author object is displayed appropriately, such as displaying the name, unit, etc. of the publisher;

[0285] When receiving an author object with a digital certificate warning, the warning is displayed appropriately and prominently, and optionally, the playing screen is colored with a high-deception warning color;

[0286] When receiving an index verification result, i.e. a coloring guide and a comprehensive score, the playing video is colored according to the coloring guide, and the comprehensive score is recorded appropriately, or a deception warning sign is posted on the video.

[0287] The video playing method provided in the embodiment plays a trusted video based on a signed reference digest, traces the publisher of the video while playing, and identifies and warns the authenticity of the video stream, so that the player not only confirms the identity of the publisher of the video, but also confirms the degree to which the video may be tampered with and thus loses the value of the commitment of the publisher. When playing the confirmed high-reliability video content using the method, the real intention of the publisher at the time of publishing the video can be confirmed.

[0288] In the embodiment, a video publishing device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and will not be described again. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware is also possible and is contemplated.

[0289] The embodiment provides a video publishing device, as shown in the following figure, comprising: Figure 6

[0290] The acquisition module 61 is configured to acquire an original video of a to-be-published video and publisher identity information of the to-be-published video;

[0291] The digest calculation module 62 is configured to calculate a digest of the content of the original video to determine a video digest index;

[0292] The signature module 63 is configured to determine a reference digest based on the publisher identity information and the video digest index, and sign the reference digest to obtain a digital signature;

[0293] The splicing module 64 is configured to splice the reference digest and the digital signature to determine a signed reference digest;

[0294] ​The publishing module 65 is configured to encode the signature reference digest into a video bitstream of the video to be published, and determine and publish a target published video, wherein the video bitstream is a compressed bitstream of the video to be published.

[0295] In some embodiments, the digest calculation module 62 comprises:

[0296] The processing unit is configured to perform feature processing on the original video image in the original video, and determine a feature processing result.

[0297] The determining unit is configured to determine the feature processing result as the video digest index.

[0298] In some embodiments, the processing unit comprises:

[0299] The reducing sub-unit is configured to reduce the size of the original video image to a preset size to obtain a thumbnail of the original video, and determine the feature processing result.

[0300] Alternatively,

[0301] The analyzing sub-unit is configured to analyze the original video image in terms of color features and / or light and dark features, and determine the feature processing result.

[0302] In some embodiments, the digest calculation module 62 comprises:

[0303] The first obtaining unit is configured to obtain data of a preset length.

[0304] The calculation unit is configured to perform numerical calculation on the original video image in the original video and the data of the preset length, and determine the video digest index.

[0305] In some embodiments, the signature module 63 comprises:

[0306] The second obtaining unit is configured to obtain a first reference digest, wherein the first reference digest comprises the publisher identity information and a calculation description for the digest calculation.

[0307] The first signature unit is configured to sign the first reference digest, and determine a first signature reference digest.

[0308] The second signature unit is configured to determine the video digest index as a second reference digest, and sign the second reference digest, and determine a second signature reference digest.

[0309] In some embodiments, the second obtaining unit comprises:

[0310] The obtaining sub-unit is configured to obtain a video description of the video to be published.

[0311] The splicing subunit is configured to splice the publisher identity information, the video description, and the calculation description to determine the first reference summary.

[0312] In some embodiments, the publishing module 65 includes:

[0313] Encoding the first signature reference digest into a target position of the video stream;

[0314] The second signature reference digest is encoded into the target position of each compressed encoded video stream in the video code stream, and the target release video is determined and released.

[0315] The video publishing device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0316] The further functional description of each of the above modules is the same as that of the above corresponding embodiments and will not be repeated here.

[0317] An embodiment of the present invention further provides an electronic device having the above Figure 6 The video publishing device shown.

[0318] See also Figure 7 , Figure 7 is a structural diagram of an electronic device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the electronic device may include: at least one processor 71, such as a CPU (Central Processing Unit), at least one communication interface 73, a memory 74, and at least one communication bus 72. The communication bus 72 is used to realize the connection and communication between these components. The communication interface 73 may include a display screen (Display), a keyboard (Keyboard), and the optional communication interface 73 may also include a standard wired interface and a wireless interface. The memory 74 may be a high-speed RAM memory (Random Access Memory, volatile random access memory) or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 74 may optionally be at least one storage device located away from the aforementioned processor 71. The processor 71 may be combined with Figure 6 In the described apparatus, the memory 74 stores an application program, and the processor 71 calls the program code stored in the memory 74 to execute any of the above method steps.

[0319] The communication bus 72 can be a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, or the like. The communication bus 72 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 7 Only one thick line is used to represent the communication bus 72, but it does not mean that there is only one bus or only one type of bus.

[0320] The memory 74 can include a volatile memory, such as a random-access memory (RAM), and can also include a non-volatile memory, such as a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD). The memory 74 can also include a combination of the above-mentioned types of memories.

[0321] The processor 71 can be a central processing unit (CPU), a network processor (NP), or a combination of the CPU and the NP.

[0322] The processor 71 can further include a hardware chip. The hardware chip can be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0323] Optionally, the memory 74 is further configured to store program instructions. The processor 71 can invoke the program instructions to implement the video publishing method as shown in any embodiment of the present application.

[0324] The embodiment of the present application also provides a non-transitory computer storage medium, which stores computer executable instructions, and the computer executable instructions are used for executing the video publishing method in any method embodiment described above. The storage medium can be a disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory, a Hard Disk Drive (HDD) or a Solid-State Drive (SSD), etc. The storage medium can also include a combination of the above-mentioned storage devices.

[0325] Although the embodiments of the present application are described in conjunction with the drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes are intended to fall within the scope of the appended claims.

Claims

1. A video publishing method, characterized in that: include: Obtaining the original video of the video to be published and the identity information of the publisher of the video to be published; Performing summary calculation on the content of the original video to determine a video summary index; Determining a reference summary based on the publisher identity information and the video summary indicator, and signing the reference summary to obtain a digital signature; Determining a reference digest based on the publisher identity information and the video summary indicator, and signing the reference digest to obtain a digital signature, includes: obtaining a first reference digest, the first reference digest including the publisher identity information and a calculation description for calculating the digest; signing the first reference digest to determine a first signature; determining the video summary indicator as a second reference digest, and signing the second reference digest to determine a second signature; Concatenate the first reference digest and the first signature to obtain a first signature reference digest, and concatenate the second reference digest and the second signature to obtain a second signature reference digest; The first signature reference digest and the second signature reference digest are incorporated into the video code stream of the video to be released to determine and release the target release video, where the video code stream is a code stream obtained by compressing and encoding the video to be released.

2. The method according to claim 1, characterized in that The performing summary calculation on the content of the original video to determine the video summary index includes: Performing feature processing on the original video image in the original video to determine a feature processing result; The feature processing result is determined as a video summary indicator.

3. The method according to claim 2, characterized in that The performing feature processing on the original video image in the original video and determining the feature processing result includes: Reducing the size of the original video image to a preset size to obtain a thumbnail of the original video to determine the feature processing result; and / or, The color feature and / or brightness feature of the original video image is analyzed to determine the feature processing result.

4. The method according to claim 1, wherein The performing summary calculation on the content of the original video to determine the video summary index includes: Get data of preset length; Numerical calculation is performed on the original video image in the original video and the data of the preset length to determine the video summary index.

5. The method according to claim 1, wherein The obtaining of the first reference digest includes: Obtain a video description of the video to be published; The publisher identity information, the video description, and the calculation description are concatenated to determine the first reference summary.

6. The method according to claim 1, characterized in that The step of encoding the first signature reference digest and the second signature reference digest into the video stream of the to-be-published video to determine and publish the target publishing video includes: Encoding the first signature reference digest into a target position of the video stream; Encoding the second signature reference digest into a target position of each compressed encoded video stream in the video code stream; The target release video is determined and released based on the video stream encoded with the first signature reference digest and the second signature reference digest.

7. A video publishing device, characterized in that: include: An acquisition module is used to obtain the original video of the video to be published and the identity information of the publisher of the video to be published; A summary calculation module, configured to perform summary calculation on the content of the original video and determine a video summary index; A signing module, configured to determine a reference summary based on the publisher identity information and the video summary indicator, and sign the reference summary to obtain a digital signature; Determining a reference digest based on the publisher identity information and the video summary indicator, and signing the reference digest to obtain a digital signature, includes: obtaining a first reference digest, the first reference digest including the publisher identity information and a calculation description for calculating the digest; signing the first reference digest to determine a first signature; determining the video summary indicator as a second reference digest, and signing the second reference digest to determine a second signature; a concatenation module, configured to concatenate the first reference digest with the first signature to obtain a first signature reference digest, and concatenate the second reference digest with the second signature to obtain a second signature reference digest; The publishing module is used to encode the first signature reference digest and the second signature reference digest into the video code stream of the video to be published to determine and publish the target publishing video, where the video code stream is the code stream after the video to be published is compressed and encoded.

8. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the video publishing method according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the video publishing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Verification method, system and device for validity of multimedia contents

    CN101296148A

  • Video fingerprint generation method, device, electronic equipment and storage medium

    CN113722541A