Data retrieval method, and training method and device for deep learning model

The data retrieval method uses semantic and keyword-based deep learning models to enhance search accuracy in specialized systems, enabling non-experts to find relevant information by understanding the meaning of their queries, thus improving the usability of search systems.

JP2024170652AInactive Publication Date: 2024-12-10BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
JP2024160799
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-08
Filing Date
2024-09-18
Publication Date
2024-12-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Current search systems require users to be familiar with the content of the text to perform accurate searches, making it difficult for non-experts to find relevant information, especially in specialized fields like legal provisions.

Method used

A data retrieval method that identifies candidate texts using both semantic information and keyword information from a query, combined with a deep learning model training process to enhance search accuracy by utilizing two-tower models for semantic and keyword-based text recall, followed by fine sorting to select the target text.

Benefits of technology

Improves search accuracy by allowing non-experts to find relevant information based on the meaning of their queries, reducing the need for precise keywords and enhancing the usability of specialized search systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024170652000001_ABST
    Figure 2024170652000001_ABST
Patent Text Reader

Abstract

To provide a data retrieval method, a training method and device for a deep learning model, an electric apparatus, a storage medium and a computer program product which identify a target text based on word meaning information and keyword information in a query item.SOLUTION: A data retrieval method identifies M candidate texts from a text library based on word meaning information in a query item to be processed, where M is an integer greater than or equal to 1. The method also identifies N candidate texts from the text library based on keyword information in the query item to be processed, where N is an integer greater than or equal to 1. The method further identifies at least one target text based on the M candidate texts and on the N candidate texts.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to natural language processing and deep learning technology. More specifically, the present disclosure provides a data search method, a deep learning model training method, an apparatus, an electronic device, a storage medium and a computer program product. [Background technology]

[0002] Current search systems require users to perform precise or fuzzy searches based on some content in texts, such as legal provisions and documents, etc. Such search methods require users to be familiar with what content is contained in the text and to use keywords of these contents as search expressions to perform searches.

[0003] However, if a user is not familiar with the text content, the keywords used may not be precise enough to allow the user to find the relevant content. Summary of the Invention [Problem to be solved by the invention]

[0004] The present disclosure provides a data searching method, a deep learning model training method, an apparatus, an electronic device, a storage medium, and a computer program product. [Means for solving the problem]

[0005] According to a first aspect, there is provided a data retrieval method, the method comprising: identifying M candidate texts from a text library based on semantic information in a query item to be processed, where M is an integer equal to or greater than 1, identifying N candidate texts from a text library based on keyword information in the query item to be processed, where N is an integer equal to or greater than 1, and identifying at least one target text based on the M candidate texts and the N candidate texts.

[0006] According to a second aspect, there is provided a method for training a deep learning model including a query processing sub-model and a text processing sub-model, the method including: identifying positive example text and negative example text of a sample query item; processing the sample query item using the query processing sub-model to obtain semantic features of the sample query item; processing the positive example text and the negative example text using the text processing sub-model to obtain features of the positive example text and features of the negative example text; determining a similarity between the sample query item and each of the positive example text and the negative example text based on the semantic features, the features of the positive example text, and the features of the negative example text; determining a loss of the deep learning model based on the similarity; and adjusting parameters of the deep learning model based on the loss.

[0007] According to a third aspect, there is provided a data search apparatus, the apparatus including: a first candidate text identification module for identifying M (M is an integer equal to or greater than 1) candidate texts from a text library based on semantic information in a query item to be processed; a second candidate text identification module for identifying N (N is an integer equal to or greater than 1) candidate texts from the text library based on keyword information in the query item to be processed; and a target text identification module for identifying at least one target text based on the M candidate texts and the N candidate texts.

[0008] According to a fourth aspect, there is provided an apparatus for training a deep learning model including a query processing sub-model and a text processing sub-model, the apparatus including: a sample identification module for identifying positive example text and negative example text of a sample query item; a query processing module for processing the sample query item using the query processing sub-model to obtain semantic features of the sample query item; a text processing module for processing the positive example text and the negative example text using the text processing sub-model to obtain features of the positive example text and features of the negative example text; a similarity identification module for identifying a similarity between the sample query item and each of the positive example text and the negative example text based on the semantic features, the features of the positive example text, and the features of the negative example text; a loss identification module for identifying a loss of the deep learning model based on the similarity; and an adjustment module for adjusting parameters of the deep learning model based on the loss.

[0009] According to a fifth aspect, there is provided an electronic device comprising at least one processor and a memory communicatively connected to the at least one processor, the memory storing instructions executable by the at least one processor, the instructions being executed by the at least one processor such that the at least one processor can perform a method provided by the present disclosure.

[0010] According to a sixth aspect, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform a method provided by the present disclosure.

[0011] According to a seventh aspect, there is provided a computer program product including a computer program stored in at least one of a readable storage medium and an electronic device, the computer program realizing a method provided by the present disclosure when executed by a processor.

[0012] It should be understood that the contents described in this section are not intended to depict key points or important features of the embodiments of the present disclosure, and are not intended to limit the scope of the present disclosure. Other features of the present disclosure will be readily understood from the following description.

[0013] The drawings are provided for a better understanding of the invention and are not intended to limit the disclosure. [Brief description of the drawings]

[0014] [Figure 1] FIG. 1 is a schematic diagram of an exemplary system architecture to which at least one of a data searching method and a deep learning model training method according to an embodiment of the present disclosure can be applied. [Diagram 2] FIG. 2 is a flow chart of a data retrieval method according to one embodiment of the present disclosure. [Diagram 3] FIG. 3 is a schematic diagram of a data searching method according to an embodiment of the present disclosure. [Figure 4] FIG. 4 is a schematic diagram of a deep learning model according to one embodiment of the present disclosure. [Diagram 5] FIG. 5 is a schematic diagram of a deep learning model according to another embodiment of the present disclosure. [Figure 6] FIG. 6 is a schematic diagram of a deep learning model according to another embodiment of the present disclosure. [Figure 7] FIG. 7 is a flowchart of a method for training a deep learning model according to one embodiment of the present disclosure. [Figure 8] FIG. 8 is a block diagram of a data search device according to an embodiment of the present disclosure. [Figure 9] FIG. 9 is a block diagram of a deep learning model training apparatus according to one embodiment of the present disclosure. [Figure 10] FIG. 10 is a block diagram of at least one electronic device for a data searching method and a deep learning model training method according to one embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0015] Hereinafter, exemplary embodiments of the present disclosure will be described with reference to the drawings. Hereinafter, various details of the embodiments of the present disclosure are included for easier understanding, and they should be considered as examples. Therefore, it should be understood that a person skilled in the art can make various changes and modifications to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for clarity and conciseness, the following description omits descriptions of well-known functions and configurations.

