Feature quantification model training, feature quantification, data query method and system

By using the rich annotation information of multiple source data domains to train the common feature quantization model, the problem of insufficient annotation information in the target data domain is solved, and the feature quantization performance and model adaptability are improved.

CN113408552BActive Publication Date: 2025-02-25BOE TECHNOLOGY GROUP CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010181479.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-16
Publication Date
2025-02-25
Estimated Expiration
2040-03-16

AI Technical Summary

Technical Problem

When the target data domain labeling information is insufficient, it is difficult to ensure the performance of the feature quantization algorithm.

Method used

By obtaining the feature information and labeling information of multiple source data fields, a common feature quantization model is trained, and the model is used to perform feature quantization in the target data field with insufficient labeling information.

Benefits of technology

The feature quantization performance of the feature quantization model in the data domain of the labeling information scarce information is improved, and the robustness and adaptability of the model are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113408552B_ABST
    Figure CN113408552B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method and system for feature quantization model training, feature quantization, and data query. The feature quantization model training method includes: obtaining multiple source data domains; obtaining feature information and annotation information of each of the source data domains; training a feature quantization model based on the feature information and annotation information of all the source data domains to obtain a common feature quantization model, wherein during the training process, common feature information and domain-specific feature information are decomposed from the feature information of the multiple source data domains, and the common feature information is feature information shared by the multiple source data domains. In the embodiment of the present invention, a common feature quantization model is obtained by training using rich annotation information of multiple source data domains, and the common feature quantization model can be used for feature quantization of target data domains with scarce annotation information, thereby improving the feature quantization performance of the feature quantization model in data domains with scarce annotation information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of data processing technology, and in particular to a feature quantization model training, feature quantization, and data query method and system. Background Art

[0002] Feature quantization is an important technology in artificial intelligence related fields such as computer vision and data mining. The goal of feature quantization is to output a concise feature code (feature quantization code) containing condensed original information (features of original image, video, text and other data), while maximizing the expressive power of the original features. The significance of feature quantization is that for large-scale data sets (such as massive image data in image search systems), by using quantized concise feature codes, specific tasks (such as image search, etc.) can be completed with less storage and computational complexity. For example, in the field of image search, the mainstream image feature dimensions are usually tens of thousands of dimensions, and representative visual features such as local aggregation descriptors (VLADs), FisherVectors, or feature vectors after global average pooling of deep networks. When performing operations such as image search, high-dimensional features require extremely high storage costs and computational complexity. Feature quantization can greatly reduce the demand for storage space and the computational complexity of runtime without losing much accuracy. In particular, for image datasets of millions of images, after feature quantization, the features of the entire dataset are usually only a few gigabytes (GB), which can be easily read into the memory of a single server, thus avoiding the time-consuming multi-machine communication in cloud services and the input and output (I / O) cost between memory and external storage.

[0003] Traditional feature quantization algorithms include K-means clustering. These algorithms are usually unsupervised, and the distance or similarity calculation between features is often based on the standard Euclidean distance or cosine similarity. In recent years, feature quantization algorithms based on annotation information have gradually gained more attention and have shown stronger performance in practical applications. Common forms of annotation information include semantic labels (for example, one or more labels are given to the semantic category of the image), similarity labels (for example, specifying whether two images are similar, or even specific similarity values), etc. However, when using feature quantization algorithms in specific target data domains, a common problem is the lack of annotation information. On the one hand, the acquisition of annotation information often requires manual annotation, which is expensive; on the other hand, the annotation information of some vertical field applications is sparse in nature, such as fine-grained recognition. As a result, it is difficult to guarantee the performance of feature quantization algorithms. Summary of the invention

[0004] The embodiments of the present invention provide a feature quantization model training, feature quantization, and data query method and system for solving the problem that it is difficult to ensure the performance of a feature quantization algorithm when the annotation information of a target data domain is insufficient.

[0005] In order to solve the above-mentioned technical problems, the present invention is achieved as follows:

[0006] In a first aspect, an embodiment of the present invention provides a feature quantization model training method, comprising:

[0007] Get multiple source data domains;

