Video unique value generation method, device and equipment

Generate video unique values ​​through preset keyframe extraction and differential hashing algorithms, which solves the problem of insufficient robustness of traditional algorithms when video file type and clarity changes, data loss or modification, and achieves higher video unique values ​​stability sex.

CN119277124APending Publication Date: 2025-01-07新奥新智科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411362358.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

Traditional video unique value algorithms are less robust when the video file type and clarity change, and data loss or modification during network transmission will affect the stability of the unique value.

Method used

The preset keyframe extraction strategy is used to extract frames, and the feature vector of the keyframe is obtained based on the differential hash algorithm, and the unique value of the video is generated based on the feature vector.

Benefits of technology

Improves the robustness of video unique values, and maintains the stability of unique values ​​in the event of video file type and clarity changes, as well as data loss or modification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119277124A_ABST
    Figure CN119277124A_ABST
Patent Text Reader

Abstract

The invention provides a video unique value generation method, device and equipment, and relates to the technical field of video image recognition, and the method comprises the steps: carrying out the frame extraction of a video according to a preset key frame extraction strategy, and obtaining a plurality of key frames of the video; obtaining feature vectors of the key frames on the basis of a differential dispersal algorithm; and generating a unique value of the video according to the feature vector. According to the invention, the robustness of the unique value of the video can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of video image recognition, and in particular to a method, device and equipment for generating a unique video value. Background Art

[0002] File unique value calculation technology plays an important role in data identification, data deduplication and file verification. Traditional unique value algorithms include MD5 (message-digest algorithm 5), SHA (Secure Hash Algorithm) and CRC (Cyclic Redundancy Check). These algorithms calculate the unique value of the file according to the file content. They can map data of any length into a fixed-length digest (i.e., a unique value), and the file content of the corresponding file cannot be reversed based on the unique value.

[0003] When using the traditional unique value algorithm to calculate the unique value of a video, different video file types and different clarity and image quality will affect the unique value of the video file. Moreover, in the production process, after the video file content is transmitted over the network, there is a certain probability that data loss and / or data modification will occur, which will also affect the unique value of the video file.

[0004] Therefore, how to improve the robustness of video uniqueness values ​​has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] In order to solve the problem of low robustness of video unique values ​​in the prior art, the present invention provides a method, device and equipment for generating video unique values.

[0006] The technical solution of the present invention is as follows:

[0007] The present invention provides a method for generating a unique video value, comprising:

[0008] Extracting frames from the video according to a preset key frame extraction strategy to obtain multiple key frames of the video;

[0009] Based on the differential scattering algorithm, obtaining the feature vector of each key frame;

[0010] A unique value of the video is generated according to the feature vector.

[0011] Optionally, extracting frames from the video according to a preset key frame extraction strategy specifically includes:

[0012] Based on a preset key frame position calculation formula, key frame positions are calculated for the video to obtain a calculation result; the calculation result includes position values ​​of multiple video frames, and the position value indicates the ranking of the corresponding video frame among all video frames in the video;

[0013] According to the calculation result, the video is frame extracted.

[0014] Optionally, the calculation result specifically includes position values ​​of a preset number of video frames;

[0015] All the position values ​​form an arithmetic progression, and the tolerance of the arithmetic progression is related to the total number of frames of all the video frames.

[0016] Optionally, extracting frames from the video according to the calculation result specifically includes:

[0017] Determine whether there are empty frames in the video frames corresponding to all the position values;

[0018] If there are no empty frames in the video frames corresponding to all the position values, it is determined that the video frames corresponding to the position values ​​are all key frames.

[0019] Optionally, extracting frames from the video according to the calculation result further includes:

[0020] If there are empty frames in the video frames corresponding to all the position values, then for each position value corresponding to the empty frame, add the position value to a preset value to obtain a new position value; if the first video frame corresponding to the new position value is not an empty frame, determine that the first video frame is the key frame; if the first video frame is an empty frame, continue to add the new position value to the preset value until the second video frame corresponding to the latest position value is not an empty frame, and determine that the second video frame is the key frame;

[0021] For the other position values ​​except the position value corresponding to the empty frame, the video frame corresponding to the position value is determined as the key frame.

[0022] Optionally, obtaining the feature vector of each key frame based on a differential scattering algorithm specifically includes:

[0023] For each of the key frames, downsampling the key frame;

[0024] Based on the differential sparse algorithm, characteristic vectors are calculated for the key frame after downsampling to obtain characteristic values ​​of the key frame, where the characteristic values ​​are binary strings;

