File searching method and device, equipment, medium and product

By displaying a metadata interface on electronic devices and using sandbox isolation and hash algorithms to generate virtual file handles, the problems of privacy leakage and low search efficiency in existing technologies are solved, achieving secure and efficient file search and improving the accuracy and efficiency of the search.

CN121705243APending Publication Date: 2026-03-20VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511912877.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing file search solutions for electronic devices require users to grant permissions to all applications, posing a significant risk of privacy breaches and making it difficult to quickly and accurately locate the desired content.

Method used

By displaying a metadata interface, including virtual file handles and file names of candidate files, responding to user input to display file content, employing a sandbox isolation mechanism and hash algorithm to generate virtual file handles to ensure data security, and obtaining de-identified metadata through cross-application cross-process communication.

Benefits of technology

It improves the security and efficiency of file search, reduces permission dependencies, ensures that private data is not leaked, and enhances the accuracy and recall of search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121705243A_ABST
    Figure CN121705243A_ABST
Patent Text Reader

Abstract

The invention discloses a file searching method, device and equipment, a medium and a product, and belongs to the technical field of electronic equipment. The file search method comprises the steps that in response to a search intention of a user, a first interface is displayed, the first interface comprises metadata, the metadata comprises a virtual file handle and a file name of a candidate file, and the candidate file is associated with the search intention; receiving a first input to target metadata, wherein the target metadata is at least one of the metadata; and in response to the first input, displaying the file content of the target file corresponding to the target metadata.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of electronic equipment technology, specifically relating to a file search method, apparatus, device, medium, and product. Background Technology

[0002] With the widespread use of electronic devices and the increase in storage capacity, users are storing more and more fragmented file data on their devices, such as documents, pictures, videos, audio, and files generated by various applications. How users can quickly and accurately locate the content they need from massive amounts of scattered files has become a core issue affecting the user experience and productivity of electronic devices.

[0003] Current file search solutions mainly rely on system-level global searches. This method can scan all files on an electronic device and create a comprehensive search index, but it requires users to grant permissions to all applications, posing a significant risk of privacy leaks. Summary of the Invention

[0004] The purpose of this application is to provide a file search method, apparatus, device, medium, and product that can ensure the security of file search.

[0005] In a first aspect, embodiments of this application provide a file search method, including: In response to the user's search intent, a first interface is displayed. The first interface includes metadata, which includes virtual file handles and file names of candidate files. The candidate files are associated with the search intent. Receive a first input of target metadata, wherein the target metadata is at least one of the metadata; In response to the first input, display the file content of the target file corresponding to the target metadata.

[0006] Secondly, embodiments of this application provide a file search device, including: The display module is used to display a first interface in response to the user's search intent. The first interface includes metadata, which includes virtual file handles and file names of candidate files. The candidate files are associated with the search intent. The receiving module is used to receive a first input of target metadata, wherein the target metadata is at least one of the metadata; The display module is also used to respond to the first input by displaying the file content of the target file corresponding to the target metadata.

[0007] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the method as described in the first aspect.

[0008] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method as described in the first aspect.

[0009] Fifthly, embodiments of this application provide a chip, which includes a processor and a communication interface, the communication interface and the processor being coupled together, the processor being used to run programs or instructions to implement the steps of the method as described in the first aspect.

[0010] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which, when executed by at least one processor, implements the steps of the method described in the first aspect.

[0011] This embodiment of the application can display a first interface based on the user's search intent. This first interface includes metadata, which includes virtual file handles and file names of candidate files, and the candidate files are associated with the search intent. Only after receiving the first input of the target metadata will the file content of the target file corresponding to the target metadata be further displayed. That is, in response to the user's search intent, this embodiment first displays only the anonymized metadata such as the virtual file handle and file name of the target file, without including the file content, thus ensuring data security. Displaying the file content only after receiving the user's first input of the target metadata does not require prior access to all applications, thereby improving file search security. Attached Figure Description

[0012] Figure 1 A flowchart illustrating a file search method provided in an embodiment of this application; Figure 2 A flowchart illustrating another file search method provided in this application embodiment; Figure 3 A flowchart for determining search intent is provided as an embodiment of this application; Figure 4 A schematic diagram of a first interface provided in an embodiment of this application; Figure 5 A schematic diagram of another first interface provided in an embodiment of this application; Figure 6 A schematic diagram illustrating a metadata display process provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a file search device provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application; Figure 9This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0013] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0014] The terms "first," "second," etc., used in this application's specification are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class, without limiting the number of objects; for example, a first object can be one or more. Furthermore, in the specification, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects have an "or" relationship.

[0015] How users can quickly and accurately locate the content they need from massive, scattered files has become a core issue affecting the user experience and productivity of electronic devices. Current solutions mainly include system-level global search, which requires users to grant full system permissions, posing a significant risk of privacy breaches.

[0016] Therefore, embodiments of this application provide a file search method, apparatus, device, medium, and product that can ensure the security of file search.