[0008] Acquire feature information and annotation information of each source data domain;

[0009] The feature quantization model is trained according to the feature information and annotation information of all the source data domains to obtain a common feature quantization model, wherein during the training process, common feature information and domain-specific feature information are decomposed from the feature information of the multiple source data domains, and the common feature information is feature information shared by the multiple source data domains.

[0010] Optionally, the training of the feature quantization model according to the feature information and annotation information of all the source data domains to obtain a common feature quantization model includes:

[0011] The feature quantization model is trained according to the feature information and annotation information of all the source data domains to obtain a common feature quantization model and a domain-specific feature quantization model of each of the source data domains.

[0012] Optionally, a deep neural network algorithm is used to train the common feature quantization model and the domain-specific feature quantization model.

[0013] Optionally, the training of the feature quantization model includes:

[0014] Adjusting the feature quantization model so that Ex(L(F0(X),Y)) takes a minimum value for all the source data domains;

[0015] Among them, X represents the feature information of all the source data domains, Y represents the annotation information of all the source data domains, F0 represents a common feature quantization model, F0(X) represents the feature quantization code obtained after the feature information X is processed by F0, L(F0(X), Y) represents the loss function between the feature quantization code and the annotation information Y, and Ex(L(F0(X), Y)) represents the mathematical expectation of the L function for the feature information X.

[0016] Optionally, the training of the feature quantization model further includes:

[0017] Adjust the feature quantization model so that for any source data domain k, Ex(L(φ(F0(x),F k (x)), y)) takes the minimum value, and, for any source data domain k, Ex(L(φ(F0(x), F k (x)),y)) <Ex(L(φ(F0(x),F p (x)),y)), where p is not equal to k;

[0018] Wherein, x represents the feature information of the source data domain k, y represents the annotation information of the source data domain k, F0 represents the common feature quantization model, F0(x) represents the feature quantization code obtained after the feature information x is processed by F0, and F k represents the domain-specific feature quantization model of the source data domain k, F k (x) represents the feature information x after F k The feature quantization code obtained after processing, Fp, represents the domain-specific feature quantization model of the source data domain p, F p (x) represents the feature information x after F p The characteristic quantization code obtained after processing, φ(F0(x),F p (x)) represents the relationship between F0(x) and F p (x) is fused, φ(F0(x),F k (x)) represents the relationship between F0(x) and F k (x) is fused, L(φ(F0(x),F k (x)),y) and L(φ(F0(x),F p (x)), y) represent the loss function between the feature quantization code after fusion processing and the annotation information y, Ex() represents the mathematical expectation function, k = 1, 2, ..., K, p = 1, 2, ..., K, K is the number of the source data domains.

[0019] Optionally, the fusion process is performed by adding or linear splicing.

[0020] In a second aspect, an embodiment of the present invention provides a feature quantization method, including:

[0021] A common feature quantization model is used to perform feature quantization on a target data set to obtain a feature quantization code of the target data set. The common feature quantization model is trained using the signaling method of the feature model of the first aspect.

[0022] In a third aspect, an embodiment of the present invention provides a data query method, which is applied to a server, and the method includes:

[0023] Receive the target feature quantization code of the target query data sent by the client;

[0024] Comparing the target feature quantization code with the feature quantization code of the target data set to obtain a query result matching the target feature quantization code, wherein the feature quantization code of the target data set is obtained by using the feature quantization method of the second aspect;

[0025] The query result is returned to the client.

[0026] Optionally, the feature quantization code of the target data set is obtained by pre-quantizing the target data set using a public feature quantization model and stored.

[0027] In a fourth aspect, an embodiment of the present invention provides a data query method, which is applied to a client, and the method includes:

[0028] Get input target query data;

[0029] According to the common feature quantization model, feature quantization calculation is performed on the target query data to obtain a target feature quantization code of the target query data, wherein the common feature quantization model is trained using the feature quantization model training method of the first aspect;

[0030] Sending the target feature quantization code to a server;

[0031] Receive the query result returned by the server for the target feature quantization code.

