Data recall method and device

By hashing quantization joint training on the deep learning model, hash features and segmented quantization codebooks are generated, which solves the contradiction between accuracy and efficiency of recall in data recall by deep learning models, and achieves efficient data recall.

CN114329174BActive Publication Date: 2025-08-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111261348.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-28
Publication Date
2025-08-19
Estimated Expiration
2041-10-28

AI Technical Summary

Technical Problem

In the prior art, data recall methods based on deep learning models have contradictions in recall accuracy and efficiency. The larger the network, the higher the recall accuracy, but the higher the complexity and computing volume, and the lower the recall accuracy and poor generalization when the network is lightweight.

Method used

The preset deep learning model is trained in hash quantization based on labeled sample data and unlabeled sample data to obtain a feature characterization model. The hash feature and a segmented quantization codebook are generated through feature characterization processing, and the data recall is recalled in combination with hash features to filter out the target recall data.

Benefits of technology

While ensuring the accuracy of data recall, the calculation amount of data recall is reduced, significantly improving the speed and efficiency of data recall.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114329174B_ABST
    Figure CN114329174B_ABST
Patent Text Reader

Abstract

The present application discloses a data recall method and device, which relates to the field of artificial intelligence technology. The method includes: obtaining search data and a first number of data to be recalled; inputting the search data and the first number of data to be recalled into a preset feature characterization model for feature characterization processing to obtain a first hash feature corresponding to the search data, a first segmented quantization codebook corresponding to the first hash feature, a second hash feature corresponding to the data to be recalled, and a second segmented quantization codebook corresponding to the second hash feature; based on the first segmented quantization codebook and the second segmented quantization codebook, determining the data to be screened and recalled from the first number of data to be recalled; based on the first hash feature and the second hash feature, determining the target recall data from the data to be screened and recalled. The technical solution provided by the present application can improve the accuracy of data recall while reducing the amount of data recall calculations, thereby greatly improving the speed and efficiency of data recall.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a data recall method and device. Background Art

[0002] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common search engines, smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, drones, robots, smart medical care, smart customer service, Internet of Vehicles, automatic driving, smart transportation, etc.

[0003] Currently, search engines are becoming increasingly powerful. Recall is a crucial step in search. Based on the user's input, relevant data can be retrieved from a vast amount of data. Related technologies often incorporate deep learning models for data recall. However, the recall accuracy and efficiency of these models are often limited by the computational complexity of the model's feature learning process. The larger the training sample and the network, the higher the recall accuracy, but the greater the complexity and computational complexity, and the lower the efficiency. While lightweight networks improve efficiency, recall accuracy is lower and generalization is poor. Therefore, more reliable or effective solutions are needed. Summary of the Invention

[0004] The present application provides a data recall method, apparatus, device, storage medium and computer program product, which can improve the generalization of model feature representation, and can reduce the amount of data recall calculation while improving data recall accuracy, thereby greatly improving data recall speed and efficiency.

[0005] In one aspect, the present application provides a data recall method, comprising:

[0006] Obtain search data and a first number of data to be recalled;

[0007] Inputting the search data and the first number of to-be-recalled data into a preset feature characterization model for feature characterization processing, obtaining a first hash feature corresponding to the search data, a first segmented quantization codebook corresponding to the first hash feature, a second hash feature corresponding to each of the first number of to-be-recalled data, and a second segmented quantization codebook corresponding to the second hash feature;

[0008] Determining a second number of to-be-screened recalled data from the first number of to-be-recalled data based on the first segmented quantization codebook and the second segmented quantization codebook;

[0009] Determining target recall data of the search data from the second number of recall data to be screened based on the first hash feature and the second hash features of the second number of recall data to be screened;

[0010] Among them, the preset feature characterization model is a feature characterization model obtained by performing hash quantization joint training on a preset deep learning model based on labeled sample data and unlabeled sample data.

[0011] Another aspect provides a data recall device, the device comprising:

[0012] A data acquisition module is configured to acquire search data and a first number of to-be-recalled data;

[0013] a first feature characterization processing module configured to input the search data and the first number of to-be-recalled data into a preset feature characterization model for feature characterization processing, thereby obtaining a first hash feature corresponding to the search data, a first segmented quantization codebook corresponding to the first hash feature, a second hash feature corresponding to each of the first number of to-be-recalled data, and a second segmented quantization codebook corresponding to the second hash feature;

[0014] a recalled data screening module, configured to determine a second number of to-be-screened recalled data from the first number of to-be-recalled data based on the first segmented quantization codebook and the second segmented quantization codebook;

[0015] a target recall data determination module configured to determine target recall data of the search data from the second number of recall data to be screened based on the first hash feature and the second hash feature of the second number of recall data to be screened;

[0016] Among them, the preset feature characterization model is a feature characterization model obtained by performing hash quantization joint training on a preset deep learning model based on labeled sample data and unlabeled sample data.

[0017] Another aspect provides an electronic device, including: a processor;

[0018] a memory for storing instructions executable by the processor;

[0019] The processor is configured to execute the instructions to implement any of the above-mentioned data recall methods.

[0020] On the other hand, a computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can perform any of the above-mentioned data recall methods.

[0021] Another aspect provides a computer program product or computer program, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the data recall method provided in the various optional implementations described above.

[0022] The data recall method, apparatus, device, storage medium, and computer program product provided in this application have the following technical effects:

[0023] During the data recall process, the present application inputs the search data and the first number of data to be recalled into a preset feature characterization model for feature characterization processing. The preset feature characterization model is a feature characterization model obtained by hash quantization joint training of a preset deep learning model based on labeled sample data and unlabeled sample data. It effectively ensures the generalization ability of the model feature characterization, and can be combined with the preset feature characterization model to generate hash features corresponding to the search data and the first number of data to be recalled, while generating segmented quantization codebooks corresponding to the search data and the first number of data to be recalled, which can realize segmented quantization characterization of hash features, and then in the process of data recall based on hash features, the search data and the data to be recalled are first associated with the quantization codebook, and the data to be screened are screened out. The target recall data is determined based on the hash features of the data to be screened and the search data. This can reduce the amount of computation in the data recall process while ensuring the accuracy of data recall, greatly improving the speed and efficiency of data recall. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0025] Figure 1 Schematic diagram of an application environment of a data recall method provided in an embodiment of the present application;

[0026] Figure 2 This is a flow chart of a data recall method provided in an embodiment of the present application;

[0027] Figure 3 This is a flow chart of pre-training a preset feature representation model provided in an embodiment of the present application;

[0028] Figure 4This is a flow chart of determining a first hash loss based on a first sample hash feature, provided in an embodiment of the present application;

[0029] Figure 5 This is a flow chart of determining a target quantization loss based on a second sample hash feature and a sample segmented quantization codebook, provided by an embodiment of the present application;

[0030] Figure 6 This is a flow chart of a method for training an initial feature characterization model based on a second hash loss and a target quantization loss to obtain a preset feature characterization model, as provided in an embodiment of the present application;

[0031] Figure 7 This is a schematic diagram of a pre-trained deep learning model provided in an embodiment of the present application to obtain a preset feature representation model;

[0032] Figure 8 This is a flow chart of determining a second number of to-be-screened recall data from a first number of to-be-recall data based on a first segmented quantization codebook and a second segmented quantization codebook, provided in an embodiment of the present application;

[0033] Figure 9 This is a structural diagram of a data recall device provided in an embodiment of the present application;

[0034] Figure 10 This is a block diagram of an electronic device for data recall provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0037] In the related prior art, in the process of recalling data based on a deep learning model, the deep learning model can be trained for feature learning through a large amount of sample data. The trained deep learning model can learn the features of the search data and the data to be recalled, and based on the learned features, the similarity between the search data and the data to be recalled can be calculated; then, the recall data corresponding to the search data is determined from the large amount of data to be recalled in combination with the similarity. However, the recall accuracy and efficiency of the above-mentioned related technologies are often limited by the amount of computation required in the feature learning process of the model. The larger the training samples and the network, the higher the recall accuracy, but the higher the complexity and computation, and the lower the efficiency; when the network is lightweight, although the efficiency is improved, the recall accuracy is low. The present application provides a data recall method that can reduce the amount of data recall computation while improving the data recall accuracy, thereby greatly improving the data recall speed and efficiency.

[0038] See also Figure 1 , Figure 1 Schematic diagram of an application environment of a data recall method provided in an embodiment of the present application. Figure 1 As shown, the application environment at least includes a server 100 and a terminal 200 .

[0039] In an optional embodiment, server 100 can be used to perform hash quantization joint training on a preset deep learning model based on labeled sample data and unlabeled sample data to obtain a preset feature characterization network that can perform feature characterization. Server 100 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0040] In an optional embodiment, the terminal 200 can perform data recall processing in conjunction with a preset feature representation network trained by the server. Specifically, the terminal 200 may include, but is not limited to, electronic devices such as smartphones, desktop computers, tablet computers, laptops, smart speakers, digital assistants, augmented reality (AR) / virtual reality (VR) devices, smart wearable devices, vehicle-mounted terminals, and smart TVs; it may also be software running on the above electronic devices, such as applications, applets, etc. The operating systems running on the electronic devices in the embodiments of the present application may include, but are not limited to, Android, iOS, Linux, Windows, etc.

[0041] In addition, it should be noted that Figure 1 What is shown is merely an application environment of the data recall method. In actual applications, the training of the preset feature representation network can also be implemented on the terminal 200.

