Data reading method, device, equipment and medium for append writing

By storing the secondary index of appended write data and its corresponding first-level index in the target cache, the first-level index is directly obtained from the cache to reduce the number of disk reads, which solves the problem of large delay in read requests in the appended write storage engine, and improves the Data reading speed.

CN113127382BActive Publication Date: 2025-01-14BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110450387.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-25
Publication Date
2025-01-14
Estimated Expiration
2041-04-25

AI Technical Summary

Technical Problem

In the append write storage engine, user read requests require two random disk reads, resulting in an increase in read request delay and affecting the data reading speed.

Method used

By storing the secondary index of appended write data and its corresponding primary index in the target cache, when reading data requests to hit the secondary index, it directly obtains the primary index from the target cache and reads the data from the disk, reducing randomness Number of disk readings.

Benefits of technology

Reduces user read delay, improves data reading speed of appending write storage engine, and reduces the number of disk readings when read requests hit the secondary index.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113127382B_ABST
    Figure CN113127382B_ABST
Patent Text Reader

Abstract

The present application discloses a data reading method, device, equipment, medium and program product for appending writes, and relates to the field of cloud computing, and in particular to a cloud storage technology. The specific implementation scheme is: in response to the index information corresponding to the logical address in the memory in the read data request belonging to the secondary index, and the secondary index hits the target cache, then the primary index corresponding to the logical address is obtained from the secondary index stored in the target cache; the data corresponding to the logical address is read from the disk according to the primary index; wherein the target cache is used to store the secondary index of the appended write data, and at least two primary indexes corresponding to each secondary index. The present application can reduce the number of disk reads when the read data request hits the secondary index, reduce user read delay, and improve the data reading speed of the appended write storage engine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing, and in particular to a cloud storage technology, and specifically to a data reading method, device, equipment, medium and program product for appending writing. Background Art

[0002] Currently, the performance of mainstream non-volatile storage media (SSD / HDD) for append-write is much higher than that of random write. Therefore, storage systems that support append-write can often fully utilize hardware performance. Since append-write changes the original data location, it is necessary to maintain a mapping relationship between logical address and physical address (LBA [logical block address] - PBA [Physical block address]), that is, index information.

[0003] In the append-write storage engine, the method of sharing the data stream between data and index information is adopted. Both data and index information are appended to the storage system to eliminate random disk writes. Specifically, several adjacent index information are packaged and written to the storage system, and then a secondary index is established in the memory to point to the location of the index information in the storage system, and the index information in the memory is released at the same time.

[0004] However, when the read data hits the secondary index, it is necessary to first read the index information pointed to by the secondary index from the storage system, and then read the user data from the storage system based on the read index information. When the subsequent read request hits the secondary index again, this process needs to be repeated. Therefore, a user read request requires two random disk reads, which greatly increases the latency of the read request. Summary of the invention

[0005] The present application provides a data reading method, device, equipment, medium and program product for append-write, so as to reduce user read latency and improve the data reading speed of an append-write storage engine.

[0006] In a first aspect, the present application provides a data reading method for append writing, comprising:

[0007] In response to the index information corresponding to the logical address in the data read request in the memory belonging to the secondary index, and the secondary index hits the target cache, obtaining the primary index corresponding to the logical address from the secondary index stored in the target cache;

[0008] Reading data corresponding to the logical address from the disk according to the primary index;

[0009] The target cache is used to store the secondary index for appending write data and at least two primary indexes corresponding to each secondary index.

[0010] In a second aspect, the present application further provides a data reading device for appending writing, comprising:

[0011] A primary index acquisition module, configured to, in response to the index information corresponding to the logical address in the data read request in the memory belonging to the secondary index, and the secondary index hits the target cache, acquire the primary index corresponding to the logical address from the secondary index stored in the target cache;

[0012] A first data acquisition module, configured to read data corresponding to the logical address from a disk according to the primary index;

