Feature comparison method, electronic device, and storage medium

CN116109912BActive Publication Date: 2026-09-18ZHEJIANG DAHUA TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211738846.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2026-09-18
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

[0005]本发明提供了一种特征比对方法、电子设备以及存储介质,以解决特征相似度的参考性与可靠性不足的问题

Benefits of technology

[0016] The beneficial effects of this invention are as follows: Unlike the prior art, this invention first determines whether there is second verification information in the second feature that is the same as the first verification information before performing feature comparison; only when there is second verification information in the second feature that is the same as the first verification information is the second feature compared with the first feature to obtain feature similarity, thereby ensuring that the two features that can be compared are generated by the same neural network model, thus avoiding the difference caused by different neural network model parameters or structures to feature comparison, and improving the reference and reliability of feature similarity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116109912B_ABST
    Figure CN116109912B_ABST
Patent Text Reader

Abstract

The application discloses a feature comparison method, an electronic device and a storage medium, wherein the feature comparison method comprises the following steps: obtaining a first feature, wherein the first feature comprises first check information; obtaining a second feature; judging whether the second feature comprises second check information which is the same as the first check information; when the second feature comprises the second check information which is the same as the first check information, comparing the second feature with the first feature to obtain a feature similarity, wherein the first check information represents version information of a neural network model for generating the first feature, and the second check information represents version information of a neural network model for generating the second feature. In the foregoing manner, the application can avoid the influence of differences in neural network model parameters or structures on feature comparison, and improve the reference and reliability of the feature similarity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of feature matching, and in particular to feature matching methods, electronic devices, and storage media. Background Technology

[0002] Feature vector matching based on neural network models is common in deep learning-related intelligent systems. For example, it has applications in machine vision, sound perception, text segmentation, and semantic recognition.

[0003] When there are many categories of features to be classified, direct classification using a deep neural network model cannot achieve the desired accuracy. Therefore, feature comparison is usually used, which involves generating a feature base library for a certain category in advance, and then comparing the feature vectors output by the model with the feature vectors in the feature base library in real time to obtain the feature similarity. This method can transform a multi-classification problem into a binary classification problem to achieve classification.

[0004] However, when comparing features, the feature vectors may come from different neural networks, which affects the reference value and reliability of feature similarity. Summary of the Invention

[0005] This invention provides a feature comparison method, an electronic device, and a storage medium to address the problem of insufficient reference and reliability of feature similarity.

[0006] To address the aforementioned technical problems, this invention provides a feature comparison method, comprising: acquiring a first feature, the first feature including first verification information; acquiring a second feature, determining whether there is second verification information in the second feature that is identical to the first verification information; when there is second verification information in the second feature that is identical to the first verification information, comparing the second feature with the first feature to obtain feature similarity, wherein the first verification information represents the version information of the neural network model that generated the first feature, and the second verification information represents the version information of the neural network model that generated the second feature.

[0007] The process of obtaining a first feature, which includes first verification information, includes: inputting the target data into a neural network model for processing to obtain a first feature including the first verification information and a first feature vector; when a second feature contains second verification information that is the same as the first verification information, comparing the second feature with the first feature to obtain feature similarity, including: when a second feature contains second verification information that is the same as the first verification information, comparing the second feature vector in the second feature with the first feature vector to obtain feature similarity.

[0008] The neural network model includes cascaded feature extraction subnetworks and verification subnetworks. The target data is input into the neural network model for processing to obtain a first feature, which includes first verification information and a first feature vector. This process includes: inputting the target data into the feature extraction subnetwork for feature extraction to obtain a first feature vector; obtaining first verification information based on the verification subnetwork; and concatenating the first verification information and the first feature vector to obtain the first feature.

[0009] The verification subnetwork includes a global pooling layer and a convolutional layer. Obtaining first verification information based on the verification subnetwork includes: inputting the set verification data into the feature extraction subnetwork for feature extraction to obtain a set feature map; converting the set feature map into a one-dimensional feature vector through the global pooling layer of the verification subnetwork; and adjusting the dimension of the one-dimensional feature vector through the convolutional layer of the verification subnetwork to obtain first verification information including first dimension information and a first verification information vector.

[0010] The first verification information includes the first dimension information and the first verification information vector; concatenating the first verification information and the first feature vector to obtain the first feature includes: concatenating the first dimension information, the first verification information vector, and the first feature vector end to end in sequence to obtain the first feature.