[0032] In a fifth aspect, an embodiment of the present invention provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the feature quantization model training method of the first aspect are implemented.

[0033] In a sixth aspect, an embodiment of the present invention provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the feature quantization method of the second aspect.

[0034] In a seventh aspect, an embodiment of the present invention provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the data query method of the third aspect.

[0035] In an eighth aspect, an embodiment of the present invention provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the data query method of the fourth aspect.

[0036] In the ninth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the feature quantization model training method of the first aspect are implemented; or, when the computer program is executed by a processor, the steps of the feature quantization method of the second aspect are implemented; or, when the computer program is executed by a processor, the steps of the data query method of the third aspect are implemented; or, when the computer program is executed by a processor, the steps of the data query method of the fourth aspect are implemented.

[0037] In an embodiment of the present invention, a common feature quantization model is trained using rich annotation information of multiple source data domains. The common feature quantization model can be used for feature quantization of target data domains with scarce annotation information, thereby improving the feature quantization performance of the feature quantization model in data domains with scarce annotation information. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0039] Figure 1 A schematic diagram of a feature quantization method in the related art;

[0040] Figure 2 A schematic diagram of a flow chart of a feature quantization model training method according to an embodiment of the present invention;

[0041] Figure 3 is a schematic diagram of a feature quantization model training method in an embodiment of the present invention;

[0042] Figure 4 A schematic diagram of a flow chart of a feature quantization method according to an embodiment of the present invention;

[0043] Figure 5 A schematic diagram of a flow chart of a data query method applied to a server side according to an embodiment of the present invention;

[0044] Figure 6 A schematic diagram of a flow chart of a data query method applied to a client according to an embodiment of the present invention;

[0045] Figure 7A structural diagram of a training system for a feature quantization model according to an embodiment of the present invention;

[0046] Figure 8 is a schematic diagram of the structure of a feature quantization system according to an embodiment of the present invention;

[0047] Fig. 9 A schematic diagram of the structure of a data query system according to an embodiment of the present invention;

[0048] Fig.10 A schematic diagram of the structure of a data query system according to another embodiment of the present invention;

[0049] Fig.11 A schematic diagram of the structure of an electronic device according to an embodiment of the present invention;

[0050] Fig.12 A schematic structural diagram of an electronic device according to another embodiment of the present invention;

[0051] Fig.13 A schematic structural diagram of an electronic device according to another embodiment of the present invention;

[0052] Fig.14 The figure is a schematic structural diagram of an electronic device according to another embodiment of the present invention. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] Please refer to Figure 1 , Figure 1 It is a schematic diagram of a feature quantization method in the related art. Figure 1 It can be seen that in the related technology, it is first necessary to extract the feature information of the data set (or called data domain) (i.e., feature extraction), then tune the key parameters of the feature quantization model based on the annotation information of the data set, and finally use the obtained feature quantization model to quantize the extracted feature information. It can be seen that when the annotation information is scarce, the performance of the feature quantization model cannot be guaranteed.

[0055] To solve the above problems, please refer to Figure 2 , an embodiment of the present invention provides a feature quantization model training method, comprising:

[0056] Step 21: Obtain multiple source data domains;

[0057] In the embodiment of the present invention, a data domain may also be referred to as a data set, and a data domain includes a plurality of data. For example, the data domain is an image database including a plurality of images.

[0058] The multiple source data domains have a certain degree of correlation, for example, there are multiple identical semantic category labels.

[0059] Step 22: Obtain feature information and annotation information of each source data domain;

[0060] The feature information may be set as required. For example, in an image data set, the feature information may include an image visual information descriptor and the like.

[0061] Step 23: Train the feature quantization model based on the feature information and annotation information of all the source data domains to obtain a common feature quantization model, wherein during the training process, common feature information and domain-specific feature information are decomposed from the feature information of the multiple source data domains, and the common feature information is the feature information shared by the multiple source data domains.

[0062] Common feature information is cross-domain invariant common information, which contains knowledge from multiple data domains. For example, different cameras have different postures, and the postures of faces or bodies captured are also different accordingly, but there are some common features in these images, such as the topological structure of the face, that is, the topological structure of the face is the common feature information.