[0042] In the embodiments of this specification, the server 100 and the terminal 200 may be directly or indirectly connected via wired or wireless communication, which is not limited in this application.

[0043] The following describes a data recall method for this application. Figure 2 It is a flow chart of a data recall method provided in an embodiment of the present application. This specification provides method operation steps such as the embodiment or flow chart, but may include more or fewer operation steps based on conventional or non-creative work. The order of steps listed in the embodiment is only one way of executing the order of many steps and does not represent the only execution order. When the actual system or server product is executed, it can be executed in sequence or in parallel (for example, in a parallel processor or multi-threaded processing environment) according to the method shown in the embodiment or the accompanying drawings. Specifically, Figure 2 As shown, the method may include:

[0044] S201: Acquire search data and a first number of to-be-recalled data.

[0045] In the embodiments of this specification, the search data may be data input by a user for searching for recalled data. Specifically, the data format of the search data may vary depending on the search requirements in actual applications. For example, the search data may be images, text, audio information, etc.

[0046] In the embodiment of this specification, the first number of data to be recalled may be data that can be recalled in the recall system. Specifically, the data format of the data to be recalled may also vary according to different search requirements in actual applications. For example, the search data may be images, text, audio information, etc.

[0047] S203: Input the search data and the first number of data to be recalled into a preset feature characterization model for feature characterization processing to obtain a first hash feature corresponding to the search data, a first segmented quantization codebook corresponding to the first hash feature, a second hash feature corresponding to each of the first number of data to be recalled, and a second segmented quantization codebook corresponding to the second hash feature.

[0048] In an embodiment of the present specification, the preset feature characterization model may be a feature characterization model obtained by performing hash quantization joint training on a preset deep learning model based on labeled sample data and unlabeled sample data.

[0049] In an optional embodiment, the preset feature characterization model includes a hash feature extraction module and a quantization codebook module; accordingly, the search data and the first number of to-be-recalled data are input into the preset feature characterization model for feature characterization processing to obtain a first hash feature corresponding to the search data, a first segmented quantization codebook corresponding to the first hash feature, a second hash feature corresponding to each of the first number of to-be-recalled data, and a second segmented quantization codebook corresponding to the second hash feature, including:

[0050] 1) Inputting the search data and the first number of data to be recalled into a hash feature extraction module for feature extraction processing to obtain a first hash feature and a second hash feature;

[0051] 2) Based on the quantization codebook module, the first hash feature and the second hash feature are segmented and quantized to obtain a first segmented quantization codebook and a second segmented quantization codebook.

[0052] In a specific embodiment, the hash feature extraction module may include a basic feature extraction module and a hash module; accordingly, the above-mentioned inputting the search data and the first number of data to be recalled into the hash feature extraction module for feature extraction processing to obtain the first hash feature and the second hash feature may include inputting the search data and the first number of data to be recalled into the basic feature extraction module for feature extraction processing to obtain the first feature information of the search data and the second feature information corresponding to each of the first number of data to be recalled; inputting the first feature information and the second feature information into the hash feature extraction module for hash feature extraction to obtain the first hash feature and the second hash feature.

[0053] In the embodiments of this specification, the module structures of the basic feature extraction module, hash module, and quantization codebook module can be set in combination with actual applications. In a specific embodiment, the basic feature extraction module may include a convolutional layer and a residual network; the hash module may include a pooling layer and a fully connected layer; and the quantization codebook module may include a fully connected layer. Specifically, the layer parameters such as the dimensions of the input and output data of the convolutional layer, residual network, pooling layer, and fully connected layer can be pre-set in combination with actual applications.

[0054] In an optional embodiment, the quantization codebook module is based on which the first hash feature and the second hash feature are segmented and quantized to obtain the first segmented quantization codebook and the second segmented quantization codebook may include:

[0055] Inputting the first hash feature and the second hash feature into a quantization codebook module;

[0056] In the quantization codebook module, segmenting the first hash feature and the second hash feature is performed respectively to obtain first segmented hash features of the first hash feature in a third number of segments and second segmented hash features of the second hash feature in the third number of segments;

[0057] and performing clustering processing on the first segment hash feature and the second segment hash feature under each segment to obtain a fourth number of segment cluster features corresponding to each segment;

[0058] In addition, the fourth number of segment clustering features corresponding to the first hash feature under the third number of segments are used as the first segment quantization codebook; and the fourth number of segment clustering features corresponding to the second hash feature of each data to be recalled under the third number of segments are used as the second segment quantization codebook for each data to be recalled.

[0059] In a specific embodiment, the third number may be the number of segments after the hash feature (the first hash feature and the second hash feature) is segmented; the fourth number may be the number of classes under each segment. The third and fourth numbers may be pre-set in combination with actual applications; the first segmented quantization codebook may include the first hash feature and the fourth number of segmented clustering features corresponding to the third number of segments; the second segmented quantization codebook for each to-be-recalled data may include the second hash feature of the to-be-recalled data and the fourth number of segmented clustering features corresponding to the third number of segments.

[0060] In a specific embodiment, the first hash feature and the second hash feature of each data to be recalled have the same dimension; in a specific embodiment, assuming that the dimension corresponding to the first hash feature and the second hash feature of each data to be recalled is 128 dimensions, and the third quantity is K, accordingly, after segmentation processing, the first hash feature is divided into K segments of 128 / K-dimensional segmented hash features (first segmented hash features); the second hash feature of each data to be recalled is also divided into K segments of 128 / K-dimensional segmented hash features (second segmented hash features). Specifically, the above-mentioned K-segment 128 / K-dimensional segmented hash features can be arranged in order according to the position of each segment in the corresponding hash feature; accordingly, the 128 / K-dimensional segmented hash features of the first hash feature in a certain segment and the 128 / K-dimensional segmented hash features of the second hash features of the first number of recalled data in the segment can be clustered to obtain the fourth number of segmented hash feature clusters under the segment, and the cluster center features of each segmented hash feature cluster under the segment are calculated (for example, the average features of the segmented hash features in each segmented hash feature cluster), and the cluster center features of the fourth number of segmented hash feature clusters are used as the fourth number of segmented cluster features corresponding to the segment.

[0061] In an embodiment of the present specification, in the process of extracting hash features of search data and a first number of data to be recalled based on a preset feature characterization model, the hash features can be segmented and quantized to facilitate subsequent data recall based on the hash features. The search data can be associated with the data to be recalled using a quantization codebook as an index, thereby reducing the amount of computation in the data recall process while ensuring the accuracy of data recall, thereby greatly improving the speed and efficiency of data recall.

[0062] In a specific embodiment, the above method may further include the step of pre-training a preset feature representation model, specifically, Figure 3 As shown, pre-training a preset feature representation model may include:

[0063] S301: Obtain labeled sample data and unlabeled sample data;

[0064] In a specific embodiment, the data format of the above-mentioned labeled sample data and unlabeled sample data can be consistent with the data format of the search data and the data to be recalled. Specifically, the above-mentioned labeled sample data can include first preset sample data, positive sample data corresponding to the first preset sample data, and negative sample data corresponding to the first preset sample data; in a specific embodiment, the above-mentioned labeled sample data can be obtained in combination with the following methods: obtaining a fifth number of positive sample data pairs (two similar sample data, for example, two sample data with a similarity greater than a preset threshold); randomly selecting a sample data X from a certain positive sample data pair (selecting a sample data as the first preset sample data, and the two sample data in the positive sample data pair where the selected sample data is located as the corresponding positive sample data), determining the similarity between the selected sample data X and any sample data in the remaining positive sample pairs (randomly selecting a sample data in each remaining sample data pair); sorting from small to large based on the similarity, and using the preset number of sample data before sorting as the number of negative samples corresponding to the selected sample data.

[0065] In a specific embodiment, the unlabeled sample data includes second preset sample data and attack sample data corresponding to the second preset sample data. Specifically, the attack sample data can be processed using a corresponding algorithm selected based on the data format of the second preset sample data. For example, if the second preset sample data is an image, the image can be attacked using an image enhancement algorithm to obtain a corresponding enhanced image.

[0066] S303: Input the labeled sample data and the unlabeled sample data into a preset deep learning model for feature characterization processing to obtain first sample hash features corresponding to the labeled sample data and the unlabeled sample data.

[0067] In a specific embodiment, the first sample hash feature may be a hash feature of labeled sample data and unlabeled sample data. The model structure of the preset deep learning model is consistent with the model structure of the preset feature representation model. Optionally, the labeled sample data and the unlabeled sample data may be input into a hash feature extraction module to be trained in the preset deep learning model for feature extraction processing to obtain the first sample hash features corresponding to each of the labeled sample data and the unlabeled sample data.

[0068] S305: Determine a first hash loss based on the first sample hash feature;

[0069] In a specific embodiment, Figure 4 As shown, the determining of the first hash loss based on the first sample hash feature may include:

[0070] S401: Converting the first sample hash feature into a second target binary feature based on a preset binary conversion function;

[0071] In an embodiment of the present specification, a preset binary conversion function can be used to convert a hash feature into a binary feature. In a specific embodiment, the preset binary conversion function can be a sign function. Accordingly, based on the preset binary conversion function, during the process of converting the first sample hash feature into the second target binary feature, it can be determined whether each element in the first sample hash feature is less than 0. If so, the element is converted to -1; if greater than or equal to 0, the element is converted to 1.