[0011] Specifically, determining whether there is second verification information in the second feature that is the same as the first verification information includes: determining whether there is second dimension information in the second feature that is the same as the first dimension information; if so, determining whether there is a second verification information vector in the second feature that is the same as the first verification information vector; if so, determining that there is second verification information in the second feature that is the same as the first verification information.

[0012] The features include image features, and the feature comparison method further includes: obtaining a first image feature, which includes first image verification information; obtaining a second image feature, and determining whether there is second image verification information in the second image feature that is the same as the first image verification information; when there is second image verification information in the second image feature that is the same as the first image verification information, comparing the second image feature with the first image feature to obtain feature similarity; wherein, the first image verification information represents the version information of the neural network model that generates the first image feature, and the second image verification information represents the version information of the neural network model that generates the second image feature.

[0013] The first image verification information is obtained by processing the set image verification data through a neural network model; the set image verification data includes images in which all pixel values ​​are 1.

[0014] To address the aforementioned technical problems, the present invention also provides an electronic device comprising: a memory and a processor coupled to each other, wherein the processor is configured to execute program instructions stored in the memory to implement the feature comparison method described above.

[0015] To address the aforementioned technical problems, the present invention also provides a computer-readable storage medium storing program data that can be executed to implement the feature comparison method as described above.

[0016] The beneficial effects of this invention are as follows: Unlike the prior art, this invention first determines whether there is second verification information in the second feature that is the same as the first verification information before performing feature comparison; only when there is second verification information in the second feature that is the same as the first verification information is the second feature compared with the first feature to obtain feature similarity, thereby ensuring that the two features that can be compared are generated by the same neural network model, thus avoiding the difference caused by different neural network model parameters or structures to feature comparison, and improving the reference and reliability of feature similarity. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating an embodiment of the feature comparison method provided by the present invention;

[0018] Figure 2 This is a flowchart illustrating another embodiment of the feature comparison method provided by the present invention;

[0019] Figure 3 yes Figure 2 A schematic diagram of the structure of one embodiment of the neural network model in the example;

[0020] Figure 4 This is a structural schematic diagram of the first feature and one embodiment;

[0021] Figure 5 This is a schematic diagram of the structure of an embodiment of the electronic device provided by the present invention;

[0022] Figure 6 This is a schematic diagram of an embodiment of the computer-readable storage medium provided by the present invention. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0024] Please see Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the feature comparison method provided by the present invention.

[0025] Step S11: Obtain the first feature, which includes the first verification information.

[0026] The first feature can be any type of image feature, speech feature, text feature, etc., without any limitation.

[0027] The first verification information represents the version information of the neural network model that generated the first feature.

[0028] Step S12: Obtain the second feature and determine whether there is second verification information in the second feature that is the same as the first verification information.

[0029] The second feature is obtained. The feature type of the second feature is the same as that of the first feature. For example, when the first feature is an image feature, the second feature is also an image feature; when the first feature is a speech feature, the second feature is also a speech feature.

[0030] The second verification information represents the version information of the neural network model that generated the second feature.

[0031] Determine whether the second feature contains second verification information that is identical to the first verification information. If the second feature does not contain second verification information that is identical to the first verification information, it means that the second feature was not generated by the same neural network model as the first feature. If the second feature contains second verification information that is identical to the first verification information, it means that the second feature was generated by the same neural network model as the first feature.

[0032] Specifically, we can first determine whether the second feature contains second verification information. If it does not, it means that the second feature does not contain second verification information that is the same as the first verification information. If it does, we can further determine whether the second verification information is the same as the first verification information.

[0033] Step S13: When there is second verification information in the second feature that is the same as the first verification information, compare the second feature with the first feature to obtain the feature similarity.

[0034] When the second feature contains the same second verification information as the first verification information, it indicates that the first feature and the second feature were generated by the same neural network model. Therefore, the first feature and the second feature meet the conditions for feature similarity calculation. The second feature is then compared with the first feature to obtain the feature similarity.

[0035] If there is no second verification information in the second feature that is the same as the first verification information, the second feature will not be compared with the first feature.

[0036] Specifically, the feature similarity can be obtained by comparing the second feature with the first feature using methods such as cosine similarity, Pearson correlation coefficient, and Euclidean distance. No specific limitations are specified here.

[0037] In this embodiment, feature similarity comparison will only be performed when it is determined that the verification information of the second feature and the first feature are the same, that is, when the prerequisite of belonging to the same neural network model is met.

