A data retrieval method, apparatus and device

By receiving retrieval requests and auxiliary query information, and adjusting the retrieval representation and data representation using an encoder and a large language model, the problem of fixed retrieval results in existing technologies is solved, enabling flexible and efficient data retrieval to meet specific user needs.

CN119807245BActive Publication Date: 2026-02-10ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411825946.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2026-02-10
Estimated Expiration
2044-12-11

AI Technical Summary

Technical Problem

In existing technologies for retrieval of single-modal or cross-modal data, the retrieval performance is affected by the representation model, resulting in fixed retrieval results and making it difficult to meet the specific needs of users without changing the representation model.

Method used

By receiving retrieval requests and auxiliary query information, the system generates retrieval constraint information using an encoder and a large language model, adjusts retrieval representation and data representation, and dynamically maps the representation space to meet user needs.

Benefits of technology

It enables more flexible and efficient data retrieval results that better meet user needs without changing the representation model and retrieval database, thus improving the flexibility and versatility of retrieval.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807245B_ABST
    Figure CN119807245B_ABST
Patent Text Reader

Abstract

The embodiment of the specification discloses a data retrieval method, device and equipment, the method comprises: receiving a retrieval request for a target object to be retrieved, and obtaining auxiliary query information for the target object; inputting information related to the target object in the retrieval request into an encoder to obtain a retrieval representation corresponding to the retrieval request, and inputting prompt information generated based on the auxiliary query information into a large language model to obtain retrieval constraint information corresponding to the retrieval request; adjusting the retrieval representation based on the retrieval constraint information to obtain an adjusted retrieval representation, and adjusting a data representation corresponding to each retrieval data contained in the retrieval database based on the retrieval constraint information to obtain a representation database composed of adjusted data representations; querying the adjusted data representation matched with the adjusted retrieval representation from the representation database to determine the target retrieval data retrieved in the retrieval database based on the retrieval request.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of computer technology, and in particular to a data retrieval method, apparatus, and device. Background Technology

[0002] In unimodal or crossmodal data retrieval (specifically, vector retrieval or representation retrieval, which are becoming increasingly important as people place greater emphasis on their privacy data), retrieval performance is primarily influenced by the effectiveness of the representation model (such as the encoder). Representation learning determines the rationality of the representation space construction of the target dataset, which in turn determines the similarity determination between data. Once the representation space is determined, the retrieval results are essentially fixed. Therefore, a more flexible data retrieval method is needed, allowing for temporary mapping transformations of the representation space without altering the representation model during data retrieval, thereby providing users with retrieval results that better meet their needs. Summary of the Invention

[0003] The purpose of the embodiments in this specification is to provide a more flexible data retrieval method, which allows for temporary mapping and transformation of the representation space without changing the representation model during data retrieval, thereby providing users with retrieval results that better meet their needs.

[0004] To achieve the above technical solution, the embodiments in this specification are implemented as follows:

[0005] This specification provides a data retrieval method, comprising: receiving a retrieval request for a target object to be retrieved, and obtaining auxiliary query information for the target object; inputting information related to the target object in the retrieval request into an encoder to obtain a retrieval representation corresponding to the retrieval request, and inputting prompt information generated based on the auxiliary query information into a large language model to obtain retrieval constraint information corresponding to the retrieval request; adjusting the retrieval representation based on the retrieval constraint information to obtain an adjusted retrieval representation, and adjusting the data representation corresponding to each retrieval data contained in the retrieval database corresponding to the retrieval request based on the retrieval constraint information to obtain a representation database composed of the adjusted data representations; querying the representation database for adjusted data representations that match the adjusted retrieval representations, and determining the target retrieval data retrieved in the retrieval database based on the retrieval request based on the queried adjusted data representations.

[0006] This specification provides a data retrieval device comprising: a request module, which receives a retrieval request for a target object and obtains auxiliary query information for the target object; an encoding module, which inputs information related to the target object in the retrieval request into an encoder to obtain a retrieval representation corresponding to the retrieval request, and inputs prompt information generated based on the auxiliary query information into a large language model to obtain retrieval constraint information corresponding to the retrieval request; a representation adjustment module, which adjusts the retrieval representation based on the retrieval constraint information to obtain an adjusted retrieval representation, and adjusts the data representation corresponding to each retrieval data contained in the retrieval database corresponding to the retrieval request based on the retrieval constraint information to obtain a representation database composed of the adjusted data representations; and a retrieval module, which queries the representation database for adjusted data representations that match the adjusted retrieval representations, and determines the target retrieval data retrieved from the retrieval database based on the retrieval request based on the queried adjusted data representations.

[0007] This specification provides a data retrieval device comprising: a processor; and a memory configured to store computer-executable instructions, wherein the executable instructions, when executed, cause the processor to: receive a retrieval request for a target object to be retrieved, and obtain auxiliary query information for the target object; input information related to the target object in the retrieval request into an encoder to obtain a retrieval representation corresponding to the retrieval request, and input prompt information generated based on the auxiliary query information into a large language model to obtain retrieval constraint information corresponding to the retrieval request; adjust the retrieval representation based on the retrieval constraint information to obtain an adjusted retrieval representation, and adjust the data representation corresponding to each retrieval data contained in the retrieval database corresponding to the retrieval request based on the retrieval constraint information to obtain a representation database composed of the adjusted data representations; query the representation database for adjusted data representations that match the adjusted retrieval representations, and determine the target retrieval data retrieved in the retrieval database based on the retrieval request based on the queried adjusted data representations.

[0008] This specification also provides a storage medium for storing computer-executable instructions. When executed by a processor, these instructions implement the following process: receiving a search request for a target object to be searched, and obtaining auxiliary query information for the target object; inputting information related to the target object in the search request into an encoder to obtain a search representation corresponding to the search request, and inputting prompt information generated based on the auxiliary query information into a large language model to obtain search constraint information corresponding to the search request; adjusting the search representation based on the search constraint information to obtain an adjusted search representation, and adjusting the data representation corresponding to each search data in the search database corresponding to the search request based on the search constraint information to obtain a representation database composed of the adjusted data representations; querying the representation database for adjusted data representations that match the adjusted search representations, and determining the target search data retrieved from the search database based on the search request based on the queried adjusted data representations.

[0009] This specification also provides a computer program product, including a computer program that, when executed by a processor, implements the following process: receiving a search request for a target object to be searched, and obtaining auxiliary query information for the target object. Information related to the target object in the search request is input into an encoder to obtain a search representation corresponding to the search request, and prompt information generated based on the auxiliary query information is input into a large language model to obtain search constraint information corresponding to the search request. The search representation is adjusted based on the search constraint information to obtain an adjusted search representation, and the data representation corresponding to each search data contained in the search database corresponding to the search request is adjusted based on the search constraint information to obtain a representation database composed of the adjusted data representations. Adjusted data representations matching the adjusted search representations are queried from the representation database, and the target search data retrieved from the search database based on the search request is determined based on the queried adjusted data representations. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is an embodiment of a data retrieval method described in this specification;

[0012] Figure 2 This is a schematic diagram of a data retrieval page as described in this specification;

[0013] Figure 3 This is a schematic diagram of a data retrieval process described in this specification;

[0014] Figure 4 This is a schematic diagram of another data retrieval process described in this specification;

[0015] Figure 5 This is another embodiment of the data retrieval method described in this specification;

[0016] Figure 6 This is a schematic diagram of a model training process as described in this specification;

[0017] Figure 7 This is an embodiment of a data retrieval device described in this specification;

[0018] Figure 8 This is an embodiment of a data retrieval device described in this specification. Detailed Implementation

[0019] This specification provides a data retrieval method, apparatus, and device through its embodiments.

[0020] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.

[0021] This specification provides a data retrieval mechanism. In single-modal or cross-modal data retrieval (specifically, vector retrieval or representation retrieval), the retrieval performance is mainly affected by the effect of the representation model (such as an encoder). Representation learning determines whether the representation space of the target dataset is constructed reasonably, and thus determines the similarity between data. Once the representation space is determined, the retrieval results are basically fixed.