[0072] S403: Determine a third hash binarization loss based on the second target binary feature and the first sample hash feature corresponding to the first preset sample data, the positive sample data, and the negative sample data;

[0073] In a specific embodiment, the third hash binarization loss can characterize the degree of difference between the first sample hash feature of the sample data (first preset sample data, positive sample data and negative sample data) and the corresponding second target binary feature. The third hash binarization loss is used to pull the hash feature output by the model toward the binary target binary quantization loss during the training process. In a specific embodiment, the regression loss function can be combined to determine the hash binarization loss between the second target binary feature and the first sample hash feature corresponding to any sample data, and the sum of the hash binarization losses corresponding to the first preset sample data, positive sample data and negative sample data is used as the above-mentioned third hash binarization loss; accordingly, during the training process, the third hash binarization loss can be continuously reduced to make the distance between the hash feature output by the model and the corresponding target binary feature smaller (more similar), thereby making the original in the hash feature output by the model either very close to 1 or very close to -1.

[0074] S405: Determine a second hash metric loss based on the first sample hash features corresponding to the first preset sample data, the positive sample data, and the negative sample data;

[0075] In a specific embodiment, the second hash metric loss can be based on the similarity between the first preset sample data, positive sample data and negative sample data to measure the accuracy of the model's representation of the hash feature; optionally, during the training process, the distance between the first preset sample data and the negative sample data can be greater than the distance between the first preset sample data and the positive sample data by a preset threshold.

[0076] In an optional embodiment, the above-mentioned determination of the second hash metric loss based on the first sample hash features corresponding to the first preset sample data, positive sample data and negative sample data includes: activating the first sample hash features corresponding to the first preset sample data, positive sample data and negative sample data respectively to obtain first activated hash features; and determining the second hash metric loss based on the first activated hash features.

[0077] In a specific embodiment, the first activated hash feature can be an activated hash feature after the first sample hash features corresponding to the first preset sample data, the positive sample data, and the negative sample data are activated. During the activation process, the hash feature y output by the model is activated after tanh(y) calculation to obtain an activation result. After the activation process, the activated hash feature is distributed between -1 and 1, which can avoid excessive output, such as being much greater than 1, causing a large second hash metric loss that affects convergence performance. Because for a binary (-1 or 1) quantization target, output 100 and output 10 will eventually be quantized to 1. In this case, there is no substantial difference between y being 100 and 10, but it can bring about a drastic distance change in the second hash metric loss.

[0078] In a specific embodiment, the second hash metric loss can be calculated by combining the following formula:

[0079] L triple =max(||x a -x p ||-||x a -x n ||+α,0)

[0080] Among them, L triple represents the second hash metric loss, x a Represents the first activated hash feature of the first preset sample data, x p Represents the first activated hash feature of the positive sample data, x nrepresents the first activated hash feature of the negative sample data, α represents the preset threshold; max() represents taking a larger value; || || represents finding the L2 distance between the two.

[0081] S407: Determine a second attack hash loss based on the first sample hash features corresponding to the second preset sample data and the attack sample data;

[0082] In a specific embodiment, the second attack hash loss represents the similarity between the hash feature of the unsupervised sample (the second preset sample data) and the hash feature of the attack sample data generated after the attack.

[0083] In a specific embodiment, the above-mentioned determination of the second attack hash loss based on the first sample hash features corresponding to the second preset sample data and the attack sample data can include: activating the first sample hash features corresponding to the second preset sample data and the attack sample data respectively to obtain second activated hash features; and determining the second attack hash loss based on the second activated hash features.

[0084] In a specific embodiment, activation processing is performed on the first sample hash features corresponding to the second preset sample data and the attack sample data respectively. The specific details of obtaining the second activated hash feature can be referred to the relevant steps of the activation processing above, which will not be repeated here.

[0085] In a specific embodiment, the KL (Kullback-Leibler divergence) loss function, i.e., relative entropy, can be combined to process the various corresponding activation hash features of the second preset sample data and the attack sample data (i.e., the above-mentioned second activation hash features) to obtain the above-mentioned second attack hash loss.

[0086] S409: Determine a fourth hash binarization loss according to the second target binary feature corresponding to the second preset sample data and the first sample hash feature corresponding to the second preset sample data.

[0087] In a specific embodiment, the specific details of determining the fourth hash binarization loss can be referred to the relevant details of determining the third hash binarization loss, which will not be repeated here. The fourth hash binarization loss can characterize the degree of difference between the second sample hash feature of the second preset sample data and the corresponding second target binary feature. The fourth hash binarization loss is also used to pull the hash feature output by the model toward the binary target binary quantization loss during the training process.

[0088] S411 : Determine a second hash loss based on the second hash metric loss, the third hash binarization loss, the second attack hash loss, and the fourth hash binarization loss.

[0089] In a specific embodiment, the above-mentioned determination of the second hash loss based on the second hash metric loss, the third hash binarization loss, the second attack hash loss and the fourth hash binarization loss may include: determining the second supervised hash loss based on the second hash metric loss and the third hash binarization loss; determining the second unsupervised hash loss based on the second attack hash loss and the fourth hash binarization loss; determining the second hash loss based on the second supervised hash loss and the second unsupervised hash loss.

[0090] In a specific embodiment, the second hash metric loss and the third hash binarization loss can be weighted and added to obtain the second supervised hash loss. Specifically, the weights of the third hash binarization loss and the second hash metric loss can be pre-set in combination with the actual application. Generally, the binary quantization loss is not in a dominant learning position, and the model prioritizes ensuring the metric characteristics. Accordingly, the weight of the third hash binary loss can be relatively small, such as 0.1, and the weight of the second hash metric loss can be relatively large, such as 1.

[0091] In a specific embodiment, the second attack hash loss and the fourth hash binarization loss can be weighted and added together to obtain the second unsupervised hash loss. Specifically, the second attack hash loss and the fourth hash binarization loss can be pre-set based on the actual application. Generally, the feature similarity can be prioritized to meet the requirement of consistency before and after the attack, and then the quantization can be ensured to be as close to binary as possible. Accordingly, the weight of the fourth hash binarization loss can be relatively small, such as 0.1, and the weight of the second attack hash loss can be relatively large, such as 1.

[0092] In a specific embodiment, the second supervised hash loss and the second unsupervised hash loss can be weighted and added to obtain the second hash loss. Specifically, the second supervised hash loss and the second unsupervised hash loss can be pre-set in combination with actual applications. Generally, in order to ensure the accuracy of the feature representation of the model, the weights of the second supervised hash loss and the second unsupervised hash loss can be relatively large, for example, both equal to 1.

[0093] S307: Based on the first hash loss, train a preset deep learning model to obtain an initial feature representation model;

[0094] In a specific embodiment, in order to ensure the accuracy of the feature representation of the model, a strategy of adding different tasks in stages can be adopted during the training process, that is, first combining the first hash loss to perform the first preset round (for example, 3 rounds) of training. Specifically, all supervised data (labeled sample data) are traversed once, and it is considered that one round is completed. Specifically, in each round, the model parameters of the preset deep learning model can be updated in combination with the first hash loss of the current round, and the above steps of S303, S305 and updating the model parameters can be repeated in combination with the updated model parameters until the training round reaches the first preset round. The preset deep learning model obtained in the first preset round is used as the above-mentioned initial feature representation model.

[0095] S309: Inputting the labeled sample data and the unlabeled sample data into the initial feature characterization model for feature characterization processing to obtain second sample hash features corresponding to the labeled sample data and the unlabeled sample data, and a sample segmented quantization codebook corresponding to the second sample hash features;

[0096] In a specific embodiment, after obtaining the initial feature characterization model, a segmented quantization codebook can be introduced in the feature characterization processing. Specifically, the labeled sample data and the unlabeled sample data are input into the initial feature characterization model for feature characterization processing to obtain the second sample hash features corresponding to the labeled sample data and the unlabeled sample data, as well as the specific refinement of the sample segmented quantization codebook corresponding to the second sample hash features. For details, please refer to the above-mentioned input of the preset binary conversion function search data and the preset binary conversion function first number of to-be-recalled data into the preset feature characterization model for feature characterization processing to obtain the first hash feature corresponding to the preset binary conversion function search data, the first segmented quantization codebook corresponding to the first hash feature of the preset binary conversion function, the second hash features corresponding to the first number of to-be-recalled data of the preset binary conversion function, and the specific refinement of the second segmented quantization codebook corresponding to the second hash feature, which will not be repeated here.

[0097] S311: Determine a second hash loss and a target quantization loss based on the second sample hash feature and the sample segmented quantization codebook;

[0098] In a specific embodiment, the determining of the second hash loss and the target quantization loss based on the second sample hash feature and the sample segmented quantization codebook includes:

[0099] 1) determining a second hash loss based on the second sample hash feature;

[0100] In a specific embodiment, the above-mentioned determination of the second hash loss based on the second sample hash feature may include: converting the second sample hash feature into a first target binary feature based on a preset binary conversion function; determining the first hash binarization loss based on the first target binary feature and the second sample hash feature corresponding to the first preset sample data, positive sample data and negative sample data respectively; determining the first hash metric loss based on the second sample hash feature corresponding to the first preset sample data, positive sample data and negative sample data respectively; determining the first attack hash loss based on the second sample hash feature corresponding to the second preset sample data and the attack sample data respectively; determining the second hash binarization loss based on the first target binary feature corresponding to the second preset sample data and the second sample hash feature corresponding to the second preset sample data; determining the second hash loss based on the first hash metric loss, the first hash binarization loss, the first attack hash loss and the second hash binarization loss.

