Multi-level indexing method and system for audio fingerprint library data

Through the multi-level index method and hash table technology, the sub-fingerprint index of the audio fingerprint database is constructed, which solves the problems of audio fingerprint database data matching accuracy and retrieval speed, and achieves efficient audio fingerprint retrieval and matching.

CN117932106BActive Publication Date: 2024-10-11BEIJING INFORMATION TECH COLLEGE
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410096571.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-23
Publication Date
2024-10-11
Estimated Expiration
2044-01-23

AI Technical Summary

Technical Problem

The data matching accuracy and retrieval speed of existing audio fingerprint databases are reduced due to too many samples saved in the database, and features can only be extracted from audio files with a fixed length, resulting in problems such as duplicate data checking and random storage.

Method used

A multi-level indexing method is used to construct sub-fingerprints by obtaining the reference points and matching areas of the audio to be identified, and uses hash tables and fingerprint indexes for quick matching, and searches in the audio fingerprint database with preset fingerprint retrieval methods to reduce calculations Complexity and storage requirements.

Benefits of technology

It improves the matching accuracy and retrieval efficiency of audio fingerprint database data, shortens search time, reduces computational complexity and storage requirements, and enhances the flexibility and scalability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117932106B_ABST
    Figure CN117932106B_ABST
Patent Text Reader

Abstract

The present invention provides a multi-level indexing method and system for audio fingerprint library data, which relates to the technical field of audio fingerprint recognition, including obtaining audio to be recognized, combining a fingerprint extraction algorithm, selecting a reference point in the audio to be recognized, determining a pairing area, combining the reference point with each time-frequency point in the pairing area, determining a sub-fingerprint to be matched, constructing a first array and a second array, storing a fingerprint value corresponding to the sub-fingerprint to be matched in the first array, storing position information of the first array in the second array, determining a fingerprint index, combining a preset fingerprint retrieval method, sending the fingerprint index of the sub-fingerprint to be matched to a first matching node, the first matching node mapping the fingerprint index to a second matching node, the second matching node searching a pre-loaded audio fingerprint library, if successful, the second matching node returning a successful search result to a user and canceling the search, if unsuccessful, the second matching node returning no result, and randomly storing the sub-fingerprint to be matched.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of audio fingerprint recognition, and in particular to a multi-level indexing method and system for audio fingerprint library data. Background Art

[0002] Audio fingerprint recognition is a common function of existing music software. This function extracts audio fingerprints by analyzing the characteristics of audio files, and determines the information of unknown audio by comparing the fingerprints in the audio fingerprint library. As the amount of data in the database increases, a large amount of calculation is required for each matching comparison, and the system response time is therefore longer.

[0003] In the prior art, CN104765836A, a multi-level indexing method for audio fingerprint library data, provides a multi-level indexing method and device for audio fingerprint library data, which solves the technical problems of low search performance of massive audio fingerprint libraries and high number of calculations during comparison queries in the prior art. The method includes: dividing the data bits of the value of each audio fingerprint in the audio fingerprint library data into an index part and a fingerprint data part, wherein the index part is a multi-level index; pointing each level in the index part to the next level through a pointer; and pointing the pointer of the last level of the index part to the fingerprint data part; the device includes: a device for dividing the data bits of the value of each audio fingerprint in the audio fingerprint library data into an index part and a fingerprint data part, wherein the index part is a multi-level index; a device for pointing each level in the index part to the next level through a pointer; and a device for pointing the pointer of the last level of the index part to the fingerprint data part.

[0004] CN102289518A, an updating method and system for an audio fingerprint retrieval library, discloses an updating method and system for an audio fingerprint retrieval library, the method comprising: storing the audio fingerprints and retrieval indexes of all old songs into a basic retrieval library; updating the audio fingerprints and retrieval indexes of new songs into an incremental retrieval library; judging whether the size of the incremental retrieval library is greater than or equal to a preset threshold, if so, merging the incremental retrieval library with the basic retrieval library to generate a new basic retrieval library, and then updating the audio fingerprint and retrieval index of the new song into a new incremental retrieval library; if not, updating the audio fingerprint and retrieval index of the new song into the incremental retrieval library. The present invention aims at the situation where new songs are often added, when the incremental retrieval library is relatively small and the cost of updating the incremental retrieval library is very small, only the incremental retrieval library is updated each time, thereby saving the updating time of the audio fingerprint retrieval library and realizing the rapid updating of the audio fingerprint retrieval library.

[0005] In summary, although the existing technology can detect unknown audio files through audio fingerprints, the audio matching accuracy and retrieval speed will greatly increase the search time due to the large number of samples stored in the database. At the same time, the audio files can only be feature extracted with a fixed length. This solution improves the matching accuracy and retrieval efficiency of the audio fingerprint library data, and solves technical problems such as duplicate data checking and random storage, which can at least solve some of the problems in the existing technology. Summary of the invention

[0006] The embodiment of the present invention provides a multi-level indexing method and system for audio fingerprint library data, which are used to improve the matching accuracy and retrieval efficiency of audio fingerprint library data.

[0007] According to a first aspect of an embodiment of the present invention, a multi-level indexing method for audio fingerprint library data is provided, comprising:

[0008] Acquire the audio to be identified, select a reference point in the audio to be identified according to the audio to be identified and in combination with a preset fingerprint extraction algorithm, determine a pairing area according to the reference point, combine the reference point with each time-frequency point in the pairing area, and determine a sub-fingerprint to be matched corresponding to the audio to be identified;