[0038] Because each neural network model has different internal parameters or structures, when different neural network models generate features based on the same input, they may generate different features due to differences in parameters or structures. Therefore, comparing features generated by different neural network models results in low reliability and accuracy in representing the similarity between inputs, leading to low comparison precision and difficulty in representing the similarity between input data. This embodiment ensures that both features eligible for comparison are generated by the same neural network model by setting first and second verification information. This avoids the impact of different neural network model parameters on feature comparison and improves the reliability and accuracy of feature similarity.

[0039] Through the above steps, the feature comparison method of this embodiment first determines whether there is second verification information in the second feature that is the same as the first verification information before performing feature comparison; only when there is second verification information in the second feature that is the same as the first verification information is the second feature compared with the first feature to obtain feature similarity, thereby ensuring that the two features that can be compared are generated by the same neural network model, thereby avoiding the difference in feature comparison caused by different neural network model parameters and structures, and improving the reference and reliability of feature similarity.

[0040] Please see Figure 2 , Figure 2 This is a flowchart illustrating another embodiment of the feature comparison method provided by the present invention.

[0041] Step S21: Input the target data into the neural network model for processing to obtain the first feature, which includes the first verification information and the first feature vector.

[0042] The target data is the object that the neural network model targets. For example, when the neural network model is an image classification model, the target data is an image; when the neural network model is a speech recognition model, the target data is speech. And so on, without further limitation.

[0043] The neural network model includes cascaded feature extraction subnetworks and verification subnetworks.

[0044] Please see Figure 3 , Figure 3 yes Figure 2 A schematic diagram of the structure of one embodiment of the neural network model in the example.

[0045] The neural network model 300 of this embodiment includes a cascaded feature extraction subnetwork 310 and a verification subnetwork 320.

[0046] The feature extraction subnetwork 310 includes a cascaded input layer 311, a feature extraction layer 312, and an output layer 313. The verification subnetwork 320 includes a cascaded global pooling layer 321, a convolutional layer 322, and a verification information output layer 323.

[0047] The feature extraction layer 312 is also connected to the global pooling layer 321, and the verification information output layer 323 is also connected to the output layer 313.

[0048] Specifically, the method of inputting target data into a neural network model for processing to obtain a first feature including first verification information and a first feature vector includes: inputting target data into a feature extraction subnetwork 310 for feature extraction to obtain a first feature vector; obtaining first verification information based on a verification subnetwork 320; and concatenating the first verification information and the first feature vector to obtain the first feature.

[0049] The feature extraction subnetwork 310 is an inherent layer of a general neural network. Its structure and size can be customized according to the application scenario and specific data conditions. This embodiment does not impose any limitations on it and it is applicable to any structure and size. After receiving the target data, the feature extraction subnetwork 310 performs feature extraction on the target data to obtain the first feature vector of the target data.

[0050] The target data can be sample data used to generate a feature base library for a specific category in advance, so that the similarity of subsequently generated features can be used for classification, recognition, and other processing.

[0051] In a specific application scenario, when the neural network model 300 is applied for the first time, the steps for obtaining the first verification information based on the verification sub-network 320 include: inputting the set verification data into the input layer 311, and then performing forward propagation calculations through the feature extraction layer 312, the global pooling layer 321, and the convolutional layer 322 to obtain the fixed first verification information for the model. The set verification data is used to generate data that uniquely identifies the neural network model 300. The verification information generated by the same neural network model 300 based on the set verification data is identical. The specific settings of the set verification data can be configured based on the specific type of the neural network model 300, and are not limited here.

[0052] With the above model structure, the generation of the first verification information can be automatically generated by the neural network model 300 itself, without the need for manual management of the model version, thus realizing the automation of verification information generation.

[0053] In some embodiments, when the neural network model 300 is a speech processing model, the verification data can include an audio segment in which the timbre, pitch, and audio frequency are the same at each time point, so that the output obtained after calculation by each layer of the neural network model 300 can better represent the parameter distribution and structural characteristics of the neural network model 300 itself.

[0054] In some embodiments, when the neural network model 300 is an image processing model, the setting verification data may include setting image verification data, specifically an image where all pixel values ​​are 1. This setting image verification data can be used to uniquely identify the version of the neural network model 300. Setting the setting image verification data to an image where all pixel values ​​are 1 has two advantages: firstly, the setting image verification data has all values ​​that are completely identical in numerical distribution, making it easy to obtain without requiring specific conditions, and therefore applicable to neural networks with various structures; secondly, due to the property that the value 1 multiplied by any value equals any number itself, the output obtained after calculation by each layer of the neural network model 300 can better represent the parameter distribution and structural characteristics of the neural network model 300 itself.