[0016] Some specialized search systems store texts containing specialized knowledge. These search systems can only provide convenient services to users who are familiar with the specialized knowledge, and are difficult for non-experts to use.

[0017] For example, with the popularity of laws, the demand for legal counseling is increasing. A conventional legal article search system stores all legal texts. Users can perform precise or fuzzy searches based on the content of a portion of legal articles in the system, or can directly view the entire legal text.

[0018] However, in the conventional legal article search system, only legal experts such as lawyers can search and obtain complete and authoritative legal articles when a certain legal article of a certain law is known. However, for non-experts, if they are not familiar with the law, the keywords may not be accurate enough to search for the relevant legal article, so they cannot assist non-expert users in searching for legal-related files when they are not familiar with the law.

[0019] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure, application and other processing of user personal information complies with the provisions of relevant laws and regulations and does not violate public order and morals.

[0020] In the technical solutions disclosed herein, before obtaining or collecting personal information of users, the permission or consent of the users is obtained in each case.

[0021] 1 is a schematic diagram of an exemplary system architecture to which at least one of a data search method and a deep learning model training method according to an embodiment of the present disclosure can be applied. Note that FIG. 1 merely illustrates an example of a system architecture to which the embodiment of the present disclosure can be applied in order to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiment of the present disclosure cannot be applied to other devices, systems, environments, or scenes.

[0022] 1, a system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as, for example, wired and / or wireless communication links.

[0023] Using terminal devices 101, 102, 103, users can interact with server 105 via network 104 to send and receive messages, etc. Terminal devices 101, 102, 103 may be a variety of electronic devices, including, but not limited to, smart phones, tablet computers, laptop computers, etc.

[0024] The data retrieval method provided by the embodiments of the present disclosure may be generally performed by the terminal devices 101, 102, 103. Accordingly, the data retrieval device provided by the embodiments of the present disclosure may be generally provided in the terminal devices 101, 102, 103.

[0025] The deep learning model training method provided by the embodiment of the present disclosure may generally be executed by the server 105. Accordingly, the deep learning model training device provided by the embodiment of the present disclosure may generally be provided in the server 105.

[0026] FIG. 2 is a flow chart of a data retrieval method according to one embodiment of the present disclosure. As shown in FIG. 2, the data search method 200 includes operations S210 to S230.

[0027] In operation S210, M candidate texts are identified from a text library based on the semantic information in the query item to be processed.

[0028] A query item (Query) to be processed may include a question, an event description, and may also include keywords for the content to be searched. Taking a legal search system as an example, a Query may include a question, such as what is the legal age for marriage, and may further include an event description, such as how a person should be sentenced if he or she does something. It may also include keywords, such as Article 1 of the Civil Code.

[0029] For the question and event description included in the Query, M candidate texts can be selected from a text library based on semantic information, where M is an integer equal to or greater than 1. The text library may be a legal text database, which may include the texts of all legal provisions that the search system can cover.

[0030] In one example, a non-legal user can enter only the question or event information they need to inquire about, without having to include keywords from a certain legal provision, and the corresponding legal provision can be recalled from a text library based on the semantics of the question or event.

[0031] In operation S220, N candidate texts are identified from a text library based on keyword information in the query item to be processed.

[0032] For keywords included in the Query, for example, some characters or keywords in the title or content of a certain article, N candidate texts can be selected from the text library based on the keyword information, where N is an integer equal to or greater than 1.

[0033] In one example, once a user knows which provision they wish to query or is familiar with some of the content contained in the provision they wish to query, they can enter keywords in the title of the provision they wish to query or keywords in the content in the provision, and the corresponding provision can be recalled from a text library based on the keyword information.

[0034] In one example, the Query may include at least one of a question, an event description, and a legal keyword. This embodiment may provide two recall paths, with different emphases. One path may focus on recalling candidate text from the text library based on semantic information of the question and events in the Query. The other path may focus on recalling candidate text from the text library based on keyword information in the Query.

[0035] In an operation S230, at least one target text is identified based on the M candidate texts and the N candidate texts.

[0036] In one example, the semantic information-based recall path and the keyword information-based recall path can be rough sort paths, and the recalled M candidate texts and N candidate texts can be rough sort results. This embodiment can further provide a refined sort path for re-sorting the M candidate texts and the N candidate texts to obtain refined sort results. The target text is selected as a search result from the refined sort result. The search result can also be presented to the user.

[0037] The embodiments of the present disclosure recall multiple candidate texts based on the semantic information of the query items to be processed and the keyword information in the query items to be processed, respectively, and further identify at least one target text from the multiple candidate texts. Since the candidate texts can be recalled for queries including questions and events based on the semantic information, the candidate texts can be recalled for query items including keywords based on the keyword information, and at least one target text can be identified based on the candidate texts, the accuracy of search can be improved.

[0038] An embodiment of the present disclosure can be applied to searching legal provisions to provide a search system for legal provisions, which can search for relevant legal provisions based on the semantics of questions and events, thereby reducing the usage barrier for non-legal users.

[0039] FIG. 3 is a schematic diagram of a data searching method according to an embodiment of the present disclosure. 3, a query item Query to be processed may include at least one of a question, an event description, and a law article keyword, which includes at least one of a law article title keyword and a law article content keyword.

[0040] The data retrieval method of this embodiment includes two stages: coarse sorting 310 and fine sorting 320. The stage of coarse sorting 310 includes two paths: path 311 and path 312. The path 311 focuses on recalling text based on semantic information of questions or events in the query item Query to be processed, and the path 312 focuses on recalling text based on keyword information in the query item Query to be processed. Each of the two paths can recall text using a trained deep learning model, and each of the deep learning models of the two paths may be a two-tower model.

[0041] For example, the passage 311 is for performing text recall using a trained first deep learning model. The first deep learning model may be a two-tower model including a first query processing sub-model and a first text processing sub-model. The trained first deep learning model can separate the two towers to obtain an independent first query processing sub-model and a first text processing sub-model. The independent first query processing sub-model and the first text processing sub-model can be arranged offline, and the search efficiency can be improved by performing text recall in an offline state.