[0101] In an optional embodiment, the above-mentioned determination of the second hash loss based on the first hash metric loss, the first hash binarization loss, the first attack hash loss and the second hash binarization loss may include: determining the first supervised hash loss based on the first hash metric loss and the first hash binarization loss; determining the first unsupervised hash loss based on the first attack hash loss and the second hash binarization loss; determining the second hash loss based on the first supervised hash loss and the first unsupervised hash loss.

[0102] In a specific embodiment, the determining of the first hash metric loss based on the second sample hash features corresponding to the first preset sample data, the positive sample data, and the negative sample data may include: activating the second sample hash features corresponding to the first preset sample data, the positive sample data, and the negative sample data, respectively, to obtain first activated hash features; and determining the first hash metric loss based on the first activated hash features;

[0103] In a specific embodiment, the above-mentioned determination of the first attack hash loss based on the second sample hash features corresponding to the second preset sample data and the attack sample data can include: activating the second sample hash features corresponding to the second preset sample data and the attack sample data respectively to obtain second activated hash features; and determining the first attack hash loss based on the second activated hash features.

[0104] In the embodiment of this specification, the specific steps for determining the second hash loss based on the second sample hash feature can be referred to the above-mentioned steps for determining the first hash loss based on the first sample hash feature, and will not be repeated here.

[0105] 2) Determine a target quantization loss based on the second sample hash feature and the sample segmented quantization codebook.

[0106] In a specific embodiment, the sample segmentation quantization feature includes a second sample hash feature, and a fourth number of sample segmentation clustering features corresponding to the third number of segments; optionally, as Figure 5 As shown, the above-mentioned determination of the target quantization loss according to the second sample hash feature and the sample segmented quantization codebook may include:

[0107] S501: Based on the second sample hash feature, a fourth number of sample segment clustering features corresponding to the third number of segments are constructed to construct a reconstructed hash feature corresponding to the second sample hash feature;

[0108] In a specific embodiment, the second sample hash feature of any sample data includes the second sample hash feature and the corresponding fourth number of sample segment clustering features under the third number of segments; for the sample segment hash feature of the second sample hash feature of a certain sample data under a certain segment, the similarity (for example, Hamming distance) between the sample segment hash feature and the fourth number of sample segment clustering features under the corresponding segment can be calculated, and the weight of the sample segment clustering feature with the highest similarity under the segment can be 1, and the weights of the remaining sample segment clustering features under the segment can be 0; accordingly, the sample segment clustering feature under each segment can be multiplied by the corresponding weight, and the weighted features corresponding to the third number of segments can be spliced to obtain the reconstructed hash feature corresponding to the second sample hash feature.

[0109] S503: Determine a supervised reconstruction loss based on the second sample hash features and the reconstructed hash features corresponding to the first preset sample data, the positive sample data, and the negative sample data;

[0110] In a specific embodiment, the supervised reconstruction loss can represent the degree of difference between the reconstructed hash feature of the labeled sample data and the original second sample hash feature. Optionally, the supervised reconstruction loss can be obtained by processing the second sample hash feature and the reconstructed hash feature corresponding to the first preset sample data, the positive sample data, and the negative sample data in combination with a mean square error function.

[0111] S505: Determine a reconstruction metric loss based on the reconstructed hash features corresponding to the first preset sample data, the positive sample data, and the negative sample data;

[0112] In a specific embodiment, the reconstruction metric loss can measure the accuracy of the model's representation of the reconstructed hash features based on the similarity between the first preset sample data, the positive sample data, and the negative sample data.

[0113] In a specific embodiment, the specific detailed steps of determining the reconstruction metric loss based on the reconstructed hash features corresponding to the first preset sample data, the positive sample data, and the negative sample data can refer to the specific detailed steps of determining the second hash metric loss based on the first preset sample data, the positive sample data, and the negative sample data corresponding to the first sample hash features, that is, the first sample hash feature is replaced with the reconstructed hash feature, which will not be repeated here. Optionally, the preset threshold in the process of determining the reconstruction metric loss can be different from the value of the preset threshold in the process of determining the second hash metric loss. The preset threshold in the process of determining the reconstruction metric loss can be slightly smaller than the preset threshold in the process of determining the second hash metric loss, that is, the reconstruction has a certain error range; for example, the preset threshold in the process of determining the second hash metric loss is 20, where the preset threshold in the process of determining the reconstruction metric loss can be 16.

[0114] S507: Determine an unsupervised reconstruction loss based on the second sample hash feature and the reconstructed hash feature corresponding to the second preset sample data;

[0115] In a specific embodiment, the unsupervised reconstruction loss may represent the degree of difference between the reconstructed hash feature of the second preset sample data and the original second sample hash feature. Optionally, the second sample hash feature and the reconstructed hash feature of the second preset sample data may be processed in conjunction with a mean square error function to obtain the unsupervised reconstruction loss.

[0116] S509: Determine the attack quantization loss based on the reconstructed hash features corresponding to the second preset sample data and the attack sample data;

[0117] In a specific embodiment, the attack quantization loss may represent the similarity between the reconstructed hash feature of the unsupervised sample (the second preset sample data) and the reconstructed hash feature of the attack sample data generated after the attack.

[0118] In a specific embodiment, based on the reconstructed hash features corresponding to the second preset sample data and the attack sample data, the specific details of the attack quantization loss are determined. Please refer to the above-mentioned specific details of determining the second attack hash loss based on the first sample hash features corresponding to the second preset sample data and the attack sample data, which will not be repeated here.

[0119] S511: Determine a target quantization loss based on the supervised reconstruction loss, the reconstruction metric loss, the unsupervised reconstruction loss, and the attack quantization loss.

[0120] In a specific embodiment, determining the target quantization loss based on the supervised reconstruction loss, the reconstruction metric loss, the unsupervised reconstruction loss, and the attack quantization loss may include: generating an unsupervised quantization loss based on the unsupervised reconstruction loss and the attack quantization loss; and determining the target quantization loss based on the unsupervised quantization loss, the supervised reconstruction loss, and the reconstruction metric loss.

[0121] In a specific embodiment, the unsupervised reconstruction loss and the attack quantization loss can be weightedly added to obtain the unsupervised quantization loss; specifically, the weights of the unsupervised reconstruction loss and the attack quantization loss can be pre-set in combination with actual applications. In order to prioritize the accuracy of the model's representation of different sample data, the weight of the attack quantization loss can be larger, and the weight of the unsupervised reconstruction loss can be smaller, for example, the weight of the attack quantization loss is 0.5, and the weight of the unsupervised reconstruction loss is 0.05.

[0122] In a specific embodiment, the unsupervised quantization loss, the supervised reconstruction loss, and the reconstruction metric loss can be weighted and added together to obtain the target quantization loss. Specifically, the weights of the supervised quantization loss, the supervised reconstruction loss, and the reconstruction metric loss can be pre-set based on the actual application. For example, the weight of the unsupervised quantization loss is 1, the weight of the supervised reconstruction loss is 0.1, and the weight of the reconstruction metric loss is 0.1.

[0123] S313: Based on the second hash loss and the target quantization loss, train the initial feature representation model to obtain a preset feature representation model.

[0124] In a specific embodiment, Figure 6 As shown, the above-mentioned training of the initial feature characterization model based on the second hash loss and the target quantization loss to obtain the preset feature characterization model may include:

[0125] S601: Determine a target loss according to the second hash loss and the target quantization loss;

[0126] S603: Update the model parameters of the initial feature representation model based on the target loss;

[0127] S605: When the current cumulative update number of the initial feature characterization model is the target number, input the labeled sample data and the unlabeled sample data into the updated initial feature characterization model for feature characterization processing to update the second sample hash features corresponding to the labeled sample data and the unlabeled sample data, and the sample segmented quantization codebook corresponding to the second sample hash features;

[0128] S607: When the current cumulative update number of the initial feature characterization model is not the target number, input the labeled sample data and the unlabeled sample data into the updated initial feature characterization model for feature characterization processing to update the second sample hash features corresponding to the labeled sample data and the unlabeled sample data respectively;

[0129] S609: Based on the current second sample hash feature and the current sample segmented quantization codebook, update the second hash loss and the target quantization loss;

[0130] S611: Based on the updated second hash loss and the updated target quantization loss, repeat the steps of determining the target loss to performing feature characterization processing until the current cumulative number of updates reaches a preset number of times, or the current target loss meets a preset loss condition;

[0131] S613: When the current cumulative update times reaches a preset number, or the current target loss meets a preset loss condition, the current initial feature characterization model is used as a preset feature characterization model.

[0132] In a specific embodiment, the second hash loss and the target quantization loss may be added to obtain the target loss. In the process of updating the model parameters of the initial feature representation model based on the target loss, a gradient descent method may be combined.

[0133] In a specific embodiment, the current cumulative update count of the initial feature representation model may be consistent with the number of training rounds; the target number of training rounds may be a number of training rounds determined based on the update frequency corresponding to the sample segmented quantization codebook, for example, an update frequency of once every two rounds; and the target number of training rounds may be the second, fourth, sixth, eighth, and so on training rounds. Accordingly, among the training rounds, except for the round corresponding to the target number of training rounds, the other training rounds correspond to non-target numbers.