[0017] The document search methods, apparatus, devices, media, and products provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.

[0018] Figure 1 This is a flowchart illustrating a file search method provided in an embodiment of this application. This file search method can be applied to electronic devices such as mobile phones, tablets, and laptops. Figure 1 As shown, the file search method may include the following S110-S150.

[0019] S110. In response to the user's search intent, a first interface is displayed. The first interface includes metadata, which includes the virtual file handle and file name of the candidate files. The candidate files are associated with the search intent.

[0020] The search intent, also known as user intent, serves as a bridge connecting the user and the search engine. Based on the search intent, electronic devices can provide users with files that meet their needs. For example, the search intent can be determined based on the user's input search terms, or it can be determined based on the user's input search terms and contextual information. The specific process for determining the search intent can be found in the following embodiments.

[0021] The first interface can be an interface displaying metadata, which can be anonymized data, i.e., data that does not contain private information, thus ensuring security. In some embodiments of this application, the metadata may include virtual file handles and file names of candidate files. Candidate files can be files locally stored on the electronic device and associated with the search intent, or files associated with the search intent across all applications on the electronic device. For example, based on the user's search intent, the electronic device can search all locally stored files to determine candidate files corresponding to the search intent, or search all applications to determine candidate files corresponding to the search intent. Finally, the metadata of the candidate files is returned for the user to select.

[0022] For example, metadata can be displayed in the form of a list on the first interface or in plain text. In some embodiments, the metadata may also include the size of the candidate file, the last modification time, and the source, such as email or social application.

[0023] Table 1 provides an example of a metadata list that can be displayed on the first interface for users to browse and select.

[0024] Table 1

[0025] The virtual file IDs in Table 1 are also the virtual file handles in the above embodiments. Virtual file handles can be generated by the application using a hash algorithm.

[0026] S120, Receive the first input for the target metadata.

[0027] The target metadata is at least one of the metadata. The first input is used to trigger or control the electronic device to select the target file required by the user. Exemplarily, the first input includes, but is not limited to: touch input of the metadata by the user through a touch device such as a finger or stylus, or voice commands input by the user, or specific gestures input by the user, or other feasible inputs, which can be determined according to actual usage needs, and are not limited in this application embodiment. The specific gesture in this application embodiment can be any one of a single-click gesture, a swipe gesture, a drag gesture, a pressure recognition gesture, a long-press gesture, an area change gesture, a double-press gesture, and a double-click gesture; the click input in this application embodiment can be a single-click input, a double-click input, or any number of click inputs, and can also be a long-press input or a short-press input. For example, the first input mentioned above can be: the user's click input of the target metadata.

[0028] In some embodiments, the user can perform the first input for either the virtual file ID or the file name. In this embodiment, the user can select a suitable target file according to their needs.

[0029] S130. In response to the first input, display the file content of the target file corresponding to the target metadata.

[0030] The file content refers to the actual content contained in the target file. For example, after receiving the user's initial input of target metadata, the electronic device can display the file content of the target file corresponding to the target metadata. The target file is the file found by the target application that corresponds to the search intent. There can be one or more target files. When there are multiple target files, these multiple target files can be files of the same type or files of different types. For example, in some embodiments, the target file can be a PDF, DOCX, JPG, PNG, or other similar file types.

[0031] The target file is the file found that corresponds to the search intent. There can be one or more target files. When there are multiple target files, these multiple target files can be files of the same type or files of different types. For example, in some embodiments, the target file can be a PDF, DOCX, JPG, PNG, or other file types. The virtual file handle can be generated by the target application using a hash algorithm when the target file is stored in its sandbox.

[0032] Application sandboxing is a security mechanism that isolates each application in an independent runtime environment, preventing unauthorized access to each other's data. Each application has its own sandbox. The hash algorithm, for example, can be SHA-256. The input to this algorithm can include the storage path of the target file within the target application's sandbox and a secret value defined by the target application. This secret value can be the private key corresponding to each target application or a random number. In other words, the virtual file handle is generated by the target application based on the target file's storage path, secret value, and the SHA-256 algorithm, resulting in an ID. Therefore, in this embodiment, the virtual file handle is the virtual file ID of the target file.

[0033] When a target file is moved or renamed, the target application must synchronously update the virtual file handle corresponding to that target file in the metadata database to ensure consistency with the current path of the target file. When a target file is deleted, its corresponding virtual file handle and metadata records must be removed synchronously. This mechanism ensures that the virtual file handle cannot be reverse-engineered to derive any sensitive information about the file and remains strictly consistent with the file's state throughout its lifecycle. Thus, during file search, only the de-identified data of the target file can be accessed; the actual content and storage location of the file cannot be known or touched. This enables cross-application search functionality and strictly adheres to sandbox isolation principles for security.

[0034] In this embodiment, when a file corresponding to the user's search intent exists in a target application, the target application can return the metadata of the searched target file in response to the received file search request.

[0035] For example, when a user grants permission to display file content outside the target application, after receiving the first input, the electronic device can request the target application to obtain the file content of the target file and display the obtained file content on the first interface for the user to use.

