Data reading method and device, electronic equipment and computer readable storage medium

By merging the user's read requests in the erasure coded data reading process, the disk pressure and IO performance problems caused by multiple disk read operations in the prior art are solved, and more efficient data reading is achieved.

CN120104059APending Publication Date: 2025-06-06CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510166775.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-14
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

In the existing erasure code (EC) data reading process, when the user requests data, it will cause multiple disk reading operations, increase disk pressure, and lead to poor system IO performance.

Method used

By receiving the user's read request, obtaining the requested metadata information, determining whether the merge condition is met, and if it is met, the merged request is generated to reduce the number of disk accesses.

Benefits of technology

By merging read requests that meet the conditions, reduce the number of disk accesses, reduce disk pressure, and improve system IO performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120104059A_ABST
    Figure CN120104059A_ABST
Patent Text Reader

Abstract

The invention relates to a data reading method and device, electronic equipment and a computer readable storage medium, and the method comprises the steps: receiving each reading request sent by a user, obtaining metadata information corresponding to each reading request, judging whether each reading request meets a merging condition or not based on the metadata information corresponding to each reading request, and carrying out the merging of all the reading requests. And if each reading request meets a merging condition, merging the reading requests to obtain a merged reading request, and based on the merged reading request, reading target data and returning the target data to a user. Compared with the prior art, the embodiment of the invention has the advantages that the read requests are merged to obtain the merged read request, and the target data are read and returned to the user based on the merged read request, so that the plurality of requests meeting the merging condition can be merged into one disk reading operation, the disk access frequency is reduced, and the IO performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a data reading method, device, electronic device, and computer-readable storage medium. Background Art

[0002] In the erasure coding technology, data is divided and encoded per chunk. Erasure coding is a redundancy technology that splits the original data into multiple data chunks and generates additional redundant data (usually called check fragments) based on these chunks, so that even if part of the data is lost, the complete data can still be restored.

[0003] For EC scenarios, user data will be divided into multiple fixed-size chunks, each of which falls on an independent physical shard, corresponding to a separate disk or disk partition. In an erasure coded storage system, data is usually divided into K data blocks and m redundant blocks, which together form a stripe. Each stripe contains a group of k data blocks and m redundant blocks.

[0004] In the existing EC data reading process, user requested data will first be converted to each disk, and each request will generate a disk read operation. If the data read from the disk is continuous, it will bring about a large read amplification, that is, multiple disk read accesses will be generated, increasing disk pressure and causing poor system IO performance. Summary of the invention

[0005] In order to solve the above technical problems, the present disclosure provides a data reading method, device, electronic device and computer-readable storage medium to reduce the number of disk accesses, reduce disk pressure and improve system IO performance.

[0006] In a first aspect, an embodiment of the present disclosure provides a data reading method, the method comprising:

[0007] Receive each read request sent by the user, and obtain metadata information corresponding to each read request;

[0008] Based on the metadata information corresponding to each read request, determining whether each read request meets a merging condition;

[0009] If the read requests meet the merging condition, merge the read requests to obtain a merged read request;

[0010] Based on the merged read request, the target data is read and returned to the user.

[0011] In some embodiments, each of the read requests includes identification information of the data to be read, an identification of a disk where the data to be read is stored, a length of the data to be read, and an offset of the data to be read.

[0012] In some embodiments, obtaining metadata information corresponding to each read request includes:

[0013] Obtaining a logical address of each read request based on each read request;

[0014] Based on the mapping table of logical addresses and physical addresses and the logical addresses of each read request, metadata information corresponding to each read request is determined, where the metadata information includes a mapping relationship between the logical address of the read request and the physical address of the read request.

[0015] In some embodiments, judging whether each read request satisfies a merging condition based on metadata information corresponding to each read request includes:

[0016] Determining a physical address of each read request based on metadata information corresponding to each read request;

[0017] It is determined whether each read request satisfies a merging condition based on the physical address of each read request.

[0018] In some embodiments, the determining whether each read request satisfies a merging condition based on the physical address of each read request includes:

[0019] Perform traversal analysis based on the physical addresses of each read request, and for any physical address of a read request, determine whether there is a target physical address in the merge information table that is continuous with the physical address of the read request;

[0020] If there is no target physical address in the merge information table that is continuous with the physical address of the read request, then create a record in the merge information table, the key of the record is the row number of the record in the merge information table, and the value of the record is the physical address of the read request;