[0025] The characteristic value is converted into a numerical value of a preset high base to obtain a characteristic vector of the key frame.

[0026] Optionally, the preset high base is base 32.

[0027] Optionally, generating a unique value of the video according to the feature vector specifically includes:

[0028] A unique value of the video is generated according to the feature vector and the total number of frames of the video.

[0029] The present invention also provides a video unique value generating device, comprising:

[0030] A frame extraction module, used to extract frames from a video according to a preset key frame extraction strategy to obtain a plurality of key frames of the video;

[0031] An acquisition module, used for acquiring a feature vector of each key frame based on a differential scatter algorithm;

[0032] A generating module is used to generate a unique value of the video according to the feature vector.

[0033] The present invention also provides a video unique value generating device, comprising:

[0034] at least one processor; and,

[0035] a memory communicatively connected to the at least one processor; wherein,

[0036] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to implement the method for generating a unique video value as described above.

[0037] The present invention adopts the above technical solution and has the following beneficial effects:

[0038] A method for generating a unique value of a video includes: extracting frames from a video according to a preset key frame extraction strategy to obtain multiple key frames of the video, then obtaining a feature vector of each key frame based on a differential scatter array algorithm, and finally generating a unique value of the video based on the feature vector. Based on this, since in the production link, after the video file content is transmitted over the network, the video frame will not suffer from data loss and / or data modification, and the present invention uses the feature vectors of multiple key frames of the video to generate a unique value of the video, so that the unique value generated by the present invention has high robustness to changes in the video stream (in the production link, after the video file content is transmitted over the network, data loss and / or data modification occurs); and since the feature vector of the key frame is obtained based on the differential scatter array algorithm, the unique value generated according to the feature vector has high robustness to changes in the video file type and changes in the video definition. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0040] Figure 1 It is a flowchart of a method for generating a unique video value provided by an embodiment of the present invention;

[0041] Figure 2 It is a structural schematic diagram of a video unique value generating device provided by an embodiment of the present invention;

[0042] Figure 3 It is a structural schematic diagram of a video unique value generating device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] In order to make the technical solution of the present invention easier to understand, the technical terms that may be involved in the present invention are explained below:

[0045] Image grayscale: The process of converting an RGB image into a grayscale image is called image grayscale. The color value of each pixel on a grayscale image is also called grayscale, which refers to the color depth of a point in a black and white image, ranging from 0 to 255, with white being 255 and black being 0. Among them, the full name of RGB image is red, green and blue image, which is an additive color model that generates various colors by combining red (R), green (G) and blue (B) light of different intensities. In digital image processing, each pixel contains information about these three color channels, which together determine the color and brightness of the pixel.

[0046] File unique value calculation technology plays an important role in data identification, data deduplication and file verification. Traditional unique value algorithms include MD5, SHA and CRC, which calculate the unique value of the file according to the file content. They can map data of any length into a fixed-length summary (i.e., unique value), and the file content of the corresponding file cannot be reversed based on the unique value.

[0047] When using the traditional unique value algorithm to calculate the unique value of a video, different video file types and different clarity and quality will affect the unique value of the video file. Moreover, in the production process, after the video file content is transmitted over the network, there is a certain probability that data loss and / or data modification will occur, which will also affect the unique value of the video file. It can be seen that when using the traditional unique value algorithm to calculate the unique value of a video, the calculated unique value has poor robustness to changes in the video file type, video clarity, and video stream.

[0048] Based on this, in order to improve the robustness of video unique values, the present invention provides a method, device and equipment for generating video unique values. The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings.

[0049] Figure 1 FIG. 1 is a flow chart of a method for generating a unique video value provided by an embodiment of the present invention. Figure 1 As shown, this process includes:

[0050] Step 101: extract frames from a video according to a preset key frame extraction strategy to obtain a plurality of key frames of the video.

[0051] Specifically, since a video usually has a large number of frames, if the unique value of the video is generated based on all the video frames of the video, there are problems such as large amount of calculation and slow calculation speed. Therefore, in order to improve the calculation efficiency of the unique value and avoid conflicts (repetitions) between the unique values ​​of different videos to a certain extent, the present invention extracts frames from the video to obtain multiple key frames of the video, and the multiple key frames are used to generate the unique value of the video.

[0052] Step 102: Based on the differential scattering algorithm, obtain the feature vector of each key frame.

