Target object processing method and apparatus, storage medium, and electronic device

CN120045472BActive Publication Date: 2026-08-11INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0005]本申请实施例提供了一种目标对象的处理方法及装置、存储介质及电子设备,以至少解决分布式存储系统中内存缓存的性能较低的问题

Benefits of technology

[0017]通过本申请提供的上述实施例,响应于目标业务请求,在分布式存储系统的内存缓存中创建第一列表,并在查询到第一目录标识的第一配置项的值为第一目标值的情况下,根据第一目标标识和目标对象名称查找内存缓存中是否存在目标对象的对象名称。在查找到目标对象的对象名称且第一目录下的N个对象的元数据未被完全加载的情况下,从目标磁盘中读取目标对象的目标元数据,并在内存缓存中加载目标元数据。换言之,通过按照业务需求创建由对象名称组成的列表,在列表中包含目标对象名称的情况下,仅从目标磁盘中读取当前需要访问的目标对象的元数据,并在内存缓存中加载目标对象的元数据,减小了从目标磁盘中读取的数据规模和读取频次,节约了内存缓存的空间,实现了提高分布式存储系统的内存缓存的性能的技术效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045472B_ABST
    Figure CN120045472B_ABST
Patent Text Reader

Abstract

This application provides a method and apparatus for processing target objects, a storage medium, and an electronic device, relating to the computer field. The method includes: responding to a target business request, creating a first list in the memory cache of a distributed storage system, wherein the first list is used to describe data processing logic for string sequences corresponding to object names that are not distinguished by character attributes; if the value of a first configuration item of a first directory identifier is found to be a first target value, searching the memory cache based on the first directory identifier and the target object name; if the target object name is not found in the memory cache and the metadata of N objects has not been fully loaded, reading the target metadata of the target object from the target disk; transferring the target metadata to the memory cache, and loading the target metadata of the target object into the memory cache.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and more specifically, to a method and apparatus for processing a target object, a storage medium, and an electronic device. Background Technology

[0002] In distributed storage systems, to simplify file management, a case-insensitive queue corresponding to each directory is usually created based on a case-insensitive processing logic that does not distinguish between filenames in different directories (files can also be understood as storage objects). The case-insensitive queue is then bound to the metadata of each file in the corresponding directory in the memory cache.

[0003] Because of the binding relationship between the case-insensitive queue and the metadata of each file in the directory, when a file in the directory needs to be accessed, the metadata of all files in the directory needs to be read from the disk space and the metadata of all files needs to be transferred to the memory cache. This increases the scale of data reading from the disk space and also increases the data storage space occupied by the memory cache, thus causing the technical problem of low performance of the memory cache in the distributed storage system.

[0004] There is currently no effective solution to the problem of low performance of memory caching in distributed storage systems. Summary of the Invention

[0005] This application provides a method and apparatus for processing target objects, a storage medium and an electronic device, to at least solve the problem of low performance of memory cache in distributed storage systems.

[0006] According to one embodiment of this application, a method for processing a target object is provided, comprising: in response to a target business request, creating a first list in the memory cache of a distributed storage system, wherein the first list is created based on the object names of N objects under a first directory in the distributed storage system, the first list being used to describe data processing logic for string sequences corresponding to object names that are not distinguished by character attributes, and N being a positive integer greater than or equal to 1; if the value of a first configuration item of the first directory identifier is found to be a first target value, searching the memory cache based on the first directory identifier and the target object name; if the target object name is not found in the memory cache and the metadata of the N objects has not been fully loaded, reading the target metadata of the target object from the target disk; transferring the target metadata to the memory cache, and loading the target metadata of the target object into the memory cache.

[0007] In an exemplary embodiment, the creation of a first list in the memory cache of a distributed storage system in response to a target business request includes: determining the data type and storage structure of the strings in response to the target business request; determining operation logic for the string sequence, wherein the operation logic includes the order in which each string in the string sequence is written into the first list and the order in which each string is deleted from the first list; determining data processing logic that does not change the arrangement position of each string in the first list according to the character attributes when the character attributes of each string change; and generating the first list based on the operation logic, the data processing logic, and each string.

[0008] In an exemplary embodiment, when the value of the first configuration item of the first directory identifier is found to be the first target value, the above-described search of the memory cache based on the first directory identifier and the target object name includes: when the value of the first configuration item is found to be the first target value, searching the current list in the memory cache based on the first directory identifier and the target object name to obtain a first search result; when the first search result indicates that there is a candidate object name in the current list that matches the target object name, comparing the candidate string of the candidate object name with the target string of the target object name; when the candidate string and the target string are the same, returning the candidate string to the first list.

[0009] In an exemplary embodiment, the above-mentioned search of the memory cache based on the first directory identifier and the target object name when the value of the first configuration item of the first directory identifier is found to be the first target value further includes: searching the current list in the memory cache based on the first directory identifier and the target object name to obtain a second search result; if the second search result indicates that there is no candidate object name matching the target object name in the current list, obtaining the loading status of the first directory; if the loading status of the first directory indicates that N objects under the first directory have not been fully loaded, searching the memory cache to see if the target object exists to obtain a third search result; and loading the target metadata of the target object in the memory cache based on the third search result.

[0010] In an exemplary embodiment, the above-mentioned loading of target metadata of the target object into the memory cache based on the third search result includes: if the third search result indicates that the target object exists in the memory cache, adding the target string corresponding to the target object name to the first list; loading the target metadata of the target object into the memory cache based on the target string; or if the third search result indicates that the target object does not exist in the memory cache, reading the target metadata of the target object from the target disk based on the target string, and transferring the target metadata data to the memory cache; and loading the target metadata of the target object into the memory cache.