[0021] If there is a target physical address in the merge information table that is continuous with the physical address of the read request, it is determined that the read request meets the merge condition, and the physical address of the read request is added to the value of the record corresponding to the target physical address.

[0022] In some embodiments, merging the read requests to obtain a merged read request includes:

[0023] Acquire a merge information table, and create context information of each read request based on the merge information table, wherein the context information includes relevant information of each read request and a mapping relationship between each read request and a merged read request;

[0024] Based on the context information of each read request, the value of each record in the merge information table is merged to generate a merged read request.

[0025] In some embodiments, based on the merged read request, reading the target data and returning it to the user includes:

[0026] Perform a data reading operation based on the merged read request to read the target data;

[0027] Based on the mapping relationship between each read request and the merged read request, the target data is reversely parsed to obtain data corresponding to each read request, and the data corresponding to each read request is returned to the user.

[0028] In a second aspect, an embodiment of the present disclosure provides a data reading device, the device comprising:

[0029] An acquisition module is used to receive each read request sent by the user and obtain metadata information corresponding to each read request;

[0030] A judgment module, used to judge whether each read request meets a merging condition based on metadata information corresponding to each read request;

[0031] A merging module, configured to merge the read requests to obtain a merged read request if the read requests meet a merging condition;

[0032] The reading module is used to read the target data based on the merged reading request and return it to the user.

[0033] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:

[0034] Memory;

[0035] Processor; and

[0036] Computer programs;

[0037] The computer program is stored in the memory and is configured to be executed by the processor to implement the method as described in the first aspect.

[0038] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method as described in the first aspect.

[0039] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the method described in the first aspect is implemented.

[0040] The data reading method, device, electronic device and computer-readable storage medium provided by the embodiments of the present disclosure receive various read requests sent by the user, obtain metadata information corresponding to each read request, and judge whether each read request meets the merge condition based on the metadata information corresponding to each read request. If each read request meets the merge condition, the various read requests are merged to obtain a merged read request, and the target data is read and returned to the user based on the merged read request. Compared with the prior art, the embodiments of the present disclosure merge the various read requests to obtain a merged read request, and the target data is read and returned to the user based on the merged read request, so that multiple requests that meet the merge condition can be merged into one disk read operation, thereby reducing the number of disk accesses and improving IO performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0043] Figure 1 A flow chart of a data reading method provided by an embodiment of the present disclosure;

[0044] Figure 2 A flow chart of a data reading method provided by another embodiment of the present disclosure;

[0045] Figure 3 A flow chart of a data reading method provided by another embodiment of the present disclosure;

[0046] Figure 4 A schematic diagram of the overall flow of the data reading method provided by the embodiment of the present disclosure;

[0047] Figure 5A schematic diagram of the structure of a data reading device provided in an embodiment of the present disclosure;

[0048] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0049] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0050] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0051] In the erasure coding technology, data is divided and encoded per chunk. Erasure coding is a redundancy technology that splits the original data into multiple data chunks and generates additional redundant data (usually called check fragments) based on these chunks, so that even if part of the data is lost, the complete data can still be restored.

[0052] For EC scenarios, user data will be divided into multiple fixed-size chunks, each of which falls on an independent physical shard, corresponding to a separate disk or disk partition. In an erasure coded storage system, data is usually divided into K data blocks and m redundant blocks, which together form a stripe. Each stripe contains a group of k data blocks and m redundant blocks.

[0053] In the existing EC data reading process, user requested data will first be converted to each disk, and each request will generate a disk read operation. If the data read from the disk is continuous, it will bring about a large read amplification, that is, multiple disk read accesses will be generated, increasing disk pressure and causing poor system IO performance.

[0054] To address this problem, an embodiment of the present disclosure provides a data reading method, which is described below in conjunction with a specific embodiment.

[0055] Figure 1This is a flow chart of a data reading method provided in an embodiment of the present disclosure. The method can be applied to electronic devices, which can be portable mobile devices such as tablet computers and laptop computers; they can also be fixed devices such as personal computers and servers, where the server can be a single server or a server cluster, and the server cluster can be a distributed cluster or a centralized cluster. The method can be applied to scenarios where data is read, which can reduce the number of disk accesses, reduce disk pressure, and improve system IO performance. It is understandable that the data reading method provided in an embodiment of the present disclosure can also be applied in other scenarios.

[0056] Below Figure 1 The data reading method shown in the figure is introduced, and the method includes the following steps:

