File searching method and device

By combining the keyword combination method of parent directory identification, hash value and file name, the problems of low performance and waste of storage space caused by the single file search mode in the prior art are solved, and efficient and accurate file search is achieved.

CN120371782APending Publication Date: 2025-07-25HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410101300.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-24
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The prior art cannot efficiently support the search mode that distinguishes and does not distinguish between case of file names in file search, resulting in poor file search performance and large computer space.

Method used

The combination method of the first keyword and the second keyword is adopted. The first keyword includes the parent directory identity, hash value and file name fields. The hash value field is generated through hash mapping, and the search for file names is supported that is case-sensitive; the second keyword only includes the parent directory identity and hash value fields, which supports that is case-sensitive search for file names, and further matches through unified file names to resolve hash conflicts.

Benefits of technology

It realizes efficient and accurate file search under different file search modes, reduces computer storage space and improves file search efficiency and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371782A_ABST
    Figure CN120371782A_ABST
Patent Text Reader

Abstract

The invention provides a file searching method and device, and the method comprises the steps: determining a first matching result according to a first keyword of a to-be-searched file and a first keyword of a stock file; and determining a second matching result according to the first matching result and the file matching mode information. The first keyword includes a parent directory identification field, a hash value field, and a file name field. The hash value field is obtained by performing hash mapping according to a unified file name, and the unified file name is a file name field in a unified name format. The file matching mode information represents whether file names are distinguished or not. According to the file searching method provided by the invention, the file searching accuracy and efficiency are higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technologies, and particularly to a file search method and an apparatus thereof. Background Art

[0002] A file in the computer field refers to an independent logical linear space for storing user data, which occupies data space.

[0003] Based on the protocol of a computer operating system, a computer file system only supports one file access protocol. In some cases, the file system needs to support two file search modes of distinguishing between uppercase and lowercase file names and not distinguishing between uppercase and lowercase file names simultaneously.

[0004] Some embodiments adopt different search indexes to traverse and search or use two directory entry tables to search for files in the two cases of distinguishing between uppercase and lowercase file names and not distinguishing between uppercase and lowercase file names, which have problems such as low file search performance and large occupation of computer space. Therefore, how to accurately and efficiently search for files has become a technical problem that needs to be solved urgently. Summary of the Invention

[0005] The present application provides a file search method, a file search apparatus, an electronic device, and a computer-readable storage medium.

[0006] In a first aspect, the present application relates to a file search method, including: determining a first matching result according to a first keyword of a file to be searched and a first keyword of a stored file. Determining a second matching result according to the first matching result and file matching mode information.

[0007] The first keyword includes a parent directory identifier field, a hash value field, and a file name field.

[0008] The hash value field is obtained by performing hash mapping on a unified file name, and the unified file name is a file name field in a unified name format.

[0009] The file matching mode information indicates whether to distinguish between uppercase and lowercase file names. The file matching mode information can be indicated by a terminal device, for example.

[0010] For a file to be searched, searching and matching according to the parent directory identifier and the file name as search indexes can be understood as a way of accurate file search. Therefore, in the case of a successful search, only one result can be found, and this result is one of the results of not distinguishing between uppercase and lowercase file names, and the accurate search is equivalent to the file search method of distinguishing between uppercase and lowercase file names in the present application.

[0011] According to the file search method of the present application, accurate search matching can be achieved by performing search matching between the file to be searched and the existing files through the parent directory identification field, hash value field, and file name field of the first keyword. And the file search method that distinguishes the case of file names can be understood as accurate search matching. Therefore, the file search method of the present application can support the file search method that distinguishes the case of file names. Compared with the method of performing accurate search matching using the parent directory information and file name information as indexes, the first keyword further includes a hash value field, and the hash value field is obtained by performing hash mapping on the unified file name. This enables, for example, the file search method that does not distinguish the case of file names to be supported through the hash value field, that is, the file search methods that distinguish the case of file names and do not distinguish the case of file names can be taken into account.

[0012] In addition, since the hash value is obtained by performing hash mapping on the unified file name, the hash value occupies less computer space compared to the unified file name, so the space occupation is smaller.

[0013] According to the file search method of the present application, for example, the following application can be used to implement a specific example of determining the second matching result based on the first matching result and the file matching mode information: When the first matching result indicates a matching failure and the file matching mode information indicates distinguishing the case of file names, the second matching result indicates a failure to match the file to be searched in the case of distinguishing the case of file names. When the first matching result indicates a successful match and the file matching mode information indicates distinguishing the case of file names, the second matching result indicates a successful match and the file to be searched is an existing file in the case of distinguishing the case of file names.

[0014] The first matching result is determined by performing a file search using the first keyword as an index. Accurate matching can be achieved through the first keyword, and the first matching result is also equivalent to the matching result of the file search method that distinguishes the case of file names. Therefore, when the first matching result indicates a matching failure and the file matching mode information indicates distinguishing the case of file names, the second matching result indicates a failure to match the file to be searched in the case of distinguishing the case of file names. When the first matching result indicates a successful match and the file matching mode information indicates distinguishing the case of file names, the second matching result indicates a successful match and the file to be searched is an existing file in the case of distinguishing the case of file names.

[0015] According to the file search method of the present application, for example, the following application can be used to implement a specific example of determining the second matching result based on the first matching result and the file matching mode information: When the first matching result indicates a matching failure and the file matching mode information indicates not distinguishing the case of file names, the second matching result is determined according to the second keyword of the file to be searched and the second keyword of the existing file.