[0036] For example, if the user has not granted permission to display file content outside the target application, the electronic device can redirect to the target application, which then requests temporary permission to open the target file within its scope. The entire file opening process is completed within the target application, thereby ensuring the security of private data.

[0037] This embodiment of the application can display a first interface based on the user's search intent. This first interface includes metadata, which includes virtual file handles and file names of candidate files, and the candidate files are associated with the search intent. Only after receiving the first input of the target metadata will the file content of the target file corresponding to the target metadata be further displayed. That is, in response to the user's search intent, this embodiment first displays only the anonymized metadata such as the virtual file handle and file name of the target file, without including the file content, thus ensuring data security. Displaying the file content only after receiving the user's first input of the target metadata does not require prior access to all applications, thereby improving file search security.

[0038] Figure 2 A flowchart illustrating a file search method provided in this application embodiment. Figure 2 and Figure 1 The difference is that, Figure 2 It also includes S210-S220.

[0039] S210: Receive the first search term entered by the user and context information.

[0040] The first search term is a search term actively entered by the user on the electronic device. For example, the user can enter the first search term through voice, touch, or other means. There can be one or more first search terms. For example, in some embodiments, the first search term may include "contract".

[0041] The contextual information here can be information related to the user's search intent, such as, but not limited to, time contextual information, application contextual information, type contextual information, and behavioral contextual information. Among them, the time contextual information can be automatically determined by the electronic device, for example, it can be automatically limited to the time range of this week or this month, or it can be configured according to the user's needs.

[0042] Application context information can include frequently used applications by the user. That is, the target file that the user needs can be searched for in these frequently used applications. Frequently used applications can be determined based on the user's historical usage behavior. For example, the frequency of a user's use of various applications over a period of time can be counted, and applications with a frequency greater than or equal to a frequency threshold can be selected as frequently used applications and added to the application context information.

[0043] Type context information includes the file type of the target file. For example, the file type can be inferred based on the user's first search term. If the first search term is "contract," the file type can be preliminarily determined to be PDF; if the first search term is "photo," the file type can be preliminarily determined to be JPG. In practical applications, there can be multiple file types, thus avoiding missing some files and improving the accuracy of search results.

[0044] Behavioral context information can include a user's recent search and action history, which can be obtained by querying the history.

[0045] For example, after receiving the first search term entered by the user, the electronic device can predict the file type based on the first search term, and obtain time context information, application context information, type context information, and behavior context information based on the high-frequency applications used by the user in the historical time period and search and operation records, so as to provide a more accurate basis for subsequent file searches.

[0046] S220. Determine the user's search intent based on the first search term and contextual information.

[0047] For example, the user's search intent can be obtained by concatenating the first search term and contextual information. For example, V_query = (Q_original, C_time, C_app, C_type, C_behavior), where V_query represents the search intent, Q_original represents the first search term, and C_time, C_app, C_type, and C_behavior represent time context information, application context information, type context information, and behavior context information, respectively.

[0048] For example, the first search term, time context information, application context information, type context information, and behavior context information can be converted into vectors respectively, and then the vectors corresponding to each information can be concatenated to obtain the search intent.

[0049] This embodiment can combine the user's input search terms with multi-dimensional contextual information related to the search intent to determine the user's search intent, thereby improving the accuracy of search results.

[0050] To further improve the accuracy of search results, in some embodiments, the first search term can be semantically expanded to obtain semantically expanded terms. Based on the first search term, the semantically expanded terms, and contextual information, the user's search intent can be determined. The semantic expansion process for the first search term can be found in the following embodiments.

[0051] In some embodiments, the above-described S220 may include the following steps: Determine the similarity between the first search term and each candidate word in the thesaurus, as well as the semantic relationship between the first search term and each candidate word; Based on similarity and semantic relationships, expandable terms of the first search term are determined from each candidate term; Determine the user's search intent based on the primary search term, expanded terms, and contextual information.

[0052] The thesaurus here can be a locally stored database containing multiple candidate words, providing a basis for expanding the first search term.

[0053] For example, lightweight word vector models such as a distilled version of Sentence-BERT or the FastText model can be used to convert the first search term and each candidate word in the vocabulary into word vectors. Then, based on the word vectors, the similarity between the first search term and each candidate word can be calculated. For example, the cosine similarity between the first search term and each candidate word can be calculated. In practical applications, other lightweight word vector models can also be used.

[0054] For example, candidate words with a similarity greater than or equal to a similarity threshold can be used as the first expanded words of the first search term. Alternatively, the top-N candidate words with the highest similarity can be selected as the first expanded words of the first search term. N is an integer greater than or equal to 1. Taking "contract" as an example, the selected top-N candidate words may include, for example, "agreement," "contract," "agreement," "contract," and "treaty."

[0055] In some embodiments, the first search term can be expanded by incorporating semantic relationships. For example, based on the semantic relationships between the first search term and each candidate term, candidate terms that are semantically related to the first search term can be selected from among the candidate terms as second expanded terms of the first search term.