[0063] In an embodiment of the present invention, a common feature quantization model is trained using rich annotation information of multiple source data domains. The common feature quantization model can be used for feature quantization of target data domains with scarce annotation information, thereby improving the feature quantization performance of the feature quantization model in data domains with scarce annotation information.

[0064] Taking image feature quantization for semantic retrieval tasks as an example, when a specific feature quantization model is applied to a target data domain, the existing practice is to tune the key parameters of the specific feature quantization model based on the semantic annotation information of the target data domain. When semantic annotation information is scarce, the existing methods cannot guarantee the feature quantization performance of the specific feature quantization model in the target data domain. In an embodiment of the present invention, multiple existing related source data domains with rich annotation information are borrowed, and the annotation information of multiple related source data domains is reused to train a common feature quantization model, and the common feature quantization model is used to perform feature quantization on the target data domain, so as to achieve the purpose of improving the feature quantization performance of the feature quantization model on the target data set.

[0065] Of course, it should be noted that in the embodiment of the present invention, the data domain is not limited to the image data set, and the data in the data domain includes but is not limited to data forms such as images, videos, and audio.

[0066] In the embodiment of the present invention, optionally, training the feature quantization model according to the feature information and annotation information of all the source data domains to obtain the common feature quantization model includes:

[0067] The feature quantization model is trained according to the feature information and annotation information of all the source data domains to obtain a common feature quantization model and a domain-specific feature quantization model of each of the source data domains.

[0068] The domain-specific feature information refers to the feature information specific to a certain data domain.

[0069] Please refer to Figure 3 , Figure 3 is a schematic diagram of a feature quantization model training method in an embodiment of the present invention, from Figure 3 It can be seen that the data set (also called data domain) used to train the feature quantization model includes K. When training the feature quantization model, for each data set, it is necessary to obtain the feature information of the data set. Then, according to the annotation information and feature information of all data sets, the feature quantization model is trained. During the training process, the feature information of the data set can be decomposed into common feature information and domain-specific feature information, and finally K+1 models are obtained, including one common feature quantization model and K domain-specific feature quantization models.

[0070] Assume that K source data domains (data sets) are given, denoted as <X k ,Y k >, where k = 1, 2, ..., K. Where X k ,Y k Respectively represent the feature information and annotation information of a data set (usually in matrix form). For the convenience of discussion, the following uses symbols x and y to represent the feature information and annotation information of a data set, respectively. In the embodiment of the present invention, F0, F1, ..., F K There are K+1 models in total. Among them, F0 is shared by all K data domains, F k is exclusive to the kth data domain. Let F k (x) represents the characteristic quantization code obtained after the characteristic information x is processed by Fk. i (x),F j (x)) indicates the i (x) and F j (x) to perform fusion (for example, simple addition or linear concatenation). k(x), y) represents the loss function between the feature quantization code obtained after the feature information x is processed by Fk and the labeled information y after the k-th model (for example, L can be a classification 0-1 loss function). We hope to obtain a smaller loss function value. k (x),y)) represents the mathematical expectation of the L function with respect to x.

[0071] In order to obtain the above models, all source data domains need to be <X k ,Y k >The process of model learning, the specific optimization goals in the learning process include:

[0072] 1) For all k = 1, 2, ..., K, Ex(L(F0(x), y)) should achieve the minimum value. This ensures that the common feature quantization model obtains excellent feature quantization performance;

[0073] 2) For any k = 1, 2, ..., K, Ex(L(φ(F0(x),F k (x)), y)) should obtain the minimum value. This ensures the complementarity between the domain-specific feature quantization model and the public feature quantization model;

[0074] 3) For any k = 1, 2, ..., K, Ex(L(φ(F0(x),F k (x)),y)) <Ex(L(φ(F0(x),F p (x)), y)), where p is not equal to k. This ensures the optimality of the domain-specific feature quantization model for a specific data domain.

[0075] That is, the training of the feature quantization model includes:

[0076] Adjusting the feature quantization model so that Ex(L(F0(X),Y)) takes a minimum value for all the source data domains;