[0022] However, in many application scenarios, retrieval tasks are subject to certain constraints. Take, for example, the case retrieval scenario for batch case discovery in risk control operations. Different batches of cases may employ different risk implementation methods. For instance, a group of batch cases A might exhibit clustering (or high similarity) in terms of device medium but differ in behavioral manifestations. Conversely, another group of batch cases B might show differences in device medium but clustering in behavioral manifestations. In this case, if we disregard "clustering" or "similarity" and only establish a general representation method for conventional data retrieval, the retrieval results may be poor due to information fusion and confusion. Constrained data retrieval aims not merely to find similar data, but to find data similar in certain specific aspects of interest.

[0023] In the field of constrained data retrieval, general strategies can be categorized into two types: one is through changing the retrieval database or modifying the retrieval method, and the other is through modifying the representation space. The latter involves constraining retrieval results by changing the retrieval database and modifying the retrieval method. These methods include, but are not limited to, filtering, optimizing, dynamically updating, and weighting the retrieval database according to rules during the retrieval process, or structuring the constraint information (or constraint conditions) and considering the constraints during the retrieval process. However, these methods are relatively inflexible; whenever a user proposes different constraint information (or constraint conditions), it may be necessary to readjust the retrieval database and retrieval method accordingly.

[0024] Multimodal or cross-modal data retrieval and data augmentation, in practical applications, often involve data composed of multiple modalities (such as text, image, or audio modalities). The challenge of multimodal or cross-modal data retrieval lies in effectively fusing and utilizing information from different modalities while considering the specific constraints of each modality to improve retrieval performance. Another approach is data augmentation, which enhances data representation by introducing additional features or altering the weights of existing features. For example, in vector retrieval with geographic location constraints, geographic location information can be incorporated as an additional feature into the vector representation. The idea behind data augmentation is essentially similar to that of multimodal data retrieval; if a way to group feature categories can be found, different groups can also be considered different modalities. However, both of these methods require human experience or logic to adjust and fuse weights. Furthermore, because the types of modalities are limited, and different application scenarios use different modalities, these methods lack universality and are only effective for specific tasks and application scenarios. Therefore, this specification provides a more flexible data retrieval method, allowing users to constrain the retrieval results using provided constraints and to perform temporary mapping transformations on the representation space without altering the representation model, thereby providing users with retrieval results that better meet their needs. Specific processing details can be found in the following embodiments.

[0025] like Figure 1 As shown in the embodiments of this specification, a data retrieval method is provided. The execution subject of this method can be a terminal device or a server, etc. The terminal device can be a mobile terminal device such as a mobile phone or tablet computer, a computer device such as a laptop or desktop computer, or an IoT device (specifically, a smartwatch, in-vehicle device, etc.). The server can be a single server or a server cluster composed of multiple servers. The server can be a backend server for financial or online shopping services, or a backend server for an application. This embodiment uses a server as the execution subject for detailed explanation. For the case where the execution subject is a terminal device, please refer to the following server-side processing, which will not be repeated here. The method may specifically include the following steps:

[0026] In step S102, a search request for the target object to be searched is received, and auxiliary query information for the target object is obtained.

[0027] The target object can be any object, such as an account, a document code, a mobile phone number, a user's identifier, an image, text data, audio data, video data, etc. The specific details can be set according to the actual situation, and this specification does not limit this. Auxiliary query information can be relevant information used to assist in the accurate retrieval or query of the retrieval request. Auxiliary query information can include various different auxiliary information. For example, the target object can involve multiple different aspects, and the auxiliary query information can include information about some of these aspects. Specifically, if the target object involves three aspects, A, B, and C, the auxiliary query information can include A and B. In practical applications, if the target object involves three aspects, such as IP address, device, and behavioral sequence, the auxiliary query information can be "querying data that is similar to the target object in IP address and device," or "querying data that is similar to the target object in behavioral sequence," etc. The specific details can be set according to the actual situation.

[0028] In implementation, a specific application can be installed on the terminal device. This application can have a search or query page set up, such as... Figure 2 As shown, this page can include input boxes for target object information, an "OK" button, a "Cancel" button, and a search result output box. Additionally, it can include a trigger mechanism for inputting auxiliary query information. When searching for a target object, the user can enter relevant information into the input boxes within the aforementioned application installed on the terminal device. After entering the information, the user clicks the "OK" button. The terminal device then generates a search request for the target object based on the user's input and sends it to the server. The server receives the search request and simultaneously sends a prompt to the terminal device to provide auxiliary query information. If the user needs to provide auxiliary query information, they can trigger the auxiliary query information input mechanism and input the information. This auxiliary query information can be entered in various ways, such as text or voice, depending on the specific requirements. The terminal device then sends the user-provided auxiliary query information to the server, which retrieves the information.

[0029] It should be noted that the above search request is used to request the server to retrieve corresponding data from the search database to obtain the search results corresponding to the search request. If auxiliary query information is not obtained when the search request is received or within a certain period of time after receiving the search request, then the corresponding data needs to be retrieved from the search database through the following steps S104 to S108. If the user does not need to provide auxiliary query information, the server can directly retrieve the corresponding search data from the search database through the search request using common search methods, thereby obtaining the search results corresponding to the search request.

[0030] In step S104, the information related to the target object in the above search request is input into the encoder to obtain the search representation corresponding to the search request, and the prompt information generated based on the auxiliary query information is input into the large language model to obtain the search constraint information corresponding to the search request.