[0009] Constructing a first array and a second array according to the sub-fingerprint to be matched, storing the fingerprint value corresponding to the sub-fingerprint to be matched in the first array, storing the position information of the first array in the second array, and determining the fingerprint index according to the first array and the second array;

[0010] According to the fingerprint index, in combination with a preset fingerprint retrieval method, the fingerprint index of the sub-fingerprint to be matched is sent to the first matching node, the first matching node maps the fingerprint index of the sub-fingerprint to be matched to the second matching node, the second matching node searches the pre-loaded audio fingerprint library according to the fingerprint index of the sub-fingerprint to be matched, if the search is successful, the second matching node returns the search success result to the user and cancels the search, if the search is unsuccessful, the second matching node returns no result, and randomly stores the sub-fingerprint to be matched.

[0011] In an optional embodiment,

[0012] According to the audio to be identified, in combination with a preset fingerprint extraction algorithm, a reference point in the audio to be identified is selected, a pairing region is determined according to the reference point, and the reference point is respectively combined with each time-frequency point in the pairing region to determine a sub-fingerprint to be matched corresponding to the audio to be identified, including:

[0013] Determine a maximum point in the audio to be recognized, and use the maximum point as the reference point;

[0014] According to the reference point, define the time tolerance and the frequency tolerance of the pairing area, and determine the pairing area according to the time tolerance and the frequency tolerance;

[0015] According to the pairing area, the time-frequency point in the pairing area is obtained, and according to the reference point and the time-frequency point, the sub-fingerprint to be matched is determined by a fingerprint construction algorithm.

[0016] In an optional embodiment,

[0017] According to the reference point, the time tolerance and frequency tolerance of the pairing area are defined, and according to the time tolerance and the frequency tolerance, the pairing area is determined as shown in the following formula:

[0018] R i =[t i -Δt,t i +Δt]×[f i -Δf,f i +Δf];

[0019] Among them, Ri represents the pairing area corresponding to the reference point (ti, fi), ti represents the time coordinate of the reference point, △t represents the time tolerance, fi represents the frequency coordinate of the reference point, and △f represents the frequency tolerance.

[0020] In an optional embodiment,

[0021] According to the sub-fingerprint to be matched, a first array and a second array are constructed, and a fingerprint value corresponding to the sub-fingerprint to be matched is stored in the first array, and position information of the first array is stored in the second array. According to the first array and the second array, determining the fingerprint index includes:

[0022] Initialize two arrays, which are respectively recorded as the first array and the second array;

[0023] Traversing the hash table, and storing all the data in the hash table in the first array in sequence;

[0024] Calculate the offset and length of the corresponding value of the sub-fingerprint to be matched according to the hash function corresponding to the hash table, determine the position information of the fingerprint value corresponding to the sub-fingerprint to be matched, and store the position information in the second array;

[0025] According to the sub-fingerprint to be matched, the position of the fingerprint value is determined by searching the fingerprint value in the first array, and the fingerprint index of the position of the fingerprint value is determined in combination with the position information in the second array.

[0026] In an optional embodiment,

[0027] According to the fingerprint index, in combination with a preset fingerprint retrieval method, the fingerprint index of the sub-fingerprint to be matched is sent to a first matching node, the first matching node maps the fingerprint index of the sub-fingerprint to be matched to a second matching node, and the second matching node searches a pre-loaded audio fingerprint library according to the fingerprint index of the sub-fingerprint to be matched, including:

[0028] Acquire the sub-fingerprint to be matched by using a fingerprint extraction algorithm, and send the sub-fingerprint to be matched to the first matching node;

[0029] The first matching node maps the fingerprint index to the second matching node according to a hash-based mapping algorithm;

[0030] The second matching node receives the fingerprint index of the sub-fingerprint to be matched, combines it with the pre-loaded audio fingerprint library, and searches the audio fingerprint library for an audio fingerprint that matches the sub-fingerprint to be matched through the fingerprint index.

[0031] In an optional embodiment,

[0032] Before searching the preloaded audio fingerprint library according to the fingerprint index of the sub-fingerprint to be matched, the method further includes checking the audio fingerprint library for duplicate data:

[0033] Acquire a file to be checked, set detection points in the file to be checked, and determine the number of detection points in each file to be checked and the position of each detection point according to the space occupied by the file to be checked and the audio length of each detection point;

[0034] According to the space occupied by the file to be checked and the number of the detection points, combined with the position of each detection point, the file to be checked is segmented to obtain segment fingerprints;

[0035] Loading the segmented fingerprint into an audio fingerprint library;

[0036] According to the segmented fingerprint, the format of the file to be checked is converted based on a decoding module in a preset duplication detection model to determine a fingerprint string of the file to be checked, which is recorded as a first fingerprint string;

[0037] According to the first fingerprint string, a fingerprint block is selected by a sliding window translation method until the sliding window is translated to the end of the first fingerprint string, and the fingerprint block is detected by a detection module in a repeated detection model in combination with an audio fingerprint library.

[0038] In an optional embodiment,

[0039] The method further comprises:

[0040] If a duplication is detected, it is recorded as a successful match, and the successfully matched fingerprint block is recorded as a duplicate fingerprint block. At the same time, an audio fingerprint file that successfully matches the file to be checked is obtained and recorded as a suspected duplicate file;

[0041] According to the file to be checked and the suspected duplicate file, perform left and right extended matching from the position of the repeated fingerprint block, select one fingerprint block from each of the file to be checked and the suspected duplicate file for matching each time, and record the successful matching length of each match to determine the total duplication length;

[0042] Obtaining and comparing the frequency spectrum features of the file to be checked and the suspected duplicate file to determine the similarity of the frequency spectrum features;