[0055] The aforementioned verification data is input into input layer 311, and then processed by feature extraction layer 312 to obtain a verification feature map. The global pooling layer 321 scales the size of the verification feature map output by feature extraction layer 312 to 1x1, thereby converting the [c, w, h] three-dimensional feature map structure into a [c, 1, 1] one-dimensional feature vector. Convolutional layer 322 is a 1x1 convolutional layer, its purpose being to adjust the dimension of the feature vector output by global pooling layer 321 to [c1, 1, 1], where c1 is the length of the first verification information, determined by the number of convolutional kernels in the 1x1 convolutional layer. This can be flexibly set according to different actual scenarios, and the number of convolutional kernels determines the dimension of the obtained verification information.

[0056] In another specific application scenario, when the neural network model 300 is not being used for the first time, but in subsequent applications, the steps for obtaining the first verification information based on the verification sub-network 320 include: directly obtaining the first verification information generated by the verification sub-network 320 during the first application. The verification sub-network 320 can remain silent in subsequent applications.

[0057] In this embodiment, the verification sub-network 320 is an output auxiliary module that does not interfere with the structure of the feature extraction sub-network 310 itself. It can be used in neural networks of any structure and size and has strong versatility.

[0058] After obtaining the first verification information and the first feature vector, the first verification information and the first feature vector are concatenated to obtain the first feature. Specifically, the first verification information is concatenated at the beginning of the first feature vector. This allows for pre-comparison of the verification information before feature comparison.

[0059] The first verification information includes the first dimension information and the first verification information vector; concatenating the first verification information and the first feature vector to obtain the first feature includes: concatenating the first dimension information, the first verification information vector, and the first feature vector end to end in sequence to obtain the first feature.

[0060] Please see Figure 4 , Figure 4 This is a structural schematic diagram of the first feature and one implementation method.

[0061] The first feature 400 in this embodiment includes first verification information 420 and a first feature vector v, with the first verification information 420 appended to the beginning of the first feature vector v. The first feature vector v is a feature vector generated by the neural network model 300 based on the target data. The first verification information 420 is data generated by the neural network model 300 based on specified verification data.

[0062] The first verification information 420 includes first dimension information 410 and first verification information vector s. The first dimension information 410 includes the total vector dimension a of the first feature, the first verification information dimension b, and the first feature vector dimension c.

[0063] For example, for the first feature vector v, if its feature vector dimension is 1024 and the dimension of the first verification information vector is 128, then the dimension of V is 3 + 128 + 1024 = 1155, where a = 1155, b = 128, and c = 1024.

[0064] The above settings ensure that the verification information is unique and difficult to tamper with.

[0065] The neural network model 300 in this embodiment has the functions of generating first verification information and real-time feature extraction.

[0066] Step S22: Obtain the second feature and determine whether there is second verification information in the second feature that is the same as the first verification information.

[0067] The second feature is the feature that needs to be compared with the first feature, and it can be a feature of the object to be processed.

[0068] Determine whether there is second-dimensional information in the second feature that is the same as the first-dimensional information; if so, determine whether there is second-verification information vector in the second feature that is the same as the first verification information vector; if so, determine that there is second-verification information in the second feature that is the same as the first verification information.

[0069] Specifically, first determine whether there is second dimension information in the second feature that is the same as the first dimension information of the first feature; if so, further determine whether there is second verification information vector in the second feature that is the same as the first verification information vector of the first feature; if so, it means that there is second verification information in the second feature that is the same as the first verification information.

[0070] In any of the above judgment steps, if the corresponding content does not exist in the second feature, it means that there is no second verification information in the second feature that is the same as the first verification information. No feature similarity comparison is performed.

[0071] When the second feature contains the same second verification information as the first verification information, the method for obtaining the second feature is the same as that for the first feature, only the input target object is different.

[0072] Step S23: When there is second verification information in the second feature that is the same as the first verification information, compare the second feature vector in the second feature with the first feature vector to obtain the feature similarity.

[0073] When the second feature contains the same second verification information as the first verification information, it indicates that the first and second features were generated by the same neural network model. Therefore, the first and second features meet the conditions for feature similarity calculation. The second feature vector in the second feature will then be compared with the first feature vector to obtain the feature similarity.

