Difference bitmap data reading method and device
By searching and querying differential bitmap data in the preset cache of the client interface layer, and combining the waiting queue and wake-up instructions to optimize the query process, the problem of low reading efficiency of differential bitmap data is solved, and the system performance is improved Query efficiency.
Patent Information
- Application Number
- CN202411161233.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-08-22
AI Technical Summary
In the prior art, the reading efficiency of differential bitmap data is low, resulting in low query efficiency and excessive storage system load, affecting system performance.
By looking for the difference bitmap of the target data shard in the preset cache of the client interface layer, it will be obtained directly if it exists, otherwise it will be queried by the placement group and identify the queryed data shard in the preset data table. Wait for queues and wake-up instructions to optimize the query process, query adjacent data shards in advance to reduce latency.
Improves the efficiency of differential bitmap reading, reduces the load of the storage system, and improves system performance and query delay.
Smart Images

Figure CN119105704A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data reading, and in particular to a method and device for reading differential bitmap data. Background Art
[0002] The differential bitmap volume is a technology used to store data changes. It relies on snapshot technology and records the differential data blocks between snapshots. By reading the differential bitmap volume, you can understand the data changes that occur between different snapshots, thereby achieving fast incremental backup, saving backup time and space, and improving backup efficiency and security. In most cases, users need to segment the differential bitmap volume and then start multiple tasks to read it. For the storage system, it is a multi-stream sequential read. Each bit in the snapshot bitmap and the differential bitmap corresponds to each data block of the source volume, and is initially 0. When the source volume receives a write operation from the host, the bit corresponding to the corresponding data block in the snapshot bitmap will be changed to 1. The difference bitmap is generated by merging two (or more) adjacent snapshot bitmaps, and mapped to the user to form a difference bitmap volume for the user to read. Currently, when querying the difference bitmap of a single chunk (data shard), it is necessary to send a query request to multiple PGs (PLACEMENT GROUP) corresponding to the chunk, obtain the primary copy in each PG group, read out the snapshot bitmap belonging to the chunk, and return it to the client interface layer. The client interface layer converts and splices the snapshot bitmap returned by each PG into a difference bitmap volume, resulting in low query efficiency.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide a method and device for reading difference bitmap data, so as to at least solve the technical problem of low efficiency in reading difference bitmap data in the related art.
[0005] According to one aspect of an embodiment of the present application, a method for reading difference bitmap data is provided, including: receiving a query request, the query request including at least: a target data shard to be queried; traversing a preset cache of a client interface layer, and obtaining a difference bitmap of the target data shard from the preset cache when the preset cache contains a difference bitmap of the target data shard; when the preset cache does not contain a difference bitmap of the target data shard, querying the difference bitmap of the target data shard through a placement group; and outputting the difference bitmap of the target data shard.
[0006] Optionally, querying the difference bitmap of the target data shard through the placement group includes: obtaining from a preset data table whether the target data shard has been queried; if the target data shard has not been queried, sending the query request to the placement group, and storing all difference bitmaps corresponding to the target data shard in the preset cache; obtaining the difference bitmap of the target data shard from the preset cache.
[0007] Optionally, after sending the query request to the placement group, the method further includes: determining an identifier corresponding to the target data shard as a valid value in the preset data table, wherein the valid value is used to indicate that the target data shard has been queried.
[0008] Optionally, the method further includes: when the target data slice has been queried, sending a join request to the waiting queue to join the waiting queue; when a wake-up instruction is received, obtaining a difference bitmap of the target data slice from the preset cache.
[0009] Optionally, the method further includes: if the duration of receiving the query request exceeds a preset duration threshold and the identifier corresponding to the target data slice is not obtained, determining that the target data slice has not been queried.
[0010] Optionally, the method further includes: issuing the wake-up instruction when it is detected that all difference bitmaps corresponding to the target data slice are stored in the preset cache.
[0011] Optionally, after the placement group receives the query request, the method further includes: obtaining adjacent data shards of the target data shard; pre-querying a difference bitmap corresponding to the adjacent data shards, and storing the difference bitmap corresponding to the adjacent data shards in the preset cache.
[0012] According to another aspect of the embodiments of the present application, a device for reading difference bitmap data is also provided, including: a receiving module, used to receive a query request, the query request at least including: a target data slice to be queried; a query module, used to traverse a preset cache of a client interface layer, and when the preset cache contains a difference bitmap of the target data slice, obtain the difference bitmap of the target data slice from the preset cache; when the preset cache does not contain a difference bitmap of the target data slice, query the difference bitmap of the target data slice through a placement group; and an output module, used to output the difference bitmap of the target data slice.
[0013] According to another aspect of the embodiment of the present application, a computer device is also provided, including: a memory for storing program instructions; a processor, connected to the memory, for executing the program instructions of the following functions: receiving a query request, the query request including at least: a target data slice to be queried; traversing a preset cache of a client interface layer, and if the preset cache contains a difference bitmap of the target data slice, obtaining the difference bitmap of the target data slice from the preset cache; if the preset cache does not contain a difference bitmap of the target data slice, querying the difference bitmap of the target data slice through a placement group; and outputting the difference bitmap of the target data slice.
[0014] According to another aspect of the embodiments of the present application, a non-volatile storage medium is provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned method for reading difference bitmap data by running the computer program.
[0015] In an embodiment of the present application, a query request is received, wherein the query request includes at least: a target data slice to be queried; a preset cache of a client interface layer is traversed, and when the preset cache contains a difference bitmap of the target data slice, the difference bitmap of the target data slice is obtained from the preset cache; when the preset cache does not contain a difference bitmap of the target data slice, the difference bitmap of the target data slice is queried through a placement group; and a difference bitmap of the target data slice is output. Through the preset cache of the client interface layer, the purpose of pre-reading the pre-acquired difference bitmap in the cache is achieved. When the required difference bitmap does not exist in the preset cache, a query request is sent to the placement group, thereby achieving the technical effect of improving the efficiency of reading the difference bitmap, and further solving the technical problem of low efficiency in reading difference bitmap data in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0017] Figure 1 is a hardware structure block diagram of a computer terminal for implementing a method for reading difference bitmap data according to an embodiment of the present application;
[0018] Figure 2 is a flow chart of a method for reading difference bitmap data of the present application;
[0019] Figure 3 is a schematic diagram of striping processing in an embodiment of the present application;
[0020] Figure 4 is a flow chart of another method for reading difference bitmap data according to an embodiment of the present application;
[0021] Figure 5 It is a schematic diagram of the structure of a device for reading difference bitmap data according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0024] The method for reading difference bitmap data provided in the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a method for reading difference bitmap data. Figure 1 As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. A person skilled in the art can understand that Figure 1The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0025] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0026] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method for reading the difference bitmap data in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the method for reading the difference bitmap data described above is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0027] The transmission module 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission module 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0028] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .
[0029] It should be noted that, in some optional embodiments, the above Figure 1The computer device shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. It should be noted that Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computer device described above.
[0030] Under the above-mentioned operating environment, an embodiment of the present application provides an embodiment of a method for reading differential bitmap data. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0031] Figure 2 is a flow chart of a method for reading difference bitmap data according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0032] Step S202, receiving a query request, wherein the query request at least includes: a target data shard to be queried;
[0033] Step S204, traversing the preset cache of the client interface layer, and if the preset cache contains the difference bitmap of the target data slice, obtaining the difference bitmap of the target data slice from the preset cache; if the preset cache does not contain the difference bitmap of the target data slice, querying the difference bitmap of the target data slice through the placement group;
[0034] Step S206: output a difference bitmap of the target data slice.
[0035] The method for reading the difference bitmap data in the above steps S202 to S206 adopts a method of receiving a query request, wherein the query request at least includes: the target data shard to be queried; traversing the preset cache of the client interface layer, and obtaining the difference bitmap of the target data shard from the preset cache when the preset cache contains the difference bitmap of the target data shard; querying the difference bitmap of the target data shard through the placement group when the preset cache does not contain the difference bitmap of the target data shard; outputting the difference bitmap of the target data shard, through the preset cache of the client interface layer, achieves the purpose of pre-reading the difference bitmap that has been pre-acquired in the cache, and sending a query request to the placement group when the required difference bitmap does not exist in the preset cache, thereby achieving the technical effect of improving the efficiency of reading the difference bitmap, and further solving the technical problem of low efficiency in reading the difference bitmap data in the related art. The following is a detailed description.
[0036] It should be noted that snapshots save the data of a volume at a certain point in time. The data in snapshots is read-only. Snapshots are generally used for daily data backup and rapid data recovery. In a distributed storage system, the input and output of the same chunk are usually processed on only one thread. When continuous input and output happen to be distributed in the same chunk, one thread will be busy while the other threads will be idle. Through striping, a chunk is divided into multiple small data blocks, and then mapped to multiple adjacent chunks. Figure 3 As shown in the figure, a chunk can be divided into multiple small data blocks (length0, length1, etc.) and the input and output load on the chunk can be balanced to multiple threads. The difference bitmap is a technology for storing data changes. It relies on snapshot technology and records the difference data blocks between snapshots. By reading the difference bitmap, you can understand the data changes between different snapshots, thereby achieving fast incremental backup to save backup time and space and improve backup efficiency and security. In most cases, users need to segment the difference bitmap volume and then start multiple tasks to read it. For the storage system, it is a multi-stream sequential read. Each bit in the snapshot bitmap and the difference bitmap corresponds to each data block of the source volume, and is initially 0. When the source volume receives a write operation from the host, the bit corresponding to the corresponding data block in the snapshot bitmap will be changed to 1. The difference bitmap is generated by merging two (or more) adjacent snapshot bitmaps.
[0037] In the related art, due to the influence of striping, querying the difference bitmap of a single chunk requires sending query requests to multiple PGs, which may lead to low query efficiency and occupy too many input and output resources, thereby causing a high load on the storage system and affecting system performance; in the related art, for query efficiency, the difference bitmap will be considered to be written to the hard disk, so that it does not need to be remapped when reading. However, this method does not take into account the use scenario of the difference bitmap. The use scenario of the difference bitmap is to use it when performing incremental data queries, and its timeliness is very short. Although the difference bitmap volume itself does not take up too much space, as the number of difference bitmaps stored increases, the additional storage space occupied will increase, and reading and writing also reduces the life of the hard disk.
[0038] Take the host querying the difference bitmap of the target volume with an offset of 0, a length of 4KB, and snapshots 999999 to 999998 as an example. In the related art, the client interface layer first converts the offset and length of the difference bitmap into the offset 0 and length 128MB of the target volume. According to the data reading process, it is necessary to send query information to 128 / 4=32 PGs. The master copy in each PG group reads out the snapshot bitmap of snapshot 999998 of the chunk corresponding to the difference bitmap and returns it to the client interface layer. The client interface layer converts and splices the snapshot bitmap returned by each PG into a difference bitmap volume and returns it to the host. At this point, the query ends. It can be seen that the difference bitmap is generated based on the difference data blocks between the target volume snapshots. Therefore, each difference bitmap is associated with a specific snapshot. Since snapshot bitmaps are usually distributed on different storage nodes, each storage node is responsible for managing specific data blocks. When querying the difference bitmap volume, it is necessary to read the corresponding snapshot bitmap data from each storage node, making the network bandwidth and storage nodes performance limitations, resulting in reduced query efficiency.
[0039] In the case of querying in a striped manner, take the stripe length = 32 and stripe width = 32 as an example. After striping, a chunk is divided into 32 (stripe width) small data blocks, and then mapped to 32 adjacent chunks, so that the query of a single chunk is decomposed into 32 query subtasks, so querying a single chunk requires forwarding requests to 32 different PGs, which can take advantage of the parallelism of the distributed storage system, reduce the query and data processing time, and improve the overall data throughput. However, for differential bitmap volumes, the valid data for reading a single 4MB chunk is only 4MB / 32=128KB, which is converted to a differential bitmap of 128KB / 4KB=32 bits, which will result in too little valid information for a single chunk query request.
[0040] Taking the host querying the target volume offset 0, length 4KB, snapshot 999999 to snapshot 999998 difference bitmap information as an example, in the related technology, the client interface layer first converts the offset and length of the difference bitmap into the offset 0 and length 128MB of the source volume. According to the data reading process and striping, it is known that the query information needs to be sent to 128 / 4*32=1024 PGs. The master copy in each PG group reads the snapshot bitmap of snapshot 999998 belonging to this chunk and returns it to the client interface layer. The client interface layer converts and splices the snapshot bitmap returned by each PG into a difference bitmap, and returns it to the host. At this point, the query ends.
[0041] It can be seen that after the striped query is superimposed, the number of requests for PG increases exponentially. In this high concurrency situation, the network bandwidth or storage node will become a performance bottleneck, resulting in excessive query latency. A large number of I / O operations will occupy the resources of the storage system, which may affect the performance of other operations on the storage system, causing a high load on the storage system and affecting the stability and reliability of the system.
[0042] In order to reduce the number of query requests and improve the stability of the storage system, the method for reading the difference bitmap data provided by the present application is adopted. In step S204, the specific method of querying the difference bitmap of the target data shard through the placement group includes: obtaining from a preset data table whether the target data shard has been queried; if the target data shard has not been queried, sending the query request to the placement group, and storing all the difference bitmaps corresponding to the target data shard in the preset cache; obtaining the difference bitmap of the target data shard from the preset cache.
[0043] In some embodiments of the present application, after sending the query request to the placement group, the identifier corresponding to the target data shard is determined as a valid value in the preset data table, and the valid value is used to indicate that the target data shard has been queried.
[0044] In an optional manner, a valid value may be set to 1 and an invalid value may be set to 0.
[0045] In the case where the target data slice has been queried, a join request is sent to the waiting queue to join the waiting queue; in the case where a wake-up instruction is received, a difference bitmap of the target data slice is obtained from the preset cache.
[0046] In another optional manner, when the duration of receiving the query request exceeds a preset duration threshold and the identifier corresponding to the target data slice is not obtained, it is determined that the target data slice has not been queried.
[0047] When it is detected that all difference bitmaps corresponding to the target data slice are stored in the preset cache, the wake-up instruction is issued.
[0048] It can be understood that the wake-up instruction is used to wake up the query request and return the difference bitmap required by the query request.
[0049] After the placement group receives the query request, the method further includes: acquiring adjacent data slices of the target data slice; pre-querying a difference bitmap corresponding to the adjacent data slices, and storing the difference bitmap corresponding to the adjacent data slices in the preset cache.
[0050] Figure 4Another method for reading difference bitmap data is shown. Figure 4 As shown, first check whether the data already exists in the cache. If so, return the data in the cache directly to avoid requesting the same chunk from the same PG again. If not, check the "query incomplete bitmap" (preset data table). If the "query incomplete bitmap" is 1, that is, the query request has been issued (the chunk has been queried), then add the request to the waiting queue and wait for the result to return. If the "query incomplete bitmap" is 0 (the chunk has not been queried), send a request to the PG and set the "query incomplete bitmap" to 1. After waiting for the query to return, cache all the acquired difference bitmap data for subsequent queries and wake up the request waiting for this part of the data.
[0051] After the client interface layer issues a request to query the difference bitmap of a certain chunk, the difference bitmap data of the adjacent chunks is queried in advance. In this way, when the chunk is actually queried, some of the data of the adjacent chunks is already in the cache and can be used directly, reducing the query latency of the difference bitmap volume. The size of the cache can be adjusted according to the actual situation. The prefetch strategy can be used to load the data blocks that are about to be accessed, which can further reduce the latency of input and output requests.
[0052] Figure 5 is an image data acquisition device according to an embodiment of the present application, such as Figure 5 As shown, including:
[0053] The receiving module 50 is used to receive a query request, wherein the query request at least includes: a target data slice to be queried;
[0054] A query module 52 is configured to traverse a preset cache of a client interface layer, and if the preset cache contains a differential bitmap of the target data slice, obtain the differential bitmap of the target data slice from the preset cache; if the preset cache does not contain a differential bitmap of the target data slice, query the differential bitmap of the target data slice through a placement group;
[0055] The output module 54 is used to output the difference bitmap of the target data slice.
[0056] The query module 52 includes: a query submodule, which is used to query the difference bitmap of the target data slice through the placement group, including: obtaining from the preset data table whether the target data slice has been queried; if the target data slice has not been queried, sending the query request to the placement group, and storing all the difference bitmaps corresponding to the target data slice in the preset cache; obtaining the difference bitmap of the target data slice from the preset cache.
[0057] The query submodule includes: a first determination unit, a joining unit, and a second determination unit. The first determination unit is used to send the query request to the placement group. The method also includes: determining the identifier corresponding to the target data shard as a valid value in the preset data table, and the valid value is used to indicate that the target data shard has been queried.
[0058] The joining unit is used to send a joining request to the waiting queue to join the waiting queue when the target data slice has been queried; and to obtain a difference bitmap of the target data slice from the preset cache when a wake-up instruction is received.
[0059] The second determining unit is used to determine that the target data slice has not been queried if the duration of receiving the query request exceeds a preset duration threshold and the identifier corresponding to the target data slice is not obtained.
[0060] The second determining unit includes: a detecting subunit, configured to issue the wake-up instruction when it is detected that all difference bitmaps corresponding to the target data slice are stored in the preset cache.
[0061] The query submodule also includes: a pre-query unit, which is used to, after the placement group receives the query request, the method also includes: obtaining adjacent data slices of the target data slice; pre-querying the difference bitmap corresponding to the adjacent data slices, and storing the difference bitmap corresponding to the adjacent data slices in the preset cache.
[0062] It should be noted that Figure 5 The image data acquisition device shown is used to perform Figure 2 A method for reading difference bitmap data is shown, so the relevant explanations in the method for reading difference bitmap data are also applicable to this type of image data acquisition device, and will not be repeated here.
[0063] An embodiment of the present application also provides a computer device, including: a memory for storing program instructions; receiving a query request, the query request including at least: a target data slice to be queried; traversing a preset cache of a client interface layer, and if the preset cache contains a difference bitmap of the target data slice, obtaining the difference bitmap of the target data slice from the preset cache; if the preset cache does not contain a difference bitmap of the target data slice, querying the difference bitmap of the target data slice through a placement group; and outputting the difference bitmap of the target data slice.
[0064] It should be noted that the above-mentioned computer equipment is used to execute Figure 2The method for reading the difference bitmap data shown in the figure, therefore the relevant explanations in the above method for reading the difference bitmap data are also applicable to the computer device and will not be repeated here.
[0065] An embodiment of the present application also provides a non-volatile storage medium, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the following method for reading difference bitmap data by running the computer program: receiving a query request, the query request at least including: a target data slice to be queried; traversing a preset cache of a client interface layer, and if the preset cache contains a difference bitmap of the target data slice, obtaining the difference bitmap of the target data slice from the preset cache; if the preset cache does not contain a difference bitmap of the target data slice, querying the difference bitmap of the target data slice through a placement group; and outputting the difference bitmap of the target data slice.
[0066] It should be noted that the above non-volatile storage medium is used to execute Figure 2 The method for reading the difference bitmap data shown in the figure, therefore, the relevant explanations in the above method for reading the difference bitmap data are also applicable to the non-volatile storage medium, and will not be repeated here.
[0067] An embodiment of the present application further provides a computer program product, including a computer program, which implements the steps of the method described in each embodiment of the present application when executed by a processor.
[0068] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.
[0069] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0070] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0071] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0072] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0073] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0074] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.
[0075] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for reading difference bitmap data, characterized in that: include: Receiving a query request, wherein the query request at least includes: a target data shard to be queried; Traversing a preset cache of a client interface layer, and if the preset cache contains a differential bitmap of the target data shard, obtaining the differential bitmap of the target data shard from the preset cache, and if the preset cache does not contain a differential bitmap of the target data shard, querying the differential bitmap of the target data shard through a placement group; Output a difference bitmap of the target data slice.
2. The method according to claim 1, characterized in that Querying the difference bitmap of the target data shard by the placement group includes: Obtaining from a preset data table whether the target data slice has been queried; When the target data shard has not been queried, sending the query request to the placement group, and storing all difference bitmaps corresponding to the target data shard in the preset cache; A difference bitmap of the target data slice is obtained from the preset cache.
3. The method according to claim 2, characterized in that After sending the query request to the placement group, the method further includes: In the preset data table, the identifier corresponding to the target data slice is determined as a valid value, and the valid value is used to indicate that the target data slice has been queried.
4. The method according to claim 2, characterized in that: The method further comprises: When the target data shard has been queried, sending a join request to the waiting queue to join the waiting queue; When the wake-up instruction is received, the difference bitmap of the target data slice is obtained from the preset cache.
5. The method according to claim 2, characterized in that: The method further comprises: When the duration of receiving the query request exceeds a preset duration threshold and the identifier corresponding to the target data slice is not obtained, it is determined that the target data slice has not been queried.
6. The method according to claim 4, characterized in that The method further comprises: When it is detected that all difference bitmaps corresponding to the target data slice are stored in the preset cache, the wake-up instruction is issued.
7. The method according to claim 2, characterized in that After the placement group receives the query request, the method further includes: Acquire adjacent data slices of the target data slice; The difference bitmaps corresponding to the adjacent data slices are pre-queried, and the difference bitmaps corresponding to the adjacent data slices are stored in the preset cache.
8. A device for reading differential bitmap data, characterized in that: include: A receiving module, configured to receive a query request, wherein the query request at least includes: a target data slice to be queried; A query module, configured to traverse a preset cache of a client interface layer, and if the preset cache contains a differential bitmap of the target data slice, obtain the differential bitmap of the target data slice from the preset cache; if the preset cache does not contain a differential bitmap of the target data slice, query the differential bitmap of the target data slice through a placement group; An output module is used to output a difference bitmap of the target data slice.
9. A computer device, characterized in that: include: A memory for storing program instructions; A processor is connected to the memory and is used to execute program instructions of the following functions: receiving a query request, wherein the query request at least includes: a target data shard to be queried; traversing a preset cache of a client interface layer, and obtaining a difference bitmap of the target data shard from the preset cache when the preset cache contains a difference bitmap of the target data shard; when the preset cache does not contain a difference bitmap of the target data shard, querying the difference bitmap of the target data shard through a placement group; and outputting the difference bitmap of the target data shard.
10. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the method for reading difference bitmap data described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method, device and equipment for distributed storage client to read data
CN107562385A
Distributed cache system, associated query and update method and device, and storage medium
CN111723110A
Query method
CN115952202A
Data difference log query method and device, equipment and storage medium
CN116225748A
Data query method and device, storage medium and electronic equipment
CN117407417A
Cited By
Storage space monitoring method and device and electronic equipment
CN122412246A