[0053] In the embodiment of the present invention, step 102: obtaining a feature vector of each key frame based on a differential scattering algorithm may specifically include:

[0054] (1) For each key frame, downsample the key frame.

[0055] Specifically, an average filtering algorithm can be used to downsample the key frame. The average filtering algorithm can quickly reduce the resolution of the key frame to the target resolution. Subsequently, when processing the key frame, since its resolution has been reduced, the processing efficiency of the key frame can be improved. This is conducive to improving the efficiency of generating the unique value of the video of the present invention.

[0056] In a specific example, the present invention uses an average filtering algorithm. When downsampling a key frame, the filter size used is 2*2. This filter reduces the image size of the key frame by half each time the key frame is filtered, and the filtering speed is fast. In addition, the resolution size of the key frame after compression is 4*4. In this way, by retaining the minimum features of the key frame (i.e., compressing the key frame to the greatest extent), the subsequent calculation efficiency of the key frame is maximized.

[0057] (2) Based on the differential sparse algorithm, the feature vector of the key frame after downsampling is calculated to obtain the feature value of the key frame, which is a binary string.

[0058] Specifically, first, the downsampled key frame is grayed. The graying method used can be a weighted average method, an average method, a maximum method or a minimum method. Among these graying methods, the average method has the fastest graying speed. Therefore, the present invention preferably uses the average method to gray the key frame.

[0059] The grayscale processing formula of the average value method is as follows:

[0060]

[0061] Among them, n represents the nth key frame, Represents the pixel matrix after grayscale processing of the nth key frame, and Respectively represent the values ​​of the red, green, and blue channels in the corresponding pixels. represents the pixel matrix before grayscale processing. And, from the above content, it can be known that the resolution size of the key frame after compression is 4*4, so in this case, the value of N is 4.

[0062] Then, for the grayscale pixel matrix Compare each of its adjacent left and right pixels. If the left pixel is less than or equal to the right pixel, the comparison result is Take 0, if the left pixel is greater than the right pixel, the comparison result Take 1, the corresponding calculation of this process is as follows:

[0063]

[0064] Similarly, for the pixel matrix after grayscale processing Compare each adjacent upper and lower pixel. If the upper pixel is less than or equal to the lower pixel, the comparison result is Take 0, if the upper pixel is greater than the lower pixel, the comparison result Take 1, the corresponding calculation of this process is as follows:

[0065]

[0066] Finally, the calculation results corresponding to formula (2) and formula (3) are concatenated to obtain the feature value of the key frame. Continuing with the above example, when the resolution of the key frame after compression is 4*4, the calculation results corresponding to formula (2) and formula (3) are both 12-digit features. Therefore, after concatenating the calculation results corresponding to formula (2) and formula (3), the feature value of the key frame is a 24-digit binary string.

[0067] When splicing the calculation results corresponding to formula (2) and formula (3), the calculation result of formula (3) can be spliced ​​at the end of the calculation result of formula (2). Of course, other splicing methods can also be used, and the present invention does not make specific limitations here.

[0068] (3) The eigenvalue is converted into a preset high-base numerical value to obtain the eigenvector of the key frame.

[0069] Specifically, since the characteristic value of the key frame obtained above is a binary string, its length is relatively long, so it will occupy more data storage space, and it will take a long time to perform string matching on it.

[0070] Based on this, in order to overcome the above problems, the present invention converts the eigenvalue of the key frame into a preset high-radix value, and determines the eigenvalue after high-radix conversion as the eigenvector of the key frame. Converting the eigenvalue into a high-radix value can compress the number of bits of the eigenvalue, thereby reducing the data storage space occupied by the eigenvalue and shortening the time required for string matching.

[0071] Also, in some cases, such as when the hash function is not designed properly, there may be conflicts in the hash value, that is, multiple different inputs are mapped to the same output value. However, this problem will not occur with high-base feature mapping. Specifically, high-base feature mapping has the characteristics of uniqueness and invariance, that is, the same binary number will only be mapped to the same high-base number, and different binary numbers are mapped to different high-base numbers. Therefore, the present invention converts the feature value into a preset high-base value instead of using a hash function to perform hash calculation on the feature value, which is beneficial to improving the uniqueness of the unique value (that is, it is beneficial to avoid conflicts between unique values ​​of different videos).

[0072] It should be noted that in the field of mathematics, a high base refers to a base greater than or equal to 10, that is, a base greater than or equal to 11. In the present invention, those skilled in the art can select any high base as the preset high base of the present application according to actual needs, and the present invention is not specifically limited here.