[0043] A judgment is made according to a preset repetition length threshold and a preset spectrum feature similarity threshold. If the total repetition length is greater than the repetition length threshold and the spectrum feature similarity is greater than the spectrum feature similarity threshold, a data repetition result is returned; otherwise, the data is returned as non-repetition;

[0044] If no duplication is detected, continue to detect the next file until the detection is completed.

[0045] A second aspect of an embodiment of the present invention provides a multi-level indexing system for audio fingerprint library data, including:

[0046] The first unit is used to obtain audio to be identified, select reference points in the audio to be identified according to the audio to be identified and in combination with a preset fingerprint extraction algorithm, determine a pairing area according to the reference points, combine the reference points with each time-frequency point in the pairing area, and determine a sub-fingerprint to be matched corresponding to the audio to be identified;

[0047] a second unit, configured to construct a first array and a second array according to the sub-fingerprint to be matched, store the fingerprint value corresponding to the sub-fingerprint to be matched into the first array, store the position information of the first array into the second array, and determine the fingerprint index according to the first array and the second array;

[0048] The third unit is used to send the fingerprint index of the sub-fingerprint to be matched to the first matching node according to the fingerprint index and in combination with a preset fingerprint retrieval method, the first matching node maps the fingerprint index of the sub-fingerprint to be matched to the second matching node, the second matching node searches a pre-loaded audio fingerprint library according to the fingerprint index of the sub-fingerprint to be matched, if the search is successful, the second matching node returns the search success result to the user and cancels the search, if the search is unsuccessful, the second matching node returns no result and randomly stores the sub-fingerprint to be matched.

[0049] According to a third aspect of the embodiments of the present invention,

[0050] An electronic device is provided, comprising:

[0051] processor;

[0052] a memory for storing processor-executable instructions;

[0053] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0054] A fourth aspect of the embodiments of the present invention is:

[0055] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.

[0056] The beneficial effects of the embodiments of the present invention can be referred to the effects corresponding to the technical features in the specific implementation methods, which will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 A schematic diagram of a flow chart of a multi-level indexing method for audio fingerprint library data according to an embodiment of the present invention;

[0058] Figure 2 The present invention is a schematic diagram of a multi-level indexing system for audio fingerprint library data according to an embodiment of the present invention. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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.

[0060] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0061] Figure 1 FIG. 1 is a flow chart of a multi-level indexing method for audio fingerprint library data according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0062] S1. Obtain the audio to be identified, select a reference point in the audio to be identified according to the audio to be identified, combine it with a preset fingerprint extraction algorithm, determine a pairing area according to the reference point, combine the reference point with each time-frequency point in the pairing area, and determine a sub-fingerprint to be matched corresponding to the audio to be identified;

[0063] The reference point is a point used to mark or locate a specific moment in the audio. The pairing area is a time range and frequency range relative to the reference point, which is used to extract the audio fingerprint. The size of the pairing area needs to be adjusted according to the specific application scenario and audio characteristics. The time-frequency point refers to a specific position on the time axis and frequency axis.

[0064] Audio fingerprint is a set of features that uniquely identify audio content, extracted based on the important acoustic features of the original audio signal. It is a detailed description of the audio content and a unique identifier of the audio signal. For two different audio files with the same content, the audio fingerprints extracted from them are the same. Audio fingerprint is the basis of content-based audio retrieval, and the performance of the content-based audio retrieval system is directly related to the audio fingerprint used.

[0065] In an optional embodiment,

[0066] According to the audio to be identified, in combination with a preset fingerprint extraction algorithm, a reference point in the audio to be identified is selected, a pairing region is determined according to the reference point, and the reference point is respectively combined with each time-frequency point in the pairing region to determine a sub-fingerprint to be matched corresponding to the audio to be identified, including:

[0067] Determine a maximum point in the audio to be recognized, and use the maximum point as the reference point;

[0068] Load the audio file to be recognized, preprocess the loaded audio, convert the audio into standardized audio data, and use fast Fourier transform to convert the audio signal into spectrum representation;

[0069] By adopting the local maximum detection method, the maximum point is found in the spectrum, and one of the maximum points found is selected as the reference point.

[0070] According to the reference point, define the time tolerance and the frequency tolerance of the pairing area, and determine the pairing area according to the time tolerance and the frequency tolerance;

[0071] Determine the tolerance in terms of time and frequency based on the needs of the audio file and the requirements for the matching area;

[0072] Finding a matching area around the reference point that meets the time tolerance and frequency tolerance by finding points in the frequency spectrum that meet the conditions of frequency and time range;

[0073] According to the pairing area, a time-frequency point in the pairing area is acquired, and according to the reference point and the time-frequency point, the sub-fingerprint to be matched is determined by a fingerprint construction algorithm;

[0074] According to the paired area found previously, the time-frequency points in the paired area are extracted by obtaining the corresponding time-frequency information from the spectrum;

[0075] By calculating the time and frequency offset of the time-frequency point relative to the reference point, the reference point and the time-frequency point are used to construct the sub-fingerprint to be matched;

[0076] De-duplicate and sort the constructed sub-fingerprints to ensure the uniqueness and consistency of each sub-fingerprint, and return the sub-fingerprints;

[0077] In an optional embodiment,

[0078] According to the reference point, the time tolerance and frequency tolerance of the pairing area are defined, and according to the time tolerance and the frequency tolerance, the pairing area is determined as shown in the following formula:

[0079] R i =[t i -Δt,t i +Δt]×[f i -Δf,f i +Δf];