[0011] In an exemplary embodiment, after transferring the target metadata to the memory cache and loading the target metadata of the target object into the memory cache, the method further includes: if the value of the second configuration item of the first directory identifier is a second target value, performing the following operations based on the object data in the memory cache: if the memory space occupied by the object data in the memory cache is greater than a first preset threshold, performing a clearing operation on the metadata of some objects among the N objects; or if the number of directory identifiers in the memory cache is greater than a second preset threshold, clearing the first directory corresponding to the first directory identifier; or if the number of object names under each list in the memory cache is greater than a third preset threshold, performing a clearing operation on the object names of some objects among the N objects in the first list; or if the value of the third configuration item of the first directory identifier is a third target value and the time interval between the access time of the first list and the current time is greater than a fourth preset threshold, clearing the first list corresponding to the first directory and modifying the value of the first configuration item of the first directory identifier from the first target value to the fourth target value; or if the memory space occupied by the object data in the memory cache is greater than a first preset threshold, simultaneously performing a clearing operation on the metadata of some objects among the N objects and the object names of some objects among the N objects in the first list.

[0012] In an exemplary embodiment, the method further includes: updating a partial string of the name of a partial object corresponding to a partial object in a first list when performing a clearing operation on the metadata of a partial object among N objects in a memory cache; and allowing the metadata of a partial object in a memory cache to remain unchanged when performing a clearing operation on the object name of a partial object among N objects in a first list.

[0013] According to another embodiment of the present application, a target object processing apparatus is also provided, comprising: a creation unit, configured to create a first list in the memory cache of a distributed storage system in response to a target business request, wherein the first list is created based on the object names of N objects under a first directory in the distributed storage system, the first list being used to describe data processing logic for string sequences corresponding to object names that are not distinguished by character attributes, and N being a positive integer greater than or equal to 1; a search unit, configured to search the memory cache based on the first directory identifier and the target object name when the value of the first configuration item of the first directory identifier is found to be a first target value; a reading unit, configured to read the target metadata of the target object from the target disk when the target object name is not found in the memory cache and the metadata of the N objects has not been fully loaded; and a loading unit, configured to transfer the target metadata to the memory cache and load the target metadata of the target object in the memory cache.

[0014] According to yet another embodiment of this application, a computer-readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to perform the steps in any of the above method embodiments when it is run.

[0015] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein a computer program is stored in the memory and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0016] According to yet another embodiment of this application, a computer program product is also provided, which includes a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.

[0017] Through the embodiments provided in this application, in response to a target business request, a first list is created in the memory cache of the distributed storage system. If the value of the first configuration item of the first directory identifier is found to be a first target value, the system searches the memory cache for the object name of the target object based on the first target identifier and the target object name. If the object name of the target object is found and the metadata of N objects under the first directory has not been fully loaded, the target metadata of the target object is read from the target disk and loaded into the memory cache. In other words, by creating a list of object names according to business requirements, and if the list contains the target object name, only the metadata of the target object that needs to be accessed is read from the target disk, and the target object's metadata is loaded into the memory cache. This reduces the data size and frequency read from the target disk, saves memory cache space, and achieves the technical effect of improving the performance of the memory cache in the distributed storage system. Attached Figure Description

[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0019] Figure 1 This is a hardware structure block diagram of a server device for a target object processing method according to an embodiment of this application;

[0020] Figure 2 This is a flowchart of an optional target object processing method according to an embodiment of this application;

[0021] Figure 3 This is an overall schematic diagram of an optional target object processing method according to an embodiment of this application;

[0022] Figure 4 This is an overall flowchart of an optional case-insensitive queue search method based on single-row loading, according to an embodiment of this application.

[0023] Figure 5 This is a schematic diagram of an optional directory segmentation according to an embodiment of this application;

[0024] Figure 6 This is a flowchart of an optional trim operation for a case-insensitive queue according to an embodiment of this application;

[0025] Figure 7 This is a structural block diagram of a target object processing apparatus according to an embodiment of this application;

[0026] Figure 8 This is a schematic diagram of the structure of an optional electronic device according to an embodiment of this application. Detailed Implementation

[0027] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0029] The object processing method embodiments provided in this application can be executed on a server device or a similar computing device. Taking running on a server device as an example, Figure 1 This is a hardware structure block diagram of a server device for a target object processing method according to an embodiment of this application. For example... Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The server device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the server equipment described above. For example, the server equipment may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0030] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the processing method of the target object in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to server devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0031] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the server device. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0032] To better understand the processing method for the target object described above, the basic concepts of the technical terms and terminology used in the embodiments of this application will be briefly introduced below.

[0033] MDS: an abbreviation for Metadata Server, which is short for metadata service in a distributed file system;

[0034] Metadata: Data that records the attributes of a file or directory; it is data that describes the data.

[0035] Inode: Part of the metadata, recording metadata information such as inode number.

[0036] Case-insensitive queue: When a directory in a distributed storage system enables case-insensitive services, it will save a case-insensitive list for that directory (e.g., the first list). For example, if there are files abc, Abc, and def in directory A, then the case-insensitive list corresponding to A includes (1) ABC-abc, Abc; and (2) DEF-def, for a total of two members.

[0037] To address the aforementioned problems in related technologies, this embodiment provides a method for processing a target object, the execution entity of which includes, but is not limited to, a distributed storage system, such as... Figure 2 As shown, the process includes the following steps S202-S208:

[0038] Step S202: In response to the target business request, create a first list in the memory cache of the distributed storage system. The first list is created based on the object names of N objects under the first directory of the distributed storage system. The first list is used to describe the data processing logic of the string sequence corresponding to the object name that is not distinguished by the character attribute. N is a positive integer greater than or equal to 1.

[0039] Step S204: If the value of the first configuration item of the first directory identifier is found to be the first target value, the memory cache is searched based on the first directory identifier and the target object name;

[0040] Step S206: If the target object name is not found in the memory cache and the metadata of N objects has not been fully loaded, read the target metadata of the target object from the target disk;

[0041] Step S208: Transfer the target metadata to the memory cache and load the target metadata of the target object into the memory cache.

[0042] In a distributed storage system, the first list mentioned above can also be understood as a case-insensitive queue. A case-insensitive queue can be understood, but is not limited to, as a queue that does not need to distinguish between uppercase and lowercase when processing filenames or paths. This design allows users to enter filenames in any case when processing files in the system, and the system can still correctly recognize and process these files.