[0042] According to an embodiment of the present disclosure, a first deep learning model is used to process text in the text library to obtain features of the text in the text library, and a first text feature library is generated based on the features of the text in the text library.

[0043] For example, the first text processing sub-model can be used to perform feature extraction on the texts in the text library to obtain text features for each text in the text library, and these text features can be saved to obtain a first text feature library. By pre-storing the text features in the text library, it is possible to avoid the need for online extraction every time they are used, and they can be directly used in an offline state, and the search efficiency can be improved by directly obtaining the text features from the text feature library in an offline state for matching.

[0044] According to an embodiment of the present disclosure, identifying M candidate texts includes: identifying semantic features of a query item to be processed; and obtaining M first target text features by matching the semantic features with text features in a first text feature library, the text features in the first text feature library being obtained by processing the text in the text library using a first deep learning model trained based on similarity between the semantic features of the sample query item and the text features of the sample text; and identifying M candidate texts from the text library based on the M first target text features.

[0045] For a query item Query to be processed, a first query processing sub-model can be used to process it to obtain semantic features of the query item Query to be processed, and the semantic features of the query item Query to be processed can be matched with a first text feature library to obtain M first target text features with the highest similarity. The text features in the first text feature library correspond to the texts in the text library, and after the M first target text features are obtained, M candidate texts corresponding to the M first target text features can be selected from the text library.

[0046] The first deep learning model may be obtained by training based on the similarity between the semantic features of the sample query item and the text features of the sample text. For example, in the training stage, the first query processing sub-model processes the sample query item to obtain the semantic features of the sample query item. The first text processing sub-model processes the sample text to obtain the text features of the sample text, and performs model training based on the similarity between the semantic features of the sample query item and the text features of the sample text, so that in the training process, the similarity between the semantic features of the sample query item and the text features of the positive sample text becomes large (e.g., close to 1), and the similarity between the semantic features of the sample query item and the text features of the negative sample text becomes small (e.g., close to 0).

[0047] As a result, by using the first deep learning model obtained by the above training, it is possible to select M candidate texts that have the highest similarity to the query item Query to be processed, based on the similarity between the semantic features of the query item Query to be processed and the text features in the first text feature library.

[0048] For example, the passage 312 is for performing text recall using a trained second deep learning model. The second deep learning model may be a two-tower model including a second query processing sub-model and a second text processing sub-model. The trained second deep learning model can separate the two towers to obtain an independent second query processing sub-model and a second text processing sub-model. The independent second query processing sub-model and the second text processing sub-model can be arranged offline, and the search efficiency can be improved by realizing text recall in an offline state.

[0049] According to an embodiment of the present disclosure, the title and the content are processed using a second deep learning model to obtain title features and content features, respectively, and a second text feature library is generated based on the title features and content features.

[0050] For example, the text in the text library may include a title and a content. The title and the content of the text in the text library are separated, and feature extraction is performed on the title and the content using the trained second text processing sub-model, respectively, to obtain a title feature and a content feature. Then, the title feature and the content feature are combined to obtain a text feature. The text features of all the text in the text library are stored to obtain a second text feature library. By pre-storing the text features in the text library, it is possible to avoid the need for online extraction every time it is used, and it is possible to directly use it in an offline state, and it is possible to directly obtain the text features from the text feature library in an offline state to perform matching, thereby improving search efficiency.

[0051] Path 312 focuses on performing text recall based on keyword information in the query item Query to be processed. The keywords include title keywords and content keywords, and in this embodiment, feature extraction is performed on the title and content of the text in the text library respectively to obtain title features and content features, and the title features and content features are further stored as a second text feature library. According to the second text feature library, no matter whether the user inputs a title keyword or a content keyword, the corresponding features can be identified from the second text feature library to recall the corresponding text.

[0052] According to an embodiment of the present disclosure, identifying the N candidate texts includes: identifying keyword features in the query item to be processed; obtaining N second target text features by matching the keyword features with text features in a second text feature library, the text features in the second text feature library being obtained by processing the text in the text library using a second deep learning model trained based on the similarity between the keyword features of the sample query item and the text features of the sample text; and identifying the N candidate texts from the text library based on the N second target text features.

[0053] For the query item Query to be processed, the second query processing sub-model can be used to process it to obtain keyword features of the query item Query to be processed, and the keyword features of the query item Query to be processed can be matched with a second text feature library to obtain N second target text features with the highest similarity. The text features in the second text feature library correspond to the texts in the text library, and after the N second target text features are obtained, N candidate texts corresponding to the N second target text features can be selected from the text library.

[0054] The second deep learning model is obtained by training based on the similarity between the keyword features of the sample query item and the text features of the sample text. For example, in the training stage, the second query processing sub-model processes the sample query item to obtain the keyword features of the sample query item. The second text processing sub-model processes the sample text to obtain the text features of the sample text, and performs model training based on the similarity between the semantic features of the sample query item and the text features of the sample text, so that in the training process, the similarity between the semantic features of the sample query item and the text features of the positive example sample text becomes large (e.g., close to 1), and the similarity between the semantic features of the sample query item and the text features of the negative example sample text becomes small (e.g., close to 0).

[0055] Therefore, by using the second deep learning model obtained by the above training, it is possible to select N candidate texts that have the highest similarity to the query item Query to be processed based on the similarity between the keyword features of the query item Query to be processed and the text features in the second text feature library.

[0056] After obtaining the M candidate texts recalled by the passage 311 and the N candidate texts recalled by the passage 312, refinement sorting 320 can be performed on the M candidate texts and the N candidate texts. The refinement sorting 320 can use the trained third deep learning model to re-sort the M candidate texts and the N candidate texts to obtain refinement sorting results. The refinement sorting results are sorted according to the new similarity, and at least one candidate text with the highest similarity can be selected as the target text from the refinement sorting results.

[0057] The embodiment of the present disclosure can improve the retrieval accuracy by recalling multiple candidate texts using two coarse sorting passes, and further selecting a target text from the candidate texts using a fine sorting pass.

[0058] FIG. 4 is a schematic diagram of a deep learning model according to one embodiment of the present disclosure. As shown in Fig. 4, the deep learning model of the present embodiment may be a model that recalls text in a text library based on semantic information of a query item Query. The deep learning model may be a two-tower model.

