Data storage method, data matching method and related hardware
By extracting and clustering the features of big data, and using the cluster head features of feature clusters for rapid matching, the problem of time-consuming big data matching in the existing technology is solved, and efficient feature matching is achieved.
Patent Information
- Application Number
- CN202411425676.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-10-12
AI Technical Summary
The process of matching similar target data to specified data from stored big data in the prior art is a problem that due to the huge amount of data, it takes a long time.
By extracting the characteristics of the data to be stored, storing the characteristics and their correspondence, and comparing the similarity between the characteristics to be stored and the cluster head features in the stored feature cluster, determining the storage feature cluster corresponding to the characteristics to be stored, and then realizing the data Cluster storage and fast matching.
Storing similar features through clustering significantly improves the speed of data matching and reduces the amount of calculation and time in the matching process.
Smart Images

Figure CN118940056B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data analysis technology, and in particular to a data storage method, a data matching method and related hardware. Background Art
[0002] With the development of big data technology, data is growing very fast, such as surveillance videos, enterprise backup data, business operation log data and other rarely accessed cold data. When it is necessary to match similar target data for specified data from the stored big data for data analysis, it takes a long time to match specific target data due to the huge amount of stored big data. Summary of the invention
[0003] The embodiments of the present invention provide a data storage method, a data matching method and related hardware to solve the problem in the prior art that the process of matching similar target data for specified data from stored big data is time-consuming due to the huge amount of big data.
[0004] An embodiment of the present invention provides a data storage method, including:
[0005] Extracting features to be stored of the data to be stored, and storing the data to be stored and a corresponding relationship between the data to be stored and the features to be stored;
[0006] Determine the cluster head matching similarity between the feature to be stored and each cluster head feature in each stored feature cluster, and determine the stored feature cluster corresponding to the feature to be stored according to the cluster head matching similarity;
[0007] Storing the to-be-stored features in the storage feature cluster, and updating the target similarity of the storage feature cluster;
[0008] Among them, for any feature cluster, the feature cluster includes at least one intra-cluster feature, and the cluster head feature of the feature cluster is at least part of the intra-cluster features in the feature cluster; the target similarity is the smallest similarity among the similarities between any cluster head feature in the feature cluster and each intra-cluster feature, which is used to screen target data that matches the data to be matched during the data matching process.
[0009] Optionally, determining the storage feature cluster corresponding to the feature to be stored according to the cluster head matching similarity includes:
[0010] If there is a candidate similarity greater than the clustering threshold in the cluster head matching similarity, the feature cluster where the cluster head feature corresponding to the maximum candidate similarity is located is determined as the storage feature cluster corresponding to the feature to be stored;
[0011] If there is no candidate similarity greater than the clustering threshold in the cluster head matching similarity, a new feature cluster is created and the new feature cluster is determined as the storage feature cluster corresponding to the feature to be stored.
[0012] Optionally, the method further comprises:
[0013] storing each feature cluster in a first memory, and caching each cluster head feature in a second memory; wherein the reading speed of the second memory is greater than that of the first memory;
[0014] The determining of the cluster head matching similarity between the feature to be stored and each cluster head feature in each stored feature cluster specifically includes:
[0015] Determine the cluster head matching similarity between the feature to be stored and each cluster head feature in each feature cluster in the second memory.
[0016] Further optionally, for any feature cluster, the number of cluster head features of the feature cluster is not more than the number of features corresponding to the minimum data writing unit of the second memory.
[0017] Further optionally, the method further comprises:
[0018] When it is determined that the storage space of the first memory is full, for at least some feature clusters, at least one intra-cluster feature with the earliest storage time is marked as deleted, and then the newly stored intra-cluster feature overwrites the intra-cluster feature in the deleted state.
[0019] Correspondingly, based on the same inventive concept, an embodiment of the present invention further provides a data matching method, including:
[0020] Extract the features to be matched from the data to be matched;
[0021] Determining the cluster head matching similarity between the feature to be matched and each cluster head feature in each stored feature cluster;
[0022] For any feature cluster, if there is a cluster head matching similarity greater than the screening threshold of the feature cluster, the feature cluster is determined to be a candidate feature cluster, and the intra-cluster matching similarity between the feature to be matched and each intra-cluster feature in the candidate feature cluster is determined, and the intra-cluster feature corresponding to the intra-cluster matching similarity greater than the target similarity of the candidate feature cluster is determined as the target feature;
[0023] Determining the target data corresponding to the target feature as the matching result of the data to be matched;
[0024] Wherein, for any feature cluster, the feature cluster includes at least one intra-cluster feature, the cluster head feature of the feature cluster is at least part of the intra-cluster features in the feature cluster, and the target similarity is the smallest similarity among the similarities between any cluster head feature in the feature cluster and each intra-cluster feature.
[0025] Optionally, for any feature cluster, a screening threshold corresponding to the feature cluster is determined according to a target similarity corresponding to the feature cluster and a minimum cluster head matching similarity, and the screening threshold is not greater than the target similarity.
[0026] Further optionally, the screening threshold Z min Determined by:
[0027]
[0028] in, X is the target similarity, Y is the minimum cluster head matching similarity.
[0029] Optionally, each feature cluster is stored in a first memory, and each cluster head feature is also cached in a second memory;
[0030] The determining of the cluster head matching similarity between the feature to be matched and each cluster head feature in each stored feature cluster specifically includes:
[0031] Determine the cluster head matching similarity between the feature to be matched and each cluster head feature in each feature cluster cached in the second memory;
[0032] The determining of the intra-cluster matching similarity between the feature to be matched and each intra-cluster feature in the candidate feature cluster specifically includes:
[0033] Determine the intra-cluster matching similarity between the feature to be matched and each intra-cluster feature in the feature cluster in the second memory;
[0034] The reading speed of the second memory is greater than that of the first memory.
[0035] Further optionally, if the candidate feature cluster is not cached in the second memory, before determining the intra-cluster matching similarity between the feature to be matched and each intra-cluster feature in the feature cluster in the second memory, each intra-cluster feature in the candidate feature cluster is obtained from the first memory and cached in the second memory.
[0036] Based on the same inventive concept, an embodiment of the present invention further provides a data storage device, including:
[0037] A first feature extraction unit, used to extract features to be stored of the data to be stored;
[0038] A data storage unit, used for storing the data to be stored and the corresponding relationship between the data to be stored and the features to be stored;
[0039] A feature storage unit, used to determine the cluster head matching similarity between the feature to be stored and each cluster head feature in each stored feature cluster, determine the storage feature cluster corresponding to the feature to be stored according to the cluster head matching similarity; store the feature to be stored in the storage feature cluster, and update the target similarity of the storage feature cluster;
[0040] Among them, for any feature cluster, the feature cluster includes at least one intra-cluster feature, and the cluster head feature of the feature cluster is at least part of the intra-cluster features in the feature cluster; the target similarity is the smallest similarity among the similarities between any cluster head feature in the feature cluster and each intra-cluster feature, which is used to screen target data that matches the data to be matched during the data matching process.
[0041] Based on the same inventive concept, an embodiment of the present invention further provides a data matching device, including:
[0042] A second feature extraction unit, used to extract features to be matched from the data to be matched;
[0043] A feature matching unit, used to determine the cluster head matching similarity between the feature to be matched and each cluster head feature in each stored feature cluster; for any feature cluster, if there is a cluster head matching similarity greater than the screening threshold of the feature cluster, then determine the intra-cluster matching similarity between the feature to be matched and each intra-cluster feature in the feature cluster, and determine the intra-cluster feature corresponding to the intra-cluster matching similarity greater than the target similarity of the feature cluster as the target feature;
[0044] A data search unit, used to determine the target data corresponding to the target feature as the matching result of the data to be matched;
[0045] Wherein, for any feature cluster, the feature cluster includes at least one intra-cluster feature, the cluster head feature of the feature cluster is at least part of the intra-cluster features in the feature cluster, and the target similarity is the smallest similarity among the similarities between any cluster head feature in the feature cluster and each intra-cluster feature.
[0046] Based on the same inventive concept, an embodiment of the present invention further provides an electronic device, comprising: a processor and a memory for storing instructions executable by the processor;
[0047] The processor is configured to execute the instructions to implement the data storage method as described above and / or the data matching method as described above.
[0048] Based on the same inventive concept, an embodiment of the present invention further provides a readable storage medium, wherein the readable storage medium stores logic codes, and the logic codes are used to implement the data storage method as described above, and / or the data matching method as described above.
[0049] Based on the same inventive concept, an embodiment of the present invention further provides a computer program product, which includes: computer program code, when the computer program code runs on a computer, it enables the computer to execute the data storage method as described above, and / or the data matching method as described above.
[0050] The beneficial effects of the present invention are as follows:
[0051] The data storage method, data matching method and related hardware provided by the embodiment of the present invention extract features from the stored data during the storage process of big data and store similar features in the same feature cluster in a clustering manner. The stored data is compared with the cluster head features in the feature cluster to determine the clustered stored feature cluster, and the target similarity of the feature cluster is maintained. Afterwards, when matching target data similar to the data to be matched from the stored data, the features to be matched extracted from the data to be matched are compared with the cluster head features of each feature cluster for similarity, and a screening threshold is used to preliminarily screen out candidate feature clusters that may have features similar to the features to be matched, and then the target features are screened out from the features in the cluster according to the target similarity of the candidate feature clusters, thereby determining the target data that matches the data to be matched. The above process clusters similar features with the help of feature clusters to facilitate the screening of target features in the matching process, and uses the cluster head features of the feature clusters to facilitate the clustering and storage of data at a faster speed and the preliminary screening of candidate feature clusters in the matching process, which effectively improves the overall feature matching speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A flowchart of a data storage method provided by an embodiment of the present invention;
[0053] Figure 2 One of the partial flow charts of the data storage method provided by the embodiment of the present invention;
[0054] Figure 3 Partial flow chart 2 of the data storage method provided by the embodiment of the present invention;
[0055] Figure 4 A flow chart of a data matching method provided by an embodiment of the present invention;
[0056] Figure 5 A schematic diagram of the structure of a data storage device provided by an embodiment of the present invention;
[0057] Figure 6 A schematic diagram of the structure of a data matching device provided by an embodiment of the present invention;
[0058] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0059] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and understandable, the present invention will be further described below with reference to the accompanying drawings and examples. However, the exemplary embodiments can be implemented in various forms and should not be understood as being limited to the embodiments described herein; on the contrary, these embodiments are provided to make the present invention more comprehensive and complete, and to fully convey the concepts of the exemplary embodiments to those skilled in the art. The same figure marks in the figures represent the same or similar structures, and thus their repeated descriptions will be omitted. The words expressing position and direction described in the present invention are all explained using the accompanying drawings as examples, but changes can be made as needed, and the changes made are all included in the scope of protection of the present invention. The drawings of the present invention are only used to illustrate the relative position relationship and do not represent the true proportions.
[0060] It should be noted that specific details are described in the following description to facilitate a full understanding of the present invention. However, the present invention can be implemented in a variety of other ways different from those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below. The subsequent description of the specification is a preferred embodiment of the present application, but the description is for the purpose of illustrating the general principles of the present application and is not intended to limit the scope of the present application. The scope of protection of the present application shall be determined by the definition of the attached claims.
[0061] The data storage method, data matching method and related hardware provided by the embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.
[0062] The embodiment of the present invention provides a data storage method, such as Figure 1 As shown, including:
[0063] S110: Extracting features to be stored of the data to be stored.
[0064] The embodiments of the present invention can be applied to the storage of big data and subsequent data matching and analysis scenarios. The data to be stored can be data of types such as video, image, audio, text, etc., such as the storage of surveillance videos and subsequent video content analysis, the storage of equipment operation logs and subsequent log content analysis, etc. The features to be stored can be set according to the type and content of the data to be stored. Since this part of the content is not the focus of the embodiments of the present invention, and the specific implementation method can be implemented using existing technologies, it will not be repeated here.
[0065] S120: storing the data to be stored and the corresponding relationship between the data to be stored and the features to be stored.
[0066] In the specific implementation process, the data to be stored can be stored directly or stored after being compressed using a compression algorithm, and the embodiments of the present invention do not make too many restrictions here. The corresponding relationship between the features to be stored and the data to be stored can be stored together with the data to be stored, or they can be stored separately, and the embodiments of the present invention do not make too many restrictions here.
[0067] S130: Determine the cluster head matching similarity between the feature to be stored and each cluster head feature in each stored feature cluster.
[0068] In the embodiment of the present invention, the stored features are stored in the form of feature clusters. In the embodiment of the present invention, the features included in the feature cluster are referred to as intra-cluster features, that is, for any feature cluster, the feature cluster includes at least one intra-cluster feature. Furthermore, since the number of stored features is extremely large for the big data storage scenario, it is not convenient to compare the features to be stored with all the features when storing feature clusters with relatively similar matching of the features to be stored. Therefore, for any feature cluster, at least part of the intra-cluster features can be set as cluster head features of the feature cluster, so that the features to be stored are only compared with the cluster head features of each feature cluster, thereby reducing the amount of similarity calculation and speeding up the processing speed. Preferably, the first preset number of intra-cluster features stored in the feature cluster can be set as cluster head features according to the storage order of the features stored in the feature cluster, so as to simplify the processing process. Of course, the last preset number of intra-cluster features stored in the feature cluster can also be set as cluster head features according to the storage order of the features stored in the feature cluster, or the cluster head features can be set in other ways, and the embodiment of the present invention does not make too many restrictions here.
[0069] For example, 50 feature clusters have been stored, of which feature cluster A contains 10 cluster head features, feature cluster B contains 3 cluster head features... Then the features to be stored need to determine the 10 cluster head matching similarities with the 10 cluster head features of feature cluster A, and the 3 cluster head matching similarities between the features to be stored and the 3 cluster head features of feature cluster B...
[0070] In the specific implementation process, the similarity (including cluster head matching similarity, target similarity to be described below, and intra-cluster matching similarity) can be cosine similarity, adjusted cosine similarity, Manhattan distance similarity, Chebyshev distance similarity, Jaccard similarity, Pearson Correlation Coefficient, Euclidean distance similarity, Hamming distance similarity, etc., and the embodiments of the present invention do not make too many restrictions.
[0071] S140 , determining a storage feature cluster corresponding to the feature to be stored according to the cluster head matching similarity, and storing the feature to be stored in the storage feature cluster.
[0072] By determining the storage feature cluster corresponding to the feature to be stored based on the cluster head matching similarity, the feature to be stored can be stored in the same feature cluster with other similar features, realizing cluster storage of the stored features for subsequent data matching processing. In the specific implementation process, each feature cluster can be stored as a separate file.
[0073] As an optional implementation, Figure 2 As shown, the storage feature cluster corresponding to the feature to be stored is determined according to the cluster head matching similarity, and the feature to be stored is stored in the storage feature cluster, which specifically includes:
[0074] S141 , judging whether there is a candidate similarity greater than a clustering threshold in the cluster head matching similarity.
[0075] In the specific implementation process, the clustering threshold can be set according to expert experience. For example, the smaller the difference between the features to be stored, the higher the clustering threshold. For example, the clustering threshold can be set to 80% by default and then adjusted according to expert experience.
[0076] If the result of step S141 is yes, execute step S142; if the result of step S141 is no, execute step S143.
[0077] S142: Determine the feature cluster where the cluster head feature corresponding to the maximum candidate similarity belongs as the storage feature cluster corresponding to the feature to be stored.
[0078] S143: Create a new feature cluster, and determine the newly created feature cluster as a storage feature cluster corresponding to the feature to be stored.
[0079] For example, there are currently three feature clusters A, B, and C, of which feature cluster A contains four cluster head features A1, A2, A3, and A4, feature cluster B contains one cluster head feature B1, and feature cluster C contains three cluster head features C1, C2, and C3. The clustering threshold is 80%. If the cluster head matching similarities between the feature p to be stored and A1, A2, A3, A4, B1, C1, C2, and C3 are 94%, 96%, 89%, 92%, 86%, 30%, 32%, and 15% respectively, then the candidate similarities corresponding to the feature p to be stored include 94%, 96%, 89%, 92%, and 86%, of which 96% is the maximum candidate similarity. Correspondingly, the storage feature cluster corresponding to the feature p to be stored is feature cluster A, and the feature p to be stored is stored in feature cluster A. If the cluster head matching similarities between the feature q to be stored and A1, A2, A3, A4, B1, C1, C2, and C3 are 28%, 34%, 16%, 36%, 55%, 30%, 32%, and 15% respectively, then the feature q to be stored has no corresponding candidate similarity, then a new feature cluster D is created as the storage feature cluster corresponding to the feature q to be stored, and the feature q to be stored is stored in feature cluster D.
[0080] As another optional implementation, Figure 3 As shown, the storage feature cluster corresponding to the feature to be stored is determined according to the cluster head matching similarity, and the feature to be stored is stored in the storage feature cluster, which specifically includes:
[0081] S141 , judging whether there is a candidate similarity greater than a clustering threshold in the cluster head matching similarity.
[0082] In the specific implementation process, the clustering threshold can be set according to expert experience. For example, the smaller the difference between the features to be stored, the higher the clustering threshold. For example, the clustering threshold can be set to 80% by default and then adjusted according to expert experience.
[0083] If the result of step S141 is yes, execute step S142 ′; if the result of step S141 is no, execute step S143 .
[0084] S142', determining the feature cluster where the cluster head feature corresponding to a randomly selected candidate similarity belongs as the storage feature cluster corresponding to the feature to be stored.
[0085] S143: Create a new feature cluster, and determine the newly created feature cluster as a storage feature cluster corresponding to the feature to be stored.
[0086] Of course, other classification principles may also be used to match the features to be stored with the feature clusters for cluster storage, and the embodiment of the present invention does not make too many limitations here.
[0087] S150: Update the target similarity of the stored feature cluster.
[0088] For any feature cluster, the target similarity is the smallest similarity among the similarities between any cluster head feature and each intra-cluster feature in the feature cluster. For example, a feature cluster includes 20 intra-cluster features, of which 5 intra-cluster features are cluster head features. Then the target similarity is the smallest similarity among the total 5×20=100 similarities between the 5 cluster head features and the 20 intra-cluster features.
[0089] For big data scenarios, the amount of data and features that need to be stored is extremely large, and the current price of the memory is mainly related to the read and write performance of the memory. The stronger the read and write performance of the memory, the higher the price. Therefore, for the storage data that is mainly cold data and the features extracted from the storage data, they can be stored in a memory (hereinafter referred to as the first memory) with a lower price but lower read and write speed in the form of cold data. For cluster head features and other data that need to be frequently used in the data storage stage and the data matching stage to be described later, in order to speed up the data reading speed so as to speed up the processing process, it is necessary to store it in a memory with a faster reading speed (hereinafter referred to as the second memory). Then optionally, in the above data storage process, each feature cluster is stored in the first memory, and each cluster head feature is cached in the second memory. Among them, the reading speed of the second memory is greater than that of the first memory. Correspondingly, in the step S130, the cluster head matching similarity between the feature to be stored and the cluster head features in each stored feature cluster is determined. Specifically, each cluster head feature can be obtained from the second memory, and the cluster head matching similarity between the feature to be stored and the cluster head features in each feature cluster in the second memory is determined.
[0090] In the specific implementation process, the first memory can adopt a storage device with low read and write performance but low cost, such as a hard disk drive (HDD), a solid state drive (SSD), an optical disk, and a magnetic tape; the second memory can adopt a high-speed storage device, such as a dynamic random access memory (DRAM), a static random access memory (SRAM), a pseudo static random access memory (PSRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), a non-volatile flash memory (Nor Flash), and a NAND Flash.
[0091] Furthermore, considering that some existing memories read and write data in a set data operation unit rather than directly reading and writing bits. In order to improve the efficiency of reading cluster head features, optionally, for any feature cluster, the number of cluster head features of the feature cluster is not more than the number of features corresponding to the minimum data write unit of the second memory. For example, the second memory reads and writes data in blocks, and the size of each block is 4Kb, that is, the minimum data write unit of the second memory is 4Kb. Then if the size of a feature is 1Kb, for any feature cluster, the number of cluster head features is no more than 4kb / 1kb=4.
[0092] For cold data with strong timeliness, such as surveillance videos and equipment operation status logs, the earlier the data is generated, the less important it is. Then, further optionally, when it is determined that the storage space of the first memory is full, for at least part of the feature clusters, at least one intra-cluster feature with the earliest storage time is marked as deleted, and then the newly saved intra-cluster feature overwrites the intra-cluster feature saved in the deleted state. In this way, old data with a long storage time is deleted to make room for the newly generated storage data. Correspondingly, the storage data corresponding to the intra-cluster feature marked as deleted can also be marked as deleted, and then the newly generated storage data overwrites the storage data saved in the deleted state. In the specific implementation process, when marking at least one intra-cluster feature with the earliest storage time as deleted, it is possible to select to mark the intra-cluster features of at least one non-cluster head feature with the earliest storage time as deleted, so as to keep the cluster head features generated by each feature cluster unchanged.
[0093] During the data storage process, a target similarity is maintained for each feature cluster, and the target similarity is used to select target data that matches the data to be matched during the data matching process. Specifically, Figure 4 As shown, based on the same inventive concept, an embodiment of the present invention provides a data matching method used in conjunction with the data storage method described above, including:
[0094] S210: Extract features to be matched from the data to be matched.
[0095] S220: Determine the cluster head matching similarity between the feature to be matched and each cluster head feature in each stored feature cluster.
[0096] Furthermore, if the feature cluster is stored as cold data in a first memory with lower cost but lower read / write performance, the cluster head features of each feature cluster can be additionally cached in a second memory. The reading speed of the second memory is greater than that of the first memory. Accordingly, each cluster head feature can be obtained from the second memory, and the cluster head matching similarity between the feature to be matched and each cluster head feature in each feature cluster cached in the second memory can be determined to speed up the processing process. Furthermore, if the device implementing the data storage method described above is the same device as the device implementing the data matching method, then the cluster head features in each feature cluster can be continuously cached in the second memory during the data storage process until the data matching process, and these cluster head features can be directly used in the data matching process.
[0097] S230. For any feature cluster, if there is a cluster head matching similarity greater than the screening threshold of the feature cluster, the feature cluster is determined to be a candidate feature cluster, and the intra-cluster matching similarity between the feature to be matched and each intra-cluster feature in the candidate feature cluster is determined, and the intra-cluster feature corresponding to the intra-cluster matching similarity greater than the target similarity of the candidate feature cluster is determined as the target feature.
[0098] For example, feature cluster A contains 10 intra-cluster features A1, A2, ..., A10, among which the cluster head features are A1, A2, A3, and A4. The screening threshold of feature cluster A is 81.7%, and the target similarity is 90%. The cluster head matching similarities between the feature to be matched and the four cluster head features A1, A2, A3, and A4 of feature cluster A are 91%, 75%, 81%, and 86%, respectively. Since the cluster head matching similarities of the feature to be matched and A1 are 91%, and the cluster head matching similarities of the feature to be matched and A4 are 86%, which are greater than the screening threshold of feature cluster A of 81.7%, feature cluster A is a candidate feature cluster. The cluster head matching similarities of the intra-cluster matching similarities of the feature to be matched and A1, A2, ..., A10 are 91%, 75%, 81%, 86%, 94%, 95%, 77%, 83%, 87%, and 80%, respectively. Finally, A1, A5, and A6 in feature cluster A are determined as target features. The rest of the feature clusters are similar.
[0099] Further optionally, if the feature cluster is stored as cold data in a first memory with a lower price but lower read and write performance, and the cluster head features are cached in a second memory with a higher reading speed, in order to speed up the processing, for any feature cluster, after determining that the feature cluster is a candidate feature cluster, the intra-cluster features of each candidate feature cluster are obtained from the first memory and cached in the second memory, and the intra-cluster matching similarity between the feature to be matched and the intra-cluster features of each candidate feature cluster in the second memory is determined.
[0100] As an optional implementation, each time a candidate feature cluster is determined, features within each cluster in the candidate feature cluster can be obtained from the first memory and cached in the second memory, and the candidate feature cluster can be cleared after the determination process of whether the target feature exists in the candidate feature cluster is completed.
[0101] As another optional implementation, if the storage space of the second memory is relatively large, the candidate feature cluster can be cached after the determination process of whether the target feature exists in the candidate feature cluster is completed for the current feature to be matched. Then, in the data matching process, for any feature cluster, after determining that the feature cluster is a candidate feature cluster, it is determined whether the candidate feature cluster is cached in the second memory; if the candidate feature cluster is not cached in the second memory, the intra-cluster features of each candidate feature cluster are obtained from the first memory and cached in the second memory, and the intra-cluster matching similarity between the feature to be matched and each intra-cluster feature in the candidate feature cluster in the second memory is determined; if the candidate feature cluster has been cached in the second memory, the intra-cluster matching similarity between the feature to be matched and each intra-cluster feature in the candidate feature cluster in the second memory is directly determined. In this way, if the storage space of the second memory is relatively large, after completing the judgment process of whether the target feature exists in the candidate feature cluster for the current feature to be matched, the candidate feature cluster continues to be cached. If the candidate feature cluster happens to be the candidate feature cluster of another feature to be matched, the intra-cluster features in the candidate feature cluster can be directly obtained from the second memory, and the intra-cluster matching similarity between the other feature to be matched and the intra-cluster features in the candidate feature cluster can be determined, thereby reducing some data transfer processes between the first memory and the second memory, and further speeding up the matching speed.
[0102] As an optional implementation, the screening thresholds corresponding to different feature clusters are the same. As another optional implementation, the screening thresholds corresponding to different feature clusters are not completely the same.
[0103] As an optional implementation, the screening threshold may be set according to expert experience. For example, the smaller the difference between the stored features, the higher the screening threshold corresponding to each feature cluster.
[0104] As another optional implementation, for any feature cluster, the screening threshold corresponding to the feature cluster is dynamically determined, and the screening threshold is not greater than the target similarity. Wherein, for any feature cluster, the screening threshold is based on: ① The target similarity corresponding to the feature cluster X ; ② The smallest cluster head matching similarity among the cluster head matching similarities between the feature to be matched and each cluster head feature in the feature cluster Y Both are determined together.
[0105] Specifically, if the similarity is cosine similarity, let the similarityY The corresponding cluster head feature is A , target similarity X The corresponding intra-cluster features are B , the features to be matched are C , the intra-cluster matching similarity corresponding to the target feature is Z , For vector , The normalized Euclidean distance, For vector , Cosine distance. Then:
[0106]
[0107]
[0108] Then according to the triangle inequality:
[0109]
[0110] but:
[0111]
[0112] but:
[0113]
[0114] That is, the screening threshold Z min Determined by:
[0115]
[0116] By dynamically determining the screening threshold in the above manner, compared with using a fixed screening threshold, it is possible to avoid the situation where the matching process loses a portion of the target data of the correct similar matching results due to the screening threshold being set too large, and the situation where the matching efficiency is low due to the screening threshold being set too small.
[0117] S240: Determine the target data corresponding to the target feature as the matching result of the data to be matched.
[0118] In a specific implementation process, the target data corresponding to the target feature can be determined according to the correspondence between the stored data and the features extracted from the stored data, and the target data can be obtained from the corresponding memory.
[0119] For example, in the scenario of searching for the time when a designated person has appeared in a stored surveillance video, the facial image features are first extracted from the surveillance video by the above data storage method during the data storage process and stored in clusters in the form of feature clusters. Then, the extremely similar target facial image features are found from each feature cluster according to the facial image features to be matched of the designated person by the above data matching method, and the target facial image corresponding to the target facial image features is found (it can be considered that the target facial image is the facial image of the designated person), so as to further determine the time when the target facial image appears in the surveillance video. For another example, in the scenario of searching for a log of a designated operation status from a stored device operation status log, the device operation status features are first extracted from the device operation status log by the above data storage method during the data storage process and stored in clusters in the form of feature clusters. Then, the similar target device operation status features are found from each feature cluster according to the device operation status features to be matched of the designated operation status by the above data matching method, and the target device operation status log corresponding to the target device operation status features is found.
[0120] Thus, for the storage and matching process of big data, the embodiment of the present invention extracts features from the stored data in the storage process of big data and stores similar features in the same feature cluster in a clustering manner. The stored data is compared with the cluster head features in the feature cluster for similarity to determine the clustered stored feature cluster, and the target similarity of the feature cluster is maintained. Afterwards, when matching target data similar to the data to be matched from the stored data, the features to be matched extracted from the data to be matched are compared with the cluster head features of each feature cluster for similarity, and a screening threshold is used to preliminarily screen out candidate feature clusters that may have features similar to the features to be matched, and then the target features are screened out from the features in the cluster according to the target similarity of the candidate feature clusters, thereby determining the target data that matches the data to be matched. The above process clusters similar features with the help of feature clusters to facilitate the screening of target features in the matching process, and with the help of the cluster head features of the feature clusters to facilitate the clustering and storage of data at a faster speed and the preliminary screening of candidate feature clusters in the matching process, which effectively improves the overall feature matching speed compared with the number of clusters fixed by the existing clustering algorithms such as k-means.
[0121] Based on the same inventive concept, the embodiment of the present invention further provides a data storage device, such as Figure 5 As shown, including:
[0122] A first feature extraction unit M110, used to extract features to be stored of the data to be stored;
[0123] A data storage unit M120, used to store the data to be stored and the corresponding relationship between the data to be stored and the features to be stored;
[0124] The feature storage unit M130 is used to determine the cluster head matching similarity between the feature to be stored and each cluster head feature in each stored feature cluster, determine the storage feature cluster corresponding to the feature to be stored according to the cluster head matching similarity; store the feature to be stored in the storage feature cluster, and update the target similarity of the storage feature cluster;
[0125] Among them, for any feature cluster, the feature cluster includes at least one intra-cluster feature, and the cluster head feature of the feature cluster is at least part of the intra-cluster features in the feature cluster; the target similarity is the smallest similarity among the similarities between any cluster head feature in the feature cluster and each intra-cluster feature, which is used to screen target data that matches the data to be matched during the data matching process.
[0126] Optionally, determining the storage feature cluster corresponding to the feature to be stored according to the cluster head matching similarity includes:
[0127] If there is a candidate similarity greater than the clustering threshold in the cluster head matching similarity, the feature cluster where the cluster head feature corresponding to the maximum candidate similarity is located is determined as the storage feature cluster corresponding to the feature to be stored;
[0128] If there is no candidate similarity greater than the clustering threshold in the cluster head matching similarity, a new feature cluster is created and the new feature cluster is determined as the storage feature cluster corresponding to the feature to be stored.
[0129] Optionally, the feature storage unit M130 is further used for:
[0130] storing each feature cluster in a first memory, and caching each cluster head feature in a second memory; wherein the reading speed of the second memory is greater than that of the first memory;
[0131] The determining of the cluster head matching similarity between the feature to be stored and each cluster head feature in each stored feature cluster specifically includes:
[0132] Determine the cluster head matching similarity between the feature to be stored and each cluster head feature in each feature cluster in the second memory.
[0133] Further optionally, for any feature cluster, the number of cluster head features of the feature cluster is not more than the number of features corresponding to the minimum data writing unit of the second memory.
[0134] Further optionally, the feature storage unit M130 is further used for:
[0135] When it is determined that the storage space of the first memory is full, for at least some feature clusters, at least one intra-cluster feature with the earliest storage time is marked as deleted, and then the newly stored intra-cluster feature overwrites the intra-cluster feature in the deleted state.
[0136] Based on the same inventive concept, the embodiment of the present invention also provides a data matching device, such as Figure 6 As shown, including:
[0137] The second feature extraction unit M210 is used to extract the to-be-matched features from the to-be-matched data;
[0138] The feature matching unit M220 is used to determine the cluster head matching similarity between the feature to be matched and each cluster head feature in each stored feature cluster; for any feature cluster, if there is a cluster head matching similarity greater than the screening threshold of the feature cluster, the feature cluster is determined to be a candidate feature cluster, and the intra-cluster matching similarity between the feature to be matched and each intra-cluster feature in the candidate feature cluster is determined, and the intra-cluster feature corresponding to the intra-cluster matching similarity greater than the target similarity of the candidate feature cluster is determined as the target feature;
[0139] A data search unit M230 is used to determine the target data corresponding to the target feature as the matching result of the data to be matched;
[0140] Wherein, for any feature cluster, the feature cluster includes at least one intra-cluster feature, the cluster head feature of the feature cluster is at least part of the intra-cluster features in the feature cluster, and the target similarity is the smallest similarity among the similarities between any cluster head feature in the feature cluster and each intra-cluster feature.
[0141] Optionally, for any feature cluster, a screening threshold corresponding to the feature cluster is determined according to a target similarity corresponding to the feature cluster and a minimum cluster head matching similarity, and the screening threshold is not greater than the target similarity.
[0142] Optionally, the screening threshold Z min Determined by:
[0143]
[0144] in, X is the target similarity, Y is the minimum cluster head matching similarity.
[0145] Optionally, each feature cluster is stored in a first memory, and each cluster head feature is also cached in a second memory;
[0146] The reading speed of the second memory is greater than that of the first memory.
[0147] As an optional implementation manner, the feature matching unit M220 is specifically used for:
[0148] Determine the cluster head matching similarity between the feature to be matched and each cluster head feature in each feature cluster cached in the second memory;
[0149] For any feature cluster, if there is a cluster head matching similarity greater than the screening threshold of the feature cluster, the feature cluster is determined to be a candidate feature cluster, and the intra-cluster features of the candidate feature cluster are obtained from the first memory and cached in the second memory, and the intra-cluster matching similarity between the feature to be matched and the intra-cluster features of the candidate feature cluster in the second memory is determined, and the intra-cluster feature corresponding to the intra-cluster matching similarity greater than the target similarity of the candidate feature cluster is determined as the target feature.
[0150] As another optional implementation, the feature matching unit M220 is specifically used for:
[0151] Determine the cluster head matching similarity between the feature to be matched and each cluster head feature in each feature cluster cached in the second memory;
[0152] For any feature cluster, if there is a cluster head matching similarity greater than a screening threshold of the feature cluster, the feature cluster is determined to be a candidate feature cluster, and it is determined whether the candidate feature cluster is cached in the second memory;
[0153] If the candidate feature cluster is not cached in the second memory, then obtaining each intra-cluster feature in the candidate feature cluster from the first memory and caching it in the second memory, determining the intra-cluster matching similarity between the feature to be matched and each intra-cluster feature in the candidate feature cluster in the second memory, and determining the intra-cluster feature corresponding to the intra-cluster matching similarity greater than the target similarity of the candidate feature cluster as the target feature;
[0154] If the candidate feature cluster has been cached in the second memory, the intra-cluster matching similarity between the feature to be matched and each intra-cluster feature in the candidate feature cluster in the second memory is directly determined, and the intra-cluster feature corresponding to the intra-cluster matching similarity greater than the target similarity of the candidate feature cluster is determined as the target feature.
[0155] It should be understood that the data storage device and data matching device provided in the embodiment of the present invention can be implemented in other ways. For example, the data storage device and data matching device embodiments described above are only schematic. For example, the data storage device and the data matching device can be the same hardware device or two independent hardware devices. For example, the division of the unit is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the coupling or direct coupling or communication connection between each other shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms. The unit described as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, each functional unit in the embodiment of the present application can be integrated in a processing module, or each unit can exist physically alone, or two or more units can be integrated in one module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. If the integrated module is implemented in the form of software functional modules and sold or used as an independent product, it can be stored in a readable storage medium.
[0156] Since the working principle of the data storage device is consistent with the data storage method described above, and the working principle of the data matching device is consistent with the data matching method described above, the specific implementation process of the device can refer to the implementation of the corresponding method and will not be repeated here.
[0157] Based on the same inventive concept, an embodiment of the present invention further provides an electronic device, such as Figure 7 As shown, it includes: a processor 110 and a memory 120 for storing executable instructions of the processor 110.
[0158] The processor 110 is configured to execute the instructions to implement the data storage method and / or the data matching method.
[0159] In the specific implementation process, the device may have relatively large differences due to different configurations or performances, and may include one or more processors 110, memory 120, and readable storage medium 130, wherein the memory 120 and / or readable storage medium 130 include one or more applications 131 or data 132. The processor 110 may include a central processing unit (CPU), a graphics processing unit (GPU), a neural network processor (NPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a complex programmable logic device (CPLD), a field programmable gate array (FPGA), etc. The memory 120 and / or the readable storage medium 130 may also include one or more operating systems 133, such as Windows, Mac OS, Linux, IOS, Android, Unix, FreeBSD, etc. Among them, the memory 120 and the readable storage medium 130 may be temporary storage or permanent storage. The application 131 may include one or more of the modules ( Figure 7 ), each module may include a series of instruction operations. Further, the processor 110 may be configured to communicate with the readable storage medium 130, and execute a series of instruction operations in the readable storage medium 130 on the device. The device may also include one or more power supplies ( Figure 7 ); one or more network interfaces 140, wherein the network interface 140 includes a wired network interface 141 and / or a wireless network interface 142; and one or more input / output interfaces 143.
[0160] Based on the same inventive concept, an embodiment of the present application provides a readable storage medium, wherein the readable storage medium stores a logic code, and the logic code is used to implement the data storage method and / or data matching method as described above.
[0161] In the specific implementation process, the logic code can be a computer program code, a hardware description code, and other types of logic code. If the logic code is a computer program code, any combination of one or more programming languages can be used to write a computer program code for implementing the data storage method and / or data matching method as described above. The programming language includes an object-oriented programming language, such as Java, C++, C#, etc., and also includes a conventional procedural programming language, such as "C" language, assembly language, or similar programming languages. If the logic code is a hardware description code, any combination of one or more hardware description languages, such as Verilog HDL, System Verilog, etc., can be used to write a hardware description code for implementing the data storage method and / or data matching method as described above.
[0162] In the specific implementation process, the readable storage medium can be any available medium that can be stored by a computer or a data storage device such as a configuration server, data center, etc. that includes one or more available media integrated. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a tape), an optical medium (such as a high-density digital video disc (DVD), a video compact disc (VCD)), or a semiconductor medium (such as a solid state disk (SSD)).
[0163] Since the principle of solving the problem by the above-mentioned readable storage medium corresponds to the data storage method and the data matching method described above, the implementation of the above-mentioned readable storage medium can refer to the implementation of the corresponding method, and the repeated parts will not be repeated.
[0164] Based on the same inventive concept, an embodiment of the present application further provides a computer program product, which includes: a computer program code, when the computer program code runs on a computer, enables the computer to implement the data storage method and / or data matching method described above.
[0165] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a readable storage medium, or transmitted from one readable storage medium to another readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, configuration server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method to another website site, computer, configuration server or data center.
[0166] Since the principle of solving the problem by the above-mentioned computer program product corresponds to the data storage method and the data matching method described above, the implementation of the above-mentioned computer program product can refer to the implementation of the corresponding method, and the repeated parts will not be repeated.
[0167] The data storage method, data matching method and related hardware provided by the embodiment of the present invention extract features from the stored data during the storage process of big data and store similar features in the same feature cluster in a clustering manner. The stored data is compared with the cluster head features in the feature cluster to determine the clustered stored feature cluster, and the target similarity of the feature cluster is maintained. Afterwards, when matching target data similar to the data to be matched from the stored data, the features to be matched extracted from the data to be matched are compared with the cluster head features of each feature cluster for similarity, and a screening threshold is used to preliminarily screen out candidate feature clusters that may have features similar to the features to be matched, and then the target features are screened out from the features in the cluster according to the target similarity of the candidate feature clusters, thereby determining the target data that matches the data to be matched. The above process clusters similar features with the help of feature clusters to facilitate the screening of target features in the matching process, and uses the cluster head features of the feature clusters to facilitate the clustering and storage of data at a faster speed and the preliminary screening of candidate feature clusters in the matching process, which effectively improves the overall feature matching speed.
[0168] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0169] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0170] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0171] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0172] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A data storage method, characterized in that: include: Extracting features to be stored of the data to be stored, and storing the data to be stored and a corresponding relationship between the data to be stored and the features to be stored; Determine the cluster head matching similarity between the feature to be stored and each cluster head feature in each stored feature cluster, and determine the stored feature cluster corresponding to the feature to be stored according to the cluster head matching similarity; Storing the to-be-stored features in the storage feature cluster, and updating the target similarity of the storage feature cluster; Wherein, for any feature cluster, the feature cluster includes at least one intra-cluster feature, the cluster head feature of the feature cluster is at least part of the intra-cluster features in the feature cluster; the target similarity is the smallest similarity among the similarities between any cluster head feature in the feature cluster and each intra-cluster feature, which is used in the data matching process: (1) The minimum cluster head matching similarity corresponding to the feature cluster jointly determines the screening threshold of the feature cluster; the screening threshold is not greater than the target similarity; the screening threshold is used to: when there is a cluster head matching similarity greater than the screening threshold, determine the feature cluster as a candidate feature cluster; for any cluster head feature of the feature cluster, the cluster head matching similarity is the similarity between the cluster head feature and the feature to be matched corresponding to the data to be matched; (2) When determining that the feature cluster is a candidate feature cluster, determining the intra-cluster feature corresponding to the intra-cluster matching similarity greater than the target similarity as the target feature, and determining the target data corresponding to the target feature as the matching result of the data to be matched; the intra-cluster matching similarity is the similarity between the intra-cluster feature and the feature to be matched.
2. The method according to claim 1, characterized in that The step of determining the storage feature cluster corresponding to the feature to be stored according to the cluster head matching similarity comprises: If there is a candidate similarity greater than the clustering threshold in the cluster head matching similarity, the feature cluster where the cluster head feature corresponding to the maximum candidate similarity is located is determined as the storage feature cluster corresponding to the feature to be stored; If there is no candidate similarity greater than the clustering threshold in the cluster head matching similarity, a new feature cluster is created and the new feature cluster is determined as the storage feature cluster corresponding to the feature to be stored.
3. The method according to claim 1, characterized in that The method further comprises: storing each feature cluster in a first memory, and caching each cluster head feature in a second memory; wherein the reading speed of the second memory is greater than that of the first memory; The determining of the cluster head matching similarity between the feature to be stored and each cluster head feature in each stored feature cluster specifically includes: Determine the cluster head matching similarity between the feature to be stored and each cluster head feature in each feature cluster in the second memory.
4. The method according to claim 3, characterized in that For any feature cluster, the number of cluster head features of the feature cluster is not more than the number of features corresponding to the minimum data writing unit of the second memory.
5. The method according to claim 3, characterized in that The method further comprises: When it is determined that the storage space of the first memory is full, for at least some feature clusters, at least one intra-cluster feature with the earliest storage time is marked as deleted, and then the newly stored intra-cluster feature overwrites the intra-cluster feature in the deleted state.
6. A data matching method, characterized in that: include: Extract the features to be matched from the data to be matched; Determining the cluster head matching similarity between the feature to be matched and each cluster head feature in each stored feature cluster; For any feature cluster, if there is a cluster head matching similarity greater than the screening threshold of the feature cluster, the feature cluster is determined to be a candidate feature cluster, and the intra-cluster matching similarity between the feature to be matched and each intra-cluster feature in the candidate feature cluster is determined, and the intra-cluster feature corresponding to the intra-cluster matching similarity greater than the target similarity of the candidate feature cluster is determined as the target feature; Determining the target data corresponding to the target feature as the matching result of the data to be matched; Among them, for any feature cluster, the feature cluster includes at least one intra-cluster feature, the cluster head feature of the feature cluster is at least part of the intra-cluster features in the feature cluster, and the target similarity is the smallest similarity among the similarities between any cluster head feature in the feature cluster and each intra-cluster feature; the screening threshold corresponding to the feature cluster is determined according to the target similarity corresponding to the feature cluster and the smallest cluster head matching similarity, and the screening threshold is not greater than the target similarity.
7. The method according to claim 6, characterized in that The screening threshold Z min Determined by: ; in, X is the target similarity, Y is the minimum cluster head matching similarity.
8. The method according to claim 6, characterized in that Each feature cluster is stored in a first memory, and each cluster head feature is also cached in a second memory; The determining of the cluster head matching similarity between the feature to be matched and each cluster head feature in each stored feature cluster specifically includes: Determine the cluster head matching similarity between the feature to be matched and each cluster head feature in each feature cluster cached in the second memory; The determining of the intra-cluster matching similarity between the feature to be matched and each intra-cluster feature in the candidate feature cluster specifically includes: Determine the intra-cluster matching similarity between the feature to be matched and each intra-cluster feature in the candidate feature cluster in the second memory; The reading speed of the second memory is greater than that of the first memory.
9. The method according to claim 8, characterized in that If the candidate feature cluster is not cached in the second memory, before determining the intra-cluster matching similarity between the feature to be matched and each intra-cluster feature in the feature cluster in the second memory, each intra-cluster feature in the candidate feature cluster is obtained from the first memory and cached in the second memory.
10. A data storage device, characterized in that: include: A first feature extraction unit, used to extract features to be stored of the data to be stored; A data storage unit, used for storing the data to be stored and the corresponding relationship between the data to be stored and the features to be stored; A feature storage unit, used to determine the cluster head matching similarity between the feature to be stored and each cluster head feature in each stored feature cluster, determine the storage feature cluster corresponding to the feature to be stored according to the cluster head matching similarity; store the feature to be stored in the storage feature cluster, and update the target similarity of the storage feature cluster; Wherein, for any feature cluster, the feature cluster includes at least one intra-cluster feature, the cluster head feature of the feature cluster is at least part of the intra-cluster features in the feature cluster; the target similarity is the smallest similarity among the similarities between any cluster head feature in the feature cluster and each intra-cluster feature, which is used in the data matching process: (1) The minimum cluster head matching similarity corresponding to the feature cluster jointly determines the screening threshold of the feature cluster; the screening threshold is not greater than the target similarity; the screening threshold is used to: when there is a cluster head matching similarity greater than the screening threshold, determine the feature cluster as a candidate feature cluster; for any cluster head feature of the feature cluster, the cluster head matching similarity is the similarity between the cluster head feature and the feature to be matched corresponding to the data to be matched; (2) When determining that the feature cluster is a candidate feature cluster, determining the intra-cluster feature corresponding to the intra-cluster matching similarity greater than the target similarity as the target feature, and determining the target data corresponding to the target feature as the matching result of the data to be matched; the intra-cluster matching similarity is the similarity between the intra-cluster feature and the feature to be matched.
11. A data matching device, characterized in that: include: A second feature extraction unit, used to extract features to be matched from the data to be matched; A feature matching unit, used to determine the cluster head matching similarity between the feature to be matched and each cluster head feature in each stored feature cluster; for any feature cluster, if there is a cluster head matching similarity greater than the screening threshold of the feature cluster, the feature cluster is determined to be a candidate feature cluster, and the intra-cluster matching similarity between the feature to be matched and each intra-cluster feature in the candidate feature cluster is determined, and the intra-cluster feature corresponding to the intra-cluster matching similarity greater than the target similarity of the candidate feature cluster is determined as the target feature; A data search unit, used to determine the target data corresponding to the target feature as the matching result of the data to be matched; Among them, for any feature cluster, the feature cluster includes at least one intra-cluster feature, the cluster head feature of the feature cluster is at least part of the intra-cluster features in the feature cluster, and the target similarity is the smallest similarity among the similarities between any cluster head feature in the feature cluster and each intra-cluster feature; the screening threshold corresponding to the feature cluster is determined according to the target similarity corresponding to the feature cluster and the smallest cluster head matching similarity, and the screening threshold is not greater than the target similarity.
12. An electronic device, characterized in that: include: a processor and a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the data storage method as described in any one of claims 1 to 5, and / or the data matching method as described in any one of claims 6 to 9.
13. A readable storage medium, characterized in that: The readable storage medium stores logic codes, and the logic codes are used to implement the data storage method according to any one of claims 1 to 5 and / or the data matching method according to any one of claims 6 to 9.
14. A computer program product, characterized in that The computer program product comprises: a computer program code, which, when executed on a computer, enables the computer to execute the data storage method according to any one of claims 1 to 5, and / or the data matching method according to any one of claims 6 to 9.
Citation Information
Patent Citations
Image data processing method and device, equipment and storage medium
CN115880508A