[0134] In a specific embodiment, the preset number of times may be a preset total number of training rounds, and the preset loss condition may be a preset condition for convergence of the target loss. Optionally, the preset loss condition may be that the target loss is less than or equal to the preset loss. In actual applications, the convergence condition for training may be preset based on the actual application, and may be set based on the number of training rounds or the loss.

[0135] In addition, it should be noted that the functions involved in the above-mentioned process of determining various losses are merely examples. In practical applications, other loss functions can be selected in combination with actual needs, and the embodiments of this specification are not limited to the above.

[0136] In a specific embodiment, Figure 7 As shown, Figure 7This is a schematic diagram of a pre-trained deep learning model provided in an embodiment of the present application to obtain a preset feature representation model. Specifically, Figure 7 As shown, the preset deep learning model may include a basic feature extraction module to be trained, a hash module and a quantization codebook module; specifically, the model training can be divided into two stages. In the first stage, the labeled sample data and the unlabeled sample data can be input into the basic feature extraction module for feature extraction processing. Then, the feature information extracted by the basic feature extraction module is input into the hash module for feature extraction, and the second sample hash features of the labeled sample data and the unlabeled sample data can be obtained; and the first hash loss determined by the second sample hash features of the labeled sample data and the unlabeled sample data is combined to train the preset deep learning model to obtain an initial feature representation model; then, the second stage of model training is entered, and the labeled sample data and the unlabeled sample data are input into the basic feature extraction module corresponding to the initial feature representation model for feature extraction. Feature extraction processing, then, the feature information extracted by the basic feature extraction module is input into the hash module corresponding to the initial feature representation model for feature extraction, and the second sample hash features of the labeled sample data and the unlabeled sample data can be obtained; and the second sample hash features are input into the quantization codebook module corresponding to the initial feature representation model for segmented quantization representation, and the corresponding sample segmented quantization codebook can be obtained, and a reconstructed hash feature is generated based on the sample segmented quantization codebook, and a target quantization loss is generated in combination with the reconstructed hash feature, and a second hash loss is generated in combination with the second sample hash feature; then, based on the second hash loss and the target quantization loss, the target loss is determined, and the initial feature representation model is trained based on the target loss, and the quantization codebook is regularly updated during the training of the initial feature representation model to train the above-mentioned preset feature representation model.

[0137] In the embodiments of this specification, during the training process of the preset feature representation model, the quantization codebook and the hash feature are jointly learned so that the two are continuously optimized during learning, effectively avoiding the problem that quantization starts from the feature and directly performs subspace segmentation and segmentation of each space, resulting in the splitting of positive sample data pairs (similar samples due to insufficient feature similarity). While improving the training speed and efficiency, the feature representation accuracy of the quantization codebook can be greatly improved; and the hash feature is reconstructed in combination with the quantization codebook to achieve supervised codebook learning; in addition, self-supervised learning constraints of unsupervised sample data are introduced to improve the adaptability of the quantization codebook on a large amount of unlabeled data, thereby improving the feature representation ability of the quantization codebook, and then improving the generalization ability of the quantization codebook index extracted based on the preset feature representation model during the application process.

[0138] S205: Determine a second number of to-be-screened recalled data from the first number of to-be-recalled data based on the first segmented quantization codebook and the second segmented quantization codebook;

[0139] In a specific embodiment, Figure 8 As shown, the determining of the second number of to-be-screened recalled data from the first number of to-be-recalled data based on the first segmented quantization codebook and the second segmented quantization codebook may include:

[0140] S801: Determine, from a fourth number of segmented clustering features corresponding to the first hash feature under the third number of segments, a first segmented quantitative feature corresponding to the first hash feature under the third number of segments;

[0141] S803: Determine, from the fourth number of segmented clustering features corresponding to the second hash feature of each to-be-recalled data under the third number of segments, the second segmented quantitative features corresponding to the second hash feature of each to-be-recalled data under the third number of segments;

[0142] S805: Determine, from the first number of data to be recalled, preliminary selected data to be recalled, wherein the second segmented quantitative feature corresponding to the corresponding second hash feature in each segment is consistent with the first segmented quantitative feature corresponding to the first hash feature in each segment;

[0143] S807: The intersection of the initial to-be-recalled data corresponding to the third number of segments is used as the second number of to-be-screened recalled data.

[0144] In a specific embodiment, each segment cluster feature under each segment corresponds to a segment hash feature cluster; accordingly, the segment cluster feature corresponding to the segment hash feature cluster to which the first hash feature belongs under each segment can be used as the first segment quantitative feature corresponding to the first hash feature under the segment. Accordingly, the segment cluster feature corresponding to the segment hash feature cluster to which the second hash feature of each to-be-recalled data belongs under each segment can be used as the second segment quantitative feature corresponding to the second hash feature of the to-be-recalled data under the segment.

[0145] In a specific embodiment, for a certain segment, the to-be-recalled data corresponding to the segment hash features in the segment hash feature cluster to which the first segment quantitative feature corresponding to the first hash feature in the segment belongs can be used as the preliminary to-be-recalled data for the segment. Then, the intersection of the preliminary to-be-recalled data in the third segment can be used as the second number of to-be-screened recall data.

[0146] In the above embodiment, combined with the segmented quantitative features of hash features under multiple segments, the segmented quantitative features can be used as an index to associate the search data with the data to be recalled, and the data to be recalled can be pre-screened, which can effectively reduce the amount of calculation in the subsequent data recall process and greatly improve the data recall speed and efficiency.

[0147] S207: Determine target recall data for the search data from the second number of recall data to be screened based on the first hash feature and the second hash features of the second number of recall data to be screened.

[0148] In a specific embodiment, the above-mentioned determination of target recall data of search data from the second number of recall data to be screened based on the first hash feature and the second hash feature of the second number of recall data to be screened may include: determining the similarity between the first hash feature and the second hash feature of the second number of recall data to be screened; and determining the target recall data from the second number of recall data to be screened based on the similarity.

[0149] In a specific embodiment, the similarity between hash features may include, but is not limited to, Hamming distance, Euclidean distance, Manhattan distance, etc. between hash features, and may be set in combination with the actual application cosine. Optionally, the recall data to be screened with the highest similarity may be used as the target recall data; a certain number of recall data to be screened that are ranked at the top of the similarity list may be selected as the target recall data; or the recall data to be screened that have a similarity greater than or equal to a preset similarity may be selected as the target recall data.

[0150] It can be seen from the technical solutions provided by the above embodiments of this specification that, during the data recall process, this specification inputs the search data and the first number of data to be recalled into a preset feature characterization model for feature characterization processing. The preset feature characterization model is a feature characterization model obtained by hash quantization joint training of a preset deep learning model based on labeled sample data and unlabeled sample data. It effectively ensures the generalization ability of the model feature characterization, and can be combined with the preset feature characterization model to generate hash features corresponding to the search data and the first number of data to be recalled, while generating segmented quantization codebooks corresponding to the search data and the first number of data to be recalled, which can realize segmented quantization characterization of hash features, and then in the process of data recall based on hash features, the search data and the data to be recalled are first associated with the quantization codebook, and the data to be recalled is screened out. The target recall data is determined based on the hash features of the data to be screened and the search data. This can improve the data recall accuracy while reducing the amount of computation in the data recall process, greatly improving the data recall speed and efficiency.

[0151] The present application also provides a data recall device, such as Figure 9 As shown, the above device includes:

[0152] The data acquisition module 910 is configured to acquire search data and a first number of data to be recalled;

[0153] The first feature characterization processing module 920 is configured to input the search data and the first number of to-be-recalled data into a preset feature characterization model for feature characterization processing, thereby obtaining a first hash feature corresponding to the search data, a first segmented quantization codebook corresponding to the first hash feature, a second hash feature corresponding to each of the first number of to-be-recalled data, and a second segmented quantization codebook corresponding to the second hash feature;

[0154] The recalled data screening module 930 is configured to determine a second number of to-be-screened recalled data from the first number of to-be-recalled data based on the first segmented quantization codebook and the second segmented quantization codebook;

[0155] The target recall data determination module 940 is configured to determine the target recall data of the search data from the second number of recall data to be screened based on the first hash feature and the second hash feature of the second number of recall data to be screened;

[0156] Among them, the preset feature characterization model is a feature characterization model obtained by performing hash quantization joint training on a preset deep learning model based on labeled sample data and unlabeled sample data.

[0157] Optionally, the preset feature representation model includes a hash feature extraction module and a quantization codebook module;

[0158] The first feature characterization processing module 910 includes:

[0159] a feature extraction processing unit configured to input the search data and the first number of to-be-recalled data into a hash feature extraction module for feature extraction processing to obtain a first hash feature and a second hash feature;

[0160] The segmented quantization characterization unit is configured to perform segmented quantization characterization on the first hash feature and the second hash feature based on the quantization codebook module to obtain the first segmented quantization codebook and the second segmented quantization codebook.

[0161] Optionally, the segmented quantization representation unit includes:

[0162] A feature input unit, configured to input the first hash feature and the second hash feature into the quantization codebook module;

[0163] A segmentation processing unit is configured to execute in the quantization codebook module, perform segmentation processing on the first hash feature and the second hash feature respectively, to obtain first segmentation hash features of the first hash feature under a third number of segments and second segmentation hash features of the second hash feature under the third number of segments;

[0164] A clustering processing unit is configured to execute, in the quantization codebook module, clustering the first segment hash feature and the second segment hash feature under each segment to obtain a fourth number of segment cluster features corresponding to each segment;