[0031] The encoder can be constructed using various algorithms or networks. For example, it can be built using neural networks (such as recurrent neural networks (RNNs) or convolutional neural networks (CNNs), or using specified algorithms (such as specified data compression algorithms), or using Transformer networks, or using specified mapping algorithms, etc., depending on the specific requirements. The encoder can convert characters into corresponding matrices or vectors (such as embedding vectors), again depending on the specific requirements. Retrieval representations can be presented in various ways, such as as matrices, vectors, or numbers, depending on the specific requirements. Prompts are information that effectively guides the large language model to solve a specific task. Prompts are typically descriptive text (or text converted from speech data), and the large language model adjusts its output based on these prompts to adapt to different task requirements. The large language model can be a large model for a specific natural language, such as ChatGLM or GPT-4, depending on the specific requirements.

[0032] In implementation, the encoder architecture can be pre-built, and corresponding training samples can be obtained. These training samples can consist of data used and generated by different users during data retrieval. Then, the encoder can be trained using these training samples to obtain a trained encoder, which can then encode the input data. For example... Figure 3As shown, after obtaining the retrieval request for the target object through the above method, the retrieval request can be analyzed to extract information related to the target object. The extracted information related to the target object can be input into the encoder, which encodes the information related to the target object to obtain data (which can be a matrix, vector, or numerical value, etc.) that can represent the information related to the target object, i.e., the retrieval representation corresponding to the retrieval request.

[0033] It is possible to obtain a pre-trained large language model. This large language model can be obtained by training it with a large amount of sample data (such as text data in a text dataset), or it can be a pre-trained large language model obtained directly. The specific method can be set according to the actual situation. For example, Figure 3 As shown, after obtaining the auxiliary query information in the above manner, a corresponding prompt can be generated using the auxiliary query information. Then, the prompt can be input into the large language model to obtain the data representation corresponding to the auxiliary query information. The data representation corresponding to the auxiliary query information can be recorded as the auxiliary representation, which can then be used as the retrieval constraint information corresponding to the retrieval request.

[0034] In step S106, the retrieval representation is adjusted based on the retrieval constraint information to obtain the adjusted retrieval representation. Then, based on the retrieval constraint information, the data representation corresponding to each retrieval data contained in the retrieval database corresponding to the above retrieval request is adjusted to obtain a representation database composed of the adjusted data representation.

[0035] The retrieval database can be the database containing the data to be queried. The retrieval database can store information such as the original data (e.g., text data, audio data, video data), the identifier of the original data, the size of the data, the storage time, and the purpose. It can include, for example, the matrix or vector corresponding to the original data, and can be set according to the actual situation.

[0036] In implementation, such as Figure 3As shown, since the search request includes search constraint information, it is necessary to adjust the search representation corresponding to the search request using the search constraint information to ensure that the search representation conforms to the constraint relationship between the search constraint information and the search representation. For example, the search representation is presented in the form of a vector, which is a multi-dimensional vector. By constraining the search representation with the search constraint information, only the vectors of the key dimensions that need to be focused on (i.e., the key dimensions that need to be focused on as determined by the search constraint information) can be retained in the multi-dimensional vector of the search representation. This achieves the adjustment of the search representation. Based on this, the search constraint information and the search representation can be analyzed separately to determine the key dimensions that need to be focused on corresponding to the search constraint information, as well as the vectors corresponding to different dimensions of information in the search representation. Then, only the vectors of the key dimensions that need to be focused on can be retained in the search representation, while the vectors of other dimensions can be deleted, masked, or set to an invalid state, etc. Through the above adjustments, the adjusted search representation can be obtained.

[0037] Correspondingly, since a retrieval request is needed to retrieve the corresponding data from the retrieval database, it is necessary to compare the similarity between the data to be retrieved and the data in the retrieval database. Because the retrieval request includes retrieval constraint information, and the data representation corresponding to each piece of data in the retrieval database often contains multi-dimensional information (which may include many key dimensions that are not relevant), after adjusting the retrieval representation corresponding to the retrieval request, it is also necessary to adjust the data representation corresponding to each piece of data in the retrieval database using the retrieval constraint information. This ensures that the data representation corresponding to each piece of data conforms to the constraint relationship of the retrieval constraint information. Based on this, the data representation corresponding to each piece of data in the retrieval database can be analyzed to determine the vectors corresponding to different dimensions in the data representation corresponding to each piece of data in the retrieval database. Then, only the vectors of the key dimensions that need to be considered in the data representation corresponding to each piece of data in the retrieval database can be retained. Vectors of other dimensions can be deleted, masked, or set to an invalid state, etc. Through the above adjustments, the adjusted data representation corresponding to each piece of data in the retrieval database can be obtained. The adjusted data representations corresponding to multiple pieces of data can constitute a new retrieval database, i.e., a representation database.

[0038] In step S108, the adjusted data representation that matches the adjusted retrieval representation is queried from the representation database, and the target retrieval data retrieved from the retrieval database based on the queried adjusted data representation is determined.

[0039] In implementation, such as Figure 3As shown, since the search data in the retrieval database has been adjusted to the adjusted data representations in the new representation database, subsequent search processing can be performed from the representation database during the actual retrieval process. Specifically, the adjusted search representation can be compared with each adjusted data representation in the representation database to calculate similarity (using cosine similarity algorithm or Euclidean distance algorithm, etc., depending on the actual situation). The similarity between the adjusted search representation and each adjusted data representation in the representation database can be obtained. Based on the obtained similarity, the adjusted data representation that matches the adjusted search representation can be selected. For example, the adjusted data representation corresponding to the maximum similarity can be selected as the adjusted data representation that matches the adjusted search representation. Alternatively, a corresponding threshold can be preset, and the adjusted data representation with a similarity greater than the threshold can be selected as the adjusted data representation that matches the adjusted search representation. Besides matching two representations using the similarity method mentioned above, other methods can also be used. For example, principal component analysis can be used to match two representations, or clustering algorithms can be used to determine the adjusted data representation that matches the adjusted retrieval representation from the representation database. Alternatively, a specified machine learning model (such as a convolutional neural network model or a recurrent neural network model) can be pre-trained to determine the degree of matching between two representations, and then determine the adjusted data representation that matches the adjusted retrieval representation. The specific method can be set according to the actual situation.

[0040] After finding the adjusted data representation that matches the adjusted search representation through the above method, the search data in the corresponding search database can be determined based on the retrieved adjusted data representation. The determined search data can be used as the search result corresponding to the above search request. Based on this, the determined search data can be used as the target search data retrieved in the search database based on the above search request, and can be provided to the searcher or queryer.

[0041] It should be noted that if the retrieved adjusted data representation includes multiple data representations, the search data corresponding to each of the multiple adjusted data representations can be used as the search result (i.e., the target search data) corresponding to the above search request. Alternatively, a specified algorithm can be used to perform corresponding calculations on the multiple adjusted data representations, and based on the calculation results, a portion or one adjusted data representation can be selected from the multiple adjusted data representations. The search data corresponding to the selected portion or one adjusted data representation can be used as the search result (i.e., the target search data) corresponding to the above search request. The specific settings can be configured according to the actual situation.

[0042] This specification provides a data retrieval method. Upon receiving a retrieval request for a target object and obtaining auxiliary query information for that target object, the method inputs the target object-related information from the retrieval request into an encoder to obtain a retrieval representation corresponding to the retrieval request. The method also inputs prompts generated based on the auxiliary query information into a large language model to obtain retrieval constraint information corresponding to the retrieval request. Then, the retrieval representation can be adjusted based on the retrieval constraint information to obtain an adjusted retrieval representation. Furthermore, based on the retrieval constraint information, the data representation corresponding to each retrieval data in the retrieval database corresponding to the retrieval request is adjusted to obtain a representation database composed of adjusted data representations. Finally, the method can query the representation database for adjusted data representations that match the adjusted retrieval representations, and then use the queried adjusted data tables... The method identifies the target retrieval data based on the retrieval request in the retrieval database. This eliminates the need to modify the underlying model (such as the encoder) and the retrieval database. By quantifying the user's needs (i.e., auxiliary query information) through a large language model, the retrieval results are directly controlled. Specifically, a mechanism is introduced that adaptively adjusts the retrieval logic based on the prompt information generated from the user's auxiliary query information. By parsing the prompt information and dynamically adjusting the retrieval process's operational logic or weight allocation without altering the underlying model and retrieval database, the method meets the user's specific needs. This improves the flexibility and scalability of data retrieval, reduces resource consumption, and enhances retrieval efficiency. Furthermore, this method has better versatility and can be applied to different data modalities and specific tasks without requiring manual feature selection or weight adjustment.

[0043] In practical applications, the specific processing methods for adjusting the retrieval representation based on retrieval constraint information in step S106 above can vary. One optional processing method is provided below, such as... Figure 4 As shown, this can specifically include the following: inputting search constraint information and search representation into the condition filter to adjust the search representation based on the search constraint information, thereby obtaining the adjusted search representation.

[0044] Among them, the condition filter can adjust the specified data based on the provided constraints so that the specified data conforms to the constraint relationship of the constraints on the specified data.

[0045] In implementation, retrieval constraint information can be input as constraint conditions into the condition filter. After obtaining the retrieval constraint information, the condition filter can use it as constraint conditions. Simultaneously, retrieval representation can be input as data to be constrained into the condition filter. After obtaining the retrieval representation, the condition filter can use it as data to be constrained. Then, the condition filter can use the constraint conditions to adjust the data to be constrained; that is, the condition filter uses the retrieval constraint information to adjust the retrieval representation, obtaining the adjusted retrieval representation.

[0046] Correspondingly, such as Figure 4 As shown, the specific processing method for adjusting the data representation corresponding to each search data in the search database corresponding to the search request based on the search constraint information in step S106 above, to obtain a representation database composed of the adjusted data representations, may include the following: inputting the search constraint information and the data representation corresponding to each search data in the search database into the condition filter in sequence, so as to adjust the data representation corresponding to each search data in the search database corresponding to the search request based on the search constraint information, and obtain a representation database composed of the adjusted data representations.

[0047] In implementation, retrieval constraint information can be input as constraint conditions into the condition filter. After obtaining the retrieval constraint information, the condition filter can use it as constraint conditions. Simultaneously, the data representation corresponding to each retrieval data in the retrieval database can be input as data to be constrained into the condition filter respectively. Figure 4 In the context of two conditional filters (representing parameter sharing between them), after obtaining the data representation corresponding to each searched data in the search database, the conditional filter can use this data representation as the data to be constrained. Then, the conditional filter can adjust each data to be constrained using the constraints. That is, the conditional filter uses the search constraint information to adjust the data representation corresponding to each searched data in the search database, resulting in multiple adjusted data representations. These multiple adjusted data representations can form a new database, namely, a representation database composed of multiple adjusted data representations.

[0048] In practical applications, the specific processing method for querying the adjusted data representation that matches the adjusted retrieval representation from the representation database in step S108 above can be varied. The following provides another optional processing method, such as... Figure 5 As shown, the process may specifically include the following steps S1082 and S1084.

[0049] In step S1082, the similarity between the adjusted retrieval representation and each adjusted data representation in the representation database is obtained.

[0050] In step S1084, a target similarity greater than a preset threshold is determined from the acquired similarities, and an adjusted data representation that matches the adjusted retrieval representation in the representation database is determined based on the adjusted data representation corresponding to the target similarity.

[0051] The specific processing procedures for steps S1082 and S1084 can be found in the aforementioned related content, and will not be repeated here.

[0052] In practical applications, if the retrieval of the target object does not require auxiliary query information, the user's retrieval request can also be responded to in the following ways, as detailed in steps A2 and A4 below.

[0053] In step A2, if no auxiliary query information is obtained, the target data representation that matches the search representation is queried from the data representation corresponding to each search data contained in the retrieval database.

[0054] In implementation, such as Figure 4 As shown in the dashed section, when a retrieval request for the target object is received, if no auxiliary query information is obtained or the user chooses not to provide auxiliary query information, the information related to the target object in the retrieval request can be input into the encoder to obtain the retrieval representation corresponding to the retrieval request. Then, the target data representation that matches the retrieval representation can be queried from the data representations corresponding to each retrieval data contained in the retrieval database. Specifically, the similarity between the retrieval representation and the data representations corresponding to each retrieval data contained in the retrieval database can be obtained. From the obtained similarity, the similarity greater than a preset similarity threshold is determined, and based on the data representations corresponding to the obtained similarity greater than the preset similarity threshold, the target data representation that matches the retrieval representation is determined.

[0055] In step A4, based on the target data representation obtained from the query, the target retrieval data retrieved from the retrieval database based on the above retrieval request is determined.

[0056] In implementation, the retrieved data corresponding to the target data representation can be used as the target retrieval data retrieved from the retrieval database based on the aforementioned retrieval request. If the retrieved target data representation includes multiple representations, then the retrieval data corresponding to each of the multiple target data representations can be used as the retrieval result (i.e., the target retrieval data) corresponding to the aforementioned retrieval request. Alternatively, a specified algorithm can be used to perform corresponding calculations on the multiple target data representations, and based on the calculation results, a portion or one target data representation can be selected from the multiple target data representations. The retrieval data corresponding to the selected portion or one target data representation can then be used as the retrieval result (i.e., the target retrieval data) corresponding to the aforementioned retrieval request. The specific settings can be configured according to the actual situation.

[0057] In practical applications, the encoder and conditional filter described above can be jointly trained in the following manner, such as... Figure 6 As shown, please refer to steps B02 to B12 below for details.

[0058] In step B02, a first sample pair is obtained, which includes a first training sample and a second training sample. For a first matching metric, the similarity between the first training sample and the second training sample is greater than a first threshold, and for a second matching metric, the similarity between the first training sample and the second training sample is less than a second threshold.

[0059] The first matching metric differs from the second matching metric. Both can be set according to specific circumstances. For example, the first matching metric might include IP address and device, while the second matching metric might include behavioral sequence; or the first matching metric might include behavioral sequence, while the second matching metric might include IP address. The first and second thresholds can also differ, with the first threshold being greater than the second threshold. For the first matching metric, a similarity between the first and second training samples greater than the first threshold indicates a high degree of similarity. For the second matching metric, a similarity between the first and second training samples less than the second threshold indicates a low degree of similarity or complete dissimilarity. The specific settings can be adjusted based on the actual situation.

[0060] In implementation, such as Figure 6 As shown, the first sample pair can be obtained in a variety of different ways. For example, the first sample pair can be obtained from a specified database, or the server can record relevant data when different users perform specified business operations, and the first sample pair can be obtained from the above relevant data. Alternatively, the first sample pair can be obtained from different users through equivalent exchange or other means. The specific method can be set according to the actual situation.

[0061] In step B04, the first training sample and the second training sample are respectively input into the encoder to obtain the first sample representation corresponding to the first training sample and the second sample representation corresponding to the second training sample.

[0062] The encoder can be an untrained encoder. The encoder architecture can be constructed using a specified algorithm and / or machine learning network, and the encoder can be initialized to obtain an initial encoder. Then, the first training sample and the second training sample can be input into the initial encoder respectively to obtain the first sample representation corresponding to the first training sample and the second sample representation corresponding to the second training sample.

[0063] In step B06, a first auxiliary sample generated based on a first matching metric and a second auxiliary sample generated based on a second matching metric are obtained. The first prompt sample generated based on the first auxiliary sample and the second prompt sample generated based on the second auxiliary sample are then input into a pre-trained large language model to obtain a first constraint sample corresponding to the first auxiliary sample and a second constraint sample corresponding to the second auxiliary sample.

[0064] The large language model can be a pre-trained large model obtained directly from a specified database, or it can be a large model obtained by constructing a large language model architecture through a machine learning network and then training the large language model with a large amount of sample data. The specific model can be set according to the actual situation.

[0065] In step B08, the first constraint sample and the first sample representation are input into the condition filter to adjust the first sample representation based on the first constraint sample to obtain the third sample representation. The first constraint sample and the second sample representation are input into the condition filter to adjust the second sample representation based on the first constraint sample to obtain the fourth sample representation.

[0066] In step B10, the second constraint sample and the first sample representation are input into the condition filter to adjust the first sample representation based on the second constraint sample to obtain the fifth sample representation. The second constraint sample and the second sample representation are input into the condition filter to adjust the second sample representation based on the second constraint sample to obtain the sixth sample representation.

[0067] The specific processing procedures for steps B04 to B10 above can be found in the aforementioned related content, and will not be repeated here.

[0068] In step B12, positive sample pairs consisting of the third and fourth sample representations, and negative sample pairs consisting of the fifth and sixth sample representations, are used to perform joint contrastive learning training on the encoder and conditional filter through a preset first loss function to obtain the trained encoder and the trained conditional filter.

[0069] The first loss function can be determined by maximizing the similarity between the third and fourth sample representations and minimizing the similarity between the fifth and sixth sample representations, or it can be determined by other loss functions, which can be set according to the actual situation.

[0070] In implementation, such as Figure 6 As shown, the similarity between the third and fourth sample representations can be calculated, and a corresponding objective function can be determined based on the first loss function. In this embodiment, the objective function can be to maximize the similarity. The parameters in the encoder and conditional filter can be adjusted through the objective function. Furthermore, the similarity between the fifth and sixth sample representations can be calculated, and a corresponding objective function can be determined based on the first loss function. In this embodiment, the objective function can be to minimize the similarity between the fifth and sixth sample representations. The parameters in the encoder and conditional filter can also be adjusted through this objective function. The processing steps B2 to B12 can be repeated to perform joint contrastive learning training on the encoder and conditional filter until the first loss function converges, resulting in the trained encoder and trained conditional filter.

[0071] Furthermore, in cases where auxiliary samples (including first and second auxiliary samples, etc.) are unavailable, the encoder can be trained using the following methods: Figure 6 As shown, please refer to steps C2 to C6 below for details.

[0072] In step C2, a first sample pair is obtained, which includes a first training sample and a second training sample. For a first matching metric, the similarity between the first training sample and the second training sample is greater than a first threshold, and for a second matching metric, the similarity between the first training sample and the second training sample is less than a second threshold.

[0073] In practical applications, when auxiliary samples (including first auxiliary samples and second auxiliary samples, etc.) cannot be obtained, the first training sample and the second training sample in the first sample pair may not need to meet the conditions of the first matching index, that the similarity between the first training sample and the second training sample is greater than the first threshold, and the second matching index, that the similarity between the first training sample and the second training sample is less than the second threshold. That is, in this case, step C2 can be to obtain the first sample pair, which includes the first training sample and the second training sample. The specific settings can be set according to the actual situation.

[0074] In step C4, the first training sample and the second training sample are respectively input into the encoder to obtain the first sample representation corresponding to the first training sample and the second sample representation corresponding to the second training sample.

[0075] In step C6, the encoder is trained using a preset second loss function based on the first sample representation and the second sample representation to obtain the trained encoder.

[0076] The second loss function can be the mean squared error loss function, the cross-entropy loss function, etc., and can be set according to the actual situation.

[0077] In implementation, the first sample representation can be used to perform retrieval processing in the retrieval database to obtain the corresponding retrieval results. The second sample representation can also be used to perform retrieval processing in the retrieval database to obtain the corresponding retrieval results. Based on the retrieval results corresponding to the first and second sample representations, as well as the retrieval label information corresponding to the first and second training samples in the first sample pair, the corresponding loss information can be calculated using the second loss function. The parameters in the encoder can be adjusted using this loss information to train the encoder until the second loss function converges, thus obtaining the trained encoder.

[0078] In practical applications, due to the role of auxiliary samples (or constraint samples, i.e., constraints) and the conditional filter itself, key dimension information is filtered from the input representation based on the information in the prompt (or auxiliary samples). Therefore, as... Figure 6 As shown, an auxiliary loss function can also be added to guide the generation of the above-mentioned MASK-like vectors. For details, please refer to steps D2 to D6 below.

[0079] In step D2, the first matching index contained in the first training sample is masked based on the first auxiliary sample to obtain the masked first training sample.

[0080] In implementation, a mask for the first training sample can be generated based on the first auxiliary sample (or the first prompt sample). The generated mask can be used to mask the first matching indicators contained in the first training sample. The above processing can include various methods. For example, if the first training sample involves three matching indicators A1, B1, and C1, a mask can be generated for masking or occlusion. This mask can be used to mask or occlude one or more matching indicators involved in the first training sample. Specifically, the mask can be used to mask or occlude A1 involved in the first training sample, thus making the matching indicator A1 unknown. Alternatively, a mask can be generated for other data indicators. This mask can be used to replace one or more matching indicators involved in the first training sample. Specifically, A2 in this mask can replace A1 involved in the first training sample, thus making the first training sample involve three matching indicators A2, B1, and C1. Through the above processing, the masked first training sample can be obtained.

[0081] In step D4, the first training sample of the mask is input into the encoder to obtain the seventh sample representation corresponding to the first training sample of the mask.

[0082] In step D6, the encoder and / or conditional filter are jointly trained based on the third sample representation and the seventh sample representation using a preset third loss function.

[0083] The third loss function can be determined by maximizing the similarity between the third sample representation and the seventh sample representation, or it can be determined by other loss functions, which can be set according to the actual situation.

[0084] In implementation, before step D6, it is also necessary to input the first training sample into the encoder to obtain the first sample representation corresponding to the first training sample, obtain the first auxiliary sample generated based on the first matching index, input the first prompt sample generated based on the first auxiliary sample into the pre-trained large language model to obtain the first constraint sample corresponding to the first auxiliary sample, and input the first constraint sample and the first sample representation into the condition filter to adjust the first sample representation based on the first constraint sample to obtain the third sample representation. According to the assumption, the seventh sample representation generated by the encoder from the first training sample of the mask should be as consistent as possible with the third sample representation generated by the first sample representation of the first training sample without masking and then filtered by the conditional filter. In this way, it can be ensured that the representation space of the first sample representation corresponding to the first training sample is the same regardless of whether it has been filtered by the conditional filter. Based on this, the similarity between the third sample representation and the seventh sample representation can be calculated, and the corresponding objective function can be determined based on the third loss function. In this embodiment, the objective function can be to maximize the above similarity. The parameters in the encoder and the conditional filter can be adjusted through the objective function. The above process can be repeated to train the encoder and / or the conditional filter until the third loss function converges, and the trained encoder and / or the trained conditional filter is obtained.

[0085] To enable feedback and continuous optimization of search results, an interactive search mode can be set up, as detailed in steps E2 and E4 below.

[0086] In step E2, user feedback information on the target search data is obtained. The feedback information includes one or more of the following: satisfaction information, click behavior information, and preset instructions.

[0087] In step E4, a retrieval strategy for the object to be retrieved is generated based on the feedback information, and the currently used retrieval process is adjusted based on the generated retrieval strategy.

[0088] The retrieval strategy can include various approaches, such as input strategies for auxiliary query information (e.g., which keywords should be included in the auxiliary query information), strategies for generating prompt information, strategies for constructing retrieval constraint information, strategies for selecting large language models, strategies for selecting and optimizing condition filters, and strategies for matching representations. The specific strategy can be set according to the actual situation. The current retrieval processing procedure can be as described in steps S102 to S108 above.

[0089] The interactive retrieval process in steps E2 and E4 naturally integrates the manual retrieval evaluation into the entire process. In this way, the current retrieval process can be gradually adjusted and optimized based on user feedback such as satisfaction with the search results, click behavior, and further instructions, thereby improving the accuracy of the search results and user satisfaction.

[0090] This specification provides a data retrieval method. Upon receiving a retrieval request for a target object and obtaining auxiliary query information for that target object, the method inputs the target object-related information from the retrieval request into an encoder to obtain a retrieval representation corresponding to the retrieval request. The method also inputs prompts generated based on the auxiliary query information into a large language model to obtain retrieval constraint information corresponding to the retrieval request. Then, the retrieval representation can be adjusted based on the retrieval constraint information to obtain an adjusted retrieval representation. Furthermore, based on the retrieval constraint information, the data representation corresponding to each retrieval data in the retrieval database corresponding to the retrieval request is adjusted to obtain a representation database composed of adjusted data representations. Finally, the method can query the representation database for adjusted data representations that match the adjusted retrieval representations, and then use the queried adjusted data tables... The method identifies the target retrieval data based on the retrieval request in the retrieval database. This eliminates the need to modify the underlying model (such as the encoder) and the retrieval database. By quantifying the user's needs (i.e., auxiliary query information) through a large language model, the retrieval results are directly controlled. Specifically, a mechanism is introduced that adaptively adjusts the retrieval logic based on the prompt information generated from the user's auxiliary query information. By parsing the prompt information and dynamically adjusting the retrieval process's operational logic or weight allocation without altering the underlying model and retrieval database, the method meets the user's specific needs. This improves the flexibility and scalability of data retrieval, reduces resource consumption, and enhances retrieval efficiency. Furthermore, this method has better versatility and can be applied to different data modalities and specific tasks without requiring manual feature selection or weight adjustment.

[0091] Furthermore, by leveraging the understanding capabilities of large language models and the contrastive learning paradigm, a mapping relationship is formed between the natural language auxiliary query information input by users and the features. In addition, through the interactive retrieval process, user feedback information is collected, and the current retrieval process is gradually adjusted and optimized based on user satisfaction with the results, click behavior, further instructions, and other feedback information, thereby improving the accuracy of retrieval results and user satisfaction.

[0092] The above describes the data retrieval method provided in the embodiments of this specification. Based on the same idea, the embodiments of this specification also provide a data retrieval device, such as... Figure 7 As shown.

[0093] The data retrieval device includes: a request module 701, an encoding module 702, a characterization adjustment module 703, and a retrieval module 704, wherein:

[0094] The request module 701 receives a search request for a target object to be searched and obtains auxiliary query information for the target object;

[0095] The encoding module 702 inputs the information related to the target object in the retrieval request into the encoder to obtain the retrieval representation corresponding to the retrieval request, and inputs the prompt information generated based on the auxiliary query information into the large language model to obtain the retrieval constraint information corresponding to the retrieval request;

[0096] The characterization adjustment module 703 adjusts the retrieval characterization based on the retrieval constraint information to obtain the adjusted retrieval characterization, and adjusts the data characterization corresponding to each retrieval data contained in the retrieval database corresponding to the retrieval request based on the retrieval constraint information to obtain a characterization database composed of the adjusted data characterization.

[0097] The retrieval module 704 queries the representation database for adjusted data representations that match the adjusted retrieval representations, and determines the target retrieval data retrieved from the retrieval database based on the retrieval request, based on the retrieved adjusted data representations.

[0098] In the embodiments of this specification, the characterization adjustment module 703 includes:

[0099] The retrieval representation adjustment unit inputs the retrieval constraint information and the retrieval representation into the condition filter to adjust the retrieval representation based on the retrieval constraint information, thereby obtaining the adjusted retrieval representation;

[0100] The data representation adjustment unit sequentially inputs the retrieval constraint information and the data representation corresponding to each retrieval data contained in the retrieval database into the condition filter, so as to adjust the data representation corresponding to each retrieval data contained in the retrieval database corresponding to the retrieval request based on the retrieval constraint information, thereby obtaining a representation database composed of the adjusted data representations.

[0101] In this embodiment of the specification, the retrieval module 704 includes:

[0102] The similarity acquisition unit acquires the similarity between the adjusted retrieval representation and each adjusted data representation in the representation database.

[0103] The query unit determines a target similarity greater than a preset threshold from the acquired similarities, and determines an adjusted data representation in the representation database that matches the adjusted retrieval representation based on the adjusted data representation corresponding to the target similarity.

[0104] In the embodiments described in this specification, the device further includes:

[0105] If the auxiliary query information is not obtained, the query module queries the target data representation that matches the search representation from the data representation corresponding to each search data contained in the search database.

[0106] The result determination module determines the target retrieval data retrieved from the retrieval database based on the target data representation obtained from the query.

[0107] In the embodiments described in this specification, the device further includes:

[0108] The sample acquisition module acquires a first sample pair, which includes a first training sample and a second training sample. For a first matching metric, the similarity between the first training sample and the second training sample is greater than a first threshold, and for a second matching metric, the similarity between the first training sample and the second training sample is less than a second threshold.

[0109] The sample encoding module inputs the first training sample and the second training sample into the encoder respectively to obtain the first sample representation corresponding to the first training sample and the second sample representation corresponding to the second training sample.

[0110] The constraint sample determination module obtains a first auxiliary sample generated based on the first matching index and a second auxiliary sample generated based on the second matching index, and inputs a first prompt sample generated based on the first auxiliary sample and a second prompt sample generated based on the second auxiliary sample into a pre-trained large language model to obtain a first constraint sample corresponding to the first auxiliary sample and a second constraint sample corresponding to the second auxiliary sample.

[0111] The first conditional filtering module inputs the first constraint sample and the first sample representation into the conditional filter to adjust the first sample representation based on the first constraint sample to obtain a third sample representation. The first constraint sample and the second sample representation are input into the conditional filter to adjust the second sample representation based on the first constraint sample to obtain a fourth sample representation.

[0112] The second conditional filtering module inputs the second constraint sample and the first sample representation into the conditional filter to adjust the first sample representation based on the second constraint sample to obtain a fifth sample representation. The second constraint sample and the second sample representation are then input into the conditional filter to adjust the second sample representation based on the second constraint sample to obtain a sixth sample representation.

[0113] The first training module performs joint contrastive learning training on the encoder and the conditional filter using a preset first loss function, with positive sample pairs consisting of the third and fourth sample representations and negative sample pairs consisting of the fifth and sixth sample representations, respectively, to obtain the trained encoder and the trained conditional filter.

[0114] In the embodiments described in this specification, the device further includes:

[0115] The second training module trains the encoder based on the first sample representation and the second sample representation using a preset second loss function to obtain the trained encoder.

[0116] In the embodiments described in this specification, the device further includes:

[0117] The masking module performs masking processing on the first matching index contained in the first training sample based on the first auxiliary sample to obtain the first training sample with the mask.

[0118] The mask encoding module inputs the first training sample of the mask into the encoder to obtain the seventh sample representation corresponding to the first training sample of the mask;

[0119] The third training module, based on the third sample representation and the seventh sample representation, performs joint training on the encoder and / or the conditional filter using a preset third loss function.

[0120] In the embodiments described in this specification, the device further includes:

[0121] The feedback information acquisition module acquires user feedback information on the target search data. The feedback information includes one or more of the following: satisfaction information, click behavior information, and preset instructions.

[0122] The retrieval process adjustment module generates a retrieval strategy for the object to be retrieved based on the feedback information, and adjusts the currently used retrieval process based on the generated retrieval strategy.

[0123] This specification provides a data retrieval device. Upon receiving a retrieval request for a target object and obtaining auxiliary query information for that target object, the device inputs information related to the target object from the retrieval request into an encoder to obtain a retrieval representation corresponding to the retrieval request. It then inputs prompt information generated based on the auxiliary query information into a large language model to obtain retrieval constraint information corresponding to the retrieval request. Next, the retrieval representation can be adjusted based on the retrieval constraint information to obtain an adjusted retrieval representation. Furthermore, based on the retrieval constraint information, the data representation corresponding to each retrieval data in the retrieval database corresponding to the retrieval request is adjusted to obtain a representation database composed of adjusted data representations. Finally, the device can query the representation database for adjusted data representations that match the adjusted retrieval representations, and then use the queried adjusted data tables... The method identifies the target retrieval data based on the retrieval request in the retrieval database. This eliminates the need to modify the underlying model (such as the encoder) and the retrieval database. By quantifying the user's needs (i.e., auxiliary query information) through a large language model, the retrieval results are directly controlled. Specifically, a mechanism is introduced that adaptively adjusts the retrieval logic based on the prompt information generated from the user's auxiliary query information. By parsing the prompt information and dynamically adjusting the retrieval process's operational logic or weight allocation without altering the underlying model and retrieval database, the method meets the user's specific needs. This improves the flexibility and scalability of data retrieval, reduces resource consumption, and enhances retrieval efficiency. Furthermore, this method has better versatility and can be applied to different data modalities and specific tasks without requiring manual feature selection or weight adjustment.

[0124] Furthermore, by leveraging the understanding capabilities of large language models and the contrastive learning paradigm, a mapping relationship is formed between the natural language auxiliary query information input by users and the features. In addition, through the interactive retrieval process, user feedback information is collected, and the current retrieval process is gradually adjusted and optimized based on user satisfaction with the results, click behavior, further instructions, and other feedback information, thereby improving the accuracy of retrieval results and user satisfaction.

[0125] The above are the data retrieval devices provided in the embodiments of this specification. Based on the same idea, the embodiments of this specification also provide a data retrieval device, such as... Figure 8 As shown.

[0126] The data retrieval device can provide terminal devices or servers, etc., for the above embodiments.

[0127] Data retrieval devices can vary significantly due to differences in configuration or performance. They may include one or more processors 801 and memory 802, with memory 802 storing one or more application programs or data. Memory 802 can be temporary or persistent storage. The application programs stored in memory 802 may include one or more modules (not shown), each module including a series of computer-executable instructions for the data retrieval device. Furthermore, processor 801 may be configured to communicate with memory 802, executing the series of computer-executable instructions stored in memory 802 on the data retrieval device. The data retrieval device may also include one or more power supplies 803, one or more wired or wireless network interfaces 804, one or more input / output interfaces 805, and one or more keyboards 806.

[0128] Specifically, in this embodiment, the data retrieval device includes a memory and one or more programs, wherein one or more programs are stored in the memory, and one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the data retrieval device, and is configured to be executed by one or more processors. The one or more programs include computer-executable instructions for performing the following:

[0129] Receive a search request for a target object to be searched, and obtain auxiliary query information for the target object;

[0130] The information related to the target object in the retrieval request is input into the encoder to obtain the retrieval representation corresponding to the retrieval request, and the prompt information generated based on the auxiliary query information is input into the large language model to obtain the retrieval constraint information corresponding to the retrieval request.

[0131] The search representation is adjusted based on the search constraint information to obtain the adjusted search representation. Then, the data representation corresponding to each search data contained in the search database corresponding to the search request is adjusted based on the search constraint information to obtain a representation database composed of the adjusted data representations.

[0132] The system queries the representation database for adjusted data representations that match the adjusted retrieval representations, and determines the target retrieval data retrieved from the retrieval database based on the retrieved adjusted data representations.

[0133] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the data retrieval device embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0134] This specification provides a data retrieval device. Upon receiving a retrieval request for a target object and obtaining auxiliary query information for that target object, the device inputs information related to the target object from the retrieval request into an encoder to obtain a retrieval representation corresponding to the retrieval request. It then inputs prompt information generated based on the auxiliary query information into a large language model to obtain retrieval constraint information corresponding to the retrieval request. The retrieval representation can then be adjusted based on the retrieval constraint information to obtain an adjusted retrieval representation. Furthermore, based on the retrieval constraint information, the data representation corresponding to each retrieval data in the retrieval database corresponding to the retrieval request is adjusted to obtain a representation database composed of adjusted data representations. Finally, the device can query the representation database for adjusted data representations that match the adjusted retrieval representations, and then use the queried adjusted data tables... The method identifies the target retrieval data based on the retrieval request in the retrieval database. This eliminates the need to modify the underlying model (such as the encoder) and the retrieval database. By quantifying the user's needs (i.e., auxiliary query information) through a large language model, the retrieval results are directly controlled. Specifically, a mechanism is introduced that adaptively adjusts the retrieval logic based on the prompt information generated from the user's auxiliary query information. By parsing the prompt information and dynamically adjusting the retrieval process's operational logic or weight allocation without altering the underlying model and retrieval database, the method meets the user's specific needs. This improves the flexibility and scalability of data retrieval, reduces resource consumption, and enhances retrieval efficiency. Furthermore, this method has better versatility and can be applied to different data modalities and specific tasks without requiring manual feature selection or weight adjustment.