[0016] The second keyword includes a parent directory identification field and a hash value field.

[0017] The first matching result indicates a matching failure, that is, an exact matching failure. If the file matching mode information indicates that the file name case is not distinguished, then a file search and match is performed without distinguishing the file name case.

[0018] According to the file search method of the present application, a file search and match can be performed without distinguishing the file name case through the second keyword. Since the second keyword includes a parent directory identification field and a hash value field, and the hash value field is obtained by hashing and mapping a unified file name, and the unified file name is a file name with a unified name format, so the search and match based on the unified file name is case-insensitive. For different unified file names, different hash values can be obtained through hash mapping conversion. Therefore, a file search and match can be performed without distinguishing the file name case according to the second keyword to obtain a second matching result.

[0019] Based on the second keyword, at most one target stock file that matches the file to be searched can be matched from the full amount of stock files, and the target stock file is the file to be searched.

[0020] Therefore, according to the present application, when the second keyword of the file to be searched matches the second keyword of a target stock file among N stock files successfully, the second matching result indicates a successful match and the file to be searched is the target stock file without distinguishing the file name case, where N is an integer greater than or equal to 1.

[0021] Based on the second keyword, multiple candidate stock files may be matched from the full amount of stock files, and at most one target stock file among the multiple candidate stock files is the file to be searched.

[0022] For example, when the second keyword of the file to be searched matches the second keyword of M first candidate stock files among N stock files successfully, the second matching result indicates a successful match. The M first candidate stock files here may be generated due to hash conflicts. Therefore, the file search method of the present application may further include: determining a third matching result according to the unified file name of the file to be searched and the unified file name of the first candidate stock file.

[0023] N is an integer greater than or equal to 2, and M is an integer greater than or equal to 2 and less than or equal to N.

[0024] The unified file name is obtained by uniformly converting the file name field.

[0025] According to the file search method of the present application, in the case where multiple first candidate stock files are matched according to the second keyword, further search and match are performed between the file to be searched and the first candidate stock files based on the unified file name to cope with hash conflicts, thereby improving the accuracy of file search.

[0026] Exemplarily, when the unified file name of the file to be searched matches the unified file name of a target stock file among M first candidate stock files, the third matching result indicates a successful match and the file to be searched is the target stock file without distinguishing the case of the file name.

[0027] It is also possible that the unified file name of the file to be searched matches the unified file names of X second candidate stock files among M first candidate stock files. For example, in this case, according to the file search method of the present application, for example, the third matching result indicates a successful match and the file to be searched is at least one target stock file among the X second candidate stock files.

[0028] That is, the file search method that does not distinguish the case of the file name based on the second keyword and the unified file name can successfully match multiple stock files (the successfully matched stock files here are the second candidate stock files). At least one of the multiple second candidate stock files can be used as the target stock file, and the file to be searched is the target stock file.

[0029] Exemplarily, for example, when the third matching result indicates a successful match and the file to be searched is a target stock file among X second candidate stock files without distinguishing the case of the file name, the target stock file can be, for example, the first one among the X second candidate stock files arranged in order according to the preset sorting rule.

[0030] Exemplarily, for example, when the third matching result indicates a successful match and the file to be searched can also be the X second candidate stock files without distinguishing the case of the file name.

[0031] In a second aspect, the present application relates to a file search device, including a first matching module and a second matching module.

[0032] The first matching module is used to determine a first matching result according to the first keyword of the file to be searched and the first keyword of the stock file.

[0033] The directory entry of the stock file includes a first keyword, and the first keyword includes a parent directory identification field, a hash value field, and a file name field. The hash value field is obtained by performing a hash mapping according to the unified file name, and the unified file name is the file name field in the unified name format.

[0034] A second matching module, configured to determine a second matching result according to the first matching result and file matching mode information, where the file matching mode information indicates whether to distinguish between uppercase and lowercase of the file name.

[0035] Exemplarily, the second matching module includes: a second matching sub-module, configured to, when the first matching result indicates a matching failure and the file matching mode information indicates not to distinguish between uppercase and lowercase of the file name, determine the second matching result according to the second keyword of the file to be searched and the second keyword of the stock file.

[0036] The second keyword includes a parent directory identification field and a hash value field.

[0037] Exemplarily, when the second keyword of the file to be searched matches the second keyword of a target stock file among N stock files, the second matching result indicates a matching success and the file to be searched is the target stock file without distinguishing between uppercase and lowercase of the file name, where N is an integer greater than or equal to 1.

[0038] Exemplarily, when the second keyword of the file to be searched matches the second keywords of M first candidate stock files among N stock files, the second matching result indicates a matching success, where N is an integer greater than or equal to 2, M is an integer greater than or equal to 2 and less than or equal to N. The apparatus further includes: a third matching module, configured to determine a third matching result according to the unified file name of the file to be searched and the unified file name of the first candidate stock file, where the unified file name is obtained by uniformly converting the format of the file name field.

[0039] Exemplarily, when the unified file name of the file to be searched matches the unified file name of a target stock file among M first candidate stock files, the third matching result indicates a matching success and the file to be searched is the target stock file without distinguishing between uppercase and lowercase of the file name.

[0040] Exemplarily, when the unified file name of the file to be searched matches the unified file names of X second candidate stock files among M first candidate stock files, the third matching result indicates a matching success and the file to be searched is at least one target stock file among the X second candidate stock files without distinguishing between uppercase and lowercase of the file name, where X is an integer greater than or equal to 2 and less than or equal to M.

