File query method and device, electronic equipment and storage medium

By extracting attribute information from natural language query text and combining deep learning and large language models with file interaction behavior, it is possible to accurately find files even when the file name and content are forgotten. This solves the problem of low efficiency in traditional methods and provides a personalized file retrieval solution.

CN116992053BActive Publication Date: 2026-11-27BAIDU INT TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310994206.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-08
Publication Date
2026-11-27
Estimated Expiration
2043-08-08

AI Technical Summary

Technical Problem

When users forget the file name and content, traditional file search methods struggle to find the desired file, resulting in low search efficiency, long paths, and high filtering costs. Furthermore, rule-based or semantic search methods are ineffective under the complex instructions expressed in natural language.

Method used

By extracting query items with multiple attribute information from natural language query text, using deep learning models and large language models, and combining file interaction behavior information, the initial file is recalled, and the target file is determined through multi-path recall and multi-feature fusion ranking.

Benefits of technology

It improves file search efficiency, accurately finds the files users want, provides personalized search results, and enhances the user search experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116992053B_ABST
    Figure CN116992053B_ABST
Patent Text Reader

Abstract

The present disclosure provides a file query method, relates to the technical field of artificial intelligence, and particularly relates to the fields of machine learning, deep learning and natural language processing. The specific implementation scheme is as follows: according to multiple attribute information, subtexts belonging to each attribute are extracted from a query text to obtain multiple query items; according to the multiple query items, M initial files are recalled, wherein M is an integer greater than 1; for each initial file, a file feature is determined according to interaction behavior information associated with the initial file; and query features of the multiple query items are determined, and according to the query features and the file features, a target file is determined from the M initial files. The present disclosure also provides a file query device, an electronic device and a storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, and more particularly to the fields of machine learning, deep learning, and natural language processing. More specifically, this disclosure provides a document retrieval method, apparatus, electronic device, and storage medium. Background Technology

[0002] As important carriers of knowledge, files are frequently needed in work and daily life, and people often encounter situations where they need to find specific files. Traditional file search methods can be based on the file's subject or content. However, when users forget the file's subject or don't know its content, it becomes difficult to find the file they want. Summary of the Invention

[0003] This disclosure provides a method, apparatus, device, and storage medium for document retrieval.

[0004] According to the first aspect, a file query method is provided, which includes: extracting subtexts belonging to various attributes from query text according to multiple attribute information to obtain multiple query items; recalling M initial files according to the multiple query items, where M is an integer greater than 1; determining file features for each initial file according to interaction behavior information associated with the initial file; and determining the query features of each of the multiple query items, and determining the target file from the M initial files according to the query features and file features.

[0005] According to a second aspect, a file query apparatus is provided, comprising: an extraction module for extracting subtext belonging to various attributes from query text according to multiple attribute information to obtain multiple query items; a recall module for recalling M initial files based on the multiple query items, where M is an integer greater than 1; a file feature determination module for determining file features for each initial file based on interaction behavior information associated with the initial file; and a target file determination module for determining the query features of each of the multiple query items and determining a target file from the M initial files based on the query features and file features.

[0006] According to a third aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform a method provided according to the present disclosure.

[0007] According to a fourth aspect, a non-transitory computer-readable storage medium is provided that stores computer instructions for causing a computer to perform the methods provided in this disclosure.

[0008] According to a fifth aspect, a computer program product is provided, comprising a computer program stored on at least one of a readable storage medium and an electronic device, wherein the computer program, when executed by a processor, implements the method provided in this disclosure.

[0009] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0010] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0011] Figure 1 This is an exemplary system architecture diagram of a document query method and apparatus applicable according to an embodiment of the present disclosure;

[0012] Figure 2 This is a flowchart of a document query method according to an embodiment of the present disclosure;

[0013] Figure 3 This is a schematic diagram of a multi-channel recall method according to an embodiment of the present disclosure;

[0014] Figure 4 This is a schematic diagram illustrating the intersection features between calculated query features and document features according to an embodiment of the present disclosure;

[0015] Figure 5 This is an overall framework diagram of a document query method according to an embodiment of the present disclosure;

[0016] Figure 6 This is a block diagram of a document retrieval apparatus according to an embodiment of the present disclosure;

[0017] Figure 7 This is a block diagram of an electronic device for a document query method according to an embodiment of the present disclosure. Detailed Implementation

[0018] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0019] Files can include documents, images, audio and video, executable programs, web cards, etc. Web cards can include IM (Instant Message) cards in the chat interface of instant messaging software. In work or daily life, users often forget file names and therefore cannot find them. For example, a user may only remember that XX sent the file, but not the specific file name. In such cases, traditional search methods based on file titles and content are difficult to use because there is no matching between the file title and content, making it hard to find the file the user wants. Furthermore, traditional file search often does not support complex search commands expressed in natural language (e.g., "Find the file XX sent me").

[0020] Especially in office settings, with numerous files, users often cannot view every single file in a timely manner and frequently need to go back and search for them. If the filename is forgotten, it becomes very difficult to find the desired file. This results in low file search efficiency, long file search paths, and high file filtering costs.