[0074] After obtaining the feature similarity, it can be used for feature recognition, feature classification and other scenarios, and is applicable to fields such as image classification, image recognition, speech classification, speech recognition and semantic recognition.

[0075] If there is no second verification information in the second feature that is the same as the first verification information, the second feature will not be compared with the first feature.

[0076] Specifically, the feature similarity can be obtained by comparing the second feature with the first feature using methods such as cosine similarity, Pearson correlation coefficient, and Euclidean distance. No specific limitations are specified here.

[0077] In this embodiment, feature similarity comparison will only be performed when it is determined that the verification information of the second feature and the first feature are the same, that is, they belong to the same neural network model.

[0078] Because the internal parameters of each neural network model differ, different neural network models may generate different features when generating features based on the same input due to parameter differences. Therefore, comparing features generated by different neural network models results in low reliability and reference value for the feature similarity between the inputs, leading to low comparison accuracy. This embodiment ensures that both features eligible for comparison are generated by the same neural network model through the setting of first and second verification information. This avoids the impact of differences in neural network model parameters or structures on feature comparison, improving the reliability and reference value of feature similarity. Furthermore, the verification method in this embodiment only requires comparing data, enabling efficient verification of feature version information and similarity calculation.

[0079] In a specific application scenario, when the neural network model is an image processing model, including image classification models, image recognition models, etc., and the first feature and the second feature are also image features, the feature comparison method further includes: obtaining the first image feature, which includes first image verification information; obtaining the second image feature, and determining whether there is second image verification information in the second image feature that is the same as the first image verification information; when there is second image verification information in the second image feature that is the same as the first image verification information, comparing the second image feature with the first image feature to obtain the feature similarity. The specific comparison method is the same as the aforementioned steps and will not be repeated here.

[0080] Through the above steps, the feature comparison method of this embodiment first determines whether there is second verification information in the second feature that is identical to the first verification information before performing feature comparison. Only when there is second verification information identical to the first verification information in the second feature is the second feature compared with the first feature to obtain feature similarity. This ensures that the two features that can be compared are generated by the same neural network model, thereby avoiding the impact of differences in neural network model parameters or structures on feature comparison, improving the reference value and reliability of feature similarity, and avoiding many problems and troubleshooting costs caused by errors in feature similarity calculation. Furthermore, the first verification information specifically includes first dimension information and a first verification information vector. The first dimension information also includes the total vector dimension of the first feature, the first verification information dimension, and the first feature vector dimension, thereby increasing the complexity of the verification information and improving the reliability of judging whether features belong to the same neural network model based on the verification information.

[0081] In a specific application scenario, when the feature comparison method is applied to an image feature classification method, it includes: obtaining a first image feature, which includes first verification information. The first image feature is an image feature stored in an image classification database, labeled with the corresponding image category. The feature structure of the first image feature is the same as that of the first feature.

[0082] Once the second image features are obtained, it is determined whether there is second verification information in the second image features that is the same as the first verification information.

[0083] When the second image feature contains the same second verification information as the first verification information, the second image feature is compared with the first image feature to obtain a feature similarity. If the feature similarity is greater than a preset feature similarity, the category corresponding to the first image feature is determined as the category of the second image feature. The specific value of the preset feature similarity can be set based on actual needs and is not limited.

[0084] The first image verification information represents the version information of the neural network model that generates the first image feature, and the second image verification information represents the version information of the neural network model that generates the second image feature.

[0085] By following the steps above, it can be ensured that the features of the two images that can be compared are generated by the same neural network model, thereby avoiding the impact of differences in neural network model parameters or structures on feature comparison, improving the reference value and reliability of feature similarity, and improving the accuracy of image classification.

[0086] Based on the same inventive concept, the present invention also proposes an electronic device capable of executing the feature comparison method of any of the above embodiments. Please refer to [link to relevant documentation]. Figure 5 , Figure 5 This is a schematic diagram of an embodiment of the electronic device provided by the present invention. The electronic device includes a processor 51 and a memory 52.

[0087] The processor 51 is used to execute the program instructions stored in the memory 52 to implement the steps of any of the above-described feature comparison methods. In a specific implementation scenario, the electronic device may include, but is not limited to, a microcomputer or a server. In addition, the electronic device may also include mobile devices such as laptops and tablets, which are not limited here.

[0088] Specifically, processor 51 controls itself and memory 52 to implement the steps of any of the above embodiments. Processor 51 may also be referred to as a CPU (Central Processing Unit). Processor 51 may be an integrated circuit chip with signal processing capabilities. Processor 51 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor. Furthermore, processor 51 may be implemented using integrated circuit chips.