[0043] For example, in Linux systems, filenames are case-sensitive, while in Windows systems, filenames are typically case-insensitive. In distributed storage systems, to maintain cross-platform compatibility and simplify the user experience, a case-insensitive filename handling mechanism may be implemented. This means that regardless of how the user enters the filename (such as File.txt, file.txt, or FILE.TXT), the system will treat it as the same file.

[0044] Furthermore, case-insensitive queues may also involve caching mechanisms in distributed systems. In this case, case differences do not affect the operation of the queue when elements (such as filenames or paths) are added or retrieved. This mechanism helps improve the flexibility and fault tolerance of the system, especially when handling file requests from different operating systems or applications.

[0045] In related technologies, the first list (or case-insensitive queue) mentioned above is bound to the metadata of each directory. This means that when accessing a file in that directory, the metadata of all files in that directory needs to be read from the disk space and the metadata of all files needs to be transferred to the memory cache, which increases the scale of data reading from the disk space.

[0046] To address the aforementioned issues, this application proposes a method for processing target objects, the overall process of which is as follows: Figure 3 As shown.

[0047] (1) The Samba client sends specific business requests to the lib library;

[0048] In a distributed storage system, lib can be understood, but is not limited to, as a library file used to support specific functions of the distributed storage system, such as data caching and task queue management. These library files may contain a series of functions and tools for managing and optimizing the operation of the distributed storage system.

[0049] The aforementioned specific business request can be understood, but is not limited to, as a request to enable case-insensitive services, specifically sent via the Icfs_lookup_realname directive.

[0050] (2) Send a lookup command for the target object name to the MDS cache through the lib library;

[0051] For example, the ICFS_MDS_OP_LOOKUPREALNAME directive can be used to check if the object name (which can also be understood as the file name) of the target object (which can also be understood as the target file) to be accessed exists in the case-insensitive list of the MDS cache.

[0052] (3) Perform a search operation in a case-insensitive queue;

[0053] Specifically, the `handle_client_lookup_realname` command is used to search for the object name of the target object in the current case-insensitive queue.

[0054] It should be noted that in the embodiments of this application, the meanings of "object" and "file" are the same, and the meanings of "object name" and "file name" are the same.

[0055] (4) Retrieve the search results from the MDS cache;

[0056] (5) Send the search results to the Samba client via the lib library.

[0057] In this embodiment, there is no binding relationship between the case-insensitive queue and the metadata under the directory. In this technology, by setting the first configuration item of the directory identifier, when a specific business request needs to be responded to, the case-insensitive queue function of a directory is enabled by setting the value of the first configuration item to true.

[0058] The first configuration option mentioned above can, but is not limited to, adding a member `is_ignore` to the directory inode (directory identifier), with values ​​including `true` and `false`.

[0059] If the value of the first configuration item is the first target value (true), the case-insensitive queue service of the first directory is enabled, and the MDS cache (which can also be understood as the memory cache) is searched according to the first directory identifier (inode) and the object name of the target object to be accessed.

[0060] If the search results indicate that the target object name was not found in the MDS cache, since the case-insensitive queue function is enabled, it is necessary to further determine whether the first directory is in a complete state, that is, to determine whether the metadata of the N objects in the first directory is fully loaded.

[0061] If the metadata of N objects in the first directory is not fully loaded, read the target metadata of the target objects from the target disk and transfer the target metadata to the MDS cache so that the target metadata of the target objects can be loaded in the MDS cache.

[0062] In a distributed storage system, the MDS (Multi-Demand Storage) is primarily responsible for managing the file system's metadata, including file inode information, directory structure, and access permissions. When a client needs to access a file, it first sends a request to the MDS to retrieve the file's metadata. The MDS then retrieves the necessary information from its managed metadata cluster and sends this information to the client.

[0063] To improve the performance of MDS, metadata is usually cached in memory. When MDS restarts or recovers from a failure, it reloads the metadata into the cache by reading the logs.

[0064] In other words, to improve MDS performance, metadata for only a small number of files is typically cached in the MDS. In this embodiment, by setting the first configuration item and unbinding the case-insensitive queue from the metadata of N files in the directory, a case-insensitive queue is created in the MDS according to business needs, and the metadata of the target file is loaded one by one in the MDS based on the filename to be accessed. This avoids reading the metadata of all files in the entire directory from the disk, reducing data reads and saving resources.

[0065] It should be noted that the prerequisite for implementing single-item loading in MDS is to independently update the case-insensitive queue. The specific update management process is as follows:

[0066] 1) Add a separate map queue in MDS, where the key is the directory inode number and the value is the case-insensitive queue corresponding to that directory;

[0067] 2) When a file is created or loaded from disk, the corresponding filename should be added to this case-insensitive queue;

[0068] 3) When a file is deleted, its filename should be removed from the queue;

[0069] 4) This queue is not written to disk. It is cleared directly when the MDS restarts and rebuilt in the cache as needed for subsequent business operations. This prevents the consumption of disk space and avoids a large number of access requests to the MDS and OSD.

[0070] Using the above method, in response to a target business request, a first list is created in the memory cache of the distributed storage system. If the value of the first configuration item of the first directory identifier is found to be the first target value, the system searches the memory cache for the object name of the target object based on the first target identifier and the target object name. If the object name of the target object is found and the metadata of the N objects under the first directory has not been fully loaded, the target metadata of the target object is read from the target disk and loaded into the memory cache. In other words, by creating a list of object names according to business requirements, and if the list contains the target object name, only the metadata of the target object that needs to be accessed is read from the target disk and loaded into the memory cache. This reduces the size and frequency of data read from the target disk, saves memory cache space, and achieves the technical effect of improving the performance of the memory cache of the distributed storage system.

[0071] In one example embodiment, the creation of a first list in the memory cache of the distributed storage system in response to a target business request includes:

[0072] In response to the target business request, determine the data type and storage structure of the string;

[0073] Determine the operation logic for the string sequence, wherein the operation logic includes the order in which each string in the string sequence is written into the first list and the order in which each string is deleted from the first list;

[0074] In cases where the character attributes of each string change, the data processing logic is used to determine the order of each string in the first list that has not been changed according to the character attributes.