[0080] Among them, Ri represents the pairing area corresponding to the reference point (ti, fi), ti represents the time coordinate of the reference point, △t represents the time tolerance, fi represents the frequency coordinate of the reference point, and △f represents the frequency tolerance.

[0081] In this function, the introduction of the paired region function can help reduce the matching error, because it not only considers the exact position of the reference point, but also the surrounding time-frequency points, which helps to capture the subtle time and frequency changes in the audio and improve the retrieval accuracy;

[0082] The sensitivity to time and frequency is reduced through the tolerance parameter. This makes the algorithm more robust to some common audio changes (for example, slight time offset or slight frequency change) and less susceptible to small interference;

[0083] Since the paired region function allows matching within a certain range, this makes the algorithm more adaptable and can handle some audio clips with large or small changes;

[0084] In summary, this function allows for flexible matching of similar video features during retrieval, improving the technical effect of audio fingerprint retrieval.

[0085] In this step, by selecting reference points and determining matching areas, the system can more accurately capture the time-frequency characteristics of the audio to be recognized. This helps improve matching accuracy, especially for audio clips containing small time and frequency changes;

[0086] Selecting the reference point and determining the matching area can narrow the search range of the sub-fingerprint to be matched. When matching, the system only needs to consider the time-frequency points within the matching area, rather than the entire spectrum. This reduces the complexity of the calculation and improves the matching efficiency;

[0087] The preset fingerprint extraction algorithm combines the selection of reference points and the determination of matching areas to make the system more robust to some common audio changes. The system can adapt to time and frequency changes within a certain range, thereby improving reliability in actual scenarios;

[0088] By selecting reference points and determining matching regions, the system can better adapt to different time-frequency characteristics between different audio clips. This more adaptable feature makes the system more flexible and can handle diverse audio data;

[0089] In summary, by combining the preset fingerprint extraction algorithm with the steps of selecting reference points and determining matching areas, the performance of the audio fingerprint retrieval system can be improved, making it more suitable for audio data of different types and with large variations.

[0090] S2. construct a first array and a second array according to the sub-fingerprint to be matched, store the fingerprint value corresponding to the sub-fingerprint to be matched in the first array, store the position information of the first array in the second array, and determine the fingerprint index according to the first array and the second array;

[0091] If all the sub-fingerprints of a certain audio contain a sub-fingerprint similar to the sub-fingerprint of an unknown audio segment, then the audio may be the final matching audio, but if all the sub-fingerprints of the audio do not contain a sub-fingerprint similar to the sub-fingerprint of the unknown audio segment, then it is definitely not the final matching audio, so all possible sub-fingerprints are associated with the audio containing the sub-fingerprint in the audio fingerprint database, that is, the fingerprint index.

[0092] During retrieval, all audio containing sub-fingerprints of unknown audio clips can be found directly through the index, and most irrelevant audio can be quickly filtered out, and a small amount of relatively similar audio or audio sets can be screened out, and then the fingerprints can be accurately matched with the audio clips to be retrieved, which significantly improves the retrieval speed.

[0093] The construction of the fingerprint index and the performance of the fingerprint retrieval algorithm will directly determine the user experience of the audio retrieval system, and efficient indexing is the guarantee of fast retrieval and matching.

[0094] In an optional embodiment,

[0095] According to the sub-fingerprint to be matched, a first array and a second array are constructed, and a fingerprint value corresponding to the sub-fingerprint to be matched is stored in the first array, and position information of the first array is stored in the second array. According to the first array and the second array, determining the fingerprint index includes:

[0096] Initialize two arrays, which are respectively recorded as the first array and the second array, traverse the hash table, and store all the data in the hash table in the first array in sequence;

[0097] Create two empty arrays, one as the first array and the other as the second array;

[0098] Iterate through the key-value pairs in the hash table and store them in order in the first array;

[0099] Calculate the offset and length of the corresponding value of the sub-fingerprint to be matched according to the hash function corresponding to the hash table, determine the position information of the fingerprint value corresponding to the sub-fingerprint to be matched, and store the position information in the second array;

[0100] The fingerprint value is usually the result of hashing or other encoding of specific features of the audio segment in audio processing and fingerprint recognition. This can be frequency domain information, time domain information, or a combination thereof, used to uniquely identify the audio segment;

[0101] In this solution, the fingerprint value refers to the corresponding value of the sub-fingerprint to be matched, which is a hash value generated by a hash function or other numerical value representing the sub-fingerprint. Through the mapping of the hash function, we map the sub-fingerprint to a certain integer value, which is the fingerprint value;

[0102] The position information indicates the position of the fingerprint value in the hash table, that is, the index or offset in the array. This position information can help us quickly find and access the corresponding data in the hash table.

[0103] Get the hash function corresponding to the preset hash table;

[0104] For each sub-fingerprint to be matched, use the hash function to calculate its corresponding hash value, and then calculate the offset and length based on the hash value;

[0105] The calculated offset and length are used to determine the position information of the fingerprint value corresponding to the sub-fingerprint to be matched, and the determined position information is stored in the second array.

[0106] According to the sub-fingerprint to be matched, by searching the fingerprint value in the first array, determining the position of the fingerprint value, and combining the position information in the second array, determining the fingerprint index of the position of the fingerprint value;

[0107] Traverse the first array, search for the element with the same fingerprint value as the sub-fingerprint to be matched, and find its position;

[0108] The fingerprint index of the position of the fingerprint value is determined using the position information in the second array in combination with the found position.