[0021] Related technologies include rule-based file search methods and semantic-based file search methods. Rule-based methods use predefined rules to match relationships between query statements and files. Rules can be defined based on specific vocabulary, structure, or other standards. However, defining rules is labor-intensive, and a single rule can only solve one problem, resulting in limited effectiveness. As for semantic-based file search methods, while they can match relevant files by understanding user intent, they require a large amount of high-quality training data to achieve accurate semantic search results. Furthermore, semantic-based search performance is also poor for complex search commands expressed in natural language.

[0022] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0023] In the technical solution disclosed herein, the user's authorization or consent is obtained before acquiring or collecting the user's personal information.

[0024] Figure 1 This is a schematic diagram of an exemplary system architecture for applying a document query method and apparatus according to an embodiment of this disclosure. It should be noted that... Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this disclosure, in order to help those skilled in the art understand the technical content of this disclosure, but do not mean that the embodiments of this disclosure cannot be used in other devices, systems, environments or scenarios.

[0025] like Figure 1As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, and 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the terminal devices 101, 102, and 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0026] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Terminal devices 101, 102, and 103 can be various electronic devices, including but not limited to smartphones, tablets, laptops, etc.

[0027] The file query method provided in this disclosure can generally be executed by server 105. Correspondingly, the file query device provided in this disclosure can generally be located in server 105. The file query method provided in this disclosure can also be executed by a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Correspondingly, the file query device provided in this disclosure can also be located in a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105.

[0028] Figure 2 This is a flowchart of a document query method according to an embodiment of the present disclosure.

[0029] like Figure 2 As shown, the file query method 200 includes operations S210 to S240.

[0030] In operation S210, based on multiple attribute information, sub-texts belonging to each attribute are extracted from the query text to obtain multiple query items.

[0031] When searching for files, if users forget the filename and don't know the file content, they prefer to find the document they want by expressing it in natural language. For example, "Find the meeting minutes that XX shared with me in the small team group yesterday." The query text can be this query command expressed in natural language.

[0032] For query commands expressed in natural language, parsing can be performed according to multiple pre-defined slots. For example, each slot contains attribute information, which may include "name," "behavior," "time," "topic," "scene," "file type," etc. Subtext belonging to each attribute can be extracted from the query text and filled into the corresponding slots to obtain multiple query items.

[0033] For example, the query text above can be parsed into the following multiple query items: "Name: XX", "Time: Yesterday", "Action: Sharing", "Topic: Meeting Minutes", "Scenario: Small Team Group", "File Type: Document".

[0034] This embodiment can provide a document retrieval system. Through these query items, the document retrieval system can know that the user wants to find a document "shared by XX", and that the sharing time was yesterday, the sharing scenario was in the "small team group", and if the document is also related to "meeting minutes", it should be ranked higher.

[0035] It should be noted that if the query text does not contain certain attribute information, then the corresponding query item will be empty. For example, if the query text does not contain time information, then the query item for the time attribute can be empty.

[0036] In operation S220, M initial files are retrieved based on multiple query items.

[0037] For example, multiple query terms can be input into a file matching model, which can then retrieve initial files related to those queries from a database. This file matching model can be a trained deep learning model. Furthermore, the file matching model can be based on file interaction behavior information. This interaction behavior information refers to user interactions with files, which can include presentations / screen sharing during meetings, sharing in IM group chats / private chats, and the creation, editing, and browsing of files in a knowledge base.

[0038] For example, during the training phase of a file matching model, the model's input can include at least behavioral attribute query terms. It should be noted that, in addition to behavioral attribute query terms, the model's input can also include at least one of the following: name attribute query terms, time attribute query terms, topic attribute query terms, scene attribute query terms, and type attribute query terms. For example, the model's input could be a file created by XX, a file edited by XX yesterday, a file shared by XX in the small group chat, etc. The model's output can be the file that the model determines is most relevant to this input information. Then, based on the difference between the file the user actually wants and the file output by the model, the loss is determined, and the model's parameters are adjusted based on the loss until the model converges.

[0039] Therefore, the trained file matching model is able to retrieve relevant initial files from the database based on file interaction behavior information.

[0040] In operation S230, for each initial file, file characteristics are determined based on the interaction behavior information associated with that initial file.