[0075] Based on the operation logic, data processing logic, and various strings, the first list is generated.

[0076] When implementing memory caching, there may be a need to create insensitive queues. Here, "insensitive queue" includes, but is not limited to, a specially designed queue that is insensitive to certain operations or data changes; that is, these operations or changes do not affect the queue's state or contents. For example, when processing large amounts of data, to ensure system stability and response speed, a queue might be designed that remains stable and unaffected by data updates or cache invalidation.

[0077] The steps to create an insensitive queue include, but are not limited to:

[0078] S11, Define the queue structure: Determine the data type and structure stored in the queue;

[0079] S12, Implement queue logic: Write code to implement basic queue operations, such as enqueue and dequeue;

[0080] S13, Design insensitive mechanisms: Determine which operations or data changes will not affect the queue, and implement these mechanisms in the queue logic;

[0081] S14, Test Queue: Test the stability and performance of the queue in a distributed environment.

[0082] The mechanism of rebuilding case-insensitive queues in the MDS cache allows for rapid restoration of the consistency of case-insensitive queues upon MDS restart without complex recovery operations. This mechanism enables rapid service recovery after server termination and is particularly suitable for scenarios with high availability requirements, such as cloud storage services, ensuring service continuity and timely access to user data.

[0083] In one example embodiment, when the value of the first configuration item of the first directory identifier is found to be the first target value, the memory cache is searched based on the first directory identifier and the target object name, including:

[0084] If the value of the first configuration item is found to be the first target value, the current list in the memory cache is searched based on the first directory identifier and the target object name to obtain the first search result;

[0085] If the first search result indicates that there is a candidate object name that matches the target object name in the current list, then compare the candidate string of the candidate object name with the target string of the target object name.

[0086] If the candidate string is the same as the target string, return the candidate string to the first list.

[0087] If the value of the first configuration item is found to be true, the MDS cache is searched according to the first directory identifier and the target object name to obtain the first search result. Then, the next operation is determined based on whether there is a corresponding record indicated by the first search result.

[0088] Specifically, if the first search result indicates that there is a candidate object name in the current case-insensitive list (which can also be understood as the current list) in the MDS cache that matches the object name (filename) of the target object (target file) to be accessed, then it is further determined whether the case of the string corresponding to the candidate object name is completely consistent with the case of the string of the target object's object name.

[0089] If they match exactly, return the filename; if the string of the candidate object name in the MDS does not match the string of the actual target object's object name in terms of case, return the first filename in the list of filenames corresponding to that filename in the case-insensitive queue for that directory.

[0090] As can be seen, the above search method, when case-insensitive services are enabled, realizes a single file processing request for loading and searching based on the marking function of the first configuration item, which significantly improves the efficiency of file search, especially in scenarios where filenames are not case-sensitive, such as multi-user environments or cross-platform file sharing, and can effectively avoid search failures or performance degradation caused by case sensitivity.

[0091] In one example embodiment, the above-mentioned search of the memory cache based on the first directory identifier and the target object name, when the value of the first configuration item of the first directory identifier is found to be the first target value, further includes:

[0092] Based on the first directory identifier and the target object name, the current list in the memory cache is searched to obtain the second search result;

[0093] If the second search result indicates that there is no candidate object name matching the target object name in the current list, obtain the loading status of the first directory;

[0094] If the loading status of the first directory indicates that N objects under the first directory have not been fully loaded, check if the target object exists in the memory cache to obtain the third search result;

[0095] Based on the third search result, the target metadata of the target object is loaded into the memory cache.

[0096] As described in the above embodiments, if the value of the first configuration item of the first directory identifier is found to be true, the current list in the MDS cache is searched, and if it is determined that no candidate object name matching the target object name is found in the current list (the current case-insensitive list), it is further determined or checked whether the first directory is in a fully loaded state.

[0097] If it is determined that N objects (N files) in the first directory have not been fully loaded, first check if there are any target files to be accessed in the MDS cache, and then load the target metadata of the target files in the MDS cache according to the search results.

[0098] As can be seen, by creating and maintaining independent case-insensitive queues related to the directory inode number, setting a flag in the inode to indicate whether the directory has a case-insensitive queue, and using single-file lookup and single-file loading based on the flag, case-insensitive queues are created on demand when there are specific business requests, reducing the storage space of the MDS cache.

[0099] In addition, using single-row lookup and single-row loading based on tags can significantly improve the efficiency of file lookup. In particular, when a file needs to be accessed multiple times, the single-row loading method greatly reduces the file metadata reading time and improves the memory performance of the MDS cache.

[0100] In one example embodiment, loading the target metadata of the target object into the memory cache based on the third lookup result includes:

[0101] If the third search result indicates that the target object exists in the memory cache, add the target string corresponding to the target object name to the first list;

[0102] Based on the target string, load the target object's target metadata from the memory cache; or

[0103] If the third search result indicates that the target object does not exist in the memory cache, the target metadata of the target object is read from the target disk based on the target string, and the target metadata is transferred to the memory cache.

[0104] Load the target metadata of the target object into the memory cache.

[0105] If N objects in the first directory are not fully loaded, first check if the file (the target file or target object to be accessed) exists in the MDS cache. If it exists, add the found file name to the first list, and then further determine whether the case of the found file name is completely consistent with the case of the actual file name of the target file.

[0106] If the case is exactly the same, the found filename is added to the first list.

[0107] Conversely, if N objects in the first directory are not fully loaded and the file (the target file or target object to be accessed) does not exist in the MDS cache, further check whether the system has enabled the single-file loading function (which intelligently loads one file from the disk at a time, and loads one slice at a time by default) and determine whether the case-insensitive queue aging mechanism is enabled.

[0108] If all are enabled, the single-file loading function is used to load the file individually. If the loading is successful, the message is re-entered; otherwise, an indication of search failure is returned directly to the upper layer. If none are enabled, all fragments of the directory are loaded, and the case-insensitive queue corresponding to the inode number of the directory is reconstructed, and the message is re-entered.

[0109] In this context, sharding a directory refers to distributing the files or content within the directory across multiple nodes to improve the performance and scalability of the storage system. This approach is typically used to handle large file systems or object storage, where a single directory may contain a large number of files or objects.