[0135] Furthermore, based on the above Figures 1 to 6 The method shown in this specification, along with one or more embodiments, also provides a storage medium for storing computer-executable instruction information. In one specific embodiment, the storage medium can be a USB flash drive, optical disc, hard disk, etc. When the computer-executable instruction information stored in the storage medium is executed by a processor, it can achieve the following process:

[0136] Receive a search request for a target object to be searched, and obtain auxiliary query information for the target object;

[0137] The information related to the target object in the retrieval request is input into the encoder to obtain the retrieval representation corresponding to the retrieval request, and the prompt information generated based on the auxiliary query information is input into the large language model to obtain the retrieval constraint information corresponding to the retrieval request.

[0138] The search representation is adjusted based on the search constraint information to obtain the adjusted search representation. Then, the data representation corresponding to each search data contained in the search database corresponding to the search request is adjusted based on the search constraint information to obtain a representation database composed of the adjusted data representations.

[0139] The system queries the representation database for adjusted data representations that match the adjusted retrieval representations, and determines the target retrieval data retrieved from the retrieval database based on the retrieved adjusted data representations.

[0140] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the above-described storage medium embodiment is basically similar to the method embodiment, so the description is relatively simple; relevant parts can be referred to the description of the method embodiment.

[0141] This specification provides a storage medium that, upon receiving a retrieval request for a target object and obtaining auxiliary query information for the target object, inputs the target object-related information from the retrieval request into an encoder to obtain a retrieval representation corresponding to the retrieval request. It then inputs prompt information generated based on the auxiliary query information into a large language model to obtain retrieval constraint information corresponding to the retrieval request. The retrieval representation can then be adjusted based on the retrieval constraint information to obtain an adjusted retrieval representation. Furthermore, based on the retrieval constraint information, the data representation corresponding to each retrieval data in the retrieval database corresponding to the retrieval request is adjusted to obtain a representation database composed of adjusted data representations. Finally, the adjusted data representation matching the adjusted retrieval representation can be queried from the representation database, and the queried adjusted data representation can be used as the basis for further processing. This approach determines the target retrieval data retrieved from the retrieval database based on the retrieval request. This eliminates the need to modify the underlying model (such as the encoder) and the retrieval database. By quantifying the user's needs (i.e., auxiliary query information) through a large language model, the retrieval results are directly controlled. Specifically, a mechanism is introduced that adaptively adjusts the retrieval logic based on the prompt information generated from the user's auxiliary query information. By parsing the prompt information and dynamically adjusting the retrieval process's operational logic or weight allocation without altering the underlying model and retrieval database, the system meets the user's specific needs. This improves the flexibility and scalability of data retrieval, reduces resource consumption, and enhances retrieval efficiency. Furthermore, this method has better versatility and can be applied to different data modalities and specific tasks without requiring manual feature selection or importance weight adjustment.