[0056] The semantic relationships here can include, for example, synonym relationships, hyponym relationships, and related word relationships. Taking "contract" as the first search term, the above thesaurus can return synonyms of "contract" such as "agreement" and "contract", hyponyms of "contract" such as "purchase contract", "labor contract", and "confidentiality agreement", and related words of "contract" such as "Party A", "Party B", "signature", "seal", and "performance".

[0057] For example, the first and second extended terms can be deduplicated, and all the remaining words after deduplication can be used as extended terms of the first search term. For instance, the extended terms obtained based on similarity include "protocol", and the extended terms filtered based on semantic relationships also include "protocol". Therefore, "protocol" can be deduplicated, keeping only one "protocol".

[0058] For example, each extended term can be assigned an initial weight. This weight can be based on the similarity between word vectors or the strength of semantic relationships, resulting in an extended term set S_semantic = {agreement (0.9), contract (0.85), purchase contract (0.8), signature (0.7), ...}. The weights of each extended term can be dynamically adjusted based on user feedback on search results, such as which files were clicked, which were ignored, and which filtering conditions were used, to ensure that file search results closely match the user's personal habits.

[0059] For example, the user's search intent can be obtained by directly concatenating the first search term, expanded terms, and contextual information, such as V_query = (Q_original, S_semantic, C_time, C_app, C_type, C_behavior).

[0060] This embodiment can expand the first search term from different dimensions by combining it with a thesaurus. By combining the first search term, expanded terms, and contextual information, the user's true search intent can be understood more accurately, thereby improving the accuracy of search results.

[0061] In some embodiments, extended words semantically related to the first search term can also be determined based on a dictionary. This dictionary can store each word in the form of a knowledge graph. For example, the knowledge graph can include multiple concept nodes, each with corresponding synonym nodes, hyponym nodes, and related word nodes. In this embodiment, the first search term can be matched with each concept node in the knowledge graph. If the first search term matches a certain concept node, the synonyms, hyponyms, and related words corresponding to that concept node can be directly used as extended words semantically related to the first search term.

[0062] If the first search term does not match any of the concept nodes, the first search term can be matched with the corresponding synonyms of each concept node. If the first search term matches a certain synonym of a concept node, the synonyms, hyponyms, and related words of the concept node corresponding to that synonym can be used as extended words that are semantically related to the first search term.

[0063] For example, concept-entity-synonym relationships can be extracted from CN-DBpedia, Zhishi.me, or industry knowledge graphs to build a dictionary. Alternatively, high-frequency query pairs can be mined from local search logs. For instance, if a user searches for "contract" and then frequently searches for "signing," an association between "contract" and "signing" can be established and stored in a dictionary.

[0064] The following is combined with Figure 3 The process of determining a user's search intent is explained.

[0065] S310. Based on the similarity between the first search term and each candidate term in the thesaurus, select the first extended term.

[0066] S320. Using a dictionary, return a second extended term that is semantically related to the first search term.

[0067] S330. Mix the first and second extended words and remove duplicates to obtain the extended word set.

[0068] S340, integrates multi-dimensional contextual information.

[0069] S350 integrates the first search term, the expanded term set, and contextual information to obtain the user's search intent.

[0070] The file search method provided in this application embodiment will be described below in conjunction with applications in electronic devices and application sandboxes. In some embodiments, after determining the user's search intent, the file search method may further include the following steps: Based on the search intent, generate a query request corresponding to the target application in the electronic device. The query request includes the metadata fields to be returned and the query conditions. Transmit query requests to the target application's sandbox; Based on the query request, the target application's sandbox returns anonymized metadata.

[0071] The target application here can be at least one application installed on the electronic device. In this embodiment, the electronic device can transmit query requests to multiple target applications in parallel according to the user's search intent, thereby improving file search efficiency.

[0072] A query request is used to request a file corresponding to the search intent from the target application. In some embodiments, the query request may include metadata fields to be returned and query conditions. To ensure data security, these fields can be anonymized, such as file size, last modification time, source, and other attributes unrelated to the file content. Query conditions may include file type, the application where the file is located, and time range, and can be determined based on the user's search intent.

[0073] Taking a time range of May 1, 2025 to May 5, 2025 and a file type of PDF as an example, this means that we want to find files with a time range of May 1, 2025 to May 5, 2025 and a file type of PDF.

[0074] For example, electronic devices can convert a user's search intent V_query into a query request that can be recognized by the corresponding application sandbox, thereby improving the accuracy of file searches.

[0075] For example, an electronic device can initiate cross-process communication via ContentResolver to transmit query requests to the sandbox of a target application. Specifically, the electronic device can initiate cross-process communication via ContentResolver to transmit query requests to a private ContentProvider within the target application's sandbox. Different applications have different private ContentProviders within their sandboxes, thus ensuring the security of privacy data.

