File searching method and device, storage medium and electronic device
By obtaining and specifying the file search range and content in the client's search interface, accurate matching of filenames and file content is achieved, solving the problem of low file search accuracy and improving search efficiency.
Patent Information
- Application Number
- CN202310487770.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-28
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2043-04-28
AI Technical Summary
The accuracy of file retrieval in existing technologies is low, resulting in low search efficiency and a high risk of missed or false detections.
The system retrieves the search content and search range information from the client's search interface, including the path and target file type. It then responds to search instructions to find files whose filenames and file contents contain the search content within the specified range and displays the search results on the interface.
By accurately searching for file names and file contents, missed and false detections are avoided, thus improving the accuracy of file search.
Smart Images

Figure CN116561071B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of financial technology, and more specifically, to a method and apparatus for finding documents, a storage medium, and an electronic device. Background Technology
[0002] Devices often store a large number of files, and when users need to access a file, they often want to locate the specific file directly and accurately. One technique involves searching for the filename containing keywords to find the desired file within the device's storage. However, this method is inefficient because it requires searching all files on the device; it is time-consuming. Furthermore, some files may be what the user wants, but their names may not reflect the search query, potentially leading to missed files.
[0003] There is currently no effective solution to the problem of low accuracy in file retrieval in related technologies. Summary of the Invention
[0004] The main objective of this application is to provide a file retrieval method and apparatus, storage medium and electronic device to solve the problem of low accuracy in file retrieval in related technologies.
[0005] To achieve the above objectives, according to one aspect of this application, a file search method is provided. The method includes: obtaining search content and search range information from a search interface on a client, wherein the search range information includes at least a search path and a target file type; responding to a search instruction obtained from the search interface, searching for files whose filenames include the search content and files whose file content includes the search content within the search range determined by the search range information; and displaying returned target search results on the search interface, wherein the target search results represent files whose filenames include the search content and files whose file content includes the search content found within the search range determined by the search range information.
[0006] Optionally, responding to a search instruction obtained from the search interface, searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information includes: responding to a search instruction obtained from the search interface, searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search path where the file type is the target file type, wherein the search range includes files whose file type is the target file type within the search path; displaying the returned target search results on the search interface includes: displaying the returned first search result on the search interface, wherein the target search result includes the first search result, and the first search result is used to indicate the files whose filenames include the content to be searched and the files whose file content includes the content to be searched found within the search path where the file type is the target file type.
[0007] Optionally, before searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information, the method further includes: obtaining a prohibited search path in the search interface of the client, wherein the prohibited search path is a path included in the search path; the step of searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information in response to a search instruction obtained in the search interface includes: in response to a search instruction obtained in the search interface, the file type in paths other than the prohibited search path in the search path is the target file type. The search scope includes files whose filenames include the content to be searched and files whose content includes the content to be searched. The search range includes files of the target file type in paths other than the prohibited search paths. The returned target search results are displayed on the search interface, including: displaying a second search result on the search interface, wherein the target search result includes the second search result, which indicates that among files of the target file type in paths other than the prohibited search paths, files whose filenames include the content to be searched and files whose content includes the content to be searched are found.
[0008] Optionally, responding to a search instruction obtained from the search interface, searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information includes: responding to a search instruction obtained from the search interface, searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search path where the file type is not the target file type, wherein the search range includes files whose file type is not the target file type within the search path; displaying the returned target search results on the search interface includes: displaying the returned third search results on the search interface, wherein the target search results include the third search results, which represent files whose filenames include the content to be searched and files whose file content includes the content to be searched found within the search path where the file type is not the target file type.
[0009] Optionally, obtaining the search content and search range information in the client's search interface includes: if a first set of paths has been obtained on the search interface, in response to a path configuration instruction obtained on the search interface, obtaining a first current path to be configured, wherein the first set of paths includes N paths, where N is a positive integer greater than or equal to 1; determining whether the paths in the first set of paths contain the first current path; if it is determined that the i-th path in the first set of paths contains the first current path, replacing the i-th path in the first set of paths with the first current path to obtain a second set of paths, wherein the second set of paths is the currently determined search path, and i is a positive integer greater than or equal to 1 and less than or equal to N.
[0010] Optionally, obtaining the search content and search range information in the client's search interface includes: when it is determined that none of the paths in the first group of paths contain the first current path, adding the first current path to the first group of paths to obtain a third group of paths, wherein the third group of paths is the currently determined search path.
[0011] Optionally, obtaining the search content and search range information in the client's search interface includes: if a fourth set of paths has been obtained on the search interface, in response to a path configuration instruction obtained on the search interface, obtaining a second current path to be configured, wherein the fourth set of paths includes M prohibited search paths, where M is a positive integer greater than or equal to 1; determining whether the paths in the fourth set of paths contain the second current path; if it is determined that the j-th path in the fourth set of paths contains the second current path, replacing the j-th path in the fourth set of paths with the second current path to obtain a fifth set of paths, wherein the fifth set of paths is the currently determined prohibited search path, and j is a positive integer greater than or equal to 1 and less than or equal to M.
[0012] Optionally, obtaining the search content and search range information in the client's search interface includes: when it is determined that none of the paths in the fourth group of paths contain the second current path, adding the second current path to the fourth group of paths to obtain a sixth group of paths, wherein the sixth group of paths is the currently determined prohibited search path.
[0013] Optionally, after searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information, the method further includes: during the process of searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information, in response to a search pause command obtained in the search interface, pausing the search for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information; obtaining a prohibited search path in the search interface of the client, wherein the prohibited search path is a path included in the search path; and in response to a search continue command obtained in the search interface, continuing to search for files whose filenames include the content to be searched and files whose file content includes the content to be searched within files of the target file type in paths other than the prohibited search path in the search path, wherein the search range includes files of the target file type in paths other than the prohibited search path in the search path.
[0014] To achieve the above objectives, according to another aspect of this application, a file search apparatus is provided. The apparatus includes: a first acquisition module, configured to acquire search content and search range information from a search interface on a client, wherein the search range information includes at least a search path and a target file type; a first search module, configured to, in response to a search instruction acquired from the search interface, search for files whose filenames include the search content and files whose file content includes the search content within the search range determined by the search range information; and a display module, configured to display the returned target search results on the search interface, wherein the target search results represent files whose filenames include the search content and files whose file content includes the search content found within the search range determined by the search range information.
[0015] This application employs the following steps: obtaining the search content and search range information from the client's search interface; searching for files whose filenames and content include the search content within the search range determined by the search range information; and then returning and displaying the found files on the client's search interface. This avoids missed and false detections of files, solving the problem of low accuracy in file search in related technologies. Therefore, it achieves the effect of improving the accuracy of file search. Attached Figure Description
[0016] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0017] Figure 1 This is a flowchart of a file search method provided according to an embodiment of this application;
[0018] Figure 2 This is a schematic diagram of a file search method according to an embodiment of this application;
[0019] Figure 3 This is a schematic diagram illustrating a configuration of a path to be searched according to an embodiment of this application;
[0020] Figure 4 This is a schematic diagram of a configuration target file type according to an embodiment of this application;
[0021] Figure 5 This is a schematic diagram of a configuration path according to an embodiment of this application;
[0022] Figure 6 This is a schematic diagram illustrating a configuration for disabling path lookup according to an embodiment of this application;
[0023] Figure 7This is a schematic diagram illustrating a paused search according to an embodiment of this application;
[0024] Figure 8 This is a display diagram of the target search results according to an embodiment of this application;
[0025] Figure 9 This is a schematic diagram of a file search device according to an embodiment of this application;
[0026] Figure 10 This is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0027] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0028] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0030] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:
[0031] Sandy Algorithm: Proposed by Daniel M. Sunday in 1990, this string pattern matching algorithm's core idea is that when a mismatch is found in the pattern string during the matching process, the algorithm can skip as many characters as possible to proceed to the next matching step, thereby improving matching efficiency.
[0032] It should be noted that all information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are information and data authorized by the user or fully authorized by all parties. For example, this system has an interface with relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain the relevant information after receiving consent information from the aforementioned user or organization.
[0033] The present invention will now be described in conjunction with preferred implementation steps. Figure 1 This is a flowchart of a file search method provided according to an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:
[0034] Step S101: Obtain the content to be searched and the search range information from the search interface on the client, wherein the search range information includes at least the search path and the target file type;
[0035] Step S102: In response to the search instruction obtained in the search interface, search for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information.
[0036] Step S103: Display the returned target search results on the search interface, wherein the target search results are used to represent files whose filenames include the content to be searched and files whose content includes the content to be searched that are found within the search range determined by the search range information.
[0037] To better understand the file search process in the embodiments of this application, the file search method in the embodiments of this application will be explained and described below with reference to optional embodiments, which may be applicable to, but are not limited to, the embodiments of this application.
[0038] Figure 2 This is a schematic diagram of a file search method according to an embodiment of this application, such as... Figure 2As shown, the search interface 102-1 on client 102 may display, but is not limited to, the search path field, the target file type field, and the search content field. Users can configure the search content and search range information by editing, but is not limited to, the search path field, the target file type field, and the search content field. For example, if the target file type field selects file formats such as csv, log, pdf, ppt, rtf, wps, wpt, xls, xlsm, xlsx, xmind, doc, and docx, and the search content field is edited to "xxx", then the search content obtained in the client's search interface will be "xxx", and the search range information will at least include the search paths "C:\ and E:\" and the target file types "csv, log, pdf, ppt, rtf, wps, wpt, xls, xlsm, xlsx, xmind, doc, and docx".
[0039] In this situation, it is possible, but not limited to, if the run button in search interface 102-1 is clicked, a search instruction can be obtained in search interface 102-1. In this situation, in response to the search instruction obtained in search interface 102-1, it is possible, but not limited to, to search for files whose filenames contain the search term "xxx" and whose file content contains the search term "xxx" within the search range determined by the search range information (equivalent to files in C:\ and E:\ with file types of csv, log, pdf, ppt, rtf, wps, wpt, xls, xlsm, xlsx, xmind, doc, and docx). When the pause button in search interface 102-1 is clicked, the search can pause within the specified search range (equivalent to files in C:\ and E:\ with file types csv, log, pdf, ppt, rtf, wps, wpt, xls, xlsm, xlsx, xmind, doc, and docx) to search for files whose filenames contain the search term "xxx" and whose file content contains the search term "xxx". Furthermore, when the save settings button in search interface 102-1 is clicked, the currently configured search path and target file types can be saved for direct retrieval in future searches.
[0040] The returned target search results are displayed on the search interface 102-1. The target search results are used to indicate the files 3 and 5 whose filenames include the content to be searched "xxx" and the files 1, 2 and 4 whose content includes the content to be searched, which are found within the search range determined by the search range information.
[0041] In detail, the search range information can be configured in, but is not limited to, the following ways. Figure 3 This is a schematic diagram illustrating the configuration of a path to be searched according to an embodiment of this application, such as... Figure 3 As shown, users can select the search path by clicking the selection button in the "Search Path" field. Users can select, but are not limited to, a folder or file, and can select multiple files. For example, if local disks (C:) and (E:) are selected from the candidate search paths, while local disks (F:) and (G:) are not selected, then the search paths will be C:\ and E:\. In this way, the search is performed only on the limited selected files or folders, thus improving search efficiency.
[0042] Figure 4 This is a schematic diagram of a configuration target file type according to an embodiment of this application, such as... Figure 4 As shown, users can select the target file type by clicking the "Select Target File Type" button. For example, the default target file types are csv, log, pdf, ppt, pptm, pptx, rtf, txt, wps, wpt, xls, xlsm, xlsx, xmind, doc, and docx. Users can also enter "File Type 1" in the "Add File Type" field, and subsequent searches will include "File Type 1" as a target file type. Users can also select file types to delete from the displayed file type list; multiple deletions are allowed. In this case, deleted file types will not be included in subsequent searches.
[0043] It should be noted that, in Figure 2 , Figure 3 and Figure 4 This explanation uses the example of the client running on a computer. In fact, the client can run on other terminal devices, and this application does not impose any restrictions on this.
[0044] In the technical solution provided in step 101 above, the client can, but is not limited to, run on a terminal device. The terminal device stores a large number of files. When it is necessary to search for files stored on the client's terminal device, the search scope and search content can, but are not limited to, be configured in the client's search interface. Alternatively, if the client and a remote device have established communication, the search content and search scope information on the remote device can be obtained through the client's search interface, thereby enabling the search for files on the remote device. This approach improves the accuracy of finding the files the user needs.
[0045] Optionally, in the file search method provided in this application embodiment, the content to be searched may include, but is not limited to, at least one of characters, words, numbers, symbols, or letters. The search path in the search scope information may include, but is not limited to, the storage path of the file in the storage space (e.g., disk or hard disk storage space), the access path of the file, or the access path of the storage space used to store the file. The target file type in the search scope information may include, but is not limited to, file format types, such as: csv, log, pdf, ppt, pptm, pptx, rtf, txt, wps, wpt, xls, xlsm, xlsx, xmind, doc, docx, java, .c, .js, etc.
[0046] Optionally, in the file search method provided in this application embodiment, the client may, but is not limited to, run on a terminal device. The terminal device may be a terminal device configured with a client, and may include, but is not limited to, at least one of the following: mobile phone (such as Android phone, iOS phone, etc.), laptop computer, tablet computer, PDA, MID (Mobile Internet Devices), PAD, desktop computer, smart TV, etc. The target client may be a video client, instant messaging client, browser client, educational client, etc.
[0047] In an exemplary embodiment, the search content and search range information can be obtained in the client's search interface in the following ways, but not limited to: if a first set of paths has been obtained on the search interface, in response to a path configuration instruction obtained on the search interface, a first current path to be configured is obtained, wherein the first set of paths includes N paths, where N is a positive integer greater than or equal to 1; it is determined whether the paths in the first set of paths contain the first current path; if it is determined that the i-th path in the first set of paths contains the first current path, the i-th path in the first set of paths is replaced with the first current path to obtain a second set of paths, wherein the second set of paths is the currently determined search path, and i is a positive integer greater than or equal to 1 and less than or equal to N.
[0048] Optionally, in the file search method provided in this application embodiment, the user has already configured the content to be searched and the search range information in the client's search interface, obtaining a first set of paths. However, the user may feel that the search path in the search range information is too large or too small. In such cases, the first current path can be configured again, but is not limited to this: if the i-th path in the first set of paths contains the first current path, it can be indicated that the first current path is a sub-path of the i-th path in the first set of paths. For example, if path B contains path A, it can be understood that path A is a sub-path of path B. For example, path B is C:\\, and path A is C:\\Windows. In this case, the i-th path in the first set of paths can be replaced with the first current path. That is, the range of the second set of paths obtained after the replacement is smaller than the range of the first set of paths. In this way, the search path can be flexibly configured according to the user's search needs, improving the user experience.
[0049] In one exemplary embodiment, the search content and search range information can be obtained in the client's search interface in the following manner, but not limited to: when it is determined that none of the paths in the first group of paths contain the first current path, the first current path is added to the first group of paths to obtain a third group of paths, wherein the third group of paths is the currently determined search path.
[0050] Optionally, in the file search method provided in this application embodiment, the user has already configured the content to be searched and the search range information in the client's search interface, obtaining a first set of paths. However, the user may feel that the search path in the search range information is too large or too small. In such cases, the first current path can be configured again, but is not limited to this: if it is determined that none of the paths in the first set of paths contain the first current path, it can be indicated that the first current path is a newly added search path. In this case, the first current path is added to the first set of paths, obtaining a third set of paths. The range of the third set of paths is larger than the range of the first set of paths. In this way, the search path can be flexibly configured according to the user's search needs, improving the user experience.
[0051] In an exemplary embodiment, the search content and search range information can be obtained in the client's search interface in the following ways, but not limited to: if a fourth set of paths has been obtained on the search interface, in response to a path configuration instruction obtained on the search interface, a second current path to be configured is obtained, wherein the fourth set of paths includes M prohibited search paths, where M is a positive integer greater than or equal to 1; it is determined whether the paths in the fourth set of paths contain the second current path; if it is determined that the j-th path in the fourth set of paths contains the second current path, the j-th path in the fourth set of paths is replaced with the second current path to obtain a fifth set of paths, wherein the fifth set of paths is the currently determined prohibited search path, and j is a positive integer greater than or equal to 1 and less than or equal to M.
[0052] Optionally, in the file search method provided in this application embodiment, if M prohibited search paths are already configured in the client's search interface, but the user feels that the range of prohibited search paths is too large or too small, then, in such cases, the second current path can be configured again, but not limited to: If the j-th path in the fourth group of paths contains the second current path, it can be indicated that the second current path is a sub-path of the j-th path in the fourth group of paths. For example, if path B contains path A, it can be understood that path A is a sub-path of path B. For example, path B is C:\\, and path A is C:\\Windows. In this case, the j-th path in the fourth group of paths can be replaced with the second current path. That is, the range of the fifth group of paths obtained after the replacement is smaller than the range of the fourth group of paths. In this way, the search path can be flexibly configured according to the user's search needs, improving the user experience.
[0053] In one exemplary embodiment, the search content and search range information can be obtained in the client's search interface in the following manner, but not limited to: when it is determined that none of the paths in the fourth group of paths contain the second current path, the second current path is added to the fourth group of paths to obtain a sixth group of paths, wherein the sixth group of paths is the currently determined prohibited search path.
[0054] Optionally, in the file search method provided in this application embodiment, if M prohibited search paths are configured in the client's search interface, but the user feels that the range of prohibited search paths is too large or too small, in such cases, the second current path can be configured again, but not limited to: if the second current path is not included in the fourth group of paths, the second current path is added to the fourth group of paths to obtain the sixth group of paths. That is to say, the range of the sixth group of paths obtained after replacement is larger than the range of the fourth group of paths.
[0055] Figure 5 This is a schematic diagram of a configuration path according to an embodiment of this application, such as... Figure 5 As shown, the search paths in client 102's search interface 102-1 are C:\ and E:\, and the prohibited search paths are E:\workspace and C:\. Client 102's search interface 102-1 also includes a prohibited search path field. Users can click the "Exclude Address Field" button to bring up interface 102-2. In interface 102-2, users can click the "Add Path" button to bring up interface 102-3. In interface 102-3, users can select the prohibited search paths. For example, they can select the local disk C containing videos, pictures, desktop, and the local disk C:\ itself as prohibited search paths on local disk C. Alternatively, they can select C:\Window as a prohibited search path from the prohibited search path list in interface 102-2.
[0056] In this case, C:\\ and C:\\Windows are contained within each other, so C:\\ will overwrite C:\\Windows. That is, the C:\\Windows path in the selected set will be deleted and a C:\\ will be added. Conversely, if C:\\Windows is currently selected, but C:\\Windows is selected later, then C:\\Windows will replace C:\\.
[0057] If a user feels that the initial default range C:\\Windows is too narrow and wants to exclude the entire C drive, then selecting the path C:\\, which includes C:\\Windows, will overwrite C:\\Windows, resulting in a broader range of the C drive. If the user selects the C drive but then regrets it, feeling that only a few folders need to be removed from the C drive, then selecting certain folders within the C drive will remove C:\\ from the selected set and replace it with a smaller range of folders, such as C:\\Users, C:\\Temp, etc., indicating that other parts of the C drive besides these two will still be scanned.
[0058] In summary, if the previously selected path and the last selected path are mutually inclusive, the previous path is discarded and replaced with the last selected path. However, if there is no mutual inclusion relationship, simply add a new last selected path.
[0059] In the technical solution provided in step 102 above, the user can configure the search content and search range information in the client's search interface, but not limited to this. If the search content and search range information are obtained in the client's search interface, it indicates that a search instruction has been received. In this case, the search can be conducted within the search range defined by the search range information, searching for files whose filenames include the search content, and files whose content includes the search content. This method achieves accurate file searching, avoiding missed or false positives when the filename does not include the search content but the file content does.
[0060] Optionally, in the file search method provided in this application embodiment, the search for files whose filenames include the content to be searched and files whose file content includes the content to be searched can be achieved by algorithms such as Sandy Algorithm, KMP, BF, BM, or RK, which use search keywords. The file search method in this application embodiment can be explained and illustrated using the Sandy Algorithm as an example, but is not limited to this. The file search method in this application embodiment can be implemented through the following steps, but is not limited to this:
[0061] Target string (equivalent to text content or filename): abcdefghijklmn
[0062] Keywords (equivalent to the content to be searched) ijk
[0063] Step S202: First, compare abc and ijk. It is found that abc and ijk do not match. Then, jump to the end d and check if d exists in the keyword ijk, as shown below:
[0064] Target string: abcdefghijklmn
[0065] Keywords: ijk
[0066] Step S204: If it is determined that d does not exist in the keyword ijk, then shift one position to the right and continue the judgment, comparing efg with ijk, as shown below:
[0067] Target string: abcdefghijklmn
[0068] Keywords: ijk
[0069] If it still doesn't match, jump to the end h and check if h exists in ijk;
[0070] Step S206: If it is determined that h does not exist in ijk, then shift by one position, as shown below:
[0071] Target string: abcdefghijklmn
[0072] Keyword: ijk. In this case, a match was found, indicating that the target string contains the keyword.
[0073] The Sandy algorithm matches the filename and content of the text with the content to be searched. During the matching process, when a mismatch is found in the pattern string, the algorithm skips as many characters as possible to proceed to the next matching step, thereby improving the matching efficiency.
[0074] In an exemplary embodiment, the step of responding to a search instruction obtained from the search interface and searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information includes: responding to a search instruction obtained from the search interface and searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search path where the file type is the target file type, wherein the search range includes files whose file type is the target file type within the search path; displaying the returned target search results on the search interface includes: displaying the returned first search results on the search interface, wherein the target search results include the first search results, and the first search results are used to indicate the files whose filenames include the content to be searched and the files whose file content includes the content to be searched found within the search path where the file type is the target file type.
[0075] Optionally, in the file search method provided in this application embodiment, the target file type may include, but is not limited to, the file type to be searched in the search path. In such a case, files whose file name and file content include the content to be searched can be searched in the files of the target file type in the search path, and the found files can be displayed on the search interface of the client.
[0076] In an exemplary embodiment, before searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information, the method further includes: obtaining a prohibited search path in the search interface of the client, wherein the prohibited search path is a path included in the search path; the step of searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information in response to a search instruction obtained in the search interface includes: in response to a search instruction obtained in the search interface, the file type in the paths in the search path other than the prohibited search path is the target. Among the files of the file type, the search includes files whose filenames include the content to be searched and files whose file content includes the content to be searched. The search scope includes files of the target file type found in paths other than the prohibited search paths within the search path. Displaying the returned target search results on the search interface includes displaying a second search result on the search interface. The target search result includes the second search result, which indicates that among files of the target file type found in paths other than the prohibited search paths within the search path, files whose filenames include the content to be searched and files whose file content includes the content to be searched are found.
[0077] Optionally, in the file search method provided in this application embodiment, the user can configure the prohibited search paths in the search path in the client's search interface. Figure 6 This is a schematic diagram illustrating a path-disabling configuration according to an embodiment of this application, combined with... Figure 2 , Figure 6 As shown, the search interface 102-1 of client 102 also deploys a "Disallow search path" field. Users can click the "Exclude address field" selection button to bring up interface 102-2. In interface 102-2, users can click the "Add path" button to bring up interface 102-3. In interface 102-3, users can select the path to be disallowed, for example, selecting C:\Window on local disk C as the path to be disallowed on local disk C.
[0078] Users can also delete one or more paths from the list of prohibited paths in interface 102-2. There's also a feature to add a condition. Users can enter a keyword containing an asterisk (*) in the text box of the "Add Condition" button in interface 102-2, such as *node_modules*. Since the node_modules folder is included with the Vue framework and contains dependencies for Vue components, including numerous JS and TXT files, searching for it would be extremely time-consuming. With the added fuzzy matching feature, during the actual search, the system will determine if the currently scanned filenames contain the string "node_modules". If they do, it will skip them without searching their contents. After selecting the paths to exclude and clicking to close the pop-up window, the right side of the "Excluded Addresses" field in search interface 102-1 will display the selected paths to be excluded, such as C:\Window and E:\workspace.
[0079] In an exemplary embodiment, the step of responding to a search instruction obtained from the search interface and searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information includes: responding to a search instruction obtained from the search interface and searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search path where the file type is not the target file type, wherein the search range includes files whose file type is not the target file type within the search path; displaying the returned target search results on the search interface includes: displaying the returned third search results on the search interface, wherein the target search results include the third search results, which are used to indicate the files whose filenames include the content to be searched and the files whose file content includes the content to be searched found within the search path where the file type is not the target file type.
[0080] Optionally, in the file search method provided in this application embodiment, the target file type may also be, but is not limited to, a file type that is not intended to be searched, that is, a file type that is prohibited from being searched. In such a case, the file type that is prohibited from being searched may be configured in the search interface of the client, but is not limited to, searching for files whose file type is not the target file type in the search path, and searching for files whose file name includes the content to be searched and whose file content includes the content to be searched.
[0081] In one exemplary embodiment, the search scope information can be reconfigured in the following ways, but not limited to: during the process of searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search scope determined by the search scope information, in response to a search pause command obtained in the search interface, the search for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search scope determined by the search scope information is paused; a prohibited search path is obtained in the search interface of the client, wherein the prohibited search path is a path contained in the search path; in response to a search continue command obtained in the search interface, the search for files whose filenames include the content to be searched and files whose file content includes the content to be searched continues among files of the target file type in paths other than the prohibited search path in the search path, wherein the search scope includes files of the target file type in paths other than the prohibited search path in the search path.
[0082] Optionally, in the file search method provided in this application embodiment, when searching for files whose file type is the target file type in paths other than prohibited search paths, and in the process of continuing to search for files whose file name includes the content to be searched and files whose file content includes the content to be searched, paths that have already been searched in the search range before the search is paused do not need to be searched again.
[0083] Figure 7 This is a schematic diagram illustrating a paused search according to an embodiment of this application, such as... Figure 7 As shown, the search paths in the search interface 102-1 of client 102 are C:\ and E:\, the prohibited search paths are E:\workspace and C:\, the target file types are csv, log, pdf, ppt, rtf, wps, wpt, xls, xlsm, xlsx, xmind, doc and docx, and the content to be searched is 1ax.
[0084] When the user clicks the "Run" button, the system will begin searching for files in the E:\ directory (excluding E:\workspace) containing the filename "1ax" and files whose content also includes "1ax". The search progress will be displayed on screen 102-1, showing the currently scanned files and their types.
[0085] For example, the search progress will display the currently searched path, which may include, but is not limited to, E:\ajax\portalweb\portalweb\nod_modules\echarts\node_modules\tslib\LICENSE.txt. The target file type is txt. This method makes the search process as transparent as possible to the user.
[0086] When searching for files with filenames containing "1ax" and files with content containing "1ax" in the target file types csv, log, pdf, ppt, rtf, wps, wpt, xls, xlsm, xlsx, xmind, doc, and docx within the E:\ directory excluding E:\workspace, if the user notices that some folders don't need scanning in the "Progress" display in interface 102-1, or that some file types don't need scanning in the "Target File Types" row, they can click the "Pause" button in interface 102-1. They can then reconfigure the search path and target file types, and continue searching within the reconfigured search scope for files containing the searched content. Alternatively, they can click the "Stop" button, which will then change to the "Run" button. After reconfiguring the search path and target file types, clicking "Run" will scan according to the newly set search path and target file types, improving the flexibility of the search. After the search is complete, the target search results will be displayed. The target search results include files 6, 7, and 8 whose file contents contain the content to be searched, as well as files 9 and 10 whose file names contain the content to be searched.
[0087] In the technical solution provided in step 103 above, it is possible, but not limited to, to display on the client's search interface files whose filenames include the content to be searched, and files whose content includes the content to be searched.
[0088] Figure 8 This is a display diagram of the target search results according to an embodiment of this application, such as... Figure 8As shown, in the search interface 102-1 of client 102, the search paths are C:\ and G:\, the prohibited search path is C:\Temp, the target file types are csv, log, pdf, ppt, rtf, wps, wpt, xls, xlsm, xlsx, xmind, doc, and docx, and the search content is 2a3b. Upon completion of the search, a message will be displayed indicating the search is complete and the total search time, for example, 0.1 seconds. The search results will then be displayed in search interface 102-1, including files 1, 2, 3, and 4 whose contents include the search content 2a3b; and files 5 and 6 whose filenames also include the search content 2a3b. This method visualizes the search results, improving their readability.
[0089] The file search method provided in this application obtains the content to be searched and the search range information from the client's search interface. Within the search range determined by the search range information, it searches for files whose filenames and contents include the content to be searched. Then, the found files are returned and displayed on the client's search interface. This avoids missed and false detections of files, solving the problem of low accuracy in file search in related technologies. Therefore, it achieves the effect of improving the accuracy of file search.
[0090] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0091] This application also provides a file searching device. It should be noted that the file searching device of this application can be used to execute the file searching method provided in this application. The file searching device provided in this application is described below.
[0092] Figure 9 This is a schematic diagram of a file search device according to an embodiment of this application. Figure 9 As shown, the device includes:
[0093] The first acquisition module 902 is used to acquire the content to be searched and the search range information from the search interface of the client, wherein the search range information includes at least the search path and the target file type.
[0094] The first search module 904 is used to respond to the search instruction obtained in the search interface to search for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information.
[0095] Display module 906 is used to display the returned target search results on the search interface, wherein the target search results are used to represent files whose filenames include the content to be searched and files whose content includes the content to be searched that are found within the search range determined by the search range information.
[0096] Optionally, in the file search device provided in this application embodiment, the first search module includes: a first search unit, configured to, in response to a search instruction obtained in the search interface, search for files whose filenames include the content to be searched and files whose file content includes the content to be searched, in the search path where the file type is the target file type, wherein the search range includes files in the search path where the file type is the target file type; and a display module, including: a first display unit, configured to display a returned first search result on the search interface, wherein the target search result includes the first search result, and the first search result is used to indicate the files whose filenames include the content to be searched and the files whose file content includes the content to be searched, found in the search path where the file type is the target file type.
[0097] Optionally, in the file search device provided in this application embodiment, the device further includes: a second acquisition module, configured to acquire a prohibited search path in the search interface of the client before searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information, wherein the prohibited search path is a path included in the search path; the first search module includes: a second search unit, configured to, in response to a search instruction acquired in the search interface, search for files whose filenames include the content to be searched within the search path other than the prohibited search path, files whose filenames include the content to be searched. The search scope includes files whose filenames include the target file type and files whose content includes the target file type in paths other than the prohibited search paths. The display module includes a second display unit for displaying a returned second search result on the search interface. The target search result includes the second search result, which indicates that among files whose filenames include the target file type in paths other than the prohibited search paths, and files whose content includes the target file type, the found filenames include the target file type, and the found file content includes the target file type.
[0098] Optionally, in the file search device provided in this application embodiment, the first search module includes: a third search unit, configured to, in response to a search instruction obtained in the search interface, search for files whose filenames include the content to be searched and files whose file content includes the content to be searched, in the search path where the file type is not the target file type, wherein the search range includes files in the search path where the file type is not the target file type; and a display module, including: a third display unit, configured to display the returned third search result on the search interface, wherein the target search result includes the third search result, and the third search result is used to indicate the files whose filenames include the content to be searched and the files whose file content includes the content to be searched, found in the search path where the file type is not the target file type.
[0099] Optionally, in the file search device provided in this application embodiment, the first acquisition module includes: a first acquisition unit, configured to acquire a first current path to be configured in response to a path configuration instruction acquired on the search interface when a first group of paths has been acquired on the search interface, wherein the first group of paths includes N paths, and N is a positive integer greater than or equal to 1; a first determination unit, configured to determine whether a path in the first group of paths contains the first current path; and a first replacement unit, configured to replace the i-th path in the first group of paths with the first current path when it is determined that the i-th path in the first group of paths contains the first current path, thereby obtaining a second group of paths, wherein the second group of paths is the currently determined path to be searched, and i is a positive integer greater than or equal to 1 and less than or equal to N.
[0100] Optionally, in the file search device provided in this application embodiment, the first acquisition module includes: a first adding unit, used to add the first current path to the first group of paths to obtain a third group of paths when it is determined that none of the paths in the first group of paths contain the first current path, wherein the third group of paths is the currently determined path to be searched.
[0101] Optionally, in the file search device provided in this application embodiment, the first acquisition module includes: a second acquisition unit, configured to acquire a second current path to be configured in response to a path configuration instruction acquired on the search interface when a fourth group of paths has been acquired on the search interface, wherein the fourth group of paths includes M prohibited search paths, and M is a positive integer greater than or equal to 1; a second determination unit, configured to determine whether the paths in the fourth group of paths contain the second current path; and a second replacement unit, configured to replace the j-th path in the fourth group of paths with the second current path when it is determined that the j-th path in the fourth group of paths contains the second current path, thereby obtaining a fifth group of paths, wherein the fifth group of paths is the currently determined prohibited search path, and j is a positive integer greater than or equal to 1 and less than or equal to M.
[0102] Optionally, in the file search device provided in this application embodiment, the first acquisition module includes: a second addition unit, used to add the second current path to the fourth group of paths when it is determined that none of the paths in the fourth group of paths contain the second current path, to obtain a sixth group of paths, wherein the sixth group of paths is the currently determined prohibited search path.
[0103] Optionally, in the file search device provided in this application embodiment, the device further includes: a pause module, configured to, after searching for files whose filenames include the content to be searched and whose file content includes the content to be searched within the search range determined by the search range information, pause the search for files whose filenames include the content to be searched and whose file content includes the content to be searched within the search range determined by the search range information, in response to a search pause command obtained in the search interface; a third acquisition module, configured to acquire prohibited search paths in the search interface of the client, wherein the prohibited search paths are paths included in the search path; and a second search module, configured to, in response to a search continue command obtained in the search interface, continue searching for files whose filenames include the content to be searched and whose file content includes the content to be searched within files of the target file type in paths other than the prohibited search paths in the search path, wherein the search range includes files of the target file type in paths other than the prohibited search paths in the search path.
[0104] The file search device provided in this application obtains the content to be searched and the search range information from the client's search interface. Within the search range determined by the search range information, it searches for files whose filenames and contents include the content to be searched. Then, it returns and displays the found files on the client's search interface, avoiding missed or false detections of files and solving the problem of low accuracy in file search in related technologies. This achieves the effect of improving the accuracy of file search.
[0105] The file search device includes a processor and a memory. The aforementioned units are all stored in the memory as program units, and the processor executes the aforementioned program units stored in the memory to achieve the corresponding functions.
[0106] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and adjusting kernel parameters can improve the accuracy of file searches.
[0107] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0108] This invention provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements the file search method.
[0109] This invention provides a processor for running a program, wherein the program executes the file search method during runtime.
[0110] like Figure 10 As shown, this embodiment of the invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: obtaining the content to be searched and the search range information from a client's search interface, wherein the search range information includes at least the search path and the target file type; responding to a search instruction obtained from the search interface, searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information; and displaying the returned target search results on the search interface, wherein the target search results represent files whose filenames include the content to be searched and files whose file content includes the content to be searched found within the search range determined by the search range information.
[0111] Optionally, the processor may further implement the following steps when executing the program: The step of searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information, in response to the search instruction obtained from the search interface, includes searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search path where the file type is the target file type, wherein the search range includes files whose file type is the target file type within the search path; The step of displaying the returned target search results on the search interface includes displaying the returned first search result on the search interface, wherein the target search result includes the first search result, and the first search result is used to indicate the files whose filenames include the content to be searched and the files whose file content includes the content to be searched found within the search path where the file type is the target file type.
[0112] Optionally, the processor executing the program may further implement the following steps: before searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information, the method further includes: obtaining a prohibited search path in the search interface of the client, wherein the prohibited search path is a path included in the search path; the step of searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information in response to a search instruction obtained in the search interface includes: in response to a search instruction obtained in the search interface, searching for files in paths other than the prohibited search path within the search path. Among files of the target file type, the search scope includes files whose filenames include the content to be searched and files whose content includes the content to be searched. The search range includes files of the target file type in paths other than the prohibited search paths within the search path. Displaying the returned target search results on the search interface includes displaying a second search result on the search interface. The target search result includes the second search result, which indicates that among files of the target file type in paths other than the prohibited search paths within the search path, files whose filenames include the content to be searched and files whose content includes the content to be searched are found.
[0113] Optionally, the processor may further implement the following steps when executing the program: The step of searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information, in response to the search instruction obtained from the search interface, includes searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search path where the file type is not the target file type, wherein the search range includes files whose file type is not the target file type within the search path; The step of displaying the returned target search result on the search interface includes displaying the returned third search result on the search interface, wherein the target search result includes the third search result, which represents files whose filenames include the content to be searched and files whose file content includes the content to be searched found within the search path where the file type is not the target file type.
[0114] Optionally, the processor may also perform the following steps when executing the program: if a first set of paths has been obtained on the search interface, in response to the path configuration instruction obtained on the search interface, obtain a first current path to be configured, wherein the first set of paths includes N paths, and N is a positive integer greater than or equal to 1; determine whether the paths in the first set of paths contain the first current path; if it is determined that the i-th path in the first set of paths contains the first current path, replace the i-th path in the first set of paths with the first current path to obtain a second set of paths, wherein the second set of paths is the currently determined path to be searched, and i is a positive integer greater than or equal to 1 and less than or equal to N.
[0115] Optionally, when the processor executes the program, it may also perform the following steps: if it is determined that none of the paths in the first group of paths contain the first current path, the first current path is added to the first group of paths to obtain a third group of paths, wherein the third group of paths is the currently determined path to be searched.
[0116] Optionally, the processor may also perform the following steps when executing the program: if a fourth set of paths has been obtained on the search interface, in response to the path configuration instruction obtained on the search interface, obtain the second current path to be configured, wherein the fourth set of paths includes M prohibited search paths, where M is a positive integer greater than or equal to 1; determine whether the paths in the fourth set of paths contain the second current path; if it is determined that the j-th path in the fourth set of paths contains the second current path, replace the j-th path in the fourth set of paths with the second current path to obtain a fifth set of paths, wherein the fifth set of paths is the currently determined prohibited search path, and j is a positive integer greater than or equal to 1 and less than or equal to M.
[0117] Optionally, when the processor executes the program, it may also perform the following steps: if it is determined that none of the paths in the fourth group of paths contain the second current path, the second current path is added to the fourth group of paths to obtain a sixth group of paths, wherein the sixth group of paths is the currently determined prohibited search path.
[0118] Optionally, the processor may further implement the following steps when executing the program: During the process of searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information, in response to a search pause command obtained from the search interface, pausing the search for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information; obtaining a prohibited search path from the search interface on the client, wherein the prohibited search path is a path included in the search path; and in response to a search continue command obtained from the search interface, continuing to search for files whose filenames include the content to be searched and files whose file content includes the content to be searched within files of the target file type in paths other than the prohibited search path in the search path, wherein the search range includes files of the target file type in paths other than the prohibited search path in the search path.
[0119] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.
[0120] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: obtaining search content and search range information from a client's search interface, wherein the search range information includes at least a search path and a target file type; responding to a search instruction obtained from the search interface, searching for files whose filenames include the search content and files whose file content includes the search content within the search range determined by the search range information; displaying the returned target search results on the search interface, wherein the target search results are used to represent files whose filenames include the search content and files whose file content includes the search content found within the search range determined by the search range information.
[0121] Optionally, when the above-mentioned computer program product is executed on a data processing device, it is suitable to execute a program that initializes with the following method steps: The step of searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information, in response to a search instruction obtained from the search interface, includes: searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within files of the target file type in the search path, wherein the search range includes files of the target file type in the search path; and the step of displaying the returned target search results on the search interface includes: displaying the returned first search result on the search interface, wherein the target search result includes the first search result, which indicates that files whose filenames include the content to be searched and files whose file content includes the content to be searched were found within files of the target file type in the search path.
[0122] Optionally, when the above-mentioned computer program product is executed on a data processing device, it is suitable to execute a program that initializes with the following method steps: before searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information, the method further includes: obtaining a prohibited search path in the search interface of the client, wherein the prohibited search path is a path included in the search path; the step of searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information in response to a search instruction obtained in the search interface includes: in response to a search instruction obtained in the search interface, excluding the prohibited search path in the search path... Among files of the target file type in paths other than the prohibited search path, the search scope includes files whose filenames include the content to be searched and files whose content includes the content to be searched. The search results are displayed on the search interface, including: displaying a second search result on the search interface, where the target search result includes the second search result, which indicates that among files of the target file type in paths other than the prohibited search path, files whose filenames include the content to be searched and files whose content includes the content to be searched are found.
[0123] Optionally, when the above-mentioned computer program product is executed on a data processing device, it is suitable to execute a program that initializes with the following method steps: The step of searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information, in response to a search instruction obtained from the search interface, includes searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within files whose file type is not the target file type in the search path, wherein the search range includes files whose file type is not the target file type in the search path; The step of displaying the returned target search result on the search interface includes displaying the returned third search result on the search interface, wherein the target search result includes the third search result, which represents files whose filenames include the content to be searched and files whose file content includes the content to be searched found within files whose file type is not the target file type in the search path.
[0124] Optionally, when the above-mentioned computer program product is executed on a data processing device, it is suitable to execute a program with the following initialization steps: if a first set of paths has been obtained on the search interface, in response to a path configuration instruction obtained on the search interface, obtain a first current path to be configured, wherein the first set of paths includes N paths, where N is a positive integer greater than or equal to 1; determine whether the paths in the first set of paths contain the first current path; if it is determined that the i-th path in the first set of paths contains the first current path, replace the i-th path in the first set of paths with the first current path to obtain a second set of paths, wherein the second set of paths is the currently determined search path, and i is a positive integer greater than or equal to 1 and less than or equal to N.
[0125] Optionally, when the above-mentioned computer program product is executed on a data processing device, it is suitable to execute an initialization program with the following method steps: if it is determined that none of the paths in the first group of paths contain the first current path, the first current path is added to the first group of paths to obtain a third group of paths, wherein the third group of paths is the currently determined path to be searched.
[0126] Optionally, when the above-mentioned computer program product is executed on a data processing device, it is suitable to execute a program with the following initialization steps: if a fourth group of paths has been obtained on the search interface, in response to the path configuration instruction obtained on the search interface, obtain a second current path to be configured, wherein the fourth group of paths includes M prohibited search paths, where M is a positive integer greater than or equal to 1; determine whether the paths in the fourth group of paths contain the second current path; if it is determined that the j-th path in the fourth group of paths contains the second current path, replace the j-th path in the fourth group of paths with the second current path to obtain a fifth group of paths, wherein the fifth group of paths is the currently determined prohibited search path, and j is a positive integer greater than or equal to 1 and less than or equal to M.
[0127] Optionally, when the above-mentioned computer program product is executed on a data processing device, it is suitable to execute an initialization program with the following method steps: if it is determined that none of the paths in the fourth group of paths contain the second current path, the second current path is added to the fourth group of paths to obtain a sixth group of paths, wherein the sixth group of paths is the currently determined prohibited search path.
[0128] Optionally, when the above-mentioned computer program product is executed on a data processing device, it is suitable to execute a program with the following initialization steps: During the process of searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information, in response to a search pause command obtained from the search interface, pausing the search for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information; obtaining a prohibited search path from the search interface on the client, wherein the prohibited search path is a path included in the search path; and in response to a search continue command obtained from the search interface, continuing to search for files whose filenames include the content to be searched and files whose file content includes the content to be searched within files of the target file type in paths other than the prohibited search path in the search path, wherein the search range includes files of the target file type in paths other than the prohibited search path in the search path.
[0129] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0130] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0131] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0132] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0133] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0134] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0135] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0136] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, 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.
[0137] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0138] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A file search method, characterized in that, include: The search interface on the client obtains the content to be searched and the search range information, wherein the search range information includes at least the search path and the target file type; In response to the search instruction obtained in the search interface, the system searches for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information. The returned target search results are displayed on the search interface, wherein the target search results are used to represent files whose filenames include the content to be searched and files whose content includes the content to be searched that are found within the search range determined by the search range information; After searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information, the method further includes: In the process of searching for files whose filenames include the content to be searched and files whose content includes the content to be searched within the search range determined by the search range information, in response to the search pause command obtained in the search interface, the search for files whose filenames include the content to be searched and files whose content includes the content to be searched within the search range determined by the search range information is paused. Obtain the prohibited search path from the search interface of the client, wherein the prohibited search path is a path contained in the search path; In response to the search continue instruction obtained in the search interface, the search continues to search for files whose file type is the target file type in paths other than the prohibited search paths. The search scope includes files whose file name includes the content to be searched and files whose file content includes the content to be searched.
2. The method according to claim 1, characterized in that, The step of responding to a search instruction obtained in the search interface and searching for files whose filenames include the content to be searched and whose file content includes the content to be searched within the search range determined by the search range information includes: responding to a search instruction obtained in the search interface and searching for files whose filenames include the content to be searched and whose file content includes the content to be searched within the search path where the file type is the target file type, wherein the search range includes files whose file type is the target file type within the search path; Displaying the returned target search results on the search interface includes: displaying the returned first search result on the search interface, wherein the target search result includes the first search result, and the first search result is used to indicate that the file whose file name includes the content to be searched is found in the file of the target file type in the search path, and the file whose file content includes the content to be searched is found.
3. The method according to claim 1, characterized in that, Before searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information, the method further includes: obtaining a prohibited search path in the search interface of the client, wherein the prohibited search path is a path contained in the search path; The step of responding to a search instruction obtained from the search interface and searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information includes: responding to a search instruction obtained from the search interface and searching for files whose file type is the target file type in paths other than the prohibited search paths in the search path, searching for files whose filenames include the content to be searched and files whose file content includes the content to be searched, wherein the search range includes files whose file type is the target file type in paths other than the prohibited search paths in the search path; Displaying the returned target search results on the search interface includes: displaying the returned second search results on the search interface, wherein the target search results include the second search results, and the second search results are used to indicate that among the files of the target file type in the paths to be searched (excluding the prohibited search paths), the found files whose filenames include the content to be searched, and the found files whose content includes the content to be searched.
4. The method according to claim 1, characterized in that, The step of responding to a search instruction obtained from the search interface and searching for files whose filenames include the content to be searched and whose file content includes the content to be searched within the search range determined by the search range information includes: responding to a search instruction obtained from the search interface and searching for files whose filenames include the content to be searched and whose file content includes the content to be searched within the search path where the file type is not the target file type, wherein the search range includes files whose file type is not the target file type within the search path; Displaying the returned target search results on the search interface includes: displaying the returned third search results on the search interface, wherein the target search results include the third search results, and the third search results are used to indicate files whose filenames include the content to be searched and files whose content includes the content to be searched that are found in the search path where the file type is not the target file type.
5. The method according to claim 1, characterized in that, The step of obtaining the search content and search range information from the client's search interface includes: If the first set of paths has been obtained on the search interface, in response to the path configuration instruction obtained on the search interface, the first current path to be configured is obtained, wherein the first set of paths includes N paths, and N is a positive integer greater than or equal to 1. Determine whether the paths in the first group of paths contain the first current path; If it is determined that the i-th path in the first group of paths contains the first current path, the i-th path in the first group of paths is replaced with the first current path to obtain the second group of paths, wherein the second group of paths is the currently determined path to be searched, and i is a positive integer greater than or equal to 1 and less than or equal to N.
6. The method according to claim 5, characterized in that, The step of obtaining the search content and search range information from the client's search interface includes: If it is determined that none of the paths in the first group of paths contain the first current path, the first current path is added to the first group of paths to obtain a third group of paths, wherein the third group of paths is the currently determined path to be searched.
7. The method according to claim 3, characterized in that, The step of obtaining the search content and search range information from the client's search interface includes: If the fourth set of paths has been obtained on the search interface, in response to the path configuration instruction obtained on the search interface, the second current path to be configured is obtained, wherein the fourth set of paths includes M prohibited search paths, where M is a positive integer greater than or equal to 1; Determine whether the path in the fourth group of paths contains the second current path; If it is determined that the j-th path in the fourth group of paths contains the second current path, the j-th path in the fourth group of paths is replaced with the second current path to obtain the fifth group of paths, wherein the fifth group of paths is the currently determined prohibited search path, and j is a positive integer greater than or equal to 1 and less than or equal to M.
8. The method according to claim 7, characterized in that, The step of obtaining the search content and search range information from the client's search interface includes: If it is determined that none of the paths in the fourth group of paths contain the second current path, the second current path is added to the fourth group of paths to obtain the sixth group of paths, wherein the sixth group of paths is the currently determined prohibited search path.
9. A file search device, characterized in that, include: The first acquisition module is used to acquire the content to be searched and the search range information from the search interface of the client, wherein the search range information includes at least the search path and the target file type; The first search module is used to respond to the search instruction obtained in the search interface to search for files whose filenames include the content to be searched and files whose file content includes the content to be searched within the search range determined by the search range information. The display module is used to display the returned target search results on the search interface, wherein the target search results are used to represent files whose filenames include the content to be searched and files whose content includes the content to be searched that are found within the search range determined by the search range information; The device further includes: a pause module, used to pause the search for files whose filenames include the content to be searched and the search for files whose file content includes the content to be searched within the search range determined by the search range information, in response to a search pause command obtained from the search interface. The third acquisition module is used to acquire prohibited search paths from the search interface of the client, wherein the prohibited search paths are paths contained in the search path; The second search module is used to respond to a search continue instruction obtained from the search interface, and to continue searching for files whose file type is the target file type in paths other than the prohibited search paths. The search scope includes files whose file type is the target file type in paths other than the prohibited search paths.
10. A processor, characterized in that, The processor is used to run a program, wherein the program, when running, performs the method according to any one of claims 1 to 8.
11. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method of any one of claims 1 to 8.
Citation Information
Patent Citations
File retrieval method and apparatus and terminal
CN105574062A
Document retrieval device
JP2000029897A