[0041] Exemplarily, the second matching module includes: a second matching sub-module, configured to, when the first matching result indicates a matching failure and the file matching mode information indicates to distinguish between uppercase and lowercase of the file name, the second matching result indicates a failure to match the file to be searched while distinguishing between uppercase and lowercase of the file name.

[0042] Exemplarily, the second matching module includes: a second matching sub-module, configured to, when the first matching result indicates a successful match and the file matching mode information indicates case-sensitive file name matching, the second matching result indicates a successful match and the file to be searched is a stock file under case-sensitive file name matching.

[0043] In a third aspect, the present application relates to an electronic device, including a processor and an interface circuit. The interface circuit is configured to receive signals from other electronic devices outside the electronic device and transmit them to the processor, or send signals from the processor to other electronic devices outside the electronic device. The processor is configured to execute the above resource allocation method through logic circuits or by executing code instructions.

[0044] In some applications, the instructions are stored in a memory. The memory is communicatively connected or coupled to the processor.

[0045] In a fourth aspect, the present application relates to a computer-readable storage medium storing computer instructions, wherein when the computer instructions are executed, the computer is caused to execute the above file search method. In some applications, the computer-readable storage medium is a non-transitory storage medium.

[0046] In a fifth aspect, the present application relates to a computer program product, including a computer program. The computer program is stored on a readable storage medium, and when the computer program is executed, the computer is caused to implement the above file search method. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The following introduces the drawings used in the embodiments of the present application.

[0048] Figure 1A Schematically shows a schematic diagram of a directory entry table of a file system in an implementation;

[0049] Figure 1B Schematically shows a schematic diagram of supporting file searches with case-sensitive and case-insensitive file names simultaneously through two directory entry tables in an implementation;

[0050] Figure 2 Schematically shows a schematic diagram of the system architecture of the file search method according to an embodiment of the present disclosure;

[0051] Figure 3A Schematically shows a flowchart of the file search method according to an embodiment of the present disclosure;

[0052] Figure 3B Schematically shows a schematic diagram of the first keyword;

[0053] Figure 4 Schematically shows a schematic diagram of the file to be searched and multiple stock files;

[0054] Figure 5 Schematically shows a flowchart of a file search method according to an embodiment of the present disclosure;

[0055] Figure 6 Schematically shows a block diagram of a file search apparatus according to an embodiment of the present disclosure;

[0056] Figure 7 Schematically shows a block diagram of an electronic device that can implement a resource allocation method according to an embodiment of the present disclosure. Detailed implementation manners

[0057] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0058] The term "and / or" in this document is only used to describe the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone.

[0059] The terms "first" and "second" in the specification and claims of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order of the objects. For example, the first target object and the second target object are used to distinguish different target objects, rather than to describe a specific order of the target objects.

[0060] In the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, using words such as "exemplary" or "for example" is intended to present related concepts in a specific manner.

[0061] It should be understood that in this application, "at least one (item)" means one or more, and "a plurality" means two or more. " / ", used to describe the relationship between associated objects, indicates that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist at the same time. Here, A and B can be singular or plural. The character " / " generally indicates an "or" relationship between the associated objects before and after. "At least one (item) of the following" or its similar expression refers to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0062] The relevant background of the file query method according to the embodiments of the present disclosure will be described in detail below.

[0063] In the computer field, a file refers to an independent logical linear space for storing user data, occupying data space. A file also includes a directory, which refers to a collection of files and is an entity that identifies the parent-child relationship.

[0064] A computer organizes files through a file system and uses two types of metadata, namely, inode (index node) and dentry (directory entry), to represent files in the file system. An inode can be understood as the unique identifier of a file. Through the inode, metadata attributes of the file such as the creation time and file size can be found. A dentry is linked to the inode. The dentry includes, for example, the inode of the parent directory and the file name, and thus the inode of the file can be found.

[0065] Based on the protocol of the computer operating system, a computer file system only supports one file access protocol. For example, the Windows operating system mounts the file system through the Common Internet File System (CIFS) protocol. The CIFS protocol stipulates that file searching is performed in a case-sensitive manner for file names. For example, the Linux operating system mounts the file system through the Network File System (NFS) protocol. The NFS protocol stipulates that file searching is performed in a case-insensitive manner for file names.

[0066] If the file system only supports one file access protocol and the user needs to switch protocols during use, a new file system needs to be created and data migration is required. To enable switching of file access protocols within a single file system, the file system needs to support both case-sensitive and case-insensitive file search modes.

[0067] The storage of files in a computer can be achieved, for example, through storing dentries. For example, a file system includes multiple files, and the dentries of multiple files can form a dentry table. When performing a file search, the file to be searched can be matched with the dentry of each stored file in the dentry table.

[0068] Figure 1A Schematically shows a schematic diagram of the dentry table of a file system in an embodiment. In Figure 1A the example, before " / " is the inode of the parent directory, and after " / " is the file name.

[0069] Combined with Figure 1A , some embodiments support case-sensitive and case-insensitive file searches by traversing the entire parent directory.

[0070] For example, in the case-sensitive file search mode, the inode of the parent directory of the file to be searched and the file name can be used as search indexes to search and match in the dentry table, and the search result is returned. For example, if the inode of the parent directory of the file to be searched is 2 and the file name of the file to be searched is "999999.TXT", then a match can be found in the dentry table.