[0041] The interaction information associated with the initial file can include user interaction information. This may include the interaction object (e.g., user's name), interaction method (e.g., sharing), interaction time, interaction scenario (e.g., small group chat), interaction topic (e.g., meeting minutes), and file type (e.g., document, image, etc.).

[0042] For each initial file, at least one of the following can be determined as the file feature: interactive behavior mode feature, interactive object feature, interactive time feature, interactive scene feature, and interactive theme feature.

[0043] For example, interactive behavior information can be input into a convolutional network to extract the text features of each interactive behavior, which can then be used as file features. Alternatively, interactive behavior information can be input into a natural language processing model to obtain the semantic features of each interactive behavior, which can then be used as file features.

[0044] It should be noted that for each initial file, if the initial file has multiple interactive behavior information, multiple file features can be obtained. For example, these can include file features corresponding to the sharing behavior, file features corresponding to the creation behavior, file features corresponding to the editing behavior, and so on.

[0045] In operation S240, the query characteristics of each of the multiple query items are determined, and the target file is determined from the M initial files based on the query characteristics and file characteristics.

[0046] Corresponding to the interaction behavior information, the query text can include multiple attribute information such as target behavior mode (e.g., sharing, creating, editing, etc.), target object (e.g., user's name), target time, target scenario (e.g., small group chat), target topic (e.g., meeting minutes), and target type (e.g., document, image, etc.). Correspondingly, multiple query items include target behavior mode query items, target object query items, target time query items, target scenario query items, target topic query items, and target type query items.

[0047] It is possible to identify target behavior characteristics, target object characteristics, target time characteristics, target scene characteristics, target theme characteristics, and target type characteristics, which can be used as query features for multiple query items.

[0048] For example, multiple query terms can be input into a convolutional network to extract the textual features of each query term, which can then be used as query features. Alternatively, multiple query terms can be input into a natural language processing model to obtain the semantic features of each query term, which can also be used as query features.

[0049] Next, based on query features and text features, the target file is determined from the M initial files.

[0050] For example, the correlation (e.g., similarity) between query features and file features of each initial file can be calculated, and the initial file with the highest correlation can be used as the target file.

[0051] Relevance can also be included as a feature dimension, inputting it along with query features and file features into the ranking model to obtain evaluation values ​​for each of the M initial files. These evaluation values ​​are then used to rank the files, and the initial file with the highest evaluation value is selected as the target file. The ranking model can be a machine learning model, such as XGBoost (eXtreme Gradient Boosting) or a random forest model.

[0052] The embodiments of this disclosure extract multiple query items from the query text based on multiple attribute information, recall M initial files using the multiple query items, determine file characteristics based on interaction behavior information with the initial files, and determine the target file based on the query characteristics and file characteristics. This embodiment can find the corresponding file based on the file's interaction behavior information, supports query commands expressed in natural language, and improves file search efficiency.

[0053] It is understood that in this embodiment, even if the user forgets the document topic or is unaware of the file content, the desired document can still be found through search instructions expressed in natural language that include information about file interaction behavior. This can provide more accurate and personalized file retrieval results and improve the user's search experience.

[0054] According to an embodiment of this disclosure, operation S210 includes inputting query text, multiple attribute information, and query constraint information into a large language model to obtain multiple query items. The query constraint information is used to instruct the large language model to extract subtext belonging to each attribute from the query text, and to determine the multiple attribute information and the subtext of each attribute information as multiple query items.

[0055] For example, a Large Language Model (LLM) can be used to parse query text into multiple query terms. The query text, pre-defined slot information, and query constraints can be input into the LLM to obtain multiple query terms. The slot information includes attribute information; each slot has attributes, which can include the aforementioned "name," "behavior," "time," "topic," "scene," and "file type." The query constraints are conventions related to the model's input and output. These conventions instruct the LLM to extract sub-text belonging to each slot from the query text according to the pre-defined slot information and fill the corresponding slots to obtain the query terms.

[0056] Because large language models have powerful natural language understanding capabilities, using them to parse query text into specific query items can accurately understand and locate the user's search intent, thus improving the ability to understand complex search instructions expressed in natural language.

[0057] This embodiment utilizes a large speech model and pre-set slot information to enable the document retrieval system to better understand and meet users' search needs. By parsing users' search commands into specific query items, it can provide more accurate and personalized document retrieval results, improving the user's search experience.

[0058] According to an embodiment of this disclosure, operation S220 can employ a multi-path recall method to recall M initial files.

[0059] Figure 3 This is a schematic diagram of a multi-channel recall method according to an embodiment of the present disclosure.

[0060] like Figure 3 As shown, the multiple recall channels in this embodiment include a recall channel 310 based on interactive behavior, a recall channel 320 based on people around you, and a topic recall channel 330.

[0061] For the interaction-based recall path 310, this embodiment recalls at least one initial file from the database based on the target object query item, target behavior query item, target time query item, target scenario query item, target topic query item, and target type query item. The database may include all file resources, such as files used / displayed / projected in meetings, files shared in IM group chats, files shared in IM private chats, and files created / edited / browsed in the knowledge base, etc.

[0062] The interactive behavior-based recall path 310 may include a first file matching model, the input of which may include multiple query items, and the output may be at least one first initial file most relevant to the multiple query items recalled from the database.

[0063] The first file matching model can be modeled based on file interaction behavior information. For example, during the training phase, the model's input can include at least query terms of behavioral attributes. It should be noted that, in addition to behavioral attribute query terms, the model's input can also include at least one of the following: name attribute query terms, time attribute query terms, topic attribute query terms, scene attribute query terms, and type attribute query terms. Therefore, the trained first file matching model can retrieve relevant initial files from the database based on file interaction behavior information.

[0064] The target object query, target behavior query, target time query, target scene query, target topic query, and target type query can be input into the trained first file matching model to obtain at least one first initial file.

[0065] Regarding the recall path 320 for people around us, this embodiment recalls at least one second initial file from a preset file set based on the target object query item, target behavior query item, target time query item, target scenario query item, target topic query item, and target type query item, wherein the interaction behavior information of the initial file in the preset file set is consistent with at least one of the multiple query items.

[0066] The "people nearby" retrieval pathway 320 may include a second file matching model. The input to this second file matching model may include multiple query items, and the output may be at least one second initial file most relevant to the multiple query items from a preset file set. This "people nearby" retrieval pathway 320 may include a second file matching model, which may also be modeled based on file interaction behavior information. Target object query items, target behavior query items, target time query items, target scene query items, target topic query items, and target type query items can be input into the trained second file matching model to obtain at least one second initial file.

[0067] The difference between the "people nearby" recall pathway 320 and the interaction-based recall pathway 310 is that the interaction-based recall pathway 310 recalls initial files from the database, while the "people nearby" recall pathway 320 recalls initial files from a preset file set. The database can contain the entire initial file set. The preset file set can be a set of initial files that meet predetermined conditions, and this preset file set can be a collection of files from the database.

[0068] The predefined conditions may include that the interactive behavior information of the initial files in the preset file set is consistent with the target object query item. For example, the target object (person's name) of the target object query item belongs to a certain group, and the initial files in the preset file set are all files that have interactive behavior with members of that group (people around them). That is to say, the initial files created, edited, shared, etc. by members of that group are stored in the preset file set, and the initial files that have interactive behavior with people around them can be recalled through the people around them recall path 320.

[0069] The purpose of setting up the "People Nearby" recall channel 320 is to serve as a fallback solution when the query does not include the target object. This channel returns the initial file containing the user's interactions with people nearby, thus preventing the recall file from being empty.

[0070] It should be noted that the predefined conditions may also include the consistency between the interactive behavior information of the initial files in the preset file set and other query items (at least one of the following: target behavior characteristics, target time characteristics, target scene characteristics, and target theme characteristics). Similar to the 320-channel recall mechanism, this limits the search scope of the initial files to a certain range, ensuring that at least the initial files within that range are returned to the user. For example, if the interactive scene in the preset file set matches the target scene in the query item, the initial files under the target scene (e.g., a small team) can be returned.

[0071] For topic recall path 330, this embodiment recalls at least one third initial file from the database based on the target topic query item.

[0072] The topic recall pathway 330 may include a third document matching model, the input of which may include a target topic query, and the output may be to recall at least one third initial document from the database that is most relevant to the target topic query.

[0073] This third-party document matching model can be based on the document's topic. The topic can include the document name and content. For example, for a document, the topic can include the title and content. During the training phase, the model's input can include topic query terms. Therefore, the trained third-party document matching model can retrieve relevant initial documents from the database based on the document's topic.

[0074] The target topic query can be input into a trained third-file matching model to obtain at least one third initial file.

[0075] Next, in this embodiment, at least one first initial file, at least one second initial file, and at least one third initial file are determined as M initial files.

[0076] For example, by recalling 100 first initial files, 100 second initial files, and 100 third initial files through the interaction-based recall pathway 310, the people-around recall pathway 320, and the topic recall pathway 330 respectively, 300 initial files can be obtained.

[0077] This embodiment recalls M initial files through multiple recall pathways, combining recall methods from multiple dimensions such as file interaction behavior information and content theme. This ensures that the files the user wants can be covered in the recall set, providing more possible matching results and more comprehensively meeting the user's search needs.

[0078] It is understandable that the recall path 310 based on interactive behavior is modeled based on file interactive behavior. Therefore, even if a user forgets the specific name of a file, the required file can still be found based on file interactive behavior (such as IM sharing, editing, creation, etc.).

[0079] According to an embodiment of this disclosure, operation S240 includes, for each initial file, determining the correlation between query features and file features of the initial file as cross features; and determining a target file from the M initial files based on the query features, file features, and cross features.

[0080] The following explains the crossover feature.

[0081] Figure 4 This is a schematic diagram illustrating the intersection features between computational query features and document features according to an embodiment of this disclosure.

[0082] like Figure 4 As shown, query feature 410 includes features of multiple query items, such as target behavior (sharing), target object (person's name), target time (yesterday), target scenario (small team group), target topic (meeting minutes), and target type (document).

[0083] For each initial file, file features 420 may include multiple features, such as file feature 421 corresponding to the creation behavior, file feature 422 corresponding to the sharing behavior, etc. File feature 421 includes the interaction behavior method (creation), interaction object (creator), interaction topic (file title), interaction time (creation time), and file type. File feature 422 includes the interaction behavior method (sharing), interaction object (sharer), interaction time (sharing time), and interaction scenario feature (sharing scenario).

[0084] The correlation between each query feature in query feature 410 and file feature 421 can be calculated to obtain cross features related to the creation behavior. These cross features may include at least one of the following: behavior cross features, object cross features, time cross features, scene cross features, topic cross features, and type cross features. The correlation can be a similarity score or a numerical value indicating yes or no. For example, the similarity between the target object feature (person's name) in query feature 410 and the interaction object feature (creator) in file feature 421 can be calculated as an object cross feature. Another example is determining whether the target time (yesterday) in query feature 410 matches the interaction time feature (creation time) in file feature 421; if they match, the time cross feature is 1; otherwise, the time cross feature is 0.

[0085] Similarly, the correlation between each query feature in query feature 410 and file feature 422 can be calculated to obtain cross features related to sharing behavior.

[0086] Next, the cross features related to the creation behavior and the cross features related to the sharing behavior are combined to obtain the overall cross features 430.

[0087] According to embodiments of this disclosure, determining a target file from M initial files based on query features, file features, and cross features includes: determining an evaluation value for each of the M initial files based on query features, file features, and cross features; determining N candidate files from the M initial files based on the evaluation values, where N is an integer greater than 1; and determining the target file from the N candidate files based on the correlation between the query text and the N candidate files.

[0088] According to embodiments of this disclosure, query features 410, file features 420, and cross features 430 can be used as features of multiple dimensions to sort M initial files through multi-feature fusion, thereby determining the target file.

[0089] For example, the XGBoost model can be used as a ranking model that integrates multiple features. The XGBoost model is fast and can be used as a coarse ranking model to quickly determine N candidate files from M initial files, which can then be used as input for subsequent fine ranking.

[0090] For example, query feature 410, file features 420 of each initial file, and cross features 430 between query feature 410 and file features 420 of each initial file can be input into a trained XGBoost model to obtain an evaluation value for each initial file. This evaluation value characterizes the relevance between the initial file and the query feature. By sorting according to relevance, N (e.g., the top 20) initial files can be selected as candidate files from the sorted results.

[0091] Next, the N candidate files can be finely sorted to determine the target file.

[0092] According to embodiments of this disclosure, the query text, N candidate files, and target constraint information are input into a large language model to obtain a target file, wherein the target constraint information is used to instruct the large language model to find the target file most relevant to the query text from the N candidate files.

[0093] In the fine-ranking stage, a large language model can be used to further refine the ranking of the N candidate files returned from the coarse-ranking stage. For example, the query text, N candidate files, and target constraint information are input into the large language model, and the large language model outputs the target document. The target constraint information can represent the conventions related to the model input and output. These conventions include that the model input is the query text and multiple candidate files, and that the model is required to output the candidate file most relevant to the query text as the target file.

[0094] Large language models can more accurately measure the relevance between query text and candidate documents, thus providing more refined document ranking results. Large language models can be based on SFT (Supervised Fine-tuning).

[0095] The fusion ranking method in this embodiment includes two stages: coarse ranking and fine ranking. The coarse ranking stage constructs multi-dimensional features and uses an XGBoost model to return candidate documents, improving the overall document retrieval ranking while maintaining retrieval efficiency. The fine ranking stage uses a large language model to calculate the relevance between the query text and candidate documents, returning a more refined ranking result. This comprehensive method can effectively improve document ranking while maximizing document retrieval efficiency.

[0096] Figure 5 This is an overall framework diagram of a document query method according to an embodiment of the present disclosure.

[0097] This embodiment includes a large language model 510, a query understanding module 520, a multi-path recall module 530, and a fusion ranking module 540.

[0098] When a user searches for a file, they input a search command expressed in natural language into the Query understanding module 520. This search command could be something like, "Find the meeting minutes that XX shared in the small team group yesterday." The Query understanding module 520 inputs the Query, along with multiple preset slot information and query constraints, into the large language model 510. The large language model 510 then parses the query according to multiple preset operations, resulting in multiple query items: "Object: XX", "Behavior: IM sharing", "Time: Yesterday", "Scenario: Small team group", and "Topic: Meeting minutes". It should be noted that slots can also include file type information. Since the Query does not contain file type information, the file type slot can be empty.

[0099] The multi-path recall module 530 includes a recall path based on interaction behavior, a recall path based on nearby people, and a topic-based recall path. The recall path based on interaction behavior is modeled based on file-related interaction behavior information, including meeting presentations / screen sharing, IM group chat / private chat sharing, creation, editing, and browsing. Multiple query items are input into the interaction behavior-based recall path, which retrieves at least one initial file related to each query item from the database. The database can include all file resources, such as files used / presented in meetings, screen shared, files shared in IM group chats, files shared in IM private chats, and files created / edited / browsed in the knowledge base, etc.

[0100] The "people-around" retrieval pathway can also be modeled based on file-based interaction behavior information. Multiple queries are input into the pathway, which then retrieves at least one secondary initial file related to each query from a pre-defined file set. The difference between the "people-around" retrieval pathway and interaction-based retrieval pathways is that the latter limits the search scope of initial files to a certain range, such as a pre-defined file set containing interactions with people within the same group. If the queries do not contain any objects, this "people-around" retrieval pathway can serve as a fallback, returning initial files related to interactions with people in the user's group to prevent empty file retrieval.

[0101] Topic recall pathways can be modeled based on document topics. Topics can include document name and content. For example, for a document, the topic can include title and content. Topic queries can be input into a trained third-party document matching model to obtain at least one third initial document.

[0102] At least one first initial file, at least one second initial file, and at least one third initial file are determined as M initial files, which are used as inputs to the fusion sorting module 540.

[0103] The fusion sorting module 540 includes a coarse sorting stage and a fine sorting stage. In the coarse sorting stage, the query characteristics of each of the multiple query items are first determined, and the file characteristics of each initial file are also determined. Query characteristics include characteristics related to behavior, object, time, topic, and scenario. Each initial file can have multiple file characteristics; for example, file characteristics related to the creation behavior and file characteristics related to the sharing behavior. File characteristics related to the creation behavior include characteristics such as the creator, file title, and creation time, while file characteristics related to the sharing behavior include characteristics such as the sharer, sharing time, and sharing scenario.

[0104] Then, the correlation between each query feature and each file feature can be calculated to obtain the cross features. These cross features can include similarity or a numerical value indicating yes or no. For example, the cross feature between the object query feature and the sharer (creator) could be the similarity between the two. If the time query feature matches the sharing time (or creation time), the cross feature is 1; otherwise, it is 0. In this way, the cross features between each query feature and each file feature can be obtained.

[0105] Next, query features, file features, and cross features can be used as multiple-dimensional features to perform a coarse ranking of the M initial files through multi-feature fusion, resulting in candidate files. For example, the XGBoost model can be used as a coarse ranking model for multi-feature fusion. The query features, file features, and cross features are input into the XGBoost model to obtain the coarse ranking result. The top N initial files from the coarse ranking result are selected as candidate files, and these N candidate files are used as input for fine ranking.

[0106] In the fine-ranking stage, a large language model can be used as the fine-ranking model. The query, N candidate documents, and target constraint information are input into the large language model, and the large language model outputs the target document.

[0107] This embodiment leverages the powerful natural language understanding capabilities of the large language model to accurately pinpoint the user's search intent, thereby improving the document retrieval system's ability to understand complex search commands and enabling users to retrieve documents using natural language.

[0108] Secondly, this embodiment utilizes multiple recall pathways during the file retrieval process, which can more comprehensively meet the user's retrieval needs and provide more possible matching results. Among them, the recall pathway based on user interaction behavior can still find the required document through file interaction behavior even if the user has forgotten the specific name of the file.

[0109] Furthermore, this embodiment employs a multi-feature fusion coarse ranking method and a fine ranking method based on a large language model. The coarse ranking stage combines feature information from multiple dimensions to more comprehensively evaluate the relevance of files. The fine ranking stage uses a large language model to calculate the relevance between the query and the file, returning the target file. This comprehensive method can provide users with more accurate file retrieval results while maximizing file retrieval efficiency.

[0110] Figure 6 This is a block diagram of a document query apparatus according to an embodiment of the present disclosure.

[0111] like Figure 6As shown, the file query device 600 includes an extraction module 601, a recall module 602, a file feature determination module 603, and a target file determination module 604.

[0112] The extraction module 601 is used to extract sub-texts belonging to various attributes from the query text according to multiple attribute information, so as to obtain multiple query items.

[0113] The recall module 602 is used to recall M initial files based on multiple query items, where M is an integer greater than 1.

[0114] The file feature determination module 603 is used to determine file features for each initial file based on the interaction behavior information associated with that initial file.

[0115] The target file determination module 604 is used to determine the query characteristics of each of the multiple query items, and to determine the target file from the M initial files based on the query characteristics and file characteristics.

[0116] According to embodiments of this disclosure, the interaction behavior information includes at least one of the following: interaction behavior mode, interaction object, interaction time, interaction scenario, interaction theme, and file type.

[0117] The file feature determination module 603 is used to determine at least one of the following features as file features: interaction behavior mode feature, interaction object feature, interaction time feature, interaction scene feature, interaction theme feature, and file type feature, based on the interaction behavior information.

[0118] According to embodiments of this disclosure, the attribute information includes one of the following: target behavior mode, target object, target time, target scene, target theme, and target type. The query items include one of the following: target behavior mode query item, target object query item, target time query item, target scene query item, target theme query item, and target type query item.

[0119] The target file determination module 604 is also used to determine the target behavior characteristics, target object characteristics, target time characteristics, target scene characteristics, target theme characteristics, and target type characteristics, which serve as the query characteristics for each of the multiple query items.

[0120] The target file determination module 604 includes a cross feature determination unit and a target file determination unit.

[0121] The cross-feature determination unit is used to determine the correlation between query features and file features of the initial file for each initial file, as cross features.

[0122] The target file determination unit is used to determine the target file from M initial files based on query features, file features, and cross features.

[0123] The cross-feature determination unit includes object cross-feature determination subunit, time cross-feature determination subunit, scene cross-feature determination subunit, theme cross-feature determination subunit, and type cross-feature determination subunit.

[0124] The behavior pattern cross feature determination subunit is used to determine the correlation between the target behavior pattern feature and the document feature, which is used as the behavior pattern cross feature.

[0125] The object cross-feature determination subunit is used to determine the correlation between target object features and file features, which are then used as object cross-features.

[0126] The time-cross feature determination subunit is used to determine the correlation between target time features and file features, which is then used as time-cross features.

[0127] The scene cross-feature determination subunit is used to determine the correlation between target scene features and file features, which are then used as scene cross-features.

[0128] The topic cross-feature determination subunit is used to determine the correlation between target topic features and document features, which is then used as topic cross-features.

[0129] The type cross feature determination subunit is used to determine the correlation between target type features and file features, as type cross features.

[0130] The target document determination unit includes an evaluation value determination subunit, a candidate document determination subunit, and a target document determination subunit.

[0131] The evaluation value determination subunit is used to determine the evaluation value of each of the M initial files based on query item features, file features, and cross features.

[0132] The candidate file determination subunit is used to determine N candidate files from M initial files based on the evaluation values, where N is an integer greater than 1.

[0133] The target file determination subunit is used to determine the target file from the N candidate files based on the correlation between the query text and the N candidate files.

[0134] The target file determination subunit is also used to input the query text, N candidate files and target constraint information into the large language model to obtain the target file. The target constraint information is used to instruct the large language model to find the target file that is most relevant to the query text from the N candidate files.

[0135] The recall module 602 includes a first recall unit, a second recall unit, a third recall unit, and an initial file determination unit.

[0136] The first recall unit is used to recall at least one first initial file from the database based on multiple query items.

[0137] The second recall unit is used to recall at least one second initial file from a preset file set based on multiple query items, wherein the interactive behavior information of the initial file in the preset file set is consistent with at least one of the multiple query items.

[0138] The third recall unit is used to recall at least one third initial file from the database based on the target topic query item.

[0139] The initial file determination unit is used to determine the first initial file, the second initial file, and the third initial file as M initial files.

[0140] The extraction module 601 is used to input the query text, multiple attribute information and query constraint information into the large language model to obtain multiple query items. The query constraint information is used to instruct the large language model to extract the subtext belonging to each attribute from the query text, and to determine the multiple attribute information and the subtext of each attribute as multiple query items.

[0141] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0142] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0143] like Figure 7 As shown, device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 702 or a computer program loaded from storage unit 708 into random access memory (RAM) 703. RAM 703 may also store various programs and data required for the operation of device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via bus 704. Input / output (I / O) interface 705 is also connected to bus 704.

[0144] Multiple components in device 700 are connected to I / O interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of monitors, speakers, etc.; storage unit 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. Communication unit 709 allows device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0145] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as the file query method. For example, in some embodiments, the file query method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the file query method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the file query method by any other suitable means (e.g., by means of firmware).

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

[0147] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0148] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0149] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0150] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0151] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.