[0077] Among them, X represents the feature information of all the source data domains, Y represents the annotation information of all the source data domains, F0 represents a common feature quantization model, F0(X) represents the feature quantization code obtained after the feature information X is processed by F0, L(F0(X), Y) represents the loss function between the feature quantization code obtained by the feature information X after being processed by F0 and the annotation information Y, and Ex(L(F0(X), Y)) represents the mathematical expectation of the L function for the feature information X.

[0078] Furthermore, the training of the feature quantization model also includes:

[0079] Adjust the feature quantization model so that for any source data domain k, Ex(L(φ(F0(x),Fk (x)), y)) takes the minimum value; and, for any of the source data domains k, Ex(L(φ(F0(x), F k (x)),y)) <Ex(L(φ(F0(x),F p (x)),y)), where p is not equal to k;

[0080] Wherein, x represents the feature information of the source data domain k, y represents the annotation information of the source data domain k, F0 represents the common feature quantization model, F0(x) represents the feature quantization code obtained after the feature information x is processed by F0, and F k represents the domain-specific feature quantization model of the source data domain k, F k (x) represents the feature information x after F k The feature quantization code obtained after processing, Fp, represents the domain-specific feature quantization model of the source data domain p, F p (x) represents the feature information x after F p The characteristic quantization code obtained after processing, φ(F0(x),F k (x)) represents the relationship between F0(x) and F k (x) is fused, φ(F0(x),F p (x)) represents the relationship between F0(x) and F p (x) is fused, L(φ(F0(x),F k (x)),y) and L(φ(F0(x),F p (x)), y) represent the loss function between the feature quantization code after fusion processing and the annotation information y, Ex() represents the mathematical expectation function, k = 1, 2, ..., K, p = 1, 2, ..., K, K is the number of the source data domains.

[0081] In the embodiment of the present invention, optionally, the fusion process is performed by using an addition or linear splicing method.

[0082] In the embodiment of the present invention, for different source data domains, after the results of the domain-specific feature quantization model and the common feature quantization model are fused, it is possible to ensure that the feature quantization performance in the data domain is improved compared to using only the common feature quantization model.

[0083] In the embodiment of the present invention, for different data domains, the domain-specific feature quantization models can be used interchangeably and merged with the common feature quantization model. The actual effect will be approximately equivalent to introducing random noise or causing serious overfitting.

[0084] In the embodiment of the present invention, optionally, a deep neural network algorithm is used to train the feature quantization model. For example, the feature quantization model can be trained based on multi-layer convolution, pooling or non-linear activation network layers.

[0085] In an embodiment of the present invention, the feature information of each source data domain may be extracted in a variety of ways, for example, a deep neural network algorithm may be used to extract the feature information of each source data domain.

[0086] In the embodiment of the present invention, optionally, the common feature quantization model and the domain-specific feature quantization model use a local sensitive hashing algorithm or a K-means algorithm. Further optionally, if the data set is an image data set, the common feature quantization model and the domain-specific feature quantization model use a local sensitive hashing algorithm.

[0087] In an embodiment of the present invention, optionally, if the data set is an image data set, the following methods can be used for image retrieval tasks: 1) image feature extraction is based on a pre-trained neural network (such as ResNet50, etc.); 2) the common feature quantization model and the domain-specific feature quantization model adopt a shallow convolutional network; 3) the common feature quantization model and the domain-specific feature quantization model are fused by linear splicing.

[0088] In an embodiment of the present invention, the above-mentioned feature quantization model training method can be executed by the server side.

[0089] Please refer to Figure 4 , an embodiment of the present invention further provides a feature quantization method, comprising:

[0090] Step 41: Use a common feature quantization model to perform feature quantization on a target data set to obtain a feature quantization code of the target data set. The common feature quantization model is trained using the feature quantization model training method described above.

[0091] In an embodiment of the present invention, a common feature quantization model is trained using rich annotation information of multiple source data domains. The common feature quantization model can be used for feature quantization of target data domains with scarce annotation information, thereby improving the feature quantization performance of the feature quantization model in data domains with scarce annotation information.