[0142] Furthermore, based on the above Figures 1 to 6 The method shown in this specification, along with one or more embodiments, also provides a computer program product including a computer program that, when executed by a processor, performs the following process:

[0143] Receive a search request for a target object to be searched, and obtain auxiliary query information for the target object;

[0144] The information related to the target object in the retrieval request is input into the encoder to obtain the retrieval representation corresponding to the retrieval request, and the prompt information generated based on the auxiliary query information is input into the large language model to obtain the retrieval constraint information corresponding to the retrieval request.

[0145] The search representation is adjusted based on the search constraint information to obtain the adjusted search representation. Then, the data representation corresponding to each search data contained in the search database corresponding to the search request is adjusted based on the search constraint information to obtain a representation database composed of the adjusted data representations.

[0146] The system queries the representation database for adjusted data representations that match the adjusted retrieval representations, and determines the target retrieval data retrieved from the retrieval database based on the retrieved adjusted data representations.

[0147] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the above-described embodiment of a computer program product is relatively simple in description because it is fundamentally similar to the method embodiment; relevant parts can be referred to the description of the method embodiment.

[0148] This specification provides a computer program product that, upon receiving a search request for a target object and obtaining auxiliary query information for the target object, inputs the information related to the target object in the search request into an encoder to obtain a search representation corresponding to the search request. It then inputs prompt information generated based on the auxiliary query information into a large language model to obtain search constraint information corresponding to the search request. Next, the search representation can be adjusted based on the search constraint information to obtain an adjusted search representation. Furthermore, based on the search constraint information, the data representation corresponding to each search data in the search database corresponding to the search request is adjusted to obtain a representation database composed of adjusted data representations. Finally, the adjusted data representation matching the adjusted search representation can be queried from the representation database, and the adjusted data representation can be used as a basis for further processing. The method identifies the target retrieval data based on the retrieval request in the retrieval database. This eliminates the need to modify the underlying model (such as the encoder) and the retrieval database. By quantifying the user's needs (i.e., auxiliary query information) through a large language model, the retrieval results are directly controlled. Specifically, a mechanism is introduced that adaptively adjusts the retrieval logic based on the prompt information generated from the user's auxiliary query information. By parsing the prompt information and dynamically adjusting the retrieval process's operational logic or weight allocation without altering the underlying model and retrieval database, the method meets the user's specific needs. This improves the flexibility and scalability of data retrieval, reduces resource consumption, and enhances retrieval efficiency. Furthermore, this method has better versatility and can be applied to different data modalities and specific tasks without requiring manual feature selection or weight adjustment.