[0057] S101: Receive each read request sent by a user, and obtain metadata information corresponding to each read request.

[0058] In this step, the user will send multiple read requests, and the electronic device will receive each read request sent by the user and obtain metadata information corresponding to each read request. Optionally, the metadata information is used to characterize the mapping relationship between the logical address and the physical address of each read request. Figure 4 As shown, the electronic device reads metadata information corresponding to each read request.

[0059] S102: Based on the metadata information corresponding to each read request, determine whether each read request meets a merging condition.

[0060] In this step, after obtaining the metadata information corresponding to each read request, the electronic device will determine whether each read request meets the merging condition according to the metadata information corresponding to each read request. If each read request meets the merging condition, S103 and steps after S103 are executed.

[0061] In some embodiments, if the individual read requests do not satisfy the merge condition, no merge is performed.

[0062] S103: If the read requests meet a merging condition, merge the read requests to obtain a merged read request.

[0063] In this embodiment, if it is determined that each read request meets the merging condition, the electronic device will merge the read requests to obtain a merged read request. Multiple requests that meet the merging condition can be merged to reduce the number of disk access times.

[0064] S104: Based on the merged read request, the target data is read and returned to the user.

[0065] In this embodiment, the electronic device can read data according to the combined read request, read the target data and return it to the user. Reading data based on the combined read request can reduce the number of disk reads, reduce disk pressure, and improve IO performance.

[0066] The disclosed embodiment receives each read request sent by the user, obtains metadata information corresponding to each read request, and determines whether each read request meets the merge condition based on the metadata information corresponding to each read request. If each read request meets the merge condition, the read requests are merged to obtain a merged read request, and the target data is read and returned to the user based on the merged read request. Compared with the prior art, the disclosed embodiment merges the read requests to obtain a merged read request, and the target data is read and returned to the user based on the merged read request, so that multiple requests that meet the merge condition can be merged into one disk read operation, thereby reducing the number of disk accesses and improving IO performance.

[0067] Figure 2 A flow chart of a data reading method provided by another embodiment of the present disclosure is shown in FIG. Figure 2 As shown, the method includes the following steps:

[0068] S301. Receive each read request sent by a user.

[0069] In this step, the user may send multiple read requests, and the electronic device may receive each read request sent by the user. Figure 4 As shown, the electronic device receives multiple EC read IO requests.

[0070] In some embodiments, each of the read requests includes identification information of the data to be read, an identification of a disk where the data to be read is stored, a length of the data to be read, and an offset of the data to be read.

[0071] Optionally, each read request may include identification information of the data to be read, an identification of a disk storing the data to be read, a length of the data to be read, an offset of the data to be read, and may also include other information, which is not specifically limited here.

[0072] S302: Obtain a logical address of each read request based on each read request.

[0073] In this step, after receiving each read request sent by the user, the electronic device can obtain the logical address of each read request from the read request. Specifically, the electronic device can calculate the logical address of each read request according to the length of the data to be read and the offset of the data to be read in each read request.

[0074] S303, based on the mapping table of logical addresses and physical addresses and the logical addresses of each read request, determine metadata information corresponding to each read request, wherein the metadata information includes a mapping relationship between the logical address of the read request and the physical address of the read request.

[0075] In this step, a mapping table of logical addresses and physical addresses is stored in the electronic device, and metadata information corresponding to each read request is further determined based on the mapping table of logical addresses and physical addresses and the logical address of each read request. The metadata information includes a mapping relationship between the logical address of the read request and the physical address of the read request.

[0076] S304: Determine the physical address of each read request based on the metadata information corresponding to each read request.

[0077] In this step, the electronic device can determine the physical address of each read request according to the metadata information corresponding to each read request. Specifically, the physical address of each read request can be determined according to the mapping relationship between the logical address of each read request and the physical address of each read request.

[0078] S305 . Determine whether each read request satisfies a merging condition based on the physical address of each read request.

[0079] In this step, after determining the physical address of each read request, the electronic device will determine whether each read request meets the merging condition according to the physical address of each read request. If the merging condition is met, S306 and steps after S306 are executed.

[0080] S306: If the read requests meet a merging condition, merge the read requests to obtain a merged read request.

[0081] Specifically, the implementation process and principle of S306 and S103 are the same, and will not be repeated here.

[0082] S307 . Perform a data reading operation based on the merged read request to read target data.

[0083] In this step, the electronic device can perform a data reading operation according to the combined read request to read the target data. Reading data based on the combined read request can reduce the number of disk reads, reduce disk pressure, and improve IO performance.