[0152] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0153] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A file retrieval method, comprising: Based on multiple attribute information, extract subtext belonging to each attribute from the query text to obtain multiple query items; Based on the multiple query items, a multi-path recall strategy is used to recall M initial files, where M is an integer greater than 1; For each initial file, file characteristics are determined based on the interaction behavior information associated with that initial file. This interaction behavior information includes at least one of the following: interaction behavior method, interaction object, interaction time, interaction scenario, interaction topic, and file type; and Determine the query features of each of the plurality of query items. For each initial file, determine the correlation between the query features and the file features of the initial file as cross features. The cross features include at least one of the following: behavior cross features, object cross features, time cross features, scene cross features, topic cross features, and type cross features. The query features, the file features of each initial file, and the cross features between the query features and the text features of each initial file are input into the coarse ranking model to obtain the evaluation values ​​of each of the M initial files. Based on the evaluation values, N candidate files are determined from the M initial files, where N is an integer greater than 1; and The relevance between the query text and each candidate file is calculated using a large language model, and the target file is determined from the N candidate files based on the relevance. The method of recalling M initial files using a multi-path recall strategy includes: Using the first path, at least one first initial file is retrieved from the database based on the multiple query items; Using a second path, at least one second initial file is retrieved from a preset file set based on the multiple query items; The interactive behavior information of the initial files in the preset file set is consistent with at least one of the plurality of query items, and the preset file set is determined in the following way: In response to the fact that the target object query item among the plurality of query items belongs to a preset group, at least one member associated with the preset group is determined; Files that have been interactively accessed by at least one member are identified from the database and included in the preset file set.