[0013] The target cache is used to store the secondary index for appending write data and at least two primary indexes corresponding to each secondary index.

[0014] In a third aspect, the present application further provides an electronic device, including:

[0015] at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data reading method for additional writing described in any embodiment of the present application.

[0018] In a fourth aspect, the present application further provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the data reading method for appending writing described in any embodiment of the present application.

[0019] In a fifth aspect, the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the data reading method for appending writing described in any embodiment of the present application.

[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easy to understand through the following description, and other effects of the above optional methods will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.

[0022] Figure 1 is a flow chart of a data reading method for appending writing according to an embodiment of the present application;

[0023] Figure 2 is a flow chart of a data reading method for appending writing according to an embodiment of the present application;

[0024] Figure 3 is a flow chart of a data reading method for appending writing according to an embodiment of the present application;

[0025] Figure 4 is a structural schematic diagram of a data reading device for additional writing according to an embodiment of the present application;

[0026] Figure 5 It is a block diagram of an electronic device used to implement the data reading method for additional writing according to an embodiment of the present application. DETAILED DESCRIPTION

[0027] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0028] Figure 1 The present invention is a flowchart of a data reading method for appending write according to an embodiment of the present application. The present embodiment can be applied to the case of reading data in an appending write storage engine, and relates to the field of cloud computing, and in particular to a cloud storage technology. The method can be executed by a data reading device for appending write, which is implemented in software and / or hardware, and is preferably configured in an electronic device, such as a computer device or a server. Figure 1 As shown, the method specifically includes the following:

[0029] S101. In response to the index information corresponding to the logical address in the data read request in the memory belonging to the secondary index, and the secondary index hits the target cache, the primary index corresponding to the logical address is obtained from the secondary index stored in the target cache.

[0030] The target cache is used to store the secondary index for appending write data and at least two primary indexes corresponding to each secondary index.

[0031] Specifically, in the append-write storage engine, several adjacent index information are packaged and written into the storage system, and then a secondary index is established in the memory to point to the location of the index information in the storage system, and the index information in the memory is released at the same time. When the read data hits the secondary index, it is necessary to first read the index information pointed to by the secondary index from the storage system, and then read the user data from the storage system based on the read index information. Therefore, when a subsequent read request hits the secondary index again, this process needs to be repeated. Then, a user read request requires two random disk reads, which greatly increases the delay of the read request and affects the speed at which users read data.

[0032] To solve this problem, the application stores the secondary index of the appended write data and its corresponding primary index in the target cache, such as the LRU (Least recently used) catch cache. Therefore, when the index information corresponding to the logical address in the read data request in the memory belongs to the secondary index, it is first determined whether it hits the target cache. If it hits, the primary index corresponding to the logical address can be directly obtained from the secondary index stored in the target cache without reading from the disk, thereby reducing the number of random disk reads.

[0033] S102. Read data corresponding to the logical address from the disk according to the primary index.

[0034] After obtaining the primary index, the data corresponding to the logical address can be read from the disk and returned to the user, completing a data reading process.

[0035] The technical solution of the embodiment of the present application adds a secondary index to the target cache, and when reading data, first determines whether the secondary index corresponding to the logical address hits the target cache. If it hits, the corresponding primary index can be directly obtained from the secondary index in the target cache, and data is read from the disk according to the primary index. Compared with the prior art, the number of times the user reads the disk twice when the read request hits the secondary index can be reduced, thereby reducing the user read delay and improving the data reading speed of the append write storage engine.

[0036] Figure 2 2 is a flow chart of a data reading method for appending write according to an embodiment of the present application. This embodiment is further optimized on the basis of the above embodiment. Figure 2 As shown, the method specifically includes the following:

[0037] S201. Determine whether the index information corresponding to the logical address in the data read request in the memory belongs to a secondary index. If yes, execute S202.

[0038] S202: Determine whether the secondary index hits the target cache. If yes, execute S203 and S204.