[0110] For example, such as Figure 5 As shown, assuming that the files in a directory occupy 100,000 megabytes of storage space, the directory can be divided into 10 partitions, and the files in one partition require 1 MB of storage.

[0111] By using directory sharding, the system can dynamically manage data distribution to adapt to different workloads and storage needs.

[0112] To facilitate understanding of the above-described insensitive queue search method based on single-row loading, the following section combines... Figure 4 The overall flowchart shown is explained below.

[0113] S402, receives non-sensitive business requests sent by Samba clients;

[0114] S404, Determine if the value of the inode corresponding to the request is true;

[0115] Add a member `is_ignore` to the directory inode. This member or configuration item is used to indicate whether the directory has a case-insensitive queue enabled.

[0116] If yes, proceed to step S406; otherwise, proceed to step S412.

[0117] It should be noted that this flag is automatically set to false when the cached inode ages and is re-added to the cache.

[0118] S406, if the above configuration item is_ignore is true, search for a corresponding record in the current case-insensitive queue based on the directory Inode number and file name;

[0119] If there is a record, proceed to step S408; otherwise, proceed to step S414.

[0120] S408, if there are records, further confirm whether the file names are completely consistent;

[0121] The process of verifying filename consistency here is based on the assumption that the filenames are case-sensitive. If they are completely identical, the filename is returned. Otherwise, step S414 is executed.

[0122] S410, returns the filename;

[0123] S412, load the full fragment data of the directory and add the file name and directory inode to the case-insensitive queue;

[0124] That is, when is_ignore is false, the full fragment data of the directory is loaded, and the file name information and directory inode are added to the case-insensitive queue, and the message is re-entered.

[0125] S414, Check if the directory is fully loaded;

[0126] If yes, proceed to step S420; otherwise, proceed to step S416.

[0127] S416, If N objects in the directory are not fully loaded, check if the file is in the cache;

[0128] If yes, proceed to step S418; otherwise, proceed to step S422.

[0129] Whether a directory is fully loaded can be understood as whether the directory is in a complete state.

[0130] S418, when the file exists in the cache, add it to the case-insensitive queue and further verify whether the case of the file name is completely consistent;

[0131] If the case is exactly the same, return the filename.

[0132] S420, if the directory is in a complete state, then return a search failure;

[0133] S422: If the directory is not fully loaded and the file is not in the cache, enable single-entry loading and enable case-insensitive queue aging mechanism.

[0134] Before enabling the single-file loading function, first check if the system has enabled the single-file loading function (loading only one file from the disk at a time, with the default being loading one fragment at a time). If it is enabled, use the single-file loading function to load the file separately. If the loading is successful, the message is re-entered; otherwise, return a lookup failure to the upper layer directly.

[0135] If none of them are enabled, then load all fragments of the directory and reconstruct the case-insensitive queue corresponding to the inode number of the directory, and re-enter the message.

[0136] By using the above methods, single-row lookup and single-row loading based on tags can significantly improve the efficiency of file lookup. In particular, when a file needs to be accessed multiple times, the single-row loading method greatly reduces the file metadata reading time and improves the memory performance of the MDS cache.

[0137] In one example embodiment, after transferring the target metadata to a memory cache and loading the target metadata of the target object into the memory cache, the method further includes:

[0138] If the value of the second configuration item identified by the first directory is the second target value, perform the following operations based on the object data in the memory cache:

[0139] If the memory space occupied by object data in the memory cache exceeds a first preset threshold, perform a clearing operation on the metadata of some of the N objects; or

[0140] If the number of directory identifiers in the memory cache exceeds a second preset threshold, clear the first directory corresponding to the first directory identifier; or

[0141] If the number of object names in each list in the memory cache exceeds a third preset threshold, perform a clearing operation on some of the object names of the N objects in the first list; or

[0142] If the value of the third configuration item of the first directory identifier is the third target value, and the time interval between the access time of the first list and the current time is greater than the fourth preset threshold, then clear the first list corresponding to the first directory, and modify the value of the first configuration item of the first directory identifier from the first target value to the fourth target value; or

[0143] If the memory space occupied by object data in the memory cache exceeds a first preset threshold, a clearing operation is performed simultaneously on the metadata of some of the N objects and the object names of some of the N objects in the first list.

[0144] The second configuration option, `mds_ignore_trim`, indicates whether the case-insensitive queue aging feature is enabled; the default value is `true`. Case-insensitive queue aging means that when processing filenames or paths, the system is insensitive to capitalization; that is, it's a case-insensitive queue aging mechanism. Aging may mean that elements in the queue change or are updated over time, and case insensitivity means that differences in capitalization will not affect queue operations when processing these elements.

[0145] By adding a separate case-insensitive queue for aging processing in the tick, and adopting... Figure 6 The process shown performs the following operations:

[0146] S602 adds a second configuration item, mds_ignore_trim;

[0147] S604, determine whether the second configuration item is true;

[0148] If so, execute one of steps S606, S608, S610, and S612.

[0149] S606, case-insensitive queue and MDS cache synchronized aging trim;

[0150] (1) When Dnetry or inode ages, data in the case-insensitive list is cleared synchronously;

[0151] (2) Under the condition of enabling single-item loading, the case-insensitive list aging mechanism is allowed to be enabled; the following actions are controlled by adding a switch separately, and the emergency measure interface for full trim is retained;

[0152] (3) Under the condition of enabling single loading, the principle of Trim operation is: multiple file names corresponding to a key value in the case-insensitive list cannot be trimmed, and at least one file name must be retained.

[0153] a) When the insensitive list ages, if a key has multiple values, not all of them should be trimmed; at least the key and one filename should be retained.

[0154] b) If a record is added to the insensitive list (full load, create, rename, etc.), and the current key has only one filename record, it cannot be aged out.

[0155] c) When adding a record to the insensitive queue, if it is found that the number of filenames corresponding to the key has exceeded one, the extra records can be trimmed directly during the aging detection (keeping one).

[0156] S608, based on threshold aging trim;