[0109] In this step, by constructing the first array and the second array, the system can realize efficient retrieval of the audio fingerprint library. The first array stores the fingerprint value, so that the sub-fingerprint to be matched can be directly searched in the array without traversing the entire database. The second array stores the position information, providing a way to locate the position of the fingerprint value in the array, further improving the retrieval efficiency;

[0110] The process of constructing the first array and the second array can be completed in the preprocessing stage, avoiding a large amount of calculation during the actual query. This helps to reduce the computational complexity of real-time queries and improve the response speed of the system;

[0111] By storing the fingerprint value in the first array and the location information in the second array, the storage space requirement can be reduced. Only necessary information needs to be stored, avoiding unnecessary redundant data.

[0112] In summary, this step optimizes the performance of the audio fingerprint matching system, improves retrieval efficiency, reduces computational complexity, enhances system flexibility and scalability, and reduces storage space requirements.

[0113] S3. According to the fingerprint index, in combination with a preset fingerprint retrieval method, the fingerprint index of the sub-fingerprint to be matched is sent to the first matching node, the first matching node maps the fingerprint index of the sub-fingerprint to be matched to the second matching node, the second matching node searches the pre-loaded audio fingerprint library according to the fingerprint index of the sub-fingerprint to be matched, if the search is successful, the second matching node returns the search success result to the user and cancels the search, if the search is unsuccessful, the second matching node returns no result, and randomly stores the sub-fingerprint to be matched.

[0114] The first matching node is a Master node, which is usually a control center in a distributed system or cluster, and is responsible for coordinating and managing the operation of the entire system. The second matching node is a Slave node, which is a node working under the control of the Master node. They perform subordinate tasks, accept instructions from the Master node, and perform calculations, storage or other processing tasks. The preset fingerprint retrieval method is to convert the audio signal into a frequency domain representation, and extract fingerprints by analyzing the spectrum features. The audio fingerprint library is a database that stores and manages audio fingerprints, which is usually used for audio retrieval, similarity matching and content recognition. The audio fingerprint library extracts unique features or fingerprints from audio signals and associates these fingerprints with corresponding audio data.

[0115] In an optional embodiment,

[0116] According to the fingerprint index, in combination with a preset fingerprint retrieval method, the fingerprint index of the sub-fingerprint to be matched is sent to a first matching node, the first matching node maps the fingerprint index of the sub-fingerprint to be matched to a second matching node, and the second matching node searches a pre-loaded audio fingerprint library according to the fingerprint index of the sub-fingerprint to be matched, including:

[0117] Acquire the sub-fingerprint to be matched by using a fingerprint extraction algorithm, and send the sub-fingerprint to be matched to the first matching node;

[0118] The fingerprint extraction algorithm uses time-frequency representation, wavelet transform, and spectrum analysis operations to extract features from the audio clips to be matched;

[0119] According to the extracted features, a data structure representing the sub-fingerprint to be matched is generated;

[0120] Sending the sub-fingerprint to be matched to the first matching node through the communication module;

[0121] The first matching node maps the fingerprint index to the second matching node according to a hash-based mapping algorithm;

[0122] Creating a hash table or routing table on the first matching node to store the hash value and the corresponding second matching node information;

[0123] Use the hash function to calculate the hash value for the fingerprint index to be matched;

[0124] Mapping the calculated hash value to the second matching node;

[0125] The second matching node receives the fingerprint index of the sub-fingerprint to be matched, combines it with the pre-loaded audio fingerprint library, and searches the audio fingerprint library for an audio fingerprint that matches the sub-fingerprint to be matched through the fingerprint index.

[0126] Pre-load the audio fingerprint library to the second matching node;

[0127] The second matching node receives the fingerprint index of the sub-fingerprint to be matched from the first matching node;

[0128] Using the received fingerprint index, searching a pre-loaded audio fingerprint library for an audio fingerprint that matches the sub-fingerprint to be matched;

[0129] The matching result is returned to the first matching node, usually including information such as the identifier of the found matching audio and the similarity score.

[0130] In an optional embodiment,

[0131] Before searching the preloaded audio fingerprint library according to the fingerprint index of the sub-fingerprint to be matched, the method further includes checking the audio fingerprint library for duplicate data:

[0132] Acquire a file to be checked, set detection points in the file to be checked, and determine the number of detection points in each file to be checked and the position of each detection point according to the space occupied by the file to be checked and the audio length of each detection point;

[0133] Obtain the file to be checked from a file system or other source;

[0134] Get relevant information about the file to be checked, including the total size of the file and the audio duration;

[0135] Determine the intervals for setting detection points in the file based on requirements;

[0136] Calculate the number of checkpoints that need to be set based on the total length of the file and the set checkpoint interval;

[0137] Based on the number of detection points calculated, calculate the position of each detection point. The position can be expressed as a timestamp, file offset, etc., depending on the accuracy of the detection;

[0138] According to the space occupied by the file to be checked and the number of the detection points, combined with the position of each detection point, the file to be checked is segmented to obtain segment fingerprints;

[0139] Segment fingerprints are a collection of unique fingerprints generated for each segment of an audio file (or other type of file) after it is segmented (cut into several small segments). The generation of segment fingerprints is to more effectively perform similarity detection, duplicate detection or other audio fingerprint applications when processing large files;

[0140] Divide the total size of the file to be checked by the number of detection points to get the average size between each detection point;

[0141] According to the position of each detection point and the calculated size of each segment, the starting and ending positions of each segment are determined;

[0142] For each segment, a fingerprint extraction algorithm is used to generate the segment fingerprint.

[0143] Loading the segmented fingerprint into an audio fingerprint library;

[0144] For each segment fingerprint, associate corresponding identification information, which can be a sequence number, a timestamp, or other unique identifier of the segment;