[0084] S308 . Based on the mapping relationship between each read request and the merged read request, reverse-parse the target data to obtain data corresponding to each read request, and return the data corresponding to each read request to the user.

[0085] In this step, the electronic device performs reverse parsing on the target data based on the mapping relationship between each read request and the merged read request, obtains the data corresponding to each read request, and returns the data corresponding to each read request to the user. Figure 4 As shown, the electronic device de-parses the read data back to the user space. Through the mapping relationship between each read request and the combined read request, the data corresponding to each read request can be obtained to complete the IO read operation.

[0086] The disclosed embodiment receives each read request sent by the user, obtains the logical address of each read request based on the read request, determines the metadata information corresponding to each read request based on the mapping table of the logical address and the physical address and the logical address of each read request, and the metadata information includes the mapping relationship between the logical address of the read request and the physical address of the read request. Further, based on the metadata information corresponding to each read request, the physical address of each read request is determined, and based on the physical address of each read request, it is judged whether each read request meets the merging condition. If each read request meets the merging condition, the read requests are merged to obtain the merged read request. Then, based on the merged read request, a data reading operation is performed to read the target data, and based on the mapping relationship between each read request and the merged read request, the target data is reversely parsed to obtain the data corresponding to each read request, and the data corresponding to each read request is returned to the user. Through this method, the disclosed embodiment can reduce the number of disk accesses, reduce disk pressure, and improve IO performance.

[0087] Figure 3 A flow chart of a data reading method provided by another embodiment of the present disclosure is shown in FIG. Figure 3 As shown, the method includes the following steps:

[0088] S401: Receive each read request sent by a user, and obtain metadata information corresponding to each read request.

[0089] Specifically, the implementation process and principle of S401 and S101 are the same, and will not be repeated here.

[0090] S402: Determine a physical address of each read request based on metadata information corresponding to each read request.

[0091] Specifically, the implementation process and principle of S402 and S304 are the same, and will not be repeated here.

[0092] S403 , performing traversal analysis based on the physical addresses of each read request, and for any physical address of a read request, determining whether there is a target physical address in the merge information table that is continuous with the physical address of the read request.

[0093] like Figure 4 As shown, the electronic device performs traversal iterative analysis, and for any physical address of a read request, determines whether there is a target physical address in the merge information table that is continuous with the physical address of the read request, that is, determines whether the physical addresses of each read request are continuous.

[0094] S404. If there is no target physical address in the merge information table that is continuous with the physical address of the read request, create a record in the merge information table, where the key of the record is the row number of the record in the merge information table, and the value of the record is the physical address of the read request.

[0095] like Figure 4 As shown, if the target physical address that is continuous with the physical address of the read request does not exist in the merge information table, a new record is inserted, the key of the record is the row number of the record in the merge information table, and the value of the record is the physical address of the read request. For example, the key is the row number 1, and the value is the physical address p100-p200. In other words, if it does not exist, the row number in the merge information table is used as the key, and the physical address of the read request is stored in the merge information table as the value.

[0096] S405: If there is a target physical address in the merge information table that is continuous with the physical address of the read request, determine that the read request meets the merge condition, and add the physical address of the read request to the value of the record corresponding to the target physical address.

[0097] like Figure 4 As shown, if there is a target physical address in the merge information table that is continuous with the physical address of the read request, it is determined that the read request meets the merge condition, the record in the merge information table is updated, and the physical address of the read request is added to the value of the record corresponding to the target physical address. In other words, if it exists, the physical address of the read request is inserted into the value of the corresponding record. After one iteration is completed, the merge information table contains the merge information of the physical addresses of all read requests.

[0098] S406. If each of the read requests meets the merge condition, obtain a merge information table, and create context information of each of the read requests based on the merge information table, wherein the context information includes relevant information of each of the read requests and a mapping relationship between each of the read requests and the merged read request.

[0099] In this step, if Figure 4 As shown, the electronic device will parse the merge information table and create context information for each read request based on the merge information table. Optionally, the context information includes relevant information for each read request and a mapping relationship between each read request and the merged read request. The context information retains relevant information for the original read request and a mapping relationship between the original read request and the merged read request.

[0100] S407: Based on the context information of each read request, merge the value of each record in the merge information table to generate a merged read request.