[0059] The two-tower of the deep learning model includes a first query processing submodel and a first text processing submodel. The first query processing submodel includes an encoding module 411, an attention module 412, and a full connection module 413, and the first text processing submodel includes an encoding module 421 and a full connection module 422. Compared with the first text processing submodel, the first query processing submodel adds an attention module 412 after the encoding module 411. Therefore, the two-tower of the deep learning model is asymmetric.

[0060] According to an embodiment of the present disclosure, query features of a query item to be processed are identified, attention processing is performed on the query features to obtain attention features, and semantic features of the query item to be processed are identified based on the attention features.

[0061] For example, a sample query item is input to an encoding module 411 to obtain a query feature. The query feature is input to an attention module 412 to obtain an attention feature, which is used to perform self-attention processing on the query feature to obtain a multi-dimensional (e.g., m-dimensional, n is an integer greater than 1) attention feature so as to enrich the feature information. The multi-dimensional attention feature is input to a full combination module 413 to obtain a semantic feature.

[0062] For example, the sample text includes positive example text that matches the sample query item and negative example text that does not match the sample query item. In one example, each sample query item is labeled with positive example text and negative example text, and for each sample query item in a batch, the positive example text and negative example text of other sample query items in the batch can both be the negative example text of the current sample query item. For example, there are k (k is an integer greater than 1) sample query items in a batch, and each sample query item is labeled with one positive example text and one negative example text. When training, the sample configuration format input for each training includes a sample query item, a positive example text, and (2k-1) negative example texts.

[0063] This deep learning model solves the problem of matching between meanings and text, which is more difficult than matching between keywords and text. Therefore, by labeling the sample query item with positive and negative example texts and making the positive and negative example texts of other sample query items into negative example texts of the current sample query item, the number of samples of the deep learning model can be increased, the learning of the deep learning model can be made more complete, and the matching ability of the deep learning model can be improved.

[0064] For example, in each training, a sample query item is input to the first query processing sub-model to obtain semantic features, the positive example text of the sample query item and (2k-1) negative example texts are both input to the encoding module 421 to obtain initial features of each sample text, and the initial features of each sample text are input to the full combination module 422 to obtain text features of each sample text.

[0065] Since the attention module 412 of the first query processing sub-model processes the query features into multi-dimensional attention features and the semantic features output by the fully connected module 413 are also multi-dimensional, the text features can also be processed into multi-dimensions in order to match the semantic features with the text features. As a result, a similarity (e.g., cosine similarity cos) is calculated between the multi-dimensional semantic features and the multi-dimensional text features to obtain a one-dimensional similarity vector, and a maximum pooling process (Max pooling) is performed on the similarity vector to obtain a final similarity evaluation value.

[0066] In one example, the similarity between the sample query item and the positive example text and the similarity between the sample query item and each negative example text can be calculated. The loss function of the deep learning model may be constructed with the goal of maximizing the difference between the similarity between the sample query item and the positive example text and the similarity between the sample query item and the negative example text. The loss of the deep learning model can be obtained by inputting the similarity between the sample query item and the positive example text and the similarity between the sample query item and each negative example text into the loss function, and the parameters of each module of the deep learning model can be adjusted based on the loss.

[0067] The trained deep learning model can recall candidate texts that have the highest semantic match with the query item based on matching the semantic features of the query item with text features in the text library.

[0068] FIG. 5 is a schematic diagram of a deep learning model according to another embodiment of the present disclosure. 5, the deep learning model of the present embodiment may be a model that recalls text in a text library based on keyword information of a query item Query. The deep learning model may be a two-tower model.

[0069] The two towers of the deep learning model include a second query processing submodel and a second text processing submodel. The second query processing submodel includes an encoding module 511 and a full combination module 512, and the second text processing submodel includes an encoding module 521 and a full combination module 522. The second query processing submodel and the second text processing submodel are symmetrical.

[0070] For example, sample query items are input to an encoding module 511 to obtain query features. The query features are input to a full combination module 512 to obtain keyword features.

[0071] For example, the sample text includes positive example text that matches the sample query item and negative example text that does not match the sample query item. In one example, each sample query item is labeled with positive example text, and for each sample query item in a batch, the positive example text of other sample query items in the batch can be set as the negative example text of the current sample query item. When training, the sample configuration format input for each training includes a sample pair consisting of a sample query item and a positive example text, and a sample pair consisting of a sample query item and a negative example text.

[0072] For example, in each training, a sample query item is input to the second query processing sub-model to obtain keyword features. A sample text (positive example text or negative example text) of the sample query item is input to the encoding module 521 to obtain initial features of the sample text, and the initial features of the sample text are further input to the full combination module 522 to obtain text features of the sample text. Next, the similarity (e.g., cosine similarity cos) between the keyword feature of the sample query item and the text feature of the sample text is calculated to obtain a similarity evaluation value. Model training is performed with the aim of maximizing the similarity between the sample query item and the positive example text for the sample text belonging to the positive example text, and with the aim of minimizing the similarity between the sample query item and the positive example text for the sample text belonging to the negative example text, to obtain a trained deep learning model.

[0073] The trained deep learning model can recall candidate texts that most closely match the keywords of the query item based on matching the keyword features of the query item with text features in the text library.

[0074] According to an embodiment of the present disclosure, identifying at least one target text includes: for each candidate text, concatenating the query item to be processed and the candidate text to obtain a concatenated text; identifying a similarity between the query item to be processed and each candidate text based on the concatenated text; and identifying at least one target text from the M candidate texts and the N candidate texts based on the similarity between the query item to be processed and each candidate text.

[0075] Since the M candidate texts recalled based on the semantic information of the query item and the N candidate texts recalled based on the keyword information are recalled using different recall paths, the M candidate texts cannot be compared with the N candidate texts, and it is not possible to select a candidate text that better meets the user's needs from among them. Therefore, the trained deep learning model can be used to refine and sort the M candidate texts and the N candidate texts to obtain at least one target text.

[0076] FIG. 6 is a schematic diagram of a deep learning model according to another embodiment of the present disclosure. As shown in Figure 6, the deep learning model may be a model for refinement sorting of multiple candidate texts. The deep learning model may be obtained by fine-tuning a pre-trained natural language processing model. The model may be a single tower model, including an encoding layer, a pooling layer, and a fully connected layer.