2. The method according to claim 1, wherein, The step of determining file characteristics based on the interaction behavior information associated with each initial file includes: for each initial file, Based on the interaction behavior information, at least one of the following is determined as the file feature: interaction behavior mode feature, interaction object feature, interaction time feature, interaction scene feature, interaction theme feature, and file type feature.

3. The method according to claim 1 or 2, wherein, The attribute information includes one of the following: target behavior, target object, target time, target scenario, target theme, and target type. The query items include one of the following: target behavior query item, target object query item, target time query item, target scenario query item, target theme query item, and target type query item. Determining the query features of each of the multiple query items includes: The target behavior characteristics, target object characteristics, target time characteristics, target scene characteristics, target theme characteristics, and target type characteristics are determined as the query features of each of the multiple query items.

4. The method according to claim 3, wherein, For each initial file, the correlation between the query features and the file features of the initial file is determined, and the cross features include: for each initial file, Determine the correlation between the target behavior feature and the file feature, and use it as the behavior cross feature; Determine the correlation between the target object features and the file features, and use this as the object cross-feature; The correlation between the target time feature and the file feature is determined and used as the time cross feature; The correlation between the target scene features and the file features is determined and used as scene cross features; Determine the correlation between the target topic features and the document features as topic cross features; and The correlation between the target type features and the file features is determined as the type cross features.