[0092] Please refer to Figure 5 The embodiment of the present invention further provides a data query method, which is applied to a server and includes:

[0093] Step 51: receiving the target feature quantization code of the target query data sent by the client;

[0094] Step 52: Compare the target feature quantization code with the feature quantization code of the target data set to obtain a query result matching the target feature quantization code, wherein the feature quantization code of the target data set is obtained using the feature quantization method described above;

[0095] Step 53: Return the query result to the client.

[0096] Optionally, the feature quantization code of the target data set is obtained by pre-quantizing the target data set using a public feature quantization model and stored.

[0097] Please refer to Figure 6 The embodiment of the present invention further provides a data query method, which is applied to a client and includes:

[0098] Step 61: Obtain input target query data;

[0099] Step 62: According to the common feature quantization model, feature quantization calculation is performed on the target query data to obtain a target feature quantization code of the target query data. The common feature quantization model is trained using the feature quantization model training method described above.

[0100] Please refer to Figure 7 The embodiment of the present invention further provides a feature quantization model training system 70, comprising:

[0101] A first acquisition module 71 is used to acquire multiple source data domains;

[0102] A second acquisition module 72, used to acquire feature information and annotation information of each source data domain;

[0103] The training module 73 is used to train the feature quantization model according to the feature information and annotation information of all the source data domains to obtain a common feature quantization model, wherein during the training process, common feature information and domain-specific feature information are decomposed from the feature information of the multiple source data domains, and the common feature information is the feature information shared by the multiple source data domains.

[0104] Optionally, the training module 73 is used to train the feature quantization model according to the feature information and annotation information of all the source data domains to obtain a common feature quantization model and a domain-specific feature quantization model of each of the source data domains.

[0105] Optionally, the training module 73 is used to train the feature quantization model using a deep neural network algorithm.

[0106] Optionally, the training module 73 is used to adjust the feature quantization model so that Ex(L(F0(X),Y)) takes a minimum value for all the source data domains;

[0107] Among them, X represents the feature information of all the source data domains, Y represents the annotation information of all the source data domains, F0 represents a common feature quantization model, F0(X) represents the feature quantization code obtained after the feature information X is processed by F0, L(F0(X), Y) represents the loss function between the feature quantization code and the annotation information Y, and Ex(L(F0(X), Y)) represents the mathematical expectation of the L function for the feature information X.

[0108] Optionally, the training module 73 is used to adjust the feature quantization model so that for any source data domain k, Ex(L(φ(F0(x),F k (x)), y)) takes the minimum value, and, for any source data domain k, Ex(L(φ(F0(x), F k (x)),y)) <Ex(L(φ(F0(x),F p (x)),y)), where p is not equal to k;

[0109] Wherein, x represents the feature information of the source data domain k, y represents the annotation information of the source data domain k, F0 represents the common feature quantization model, F0(x) represents the feature quantization code obtained after the feature information x is processed by F0, and F k represents the domain-specific feature quantization model of the source data domain k, F k (x) represents the feature information x after F k The feature quantization code obtained after processing, Fp, represents the domain-specific feature quantization model of the source data domain p, F p (x) represents the feature information x after F p The characteristic quantization code obtained after processing, φ(F0(x),F k (x)) represents the relationship between F0(x) and F k (x) is fused, φ(F0(x),F p (x)) represents the relationship between F0(x) and F p (x) is fused, L(φ(F0(x),F k (x)),y) and L(φ(F0(x),F p (x)), y) represent the loss function between the feature quantization code after fusion processing and the annotation information y, Ex() represents the mathematical expectation function, k = 1, 2, ..., K, p = 1, 2, ..., K, K is the number of the source data domains.

[0110] Optionally, the training module 73 is used to perform the fusion processing by using an addition or linear splicing method.

[0111] Please refer to Figure 8 The embodiment of the present invention further provides a feature quantization system 80, comprising:

[0112] The feature quantization module 81 is used to perform feature quantization on the target data set by using a common feature quantization model to obtain a feature quantization code of the target data set. The common feature quantization model is trained by using the feature quantization model training method described above.

