DUPLICATE MEDIA FILE IDENTIFICATION
Systems, devices, and automated processes are described to determine whether a received media file is a duplicate of one or more media files already existing in a data store. Systems and automated processes may receive a media file, generate a vector identifier for the received media file using a machine learning model, determined the nearest media files already stored in the data store based on vector identifiers associated with the already-stored media files, generate a plurality of segment representations for the respective media files, generate sets of hash values based on the segment representations, and compare the hash values to determine a match metric. Various embodiments may determine to not store the received media file if the match metric indicates that the received media file is a duplicate or similar enough to an already-stored media file.
Latest DISH Network Technologies India Private Limited Patents:
The following generally relates to media file storage, for example in content management systems. More particularly, the following relates to systems, devices, and automated processes to identify duplicate or near-duplicate media files to reduce storage requirements.
BACKGROUNDA wide range of systems and services exist that store and provide media files, for example cloud storage platforms, content delivery networks (CDNs), social media platforms, media streaming platforms, advertising servers, digital video recorders (DVRs), and the like. Storage requirements and costs for such systems and services continue to increase dramatically.
For example, media-heavy streaming services rely on CDNs and other networks to deliver large audio and/or video files to users across the globe, and focus on reducing latency by caching content in geographically distributed servers. Video files, especially high-definition and 4K content, require significant storage resources, for example multi-terabyte or even petabyte-level storage systems. These services may use techniques such as compression, transcoding, and adaptive bitrate streaming to support efficient storage and retrieval. These techniques, however, do not prevent duplicative media files from taking unnecessary storage space.
For further example, advertising servers store advertisements by hosting ad files (such as banners, video ads, or rich media) on dedicated servers or cloud platforms. Advertisements typically come from advertisers who use ad networks or demand-side platforms (DSPs) to create and manage their campaigns. These platforms allow advertisers to upload their creative assets and set targeting parameters, such as demographics, location, and user behavior. In some cases, the creative assets, including audio, still images, and/or video, may be reused among one or more ad campaigns and/or advertisers, leading to unnecessary storage of duplicate assets. Similar problems exist for services that store and provide reels, short clips, and/or the like.
A substantial desire therefore exists to build systems, devices and automated processes that identify duplicate or near-duplicate media files for the purpose of reducing storage requirements.
BRIEF SUMMARYVarious embodiments relate to systems, devices, and automated processes to identify duplicate media files. Systems and automated processes may receive a media file, generate a vector identifier for the received media file using a machine learning model, determine the nearest media files already stored in the data store based on vector identifiers associated with the already-stored media files, generate a plurality of segment representations for the respective media files, generate sets of hash values based on the segment representations, and compare the hash values to determine a match metric. Various embodiments may determine to not store the received media file if the match metric indicates that the received media file is a duplicate or similar enough to an already-stored media file.
In various embodiments, an automated process may be performed by a media management system comprising a processor, an input interface, and an interface to a data store, the automated process comprising: receiving, via the input interface, a media file; generating, using a machine learning model (MLM) executing on the processor, a vector embedding based on the received media file; comparing the generated vector embedding to one or more predetermined vector embeddings, wherein each predetermined vector embedding corresponds to a respective media file stored in the data store; identifying, by the processor and based on the comparison of vector embeddings, a candidate media file; generating, by the processor, a plurality of time slices of the received media file; comparing, by the processor, the plurality of generated time slices to a plurality of time slices of the candidate media file; and calculating, by the processor and based on the comparison of time slices, a match metric describing a likelihood that the candidate media file matches the received media file.
Still other embodiments provide a media management system comprising a processor, non-transitory storage, and an input interface, wherein the non-transitory storage comprises computer-executable instructions that, when executed by the processor, perform an automated process that comprises: receiving, via the input interface, a media file; generating, using a machine learning model (MLM), a vector embedding based on the received media file; comparing the generated vector embedding to one or more predetermined vector embeddings, wherein each predetermined vector embedding corresponds to a respective media file stored in a data store; identifying, based on the comparison of vector embeddings, a candidate media file; generating a plurality of time slices of the received media file; comparing the plurality of generated time slices to a plurality of time slices of the candidate media file; and calculating, based on the comparison of time slices, a match metric describing a likelihood that the candidate media file matches the received media file.
Still other embodiments provide an automated process performed by a media management system comprising a processor, and an input interface, the automated process comprising: receiving, via the input interface, a media file, wherein the received media file comprises a first audio stream and a first video stream; identifying, by the processor, a candidate media file, wherein the candidate media file comprises a second audio stream and a second video stream; generating, by the processor, a first plurality of time slices corresponding to the first video stream and a second plurality of time slices corresponding to the first audio stream; performing, by the processor, a first comparison of the first plurality of time slices to a third plurality of time slices of the candidate media file; performing, by the processor, a second comparison of the second plurality of time slices to a fourth plurality of time slices of the candidate media file; and determining, by the processor and based on the first and second comparisons, a likelihood that the candidate media file matches the received media file.
These and other example embodiments are described in increasing detail below.
The following detailed description is intended to provide several examples that will illustrate the broader concepts that are set forth herein, but it is not intended to limit the invention or the application and uses of the invention. Furthermore, there is no intention to be bound by any theory presented in the preceding background or the following detailed description.
According to various embodiments, a media management system may identify duplicate media files or substantially duplicate media files to optimize storage of media files, which can ultimately help in serving better and more reliable content. In some embodiments, substantially duplicate media files include those media files in which any differences are non-discernable or otherwise unimportant to the intended recipient of the media file(s). The media management system may include methods and/or apparatus to create vector identifier(s) for each incoming media file based on the content of the media file, such as key frames, video streams, audio streams, portions thereof, and/or the like. The media management system may segment the media file, and may use a machine learning model to generate the vector identifiers based on the segments. The media management system may identify possible duplicates by using the vector identifiers, and may perform a more in-depth analysis of the media file segments to determine if the incoming media file is a duplicate or near-duplicate of a media file already existing or otherwise stored in a storage available to the system.
Using media management systems and methods according to the technology described herein allows for real time (or near real-time, accounting for some delays inherent in processing, data communications and the like) identification of duplicate media files and optimization of media file storage in a manner not previously available. Manually identifying duplicate content stored on various content platforms and servers is not currently possible given the rapidly increasing amount and type of content being stored. The use of a media management system allows for reduction in operating and storage costs. The media management systems and methods may be suitably implemented as part of a DVR, CDN, content management system (CMS), advertising server, cloud service, cloud storage platform, social media platform, media streaming platform, personal computing devices, and/or the like.
In some embodiments, the media management system 100 may be implemented via program instructions configured to run on a computing device (e.g., implemented with conventional hardware, virtualized hardware, and/or cloud-based resources as desired) such as a computer server that receives media files for storage, playback, transmission, or the like. The data received by the media management system 100 may be locally cached or otherwise stored in any sort of non-transitory memory, for example the memory 104 (e.g., solid state memory, magnetic or optical memory, cloud-based sources, and/or the like) for subsequent retrieval and processing as desired and as described herein.
The media management system 100 may include an internal or external interface, for example I/O 106, to a data store 110. The data store 110 may be internal or external to the media management system 100. For example, a media management system 100 may include a DVR having internal data storage. The media management system 100 can process and generate information as described herein and can store the information in the data store 110. In some embodiments, the media management system 100 stores received and/or generated data in a data store 110 for later retrieval, as desired. The data store 110 may be internal or external to the media management system 100 as desired.
The data store 110 may comprise any one or more suitable repositories where data is stored, managed, and accessed. The data store 110 may include, for example, a database, media file storage, a collection of files, a cloud storage system, and/or the like. The data store 110 may include a persistent database, a relational database, a vector database (also referred to as a vector store), a graph database, a key-value database, an unstructured database, a spreadsheet, a combination of database types, and/or the like.
In some embodiments, the data store 110 may include media file storage, a persistent database, and a key-value database. The media file storage may include any suitable data storage adapted to store media files, such as hard drives, memory, cloud storage, and/or the like. The persistent database may be adapted to store metadata information for each corresponding media file stored or otherwise accessible by the media management system 100. The persistent database may also be adapted to store vector identifier(s) associated with each media file stored or otherwise accessible by the media management system 100. The key-value database may be adapted to store a mapping between each vector identifier and one or more hash values, where the vector identifier and the one or more hash values are associated with the same media file.
In some embodiments, the key-value database may be adapted for faster access than the persistent database. For example, the key-value database may be cached (e.g., shorter term memory), may include a fast access database, or the like. In some embodiments, the key-value database may have limited storage capacity in view of performance requirements. Older data may be removed as the key-value database fills up, and removed data may need to be regenerated if there is a subsequent request for such data (e.g., the corresponding vector identifier was used to access the key-value database). In some embodiments, the persistent database may be adapted to store information, such as vector identifiers, for a longer time period.
The media management system 100 may be communicatively coupled, for example via the I/O 106, to a network 120 or other data communication medium. The network 120 may include a wired or wireless work, virtualized connections, or the like, by which the media management system 100 can collect and transmit various data, for example related to media files as described herein.
In some embodiments, the media management system 100 may receive one or more media files on an input interface, for example via the I/O 106. For example, the media management system 100 may download or otherwise receive media files from a content source 130, whether directly, via the network 120, and/or by any other suitable systems or methods. The content source 130 may include any suitable source of media files, such as a media streaming platform, camera, advertiser, in-vehicle camera system, content delivery network, and/or the like. Any number of content sources 130 may be directly and/or indirectly coupled with the media management system 100, for example multiple streaming platforms, multiple advertising servers, and/or the like. In various embodiments, media files and related data may be obtained by the media management system 100 by querying various content sources 130, receiving media files from the content sources 130, downloading the media files from other connected storage, or any other suitable method or combination of methods.
In some embodiments, the media management system 100 may store, process, format, and/or forward received media files for presentation by a coupled media player 140. The media player 140 may include any suitable system and/or method for presenting the media file to a user or other consumer of media, and may include a display device (e.g., television), audio device (e.g., speakers), media receiver device, placeshifting device, software media player, and/or the like. The media player 140 may be coupled directly with the media management system 100 or may be indirectly coupled, for example via the network 120. Other embodiments may include other systems and devices in addition to those illustrated in
In various embodiments, a media file may include a digital file that stores and contains single- or multi-media content. A media file may include audio information such as an audio stream, visual information such as a video stream or graphics, metadata related to the media file, and/or the like. Examples of media files include video files, music files, image files, and/or the like. A video stream may be synchronized with an audio stream in a video file, for example. The media file may be in any suitable format, for example using known or future audio and/or video codecs. Exemplary codecs may include MPEG 1, MPEG 2, MPEG 4, H. 264, AAC, Advanced Audio Codec (AAC), MP3, or the like.
The metadata may include information such as one or more dates relevant to the media file (such as creation, insertion into the media management system 100, and/or the like), media length, title, owner, source, author, copyright information, one or more tags related to the contents of the media file, and/or the like. In various embodiments, media files received by the media management system 100 may be automatically tagged with metadata or other information about the data source, the method of collection, dates and/or times of collection, and/or any other information that may be desired. Some embodiments may also filter the received media files and/or metadata as desired to remove unwanted or unnecessary data that would otherwise consume excess storage or require additional processing.
The candidate identification process 200 suitably includes the broad functions of obtaining a media file, generating an identifier based on the media file, comparing the identifier to identifiers for already-stored media files, and identifying a list of candidate media files based on the comparison. In some embodiments, candidate media files may include and may be chosen from media files already stored according to the media management system 100 and available for provision by the media management system 100 or other system incorporating the media management system 100. For example, the media management system 100 may be implemented in a placeshifting device, and the placeshifting device may have a number of advertisement media files already stored in a memory 104, data store 110, or the like. The candidate media files in this example may include one or more of the already-stored advertisements, and those already-stored candidate media files may have been previously processed through the methods described herein.
Referring to
The candidate identification process 200 may, at step 220, generate an identifier associated with the principal media file. The identifier may include any suitable representation derived from the intrinsic properties of a media file that allows for identification of the media file. In some embodiments, the identifier may include a vector embedding, which may also be referred to as a vector identifier. A vector identifier may represent a media file as one or more high-dimensional vectors, for example capturing the media file's semantic features in a numerical form. The vector identifier may be generated based on the contents of the principal media file. As will be described in more detail below, step 220 may include the use of a vector generation process that uses an MLM to create the vector identifier for the principal media file. In some embodiments, the identifier may include a hash such as a perceptual or content hash, a fingerprint such as an acoustic or temporal fingerprint, keypoint descriptors, and/or the like.
The candidate identification process 200 may, at step 230, compare the generated vector identifier (or other suitable identifier) from step 220 to respective identifiers associated with the already-stored media files. For example, vector identifiers associated with the already-stored media files may also be stored in any suitable storage device, for example in a persistent database of the data store 110. Thus, each already-stored media file may also have one or more associated vector identifiers that are also already-stored and available for use by the media file comparison process 200.
Thus, in some embodiments, the already-stored media files may have been previously processed by the media file comparison process 200 during which a respective step 220 generated a corresponding vector identifier for each such already-stored media files. The previously-generated vector identifiers may have been stored in the persistent database as associated with the corresponding media files for future reference by the media file comparison process 200. The previously-generated vector identifiers may be referred to herein as predetermined vector identifiers or predetermined vector embeddings. While storing generated vector identifiers can provide speed and processing benefits, other embodiments may include step 230 generating vector identifier(s) for already-stored media files in real time instead of using previously generated and stored vector identifiers.
As described above, step 230 may include comparing the generated vector identifier for the principal media file to vector identifiers associated with the already-stored media files. The comparison may be used to determine, select, or otherwise find the already-stored media files that are closest to the principal media file. Any suitable method(s) may be used to determine the most closely related media files based on the respective identifiers.
In some embodiments, to find the closely-related media files, step 230 may compare the respective vector identifiers using any suitable method(s). In some embodiments, step 230 includes comparing vector identifiers using an MLM. In some embodiments, step 230 includes comparing vector identifiers using similarity measures, where media files having similar vector representations are considered more closely related. Other suitable methods may be used.
Exemplary similarity measures may include, but are not limited to, cosine similarity, Euclidean distance, K-nearest neighbors, approximate nearest neighbors, other nearest neighbor searches, and/or the like. For example, nearest neighbor search may include a proximity search that finds the vector(s) in the set of previously-generated vector identifiers that are closest or otherwise most similar to the generated vector identifier for the principal media file. In various embodiments, the closeness of vector identifiers may be determined in terms of a dissimilarity function.
The candidate identification process 200 may, at step 240, identify one or more candidate media files based on the comparison(s) of step 230. In various embodiments, the closest media file(s), as determined by the comparison(s), may be considered the candidate media file(s). Step 240 may identify any suitable number of candidate media files. In some embodiments, if no suitable candidate media files are identified in step 240, the search for duplicate media files may be halted such that subsequent processes such as a duplicate analysis process 400 and hash generation process 500 are not performed.
In some embodiments, step 240 may determine the single closest media file, based on the vector identifiers, as the only candidate media file. In some embodiments, step 240 may determine all media files having a similarity measure above a threshold (whether predetermined or otherwise) as candidate media files. In some embodiments, step 240 may determine the closest N media files as the candidate media files, wherein N may be predetermined. For example, step 240 may determine the closest 1, 3, 5, 10, 50, 100, or the like media files as the candidate media files.
It will be understood that steps 230 and 240 may be included together as part of a similarity search or other such methods. For example, in some embodiments, steps 230 and 240 may stop searching for candidate media files after one or more media files having a similarity measure above a threshold have been found, thus not requiring a comparison by step 230 for every already-stored media file.
A media file may be segmented in any suitable manner and according to any suitable methods. In some embodiments, a media file may be divided into portions that have a defined length, such that the totality of portions defines the media file. Accordingly, a media file may be divided into successive segments each having a length of one-tenth second, one-half second, one second, two seconds, five seconds, or the like. Some embodiments may include dividing a media file into portions that have variable lengths, for example shorter lengths at the beginning and/or end of the media file and longer lengths in between, longer lengths at the beginning and/or end and shorter lengths in between, or any other suitable division. Exemplary embodiments described herein may refer to segments having a length of one second, but it will be understood that any suitable segment length may be used.
Accordingly, a media file may for example be divided into one second segments. Further, media files having multiple content items, streams, or the like, for example video files containing both an audio stream and a corresponding video stream, may have each content item/stream/etc. segmented separately. Media files having multiple content streams may have each content stream segmented using the same time period (e.g., one second audio and video segments), according to different time periods (e.g., one second video segments and one-half second audio segments), or the like.
The vector generation process 300 may generate a representation (or time slice) of each segment of the media file according to any suitable method. By way of exemplary embodiment, for a media file having a video stream and an audio stream, the vector generation process 300 may, at step 310, create a representation of each segment of the video stream extracted from the media file, and may, at step 320, create a representation of each segment of the audio stream extracted from the media file. Each of the audio and video segments may be, for example, one second or any other suitable time period in length. Steps 310 and 320 may, in some embodiments, perform both the respective segmenting of the media file and the time slice generation.
In some embodiments, step 310 may include extracting a consolidated single image for each second (or other time period) of the video stream. Each consolidated image may be a time slice or representation of its respective segment. For a one-second time period, each consolidated image may be referred to as a per-second frame. For example, for a media file containing a 15-second advertisement, step 310 may extract 15 per-second frames. In some embodiments, a consolidated image may be created in step 310 by grouping all frames of the video stream from a particular second in a way that captures the maximum information about the group of frames which constitute that particular second of the video stream.
For example, if a video stream is encoded at 30 frames per second (FPS), step 310 may include extracting the consolidated image by arranging each frame from a particular second into a grid (e.g., a 5×6 grid). Step 310 may further include reducing resolution of the consolidated image, for example in a manner that relevant information is captured and preserved. In some embodiments, irrelevant parts of each frame may be discarded if there is repetitive content, while keeping unique aspects of each frame. For example, for a video stream of a person walking, information related to the person may be kept while a static background may be discarded. Step 310 may include any suitable method for creating the consolidated images or otherwise creating a suitable representation of each video stream segment, for example based on identifying relevant information from each segment.
Similarly, in some embodiments, step 320 may include extracting and creating a representation for each segment (e.g., per-second) of an audio stream. The representation of an audio stream segment may include an audio sample or other suitable representation of the information contained in the audio stream segment. In some embodiments, step 320 may include any suitable methods to preserve relevant information from the audio stream segment and discard irrelevant information. For example, some such methods may include capturing the higher frequencies of the audio stream segment, capturing a frequency range from the audio stream segment, determining an average volume of the segment, removing frequencies not relevant to human hearing, and/or the like.
The vector generation process 300 may, at step 330, provide the generated time slices (segment representations) to a MLM for creation of a vector embedding or other suitable identifier. Step 330 may use the generated time slices from steps 310 and 320 as input to the MLM and may receive one or more vector identifiers as an output from the MLM. In some embodiments, step 330 may include providing, to the MLM, each time slice for an audio stream of the media file and each time slice for a video stream of the media file. For example, for a media file containing a 15-second advertisement, step 330 may include providing 15 per-second frames and 15 per-second audio samples to the MLM, and receiving one generated vector identifier as output from the MLM based on the 30 input time slices. In some embodiments, the vector identifier generated by the MLM may be an array of any suitable size. For example, each vector identifier may be a one-dimensional array of size (having number of elements) 256, 512, 1024, or the like.
Accordingly, in some embodiments, the media management system 100 may use one or more machine learning (ML) models, or a MLM system having one or more machine learning models (MLMs) working in cooperation, each for example trained based on a machine learning algorithm, to ingest the generated time slices. In some embodiments, the media management system 100 may also use one or more MLMs to perform the time slice generation of steps 310 and 320. A ML algorithm may comprise a procedure run on a training data set to create a ML model, and a ML model may be configured to receive new input data and generate an estimation, prediction, classification, response, vector, or the like for the new input data. An ML model may also be referred to as an AI (artificial intelligence) model.
An MLM, or MLM system which may include multiple MLMs and may be configured to use the MLMs in connection with each other (e.g., using supporting processes), may be stored in the memory 104 of the media management system 100, in the data store 110, or in any other suitable non-transitory memory accessible by the media management system 100. Exemplary supporting processes may include automated routines to perform functions that facilitate providing input to and managing output from a MLM, including filtering, formatting, data store 110 access, or the like. The MLM and/or MLM system may include an application programming interface (API) which may be used by the media management system 100 for transferring data, processing data, outputting results, updating/retraining one or more MLMs, and/or the like. The media management system 100 processor 102 may execute operating routines including the MLMs, and may generate actions and output based on one or more of the generated time slices. In some embodiments, the MLM may include a suitable ML model trained to create vector embeddings from input time slices (e.g., an embedding model). For example, the embedding model may include a convolutional neural network (CNN), 3D CNN, recurrent neural network (RNN), vision transformer, multimodal models, acoustic fingerprinting models, and/or the like.
The ML algorithm(s) for the ML models discussed herein may be implemented on any suitable computing system. In some embodiments, the media management system 100 may be configured to perform the ML algorithm. In some embodiments, a separate computing system may be configured to perform the ML algorithm. The ML algorithm may be configured to construct and/or retrain a MLM based on a training data set. The training data set may comprise example inputs and their actual or expected outputs. In some embodiments, the training data set may comprise time slice representations of media files as input, and expected vector identifiers as outputs. For example, the MLM may be trained such that related videos have closer vector identifiers, and/or substantially same videos have the same or substantially the same vector identifiers.
The MLM may be retrained from time to time to increase accuracy of the generated vector embeddings. For example, the MLM may be updated over time, for example as the training data set becomes larger, as data (e.g., media files) become older or less relevant, or the like. In some embodiments, the media management system 100 may be provided with the updated MLMs from time to time.
The ML algorithm may be configured to perform machine learning using various methods, such as decision tree learning, associates rule learning, artificial neural networks, deep learning, convolutional neural networks, recurrent artificial neural networks, long short term memory neural networks, inductive logic programming, support vector machines, clustering, random forest, Bayesian networks, reinforcement learning, supervised/unsupervised learning, representation learning, similarity and metric learning, sparse dictionary learning, genetic algorithms, k-nearest neighbor (KNN), among others.
As discussed above, the one or more ML algorithms are configured to perform a particular task, for example training a MLM to create a vector embedding for a collection of generated time slices of a media file. The particular task(s) for which the MLM is trained may vary based on, for example, the type of media management system 100, the type of media files supported by the media management system 100 (e.g., advertising, movies, short video clips, streaming audio, or the like), the anticipated amount of time slices per media file, tradeoffs between accuracy and speed in determining vector identifiers, and so on.
As discussed above, in some embodiments the MLM system may include an embedding model (EM) that converts time slices or other media file segment representations into a numerical representation, for example vector(s) of numbers reflecting the semantic meaning of the time slices and creating a unique identifier for a particular media file. In some embodiments, embedding models may support a semantic search of the media files, for example supporting step 240 of the candidate identification process 200. The distance between vectors of media files can measure the relationship between the various media files, and a similarity search may be performed on currently-stored vector identifiers associated with currently-stored media files to find the closest results to a vectorized principal media file, for example.
Referring still to
In some embodiments, step 340 may store the vector identifier only after the media management system 100 determines that the associated principal media file is not a duplicate or is otherwise to be stored in media file storage. In other words, if the media management system 100 determines that the associated principal media file is a duplicate of a media file already stored in the media file storage, the media management system 100 may not store the media file and accordingly may not store the associated vector identifier generated in step 330. In some embodiments, step 340 may temporarily store the generated vector identifier, for example in the memory 104, in the persistent database, or the like, until a determination is made whether to store the associated media file in the media file storage.
The duplicate analysis process 400 may suitably include the broad functions of generating hashes for the principal and candidate media files, determining a match metric based on the hashes, determining whether the principal media file matches one of the already-stored media files based on the match metric, and determining whether to store the incoming media file. A match metric may describe or otherwise indicate a likelihood that the candidate media file matches the principal media file.
Referring to
In some embodiments, step 410 may include creating a hash value for each time slice of the principal media file. A hash value may be created for each time slice of the principal media file. For example, for a media file containing a 15-second advertisement, step 410 may include creating a hash for each of the 15 per-second frames and for each 15 per-second audio samples, resulting in 15 video-related hashes and 15 audio-related hashes. Hash values may be created by a hash generator, for example according to the hash generation process 500 described below.
In some embodiments, step 420 may include creating a hash value for each time slice of one or more of candidate media files. Similar to step 410, a hash value may be created for each time slice of the candidate media file. In some embodiments, the hash values for a candidate media file may be already stored in the data store 110 or other storage, for example in the key-value database. In some such embodiments, step 420 may include retrieving the hash values for the candidate media file from storage, for example according to the vector identifier for the candidate media file, instead of regenerating the respective hash values.
In some embodiments, step 430 may include generating a match metric for a principal media file—candidate media file pairing (referred to herein as a principal-candidate pairing) based on the hash values from steps 410 and 420. Step 430 may include comparing the multiple hash values for the principal media file to the multiple hash values for the candidate media file under consideration. In some embodiments, if the principal and/or candidate media files contain multiple content types, such as audio and video streams, step 430 may include comparing hashes for each content type separately, calculating or otherwise generating sub-scores corresponding to each of the content types, and then calculating or otherwise determining the match metric according to the sub-scores. For example, in some embodiments, for a media files having an audio stream and a video stream, respective scores may be calculated based on:
Video_sub-score=(number of video hash matches/number of video segments)×100 (Eq. 1).
Audio_sub-score=(number of audio hash matches/number of audio segments)×100 (Eq. 2).
Match Score=(Video_weight×Video_sub-score)+(Audio_weight×Audio_sub-score) (Eq. 3).
In Eq. 1, the number of video hash matches is the number of video stream-related hashes from the principal media file that are identical to the video-stream related hashes of the candidate media file, and in Eq. 2 the number of audio hash matches is the number of audio-stream related hashes from the principal media file that are identical to the audio-stream related hashes of the candidate media file.
The number of segments in Eq. 1 and Eq. 2 may be the respective number of time slices created for the principal and/or candidate media files, for example by steps 310 and 320 of the vector generation process 300. As discussed above, the total number of hash values created for a media file may be the same as the total number of generated time slices for the media file since a single hash value may be created per time slice. In some embodiments, the number of video segments may be the same as the number of audio segments. Thus, for example, if a video stream and audio stream of a 15-second advertisement media file are segmented into one-second segments, the advertisement media file may have corresponding 15 video segments and 15 video hashes, and 15 audio segments and 15 audio hashes. In such a case, the number of segments in Eq. 1 and Eq. 2 may be the same as the length of the media file in seconds.
In some embodiments, for example according to Eq. 3, the match metric may be the Match Score and may be calculated by adding the various sub-scores, for example adding the Video_sub-score to the Audio_sub-score. In some embodiments, each of the sub-scores may be weighted when calculating the Match Score. For example, if a match of the video stream is determined to be more important than a match of the audio stream, the Video_weight factor can be given a greater value than the Audio-weight factor.
The duplicate analysis process 400 may, at step 440, identify whether the principal media file is a duplicate or substantial duplicate of the candidate media file under consideration. In some embodiments, step 440 may compare the Match Score to a predetermined match threshold, for example a predetermined match percentage. In various embodiments, the threshold may be set at 75%, 85%, 90%, 95%, 98%, 99%, 100%, or the like. The threshold may be determined based on any desired criteria. For example, for media files containing advertisements related to automobiles, media files for a same automobile brand may allow a lower threshold for matching if there is less care that an exact advertisement be provided. In other examples, a more exact match may be required such that anything other than a minor difference will not be treated as a match. In some embodiments, if the Match Score is greater than (or greater than or equal to) the predetermined threshold, step 440 may identify the candidate media file and the principal media file as matching.
The duplicate analysis process 400 may, at step 450, determine whether to store the principal media file in the data store 110. For example, if step 440 identified that the principal media file is a duplicate of one or more of the candidate media files, then step 450 may determine to not store the principal media file in the data store 110 since it is an unnecessary use of storage space. Step 450 may take actions to identify the identified duplicate candidate media file for use in place of the principal media file, or example modifying hyperlinks or other indicators related to the principal and/or matching candidate media file. Step 450 may further remove the principal media file, corresponding generated vector identifier, and/or corresponding generated hash values from the memory 104 of the media management system 100, from the data store 110, and/or the like.
If step 440 did not identify the principal media file as a duplicate of any of the candidate media files (e.g., no matching duplicates found), then step 450 may determine to store (and may perform the storing of) the principal media file in the data store 110. In such a case, step 450 may further store the vector identifier for the principal media file in the data store 110, for example in a persistent database. Further, in such a case, step 450 may store the generated hash values for the principal media file in the data store 110, for example in the key-value database. The principal media file may then be used as a candidate media file for future processing by the candidate identification process 200 and duplicate analysis process 400. Storing the generated vector identifier and generated hash values for the principal media file may reduce processing requirements in future processing by the candidate identification process 200 and duplicate analysis process 400.
It will be understood that steps 430, 440, and 450 may be performed in any suitable order. For example, steps 430, 440, and 450 may be performed for one candidate media file at a time, and the duplicate analysis process 400 may be terminated as soon as the first principal-candidate pairing having a Match Score greater than or equal to the match threshold is found. This may provide efficiencies given that hash values may not need to be created for every candidate media file. In other exemplary embodiments, the duplicate analysis process 400 may perform step 430 for all candidate media files to generate a plurality of sets of hash values, and may then perform step 440 for each of the plurality of sets of hash value to find the candidate with the best Match Score or may perform step 440 until the first Match Score is found greater than the match threshold.
In some embodiments, the media management system 100 may use additional information related to the principal media file and candidate media files to determine whether to perform the duplicate analysis process 400, and/or whether to reduce the number of candidate media files prior to performing the duplicate analysis process 400. For example, after identifying the candidate media files, the media management system 100 may be configured to compare the metadata of the principal media file to the metadata of the candidate media files. If, for example, the principal media file video length identified by the respective metadata is of a different or substantially different length than the video length identified by metadata of the candidate media file, then the candidate media file may not need to be considered further. Similarly, if the principal media file video length is different than that of every candidate media file, the duplicate analysis process 400 may not need to be performed and the principal media file and its vector identifier may be stored in the data store 110.
In some embodiments the hash generation process 500 may, at step 510, obtain time slices (segment representations) for a media file. In some embodiments, step 510 includes performing the same processes as steps 310 and 320 of the vector generation process 300. In some embodiments, step 510 includes retrieving the time slices generated by steps 310 and 320.
In some embodiments the hash generation process 500 may, at step 520, generate a hash value for each time slice obtained in step 510. Step 520 may include the use of one or more mathematical functions that take a time slice as an input and transform it into a hash value output. The hash value may be a unique fingerprint or signature for the associated time slice. The generated hash values may be of any suitable size, for example 16 bits, 32 bits, 64 bits, or the like.
In some embodiments, the hash values output may be based on the entirety of the binary data for each time slice. In some embodiments, the hash values may be created in a manner that gives higher importance to the content of the time slice. In some embodiments, steps 310 and 320 may have already accounted for distinguishing the important from unimportant aspects for each time slice, such that step 520 does not need to further determine importance with respect to a time slice.
In some embodiments the hash generation process 500 may, at step 530, provide the set of generated a hash values from step 520 for each time slice obtained in step 510. Step 530 may provide, for example to steps 410 and 420 of the duplicate analysis process 400, a set or list of hash values corresponding to the time slices for a respective media file.
In some embodiments the hash generation process 500 may, at step 540, determine to store the generated hash values in the data store 110. For example, step 540 may store the hash values in the data store 110, for example in a key-value database. In some embodiments, the hash values may be stored in such a way that they are associated with the particular media file for which the hash values were created, and/or associated with the vector identifier of such media file. Accordingly, in some embodiments, the hash generation process 500 may need to be performed only once for each media file received and stored by the media management system 100, which may assist in performing duplicate media file identification in real time or substantially real time.
Various embodiments therefore provide a media management system 100 that can determine if a received media file is a duplicate or substantially the same as a media file already stored in a data store. Systems and methods according to the described embodiments enable real time processing of incoming media files, optimized storage of media files, and reduced systems costs. Other embodiments may provide additional benefits and features, as desired.
Each of the various features and systems described herein may be implemented in software and/or firmware that resides in non-transitory data storage for execution by one or more processors to perform the various automated processes described herein.
The general concepts set forth herein may be adapted to any number of alternate but equivalent embodiments. The term “exemplary” is used herein to represent one example, instance or illustration that may have any number of alternates. Any implementation described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other implementations, nor is it necessarily intended as a model that must be duplicated in other implementations. While several exemplary embodiments have been presented in the foregoing detailed description, it should be appreciated that a vast number of alternate but equivalent variations exist, and the examples presented herein are not intended to limit the scope, applicability, or configuration of the invention in any way. To the contrary, various changes may be made in the function and arrangement of elements described without departing from the scope of the claims and their legal equivalents.
Claims
1. An automated process performed by a media management system comprising a processor, an input interface, and an interface to a data store, the automated process comprising:
- receiving, via the input interface, a media file;
- generating, using a machine learning model (MLM) executing on the processor, a vector embedding representing the received media file;
- comparing the generated vector embedding to one or more predetermined vector embeddings, wherein each predetermined vector embedding represents a respective media file stored in the data store;
- identifying, by the processor and based on the comparison of vector embeddings, a candidate media file;
- generating, by the processor, a plurality of time slices of the received media file;
- comparing, by the processor, the plurality of generated time slices to a plurality of time slices of the candidate media file; and
- calculating, by the processor and based on the comparison of time slices, a match metric describing a likelihood that the candidate media file matches the received media file.
2. The automated process of claim 1, wherein each media file comprises a plurality of segments and each time slice represents a respective segment of the media file.
3. The automated process of claim 2, wherein the plurality of segments comprises successive portions of the media file, wherein each portion is approximately one second long.
4. The automated process of claim 2, wherein:
- the received media file comprises a first audio stream and a first video stream;
- the candidate media file comprises a second audio stream and a second video stream; and
- the plurality of segments of each of the received media file and the candidate media file comprise a plurality of audio stream segments and a plurality of video stream segments.
5. The automated process of claim 4, wherein comparing the plurality of generated time slices to the plurality of time slices of the candidate media file comprises:
- comparing the time slices corresponding to the first video stream to the time slices corresponding to the second video stream; and
- comparing the time slices corresponding to the first audio stream to the time slices corresponding to the second audio stream.
6. The automated process of claim 1, wherein comparing the plurality of generated time slices to the plurality of time slices of the candidate media file comprises:
- generating, using a hash generator, a hash value for each generated time slice;
- generating, using the hash generator, a hash value for each time slice of the candidate media file; and
- comparing the hash values for the received media file to the hash values for the candidate media file.
7. The automated process of claim 2, wherein generating the vector embedding comprises:
- providing the generated plurality of time slices to the MLM.
8. The automated process of claim 1, wherein:
- identifying a candidate media file comprises identifying a plurality of candidate media files;
- the steps of comparing the time slices and calculating the match metric are performed for each of the plurality of candidate media files; and
- the automated process further comprises identifying one of the plurality of candidate media files as matching the received media file based on the match metric.
9. The automated process of claim 1, further comprising:
- determining that the received media file is substantially the same as the candidate media file based on the match metric; and
- responsively determining to not store the received media file in the data store.
10. A media management system comprising a processor, non-transitory storage, and an input interface, wherein the non-transitory storage comprises computer-executable instructions that, when executed by the processor, perform an automated process that comprises:
- receiving, via the input interface, a media file;
- generating, using a machine learning model (MLM), a vector embedding representing the received media file;
- comparing the generated vector embedding to one or more predetermined vector embeddings, wherein each predetermined vector embedding represents a respective media file stored in a data store;
- identifying, based on the comparison of vector embeddings, a candidate media file;
- generating a plurality of time slices of the received media file;
- comparing the plurality of generated time slices to a plurality of time slices of the candidate media file; and
- calculating, based on the comparison of time slices, a match metric describing a likelihood that the candidate media file matches the received media file.
11. The media management system of claim 10, wherein each media file comprises a plurality of segments and each time slice represents a respective segment of the media file.
12. The media management system of claim 11, wherein the plurality of segments comprises successive portions of the media file, wherein each portion is approximately one second long.
13. The media management system of claim 11, wherein:
- the received media file comprises a first audio stream and a first video stream;
- the candidate media file comprises a second audio stream and a second video stream; and
- the plurality of segments of each of the received media file and the candidate media file comprise a plurality of audio stream segments and a plurality of video stream segments.
14. The media management system of claim 13, wherein comparing the plurality of generated time slices to the plurality of time slices of the candidate media file comprises:
- comparing the time slices corresponding to the first video stream to the time slices corresponding to the second video stream; and
- comparing the time slices corresponding to the first audio stream to the time slices corresponding to the second audio stream.
15. The media management system of claim 10, wherein comparing the plurality of generated time slices to the plurality of time slices of the candidate media file comprises:
- generating, using a hash generator, a hash value for each generated time slice;
- generating, using the hash generator, a hash value for each time slice of the candidate media file; and
- comparing the hash values for the received media file to the hash values for the candidate media file.
16. The media management system of claim 11, wherein generating the vector embedding comprises:
- providing the generated plurality of time slices to the MLM.
17. The media management system of claim 10, wherein:
- identifying a candidate media file comprises identifying a plurality of candidate media files;
- the steps of comparing the time slices and calculating the match metric are performed for each of the plurality of candidate media files; and
- the automated process further comprises identifying one of the plurality of candidate media files as matching the received media file based on the match metric.
18. The media management system of claim 10, wherein the automated process further comprises:
- determining that the received media file is substantially the same as the candidate media file based on the match metric; and
- determining to not store the received media file in the data store.
19. An automated process performed by a media management system comprising a processor, and an input interface, the automated process comprising:
- receiving, via the input interface, a media file, wherein the received media file comprises a first audio stream and a first video stream;
- identifying, by the processor, a candidate media file, wherein the candidate media file comprises a second audio stream and a second video stream;
- generating, by the processor, a first plurality of time slices representing the first video stream and a second plurality of time slices representing the first audio stream;
- performing, by the processor, a first comparison of the first plurality of time slices to a third plurality of time slices of the candidate media file;
- performing, by the processor, a second comparison of the second plurality of time slices to a fourth plurality of time slices of the candidate media file; and
- determining, by the processor and based on the first and second comparisons, a likelihood that the candidate media file matches the received media file.
20. The automated process of claim 19, further comprising determining to not store the received media file in a data store based on the determined likelihood, and wherein:
- performing the first comparison comprises: creating a first plurality of hash values, comprising generating a hash value for each of the first plurality of time slices; and comparing the first plurality of hash values to a second plurality of hash values corresponding to the third plurality of time slices; and
- performing the second comparison comprises: creating a third plurality of hash values, comprising generating a hash value for each of the second plurality of time slices; and comparing the third plurality of hash values to a fourth plurality of hash values corresponding to the fourth plurality of time slices.
Type: Application
Filed: May 20, 2025
Publication Date: Nov 26, 2026
Applicant: DISH Network Technologies India Private Limited (Bengaluru)
Inventor: Kunal Kini (Bangalore)
Application Number: 19/213,959