[0071] For example, in the case-insensitive file search mode, the inode of the parent directory of the file to be searched can be used as the search index, and the file names in the inode of the parent directory are traversed to perform a case-insensitive search and match with the file name of the file to be searched, and the search result is returned. When there are a large number of files in the parent directory, the file search operation needs to traverse all the files in the parent directory and perform a case-insensitive search and match one by one until a match is found. Therefore, the file search performance of this embodiment is relatively low. For example, Figure 1A in the example, if the inode of the parent directory of the file to be searched is 2 and the file name is 999999.txt, then all the stored files with the inode of the parent directory 2 in the dentry table need to be traversed, that is, a total of 1 million stored files from the file name 000000.TXT to the file name 999999.TXT.

[0072] Figure 1B Schematically shows a schematic diagram of a file search that supports case-sensitive and case-insensitive file name differentiation through two dentry tables in one implementation.

[0073] Figure 1B Table A schematically shows a dentry table for case-sensitive file name differentiation. Figure 1B Table B schematically shows a dentry table for case-insensitive file name differentiation.

[0074] Case-sensitive file searches can be performed through Table A. For example, both the parent directory inode and the file name can be used as indices to perform a search and match in Table A to find a file that matches the file to be searched in the case-sensitive mode.

[0075] Case-insensitive file searches can be performed through Table B. For example, both the parent directory inode and the all-lowercase file name can be used as indices to perform a search and match in Table B to find a file that matches the file to be searched in the case-insensitive manner.

[0076] In order to support both case-sensitive and case-insensitive file search methods simultaneously in this implementation, two dentry tables are required. Compared with one dentry table, this implementation requires twice the storage space to store the two dentry tables.

[0077] Figure 2 Schematically shows a schematic diagram of the system architecture of a file search method according to an embodiment of the present disclosure.

[0078] It should be noted that Figure 2 This is only an example of the system architecture of a resource management method and device to which the embodiments of the present disclosure can be applied, to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be applied to other devices, systems, environments or scenarios.

[0079] As Figure 2 shown, the system architecture 200 in the embodiments of the present disclosure may include: terminal devices 201, 202, 203, network 204, and server 205.

[0080] The terminal devices 201, 202, 203 may be various electronic devices with a display and a processor, including but not limited to smartphones, tablets, laptop portable computers, and desktop computers, etc.

[0081] The server 205 may be a server that provides various services. For example, the server 205 may have cloud computing capabilities, that is, the server may include a cloud server or be part of a cloud server.

[0082] The network 204 is a medium for providing a communication link between the terminal devices 201, 202, and 203. The network 204 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.

[0083] Exemplarily, for example, the terminal device may indicate the file to be searched and the file search mode, and the server may execute the file search method of the embodiments of the present disclosure according to the file to be searched and the file search mode indicated by the terminal device. The dentry table may be stored and maintained in the server 205, for example. The file search device of the embodiments of the present disclosure may be provided in the server, for example.

[0084] In some embodiments, the file search method of the embodiments of the present disclosure may also be executed by the terminal device. The dentry table may be stored and maintained in the terminal device, for example. The file search device of the embodiments of the present disclosure may be provided in the terminal device, for example.

[0085] In the above embodiments, the number of the terminal devices 201, 202, 203, the network 204, and the server 205 is only for illustration, and any number of terminal devices 201, 202, 203, network 204, and server 205 may be set according to requirements.

[0086] In order to balance the file search modes that distinguish between uppercase and lowercase file names and do not distinguish between uppercase and lowercase file names and efficiently search for files, the embodiments of the present disclosure provide a file search method.

[0087] Figure 3A The flowchart of the file search method according to an embodiment of the present disclosure is schematically shown.

[0088] As Figure 3A shown, the file search method of an embodiment of the present disclosure includes operation S310 to operation S320.

[0089] In operation S310, a first matching result is determined according to the first keyword of the file to be searched and the first keyword of the stored file.

[0090] Figure 3B The schematic diagram of the first keyword key1 is schematically shown. The first keyword key1 may be understood as a search index, including a parent directory identification field, a hash value field, and a file name field.

[0091] The parent directory identifier field can be understood as a field representing the unique identifier of the parent directory of the current file. Hereinafter, an example will be given by taking the inode of the parent directory characterized by the parent directory field.

[0092] The hash value field is obtained by performing a hash mapping based on the unified file name, and the unified file name is the file name field in the unified name format.

[0093] Hash, that is, Hash, and hash mapping can be understood as a hash function (or hash function). In the file search method of the embodiments of the present disclosure, through the hash mapping, the unified file name can be converted into a hash value. The length of the input of the hash function (that is, the unified file name) can be arbitrary, and through the hash function, a fixed-length output (that is, the hash value) can be obtained. The hash mapping can be understood as a compression mapping, that is, the storage space occupied by the hash value is much smaller than the storage space occupied by the unified file name.

[0094] The file name field can be understood as the initial name of the file set by the user. For example, after the file name is converted in the unified name format, the unified file name can be obtained.

[0095] For example Figure 1B Each directory entry in Table B such as is obtained by uniformly converting the file name to lowercase. Of course, the unified format conversion is not limited to converting to lowercase.

[0096] For example, the "parent directory identifier field", "hash value field", and "file name field" of the first keyword can also be respectively understood as parent directory identifier information, hash value information, and file name information.

[0097] The files in the file system can be understood as stock files. For example, the file system can include multiple stock files. The file system supports maintenance, that is, the user can add, delete, and modify stock files. For each stock file, the operations S310 to S320 of the embodiments of the present disclosure can be performed.

[0098] It can be understood that in a file search scenario, for example, some information related to the file to be searched needs to be used as a search index to perform a search match with the stock files in the file system. The file search method of the embodiments of the present disclosure, for example, includes using the first keyword as a search index to perform a search match with the stock files in the file system. For example, the first keyword of the file to be searched can be generated in advance.