[0165] The segmented quantization codebook determination unit is configured to execute in the quantization codebook module, using the first hash feature and the fourth number of segmented clustering features corresponding to the third number of segments as the first segmented quantization codebook; and using the second hash feature of each to-be-recalled data and the fourth number of segmented clustering features corresponding to the third number of segments as the second segmented quantization codebook of each to-be-recalled data.

[0166] Optionally, the recall data screening module 930 includes:

[0167] The first segmented quantitative feature determining unit is configured to determine the first segmented quantitative features corresponding to the first hash feature under the third number of segments from the fourth number of segmented cluster features corresponding to the first hash feature under the third number of segments;

[0168] The second segmented quantitative feature determining unit is configured to determine the second hash feature of each to-be-recalled data and the second segmented quantitative feature corresponding to the third number of segments from the fourth number of segmented cluster features corresponding to the second hash feature of each to-be-recalled data under the third number of segments;

[0169] The preliminary selected data to be recalled determining unit is configured to determine, from the first number of data to be recalled, preliminary selected data to be recalled whose second segmented quantitative features corresponding to the second hash feature in each segment are consistent with the first segmented quantitative features corresponding to the first hash feature in each segment;

[0170] The unit for determining the recalled data to be screened is configured to execute the intersection of the initial recalled data corresponding to the third number of segments as the second number of recalled data to be screened.

[0171] Optionally, the target recall data determination module 940 includes:

[0172] a similarity determination unit configured to determine similarities between the first hash feature and second hash features of a second number of recalled data to be screened;

[0173] The target recall data determining unit is configured to determine the target recall data from the second number of recall data to be screened according to the similarity.

[0174] Optionally, the above device further includes:

[0175] A sample data acquisition module is configured to acquire labeled sample data and unlabeled sample data;

[0176] A second feature characterization processing module is configured to input the labeled sample data and the unlabeled sample data into a preset deep learning model for feature characterization processing, and obtain first sample hash features corresponding to the labeled sample data and the unlabeled sample data;

[0177] A first hash loss determining module is configured to determine a first hash loss based on a first sample hash feature;

[0178] An initial feature representation model generation module is configured to train a preset deep learning model based on the first hash loss to obtain an initial feature representation model;

[0179] A third feature characterization processing module is configured to input the labeled sample data and the unlabeled sample data into the initial feature characterization model for feature characterization processing, thereby obtaining second sample hash features corresponding to the labeled sample data and the unlabeled sample data, and a sample segmented quantization codebook corresponding to the second sample hash features;

[0180] A loss determination module is configured to determine a second hash loss and a target quantization loss based on a second sample hash feature and a sample segmented quantization codebook;

[0181] The preset feature characterization model generation module is configured to execute training of the initial feature characterization model based on the second hash loss and the target quantization loss to obtain the preset feature characterization model.

[0182] Optionally, the preset feature representation model generation module includes:

[0183] a target loss determining unit configured to determine a target loss according to the second hash loss and the target quantization loss;

[0184] A model parameter updating unit, configured to update the model parameters of the initial feature representation model based on the target loss;

[0185] The first feature characterization processing unit is configured to perform feature characterization processing on the labeled sample data and the unlabeled sample data input into the updated initial feature characterization model when the current cumulative update number of the initial feature characterization model is the target number, so as to update the second sample hash features corresponding to the labeled sample data and the unlabeled sample data, respectively, and the sample segmented quantization codebook corresponding to the second sample hash features;

[0186] The second feature characterization processing unit is configured to perform feature characterization processing by inputting the labeled sample data and the unlabeled sample data into the updated initial feature characterization model when the current cumulative update number of the initial feature characterization model is not a target number, so as to update the second sample hash features corresponding to the labeled sample data and the unlabeled sample data respectively;

[0187] A loss updating unit, configured to update a second hash loss and a target quantization loss based on a current second sample hash feature and a current sample segmented quantization codebook;

[0188] an iterative unit configured to execute, based on the updated second hash loss and the updated target quantization loss, the steps of repeatedly determining the target loss and performing feature characterization processing until the current cumulative number of updates reaches a preset number or the current target loss satisfies a preset loss condition;

[0189] The preset feature characterization model determination unit is configured to execute the current initial feature characterization model as the preset feature characterization model when the current cumulative update times reaches the preset times or the current target loss meets the preset loss condition.

[0190] Optionally, the loss determination module includes:

[0191] A second hash loss determining unit is configured to determine a second hash loss based on a second sample hash feature;

[0192] The target quantization loss determining unit is configured to determine the target quantization loss according to the second sample hash feature and the sample segmented quantization codebook.

[0193] Optionally, the labeled sample data includes first preset sample data, positive sample data corresponding to the first preset sample data, and negative sample data corresponding to the first preset sample data; the unlabeled sample data includes second preset sample data, and attack sample data corresponding to the second preset sample data;

[0194] The second hash loss determination unit includes:

[0195] a feature conversion unit configured to convert the second sample hash feature into a first target binary feature based on a preset binary conversion function;

[0196] A first hash binarization loss determining unit is configured to determine a first hash binarization loss according to first target binary features and second sample hash features corresponding to first preset sample data, positive sample data, and negative sample data, respectively;

[0197] A first hash metric loss determining unit is configured to determine a first hash metric loss based on a second sample hash feature corresponding to each of the first preset sample data, the positive sample data, and the negative sample data;

[0198] A first attack hash loss determining unit is configured to determine a first attack hash loss based on second sample hash features corresponding to the second preset sample data and the attack sample data;

[0199] A second hash binarization loss determining unit is configured to determine a second hash binarization loss according to a first target binary feature corresponding to the second preset sample data and a second sample hash feature corresponding to the second preset sample data;

[0200] The second hash loss determining unit is configured to determine a second hash loss based on the first hash metric loss, the first hash binarization loss, the first attack hash loss, and the second hash binarization loss.

[0201] Optionally, the first hash metric loss determination unit includes:

[0202] A first activation processing unit is configured to perform activation processing on the second sample hash features corresponding to the first preset sample data, the positive sample data, and the negative sample data, respectively, to obtain a first activated hash feature;

[0203] A first hash metric loss subunit is configured to determine a first hash metric loss based on the first activated hash feature;

[0204] The first attack hash loss determination unit includes:

[0205] A second activation processing unit is configured to perform activation processing on the second sample hash features corresponding to the second preset sample data and the attack sample data, respectively, to obtain a second activated hash feature;

[0206] The first attack hash loss subunit is configured to determine a first attack hash loss according to the second activation hash feature.

[0207] Optionally, the labeled sample data includes first preset sample data, positive sample data corresponding to the first preset sample data, and negative sample data corresponding to the first preset sample data; the unlabeled sample data includes second preset sample data, and attack sample data corresponding to the second preset sample data; the sample segmentation quantitative feature includes the second sample hash feature and a fourth number of sample segmentation clustering features corresponding to the third number of segments;

[0208] The target quantization loss determination unit includes:

[0209] A hash feature construction unit is configured to execute clustering features of a fourth number of sample segments corresponding to the third number of segments based on the second sample hash feature to construct a reconstructed hash feature corresponding to the second sample hash feature;

[0210] A supervised reconstruction loss determination unit is configured to determine a supervised reconstruction loss based on the second sample hash feature and the reconstructed hash feature corresponding to the first preset sample data, the positive sample data, and the negative sample data;

[0211] A reconstruction metric loss determining unit is configured to determine a reconstruction metric loss based on the first preset sample data, the positive sample data, and the negative sample data respectively reconstructing the hash features.

[0212] The unsupervised reconstruction loss determining unit is configured to determine the unsupervised reconstruction loss according to the second sample hash feature and the reconstructed hash feature corresponding to the second preset sample data;

[0213] an attack quantization loss determining unit, configured to determine the attack quantization loss based on the reconstructed hash features corresponding to the second preset sample data and the attack sample data;

[0214] The target quantization loss subunit is configured to determine the target quantization loss according to the supervised reconstruction loss, the reconstruction metric loss, the unsupervised reconstruction loss and the attack quantization loss.

[0215] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0216] Figure 10 This is a block diagram of an electronic device for data recall provided by an embodiment of the present application. The electronic device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 10 As shown. The electronic device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a data recall method is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.

[0217] Those skilled in the art will understand that Figure 10 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present disclosure, and does not constitute a limitation on the electronic device to which the scheme of the present disclosure is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0218] In an exemplary embodiment, an electronic device is further provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the data recall method as in the embodiment of the present disclosure.

[0219] In an exemplary embodiment, a computer-readable storage medium is further provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the page display method in the embodiment of the present disclosure.

[0220] In an exemplary embodiment, a computer program product or computer program is also provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the data recall method provided in the various optional implementations described above.

[0221] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, which can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0222] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.

[0223] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A data recall method, characterized in that: The method comprises: Obtain search data and a first number of data to be recalled; Inputting the search data and the first number of to-be-recalled data into a preset feature characterization model for feature characterization processing, obtaining a first hash feature corresponding to the search data, a first segmented quantization codebook corresponding to the first hash feature, a second hash feature corresponding to each of the first number of to-be-recalled data, and a second segmented quantization codebook corresponding to the second hash feature; Determining a second number of to-be-screened recalled data from the first number of to-be-recalled data based on the first segmented quantization codebook and the second segmented quantization codebook; Determining target recall data of the search data from the second number of recall data to be screened based on the first hash feature and the second hash features of the second number of recall data to be screened; Among them, the preset feature characterization model is a feature characterization model obtained by performing hash quantization joint training on a preset deep learning model based on labeled sample data and unlabeled sample data.