[0145] Each segment fingerprint and its associated identification information are stored in the audio fingerprint library.

[0146] According to the segmented fingerprint, the format of the file to be checked is converted based on a decoding module in a preset duplication detection model to determine a fingerprint string of the file to be checked, which is recorded as a first fingerprint string;

[0147] Load the previously generated segmented fingerprint and the preset duplicate detection model, including the decoding module;

[0148] Each segment is processed by a preset decoding module for audio decoding, text parsing, etc. to perform format conversion;

[0149] For each segment processed by the decoding module, a fingerprint extraction algorithm is used to generate a corresponding fingerprint, and these fingerprints are combined into a first fingerprint string of the file to be checked.

[0150] According to the first fingerprint string, a fingerprint block is selected by a sliding window translation method until the sliding window is translated to the end of the first fingerprint string, and the fingerprint block is detected by a detection module in a repeated detection model in combination with an audio fingerprint library.

[0151] The fingerprint block refers to a piece of data of a specific length extracted from an audio signal according to certain rules in audio processing, and then converted into a unique fingerprint through a fingerprint extraction algorithm. This fingerprint can be used to represent the characteristics of this piece of audio data for similarity comparison, matching or other analysis;

[0152] Determine the size of the sliding window and the translation step size. The size of the sliding window should be large enough to cover the fingerprint blocks of a certain time range;

[0153] Traverse the first fingerprint string by sliding window translation method. At each window position, select the corresponding fingerprint block;

[0154] For each selected fingerprint block, the detection module in the duplicate detection model is used to perform detection through similarity comparison and matching algorithm;

[0155] The detection result of each window position is recorded, that is, whether the fingerprint block matches a fingerprint in the audio fingerprint library.

[0156] In an optional embodiment,

[0157] The method further comprises:

[0158] If a duplication is detected, it is recorded as a successful match, and the successfully matched fingerprint block is recorded as a duplicate fingerprint block. At the same time, an audio fingerprint file that successfully matches the file to be checked is obtained and recorded as a suspected duplicate file;

[0159] When duplication is detected, the successfully matched fingerprint block and the file information related to it are recorded;

[0160] Mark the successfully matched fingerprint block as a repeated fingerprint block;

[0161] According to the successfully matched fingerprint block information, an audio fingerprint file that successfully matches the file to be checked is obtained;

[0162] Mark the successfully matched audio fingerprint file as a suspected duplicate file. This may include recording the file path, file name, timestamp and other related information;

[0163] According to the file to be checked and the suspected duplicate file, perform left and right extended matching from the position of the repeated fingerprint block, select one fingerprint block from each of the file to be checked and the suspected duplicate file for matching each time, and record the successful matching length of each match to determine the total duplication length;

[0164] Obtaining a fingerprint block sequence related to a repeated fingerprint block from the file to be checked and the suspected repeated file;

[0165] Starting from the position of the repeated fingerprint block, select the fingerprint blocks in the file to be checked and the suspected repeated file in turn for matching. Record the matching length of each successful match;

[0166] Add the lengths of all successful matches to determine the total repeat length;

[0167] Obtaining and comparing the frequency spectrum features of the file to be checked and the suspected duplicate file to determine the similarity of the frequency spectrum features;

[0168] Use the audio processing library to obtain the spectral characteristics of the files to be checked and the suspected duplicate files;

[0169] For each file, ensure that its spectral features are normalized to eliminate differences in amplitude and length;

[0170] Use a suitable similarity metric (e.g., cosine similarity, Euclidean distance, etc.) to compare the normalized spectral features, where cosine similarity is usually in the range of [0,1], where 1 indicates complete similarity;

[0171] A judgment is made according to a preset repetition length threshold and a preset spectrum feature similarity threshold. If the total repetition length is greater than the repetition length threshold and the spectrum feature similarity is greater than the spectrum feature similarity threshold, a data repetition result is returned; otherwise, the data is returned as non-repetition;

[0172] Obtaining a preset repetition length threshold and a preset spectrum feature similarity threshold from a configuration or user input, wherein the repetition length threshold is 50% of the total audio length, the spectrum feature similarity threshold is 0.5, and the repetition length threshold and the spectrum feature similarity threshold can be adaptively adjusted according to actual needs;

[0173] Normalize the spectral features to ensure that the features of different files have similar scales and distributions;

[0174] Comparing the calculated repetition length with a preset repetition length threshold, and the calculated spectrum feature similarity with a preset similarity threshold;

[0175] If the repetition length is greater than the repetition length threshold and the spectrum feature similarity is greater than the similarity threshold, the result of data duplication is returned, otherwise the result of data non-duplicate is returned;

[0176] If no duplication is detected, continue to detect the next file until the detection is completed.

[0177] In this step, by checking the audio fingerprint library for duplicate data, the system can exclude known duplicate audio segments before searching, thereby improving search efficiency and reducing redundant search operations;

[0178] The file to be checked is segmented to obtain segmented fingerprints, which helps to improve the flexibility and applicability of the system. Furthermore, the format of the file to be checked is converted based on the decoding module in the duplicate detection model to determine the fingerprint string, which helps the accuracy of the matching process;

[0179] When a repetition is detected, the position of the successful match can be further confirmed by extending the match left and right, thereby accurately calculating the total length of the repetition. Obtaining and comparing the spectral features of the file to be checked and the suspected duplicate file helps determine the similarity of the spectral features and enhances the accuracy of the match;