[0101] In this step, the electronic device will merge the values ​​of each record in the merge information table according to the context information of each read request to generate a merged read request. Each record generates a merged read request, and there will be only one disk read, which will greatly reduce disk read operations, reduce disk pressure, and improve IO performance.

[0102] S408: Based on the merged read request, the target data is read and returned to the user.

[0103] Specifically, the implementation process and principle of S408 and S104 are the same, and will not be repeated here.

[0104] The disclosed embodiment receives each read request sent by the user, obtains metadata information corresponding to each read request, and determines the physical address of each read request based on the metadata information corresponding to each read request. Further, based on the physical address of each read request, a traversal analysis is performed, and for the physical address of any read request, it is determined whether there is a target physical address in the merge information table that is continuous with the physical address of the read request. If there is no target physical address in the merge information table that is continuous with the physical address of the read request, a record is created in the merge information table, the key of which is the row number of the record in the merge information table, and the value of which is the physical address of the read request; if there is a target physical address in the merge information table that is continuous with the physical address of the read request, it is determined that the read request meets the merge condition, and the physical address of the read request is added to the value of the record corresponding to the target physical address. Next, if the various read requests meet the merge condition, a merge information table is obtained, and context information of the various read requests is created based on the merge information table, wherein the context information includes relevant information of the various read requests, a mapping relationship between the various read requests and the merged read request, and based on the context information of the various read requests, the value of each record in the merge information table is merged to generate a merged read request. Then, based on the merged read request, the target data is read and returned to the user. Compared with the prior art, the embodiment of the present disclosure merges the various read requests to obtain a merged read request, and based on the merged read request, the target data is read and returned to the user, so that multiple requests that meet the merge condition can be merged into one disk read operation, thereby reducing the number of disk accesses and improving IO performance.

[0105] Figure 5 Schematic diagram of the structure of the data reading device provided in the embodiment of the present disclosure. The data reading device may be an electronic device as in the above embodiment, or the data reading device may be a component or assembly in the electronic device. The data reading device provided in the embodiment of the present disclosure may execute the processing flow provided in the data reading method embodiment, such as Figure 5 As shown, the data reading device 50 includes: an acquisition module 51, a judgment module 52, a merging module 53, and a reading module 54; wherein the acquisition module 51 is used to receive each read request sent by the user and obtain metadata information corresponding to each read request; the judgment module 52 is used to judge whether each read request meets a merging condition based on the metadata information corresponding to each read request; the merging module 53 is used to merge the each read request if the each read request meets the merging condition to obtain a merged read request; the reading module 54 is used to read the target data based on the merged read request and return it to the user.

[0106] Optionally, each read request includes identification information of the data to be read, an identification of a disk where the data to be read is stored, a length of the data to be read, and an offset of the data to be read.

[0107] Optionally, when the acquisition module 51 acquires the metadata information corresponding to each read request, it is specifically used to: obtain the logical address of each read request based on the each read request; determine the metadata information corresponding to each read request based on a mapping table of logical addresses and physical addresses, and the logical address of each read request, the metadata information including a mapping relationship between the logical address of the read request and the physical address of the read request.

[0108] Optionally, when the judgment module 52 judges whether each read request satisfies the merging condition based on the metadata information corresponding to each read request, it is specifically used to: determine the physical address of each read request based on the metadata information corresponding to each read request; and judge whether each read request satisfies the merging condition based on the physical address of each read request.

[0109] Optionally, when the judgment module 52 judges whether each read request satisfies the merge condition based on the physical address of each read request, it is specifically used to: perform traversal analysis based on the physical address of each read request, and for the physical address of any read request, judge whether there is a target physical address in the merge information table that is continuous with the physical address of the read request; if there is no target physical address in the merge information table that is continuous with the physical address of the read request, create a record in the merge information table, the key of the record is the row number of the record in the merge information table, and the value of the record is the physical address of the read request; if there is a target physical address in the merge information table that is continuous with the physical address of the read request, determine that the read request satisfies the merge condition, and add the physical address of the read request to the value of the record corresponding to the target physical address.

[0110] Optionally, when the merging module 53 merges the various read requests to obtain a merged read request, it is specifically used to: obtain a merge information table, and create context information of the various read requests based on the merge information table, wherein the context information includes relevant information of the various read requests and a mapping relationship between the various read requests and the merged read request; based on the context information of the various read requests, merge the values ​​of each record in the merge information table to generate a merged read request.