5. The method according to claim 1, wherein, The step of using a large language model to calculate the relevance between the query text and each candidate file, and determining the target file from the N candidate files based on the relevance, includes: The query text, the N candidate files, and the target constraint information are input into the large language model to obtain the target file. The target constraint information is used to instruct the large language model to find the target file that is most relevant to the query text from the N candidate files.

6. The method according to claim 3, wherein, The step of recalling M initial files using a multi-path recall strategy based on the multiple query items further includes: Using a third pathway, at least one third initial file is retrieved from the database based on the target topic query; and The first initial file, the second initial file, and the third initial file are determined as the M initial files.

7. The method according to claim 1, wherein, The process of extracting sub-texts belonging to various attributes from the query text based on multiple attribute information yields multiple query items, including: The query text, the multiple attribute information, and the query constraint information are input into the large language model to obtain the multiple query items. The query constraint information is used to instruct the large language model to extract subtexts belonging to each attribute from the query text, and to determine the multiple attribute information and the subtexts of each of the multiple attributes as the multiple query items.

8. A document retrieval device, comprising: The extraction module is used to extract sub-text belonging to each attribute from the query text according to multiple attribute information, and obtain multiple query items; The recall module is used to recall M initial files based on the multiple query items using a multi-path recall strategy, where M is an integer greater than 1; The file feature determination module is used to determine file features for each initial file based on interaction behavior information associated with that initial file. The interaction behavior information includes at least one of the following: interaction behavior method, interaction object, interaction time, interaction scenario, interaction topic, and file type. The target file determination module is used to determine the query features of each of the plurality of query items, and to determine the target file from the M initial files based on the query features and the file features; The target file determination module includes: The cross-feature determination unit is used to determine the correlation between the query feature and the file feature of the initial file for each initial file. The cross-feature includes at least one of the following: behavior cross-feature, object cross-feature, time cross-feature, scene cross-feature, topic cross-feature, and type cross-feature. A coarse ranking unit is used to input the query features, the file features of each initial file, and the cross features between the query features and the text features of each initial file into a coarse ranking model to obtain evaluation values ​​for each of the M initial files, and to determine N candidate files from the M initial files based on the evaluation values, where N is an integer greater than 1; and The fine sorting unit is used to calculate the relevance between the query text and each candidate file using a large language model, and to determine the target file from the N candidate files based on the relevance. The recall module includes: The first recall unit is used to recall at least one first initial file from the database based on the plurality of query items using a first channel; The second recall unit is used to recall at least one second initial file from a preset file set based on the plurality of query items using a second path; The interaction behavior information of the initial files in the preset file set is consistent with at least one of the plurality of query items. The preset file set is determined by: in response to the target object query item in the plurality of query items belonging to a preset group, determining at least one member associated with the preset group; and determining from the database files in which the at least one member has performed interaction behavior as the preset file set.