[0099] Exemplarily, for example, the stock files can be stored in a computer in the form of directory entries. The directory entry can include key-value pairs, and the key-value pairs include the first keyword key1 and the value value. The value, for example, represents a file identifier, that is, the unique identifier (inode) of the file.

[0100] In operation S320, a second matching result is determined according to the first matching result and the file matching pattern information.

[0101] The file matching pattern information indicates whether to distinguish between uppercase and lowercase of the file name. The file matching pattern information can be indicated by the terminal device, for example.

[0102] For a file to be searched, searching and matching according to the parent directory identifier and the file name as the search index can be understood as a way of precise file search. Therefore, in the case of a successful search, only one result can be found, and this result is one of the results of matching without distinguishing between uppercase and lowercase of the file name. And the precise search is equivalent to the file search method of distinguishing between uppercase and lowercase of the file name in the embodiments of the present disclosure.

[0103] According to the file search method of the embodiments of the present disclosure, precise search matching between the file to be searched and the existing files can be achieved by using the parent directory identifier field, the hash value field, and the file name field of the first keyword. And the file search method of distinguishing between uppercase and lowercase of the file name can be understood as precise search matching. Therefore, the file search method of the embodiments of the present disclosure can support the file search method of distinguishing between uppercase and lowercase of the file name. Compared with the method of precise search matching using the parent directory information and the file name information as the index, the first keyword further includes a hash value field, and the hash value field is obtained by hash mapping according to the unified file name. This enables, for example, the file search method without distinguishing between file names to be supported through the hash value field, that is, the file search methods of distinguishing between uppercase and lowercase of the file name and not distinguishing between uppercase and lowercase of the file name can be taken into account.

[0104] In addition, since the hash value is obtained by hash mapping of the unified file name, the hash value occupies less computer space than the unified file name, so the space occupation is smaller. For example, in Figure 3B the example, the occupied spaces of the parent directory identifier field, the hash value field, and the file name field are 8B, 8B, and 1 - 255B respectively, the occupied space of the unified file name is also 1 - 255B, and the occupied space of the hash value field obtained after hash mapping of the unified file name is 8B, which is smaller than 1 - 255B.

[0105] A file search method according to another embodiment of the present disclosure. For example, the following embodiments can be used to implement a specific example of determining a second matching result based on a first matching result and file matching pattern information: When the first matching result indicates a matching failure and the file matching pattern information indicates case sensitivity for file names, the second matching result indicates a failure to match the file to be searched in a case-sensitive manner for file names. When the first matching result indicates a successful match and the file matching pattern information indicates case sensitivity for file names, the second matching result indicates a successful match and the file to be searched is a stored file in a case-sensitive manner for file names.

[0106] The first matching result is determined by searching for files using the first keyword as an index. Precise matching can be achieved through the first keyword, and the first matching result is also equivalent to the matching result of a file search method that is case-sensitive for file names. Therefore, when the first matching result indicates a matching failure and the file matching pattern information indicates case sensitivity for file names, the second matching result indicates a failure to match the file to be searched in a case-sensitive manner for file names. When the first matching result indicates a successful match and the file matching pattern information indicates case sensitivity for file names, the second matching result indicates a successful match and the file to be searched is a stored file in a case-sensitive manner for file names.

[0107] Exemplarily, when the directory entry of the stored file includes key-value pairs, and the key-value pairs include a first keyword and a value, where the value represents a file identifier associated with the first keyword, "the file to be searched is a stored file" in the embodiments of the present disclosure can be understood as the file identifier of the file to be searched being the file identifier of the stored file.

[0108] A file search method according to yet another embodiment of the present disclosure. For example, the following embodiments can be used to implement a specific example of determining a second matching result based on a first matching result and file matching pattern information: When the first matching result indicates a matching failure and the file matching pattern information indicates case insensitivity for file names, the second matching result is determined based on the second keyword of the file to be searched and the second keyword of the stored file.

[0109] Figure 3B The second keyword key2 is also schematically shown. As Figure 3B shown, the second keyword includes a parent directory identifier field and a hash value field.

[0110] Since the first keyword includes the fields of the second keyword, the second keyword can also be understood as being determined based on the first keyword.

[0111] The first matching result indicates a matching failure, that is, a precise matching failure. If the file matching pattern information indicates case insensitivity for file names, then a file search and matching that is case-insensitive for file names is performed.

[0112] According to the file search method of the present disclosure embodiment, file search matching regardless of the case of the file name can be performed through the second keyword. Since the second keyword includes a parent directory identification field and a hash value field, and the hash value field is obtained by performing a hash mapping on a unified file name, and the unified file name is a file name with a unified name format, so file search matching based on the unified file name is case-insensitive for the file name. For different unified file names, different hash values can be obtained through hash mapping conversion. Therefore, file search matching regardless of the case of the file name can be performed according to the second keyword, and a second matching result can be obtained.

[0113] Performing search matching based on the first keyword or the second keyword can be understood as using the first keyword or the second keyword as a search index and directly matching it with the full set of stored files in the file system.

[0114] Figure 4 A schematic diagram showing the file to be searched and multiple stored files is shown.

[0115] In Figure 4 the example, the first keyword of each file is schematically shown. For example, before the first " / " in the first parentheses is the parent directory identification, the number between the first " / " and the "-" is the hash value, the unified file name corresponding to the hash value is after the "-", and the file name is after the second " / ".