[0180] The system can quickly determine whether the data is repeated based on the preset repetition length threshold and spectrum feature similarity threshold. If the data is judged to be repeated, the repeated result is returned; otherwise, the non-duplicate result is returned. This judgment mechanism effectively filters out matches that do not meet the conditions and improves the accuracy of the system;

[0181] In summary, this step achieves comprehensive detection and matching of audio fingerprint library data by using the above technical means, thereby improving the accuracy and reliability of the system.

[0182] Figure 2 FIG. 1 is a schematic diagram of a multi-level indexing system for audio fingerprint library data according to an embodiment of the present invention. Figure 2 As shown, the system comprises:

[0183] The first unit is used to obtain audio to be identified, select reference points in the audio to be identified according to the audio to be identified and in combination with a preset fingerprint extraction algorithm, determine a pairing area according to the reference points, combine the reference points with each time-frequency point in the pairing area, and determine a sub-fingerprint to be matched corresponding to the audio to be identified;

[0184] a second unit, configured to construct a first array and a second array according to the sub-fingerprint to be matched, store the fingerprint value corresponding to the sub-fingerprint to be matched into the first array, store the position information of the first array into the second array, and determine the fingerprint index according to the first array and the second array;

[0185] The third unit is used to send the fingerprint index of the sub-fingerprint to be matched to the first matching node according to the fingerprint index and in combination with a preset fingerprint retrieval method, the first matching node maps the fingerprint index of the sub-fingerprint to be matched to the second matching node, the second matching node searches a pre-loaded audio fingerprint library according to the fingerprint index of the sub-fingerprint to be matched, if the search is successful, the second matching node returns the search success result to the user and cancels the search, if the search is unsuccessful, the second matching node returns no result and randomly stores the sub-fingerprint to be matched.

[0186] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.

[0187] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A multi-level indexing method for audio fingerprint library data, characterized in that: include: Acquire the audio to be identified, select a reference point in the audio to be identified according to the audio to be identified and in combination with a preset fingerprint extraction algorithm, determine a pairing area according to the reference point, combine the reference point with each time-frequency point in the pairing area, and determine a sub-fingerprint to be matched corresponding to the audio to be identified; Constructing a first array and a second array according to the sub-fingerprint to be matched, storing the fingerprint value corresponding to the sub-fingerprint to be matched in the first array, storing the position information of the first array in the second array, and determining the fingerprint index according to the first array and the second array; According to the fingerprint index, in combination with a preset fingerprint retrieval method, the fingerprint index of the sub-fingerprint to be matched is sent to the first matching node, the first matching node maps the fingerprint index of the sub-fingerprint to be matched to the second matching node, the second matching node searches the pre-loaded audio fingerprint library according to the fingerprint index of the sub-fingerprint to be matched, if the search is successful, the second matching node returns the search success result to the user and cancels the search, if the search is unsuccessful, the second matching node returns no result, and randomly stores the sub-fingerprint to be matched; According to the audio to be identified, in combination with a preset fingerprint extraction algorithm, a reference point in the audio to be identified is selected, a pairing region is determined according to the reference point, and the reference point is respectively combined with each time-frequency point in the pairing region to determine a sub-fingerprint to be matched corresponding to the audio to be identified, including: Determine a maximum point in the audio to be recognized, and use the maximum point as the reference point; According to the reference point, define the time tolerance and the frequency tolerance of the pairing area, and determine the pairing area according to the time tolerance and the frequency tolerance; According to the pairing area, a time-frequency point in the pairing area is acquired, and according to the reference point and the time-frequency point, the sub-fingerprint to be matched is determined by a fingerprint construction algorithm; According to the reference point, the time tolerance and frequency tolerance of the pairing area are defined, and according to the time tolerance and the frequency tolerance, the pairing area is determined as shown in the following formula: R i =[t i -Δt,t i +Δt]×[f i -Δf,f i +Δf]; Where Ri represents the pairing area corresponding to the reference point (ti, fi), ti represents the time coordinate of the reference point, △t represents the time tolerance, fi represents the frequency coordinate of the reference point, and △f represents the frequency tolerance; Before searching the preloaded audio fingerprint library according to the fingerprint index of the sub-fingerprint to be matched, the method further includes checking the audio fingerprint library for duplicate data: Acquire a file to be checked, set detection points in the file to be checked, and determine the number of detection points in each file to be checked and the position of each detection point according to the space occupied by the file to be checked and the audio length of each detection point; According to the space occupied by the file to be checked and the number of the detection points, combined with the position of each detection point, the file to be checked is segmented to obtain segment fingerprints; Loading the segmented fingerprint into an audio fingerprint library; According to the segmented fingerprint, the format of the file to be checked is converted based on a decoding module in a preset duplication detection model to determine a fingerprint string of the file to be checked, which is recorded as a first fingerprint string; According to the first fingerprint string, a fingerprint block is selected by a sliding window translation method until the sliding window is translated to the end of the first fingerprint string, and the fingerprint block is detected by a detection module in a repeated detection model in combination with an audio fingerprint library; The method further comprises: If a duplication is detected, it is recorded as a successful match, and the successfully matched fingerprint block is recorded as a duplicate fingerprint block. At the same time, an audio fingerprint file that successfully matches the file to be checked is obtained and recorded as a suspected duplicate file; According to the file to be checked and the suspected duplicate file, perform left and right extended matching from the position of the repeated fingerprint block, select one fingerprint block from each of the file to be checked and the suspected duplicate file for matching each time, and record the successful matching length of each match to determine the total duplication length; Obtaining and comparing the frequency spectrum features of the file to be checked and the suspected duplicate file to determine the similarity of the frequency spectrum features; A judgment is made according to a preset repetition length threshold and a preset spectrum feature similarity threshold. If the total repetition length is greater than the repetition length threshold and the spectrum feature similarity is greater than the spectrum feature similarity threshold, a data repetition result is returned; otherwise, the data is returned as non-repetition; If no duplication is detected, continue to detect the next file until the detection is completed.