[0077] For example, in the training stage, the deep learning model can obtain sample query items whose corresponding texts are labeled as sample texts. The sample query items and the sample texts are concatenated and input into an encoding layer to obtain the encoding features token1...tokenM of the sample query items and the encoding features token1...token of the sample texts. The encoding features of the sample query items and the encoding features of the sample texts are input into a pooling layer to obtain pooling features, and then through a fully connected layer, the similarity between the sample query items and the sample texts can be obtained, and a loss can be calculated based on the similarity, and the parameters of the deep learning model can be adjusted based on the loss.

[0078] In one example, to better model the association between the query item and the text, the input of the model can be constructed by adding an identifier. For example, an identifier can be added between the sample query item and the sample text to distinguish the sample query item from the sample text. In addition, an identifier can be added implicitly to perform encoding training with separate identifiers for the sample query item and the sample text, for example, the sample query item identifier is 0 and the sample text identifier is 1.

[0079] For example, in the application stage, the trained deep learning model can concatenate the query item to be processed and each of the multiple candidate texts to obtain multiple concatenated texts, input the multiple concatenated texts into the trained deep learning model to obtain a similarity between the query item to be processed and each of the candidate texts, and re-sort the multiple candidate texts based on the similarity to obtain a refined sorted result of the multiple candidate texts. At least one candidate text with the highest similarity can be selected from the refined sorted result as the target text.

[0080] The embodiments of the present disclosure can improve the accuracy of the searched target text by using a trained deep learning model to perform refinement sorting on the candidate text and selecting the target text from the refinement sorting result.

[0081] According to an embodiment of the present disclosure, the present disclosure further provides a method for training a deep learning model.

[0082] FIG. 7 is a flowchart of a method for training a deep learning model according to one embodiment of the present disclosure.

[0083] 7, the method 700 for training a deep learning model includes operations S710-S760. The deep learning model of the embodiment of the present disclosure may be a two-tower model including a query processing sub-model and a text processing sub-model. The model may be trained based on the similarity between the semantic features of sample query items and the text features of sample texts.

[0084] In operation S710, positive and negative example texts of the sample query items are identified.

[0085] For example, the sample text of the sample query item includes positive example text and negative example text, where the positive example text is text that matches the sample query item and the negative example text is text that does not match the sample query item.

[0086] In operation S720, the sample query item is processed using the query processing sub-model to obtain semantic features of the sample query item.

[0087] For example, a sample query item can be input into the query processing sub-model, which can then perform feature extraction on the sample query item to obtain query features for the sample query item, and then perform attention processing on the query features to obtain attention features, and obtain semantic features for the sample query item based on the attention features.

[0088] In operation S730, the positive example text and the negative example text are processed using the text processing sub-model to obtain features of the positive example text and features of the negative example text.

[0089] For example, positive example text and negative example text are input to the text processing sub-model, and the text processing sub-model performs feature extraction on each sample text to obtain features of the positive example text and features of the negative example text.

[0090] In operation S740, similarities between the sample query items and each of the positive example texts and the negative example texts are determined based on the semantic features, the features of the positive example texts, and the features of the negative example texts.

[0091] For example, the similarity between the sample query items and the positive example texts, and the similarity between the sample query items and the negative example texts can be calculated.

[0092] In operation S750, a loss for the deep learning model is determined based on the similarity. In operation S760, parameters of the deep learning model are adjusted based on the loss.

[0093] The loss function of the deep learning model may be constructed with the goal of maximizing the difference between the similarity between the sample query items and the positive example text and the similarity between the sample query items and the negative example text. By inputting the similarity between the sample query items and the positive example text and the similarity between the sample query items and the negative example text into the loss function, the loss of the deep learning model can be obtained, and the parameters of each module of the deep learning model can be adjusted based on the loss.

[0094] In an embodiment of the present disclosure, a deep learning model is trained using sample query items, positive example texts, and negative example texts, and the training is performed based on the similarity between the sample query items and each of the positive example texts and negative example texts. The trained deep learning model can match the query item to be processed with text in a text library to obtain search results that match the query item to be processed.

[0095] According to an embodiment of the present disclosure, the query processing sub-model includes an encoding module, an attention module, and a full-coupling module. Operation S720 includes: inputting a sample query item to the encoding module to obtain query features of the sample query item, inputting the query features to the attention module to obtain attention features of the sample query item, and inputting the attention features to the full-coupling module to obtain semantic features of the sample query item.

[0096] The sample query items are input to an encoding module to obtain query features. The query features are input to an attention module to obtain attention features, which performs self-attention processing on the query features to enrich the feature information and obtain multi-dimensional attention features. The multi-dimensional attention features are input to a fully-connected module to obtain semantic features.

[0097] According to an embodiment of the present disclosure, for each sample query item in a batch, negative example text of the sample query item, and positive example text and negative example text of other sample query items other than the sample query item among the multiple sample query items are identified as a set of negative example texts for the sample query item.

[0098] For example, one batch has k (k is an integer greater than 1) sample query items, and each sample query item is labeled with one positive example text and one negative example text. For each sample query item, the negative example text of the sample query item and the positive and negative example texts of other sample query items are both regarded as the negative example text of the sample query item. The sample query item has a total of (2k-1) negative example texts, which are regarded as a negative example text set of the sample query item. When training is performed, the sample configuration format input for each training may include the sample query item, the positive example text, and (2k-1) negative example texts.

[0099] According to an embodiment of the present disclosure, operation S730 includes processing the positive example text and each negative example text in the negative example text collection using the text processing sub-model to obtain features of the positive example text and features of each negative example text in the negative example text collection. Operation S750 includes determining a loss of the deep learning model based on a similarity between the sample query item and the features of the positive example text and a similarity between the sample query item and each negative example text in the negative example text collection.

[0100] For example, in each training, the sample query item is input to the query processing sub-model to obtain semantic features. The positive example text of the sample query item and the (2k-1) negative example texts are both input to the text processing sub-model to obtain text features of each sample text. The similarity between the sample query item and the positive example text and the similarity between the sample query item and each of the negative example texts can be calculated. The loss function of the deep learning model may be constructed with the goal of maximizing the difference between the similarity between the sample query item and the positive example text and the similarity between the sample query item and the negative example text. The loss of the deep learning model can be obtained by inputting the similarity between the sample query item and the positive example text and the similarity between the sample query item and each of the negative example texts into the loss function, and the parameters of each module of the deep learning model can be adjusted based on the loss.