[0116] As Figure 4 shown, there are the following situations:

[0117] 1) The file names of multiple files are the same and they are located in different parent directories. For example, Figure 4 in the example, the file names of the stored file F1 and the stored file F5 are both ED, but they are located in the parent directory 1 and the parent directory 2 respectively.

[0118] The present disclosure embodiment performs case-sensitive file search based on the first keyword and case-insensitive file search based on the second keyword. Since both the first keyword and the second keyword include a parent directory identification field, files corresponding to the same parent directory and having the same file name / hash value can be accurately found.

[0119] 2) Generally, if the unified file names are the same, the corresponding hash values are also the same. If the unified file names are different, the corresponding hash values are also different. Due to hash conflicts, there may be situations where the unified file names of multiple files are different but the hash values are the same. For example, Figure 4In the example, the unified file names of the stock files F2 and F4 are "xyz" and "rhd" respectively, and the hash values are both "13".

[0120] 3) The file names of multiple files are different, but the unified file names are the same. For example, Figure 5 In the example, the file names of the stock files F2 and F3 are "XYZ" and "Xyz" respectively, and the unified file name is "xyz".

[0121] Generally, if the above-mentioned situations 2) and 3) do not exist, based on the second keyword, at most one target stock file that matches the file to be searched can be obtained from all stock files, and the target stock file is the file to be searched.

[0122] Therefore, according to another embodiment of the present disclosure, when the second keyword of the file to be searched matches the second keyword of a target stock file among N stock files, the second matching result indicates a successful match and the file to be searched is the target stock file without distinguishing the case of the file name, where N is an integer greater than or equal to 1.

[0123] If the above-mentioned situation 2) exists, then based on the second keyword, multiple candidate stock files may be obtained by matching from all stock files, and at most one target stock file among the multiple candidate stock files is the file to be searched.

[0124] For example, when the second keyword of the file to be searched matches the second keyword of M first candidate stock files among N stock files, the second matching result indicates a successful match. The M first candidate stock files here may be generated due to situation 2), so the file search method of the embodiment of the present disclosure may further include: determining a third matching result according to the unified file name of the file to be searched and the unified file name of the first candidate stock file.

[0125] N is an integer greater than or equal to 2, and M is an integer greater than or equal to 2 and less than or equal to N.

[0126] The unified file name is obtained by uniformly converting the file name field.

[0127] Exemplarily, for example, M first candidate stock files can be traversed. For any one of the first candidate stock files, the unified file name of the first candidate stock file and the unified file name of the file to be searched are matched to obtain the third matching result.

[0128] Since the directory entry of the stock file does not include a unified name field, the method of searching and matching based on the unified file name is different from using the first keyword or the second keyword as the search index in the above embodiments. The method of searching and matching based on the unified file name in the embodiments of the present disclosure is a traversal search method. It traverses the first candidate stock files only when the second keyword matches successfully and performs matching based on the unified file name. Since the first candidate stock files are obtained based on the successful matching of the second keyword, the number of the first candidate stock files is less than the number of all stock files. Therefore, the subsequent search speed and efficiency of traversing and searching based on the unified file name are higher.

[0129] According to the file search method of the embodiments of the present disclosure, in the case where multiple first candidate stock files are matched according to the second keyword, further search and matching are performed between the file to be searched and the first candidate stock files based on the unified file name to handle the above situation 3), thereby improving the accuracy of file search.

[0130] Exemplarily, when the unified file name of the file to be searched matches the unified file name of a target stock file among M first candidate stock files, the third matching result indicates a successful match and the file to be searched is the target stock file without distinguishing the case of the file name.

[0131] Based on the above situation 2), there may also be the above situation 3). Therefore, it is also possible that the unified file name of the file to be searched matches the unified file names of X second candidate stock files among M first candidate stock files. For example, in this case, according to the file search method of the embodiments of the present disclosure, for example, the third matching result indicates a successful match and the file to be searched is at least one target stock file among the X second candidate stock files without distinguishing the case of the file name.

[0132] That is, the file search method that does not distinguish the case of the file name based on the second keyword and the unified file name can successfully match multiple stock files (the successfully matched stock files here are the second candidate stock files). At least one of the multiple second candidate stock files can be used as the target stock file, and the file to be searched is the target stock file.

[0133] Exemplarily, for example, when the third matching result indicates a successful match and the file to be searched is a target stock file among the X second candidate stock files without distinguishing the case of the file name, the target stock file can be, for example, the first one among the X second candidate stock files arranged in order according to the preset sorting rule.

[0134] Exemplarily, for example, the third matching result indicates that the match is successful and the file to be found may also be X second candidate stock files without distinguishing between upper and lower case files of the file name.

[0135] Figure 5 The flowchart of the file search method according to the embodiment of the present disclosure is schematically shown.

[0136] like Figure 5 As shown, according to the file search method of the embodiment of the present disclosure, for example, a first keyword of the file to be searched can be pre-generated, and a first matching result can be determined based on the first keyword of the file to be searched and the first keyword of the existing files. In the case where the file search mode indicates that the file name is case-sensitive, the first matching result can be used as the search matching result of the file to be searched in the case of case-sensitive file names, that is, the second matching result. In the case where the first matching result indicates that the match fails and the file search mode indicates that the file name is not case-sensitive, a second keyword of the file to be searched can be generated, and the file to be searched and the existing files can be further traversed and matched based on the second keyword or based on the second keyword and the unified file name to determine the search matching result of the file to be searched in the case of not being case-sensitive file names, that is, the second matching result.