[0039] The target cache may exist in the form of a linked list, and the secondary indexes of the appended write data are stored sequentially from the head to the tail of the linked list. Since the number of primary indexes corresponding to each secondary index is different and the memory occupied is also different, the capacity threshold of the target cache is configured according to the number of primary indexes corresponding to the secondary indexes of the appended write data.

[0040] S203: Obtain a primary index corresponding to the logical address from the secondary index stored in the target cache, and read data corresponding to the logical address from the disk according to the primary index.

[0041] S204: Change the storage location of the secondary index in the target cache to the head of the linked list, and move other secondary indexes stored in the target cache to the tail of the linked list in sequence.

[0042] Specifically, each time when the index information corresponding to the logical address in the read data request belongs to the secondary index in the memory, and the secondary index hits the target cache, in addition to reading the data according to S203, it is also necessary to change the storage position of the secondary index in the target cache to the head of the linked list, and the other secondary indexes stored in the target cache are moved to the tail of the linked list in sequence. For example, if the currently hit secondary index is stored in the middle of the linked list, then the other secondary indexes are moved to the tail of the linked list in sequence, and the position at the head of the linked list is vacated to store the currently hit secondary index. Therefore, the data reading heat of the secondary index stored closer to the head of the linked list is higher, and the data reading heat of the secondary index stored closer to the tail is lower. Storing the higher-heat secondary index at the head of the linked list can further improve the data reading speed.

[0043] It should be noted that operations S203 and S204 may be executed simultaneously, or S203 may be executed first, or S204 may be executed first. The embodiment of the present application does not impose any limitation on the execution order between S203 and S204.

[0044] The technical solution of the embodiment of the present application adds a secondary index to the target cache, and when reading data, first determines whether the secondary index corresponding to the logical address hits the target cache. If it hits, the corresponding primary index can be directly obtained from the secondary index in the target cache, and data can be read from the disk according to the primary index. Compared with the prior art, the number of disk reads can be reduced when the user read request hits the secondary index, the user read delay can be improved, and the data reading speed of the append write storage engine can be improved. At the same time, storing the hotter secondary index at the head of the linked list can further improve the speed of data reading.

[0045] Figure 32 is a flow chart of a data reading method for appending write according to an embodiment of the present application. This embodiment is further optimized on the basis of the above embodiment. Figure 3 As shown, the method specifically includes the following:

[0046] S301. Determine whether the index information corresponding to the logical address in the read data request in the memory belongs to a secondary index or a primary index. If it is a primary index, execute S302; if it is a secondary index, execute S303.

[0047] S302: Read data corresponding to the logical address from the disk according to the primary index.

[0048] S303: Determine whether the secondary index hits the target cache. If yes, execute S304 and S305; if no, execute S306 and S307.

[0049] S304: Obtain a primary index corresponding to the logical address from the secondary index stored in the target cache, and read data corresponding to the logical address from the disk according to the primary index.

[0050] S305: Change the storage location of the secondary index in the target cache to the head of the linked list, and move other secondary indexes stored in the target cache to the tail of the linked list in sequence.

[0051] S306: Obtain a primary index corresponding to the logical address from the disk, and read data corresponding to the logical address from the disk according to the primary index.

[0052] S307: Add the secondary index and its corresponding primary index to the head of the linked list.

[0053] Specifically, when the index information corresponding to the logical address in the read data request belongs to the secondary index in the memory, but the secondary index does not hit the target cache, the primary index corresponding to the logical address is obtained from the disk, and the data corresponding to the logical address is read from the disk according to the primary index. In addition, the secondary index and its corresponding primary index need to be added to the head of the linked list.