2. The method according to claim 1, characterized in that According to the sub-fingerprint to be matched, a first array and a second array are constructed, and a fingerprint value corresponding to the sub-fingerprint to be matched is stored in the first array, and position information of the first array is stored in the second array. According to the first array and the second array, determining the fingerprint index includes: Initialize two arrays, which are respectively recorded as the first array and the second array; Traversing the hash table, and storing all the data in the hash table in the first array in sequence; Calculate the offset and length of the corresponding value of the sub-fingerprint to be matched according to the hash function corresponding to the hash table, determine the position information of the fingerprint value corresponding to the sub-fingerprint to be matched, and store the position information in the second array; According to the sub-fingerprint to be matched, the position of the fingerprint value is determined by searching the fingerprint value in the first array, and the fingerprint index of the position of the fingerprint value is determined in combination with the position information in the second array.

3. The method according to claim 1, characterized in that According to the fingerprint index, in combination with a preset fingerprint retrieval method, the fingerprint index of the sub-fingerprint to be matched is sent to a first matching node, the first matching node maps the fingerprint index of the sub-fingerprint to be matched to a second matching node, and the second matching node searches a pre-loaded audio fingerprint library according to the fingerprint index of the sub-fingerprint to be matched, including: Acquire the sub-fingerprint to be matched by using a fingerprint extraction algorithm, and send the sub-fingerprint to be matched to the first matching node; The first matching node maps the fingerprint index to the second matching node according to a hash-based mapping algorithm; The second matching node receives the fingerprint index of the sub-fingerprint to be matched, combines it with the pre-loaded audio fingerprint library, and searches the audio fingerprint library for an audio fingerprint that matches the sub-fingerprint to be matched through the fingerprint index.

4. A multi-level indexing system for audio fingerprint library data, used to implement the method described in any one of claims 1 to 3, characterized in that: include: The first unit is used to obtain audio to be identified, select reference points in the audio to be identified according to the audio to be identified and in combination with a preset fingerprint extraction algorithm, determine a pairing area according to the reference points, combine the reference points with each time-frequency point in the pairing area, and determine a sub-fingerprint to be matched corresponding to the audio to be identified; a second unit, configured to construct a first array and a second array according to the sub-fingerprint to be matched, store the fingerprint value corresponding to the sub-fingerprint to be matched into the first array, store the position information of the first array into the second array, and determine the fingerprint index according to the first array and the second array; The third unit is used to send the fingerprint index of the sub-fingerprint to be matched to the first matching node according to the fingerprint index and in combination with a preset fingerprint retrieval method, the first matching node maps the fingerprint index of the sub-fingerprint to be matched to the second matching node, the second matching node searches the pre-loaded audio fingerprint library according to the fingerprint index of the sub-fingerprint to be matched, if the search is successful, the second matching node returns the search success result to the user and cancels the search, if the search is unsuccessful, the second matching node returns no result and randomly stores the sub-fingerprint to be matched; Before searching the pre-loaded audio fingerprint library according to the fingerprint index of the sub-fingerprint to be matched, the audio fingerprint library is also checked for duplicate data: Acquire a file to be checked, set detection points in the file to be checked, and determine the number of detection points in each file to be checked and the position of each detection point according to the space occupied by the file to be checked and the audio length of each detection point; According to the space occupied by the file to be checked and the number of the detection points, combined with the position of each detection point, the file to be checked is segmented to obtain segment fingerprints; Loading the segmented fingerprint into an audio fingerprint library; According to the segmented fingerprint, the format of the file to be checked is converted based on a decoding module in a preset duplication detection model to determine a fingerprint string of the file to be checked, which is recorded as a first fingerprint string; According to the first fingerprint string, a fingerprint block is selected by a sliding window translation method until the sliding window is translated to the end of the first fingerprint string, and the fingerprint block is detected by a detection module in a repeated detection model in combination with an audio fingerprint library; Also includes: If a duplication is detected, it is recorded as a successful match, and the successfully matched fingerprint block is recorded as a duplicate fingerprint block. At the same time, an audio fingerprint file that successfully matches the file to be checked is obtained and recorded as a suspected duplicate file; According to the file to be checked and the suspected duplicate file, perform left and right extended matching from the position of the repeated fingerprint block, select one fingerprint block from each of the file to be checked and the suspected duplicate file for matching each time, and record the successful matching length of each match to determine the total duplication length; Obtaining and comparing the frequency spectrum features of the file to be checked and the suspected duplicate file to determine the similarity of the frequency spectrum features; A judgment is made according to a preset repetition length threshold and a preset spectrum feature similarity threshold. If the total repetition length is greater than the repetition length threshold and the spectrum feature similarity is greater than the spectrum feature similarity threshold, a data repetition result is returned; otherwise, the data is returned as non-repetition; If no duplication is detected, continue to detect the next file until the detection is completed.

5. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described in any one of claims 1 to 3.

6. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Methods and systems for updating audio fingerprint retrieval databases

    CN102289518A

  • Multi-level index method for data of audio fingerprint database

    CN104765836A

  • Method for identifying audio file and apparatus thereof

    CN102314875A

  • Music retrieval method and system based on music fingerprint characteristic

    CN103853836A

  • Feature point audio retrieval method and system based on time-frequency local energy

    CN108197319A