[0149] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0150] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must also be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0151] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0152] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0153] For ease of description, the above apparatus is described by dividing it into various functional units. Of course, when implementing one or more embodiments of this specification, the functions of each unit can be implemented in one or more software and / or hardware.

[0154] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, one or more embodiments of this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0155] Embodiments in this specification are described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable parallel device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable parallel device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0156] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable fraud device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0157] These computer program instructions can also be loaded onto a computer or other programmable device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable device for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0158] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0159] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0160] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0161] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0162] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, one or more embodiments of this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0163] One or more embodiments of this specification can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a particular task or implement a particular abstract data type. One or more embodiments of this specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0164] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0165] The above description is merely an embodiment of this specification and is not intended to limit this document. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.

Claims

1. A data retrieval method, the method comprising: Receive a search request for a target object to be searched, and obtain auxiliary query information for the target object; The information related to the target object in the retrieval request is input into the encoder to obtain the retrieval representation corresponding to the retrieval request, and the prompt information generated based on the auxiliary query information is input into the large language model to obtain the retrieval constraint information corresponding to the retrieval request. The search representation is adjusted based on the search constraint information to obtain an adjusted search representation. The search representation is then adjusted using the search constraint information to ensure that it conforms to the constraint relationship of the search constraint information. Furthermore, the data representation corresponding to each search data in the search database corresponding to the search request is adjusted based on the search constraint information to obtain a representation database composed of the adjusted data representations. The data representation corresponding to each search data in the search database is then adjusted using the search constraint information to ensure that the data representation corresponding to each search data conforms to the constraint relationship of the search constraint information. The system queries the representation database for adjusted data representations that match the adjusted retrieval representations, and determines the target retrieval data retrieved from the retrieval database based on the retrieved adjusted data representations.