[0113] The feature quantification system 80 may be a server.

[0114] Please refer to Fig. 9 The embodiment of the present invention further provides a data query system 90, comprising:

[0115] A receiving module 91 is used to receive a target feature quantization code of target query data sent by a client;

[0116] A query module 92 is used to compare the target feature quantization code with the feature quantization code of the target data set to obtain a query result matching the target feature quantization code, wherein the feature quantization code of the target data set is obtained using the feature quantization method described above;

[0117] The sending module 93 is used to return the query result to the client.

[0118] The data query system 90 may be a server.

[0119] Optionally, the feature quantization code of the target data set is obtained by pre-quantizing the target data set using a public feature quantization model and stored.

[0120] Please refer to Fig.10 The embodiment of the present invention further provides a data query system 100, including:

[0121] The acquisition module 101 is used to acquire input target query data;

[0122] A calculation module 102 is used to perform feature quantization calculation on the target query data according to a common feature quantization model to obtain a target feature quantization code of the target query data, wherein the common feature quantization model is trained using the feature quantization model training method described above;

[0123] A sending module 103 is used to send the target feature quantization code to a server;

[0124] The receiving module 104 is used to receive the query result returned by the server for the target feature quantization code.

[0125] The data query system 100 may be a client.

[0126] Please refer to Fig.11 An embodiment of the present invention further provides an electronic device 110, including a processor 111, a memory 112, and a computer program stored in the memory 112 and executable on the processor 111. When the computer program is executed by the processor 111, each process of the above-mentioned feature quantization model training method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0127] Optionally, the electronic device 110 is a server.

[0128] Please refer to Fig.12 An embodiment of the present invention further provides an electronic device 120, including a processor 121, a memory 122, and a computer program stored in the memory 122 and executable on the processor 121. When the computer program is executed by the processor 121, each process of the above-mentioned feature quantization method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0129] Optionally, the electronic device 120 is a server.

[0130] Please refer to Fig.13 The embodiment of the present invention further provides an electronic device 130, including a processor 131, a memory 132, and a computer program stored in the memory 132 and executable on the processor 131. When the computer program is executed by the processor 131, each process of the above-mentioned data query method embodiment applied to the server is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0131] Optionally, the electronic device 130 is a server.

[0132] Please refer to Fig.14 The embodiment of the present invention further provides an electronic device 140, including a processor 141, a memory 142, and a computer program stored in the memory 142 and executable on the processor 141. When the computer program is executed by the processor 141, each process of the above-mentioned data query method embodiment applied to the client is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0133] Optionally, the electronic device 140 is a client.

[0134] The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned feature quantization model training method embodiment is implemented, or when the computer program is executed by a processor, each process of the above-mentioned feature quantization method embodiment is implemented, or when the computer program is executed by a processor, each process of the above-mentioned data query method embodiment applied to the server side is implemented, or when the computer program is executed by a processor, each process of the above-mentioned data query method embodiment applied to the client side is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here. Among them, the computer-readable storage medium is such as a read-only memory (Read-Only Memory, referred to as ROM), a random access memory (Random Access Memory, referred to as RAM), a disk or an optical disk, etc.

[0135] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0136] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0137] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

Claims