[0101] In the embodiments of the present disclosure, the positive and negative example texts of other sample query items in the batch are all used as negative example texts of the current sample query item, thereby increasing the number of samples of the deep learning model, making the learning of the deep learning model more complete, and improving the matching ability of the deep learning model.

[0102] According to an embodiment of the present disclosure, the present disclosure further provides a data search apparatus and a deep learning model training apparatus.

[0103] FIG. 8 is a block diagram of a data search device according to an embodiment of the present disclosure. As shown in FIG. 8, the data searching apparatus 800 includes a first candidate text identifying module 801, a second candidate text identifying module 802 and a target text identifying module 803.

[0104] The first candidate text identification module 801 is used to identify M candidate texts from a text library based on semantic information in the query item to be processed, where M is an integer equal to or greater than 1.

[0105] A second candidate text identification module 802 is used to identify N candidate texts from the text library based on keyword information in the query item to be processed, where N is an integer equal to or greater than 1.

[0106] The target text identification module 803 is used for identifying at least one target text based on the M candidate texts and the N candidate texts.

[0107] The first candidate text identifying module 801 includes a semantic feature identifying unit, a first matching unit and a first candidate text identifying unit.

[0108] The semantic feature identification unit is used to identify semantic features of the query items to be processed.

[0109] The first matching unit is used to obtain M first target text features by matching the semantic features with the text features in a first text feature library, and the text features in the first text feature library are obtained by processing the text in the text library using a first deep learning model obtained by training based on the similarity between the semantic features of the sample query items and the text features of the sample text.

[0110] The first candidate text identifying unit is used for identifying M candidate texts from the text library based on the M first target text features.

[0111] The semantic feature identification unit includes a query feature identification subunit, an attention feature identification subunit, and a semantic feature identification subunit.

[0112] The query feature identification subunit is used to identify query features of the query item to be processed.

[0113] The attention feature identification subunit is used to perform attention processing on the query features and obtain attention features.

[0114] The semantic feature identification subunit is used to identify semantic features of the query items to be processed based on the attention features.

[0115] The data retrieval apparatus 800 further includes a first text feature identification module and a first text feature library generation module.

[0116] The first text feature identification module is used to process the text in the text library using the first deep learning model to obtain features of the text in the text library.

[0117] The first text feature library generating module is used to generate a first text feature library based on the features of the text in the text library.

[0118] The second candidate text identification module 802 includes a keyword feature identification unit, a second matching unit and a second candidate text identification unit.

[0119] The keyword feature identification unit is used for identifying keyword features in the query items to be processed.

[0120] The second matching unit is used to obtain N second target text features by matching the keyword features with the text features in a second text feature library, where the text features in the second text feature library are obtained by processing the text in the text library using a second deep learning model obtained by training based on the similarity between the keyword features of the sample query items and the text features of the sample text.

[0121] The second candidate text identifying unit is used for identifying N candidate texts from the text library based on the N second target text features.

[0122] According to an embodiment of the present disclosure, the text in the text library includes a title and a content. The data retrieval apparatus 800 further includes a second text feature identification module and a second text feature library generating module.

[0123] The second text feature identification module is used to process the title and the content, respectively, using a second deep learning model to obtain title features and content features.

[0124] The second text feature library generating module is used for generating a second text feature library based on the title feature and the content feature.

[0125] The target text identification module 803 includes a concatenation unit, a similarity identification unit and a target text identification unit.

[0126] A concatenation unit is used for each candidate text to concatenate the query item to be processed and the candidate text to obtain a concatenated text.

[0127] The similarity determination unit is used for determining a similarity between the query item to be processed and each of the candidate texts based on the concatenated text.

[0128] The target text identifying unit is used for identifying at least one target text from the M candidate texts and the N candidate texts based on a similarity between the query item to be processed and each of the candidate texts.

[0129] FIG. 9 is a block diagram of a deep learning model training apparatus according to one embodiment of the present disclosure.

[0130] As shown in FIG. 9 , the deep learning model training apparatus 900 includes a sample identification module 901, a query processing module 902, a text processing module 903, a similarity identification module 904, a loss identification module 905 and an adjustment module 906.

[0131] The sample identification module 901 is used to identify positive and negative example texts of sample query items.

[0132] The query processing module 902 is used to process the sample query items using the query processing sub-model to obtain semantic features of the sample query items.

[0133] The text processing module 903 is used to process the positive example text and the negative example text using the text processing sub-model to obtain features of the positive example text and features of the negative example text.

[0134] The similarity determination module 904 is used to determine similarities between the sample query items and the positive example texts and the negative example texts, respectively, based on semantic features, features of the positive example texts, and features of the negative example texts.

[0135] The loss identification module 905 is used to identify a loss for the deep learning model based on the similarity.

[0136] The tuning module 906 is used to tune parameters of the deep learning model based on the loss.

[0137] The query processing sub-model includes a feature extraction module, an attention module, and a full connection module. The query processing module 902 includes a feature extraction unit, an attention processing unit, and a full connection processing unit.

[0138] The feature extraction unit is used to input the sample query item into the feature extraction module to obtain query features of the sample query item.

[0139] The attention processing unit is used to input the query features into the attention module to obtain attention features of the sample query items.

[0140] The full-connection processing unit is used to input the attention features into the full-connection module to obtain semantic features of the sample query items.

[0141] The sample query items include a plurality of sample query items. The deep learning model training apparatus 900 further includes a negative example text set identification module.

[0142] The negative example text set identification module is used to identify, for each sample query item, negative example text of the sample query item, and positive example text and negative example text of other sample query items other than the sample query item among the multiple sample query items, as a negative example text set of the sample query item.

[0143] The text processing module 903 is used to process the positive example text and each negative example text in the negative example text set using the text processing sub-model, and obtain features of the positive example text and features of each negative example text in the negative example text set.

[0144] The loss identification module 905 is used to identify a loss for the deep learning model based on the similarity between the features of the sample query items and the positive example texts and the similarity between the sample query items and each negative example text in the negative example text set.

[0145] According to an embodiment of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium, and a computer program product.

[0146] 10 shows a schematic block diagram of an exemplary electronic device 1000 for implementing embodiments of the present disclosure. The electronic device is intended to represent various types of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various types of mobile devices, such as personal digital assistants, mobile phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely exemplary and do not limit the implementation of the present disclosure as described and / or claimed herein.