[0157] In the separate processing flow of the full tick insensitive list, the case-insensitive queue is aged out according to its own threshold, which includes but is not limited to the number of directories, the number of keys, and the number of case-insensitive queues.

[0158] Specifically, if the number of keys exceeds the threshold, step S614 is executed; if the number of members in the case-insensitive queue exceeds the threshold, step S616 is executed; and if the number of members in the case-sensitive queue exceeds the threshold, step S618 is executed.

[0159] When a case-insensitive queue ages out, the following processing also needs to be performed:

[0160] (1) When cleaning up a directory, directly clear the full non-sensitive list corresponding to the directory;

[0161] (2) When cleaning up files, you can choose to prioritize aging files that are no longer in the cache;

[0162] Specifically, this can be achieved by adding a separate switch, which is disabled by default.

[0163] (3) Separate switch control (mds_ignore_case_trim_threshold switch controls separate aging of insensitive lists, which is not enabled by default).

[0164] S610, timeout trim;

[0165] a) Add the configuration item mds_ignore_duration, which defaults to 1800 (0.5h). When checking the insensitive queue in the tick, check the most recent sequential time of the insensitive queue based on the current interval.

[0166] If the interval exceeds the threshold, the insensitive queue of the directory will be cleared, and the case-insensitive flag in the inode will be set to false.

[0167] b) The last_time of the case-insensitive queue is updated when an insensitive request (lookup_realname) accesses the directory.

[0168] S612, memory overrun trim based on overall memory threshold;

[0169] a) A separate switch controls mds_ignore_case_trim_cache, defaulting to false;

[0170] b) Increase the configuration memory threshold; the default value for mds_ignore_case_trim_cache_size is 15G.

[0171] c) Add the configuration mds_ignore_case_trim_cache_dirsize (default 5) to determine the number of directories in the non-sensitive list to be cleaned each tick;

[0172] d) Using this method to trim will trim the entire insensitive list of the entire directory.

[0173] The aging strategy control module monitors overall memory usage and adjusts the aging strategy accordingly, including trimming data in insensitive queues, to prevent memory consumption from exceeding preset thresholds. This mechanism effectively manages memory resources in scenarios handling massive amounts of data, such as social media platforms or big data analytics centers, preventing system crashes due to resource exhaustion and ensuring long-term stable operation.

[0174] S614 performs a trim operation on a directory corresponding to a key;

[0175] S616 performs a trim operation on a case-insensitive queue;

[0176] S618 performs a trim operation on at least some members of a case-insensitive queue.

[0177] In one example, if all filenames in a directory include abc, Abc, and def, then the case-insensitive list corresponding to that directory includes (1) ABC-abc and Abc; and (2) DEF-def, for a total of two members.

[0178] The above includes various trim operations, enabling efficient and stable file management services in complex application scenarios, such as enterprise-level file servers or large-scale data storage systems. Furthermore, the third configuration option allows for flexible and dynamic adjustment of the aging strategy for case-insensitive queues based on business needs, optimizing resource utilization and improving user experience.

[0179] In one example embodiment, the method further includes:

[0180] When performing a clearing operation on the metadata of some objects out of N objects in the memory cache, update the partial string of the partial object name corresponding to the partial objects in the first list;

[0181] When performing a cleanup operation on the object names of some objects in the first list of N objects, it is permissible to keep the metadata of some objects in the memory cache unchanged.

[0182] The case-insensitive list is not strictly consistent with the actual cache. That is, when the actual cache ages, is deleted, or is added, the case-insensitive list needs to be updated. However, when data in the case-insensitive list ages, the actual cache metadata does not need to be updated. In other words, a file may be in the actual cache, but not in the case-insensitive list.

[0183] The case-insensitive queue creation module employs a non-strong consistency update strategy when updating case-insensitive queues, improving update performance while ensuring queue consistency during critical operations. This strategy significantly enhances system response speed in scenarios requiring frequent writes and updates, such as real-time data processing systems or IoT device management platforms, while guaranteeing data accuracy and security.

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

[0185] This embodiment also provides a processing apparatus for a target object, used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the modules described in the following embodiments are preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0186] Figure 7 This is a structural block diagram of a target object processing apparatus according to an embodiment of this application. The apparatus includes:

[0187] Creation unit 702 is used to create a first list in the memory cache of the distributed storage system in response to the target business request. The first list is created based on the object names of N objects under the first directory of the distributed storage system. The first list is used to describe the data processing logic of the string sequence corresponding to the object name that is not distinguished by the character attribute. N is a positive integer greater than or equal to 1.

[0188] The lookup unit 704 is used to search the memory cache based on the first directory identifier and the target object name when the value of the first configuration item of the first directory identifier is found to be the first target value.

[0189] The reading unit 706 is used to read the target metadata of the target object from the target disk when the target object name is not found in the memory cache and the metadata of N objects has not been fully loaded.

[0190] Loading unit 708 is used to transfer target metadata to memory cache and load target metadata of target object in memory cache.

[0191] In an exemplary embodiment, the creation unit 702 includes: a first processing module, configured to determine the data type and storage structure of a string in response to a target business request; a second processing module, configured to determine operation logic for a string sequence, wherein the operation logic includes the order in which each string in the string sequence is written into a first list and the order in which each string is deleted from the first list; a third processing module, configured to determine data processing logic that does not change the arrangement position of each string in the first list according to the character attributes when the character attributes of each string change; and a fourth processing module, configured to generate a first list based on the operation logic, the data processing logic, and each string.

[0192] In an exemplary embodiment, the search unit 704 includes: a first search module, configured to, when the value of the first configuration item is found to be a first target value, search the current list in the memory cache based on the first directory identifier and the target object name to obtain a first search result; a comparison module, configured to, when the first search result indicates that there is a candidate object name in the current list that matches the target object name, compare the candidate string of the candidate object name with the target string of the target object name; and a return module, configured to, when the candidate string and the target string are the same, return the candidate string to the first list.