[0137] In summary, according to the file search method of the embodiment of the present disclosure, the stock files are stored in the computer, for example, by a key-value pair or a first keyword, for example, compared to Figure 1B The file search method of the present embodiment occupies less computer storage space than the file search method of the present embodiment. Figure 1A and Figure 1B The implementation method has higher file search efficiency and performance. Specifically, a precise search and match is first performed based on the first keyword. The first matching result of the precise search and match is equivalent to the search and match result in the file search mode that distinguishes the case of the file name. Therefore, when the file search mode indicates that the file name is case-sensitive, the first matching result can be directly returned. When the file search mode indicates that the file name is not case-sensitive, a search and match can be performed according to the second keyword. In general, a target stock file can be directly determined to complete the file search that is not case-sensitive. When multiple candidate stock files are determined by search and match according to the second keyword, a traversal search and match can be further performed from multiple candidate stock files according to the unified file name, and the file search speed, file search efficiency and performance are all higher.

[0138] The disclosed embodiment also provides a file search device.

[0139] Figure 6 A block diagram of a file search device according to an embodiment of the present disclosure is schematically shown.

[0140] As Figure 6 shown, the file search device 600 according to an embodiment of the present disclosure includes a first matching module 610 and a second matching module 620.

[0141] The first matching module 610 is configured to determine a first matching result according to the first keyword of the file to be searched and the first keyword of the stock file.

[0142] The directory entry of the stock file includes a first keyword, and the first keyword includes a parent directory identification field, a hash value field, and a file name field. The hash value field is obtained by hash mapping according to the unified file name, and the unified file name is the file name field in the unified name format.

[0143] The second matching module 620 is configured to determine a second matching result according to the first matching result and the file matching mode information, where the file matching mode information indicates whether to distinguish between uppercase and lowercase of the file name.

[0144] Exemplarily, the second matching module includes: a second matching sub-module, configured to determine a second matching result according to the second keyword of the file to be searched and the second keyword of the stock file when the first matching result indicates a matching failure and the file matching mode information indicates not to distinguish between uppercase and lowercase of the file name.

[0145] The second keyword includes a parent directory identification field and a hash value field.

[0146] Exemplarily, when the second keyword of the file to be searched matches the second keyword of a target stock file among N stock files, the second matching result indicates a matching success and the file to be searched is the target stock file without distinguishing between uppercase and lowercase of the file name, and N is an integer greater than or equal to 1.

[0147] Exemplarily, when the second keyword of the file to be searched matches the second keyword of M first candidate stock files among N stock files, the second matching result indicates a matching success, N is an integer greater than or equal to 2, M is an integer greater than or equal to 2 and less than or equal to N, and the device further includes: a third matching module, configured to determine a third matching result according to the unified file name of the file to be searched and the unified file name of the first candidate stock file, where the unified file name is obtained by uniformly converting the format of the file name field.

[0148] Exemplarily, when the unified file name of the file to be searched matches the unified file name of a target stock file among the M first candidate stock files, the third matching result indicates a successful match and that the file to be searched is the target stock file without distinguishing between uppercase and lowercase file names.

[0149] Exemplarily, when the unified file name of the file to be searched matches the unified file names of X second candidate stock files among the M first candidate stock files, the third matching result indicates a successful match and that the file to be searched is at least one target stock file among the X second candidate stock files without distinguishing between uppercase and lowercase file names, where X is an integer greater than or equal to 2 and less than or equal to M.

[0150] Exemplarily, the second matching module includes: a second matching sub-module, configured to, when the first matching result indicates a failed match and the file matching mode information indicates distinguishing between uppercase and lowercase file names, the second matching result indicates a failed match for the file to be searched when distinguishing between uppercase and lowercase file names.

[0151] Exemplarily, the second matching module includes: a second matching sub-module, configured to, when the first matching result indicates a successful match and the file matching mode information indicates distinguishing between uppercase and lowercase file names, the second matching result indicates a successful match and that the file to be searched is a stock file when distinguishing between uppercase and lowercase file names.

[0152] It should be understood that Figure 6 The embodiments of the apparatus part of the present disclosure shown are the same or similar to the embodiments of the method part of the present disclosure, and the technical problems solved and the technical effects achieved are also the same or similar. The present disclosure will not be elaborated herein.

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

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

[0155] As Figure 7As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0156] Multiple components in the electronic device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a magnetic disk, an optical disc, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

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

[0158] The various embodiments of the systems and techniques described above in this document may be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which may be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.

[0159] The program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that the program codes, when executed by the processor or controller, cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

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

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

[0162] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0163] A computer system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The relationship of the client and the server is generated by computer programs running on the respective computers and having a client-server relationship with each other.

[0164] It should be understood that various forms of the processes shown above can be used, steps can be reordered, added, or deleted. For example, the steps recited in the present disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and no limitation is imposed herein.

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

Claims

1. A file search method, characterized in that, Including: Determine a first matching result according to a first keyword of a file to be searched and a first keyword of a stock file, where a directory entry of the stock file includes the first keyword, and the first keyword includes a parent directory identifier field, a hash value field, and a file name field, the hash value field is obtained by performing hash mapping on a unified file name, and the unified file name is the file name field in a unified name format; Determine a second matching result according to the first matching result and file matching pattern information, where the file matching pattern information indicates whether to distinguish between upper and lower cases of the file name.

2. The method according to claim 1, characterized in that Wherein, The determining the second matching result according to the first matching result and the file matching pattern information includes: When the first matching result indicates a matching failure and the file matching pattern information indicates not to distinguish between upper and lower cases of the file name, determine a second matching result according to a second keyword of the file to be searched and a second keyword of a stock file, where the second keyword includes the parent directory identifier field and the hash value field.