[0076] After receiving a query request, the target application's sandbox can search for corresponding candidate files in its private database based on the query conditions in the request, and return anonymized metadata based on the metadata fields required in the query request. Once the electronic device receives the anonymized metadata, it can display it on a primary interface for the user to select from. For example, if a target application's sandbox does not find a corresponding file in its private database, it can return an empty search result or no information.

[0077] This embodiment communicates across processes with the sandboxes of various applications, transmitting recognizable query requests to each application's sandbox. Each application's sandbox then searches its private database for the file corresponding to the query request and returns anonymized metadata, ensuring the security of private data. This embodiment can initiate cross-process communication with multiple applications simultaneously, improving file search efficiency.

[0078] To enable users to quickly identify files that meet their needs, in some embodiments, after S110, the file search method may further include the following steps: Based on the virtual file handle, obtain the preview information of the candidate files; Generate abbreviated information for candidate files based on preview information; The first interface also includes abbreviated information of the candidate files corresponding to each metadata.

[0079] The preview information can be information about a portion of a candidate file. In some embodiments, after the electronic device receives the de-identified metadata returned by the sandbox of the target application, it can initiate a file content retrieval request to the private ContentProvider within the sandbox of the target application based on the virtual file handle, i.e., the virtual file ID, in the metadata. After receiving the file content retrieval request, the private ContentProvider of the target application can return preview information of a portion of the target file to the electronic device.

[0080] For example, for text files, an electronic device can obtain the first few pages of text through a text parsing interface and perform keyword analysis on the obtained text to obtain a keyword heatmap. Keywords may include, for example, "Party A," "payment," "2025-06," and "supplementary terms." For image files, the electronic device can obtain low-resolution thumbnails through an Application Programming Interface (API). The aforementioned thumbnail information may include the keyword heatmap corresponding to the text file and the thumbnail of the image file, allowing users to quickly confirm whether the file is the one they need.

[0081] In some embodiments, the electronic device can display each received metadata and the abbreviated information of the candidate file corresponding to each metadata. Through the abbreviated information, the user can understand the general information of each candidate file and thus quickly confirm whether the searched file meets the requirements.

[0082] In some embodiments, abbreviated information can be identified in different ways, such as by color, line thickness, etc., to facilitate user viewing.

[0083] In addition to displaying the metadata of each candidate file found on the first interface, this embodiment can also display the abbreviated information of each candidate file, so that users can clearly understand the information contained in each candidate file, thereby quickly identifying the file that meets their needs and improving the efficiency of file acquisition.

[0084] In some embodiments, such as Figure 4As shown, when a user enters the first search term "contract," the electronic device can respond by displaying the search results on the first interface 401. Besides metadata 402, the first interface 401 can also include multiple filter options 403, such as time-based filters, source-based filters, and type-based filters. For example, time-based filters could include "this week" and "last week," source-based filters could include "WeChat" and "email," and type-based filters could include "PDF" and "DOCX." In practical applications, other filter options may also be included. The electronic device can default to displaying metadata that matches all filter options 403. Alternatively, it can default to displaying PDF files from WeChat this week.

[0085] In some embodiments, the file search method may further include the following steps: Receive a second input for target filter criteria options, wherein the target filter criteria options are at least one of the filter criteria options; In response to the second input, update the metadata displayed on the first screen. The updated metadata corresponds to the target filter options.

[0086] The second input is used to trigger or control the electronic device to select target filtering options. Exemplarily, the second input includes, but is not limited to: touch input from the user via a finger or stylus, voice commands input by the user, specific gestures input by the user, or other feasible inputs. The specific input can be determined according to actual usage needs, and this application embodiment does not limit it. The specific gestures in this application embodiment can be any one of a single-click gesture, a swipe gesture, a drag gesture, a pressure-recognition gesture, a long-press gesture, an area-change gesture, a double-press gesture, or a double-tap gesture. The click input in this application embodiment can be a single-click input, a double-tap input, or any number of clicks, and can also be a long-press input or a short-press input. For example, the aforementioned second input can be: the user's click input on the target filtering options.

[0087] For example, after receiving the second input, the electronic device can update the metadata displayed on the first interface according to the target filter options, so that the updated metadata matches the target filter options.

[0088] Assume there are 50 target files whose metadata matches all filter criteria (option 403). Of these, 45 were modified this week, and 5 were modified last week. Assume the user clicked the time filter option: This Week. Figure 5As shown, the metadata displayed on the first interface 401 has changed from 50 to 45 items. Similarly, when the user clicks on other filter options 403, the electronic device will respond to the user's input in real time and update the displayed metadata. Of course, the user can also select multiple filter options 403, which can be adjusted according to the user's needs. For example, if the currently displayed files do not meet expectations, the user can quickly switch between files by changing the filter options.

[0089] In this embodiment, in addition to displaying the metadata of the searched target files to the user, multiple filtering options are also shown to the user. The user can select the appropriate filtering options according to their needs. Based on the filtering options selected by the user, the electronic device can filter and refresh the acquired metadata locally in real time without having to re-send requests to each target application, thereby greatly improving the interaction efficiency.