[0073] In a specific example, the preset high base is base 32. Base 32 is a commonly used base, which does not have special characters, thereby effectively avoiding data anomalies during data calculation, transmission and storage.

[0074] Step 103: Generate a unique value of the video according to the feature vector.

[0075] The embodiment of the present invention adopts the above technical solution, a method for generating a unique value of a video, including: extracting frames from a video according to a preset key frame extraction strategy to obtain multiple key frames of the video, then obtaining a feature vector of each key frame based on a differential scatter array algorithm, and finally generating a unique value of the video based on the feature vector. Based on this, since in the production link, after the video file content is transmitted over the network, the video frame will not suffer from data loss and / or data modification, and the present invention uses the feature vectors of multiple key frames of the video to generate a unique value of the video, so that the unique value generated by the present invention has high robustness to changes in the video stream (in the production link, after the video file content is transmitted over the network, data loss and / or data modification occurs); and, since the feature vector of the key frame is obtained based on the differential scatter array algorithm, the unique value generated according to the feature vector has high robustness to changes in the video file type and changes in the video clarity.

[0076] In the embodiment of the present invention, step 101: extracting frames from a video according to a preset key frame extraction strategy may specifically include:

[0077] (1) Based on a preset key frame position calculation formula, the key frame position of the video is calculated to obtain a calculation result; the calculation result includes position values ​​of multiple video frames, and the position value represents the ranking of the corresponding video frame among all video frames in the video.

[0078] The calculation result may specifically include position values ​​of a preset number of video frames, for example, including position values ​​of 8 video frames.

[0079] Specifically, the key frame position calculation formula can be as follows:

[0080]

[0081] Among them, A n represents the nth key frame, m represents the total number of frames in the video, and M represents the number of key frames. For example, when the number of key frames is 8, M is equal to 8. Express Round down, that is, take the value not greater than The maximum integer, for example, The result is 12.5, then Take 12.

[0082] By using formula (4) to calculate the key frame position of the video, all the position values ​​obtained form an arithmetic progression, and the tolerance of the arithmetic progression is related to the total number of frames of all video frames. In other words, formula (4) can achieve uniform frame extraction of the video, which is conducive to improving the representativeness of the key frame to the video, and the key frame is used to generate a unique value of the video, so it is conducive to further improving the uniqueness of the unique value.

[0083] (2) Extract frames from the video based on the calculation results.

[0084] Specifically, the present invention can directly determine that the video frames corresponding to the position values ​​calculated according to formula (4) are all key frames.

[0085] In addition, considering that empty frames may appear in the video frames corresponding to the position values ​​calculated according to formula (4), in the embodiment of the present invention, the video is extracted based on the calculation result, which may specifically include:

[0086] (1) Determine whether there are empty frames in the video frames corresponding to all position values.

[0087] (2) If there are no empty frames in the video frames corresponding to all the position values, it is determined that the video frames corresponding to the respective position values ​​are all key frames.

[0088] (3) If there are empty frames in the video frames corresponding to all the position values, then for each position value corresponding to the empty frame, add the position value to a preset value to obtain a new position value. If the first video frame corresponding to the new position value is not an empty frame, the first video frame is determined to be a key frame. If the first video frame is an empty frame, continue to add the new position value to the preset value until the second video frame corresponding to the latest position value is not an empty frame, and the second video frame is determined to be a key frame.

[0089] And, for other position values ​​except the position value corresponding to the empty frame, the video frame corresponding to the position value is determined to be a key frame.

[0090] In a specific example, assuming that the number of key frames is 8 and the preset value is 7, the position values ​​calculated according to formula (4) are: 1, 101, 201, 301, 401, 501, 601, 701, and the video frame corresponding to 301 is an empty frame. In this case, for 301 (i.e., the position value corresponding to the empty frame), add it to 7 (i.e., the preset value) to obtain 308, and judge whether the 308th video frame of the video is an empty frame, and judge that the 308th video frame of the video is an empty frame. Therefore, add 308 to 7 to obtain 315, then judge whether the 315th video frame of the video is an empty frame, and judge that the 315th video frame of the video is not an empty frame, so it is determined that the video frame is a key frame.

[0091] For other position values ​​except 301, it is determined that the video frames corresponding to these position values ​​are all key frames. Therefore, in this example, the 1st, 101st, 201st, 315th, 401st, 501st, 601st and 701st video frames of the video are finally determined to be the key frames of the video.