[0054] Before adding a secondary index, the target capacity required in the target cache can be determined based on the sum of the number of corresponding primary indexes in the secondary index. If the current remaining capacity in the target cache is greater than or equal to the target capacity, it can be added directly. If it is less than the target capacity, the existing secondary index is released from the tail of the linked list until the remaining capacity after release is greater than or equal to the target capacity, and then the current secondary index is added to the head of the linked list. In this way, the target cache uses the secondary index as a unit and eliminates the secondary indexes with lower popularity from the tail of the linked list to release enough space to store the current secondary index.

[0055] It should be noted that operations S306 and S307 may be executed simultaneously, or S306 may be executed first, or S307 may be executed first. The embodiment of the present application does not impose any limitation on the execution order between S306 and S307.

[0056] The technical solution of the embodiment of the present application adds a secondary index to the target cache and ensures that the data heat corresponding to the secondary index stored from the head to the tail in the linked list gradually decreases, while reducing the number of disk reads twice when a user read request hits the secondary index, and further improves the data reading speed.

[0057] Figure 4 1 is a schematic diagram of the structure of a data reading device for appending write according to an embodiment of the present application. The present embodiment can be applied to the case of reading data in an appending write storage engine, and relates to the field of cloud computing, and in particular to a cloud storage technology. The device can implement the data reading method for appending write described in any embodiment of the present application. Figure 4 As shown, the device 400 specifically includes:

[0058] The primary index acquisition module 401 is used to obtain the primary index corresponding to the logical address in the read data request from the secondary index stored in the target cache in response to the index information corresponding to the logical address in the memory belonging to the secondary index, and the secondary index hits the target cache;

[0059] A first data acquisition module 402, configured to read data corresponding to the logical address from a disk according to the primary index;

[0060] The target cache is used to store the secondary index for appending write data and at least two primary indexes corresponding to each secondary index.

[0061] Optionally, the target cache is in the form of a linked list, and the secondary indexes of the additional write data are stored in sequence from the head to the tail of the linked list.

[0062] Optionally, the device further comprises:

[0063] A storage position change module is used to change the storage position of the secondary index in the target cache to the head of the linked list in response to the index information corresponding to the logical address in the memory belonging to the secondary index, and the other secondary indexes stored in the target cache are moved to the tail of the linked list in sequence.

[0064] Optionally, the device further comprises:

[0065] A second data acquisition module is used to obtain the first-level index corresponding to the logical address from the disk in response to the index information corresponding to the logical address in the memory belonging to the second-level index, and the second-level index does not hit the target cache, and read the data corresponding to the logical address from the disk according to the first-level index.

[0066] Optionally, the device also includes: an index adding module, which is used to add the secondary index and its corresponding primary index to the head of the linked list in response to the index information corresponding to the logical address in the memory belonging to the secondary index, and the secondary index does not hit the target cache.

[0067] Optionally, the device further includes: a third data acquisition module, configured to read data corresponding to the logical address from the disk according to the first-level index in response to the index information corresponding to the logical address in the memory belonging to the first-level index.

[0068] Optionally, the capacity threshold of the target cache is configured according to the number of corresponding primary indexes in the secondary index of the appended write data.

[0069] The data reading device 400 for appending writing provided in the embodiment of the present application can execute the data reading method for appending writing provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method. For the contents not described in detail in this embodiment, reference can be made to the description in any method embodiment of the present application.

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

[0071] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, 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 required herein.

[0072] like Figure 5As shown, the device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0073] A number of components in the device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0074] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 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, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above, such as a data reading method for appending writes. For example, in some embodiments, the data reading method for appending writes may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the data reading method for appending writes described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to execute the data reading method for append writing in any other appropriate manner (for example, by means of firmware).

[0075] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0076] The program code for implementing the method 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, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0077] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. 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, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0078] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types 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).

[0079] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected 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), a blockchain network, and the Internet.

[0080] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services. The server may also be a server of a distributed system, or a server combined with a blockchain.