[0090] To ensure that users have a full understanding of all files related to the same topic, in some embodiments, after S110, the file search method may further include the following steps: The metadata in the first interface with a similarity greater than or equal to the similarity threshold is aggregated. The similarity is determined based on the file name corresponding to the metadata. The second interface displays the aggregate title and abbreviated information of the candidate files corresponding to each metadata after aggregation.

[0091] For example, the cosine similarity between any two file names can be calculated, and metadata with similarity greater than or equal to a similarity threshold can be selected for aggregation. This aggregation can involve displaying the metadata corresponding to the selected file names with high similarity in one area, for example, on a second interface that can float above the first interface.

[0092] For example, in addition to similarity, other factors can be considered, such as filtering metadata with a similarity greater than or equal to a similarity threshold and similar modification times, and then aggregating this metadata. This allows metadata entries from different applications to be aggregated into a logical group. For example, "MicroX-Cooperation Agreement.pdf" and "Email-Supplementary Agreement.docx" can be aggregated.

[0093] This embodiment can also generate an aggregate title based on the file name corresponding to the aggregated metadata, making it easier for users to understand each file. For example, based on "WeChat-Cooperation Agreement.pdf" and "Email-Supplementary Agreement.docx", an aggregate title "XX Project Contract (WeChat+Email)" can be generated.

[0094] In this embodiment, the aggregation title, each aggregated metadata, and the corresponding target file's abbreviated information can be displayed on the second interface.

[0095] This embodiment can aggregate searched files based on file names and display the aggregate title and the thumbnail information of each file, allowing users to quickly preview multiple files with the same title and thus quickly identify the file they need, improving human-computer interaction efficiency.

[0096] In some embodiments, the electronic device can record in real time which files the user clicked and which filter options were used during the entire file search process, thereby obtaining user feedback data and updating the weights of the aforementioned filtered extended terms and contextual information such as application context information based on the feedback data, so that the search results are as close as possible to the user's personal habits.

[0097] To ensure the security of the file content, in some embodiments, the above-mentioned S130 may include the following steps: In response to the first input, display the file content of the corresponding target file within the target application corresponding to the target metadata.

[0098] For example, after receiving the first input, the electronic device can jump to the target application, which then requests permission from the user to open the actual file within its scope. The electronic device does not need to obtain permissions from all applications beforehand, reducing reliance on permissions and ensuring the security of private data.

[0099] The following is combined with Figure 6 The process of displaying metadata is explained.

[0100] S610. Generate a query request based on the user's search intent.

[0101] S620. Transmit query requests via ContentResolver. For example, a query request can be transmitted to the target application's private ContentProvider via the query method of ContentResolver. This process only requests metadata and does not request file content.

[0102] S630. After receiving the query request, the ContentProvider of the target application sandbox, such as MicroX, queries the corresponding private database and returns a list of de-identified metadata (cursor object).

[0103] S640. When the ContentProvider of the target application sandbox, such as email, receives the query request, it queries the corresponding private database and returns a list of de-identified metadata (cursor object).

[0104] S650. Parse the cursor object and aggregate it to generate a unified list of de-identified metadata, which is the metadata in the above embodiment.

[0105] This embodiment eliminates the privacy risks associated with system-level global search solutions that require high-risk permissions or access to users' original file content by employing virtual file handles and metadata anonymization extraction mechanisms, thus complying with operating system security design principles. Simultaneously, during file search, multi-dimensional information fusion allows for a deeper understanding of users' fragmented and ambiguous search intentions, significantly improving search recall and accuracy. Furthermore, dynamic graphical guidance and logical result aggregation greatly reduce the user's cognitive load, eliminating the need to repeatedly switch between different applications for searches. The entire process from initiating a search to locating the file is shortened, improving efficiency. Moreover, by recording user feedback data, the system continuously learns users' personal habits, making search results increasingly tailored to individual search habits and usage scenarios, achieving personalized intelligent recommendations.

[0106] It should be noted that the file search method provided in this application embodiment can be executed by a file search device or a processing module within that file search device for executing the file search method. This application embodiment uses the execution of the file search method by a file search device as an example to illustrate the file search device provided in this application embodiment.

[0107] Figure 7 This is a schematic diagram of the structure of a file search device provided in an embodiment of this application.

[0108] like Figure 7 As shown, the file search device 700 may include: Display module 701 is used to display a first interface in response to the user's search intent. The first interface includes metadata, which includes virtual file handles and file names of candidate files. The candidate files are associated with the search intent. The receiving module 702 is configured to receive a first input of target metadata, wherein the target metadata is at least one of the metadata; The display module 701 is also used to display the file content of the target file corresponding to the target metadata in response to the first input.

[0109] This embodiment of the application can display a first interface based on the user's search intent. This first interface includes metadata, which includes virtual file handles and file names of candidate files, and the candidate files are associated with the search intent. Only after receiving the first input of the target metadata will the file content of the target file corresponding to the target metadata be further displayed. That is, in response to the user's search intent, this embodiment first displays only the anonymized metadata such as the virtual file handle and file name of the target file, without including the file content, thus ensuring data security. Displaying the file content only after receiving the user's first input of the target metadata does not require prior access to all applications, thereby improving file search security.