3. The method according to claim 2, wherein Wherein, When the second keyword of the file to be searched matches successfully with the second keyword of a target stock file among N stock files, the second matching result indicates a matching success and the file to be searched is the target stock file without distinguishing between upper and lower cases of the file name, and N is an integer greater than or equal to 1.

4. The method according to claim 2, wherein Wherein, When the second keyword of the file to be searched matches successfully with the second keywords of M first candidate stock files among N stock files, the second matching result indicates a matching success, N is an integer greater than or equal to 2, M is an integer greater than or equal to 2 and less than or equal to N, and the method further includes: Determine a third matching result according to the unified file name of the file to be searched and the unified file name of the first candidate stock file, where the unified file name is obtained by performing format unified conversion on the file name field.

5. The method according to claim 4, characterized in that Wherein, When the unified file name of the file to be searched matches successfully with the unified file name of a target stock file among M first candidate stock files, the third matching result indicates a matching success and the file to be searched is the target stock file without distinguishing between upper and lower cases of the file name.

6. The method according to claim 5, characterized in that, Wherein, When the unified file name of the file to be searched matches successfully with the unified file names of X second candidate stock files among M first candidate stock files, the third matching result indicates a matching success and the file to be searched is at least one target stock file among the X second candidate stock files without distinguishing between upper and lower cases of the file name, and X is an integer greater than or equal to 2 and less than or equal to M.

7. The method according to claim 1, characterized in that, Wherein, The determining the second matching result according to the first matching result and the file matching pattern information includes: When the first matching result indicates a matching failure and the file matching pattern information indicates to distinguish between upper and lower cases of the file name, the second matching result indicates a failure to match the file to be searched while distinguishing between upper and lower cases of the file name.

8. The method according to claim 1, wherein Wherein, Determining a second matching result according to the first matching result and file matching pattern information includes: When the first matching result indicates successful matching and the file matching pattern information indicates case sensitivity for file names, the second matching result indicates successful matching and the file to be searched for is the stock file under case sensitivity for file names.

9. A file search device, characterized in that, Including: A first matching module, configured to determine a first matching result according to a first keyword of a file to be searched for and a first keyword of a stock file, where a directory entry of the stock file includes the first keyword, and the first keyword includes a parent directory identifier field, a hash value field, and a file name field, the hash value field is obtained by performing hash mapping on a unified file name, and the unified file name is the file name field in a unified name format; A second matching module, configured to determine a second matching result according to the first matching result and file matching pattern information, where the file matching pattern information indicates whether case sensitivity for file names is distinguished.

10. The device according to claim 9, characterized in that, Wherein, The second matching module includes: A second matching sub-module, configured to, when the first matching result indicates failed matching and the file matching pattern information indicates no case sensitivity for file names, determine a second matching result according to a second keyword of the file to be searched for and a second keyword of a stock file, where the second keyword includes the parent directory identifier field and the hash value field.

11. The device according to claim 10, characterized in that, Wherein, When the second keyword of the file to be searched for matches successfully with the second keyword of a target stock file among N stock files, the second matching result indicates successful matching and the file to be searched for is the target stock file under no case sensitivity for file names, and N is an integer greater than or equal to 1.

12. The device according to claim 10, characterized in that Wherein, When the second keyword of the file to be searched for matches successfully with the second keywords of M first candidate stock files among N stock files, the second matching result indicates successful matching, N is an integer greater than or equal to 2, M is an integer greater than or equal to 2 and less than or equal to N, and the apparatus further includes: A third matching module, configured to determine a third matching result according to the unified file name of the file to be searched for and the unified file name of a first candidate stock file, where the unified file name is obtained by performing format unified conversion on the file name field.

13. The device according to claim 12, characterized in that, Wherein, When the unified file name of the file to be searched for matches successfully with the unified file name of a target stock file among M first candidate stock files, the third matching result indicates successful matching and the file to be searched for is the target stock file under no case sensitivity for file names.

14. The device according to claim 13, wherein Wherein, When the unified file name of the file to be searched for matches successfully with the unified file names of X second candidate stock files among M first candidate stock files, the third matching result indicates successful matching and the file to be searched for is at least one target stock file among the X second candidate stock files under no case sensitivity for file names, and X is an integer greater than or equal to 2 and less than or equal to M.

15. The device according to claim 9, characterized in that Wherein, The second matching module includes: A second matching sub-module, configured to, when the first matching result indicates a matching failure and the file matching mode information indicates case-sensitive file name matching, the second matching result indicates a failure to match the file to be searched for in the case of case-sensitive file name matching.

16. The device according to claim 9, characterized in that, Wherein, The second matching module includes: A second matching sub-module, configured to, when the first matching result indicates a successful match and the file matching mode information indicates case-sensitive file name matching, the second matching result indicates a successful match and the file to be searched for is the stored file in the case of case-sensitive file name matching.

17. An electronic device, characterized in that, Comprising a processor and an interface circuit, the interface circuit is configured to receive signals from other electronic devices outside the electronic device and transmit them to the processor or send signals from the processor to other electronic devices outside the electronic device, and the processor is configured to implement the method according to any one of claims 1-8 through logic circuits or by executing code instructions.

18. A computer-readable storage medium storing computer instructions, characterized in that, Comprising: Computer instructions, wherein when the computer instructions are executed, the computer is caused to execute the method according to any one of claims 1-8.