A method for encoding data of a data file or a data stream and feeding the encoded data into a database and for identifying an unknown data file or data stream on the basis of a database, the method comprising the following steps: a) collecting data which defines a frame and encoding said data by extracting high dimensional descriptors representing a content within said frame, b) selecting representative descriptors from said frame or from a set of consecutive frames, by filtering out redundant descriptors, c) creating a set of the selected descriptors, d) labelling the selected descriptors in the set with an identifier, e) repeating the steps a to d, wherein the identifiers of the descriptors are stored on one or more storage areas or devices, wherein the identifiers are organized on said one or more storage areas or devices such that identifiers of spatially closely located descriptors are with high likelihood stored within the same device area or partition, f) querying the database comprising known descriptors, g) retrieving all spatially closely related identifiers of the database and aggregating the related identifiers and aggregating these identifiers depending on their scene origin, wherein when an identifier yields a high score, i) up to 1000 neighbouring descriptors are retrieved for each individual descriptor, ii) each retrieved neighbour yields a vote for the scene it belongs to, iii) the result sets of all descriptors from the same query scene are then aggregated on a votes-for- scene basis, iv) the aggregated list is then sorted in descending order, so that the scene which got the most votes stays on top of the list, determining that the query descriptors are retrieved from a set of descriptors containing similar data, h) evaluating the retrieved set by performing a regression test on the retrieved descriptors, where a defined threshold of 3-30 scene queries needs to be evaluated, and where the results on those queries are then separated into regression windows which must not exceed a defined time interval, wherein a decision of identification is determined when the regression signal exceeds a predefined threshold. a) collecting data which defines a frame and encoding said data by extracting high dimensional descriptors representing a content within said frame, b) selecting representative descriptors from said frame or from a set of consecutive frames, by filtering out redundant descriptors, c) creating a set of the selected descriptors, d) labelling the selected descriptors in the set with an identifier, e) repeating the steps a to d, wherein the identifiers of the descriptors are stored on one or more storage areas or devices, wherein the identifiers are organized on said one or more storage areas or devices such that identifiers of spatially closely located descriptors are with high likelihood stored within the same device area or partition, f) querying the database comprising known descriptors, g) retrieving all spatially closely related identifiers of the database and aggregating the related identifiers and aggregating these identifiers depending on their scene origin, wherein when an identifier yields a high score, i) up to 1000 neighbouring descriptors are retrieved for each individual descriptor, ii) each retrieved neighbour yields a vote for the scene it belongs to, iii) the result sets of all descriptors from the same query scene are then aggregated on a votes-for- scene basis, iv) the aggregated list is then sorted in descending order, so that the scene which got the most votes stays on top of the list, determining that the query descriptors are retrieved from a set of descriptors containing similar data, h) evaluating the retrieved set by performing a regression test on the retrieved descriptors, where a defined threshold of 3-30 scene queries needs to be evaluated, and where the results on those queries are then separated into regression windows which must not exceed a defined time interval, wherein a decision of identification is determined when the regression signal exceeds a predefined threshold.