[0193] In an exemplary embodiment, the search unit 704 includes: a second search module, configured to search the current list in the memory cache based on the first directory identifier and the target object name, and obtain a second search result; an acquisition module, configured to acquire the loading status of the first directory when the second search result indicates that there is no candidate object name matching the target object name in the current list; a third search module, configured to search the memory cache for the existence of the target object when the loading status of the first directory indicates that N objects under the first directory have not been fully loaded, and obtain a third search result; and a loading module, configured to load the target metadata of the target object into the memory cache based on the third search result.

[0194] In an exemplary embodiment, the loading module includes: a first processing submodule, configured to add the target string corresponding to the target object name to a first list when the third search result indicates that the target object exists in the memory cache; load the target metadata of the target object in the memory cache based on the target string; or, when the third search result indicates that the target object does not exist in the memory cache, read the target metadata of the target object from the target disk based on the target string and transfer the target metadata data to the memory cache; and load the target metadata of the target object in the memory cache.

[0195] In an exemplary embodiment, the above-described apparatus further includes: a first processing unit, configured to perform the following operations based on object data in a memory cache when the value of the second configuration item of the first directory identifier is a second target value: when the memory space occupied by the object data in the memory cache is greater than a first preset threshold, perform a clearing operation on the metadata of some objects among the N objects; or when the number of directory identifiers in the memory cache is greater than a second preset threshold, clear the first directory corresponding to the first directory identifier; or when the number of object names under each list in the memory cache is greater than a third preset threshold, perform a clearing operation on the object names of some objects among the N objects in the first list; or when the value of the third configuration item of the first directory identifier is a third target value and the time interval between the access time of the first list and the current time is greater than a fourth preset threshold, clear the first list corresponding to the first directory and modify the value of the first configuration item of the first directory identifier from the first target value to the fourth target value; or when the memory space occupied by the object data in the memory cache is greater than the first preset threshold, simultaneously perform a clearing operation on the metadata of some objects among the N objects and the object names of some objects among the N objects in the first list.

[0196] In an exemplary embodiment, the above apparatus further includes: an update unit, configured to update a partial string of the name of a partial object corresponding to a partial object in a first list when a clearing operation is performed on the metadata of a partial object among N objects in a memory cache; and a second processing unit, configured to allow the metadata of a partial object in the memory cache to remain unchanged when a clearing operation is performed on the object name of a partial object among N objects in the first list.

[0197] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0198] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.

[0199] Optionally, in this embodiment, the computer program described above can be configured to perform the following steps:

[0200] S1, in response to the target business request, creates a first list in the memory cache of the distributed storage system. The first list is created based on the object names of N objects under the first directory of the distributed storage system. The first list is used to describe the data processing logic of the string sequence corresponding to the object name that is not distinguished by the character attribute. N is a positive integer greater than or equal to 1.

[0201] S2, if the value of the first configuration item of the first directory identifier is found to be the first target value, the memory cache is searched based on the first directory identifier and the target object name;

[0202] S3, if the target object name is not found in the memory cache and the metadata of N objects has not been fully loaded, read the target metadata of the target object from the target disk;

[0203] S4 transfers the target metadata to the memory cache and loads the target object's target metadata into the memory cache.

[0204] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0205] Embodiments of this application also provide an electronic device, such as... Figure 8 As shown, the electronic device includes a memory 802 and a processor 804. The memory 802 stores a computer program, and the processor 804 is configured to execute the steps in any of the above method embodiments via the computer program.

[0206] Optionally, in this embodiment, the processor 804 can be configured to perform the following steps via a computer program:

[0207] S1, in response to the target business request, creates a first list in the memory cache of the distributed storage system. The first list is created based on the object names of N objects under the first directory of the distributed storage system. The first list is used to describe the data processing logic of the string sequence corresponding to the object name that is not distinguished by the character attribute. N is a positive integer greater than or equal to 1.

[0208] S2, if the value of the first configuration item of the first directory identifier is found to be the first target value, the memory cache is searched based on the first directory identifier and the target object name;

[0209] S3, if the target object name is not found in the memory cache and the metadata of N objects has not been fully loaded, read the target metadata of the target object from the target disk;

[0210] S4 transfers the target metadata to the memory cache and loads the target object's target metadata into the memory cache.

[0211] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0212] Alternatively, as those skilled in the art will understand, Figure 8 The structure shown is for illustrative purposes only. Figure 8 This does not limit the structure of the aforementioned electronic devices. For example, the electronic device may also include components that are more... Figure 8 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 8 The different configurations shown.

[0213] The memory 802 can be used to store software programs and modules, such as the program instructions / modules corresponding to the target object processing method and alarm information processing device in this embodiment. The processor 804 executes various functional applications and data processing by running the software programs and modules stored in the memory 802, thereby realizing the aforementioned target object processing method. The memory 802 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 802 may further include memory remotely located relative to the processor 804, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Specifically, the memory 802 may be used, but is not limited to, to store target service requests, first target values, and target metadata, etc. As an example, such as... Figure 8 As shown, the memory 802 may include, but is not limited to, the creation unit 702, search unit 704, read unit 706, and load unit 708 in the target object processing device described above. Furthermore, it may include, but is not limited to, other module units in the verification device for the soft decoding function described above, which will not be elaborated upon in this example.

[0214] Optionally, the transmission device 806 described above is used to receive or send data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 806 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 806 is a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0215] In addition, the above-mentioned electronic device also includes: a display 808; and a connection bus 810 for connecting the various module components in the above-mentioned electronic device.

[0216] In other embodiments, the aforementioned electronic device can be a node in a distributed system, which can be a blockchain system. This blockchain system is formed by connecting multiple nodes through network communication. The nodes can form a peer-to-peer (P2P) network, and any type of computing device, such as a server or terminal, can become a node in the blockchain system by joining this peer-to-peer network.

[0217] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.

[0218] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.

[0219] The embodiments described herein also provide a computer program that includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in any of the above method embodiments.

[0220] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0221] The above are merely preferred embodiments of this application and are not intended to limit 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 principles of this application should be included within the protection scope of this application.

Claims