[0081] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0082] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A data reading method for append writing, comprising: In response to the index information corresponding to the logical address in the data read request in the memory belonging to the secondary index, and the secondary index hits the target cache, the primary index corresponding to the logical address is obtained from the secondary index stored in the target cache; wherein the secondary index is used to point to the location of the primary index in the storage system; Reading data corresponding to the logical address from the disk according to the primary index; The target cache is used to store the secondary index for appending write data, and at least two primary indexes corresponding to each secondary index; Among them, the number of primary indexes corresponding to each secondary index is different, and the memory occupied is also different. The capacity threshold of the target cache is configured according to the number of primary indexes corresponding to the secondary index of the additional write data.

2. The method according to claim 1, wherein: The target cache is in the form of a linked list, and the secondary indexes of the additional write data are stored in sequence from the head to the tail of the linked list.

3. The method according to claim 2, further comprising: In response to the fact that the index information corresponding to the logical address in the memory belongs to a secondary index and the secondary index hits the target cache, the storage position of the secondary index in the target cache is changed to the head of the linked list, and the other secondary indexes stored in the target cache are moved to the tail of the linked list in sequence.

4. The method according to claim 2, further comprising: In response to the index information corresponding to the logical address in the memory belonging to the secondary index, and the secondary index does not hit the target cache, the primary index corresponding to the logical address is obtained from the disk, and the data corresponding to the logical address is read from the disk according to the primary index.

5. The method according to claim 4, further comprising: In response to the index information corresponding to the logical address in the memory belonging to a secondary index, and the secondary index does not hit the target cache, the secondary index and its corresponding primary index are added to the head of the linked list.

6. The method according to claim 1, further comprising: In response to the index information corresponding to the logical address in the memory belonging to a first-level index, data corresponding to the logical address is read from the disk according to the first-level index.

7. A data reading device for appending writing, comprising: A first-level index acquisition module, for, in response to the index information corresponding to the logical address in the data read request in the memory belonging to the second-level index, and the second-level index hits the target cache, acquiring the first-level index corresponding to the logical address from the second-level index stored in the target cache; wherein the second-level index is used to point to the location of the first-level index in the storage system; A first data acquisition module, configured to read data corresponding to the logical address from a disk according to the primary index; The target cache is used to store the secondary index for appending write data, and at least two primary indexes corresponding to each secondary index; Among them, the number of primary indexes corresponding to each secondary index is different, and the memory occupied is also different. The capacity threshold of the target cache is configured according to the number of primary indexes corresponding to the secondary index of the additional write data.

8. The device according to claim 7, wherein: The target cache is in the form of a linked list, and the secondary indexes of the additional write data are stored in sequence from the head to the tail of the linked list.

9. The apparatus according to claim 8, further comprising: A storage position change module is used to change the storage position of the secondary index in the target cache to the head of the linked list in response to the index information corresponding to the logical address in the memory belonging to the secondary index, and the other secondary indexes stored in the target cache are moved to the tail of the linked list in sequence.

10. The apparatus according to claim 8, further comprising: A second data acquisition module is used to obtain the first-level index corresponding to the logical address from the disk in response to the index information corresponding to the logical address in the memory belonging to the second-level index, and the second-level index does not hit the target cache, and read the data corresponding to the logical address from the disk according to the first-level index.

11. The apparatus according to claim 10, further comprising: An index adding module is used to add the secondary index and its corresponding primary index to the head of the linked list in response to the index information corresponding to the logical address in the memory belonging to the secondary index and the secondary index not hitting the target cache.

12. The apparatus according to claim 7, further comprising: The third data acquisition module is used for reading the data corresponding to the logical address from the disk according to the first-level index in response to the index information corresponding to the logical address in the memory belonging to the first-level index.

13. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data reading method for appending writing according to any one of claims 1 to 6.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable a computer to execute the data reading method for additional writing according to any one of claims 1 to 6.

15. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the data reading method for append writing according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data processing method and system

    CN110244911A

  • Data additional writing method and device, equipment, medium and program product

    CN112540731A