[0092] It should be noted that the preset value is freely set by technical personnel in this field according to actual needs. Taking into account that empty frames are often continuous empty frames, the preset value needs to be set to a larger value. For example, the preset value is equal to 7. This is conducive to finding the non-empty frame corresponding to an empty frame as soon as possible, thereby improving the extraction efficiency of key frames.

[0093] In addition, the present invention can also use other methods to extract key frames of the video. For example, multiple video frames of the video are randomly extracted as its key frames. For another example, when the total number of frames of the video is an odd number, the first three video frames, the middle three video frames and the last three video frames of the video are extracted as its key frames. When the total number of frames of the video is an even number, the first three video frames, the middle four video frames and the last three video frames of the video are extracted as its key frames.

[0094] In the embodiment of the present invention, step 103: generating a unique value of the video according to the feature vector may specifically include:

[0095] Generate a unique value for the video based on the feature vector and the total number of frames in the video.

[0096] In a specific implementation, by executing the above solution, the feature vector of each key frame is obtained, and then the total number of frames of the video is converted into a value of the same base as the feature vector, and finally, the feature vectors of all key frames and the total number of frames of the video are spliced ​​to obtain a unique value of the video. The total number of frames of the video can be spliced ​​after the feature vectors of all key frames, that is, the total number of frames of the video is located at the tail of the unique value.

[0097] In this embodiment, by introducing the total number of frames of the video into the unique value of the video, the video information in the unique value is enriched, thereby further improving the uniqueness of the unique value.

[0098] In addition, the present invention can also directly concatenate the feature vectors of all key frames to generate a unique value of the video.

[0099] Based on a general inventive concept, the present invention also provides a device for generating a unique video value. Figure 2 Schematic diagram of a device for generating a unique video value provided by an embodiment of the present invention. Figure 2 As shown, the device comprises:

[0100] The frame extraction module 21 is used to extract frames from the video according to a preset key frame extraction strategy to obtain multiple key frames of the video.

[0101] The acquisition module 22 is used to acquire the feature vector of each key frame based on a differential scattering algorithm.

[0102] The generating module 23 is used to generate a unique value of the video according to the feature vector.

[0103] Optionally, the frame extraction module 21 may specifically include:

[0104] The calculation unit is used to calculate the key frame position of the video based on a preset key frame position calculation formula to obtain a calculation result; the calculation result includes position values ​​of multiple video frames, and the position value represents the ranking of the corresponding video frame among all video frames in the video.

[0105] The frame extraction unit is used to extract frames of the video according to the calculation result.

[0106] Optionally, the calculation result specifically includes position values ​​of a preset number of video frames.

[0107] All position values ​​form an arithmetic progression, and the tolerance of the arithmetic progression is related to the total number of all video frames.

[0108] Optionally, the frame extraction unit may be specifically used for:

[0109] (1) Determine whether there are empty frames in the video frames corresponding to all position values.

[0110] (2) If there are no empty frames in the video frames corresponding to all the position values, it is determined that the video frames corresponding to the respective position values ​​are all key frames.

[0111] If there are empty frames in the video frames corresponding to all the position values, then for each position value corresponding to the empty frame, add the position value to a preset value to obtain a new position value. If the first video frame corresponding to the new position value is not an empty frame, the first video frame is determined to be a key frame. If the first video frame is an empty frame, continue to add the new position value to the preset value until the second video frame corresponding to the latest position value is not an empty frame, and the second video frame is determined to be a key frame; and, for other position values ​​except the position value corresponding to the empty frame, determine that the video frame corresponding to the position value is a key frame.

[0112] Optionally, the acquisition module 22 may be specifically used for:

[0113] (1) For each key frame, downsample the key frame.

[0114] (2) Based on the differential sparse algorithm, the feature vector of the downsampled key frame is calculated to obtain the feature value of the key frame, which is a binary string.

[0115] (3) The eigenvalue is converted into a preset high-base numerical value to obtain the eigenvector of the key frame.

[0116] Optionally, the high base is preset to base 32.

[0117] Optionally, the generating module 23 may be specifically used for:

[0118] Generate a unique value for the video based on the feature vector and the total number of frames in the video.

[0119] Based on a general inventive concept, the present invention also provides a video unique value generating device. Figure 3 Schematic diagram of a device for generating a unique video value provided by an embodiment of the present invention. Figure 3 As shown, the device 300 includes:

[0120] at least one processor 310; and,

[0121] A memory 330 is communicatively connected to at least one processor 310; wherein,