2. The method according to claim 1, characterized in that The preset feature representation model includes a hash feature extraction module and a quantization codebook module; The step of inputting the search data and the first number of to-be-recalled data into a preset feature characterization model for feature characterization processing to obtain a first hash feature corresponding to the search data, a first segmented quantization codebook corresponding to the first hash feature, a second hash feature corresponding to each of the first number of to-be-recalled data, and a second segmented quantization codebook corresponding to the second hash feature includes: Inputting the search data and the first number of to-be-recalled data into the hash feature extraction module for feature extraction processing to obtain the first hash feature and the second hash feature; Based on the quantization codebook module, the first hash feature and the second hash feature are segmented and quantized to obtain the first segmented quantization codebook and the second segmented quantization codebook.

3. The method according to claim 2, characterized in that The step of performing segmented quantization characterization on the first hash feature and the second hash feature based on the quantization codebook module to obtain the first segmented quantization codebook and the second segmented quantization codebook includes: Inputting the first hash feature and the second hash feature into the quantization codebook module; In the quantization codebook module, segmenting the first hash feature and the second hash feature to obtain first segmented hash features of the first hash feature in a third number of segments and second segmented hash features of the second hash feature in the third number of segments; and performing clustering processing on the first segment hash feature and the second segment hash feature under each segment to obtain a fourth number of segment cluster features corresponding to each segment; Furthermore, the fourth number of segment clustering features corresponding to the first hash feature under the third number of segments are used as the first segment quantization codebook; and the fourth number of segment clustering features corresponding to the second hash feature of each data to be recalled under the third number of segments are used as the second segment quantization codebook of each data to be recalled.

4. The method according to claim 3, characterized in that The determining, based on the first segmented quantization codebook and the second segmented quantization codebook, a second number of to-be-recalled data to be screened from the first number of to-be-recalled data comprises: Determining, from the fourth number of segment clustering features corresponding to the first hash feature under the third number of segments, first segment quantization features corresponding to the first hash feature under the third number of segments; Determining, from the second hash feature of each to-be-recalled data and the fourth number of segment cluster features corresponding to the third number of segments, the second segment quantization features corresponding to the second hash feature of each to-be-recalled data and the third number of segments; Determine, from the first number of data to be recalled, preliminary selected data to be recalled, wherein the second segmented quantitative feature corresponding to the corresponding second hash feature in each segment is consistent with the first segmented quantitative feature corresponding to the first hash feature in each segment; The intersection of the initial to-be-recalled data corresponding to the third number of segments is used as the second number of to-be-screened recalled data.

5. The method according to claim 1, wherein The determining, based on the first hash feature and the second hash features of the second number of recalled data to be screened, target recalled data of the search data from the second number of recalled data to be screened comprises: Determining similarities between the first hash feature and the second hash features of the second number of recalled data to be screened; The target recalled data is determined from the second number of recalled data to be screened according to the similarity.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Obtain labeled sample data and unlabeled sample data; Inputting the labeled sample data and the unlabeled sample data into a preset deep learning model for feature characterization processing to obtain first sample hash features corresponding to the labeled sample data and the unlabeled sample data respectively; Determining a first hash loss based on the first sample hash feature; Based on the first hash loss, training the preset deep learning model to obtain an initial feature representation model; Inputting the labeled sample data and the unlabeled sample data into the initial feature characterization model for feature characterization processing, to obtain second sample hash features corresponding to the labeled sample data and the unlabeled sample data, respectively, and a sample segmented quantization codebook corresponding to the second sample hash features; Determining a second hash loss and a target quantization loss based on the second sample hash feature and the sample segmented quantization codebook; Based on the second hash loss and the target quantization loss, the initial feature characterization model is trained to obtain the preset feature characterization model.

7. The method according to claim 6, characterized in that The training of the initial feature characterization model based on the second hash loss and the target quantization loss to obtain the preset feature characterization model includes: Determining a target loss according to the second hash loss and the target quantization loss; Updating model parameters of the initial feature representation model based on the target loss; When the current cumulative update number of the initial feature characterization model is the target number, inputting the labeled sample data and the unlabeled sample data into the updated initial feature characterization model for feature characterization processing to update the second sample hash features corresponding to each of the labeled sample data and the unlabeled sample data, and the sample segmented quantization codebook corresponding to the second sample hash features; When the current cumulative update number of the initial feature characterization model is a non-target number, inputting the labeled sample data and the unlabeled sample data into the updated initial feature characterization model for feature characterization processing to update the second sample hash features corresponding to the labeled sample data and the unlabeled sample data respectively; Based on the current second sample hash feature and the current sample segmented quantization codebook, updating the second hash loss and the target quantization loss; Based on the updated second hash loss and the updated target quantization loss, repeating the steps of determining the target loss to performing feature characterization processing until the current cumulative number of updates reaches a preset number or the current target loss meets a preset loss condition; When the current cumulative update times reaches the preset times, or the current target loss satisfies the preset loss condition, the current initial feature characterization model is used as the preset feature characterization model.

8. The method according to claim 6, characterized in that The determining, based on the second sample hash feature and the sample segmented quantization codebook, a second hash loss and a target quantization loss includes: determining the second hash loss based on the second sample hash feature; A target quantization loss is determined according to the second sample hash feature and the sample segmented quantization codebook.

9. The method according to claim 8, characterized in that The labeled sample data includes first preset sample data, positive sample data corresponding to the first preset sample data, and negative sample data corresponding to the first preset sample data; The unlabeled sample data includes second preset sample data and attack sample data corresponding to the second preset sample data; The determining the second hash loss based on the second sample hash feature includes: Based on a preset binary conversion function, converting the second sample hash feature into a first target binary feature; Determine a first hash binarization loss according to the first target binary feature and the second sample hash feature corresponding to the first preset sample data, the positive sample data, and the negative sample data; Determining a first hash metric loss based on second sample hash features corresponding to the first preset sample data, the positive sample data, and the negative sample data; Determining a first attack hash loss based on second sample hash features corresponding to the second preset sample data and the attack sample data, wherein the first attack hash loss represents a similarity between the hash features of the second preset sample data and the attack sample data generated after the second preset sample data is attacked; determining a second hash binarization loss according to a first target binary feature corresponding to the second preset sample data and a second sample hash feature corresponding to the second preset sample data; The second hash loss is determined based on the first hash metric loss, the first hash binarization loss, the first attack hash loss, and the second hash binarization loss.

10. The method according to claim 9, characterized in that The determining of the first hash metric loss based on the second sample hash features corresponding to the first preset sample data, the positive sample data, and the negative sample data includes: Activate the second sample hash features corresponding to the first preset sample data, the positive sample data, and the negative sample data to obtain first activated hash features; determining the first hash metric loss based on the first activated hash feature; The determining the first attack hash loss based on the second sample hash features corresponding to the second preset sample data and the attack sample data includes: activating the second sample hash features corresponding to the second preset sample data and the attack sample data respectively to obtain second activated hash features; The first attack hash loss is determined according to the second activation hash feature.

11. The method according to claim 8, characterized in that The labeled sample data includes first preset sample data, positive sample data corresponding to the first preset sample data, and negative sample data corresponding to the first preset sample data; The unlabeled sample data includes second preset sample data and attack sample data corresponding to the second preset sample data; the sample segmentation quantitative features include the second sample hash feature and a fourth number of sample segmentation clustering features corresponding to the third number of segments; The determining the target quantization loss according to the second sample hash feature and the sample segmented quantization codebook includes: Based on the second sample hash feature, a fourth number of sample segment cluster features corresponding to the third number of segments are used to construct a reconstructed hash feature corresponding to the second sample hash feature; Determine a supervised reconstruction loss according to the second sample hash features and the reconstructed hash features corresponding to the first preset sample data, the positive sample data, and the negative sample data; Determining a reconstruction metric loss according to the reconstructed hash features corresponding to the first preset sample data, the positive sample data, and the negative sample data; Determining an unsupervised reconstruction loss according to the second sample hash feature and the reconstructed hash feature corresponding to the second preset sample data; Determining the attack quantization loss based on the reconstructed hash features corresponding to the second preset sample data and the attack sample data; The target quantization loss is determined according to the supervised reconstruction loss, the reconstruction metric loss, the unsupervised reconstruction loss and the attack quantization loss.

12. A data recall device, characterized in that: The device comprises: A data acquisition module is configured to acquire search data and a first number of to-be-recalled data; a first feature characterization processing module configured to input the search data and the first number of to-be-recalled data into a preset feature characterization model for feature characterization processing, thereby obtaining a first hash feature corresponding to the search data, a first segmented quantization codebook corresponding to the first hash feature, a second hash feature corresponding to each of the first number of to-be-recalled data, and a second segmented quantization codebook corresponding to the second hash feature; a recalled data screening module, configured to determine a second number of to-be-screened recalled data from the first number of to-be-recalled data based on the first segmented quantization codebook and the second segmented quantization codebook; a target recall data determination module configured to determine target recall data of the search data from the second number of recall data to be screened based on the first hash feature and the second hash feature of the second number of recall data to be screened; Among them, the preset feature characterization model is a feature characterization model obtained by performing hash quantization joint training on a preset deep learning model based on labeled sample data and unlabeled sample data.