2. The method according to claim 1, wherein adjusting the retrieval representation based on the retrieval constraint information to obtain the adjusted retrieval representation includes: The search constraint information and the search representation are input into the condition filter to adjust the search representation based on the search constraint information, thereby obtaining the adjusted search representation; The step of adjusting the data representation corresponding to each search data in the search database corresponding to the search request based on the search constraint information to obtain a representation database composed of the adjusted data representations includes: The retrieval constraint information and the data representation corresponding to each retrieval data contained in the retrieval database are sequentially input into the condition filter, so as to adjust the data representation corresponding to each retrieval data contained in the retrieval database corresponding to the retrieval request based on the retrieval constraint information, thereby obtaining a representation database composed of the adjusted data representation.

3. The method according to claim 1, wherein querying the representation database for an adjusted data representation that matches the adjusted retrieval representation comprises: Obtain the similarity between the adjusted retrieval representation and each adjusted data representation in the representation database; From the acquired similarities, a target similarity greater than a preset threshold is determined, and based on the adjusted data representation corresponding to the target similarity, an adjusted data representation that matches the adjusted retrieval representation in the representation database is determined.

4. The method according to claim 1, further comprising: If the auxiliary query information is not obtained, then the target data representation that matches the search representation is queried from the data representation corresponding to each search data contained in the search database; Based on the target data representation obtained from the query, the target retrieval data retrieved from the retrieval database based on the retrieval request is determined.