[0147] As shown in Fig. 10, the device 1000 includes a computing means 1001, which may perform various appropriate operations and processes based on a computer program stored in a read-only memory (ROM) 1002 or loaded from a storage means 1008 into a random access memory (RAM) 1003. The RAM 1003 may further store various programs and data required for the operation of the device 1000. The computing means 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0148] A number of components in the device 1000 are connected to an I / O interface 1005, and include input means 1006, such as a keyboard, a mouse, etc., output means 1007, such as various types of displays, speakers, etc., storage means 1008, such as a magnetic disk, an optical disk, etc., and communication means 1009, such as a network card, a modem, a wireless communication transceiver, etc. The communication means 1009 enables the device 1000 to exchange information and data with other devices via a computer network such as the Internet and / or various electric networks.

[0149] The computing means 1001 may be various general-purpose and / or dedicated processing modules having processing and computing capabilities. Some examples of the computing means 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, computing units running various machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing means 1001 performs each of the methods and processes described in the preceding sentence, such as the data search method and / or the deep learning model training method. For example, in some embodiments, the data search method and / or the deep learning model training method may be realized as a computer software program tangibly included in a machine-readable medium, such as the storage means 1008. In some embodiments, some or all of the computer programs may be loaded and / or installed in the device 1000 via the ROM 1002 and / or the communication means 1009. When the computer program is loaded into the RAM 1003 and executed by the computing means 1001, it may perform one or more steps of the data retrieval method and / or the deep learning model training method described in the preceding sentence. Alternatively, in other embodiments, the computing means 1001 may be configured to perform the data retrieval method and / or the deep learning model training method in any other suitable manner (e.g., via firmware).

[0150] Various embodiments of the systems and techniques described herein above may be realized in digital electronic circuitry systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may be embodied in one or more computer programs that may be executed and / or interpreted by a programmable system that includes at least one programmable processor, which may be a special purpose or general purpose programmable processor, and may include capable of receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.

[0151] The program codes for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, a special purpose computer or other programmable data processing apparatus, so that when the program codes are executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are performed. The program codes may be fully executed on the device, partially executed on the device, partially executed on the device as a separate software package and partially executed on a remote device or fully executed on a remote device or server.

[0152] In the context of this disclosure, a machine-readable medium may be a tangible medium, and may contain or store a program for use in or in combination with an instruction execution system, device, or electronic device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or electronic device, or any suitable combination of the above. More specific examples of machine-readable storage media include electrical connections through one or more wires, portable computer disks, hard disks, random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), optical fibers, compact disk read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the above.

[0153] A computer may implement the systems and techniques described herein to provide for interaction with a user, the computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user, and a keyboard and pointing device (e.g., a mouse or trackball) through which a user can provide input to the computer. Other types of devices may also provide for interaction with a user, for example, the feedback provided to the user may be any form of sensing feedback (e.g., visual feedback, auditory feedback, or tactile feedback) and may receive input from the user in any form (including voice input, speech input, or tactile input).

[0154] The systems and techniques described herein may be implemented in a computing system including background components (e.g., a data server), or a computing system including middleware components (e.g., an application server), or a computing system including front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user may interact with embodiments of the systems and techniques described herein), or a computing system including any combination of such background, middleware, or front-end components. The components of the system may be connected to each other by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks illustratively include a local area network (LAN), a wide area network (WAN), and the Internet.

[0155] The computer system may include clients and servers. The clients and servers are generally remote and typically interact through a communication network. The relationship of client and server is created by computer programs running on the corresponding computers and having a client-server relationship.

[0156] It should be understood that various types of flows shown above may be used, and operations may be rearranged, added, or removed. For example, each operation described in the present disclosure may be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present specification is not limited thereto.

[0157] The above specific embodiments do not limit the scope of protection of the present disclosure. Those skilled in the art should understand that various modifications, combinations, subcombinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principle of the present disclosure should be included within the scope of protection of the present disclosure.

Claims

1. identifying M candidate texts from a text library based on semantic information in a query item to be processed, where M is an integer equal to or greater than 1; identifying N candidate texts from the text library based on keyword information in the query item to be processed, where N is an integer equal to or greater than 1; and identifying at least one target text based on the M candidate texts and the N candidate texts. Data retrieval methods.

2. Identifying M candidate texts from a text library based on semantic information in the query item to be processed includes: identifying semantic features of the query items to be processed; obtaining M first target text features by matching the semantic features with text features in a first text feature library, the text features in the first text feature library being obtained by processing the text in the text library with a first deep learning model trained based on similarity between semantic features of sample query items and text features of sample texts; and identifying the M candidate texts from the text library based on the M first target text features. The method of claim 1.

3. Identifying semantic features of the query items to be processed includes: identifying query features of the query items to be processed; performing an attention process on the query features to obtain attention features; and identifying semantic features of the query item to be processed based on the attention features. The method of claim 2.

4. processing text in the text library with the first deep learning model to obtain features of the text in the text library; generating the first text feature library based on text features in the text library. The method of claim 2.

5. Identifying N candidate texts from the text library based on keyword information in the query item to be processed includes: identifying keyword features in the query item to be processed; obtaining N second target text features by matching the keyword features with text features in a second text feature library, the text features in the second text feature library being obtained by processing the text in the text library with a second deep learning model trained based on similarity between keyword features of sample query items and text features of sample text; and identifying the N candidate texts from the text library based on the N second target text features. The method of claim 1.

6. The text in the text library includes a title and a content; The method comprises: processing the title and the content using the second deep learning model to obtain title features and content features, respectively; generating the second text feature library based on the title features and the content features. The method according to claim 5.

7. Identifying at least one target text based on the M candidate texts and the N candidate texts includes: for each candidate text, concatenating the query item to be processed and the candidate text to obtain a concatenated text; determining a similarity between the query item to be processed and each of the candidate texts based on the concatenated text; and identifying the at least one target text from the M candidate texts and the N candidate texts based on a similarity between the query item to be processed and each of the candidate texts. The method according to any one of claims 1 to 6.

8. 1. A method for training a deep learning model, comprising: the deep learning model includes a query processing sub-model and a text processing sub-model; The method comprises: Identifying positive and negative example texts of sample query items; processing the sample query items with the query processing sub-model to obtain semantic features of the sample query items; processing the positive example texts and the negative example texts using the text processing sub-model to obtain features of the positive example texts and features of the negative example texts; determining a similarity between the sample query items and each of the positive example texts and the negative example texts based on the semantic features, features of the positive example texts, and features of the negative example texts; determining a loss of the deep learning model based on the similarity; and adjusting parameters of the deep learning model based on the loss. How to train a deep learning model.