[0089] The above scheme can improve the reference value and reliability of feature similarity.

[0090] Based on the same inventive concept, the present invention also proposes a computer-readable storage medium, please refer to [link to relevant documentation]. Figure 6 , Figure 6This is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. The computer-readable storage medium 60 stores at least one program data 61, which is used to implement any of the methods described above. In one embodiment, the computer-readable storage medium 60 includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0091] In the several embodiments provided by this invention, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0092] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0093] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0094] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium.

[0095] The above are merely embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

[0096] If the technical solution of this application involves personal information, the product using this technical solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using this technical solution has obtained the user's separate consent before processing the sensitive personal information, and also meets the requirement of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set up to inform users that they have entered the scope of personal information collection and that personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed that they have agreed to the collection of their personal information; or on the personal information processing device, with clear signs / information informing users of the personal information processing rules, authorization is obtained from the individual through pop-up information or by asking the individual to upload their personal information; wherein, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.

Claims

1. A feature comparison method, characterized in that, include: A first feature is obtained, which includes first verification information; wherein the first feature is a first image feature and the first verification information is first image verification information. Once the second feature is obtained, it is determined whether there is second verification information in the second feature that is the same as the first verification information; wherein, the second feature is a second image feature, and the second verification information is second image verification information; When the second feature contains the same second verification information as the first verification information, the second feature is compared with the first feature to obtain the feature similarity. Wherein, the first verification information represents the version information of the neural network model that generates the first feature, and the second verification information represents the version information of the neural network model that generates the second feature; wherein, the first verification information is generated by the neural network model itself; and the first verification information is obtained by processing the set image verification data by the neural network model; wherein, the set image verification data is used to represent the parameter distribution and structural characteristics of the neural network model itself.

2. The feature comparison method according to claim 1, characterized in that, The first feature is obtained, and the first feature includes first verification information, including: The target data is input into a neural network model for processing to obtain a first feature that includes the first verification information and the first feature vector. When the second feature contains second verification information identical to the first verification information, the second feature is compared with the first feature to obtain feature similarity, including: When the second feature contains the same second verification information as the first verification information, the second feature vector in the second feature is compared with the first feature vector to obtain the feature similarity.

3. The feature comparison method according to claim 2, characterized in that, The neural network model includes cascaded feature extraction subnetworks and verification subnetworks. The step of inputting the target data into a neural network model for processing to obtain a first feature including the first verification information and the first feature vector includes: The target data is input into the feature extraction subnetwork for feature extraction to obtain the first feature vector; The first verification information is obtained based on the verification sub-network; The first verification information and the first feature vector are concatenated to obtain the first feature.

4. The feature comparison method according to claim 3, characterized in that, The verification subnetwork includes a global pooling layer and a convolutional layer; The process of obtaining the first verification information based on the verification sub-network includes: The set verification data is input into the feature extraction subnetwork for feature extraction to obtain the set feature map; The defined feature map is converted into a one-dimensional feature vector through the global pooling layer of the verification sub-network. The dimension of the feature vector of the one-dimensional structure is adjusted by the convolutional layer of the verification sub-network to obtain the first verification information, which includes the first dimension information and the first verification information vector.

5. The feature comparison method according to claim 4, characterized in that, The step of concatenating the first verification information and the first feature vector to obtain the first feature includes: The first feature is obtained by concatenating the first dimension information, the first verification information vector, and the first feature vector end to end in sequence.

6. The feature comparison method according to claim 4 or 5, characterized in that, The step of determining whether there is second verification information in the second feature that is the same as the first verification information includes: Determine whether the second feature contains second-dimensional information that is identical to the first-dimensional information; If it exists, then determine whether there is a second verification information vector in the second feature that is the same as the first verification information vector; If it exists, then it is determined that the second feature contains second verification information that is the same as the first verification information.

7. The feature comparison method according to claim 1, characterized in that, in, The set image verification data includes images where all pixel values ​​are 1.

8. An electronic device, characterized in that, The electronic device includes a memory and a processor coupled to each other, the processor being configured to execute program instructions stored in the memory to implement the feature comparison method as described in any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program data that can be executed to implement the feature comparison method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Face feature retrieval method, device and equipment

    CN111177436A

  • Image recognition method, image feature processing method, electronic equipment and storage medium

    CN112529008A

  • Watermark embedding method, watermark extracting method and system for protecting image processing network

    CN114998082A