13. The device according to claim 12, characterized in that The preset feature representation model includes a hash feature extraction module and a quantization codebook module; The first feature characterization processing module includes: a feature extraction processing unit configured to input the search data and the first number of to-be-recalled data into the hash feature extraction module for feature extraction processing to obtain the first hash feature and the second hash feature; The segmented quantization characterization unit is configured to perform segmented quantization characterization on the first hash feature and the second hash feature based on the quantization codebook module to obtain the first segmented quantization codebook and the second segmented quantization codebook.

14. The device according to claim 13, characterized in that The segmented quantization characterization unit includes: a feature input unit, configured to input the first hash feature and the second hash feature into the quantization codebook module; a segmentation processing unit configured to execute, in the quantization codebook module, segmentation processing on the first hash feature and the second hash feature, respectively, to obtain first segmentation hash features of the first hash feature in a third number of segments and second segmentation hash features of the second hash feature in the third number of segments; A clustering processing unit is configured to execute, in the quantization codebook module, clustering the first segment hash feature and the second segment hash feature under each segment to obtain a fourth number of segment cluster features corresponding to each segment; The segmented quantization codebook determination unit is configured to execute in the quantization codebook module, using the first hash feature and the fourth number of segmented clustering features corresponding to the third number of segments as the first segmented quantization codebook; and using the second hash feature of each to-be-recalled data and the fourth number of segmented clustering features corresponding to the third number of segments as the second segmented quantization codebook of each to-be-recalled data.

15. The device according to claim 14, characterized in that The recall data screening module includes: The first segmented quantitative feature determining unit is configured to determine, from the fourth number of segmented cluster features corresponding to the first hash feature under the third number of segments, first segmented quantitative features corresponding to the first hash feature under the third number of segments; The second segmented quantitative feature determining unit is configured to determine, from the second hash feature of each to-be-recalled data and the fourth number of segmented cluster features corresponding to the third number of segments, the second segmented quantitative features corresponding to the second hash feature of each to-be-recalled data under the third number of segments; a preliminary selected data to be recalled determining unit configured to determine, from the first number of data to be recalled, preliminary selected data to be recalled whose second segmented quantitative feature corresponding to the second hash feature under each segment is consistent with the first segmented quantitative feature corresponding to the first hash feature under each segment; The unit for determining the recalled data to be screened is configured to execute the intersection of the initial recalled data corresponding to the third number of segments as the second number of recalled data to be screened.

16. The device according to claim 12, characterized in that The target recall data determination module includes: A similarity determination unit is configured to determine similarities between the first hash feature and the second hash features of the second number of recalled data to be screened; The target recall data determining unit is configured to determine the target recall data from the second number of recall data to be screened according to the similarity.

17. The device according to any one of claims 12 to 16, characterized in that The device further comprises: A sample data acquisition module is configured to acquire labeled sample data and unlabeled sample data; A second feature characterization processing module is configured to input the labeled sample data and the unlabeled sample data into a preset deep learning model for feature characterization processing to obtain first sample hash features corresponding to each of the labeled sample data and the unlabeled sample data; A first hash loss determining module is configured to determine a first hash loss based on the first sample hash feature; An initial feature characterization model generation module is configured to train the preset deep learning model based on the first hash loss to obtain an initial feature characterization model; a third feature characterization processing module, configured to input the labeled sample data and the unlabeled sample data into the initial feature characterization model for feature characterization processing, to obtain second sample hash features corresponding to the labeled sample data and the unlabeled sample data, and a sample segmented quantization codebook corresponding to the second sample hash features; a loss determination module, configured to determine a second hash loss and a target quantization loss based on the second sample hash feature and the sample segmented quantization codebook; The preset feature characterization model generation module is configured to train the initial feature characterization model based on the second hash loss and the target quantization loss to obtain the preset feature characterization model.

18. The device according to claim 17, characterized in that The preset feature representation model generation module includes: a target loss determining unit, configured to determine a target loss according to the second hash loss and the target quantization loss; a model parameter updating unit, configured to update the model parameters of the initial feature representation model based on the target loss; a first feature characterization processing unit, configured to execute, when the current cumulative number of updates of the initial feature characterization model is the target number, inputting the labeled sample data and the unlabeled sample data into the updated initial feature characterization model for feature characterization processing, so as to update the second sample hash features corresponding to each of the labeled sample data and the unlabeled sample data, and the sample segmented quantization codebook corresponding to the second sample hash features; A second feature characterization processing unit is configured to perform feature characterization processing on the labeled sample data and the unlabeled sample data by inputting the labeled sample data and the unlabeled sample data into the updated initial feature characterization model when the current cumulative update number of the initial feature characterization model is non-target number, so as to update the second sample hash features corresponding to each of the labeled sample data and the unlabeled sample data; A loss updating unit, configured to update the second hash loss and the target quantization loss based on a current second sample hash feature and a current sample segmented quantization codebook; an iterative unit configured to execute, based on the updated second hash loss and the updated target quantization loss, the steps of determining the target loss and performing feature characterization processing, until the current cumulative number of updates reaches a preset number or the current target loss satisfies a preset loss condition; The preset feature characterization model determination unit is configured to execute the current initial feature characterization model as the preset feature characterization model when the current cumulative update times reaches the preset times or the current target loss meets the preset loss condition.

19. The device according to claim 17, characterized in that The loss determination module includes: A second hash loss determining unit is configured to determine the second hash loss based on the second sample hash feature; The target quantization loss determining unit is configured to determine a target quantization loss according to the second sample hash feature and the sample segmented quantization codebook.

20. The device according to claim 19, characterized in that The labeled sample data includes first preset sample data, positive sample data corresponding to the first preset sample data, and negative sample data corresponding to the first preset sample data; The unlabeled sample data includes second preset sample data and attack sample data corresponding to the second preset sample data; The second hash loss determining unit includes: a feature conversion unit, configured to convert the second sample hash feature into a first target binary feature based on a preset binary conversion function; A first hash binarization loss determining unit is configured to determine a first hash binarization loss based on the first target binary feature and the second sample hash feature corresponding to the first preset sample data, the positive sample data, and the negative sample data; A first hash metric loss determining unit is configured to determine a first hash metric loss based on second sample hash features corresponding to the first preset sample data, the positive sample data, and the negative sample data; a first attack hash loss determining unit configured to determine a first attack hash loss based on second sample hash features corresponding to the second preset sample data and the attack sample data, wherein the first attack hash loss represents a similarity between the second preset sample data and a hash feature of the attack sample data generated after the second preset sample data is attacked; A second hash binarization loss determining unit is configured to determine a second hash binarization loss according to a first target binary feature corresponding to the second preset sample data and a second sample hash feature corresponding to the second preset sample data; The second hash loss determining unit is configured to determine the second hash loss based on the first hash metric loss, the first hash binarization loss, the first attack hash loss, and the second hash binarization loss.

21. The device according to claim 20, characterized in that The first hash metric loss determining unit includes: A first activation processing unit is configured to perform activation processing on the second sample hash features corresponding to the first preset sample data, the positive sample data, and the negative sample data, respectively, to obtain a first activated hash feature; A first hash metric loss subunit is configured to determine the first hash metric loss according to the first activated hash feature; The first attack hash loss determining unit includes: A second activation processing unit is configured to perform activation processing on the second sample hash features corresponding to the second preset sample data and the attack sample data, respectively, to obtain a second activated hash feature; The first attack hash loss subunit is configured to determine the first attack hash loss according to the second activation hash feature.

22. The device according to claim 19, characterized in that The labeled sample data includes first preset sample data, positive sample data corresponding to the first preset sample data, and negative sample data corresponding to the first preset sample data; The unlabeled sample data includes second preset sample data and attack sample data corresponding to the second preset sample data; the sample segmentation quantitative features include the second sample hash feature and a fourth number of sample segmentation clustering features corresponding to the third number of segments; The target quantization loss determination unit includes: a hash feature construction unit configured to execute clustering features of a fourth number of sample segments corresponding to the third number of segments based on the second sample hash feature, to construct a reconstructed hash feature corresponding to the second sample hash feature; A supervised reconstruction loss determining unit is configured to determine a supervised reconstruction loss based on the second sample hash features and the reconstructed hash features corresponding to the first preset sample data, the positive sample data, and the negative sample data; A reconstruction metric loss determining unit is configured to determine a reconstruction metric loss based on the reconstructed hash features corresponding to the first preset sample data, the positive sample data, and the negative sample data; an unsupervised reconstruction loss determining unit, configured to determine an unsupervised reconstruction loss according to a second sample hash feature and a reconstructed hash feature corresponding to the second preset sample data; an attack quantization loss determining unit, configured to determine an attack quantization loss based on the reconstructed hash features corresponding to the second preset sample data and the attack sample data; The target quantization loss subunit is configured to determine the target quantization loss according to the supervised reconstruction loss, the reconstruction metric loss, the unsupervised reconstruction loss and the attack quantization loss.

23. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the data recall method according to any one of claims 1 to 11.

24. A computer-readable storage medium, characterized in that When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the data recall method according to any one of claims 1 to 11.

25. A computer program product, characterized in that The computer program product includes a computer program, which is stored in a computer-readable storage medium. A processor reads and executes the computer program from the computer-readable storage medium to implement the data recall method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Information retrieval method, device and equipment and computer readable storage medium

    CN111753060A

  • Data recommendation method and device, electronic equipment and storage medium

    CN112364251A