1. A feature quantization model training method, wherein: include: Acquire multiple source data domains; the source data domain is an image database including multiple images; Acquire feature information and annotation information of each of the source data domains; According to the feature information and annotation information of all the source data domains, a feature quantization model is trained to obtain a common feature quantization model, wherein during the training process, common feature information and domain-specific feature information are decomposed from the feature information of the multiple source data domains, and the common feature information is feature information shared by the multiple source data domains; The training of the feature quantization model includes: Adjusting the feature quantization model so that Ex(L(F0(X),Y)) takes a minimum value for all the source data domains; Wherein, X represents the feature information of all the source data domains, Y represents the annotation information of all the source data domains, F0 represents a common feature quantization model, F0(X) represents a feature quantization code obtained after the feature information X is processed by F0, L(F0(X), Y) represents a loss function between the feature quantization code and the annotation information Y, and Ex(L(F0(X), Y)) represents the mathematical expectation of the L function for the feature information X; The training of the feature quantization model further includes: Adjust the feature quantization model so that for any source data domain k, Ex(L(φ(F0(x),F k (x)), y)) takes the minimum value, and, for any source data domain k, Ex(L(φ(F0(x), F k (x)),y)) <Ex(L(φ(F0(x),F p (x)),y)), where p is not equal to k; Wherein, x represents the feature information of the source data domain k, y represents the annotation information of the source data domain k, F0 represents the common feature quantization model, F0(x) represents the feature quantization code obtained after the feature information x is processed by F0, and F k represents the domain-specific feature quantization model of the source data domain k, F k (x) represents the feature information x after F k The feature quantization code obtained after processing, Fp, represents the domain-specific feature quantization model of the source data domain p, F p (x) represents the feature information x after F p The characteristic quantization code obtained after processing, φ(F0(x),F k (x)) represents the relationship between F0(x) and F k (x) is fused, φ(F0(x),F p (x)) represents the relationship between F0(x) and F p (x) is fused, L(φ(F0(x),F k (x)),y) and L(φ(F0(x),F p (x)), y) represent the loss function between the feature quantization code and the labeled information y after fusion processing, Ex() represents the mathematical expectation function, k = 1, 2, ..., K, p = 1, 2, ..., K, K is the number of the source data domains.

2. The feature quantization model training method according to claim 1, wherein: The step of training the feature quantization model according to the feature information and annotation information of all the source data domains to obtain a common feature quantization model comprises: The feature quantization model is trained according to the feature information and annotation information of all the source data domains to obtain a common feature quantization model and a domain-specific feature quantization model of each of the source data domains.

3. The feature quantization model training method according to claim 2, wherein: A deep neural network algorithm is used to train the feature quantization model.

4. The feature quantization model training method according to claim 1, wherein: The fusion process is performed by using an addition or linear splicing method.

5. A feature quantification method, wherein: include: A common feature quantization model is used to perform feature quantization on a target data set to obtain a feature quantization code of the target data set, wherein the common feature quantization model is trained using the feature quantization model training method according to any one of claims 1 to 4, and the target data set is an image data set.

6. A data query method, wherein: Applied to a server, the method comprises: Receive the target feature quantization code of the target query data sent by the client; Comparing the target feature quantization code with the feature quantization code of the target data set to obtain a query result matching the target feature quantization code, wherein the feature quantization code of the target data set is obtained by using the feature quantization method according to claim 5; and the target data set is an image data set; The query result is returned to the client.

7. The data query method according to claim 6, wherein: The feature quantization code of the target data set is obtained by pre-quantizing the target data set using a public feature quantization model and is stored.

8. A data query method, wherein: Applied to a client, the method comprises: Get the input target query data; According to the common feature quantization model, feature quantization calculation is performed on the target query data to obtain a target feature quantization code of the target query data, wherein the common feature quantization model is trained by the feature quantization model training method according to any one of claims 1 to 4; Sending the target feature quantization code to a server; Receive the query result returned by the server for the target feature quantization code.

9. An electronic device, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the feature quantization model training method as described in any one of claims 1 to 4 are implemented.

10. An electronic device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the feature quantification method according to claim 5 when executed by the processor.

11. An electronic device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the data query method as claimed in claim 6 or 7 when executed by the processor.

12. An electronic device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the data query method as claimed in claim 8 when executed by the processor.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the computer program implements the steps of the feature quantization model training method as described in any one of claims 1 to 4; or, when the computer program is executed by the processor, the computer program implements the steps of the feature quantization method as described in claim 5; or, when the computer program is executed by the processor, the computer program implements the steps of the data query method as described in claim 6 or 7; or, when the computer program is executed by the processor, the computer program implements the steps of the data query method as described in claim 8.

Citation Information

Patent Citations

  • Image annotation method combined with image internal space relation and visual symbiosis relation

    CN102495865A

  • Feature extraction network training method, apparatus and device, and image processing method, apparatus and device

    CN110399856A