[0110] In some possible implementations of the embodiments of this application, the receiving module 702 is further configured to receive the first search term input by the user and context information before the display module 701 displays the first interface in response to the user's search intent; The file search device 700 may also include: The determination module is used to determine the user's search intent based on the first search term and contextual information.

[0111] In some possible implementations of the embodiments of this application, the determining module is specifically used for: Determine the similarity between the first search term and each candidate word in the thesaurus, as well as the semantic relationship between the first search term and each candidate word; Based on similarity and semantic relationships, expandable terms of the first search term are determined from each candidate term; Determine the user's search intent based on the primary search term, expanded terms, and contextual information.

[0112] In some possible implementations of the embodiments of this application, the file search device 700 may further include: The generation module is used to generate a query request corresponding to the target application in the electronic device based on the user's search intent after the determination module determines the search intent. The query request includes the metadata fields to be returned and the query conditions. The sending module is used to transmit query requests to the target application's sandbox; based on the query request, the target application's sandbox returns de-identified metadata.

[0113] In some possible implementations of the embodiments of this application, the file search device 700 may further include: The acquisition module is used to acquire preview information of candidate files based on the virtual file handle after the display module 701 displays the first interface in response to the user's search intent. The generation module is also used to generate thumbnail information for candidate files based on the preview information; The first interface also includes abbreviated information of the candidate files corresponding to each metadata.

[0114] In some possible implementations of the embodiments of this application, the file search device 700 may further include: The aggregation module is used to aggregate metadata in the first interface with a similarity greater than or equal to a similarity threshold after the display module 701 displays the first interface in response to the user's search intent. The similarity is determined based on the file name corresponding to the metadata. The display module 701 is also used to display the aggregation title and the abbreviated information of the candidate files corresponding to each metadata after aggregation on the second interface.

[0115] In some possible implementations of the embodiments of this application, the display module 701 is specifically used for: In response to the first input, display the file content of the corresponding target file within the target application corresponding to the target metadata.

[0116] The file search device in this application embodiment can be a device or a component in an electronic device, such as an integrated circuit or a chip. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.

[0117] The electronic device in this application embodiment can be a terminal with an operating system. The operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system.

[0118] The document search device provided in this application embodiment can achieve... Figures 1 to 6 The various processes in the document search method embodiments can achieve the same technical effect, and will not be described again here to avoid repetition.

[0119] like Figure 8 As shown, this application embodiment also provides an electronic device 800, including a processor 801 and a memory 802. The memory 802 stores programs or instructions that can run on the processor 801. When the program or instructions are executed by the processor 801, they implement the various steps of the above-described file search method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0120] It should be noted that the electronic devices in the embodiments of this application include the mobile terminals and non-mobile terminals mentioned above.

[0121] Figure 9 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application.

[0122] The electronic device 900 includes, but is not limited to, components such as: radio frequency unit 901, network module 902, audio output unit 903, input unit 904, sensor 905, display unit 906, user input unit 907, interface unit 908, memory 909, and processor 910.

[0123] Those skilled in the art will understand that the electronic device 900 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 910 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 9 The structure of the electronic device 900 shown does not constitute a limitation on the electronic device 900. The electronic device 900 may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0124] The display unit 906 is used to display a first interface in response to the user's search intent. The first interface includes metadata, which includes virtual file handles and file names of candidate files. The candidate files are associated with the search intent. User input unit 907 is configured to receive a first input for target metadata, wherein the target metadata is at least one of the metadata; The display unit 906 is also configured to display the file content of the target file corresponding to the target metadata in response to the first input.

[0125] This embodiment of the application can display a first interface based on the user's search intent. This first interface includes metadata, which includes virtual file handles and file names of candidate files, and the candidate files are associated with the search intent. Only after receiving the first input of the target metadata will the file content of the target file corresponding to the target metadata be further displayed. That is, in response to the user's search intent, this embodiment first displays only the anonymized metadata such as the virtual file handle and file name of the target file, without including the file content, thus ensuring data security. Displaying the file content only after receiving the user's first input of the target metadata does not require prior access to all applications, thereby improving file search security.

[0126] In some possible implementations of the embodiments of this application, the processor 910 is further configured to receive a first search term and context information input by the user before the display unit 906 displays the first interface in response to the user's search intent; and determine the user's search intent based on the first search term and context information.

[0127] In some possible implementations of embodiments of this application, the processor 910 is specifically used for: Determine the similarity between the first search term and each candidate word in the thesaurus, as well as the semantic relationship between the first search term and each candidate word; Based on similarity and semantic relationships, expandable terms of the first search term are determined from each candidate term; Determine the user's search intent based on the primary search term, expanded terms, and contextual information.