[0122] The memory 330 stores instructions 320 that can be executed by at least one processor 310 . The instructions 320 are executed by the at least one processor 310 so that the at least one processor 310 can implement the method for generating a unique video value as described above.

[0123] For the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the order of the actions described, because according to the present invention, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0124] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0125] The steps in the methods of the embodiments of the present invention may be adjusted in order, combined, or deleted according to actual needs, and the technical features recorded in the embodiments may be replaced or combined.

[0126] The modules and sub-modules in the devices and terminals of the various embodiments of the present invention may be combined, divided, or deleted according to actual needs.

[0127] In the several embodiments provided by the present invention, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the terminal embodiments described above are only schematic, for example, the division of modules or submodules is only a logical function division, and there may be other division methods in actual implementation, such as multiple submodules or modules can be combined or integrated into another module, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0128] The modules or submodules described as separate components may or may not be physically separated, and the components of the modules or submodules may or may not be physical modules or submodules, that is, they may be located in one place, or they may be distributed on multiple network modules or submodules. Some or all of the modules or submodules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0129] In addition, each functional module or submodule in each embodiment of the present invention may be integrated into one processing module, or each module or submodule may exist physically separately, or two or more modules or submodules may be integrated into one module. The above-mentioned integrated modules or submodules may be implemented in the form of hardware or in the form of software functional modules or submodules.

[0130] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0131] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly by hardware, software units executed by a processor, or a combination of the two. The software units may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0132] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0133] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for generating a unique video value, characterized in that: include: Extracting frames from the video according to a preset key frame extraction strategy to obtain multiple key frames of the video; Based on the differential scattering algorithm, obtaining the feature vector of each key frame; A unique value of the video is generated according to the feature vector.

2. The method for generating a unique video value according to claim 1, characterized in that: Extracting frames from the video according to the preset key frame extraction strategy specifically includes: Based on a preset key frame position calculation formula, key frame positions are calculated for the video to obtain a calculation result; the calculation result includes position values ​​of multiple video frames, and the position value indicates the ranking of the corresponding video frame among all video frames in the video; According to the calculation result, the video is frame extracted.

3. The method for generating a unique video value according to claim 2, characterized in that: The calculation result specifically includes position values ​​of a preset number of video frames; All the position values ​​form an arithmetic progression, and the tolerance of the arithmetic progression is related to the total number of frames of all the video frames.

4. The method for generating a unique video value according to claim 2, characterized in that: The extracting frames of the video according to the calculation result specifically includes: Determine whether there are empty frames in the video frames corresponding to all the position values; If there are no empty frames in the video frames corresponding to all the position values, it is determined that the video frames corresponding to the position values ​​are all key frames.

5. The method for generating a unique video value according to claim 4, characterized in that: The step of extracting frames from the video according to the calculation result specifically includes: If there are empty frames in the video frames corresponding to all the position values, then for each position value corresponding to the empty frame, add the position value to a preset value to obtain a new position value; if the first video frame corresponding to the new position value is not an empty frame, determine that the first video frame is the key frame; if the first video frame is an empty frame, continue to add the new position value to the preset value until the second video frame corresponding to the latest position value is not an empty frame, and determine that the second video frame is the key frame; For the other position values ​​except the position value corresponding to the empty frame, the video frame corresponding to the position value is determined as the key frame.

6. The method for generating a unique video value according to claim 1, characterized in that: The step of obtaining the feature vector of each key frame based on the differential scattering algorithm specifically includes: For each of the key frames, downsampling the key frame; Based on the differential sparse algorithm, characteristic vectors are calculated for the key frame after downsampling to obtain characteristic values ​​of the key frame, where the characteristic values ​​are binary strings; The characteristic value is converted into a numerical value of a preset high base to obtain a characteristic vector of the key frame.

7. The method for generating a unique video value according to claim 6, characterized in that: The preset high base is base 32.

8. The method for generating a unique video value according to claim 1, characterized in that: Generating a unique value of the video according to the feature vector specifically includes: A unique value of the video is generated according to the feature vector and the total number of frames of the video.

9. A video unique value generating device, characterized in that: include: A frame extraction module, used to extract frames from a video according to a preset key frame extraction strategy to obtain a plurality of key frames of the video; An acquisition module, used for acquiring a feature vector of each key frame based on a differential scatter algorithm; A generating module is used to generate a unique value of the video according to the feature vector.

10. A video unique value generating device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to implement the method for generating a unique video value according to any one of claims 1 to 8.