1. A method for processing a target object, characterized in that, include: In response to a target business request, a first list is created in the memory cache of the distributed storage system. The first list is created based on the object names of N objects under the first directory of the distributed storage system. The first list is used to describe the data processing logic for string sequences corresponding to the object names without distinguishing them by character attributes. N is a positive integer greater than or equal to 1. The first list is a case-insensitive queue, which means that case does not need to be distinguished when processing the object names of the N objects. The case-insensitive queue has no binding relationship with the metadata under the first directory. If the value of the first configuration item of the first directory identifier is found to be the first target value, the memory cache is searched based on the first directory identifier and the target object name; If the target object name is not found in the memory cache and the metadata of the N objects has not been fully loaded, the target metadata of the target object is read from the target disk. The target metadata is transferred to the memory cache, and the target metadata of the target object is loaded into the memory cache; The step of searching the memory cache based on the first directory identifier and the target object name includes: searching the current list in the memory cache based on the first directory identifier and the target object name to obtain a second search result; if the second search result indicates that there is no candidate object name matching the target object name in the current list, obtaining the loading status of the first directory; if the loading status of the first directory indicates that the N objects under the first directory have not been fully loaded, searching the memory cache to see if the target object exists to obtain a third search result; if the third search result indicates that the target object does not exist in the memory cache, and the single-file loading function and the aging mechanism of the case-insensitive queue are enabled simultaneously, reading the target metadata of the target object from the target disk based on the target string corresponding to the target object name, and transferring the target metadata to the memory cache; loading the target metadata of the target object into the memory cache, wherein the single-file loading function means allowing only one file to be loaded from the target disk at a time, and the aging mechanism means that the operation of the case-insensitive queue will not be affected by the case difference when processing the file names of the N objects.

2. The method according to claim 1, characterized in that, In response to the target business request, the creation of a first list in the memory cache of the distributed storage system includes: In response to the target business request, determine the data type and storage structure of the string; Determine the operation logic for the string sequence, wherein the operation logic includes the order in which each string in the string sequence is written into the first list and the order in which each string is deleted from the first list; In the event that the character attributes of each string change, the data processing logic determines that the arrangement position of each string in the first list has not been changed according to the character attributes; The first list is generated based on the operation logic, the data processing logic, and the various strings.

3. The method according to claim 1, characterized in that, When the value of the first configuration item of the first directory identifier is found to be the first target value, the memory cache is searched based on the first directory identifier and the target object name, including: If the value of the first configuration item is found to be the first target value, the current list in the memory cache is searched based on the first directory identifier and the target object name to obtain the first search result; If the first search result indicates that there is a candidate object name in the current list that matches the target object name, then compare the candidate string of the candidate object name with the target string of the target object name; If the candidate string is the same as the target string, the candidate string is returned to the first list.

4. The method according to claim 1, characterized in that, The method further includes: If the third search result indicates that the target object exists in the memory cache, the target string corresponding to the target object name is added to the first list; Based on the target string, the target metadata of the target object is loaded into the memory cache.

5. The method according to any one of claims 1 to 4, characterized in that, After transferring the target metadata to the memory cache and loading the target metadata of the target object into the memory cache, the method further includes: If the value of the second configuration item identified by the first directory is the second target value, perform the following operations based on the object data in the memory cache: If the memory space occupied by object data in the memory cache exceeds a first preset threshold, perform a clearing operation on the metadata of some of the N objects; or If the number of directory identifiers in the memory cache exceeds a second preset threshold, clear the first directory corresponding to the first directory identifier; or If the number of object names in each list in the memory cache exceeds a third preset threshold, perform a clearing operation on the object names of some of the N objects in the first list; or If the value of the third configuration item identified by the first directory is a third target value, and the time interval between the access time to the first list and the current time is greater than a fourth preset threshold, then the first list corresponding to the first directory is cleared, and the value of the first configuration item identified by the first directory is modified from the first target value to the fourth target value; or If the memory space occupied by the object data in the memory cache is greater than the first preset threshold, a clearing operation is simultaneously performed on the metadata of some of the N objects and the object names of some of the N objects in the first list.

6. The method according to claim 5, characterized in that, The method further includes: When performing a clearing operation on the metadata of some of the N objects in the memory cache, update the partial string of the partial object name corresponding to the partial objects in the first list; When performing a cleanup operation on the object names of some of the N objects in the first list, it is permissible to keep the metadata of those objects in the memory cache unchanged.

7. A processing apparatus for a target object, characterized in that, include: A creation unit is used to create a first list in the memory cache of the distributed storage system in response to a target business request. The first list is created based on the object names of N objects under the first directory of the distributed storage system. The first list is used to describe the data processing logic that does not distinguish the string sequences corresponding to the object names according to character attributes. N is a positive integer greater than or equal to 1. The first list is a case-insensitive queue, which means that case does not need to be distinguished when processing the object names of the N objects. The case-insensitive queue has no binding relationship with the metadata under the first directory. The lookup unit is configured to, when the value of the first configuration item of the first directory identifier is found to be the first target value, search the memory cache based on the first directory identifier and the target object name; The reading unit is used to read the target metadata of the target object from the target disk when the target object name is not found in the memory cache and the metadata of the N objects has not been fully loaded. A loading unit is configured to transfer the target metadata data to the memory cache and load the target metadata of the target object into the memory cache; The device is further configured to: search the current list in the memory cache based on the first directory identifier and the target object name to obtain a second search result; if the second search result indicates that there is no candidate object name matching the target object name in the current list, obtain the loading status of the first directory; if the loading status of the first directory indicates that the N objects under the first directory have not been fully loaded, search the memory cache to see if the target object exists to obtain a third search result; if the third search result indicates that the target object does not exist in the memory cache, and the single-file loading function and the aging mechanism of the case-insensitive queue are enabled simultaneously, read the target metadata of the target object from the target disk based on the target string corresponding to the target object name, and transfer the target metadata to the memory cache; load the target metadata of the target object in the memory cache, wherein the single-file loading function means allowing only one file to be loaded from the target disk at a time, and the aging mechanism means that the operation of the case-insensitive queue will not be affected by the case difference when processing the file names of the N objects.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 6.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data request processing method and device based on metadata loading

    CN113821479A

  • Data access method and device, equipment and storage medium

    CN116303267A