9. The query processing sub-model includes an encoding module, an attention module, and a fully connected module; Processing the sample query items with the query processing sub-model to obtain semantic features of the sample query items, inputting the sample query item into the encoding module to obtain query features for the sample query item; inputting the query features into the attention module to obtain attention features for the sample query items; inputting the attention features into the fully-connected module to obtain semantic features of the sample query items; The method according to claim 8.

10. the sample query items include a plurality of sample query items; The method comprises: and identifying, for each sample query item, negative example text of the sample query item, and positive example text and negative example text of other sample query items among the plurality of sample query items other than the sample query item as a set of negative example texts of the sample query item. The method according to claim 8.

11. Processing the positive example text and the negative example text using the text processing sub-model to obtain features of the positive example text and features of the negative example text, processing the positive example text and each negative example text in the negative example text set using the text processing sub-model to obtain features of the positive example text and features of each negative example text in the negative example text set; Identifying a loss of the deep learning model based on the similarity includes: determining a loss of the deep learning model based on a similarity between the sample query items and features of the positive example text and a similarity between the sample query items and each negative example text in the set of negative example texts. The method of claim 10.

12. a first candidate text identification module for identifying M candidate texts from a text library based on semantic information in the query item to be processed, where M is an integer equal to or greater than 1; the second candidate text identification module for identifying N candidate texts from the text library based on keyword information in the query item to be processed, N being an integer equal to or greater than 1; and a target text identification module for identifying at least one target text based on the M candidate texts and the N candidate texts. Data retrieval device.

13. The first candidate text identification module: a semantic feature identification unit for identifying semantic features of the query items to be processed; a first matching unit for obtaining M first target text features by matching the semantic features with text features in a first text feature library, the text features in the first text feature library being obtained by processing the text in the text library with a first deep learning model trained based on similarity between semantic features of sample query items and text features of sample texts; a first candidate text identification unit for identifying the M candidate texts from the text library based on the M first target text features; 13. The apparatus of claim 12.

14. The semantic feature identification unit includes: a query feature identification subunit for identifying query features of the query item to be processed; an attention feature identification subunit for performing attention processing on the query features to obtain attention features; a semantic feature identification subunit for identifying semantic features of the query item to be processed based on the attention features.

14. The apparatus of claim 13.

15. a first text feature identification module for processing text in the text library with the first deep learning model to obtain features of the text in the text library; and a first text feature library generation module for generating the first text feature library based on features of text in the text library.

14. The apparatus of claim 13.

16. The second candidate text identification module: a keyword feature identification unit for identifying keyword features in the query item to be processed; a second matching unit for obtaining N second target text features by matching the keyword features with text features in a second text feature library, the text features in the second text feature library being obtained by processing the text in the text library with a second deep learning model trained based on similarity between keyword features of sample query items and text features of sample text; a second candidate text identification unit for identifying the N candidate texts from the text library based on the N second target text features.

13. The apparatus of claim 12.

17. The text in the text library includes a title and a content; The apparatus comprises: a second text feature identification module for processing the title and the content with the second deep learning model to obtain title features and content features, respectively; and a second text feature library generating module for generating the second text feature library based on the title features and the content features.

17. The apparatus of claim 16.

18. The target text identification module includes: a concatenation unit for, for each candidate text, concatenating the query item to be processed and the candidate text to obtain a concatenated text; a similarity determining unit for determining a similarity between the query item to be processed and each candidate text based on the concatenated text; a target text identifying unit for identifying the at least one target text from the M candidate texts and the N candidate texts based on a similarity between the query item to be processed and each candidate text; Apparatus according to any one of claims 12 to 17.

19. A deep learning model training device, comprising: The deep learning model includes a query processing sub-model and a text processing sub-model; The apparatus comprises: a sample identification module for identifying positive and negative example texts of sample query items; a query processing module for processing the sample query items with the query processing sub-model to obtain semantic features of the sample query items; a text processing module for processing the positive example text and the negative example text using the text processing sub-model to obtain features of the positive example text and features of the negative example text; a similarity determination module for determining similarities between the sample query items and each of the positive example texts and the negative example texts based on the semantic features, features of the positive example texts, and features of the negative example texts; a loss identification module for identifying a loss of the deep learning model based on the similarity; and an adjustment module for adjusting parameters of the deep learning model based on the loss. A training device for deep learning models.

20. The query processing sub-model includes a feature extraction module, an attention module, and a fully connected module; The query processing module: a feature extraction unit for inputting the sample query item into the feature extraction module to obtain query features of the sample query item; an attention processing unit for inputting the query features into the attention module to obtain attention features for the sample query items; a full-link processing unit for inputting the attention features into the full-link module to obtain semantic features of the sample query items.

20. The apparatus of claim 19.

21. the sample query items include a plurality of sample query items; The apparatus comprises: and a negative example text set identifying module for identifying, for each sample query item, negative example text of the sample query item, and positive example text and negative example text of other sample query items among the plurality of sample query items other than the sample query item, as a negative example text set of the sample query item.

20. The apparatus of claim 19.

22. the text processing module is used to process the positive example text and each negative example text in the negative example text set using the text processing sub-model to obtain features of the positive example text and features of each negative example text in the negative example text set; The loss identification module is used to identify a loss of the deep learning model based on a similarity between the sample query items and features of the positive example texts and a similarity between the sample query items and each negative example text in the negative example text set.

22. The apparatus of claim 21.

23. At least one processor; a memory in communication with the at least one processor; The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor such that the at least one processor performs the method according to any one of claims 1 to 11. electronic equipment.

24. A non-transitory computer-readable storage medium having computer instructions stored thereon, comprising: The computer instructions are used to cause the computer to carry out a method according to any one of claims 1 to 11. A non-transitory computer-readable storage medium.

25. A computer program product comprising a computer program, The computer program is stored in at least one of a readable storage medium and an electronic device, and the computer program, when executed by a processor, realizes the method according to any one of claims 1 to 11. Computer program products.

Citation Information

Patent Citations

  • Context-sensitive search using a deep learning model

    CN106415535A

  • Similar document retrieving device and similar document retrieving method

    JP1998289246A

  • Device and method for document retrieval

    JP2001092831A

  • Information retrieval and storage device

    JP2002024270A

  • Document search system and document search method

    JP2009181524A