[0128] In some possible implementations of the embodiments of this application, the processor 910 is further configured to, after determining the user's search intent, generate a query request corresponding to the target application in the electronic device based on the search intent, the query request including metadata fields to be returned and query conditions; transmit the query request to the sandbox of the target application; and, based on the query request, the sandbox of the target application returns de-identified metadata.

[0129] In some possible implementations of the embodiments of this application, the processor 910 is further configured to obtain preview information of candidate files based on the virtual file handle after the display unit 906 displays the first interface in response to the user's search intent; Generate thumbnail information for candidate files based on the preview information; the first interface also includes thumbnail information for each candidate file corresponding to each metadata.

[0130] In some possible implementations of the embodiments of this application, the display unit 906 is also used to respond to the user's search intent, display the first interface, aggregate the metadata in the first interface whose similarity is greater than or equal to the similarity threshold, and the similarity is determined according to the file name corresponding to the metadata; and display the aggregate title and the abbreviated information of the candidate file corresponding to each aggregated metadata on the second interface.

[0131] In some possible implementations of the embodiments of this application, the display unit 906 is specifically used for: In response to the first input, display the file content of the corresponding target file within the target application corresponding to the target metadata.

[0132] It should be understood that, in this embodiment, the input unit 904 may include a graphics processing unit (GPU) 9041 and a microphone 9042. The GPU 9041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 906 may include a display panel 9061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 907 includes at least one of a touch panel 9071 and other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.

[0133] The memory 909 can be used to store software programs and various data. The memory 909 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 909 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 909 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0134] Processor 910 may include one or more processing units; optionally, processor 910 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 910.

[0135] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described file search method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0136] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0137] This application also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-described file search method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0138] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0139] This application provides a computer program product that is stored in a storage medium and executed by at least one processor to implement the various processes of the file search method embodiment described above, and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0140] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0141] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the related technology, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0142] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A file search method, characterized in that, include: In response to the user's search intent, a first interface is displayed. The first interface includes metadata, which includes virtual file handles and file names of candidate files. The candidate files are associated with the search intent. Receive a first input of target metadata, wherein the target metadata is at least one of the metadata; In response to the first input, the file content of the target file corresponding to the target metadata is displayed.

2. The method according to claim 1, characterized in that, Before displaying the first interface in response to the user's search intent, the method further includes: Receive the user's first search term and context information; The user's search intent is determined based on the first search term and the context information.

3. The method according to claim 2, characterized in that, Determining the user's search intent based on the first search term and the context information includes: Determine the similarity between the first search term and each candidate word in the thesaurus, as well as the semantic relationship between the first search term and each of the candidate words; Based on the similarity and semantic relationship, the expanded words of the first search term are determined from each of the candidate words; The user's search intent is determined based on the first search term, the expanded terms, and the context information.

4. The method according to claim 2 or 3, characterized in that, After determining the user's search intent, the method further includes: Based on the search intent, a query request corresponding to the target application in the electronic device is generated. The query request includes metadata fields to be returned and query conditions. Transmit a query request to the sandbox of the target application; Based on the query request, the sandbox of the target application returns anonymized metadata.

5. The method according to any one of claims 1-3, characterized in that, After displaying the first interface in response to the user's search intent, the method further includes: Based on the virtual file handle, obtain the preview information of the candidate file; Generate abbreviated information of the candidate files based on the preview information; The first interface also includes abbreviated information of the candidate files corresponding to each metadata.

6. The method according to any one of claims 1-3, characterized in that, After displaying the first interface in response to the user's search intent, the method further includes: The metadata in the first interface with a similarity greater than or equal to a similarity threshold is aggregated, and the similarity is determined based on the file name corresponding to the metadata. The second interface displays the aggregate title and abbreviated information of the candidate files corresponding to each metadata after aggregation.

7. The method according to any one of claims 1-3, characterized in that, The step of responding to the first input by displaying the file content of the target file corresponding to the target metadata includes: In response to the first input, the file content of the corresponding target file is displayed in the target application corresponding to the target metadata.

8. A file search device, characterized in that, include: A display module is used to display a first interface in response to a user's search intent. The first interface includes metadata, which includes virtual file handles and file names of candidate files, and the candidate files are associated with the search intent. A receiving module is configured to receive a first input of target metadata, wherein the target metadata is at least one of the metadata; The display module is also configured to respond to the first input by displaying the file content of the target file corresponding to the target metadata.

9. The apparatus according to claim 8, characterized in that, The device further includes: The acquisition module is used to acquire preview information of the candidate file based on the virtual file handle after the display module displays the first interface in response to the user's search intent; The generation module is used to generate the thumbnail information of the candidate file based on the preview information; The first interface also includes abbreviated information of the candidate files corresponding to each metadata.

10. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing programs or instructions that can run on the processor, the programs or instructions being executed by the processor to implement the steps of the method as described in any one of claims 1-7.

11. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1-7.

12. A computer program product, characterized in that, The program product is stored in a storage medium, and when executed by at least one processor, the program product implements the steps of the method as described in any one of claims 1-7.