[0111] Optionally, when the reading module 54 reads the target data based on the merged read request and returns it to the user, it is specifically used to: perform a data reading operation based on the merged read request to read the target data; based on the mapping relationship between each read request and the merged read request, perform a reverse analysis on the target data to obtain the data corresponding to each read request, and return the data corresponding to each read request to the user.

[0112] Figure 5 The data reading device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned method embodiment, and its implementation principle and technical effect are similar and will not be described in detail here.

[0113] Figure 6 The electronic device provided by the embodiment of the present disclosure can execute the processing flow provided by the data reading method embodiment, such as Figure 6 As shown, the electronic device 80 includes: a memory 81, a processor 82, a computer program and a communication interface 83; wherein the computer program is stored in the memory 81 and is configured so that the processor 82 executes the data reading method as described above.

[0114] In addition, an embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the data reading method described in the above embodiment.

[0115] In addition, an embodiment of the present disclosure further provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the data reading method as described above is implemented.

[0116] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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 above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0117] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperTextTransferProtocol), and may be interconnected with 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"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an adhoc peer-to-peer network), as well as any currently known or future developed network.

[0118] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0119] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:

[0120] Receive each read request sent by the user, and obtain metadata information corresponding to each read request;

[0121] Based on the metadata information corresponding to each read request, determining whether each read request meets a merging condition;

[0122] If the read requests meet the merging condition, merge the read requests to obtain a merged read request;

[0123] Based on the merged read request, the target data is read and returned to the user.

[0124] In addition, the electronic device can also execute other steps in the data reading method described above.

[0125] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0126] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0127] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.

[0128] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0129] 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.

[0130] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0131] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data reading method, characterized in that: The method comprises: Receive each read request sent by the user, and obtain metadata information corresponding to each read request; Based on the metadata information corresponding to each read request, determining whether each read request meets a merging condition; If the read requests meet the merging condition, merge the read requests to obtain a merged read request; Based on the merged read request, the target data is read and returned to the user.

2. The method according to claim 1, characterized in that Each of the read requests includes identification information of the data to be read, an identification of the disk where the data to be read is stored, a length of the data to be read, and an offset of the data to be read.

3. The method according to claim 1, characterized in that The obtaining of metadata information corresponding to each read request includes: Obtaining a logical address of each read request based on each read request; Based on the mapping table of logical addresses and physical addresses and the logical addresses of each read request, metadata information corresponding to each read request is determined, where the metadata information includes a mapping relationship between the logical address of the read request and the physical address of the read request.

4. The method according to claim 1, characterized in that: The determining, based on the metadata information corresponding to each of the read requests, whether each of the read requests satisfies a merging condition includes: Determining a physical address of each read request based on metadata information corresponding to each read request; It is determined whether each read request satisfies a merging condition based on the physical address of each read request.

5. The method according to claim 4, characterized in that The determining whether each read request satisfies a merging condition based on the physical address of each read request includes: Perform traversal analysis based on the physical addresses of each read request, and for any physical address of a read request, determine whether there is a target physical address in the merge information table that is continuous with the physical address of the read request; If there is no target physical address in the merge information table that is continuous with the physical address of the read request, then create a record in the merge information table, the key of the record is the row number of the record in the merge information table, and the value of the record is the physical address of the read request; If there is a target physical address in the merge information table that is continuous with the physical address of the read request, it is determined that the read request meets the merge condition, and the physical address of the read request is added to the value of the record corresponding to the target physical address.

6. The method according to claim 1, characterized in that The merging of the read requests to obtain a merged read request includes: Acquire a merge information table, and create context information of each read request based on the merge information table, wherein the context information includes relevant information of each read request and a mapping relationship between each read request and a merged read request; Based on the context information of each read request, the value of each record in the merge information table is merged to generate a merged read request.

7. The method according to claim 1, characterized in that The step of reading the target data based on the merged read request and returning the data to the user includes: Perform a data reading operation based on the merged read request to read the target data; Based on the mapping relationship between each read request and the merged read request, the target data is reversely parsed to obtain data corresponding to each read request, and the data corresponding to each read request is returned to the user.

8. A data reading device, characterized in that: The device comprises: An acquisition module is used to receive each read request sent by the user and obtain metadata information corresponding to each read request; A judgment module, used to judge whether each read request meets a merging condition based on metadata information corresponding to each read request; A merging module, configured to merge the read requests to obtain a merged read request if the read requests meet a merging condition; The reading module is used to read the target data based on the merged reading request and return it to the user.

9. An electronic device, characterized in that: include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.