9. The apparatus according to claim 8, wherein, The file feature determination module is used to determine at least one of the following features based on the interaction behavior information: interaction behavior mode feature, interaction object feature, interaction time feature, interaction scene feature, interaction theme feature, and file type feature, as the file feature.

10. The apparatus according to claim 8 or 9, wherein, The attribute information includes one of the following: target behavior mode, target object, target time, target scene, target theme, and target type. The query items include one of the following: target behavior mode query item, target object query item, target time query item, target scene query item, target theme query item, and target type query item. The target file determination module is further used to determine the target behavior mode feature, target object feature, target time feature, target scene feature, target theme feature, and target type feature as the query features of each of the multiple query items.

11. The apparatus according to claim 10, wherein, The intersection feature determination unit includes: The behavior pattern cross feature determination subunit is used to determine the correlation between the target behavior pattern feature and the file feature, as the behavior pattern cross feature; The object cross-feature determination subunit is used to determine the correlation between the target object features and the file features, as the object cross-feature; The time-crossing feature determination subunit is used to determine the correlation between the target time feature and the file feature, as the time-crossing feature; The scene cross-feature determination subunit is used to determine the correlation between the target scene features and the file features, as scene cross-features; A topic cross-feature determination subunit is used to determine the correlation between the target topic feature and the document feature, as the topic cross-feature; and The type cross feature determination subunit is used to determine the correlation between the target type feature and the file feature, as the type cross feature.

12. The apparatus according to claim 8, wherein, The fine sorting unit is further configured to input the query text, the N candidate files, and the target constraint information into the large language model to obtain the target file, wherein the target constraint information is used to instruct the large language model to find the target file most relevant to the query text from the N candidate files.

13. The apparatus according to claim 10, wherein, The recall module also includes: The third recall unit is configured to recall at least one third initial file from the database using a third channel based on the target topic query item; and An initial file determination unit is used to determine the first initial file, the second initial file, and the third initial file as the M initial files.

14. The apparatus according to claim 8, wherein, The extraction module is used to input the query text, the multiple attribute information, and the query constraint information into the large language model to obtain the multiple query items. The query constraint information is used to instruct the large language model to extract the sub-text belonging to each attribute from the query text, and to determine the multiple attribute information and the sub-text of each of the multiple attributes as the multiple query items.

15. An electronic device comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 7.

16. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 7.

17. A computer program product comprising a computer program stored on at least one of a readable storage medium and an electronic device, the computer program implementing the method according to any one of claims 1 to 7 when executed by a processor.

Citation Information

Patent Citations

  • Recall result sorting method and device, equipment, storage medium and program product

    CN115203275A

  • Contextual document recall

    US20180196812A1