5. The method according to claim 2, further comprising: Obtain a first sample pair, which includes a first training sample and a second training sample. For a first matching metric, the similarity between the first training sample and the second training sample is greater than a first threshold. For a second matching metric, the similarity between the first training sample and the second training sample is less than a second threshold. The first training sample and the second training sample are respectively input into the encoder to obtain the first sample representation corresponding to the first training sample and the second sample representation corresponding to the second training sample. Obtain a first auxiliary sample generated based on the first matching index and a second auxiliary sample generated based on the second matching index, and input the first prompt sample generated based on the first auxiliary sample and the second prompt sample generated based on the second auxiliary sample into a pre-trained large language model to obtain a first constraint sample corresponding to the first auxiliary sample and a second constraint sample corresponding to the second auxiliary sample. The first constraint sample and the first sample representation are input into the condition filter to adjust the first sample representation based on the first constraint sample to obtain the third sample representation. The first constraint sample and the second sample representation are input into the condition filter to adjust the second sample representation based on the first constraint sample to obtain the fourth sample representation. The second constraint sample and the first sample representation are input into the condition filter to adjust the first sample representation based on the second constraint sample to obtain the fifth sample representation. The second constraint sample and the second sample representation are input into the condition filter to adjust the second sample representation based on the second constraint sample to obtain the sixth sample representation. The encoder and the conditional filter are jointly trained by comparative learning using a preset first loss function, with positive sample pairs consisting of the third and fourth sample representations and negative sample pairs consisting of the fifth and sixth sample representations respectively.

6. The method according to claim 5, further comprising: Based on the first sample representation and the second sample representation, the encoder is trained using a preset second loss function to obtain the trained encoder.

7. The method according to claim 6, further comprising: The first matching index contained in the first training sample is masked based on the first auxiliary sample to obtain the masked first training sample. The first training sample of the mask is input into the encoder to obtain the seventh sample representation corresponding to the first training sample of the mask; Based on the third sample representation and the seventh sample representation, the encoder and / or the conditional filter are jointly trained using a preset third loss function.

8. The method according to any one of claims 1-7, wherein the method further comprises: Obtain user feedback information on the target search data, the feedback information including one or more of satisfaction information, click behavior information, and preset instructions; Based on the feedback information, a retrieval strategy is generated for the target object to be retrieved, and the currently used retrieval process is adjusted based on the generated retrieval strategy.

9. A data retrieval device, the device comprising: The request module receives a search request for a target object to be searched and obtains auxiliary query information for the target object. The encoding module inputs the information related to the target object in the retrieval request into the encoder to obtain the retrieval representation corresponding to the retrieval request, and inputs the prompt information generated based on the auxiliary query information into the large language model to obtain the retrieval constraint information corresponding to the retrieval request; The representation adjustment module adjusts the retrieval representation based on the retrieval constraint information to obtain an adjusted retrieval representation. It then uses the retrieval constraint information to further adjust the retrieval representation so that it conforms to the constraint relationship of the retrieval constraint information. Finally, based on the retrieval constraint information, it adjusts the data representation corresponding to each retrieval data in the retrieval database corresponding to the retrieval request to obtain a representation database composed of adjusted data representations. Finally, it uses the retrieval constraint information to adjust the data representation corresponding to each retrieval data in the retrieval database so that the data representation corresponding to each retrieval data conforms to the constraint relationship of the retrieval constraint information. The retrieval module queries the representation database for adjusted data representations that match the adjusted retrieval representations, and determines the target retrieval data retrieved from the retrieval database based on the retrieved adjusted data representations.

10. A data retrieval device, the data retrieval device comprising: processor; as well as A memory configured to store computer-executable instructions, which, when executed, cause the processor to: Receive a search request for a target object to be searched, and obtain auxiliary query information for the target object; The information related to the target object in the retrieval request is input into the encoder to obtain the retrieval representation corresponding to the retrieval request, and the prompt information generated based on the auxiliary query information is input into the large language model to obtain the retrieval constraint information corresponding to the retrieval request. The search representation is adjusted based on the search constraint information to obtain an adjusted search representation. The search representation is then adjusted using the search constraint information to ensure that it conforms to the constraint relationship of the search constraint information. Furthermore, the data representation corresponding to each search data in the search database corresponding to the search request is adjusted based on the search constraint information to obtain a representation database composed of the adjusted data representations. The data representation corresponding to each search data in the search database is then adjusted using the search constraint information to ensure that the data representation corresponding to each search data conforms to the constraint relationship of the search constraint information. The system queries the representation database for adjusted data representations that match the adjusted retrieval representations, and determines the target retrieval data retrieved from the retrieval database based on the retrieved adjusted data representations.

Citation Information

Patent Citations

  • Retrieval method and device, electronic equipment, readable storage medium and product

    CN115700532A

  • Data retrieval method and device, processor and electronic equipment

    CN117009599A