Data transmission method, device, equipment and storage medium

By transmitting data blocks directly without compressing them when specific conditions are met during snapshot data transmission, the problem of low bandwidth utilization in the existing technology is solved, the transmission speed and bandwidth utilization are improved, and storage space is saved.

CN111831211BActive Publication Date: 2024-08-23ALIBABA CLOUD COMPUTING CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN201910317785.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-04-19
Publication Date
2024-08-23
Estimated Expiration
2039-04-19

AI Technical Summary

Technical Problem

The existing snapshot data transmission method results in low transmission bandwidth utilization, resulting in bandwidth waste and slow transmission speed.

Method used

When transmitting data blocks, if the number of data blocks currently undergoing compressed transmission is greater than or equal to the predetermined threshold and the used transmission bandwidth is less than the upper bandwidth limit, the data blocks to be transmitted will not be compressed and the uncompressed data blocks will be directly transmitted to fully Utilize remaining bandwidth.

Benefits of technology

It improves bandwidth utilization and data block transmission rate, avoids computing resources from becoming a bottleneck, and reduces the space occupied by the storage system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111831211B
    Figure CN111831211B
Patent Text Reader

Abstract

The present invention discloses a data transmission method, device, equipment and storage medium, wherein the data transmission method comprises: determining the number of data blocks currently being compressed and transmitted; if the number of data blocks currently being compressed and transmitted is greater than or equal to a predetermined threshold value, and the currently used transmission bandwidth is less than the upper limit of the transmission bandwidth, then performing transmission processing on the data blocks to be transmitted, wherein before performing the transmission processing, the data blocks to be transmitted are not compressed. According to an embodiment of the present invention, when transmitting data blocks, the remaining bandwidth can be fully utilized, and computing resources will not be occupied, thereby improving bandwidth utilization and data block transmission rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computers, and in particular relates to a data transmission method, device, equipment and storage medium. Background Art

[0002] Disk snapshots are mainly used for backup and disaster recovery. Users can create several snapshots of a disk at different time points to form a snapshot chain. If you need to restore disk data, you can roll back the disk data and restore the data on the disk to the content of any snapshot in the snapshot chain.

[0003] In actual application scenarios, a disk often creates snapshots at regular intervals, such as once a day. Because disk data is divided into hot and cold data, a lot of data is changed only after a long time. Therefore, the data content of each snapshot in a snapshot chain is often only slightly different. In order to save space, existing snapshot systems all use the deduplication storage function.

[0004] The existing snapshot function is implemented by dividing the disk into multiple intervals according to the offset, such as 2MB per interval, and the interval data is stored as a data block (also known as a slice) of the snapshot for deduplication. That is, when creating a snapshot, each interval of the current disk will be checked. If the data block of the interval is changed compared with the corresponding data block of the old snapshot, the new snapshot will use the new data to create a new data block; otherwise, the new snapshot will continue to use the data block of the old snapshot.

[0005] Figure 1 FIG. 1 shows a schematic diagram of the principle of snapshot deduplication storage in the prior art. Figure 1 As shown in the figure, it is assumed that the disk is divided into 4 data blocks according to the address offset, namely data block 1 to data block 4. When snapshot A is created, there are 4 data blocks, namely data block 1-A to data block 4-A. When disk snapshot B is created, it is assumed that only the data in the disk intervals corresponding to data block 1 and data block 3 are modified at that time, so only data block 1-B and data block 3-B are created, and data block 2 and data block 4 of disk snapshot B continue to use the data blocks corresponding to snapshot A.

[0006] Based on the above information, snapshot creation is explained. Snapshot creation is generally divided into two steps.

[0007] Step 1: Metadata construction. Analyze the disk metadata, which will record the data blocks that have been used in the previous snapshot and the data blocks that have been updated after the last snapshot. These updated data blocks will be marked as data blocks that need to be backed up to the snapshot storage system and will be recorded in the snapshot metadata.

[0008] Step 2: Data transfer. During the metadata construction process, data blocks that need to be backed up will be obtained. In this step, these data blocks are first compressed and then transferred to the snapshot storage system to be stored as data blocks for the new snapshot.

[0009] However, in the data transmission scheme of the above step 2, only a part of the transmission bandwidth is used, which results in failure to fully utilize the bandwidth, resulting in bandwidth waste, and the transmission speed is also relatively low due to the low bandwidth utilization. Summary of the invention

[0010] The embodiments of the present invention provide a data transmission method, apparatus, device and storage medium, which can fully utilize bandwidth and improve transmission speed when transmitting data blocks.

[0011] On the one hand, an embodiment of the present invention provides a data transmission method, including:

[0012] Determine the number of data blocks currently being compressed and transmitted;

[0013] If the number of data blocks currently being compressed and transmitted is greater than or equal to a predetermined threshold, and the currently used transmission bandwidth is less than the transmission bandwidth upper limit, transmission processing is performed on the data blocks to be transmitted, wherein the data blocks to be transmitted are not compressed before the transmission processing is performed.

[0014] On the other hand, an embodiment of the present invention provides a data transmission device, including:

[0015] A quantity determination module, used to determine the number of data blocks currently being compressed and transmitted;

[0016] The transmission processing module is used to perform transmission processing on the data blocks to be transmitted if the number of data blocks currently being compressed and transmitted is greater than or equal to a predetermined threshold and the currently used transmission bandwidth is less than the upper limit of the transmission bandwidth, wherein the data blocks to be transmitted are not compressed before performing the transmission processing.

[0017] In another aspect, an embodiment of the present invention provides a computing device, including a disk system and a storage system; wherein:

[0018] The disk system is used to determine the number of data blocks currently being compressed and transmitted, and if the number of data blocks currently being compressed and transmitted is greater than or equal to a predetermined threshold and the currently used transmission bandwidth is less than the transmission bandwidth upper limit, the disk system transmits the data blocks to be transmitted to the storage system, wherein before performing the transmission process, the disk system does not compress the data blocks to be transmitted.

[0019] On the other hand, an embodiment of the present invention provides a computer storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above-mentioned data transmission method is implemented.

[0020] The data transmission method, device, equipment and storage medium of the embodiment of the present invention directly transmits some data blocks without compression when a portion of the transmission bandwidth is left but the computing resources occupied by the data blocks reach the upper limit. Since the compressed data blocks occupy computing resources, while the transmitted data blocks occupy very few computing resources, the transmission of the uncompressed data blocks does not occupy too many computing resources, but also fully utilizes the remaining bandwidth, thereby improving the bandwidth utilization and the transmission rate of the data blocks. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the following is a brief introduction to the drawings required for use in the embodiment of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0022] Figure 1 A schematic diagram showing the principle of snapshot deduplication storage in the prior art is shown;

[0023] Figure 2 A schematic diagram showing a flow chart of a data transmission method provided by an embodiment of the present invention;

[0024] Figure 3 A schematic diagram showing a flow chart of a data transmission method provided by another embodiment of the present invention;

[0025] Figure 4 A schematic diagram showing a data block status list before updating;

[0026] Figure 5 A schematic diagram showing a data block list of a newly created snapshot;

[0027] Figure 6 A schematic diagram showing a data block status list after updating;

[0028] Figure 7 A schematic diagram showing a flow chart of a data transmission method provided by another embodiment of the present invention;

[0029] Figure 8 A block diagram showing a data transmission device according to an embodiment of the present invention is shown;

[0030] Fig. 9 A schematic diagram of the hardware structure of a computing device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0031] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention.

[0032] It should be noted that, in this article, relational terms such as first and second, etc. 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 statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0033] In order to solve the problems in the prior art, the embodiments of the present invention provide a data transmission method, device, equipment and storage medium. The data transmission method provided by the embodiments of the present invention is first introduced below.

[0034] Figure 2 FIG. 1 is a flow chart of a data transmission method provided by an embodiment of the present invention. Figure 2 As shown, the data transmission method includes:

[0035] S101, determining the number of data blocks currently being compressed and transmitted.

[0036] S102, if the number of data blocks currently being compressed and transmitted is greater than or equal to a predetermined threshold, and the currently used transmission bandwidth is less than the transmission bandwidth upper limit, transmission processing is performed on the data blocks to be transmitted, wherein, before performing the transmission processing, the data blocks to be transmitted are not compressed.

[0037] In the embodiment of the present invention, since fixed computing resources are allocated to data blocks, the computing resources are mainly used to compress data blocks, and about 95% of the computing resources are used for data compression. Therefore, if the number of data blocks currently being compressed and transmitted is greater than or equal to the predetermined threshold, it means that the computing resources currently occupied by the compressed data blocks have reached or are about to reach the upper limit of the allocated computing resources, and more data blocks cannot be compressed. If the currently used transmission bandwidth is less than the upper limit of the transmission bandwidth, it means that there is some bandwidth left, and more data blocks can be transmitted. When the use of computing resources has reached the upper limit, and there is still available bandwidth left, the data blocks can be directly transmitted without being compressed. Transmitting uncompressed data blocks will not occupy too many computing resources, but also make full use of the remaining bandwidth, thereby realizing the maximum utilization of computing resources and network bandwidth, and avoiding computing resources becoming a bottleneck and limiting the utilization of network bandwidth. In addition, the data blocks can be transmitted in a timely manner, thereby improving the transmission rate of the data blocks.

[0038] Figure 3 FIG. 2 is a flow chart of a data transmission method provided by another embodiment of the present invention. Figure 3 As shown, the data transmission method includes:

[0039] S201: Create a list of data blocks to be compressed.

[0040] S202, determine whether the currently used transmission bandwidth is less than the transmission bandwidth upper limit, if the determination result is yes, execute S203, if the determination result is no, re-execute S202.

[0041] S203, determining whether the number of data blocks currently being compressed and transmitted is greater than or equal to a predetermined threshold, and if the determination result is yes, executing S205, and if the determination result is no, executing S204.

[0042] S204, compress the data block to be transmitted, and transmit the compressed data block.

[0043] S205, adding information of the data block to be transmitted to a list of data blocks to be compressed, and transmitting the data block to be transmitted, wherein the data block to be transmitted is not compressed before transmission.

[0044] S206: If the predetermined condition is met, the data block to be compressed is obtained according to the list of data blocks to be compressed.

[0045] The predetermined condition includes currently available computing resources.

[0046] As an example, if all data blocks that need to be transmitted have been transmitted, it is determined that the computing resources are released, that is, the predetermined condition is met.

[0047] The data blocks that need to be transmitted include but are not limited to all the data blocks that need to be transmitted of the snapshot. For example, a snapshot has 50 data blocks, 30 of which are transmitted after compression, and the other 20 data blocks are transmitted without compression. After the transmission of these 50 data blocks is completed, the transmission of the 30 compressed data blocks is completed, and the transmission of the 20 uncompressed data blocks is completed, and the data blocks to be compressed are obtained according to the list of data blocks to be compressed.

[0048] In this example, since the data blocks are compressed and transmitted when all the data blocks that need to be transmitted have been transmitted, the data blocks that need to be transmitted can be transmitted faster.

[0049] As an example, if the number of data blocks currently being compressed and transmitted is less than a predetermined threshold, it is determined that some computing resources are available, ie, the predetermined condition is met.

[0050] S207, compress the data block to be compressed, transmit the compressed data block, and delete the compressed data block from the list of data blocks to be compressed.

[0051] In the embodiment of the present invention, Figure 2 The difference between the embodiments of the invention is that, since uncompressed data blocks will occupy more storage space, if available computing resources are released, the uncompressed data blocks are compressed using the resources for retransmission. That is, a part of the data blocks are not compressed during the time period of concentrated data block compression, but are compressed when computing resources are idle, and finally all data blocks are compressed to avoid occupying a large storage space.

[0052] In actual application, the following situation may occur in the embodiment of the present invention: if all data blocks to be transmitted have been transmitted, the data blocks to be compressed are obtained for compression. Assume that when all data blocks to be transmitted are transmitted to the storage system, the occupied space of the storage system is X. After all data blocks are transmitted, the uncompressed data blocks in the storage system are compressed, and the compressed data blocks are transmitted to the storage system, so that the compressed data blocks replace the uncompressed data blocks in the storage system, thereby saving the occupied space of the storage system. Therefore, the occupied space of the storage system will gradually decrease over time, and finally the occupied space of the storage system will reach a stable state after all data blocks are compressed.

[0053] In the prior art, all data blocks are compressed before transmission. Therefore, in the prior art, after all the data blocks to be transmitted are transmitted to the storage system, the occupied space of the storage system will be stable and will not change.

[0054] In addition, in S204, after compressing the data block, a compressed mark is made on the compressed data block; in S205, before transmitting the data block, an uncompressed mark is made on the uncompressed data block; in S207, after compressing the data block, a compressed mark is made on the compressed data block.

[0055] By distinguishing compressed data blocks from uncompressed data blocks, when accessing a data block, the tag of the data block is read to determine whether the data block is compressed; if it is determined that the data block is compressed, the data block is first decompressed before the data block is used; if it is determined that the data block is not compressed, the data block can be directly used without decompressing the data block. Therefore, even if there are compressed data blocks and uncompressed data blocks, the data blocks can be accessed normally.

[0056] The solution of the embodiment of the present invention is described in detail below through a specific application scenario.

[0057] In the snapshot creation scenario, snapshot creation includes two steps:

[0058] Step 1: Metadata construction. The data block status list records the status of each data block. If a write request modifies the data of a data block, the data block status is updated to "updated". The next snapshot will back up these "updated" data blocks to the snapshot storage system. There is a data block status list in the disk system, which records whether each data block has been updated.

[0059] for example, Figure 4 The schematic diagram of the data block status list is shown. In the case where snapshot 1 and snapshot 2 have been created, the data blocks of 2-3MB are the data blocks of snapshot 1, the data blocks of 4-5MB are the data blocks of snapshot 2, the data blocks of 2-3MB and 4-5MB are not updated, and the status of the data blocks of 0-1MB and 6-7MB is updated.

[0060] If you create snapshot 3, based on Figure 4 The data block status list is created as follows Figure 5 The data block in the data block list is shown. Figure 5 It can be seen that due to the 2-3MB data blocks and the 4-5MB data blocks, the 2-3MB data blocks still use the data blocks of snapshot 1, and the 4-5MB data blocks still use the data blocks of snapshot 2. Since the 0-1MB data blocks and the 6-7MB data blocks are updated, the 0-1MB data blocks and the 6-7MB data blocks are all from snapshot 3. After creating snapshot 3, update the disk data block status list to the following Figure 6 A list of disk data block status is shown.

[0061] Metadata creation generally takes 1-5 seconds. To prevent data from being written during the creation process, all read and write requests are blocked in this step. When metadata creation is completed, the snapshot data is determined.

[0062] Step 2: During the metadata construction process, the data blocks of the snapshot that need to be backed up will be obtained. In this step, these data blocks are transferred one by one to the snapshot storage system and stored as data blocks of the new snapshot.

[0063] Through Figure 7 The data transmission method shown transmits the data blocks of the snapshot to the snapshot storage system. The data transmission method includes:

[0064] S301, for a snapshot to be transmitted, obtain a list of data blocks to be transmitted of the snapshot, set an upper limit N (N is the predetermined threshold mentioned above) of the number of data blocks to be compressed and transmitted concurrently, and set the upper limit of the transmission bandwidth to M.

[0065] It should be noted that by setting the transmission bandwidth upper limit M, it is ensured that the transmission bandwidth does not exceed the expected transmission bandwidth upper limit. The quota of the transmission bandwidth upper limit is often active. When the entire system snapshot transmission is small, the transmission bandwidth upper limit is relatively large. When the entire system snapshot transmission is large, the transmission bandwidth upper limit is relatively small.

[0066] By setting an upper limit value N of the number of data blocks to be compressed and transmitted, it can be ensured that the computing load of the central processing unit (CPU) of the machine where the snapshot is located does not exceed the limit.

[0067] S302: Create a list of data blocks to be compressed in the disk system.

[0068] S303, if the list of data blocks to be transmitted of the snapshot is not empty, determine whether the currently used transmission bandwidth is less than M, and execute S304 if the determination result is yes, and wait for a moment and then execute S303 again if the determination result is no.

[0069] S304: fetch a data block to be transmitted from the disk system according to the list of data blocks to be transmitted.

[0070] S305, determining whether the number of data blocks currently being compressed and transmitted is greater than or equal to N, and executing S306 if the determination result is yes, and executing S308 if the determination result is no.

[0071] S306, adding information of the data block to be transmitted to the list of data blocks to be compressed, and making a first mark on the data block to be transmitted, the first mark indicating that the data block is not compressed.

[0072] For example, the name of the data block to be transmitted is added to the list of data blocks to be compressed, and the header of the data block to be transmitted is marked as uncompressed.

[0073] S307: Transmit the data block to be transmitted to the snapshot storage system, wherein the data block to be transmitted is not compressed before transmission.

[0074] S308, compress the data block to be transmitted, and make a second mark on the compressed data block, the second mark indicating that the data block has been compressed.

[0075] For example, the data block header is marked as compressed.

[0076] S309: Transmit the compressed data block to the snapshot storage system.

[0077] It should be noted that the list of data blocks to be transmitted may store the names of the data blocks to be transmitted. If a data block is transmitted to the snapshot storage system, no matter whether the data block is compressed or uncompressed, the name of the data block is deleted from the list of data blocks to be transmitted.

[0078] S310: If all the data blocks of the snapshot that need to be transmitted have been transmitted, a list of data blocks to be compressed is obtained from the disk system.

[0079] S311: If the list of data blocks to be compressed is not empty, take out the name of a data block from the list of data blocks to be compressed.

[0080] S312: Retrieve the data block from the snapshot storage system according to the name of the data block.

[0081] S313, compress the retrieved data block, make a second mark on the compressed data block, and transmit the compressed data block to the snapshot storage system.

[0082] S314: Delete the transmitted compressed data blocks from the list of data blocks to be compressed.

[0083] S310 to S314 are repeatedly executed until the list of data blocks to be compressed is empty.

[0084] The execution subject of S301 to S314 is the disk system.

[0085] It should be noted that the embodiment of the present invention is not limited to application in the scenario of snapshot creation, and the embodiment of the present invention can be applied to various compression transmission scenarios.

[0086] Figure 8 FIG. 1 is a block diagram of a data transmission device according to an embodiment of the present invention. Figure 8As shown, the data transmission device 400 includes a quantity determination module 401 and a transmission processing module 402 .

[0087] The quantity determination module 401 is used to determine the quantity of data blocks currently being compressed and transmitted.

[0088] The transmission processing module 402 is used to perform transmission processing on the data blocks to be transmitted if the number of data blocks currently being compressed and transmitted is greater than or equal to a predetermined threshold and the currently used transmission bandwidth is less than the transmission bandwidth upper limit, wherein the data blocks to be transmitted are not compressed before the transmission processing is performed.

[0089] In one embodiment of the present invention, the data transmission device 400 further includes a first compression module.

[0090] The first compression module is used to use the data block to be transmitted as the data block to be compressed, and compress the data block to be compressed if a predetermined condition is met after the transmission process is performed.

[0091] In one embodiment of the present invention, the predetermined condition includes that all data blocks to be transmitted have been transmitted completely.

[0092] In one embodiment of the present invention, the transmission processing module 402 is used to transmit the data block to the storage system, and the data transmission device 400 also includes a data block acquisition module and a data block transmission module.

[0093] The data block acquisition module is used to acquire the data block to be compressed from the storage system before compressing the data block to be compressed.

[0094] The data block transmission module is used for transmitting the compressed data blocks to the storage system after compressing the data blocks to be compressed.

[0095] In one embodiment of the present invention, the data transmission device 400 further includes a list creation module and an information adding module.

[0096] The list creation module is used to create a list of data blocks to be compressed.

[0097] The information adding module is used to add the information of the data block to be transmitted to the list of data blocks to be compressed.

[0098] In one embodiment of the present invention, the data blocks to be transmitted include data blocks of snapshots.

[0099] In one embodiment of the present invention, the data transmission device 400 further includes a first marking module.

[0100] The first marking module is used to make a first mark on the data block that performs transmission processing, and the first mark is used to indicate that the data block is not compressed.

[0101] In one embodiment of the present invention, the data transmission device 400 further includes a compression transmission module and a second marking module.

[0102] The compression transmission module is used to compress the data blocks to be transmitted and transmit the compressed data blocks when the number of data blocks currently being compressed and transmitted is less than a predetermined threshold and the currently used transmission bandwidth is less than the upper limit of the transmission bandwidth;

[0103] The second marking module is used to make a second mark on the compressed data block, and the second mark is used to indicate that the data block has been compressed.

[0104] Fig. 9 A schematic diagram of the hardware structure of a computing device provided by an embodiment of the present invention is shown.

[0105] A computing device includes a disk system and a storage system; wherein the disk system is used to determine the number of data blocks currently being compressed and transmitted, and if the number of data blocks currently being compressed and transmitted is greater than or equal to a predetermined threshold and the currently used transmission bandwidth is less than the transmission bandwidth upper limit, the disk system transmits the data blocks to be transmitted to the storage system, wherein before performing the transmission processing, the disk system does not compress the data blocks to be transmitted.

[0106] It should be noted that the disk system can execute the data transmission method of any of the above embodiments. Since the data transmission method has been described in detail above, it will not be repeated here.

[0107] The computing device may include a processor 501 and a memory 502 storing computer program instructions.

[0108] Specifically, the processor 501 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiment of the present invention.

[0109] The memory 502 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 502 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 502 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 502 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 502 is a non-volatile solid-state memory. In a specific embodiment, the memory 502 includes a read-only memory (ROM). In appropriate cases, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM) or a flash memory or a combination of two or more of these.

[0110] The processor 501 implements any one of the data transmission methods in the above embodiments by reading and executing computer program instructions stored in the memory 502 .

[0111] In one example, the computing device may further include a communication interface 503 and a bus 510. Fig. 9 As shown, the processor 501, the memory 502, and the communication interface 503 are connected via a bus 510 and communicate with each other.

[0112] The communication interface 503 is mainly used to implement the communication between the modules, devices, units and / or equipment in the embodiment of the present invention.

[0113] Bus 510 includes hardware, software or both, and the parts of computing device are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 510 may include one or more buses. Although the embodiment of the present invention describes and shows a specific bus, the present invention considers any suitable bus or interconnection.

[0114] The computing device can execute the data transmission method in the embodiment of the present invention, thereby realizing the combination Figure 2 , Figure 3 and Figure 8 Described is a data transmission method and device.

[0115] In addition, in combination with the data transmission method in the above embodiment, the embodiment of the present invention can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor 501, any one of the data transmission methods in the above embodiment is implemented.

[0116] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.

[0117] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0118] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in a different order from the embodiments, or several steps can be performed simultaneously.

[0119] The above is only a specific implementation of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system, module and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be covered within the protection scope of the present invention.

Claims

1. A data transmission method, comprising: Determine the number of data blocks currently being compressed and transmitted; If the number of data blocks currently being compressed and transmitted is greater than or equal to a predetermined threshold, and the currently used transmission bandwidth is less than the upper limit of the transmission bandwidth, transmission processing is performed on the data blocks to be transmitted, wherein, before performing the transmission processing, the data blocks to be transmitted are not compressed; If the number of data blocks currently being compressed and transmitted is less than the predetermined threshold, and the currently used transmission bandwidth is less than the upper limit of the transmission bandwidth, compressing the data blocks to be transmitted and transmitting the compressed data blocks; A second mark is made on the compressed data block, where the second mark is used to indicate that the data block has been compressed.

2. The method according to claim 1, wherein: The method further comprises: The data block that performs the transmission processing is used as the data block to be compressed. After the transmission processing is performed, if a predetermined condition is satisfied, the data block to be compressed is compressed.

3. The method according to claim 2, wherein: The predetermined condition includes that all data blocks to be transmitted have been transmitted completely.

4. The method according to claim 2, wherein: The transmission process includes transmitting to a storage system, and the method further includes: Before compressing the data block to be compressed, obtaining the data block to be compressed from the storage system; After compressing the data block to be compressed, the compressed data block is transmitted to the storage system.

5. The method according to claim 1, wherein: The method further comprises: Create a list of data blocks to be compressed; The information of the data blocks for which the transmission process is performed is added to the list of data blocks to be compressed.

6. The method according to claim 1, wherein: The data blocks to be transmitted include data blocks of snapshots.

7. The method according to claim 1, wherein: The method further comprises: A first mark is made on the data block that performs the transmission process, wherein the first mark is used to indicate that the data block is not compressed.

8. A data transmission device, comprising: A quantity determination module, used to determine the number of data blocks currently being compressed and transmitted; a transmission processing module, configured to perform transmission processing on the data blocks to be transmitted if the number of data blocks currently being compressed and transmitted is greater than or equal to a predetermined threshold and the currently used transmission bandwidth is less than the upper limit of the transmission bandwidth, wherein the data blocks to be transmitted are not compressed before the transmission processing is performed; A compression transmission module, configured to compress the data blocks to be transmitted and transmit the compressed data blocks if the number of data blocks currently being compressed and transmitted is less than the predetermined threshold value and the currently used transmission bandwidth is less than the upper limit of the transmission bandwidth; The second marking module is used to make a second mark on the compressed data block, where the second mark is used to indicate that the data block has been compressed.

9. A computing device comprising a disk system and a storage system; wherein: The disk system is used to determine the number of data blocks currently being compressed and transmitted, and if the number of data blocks currently being compressed and transmitted is greater than or equal to a predetermined threshold and the currently used transmission bandwidth is less than the transmission bandwidth upper limit, the disk system transmits the data blocks to be transmitted to the storage system, wherein before performing the transmission process, the disk system does not compress the data blocks to be transmitted; If the number of data blocks currently being compressed and transmitted is less than the predetermined threshold, and the currently used transmission bandwidth is less than the transmission bandwidth upper limit, the disk system compresses the data blocks to be transmitted and transmits the compressed data blocks; and makes a second mark on the compressed data blocks, wherein the second mark is used to indicate that the data blocks have been compressed.

10. A computer storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the data transmission method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data transmitting method and device and data receiving method and device

    CN102843341A

  • Data replication with dynamic compression

    CN105075222A

  • Data compression and decompression method and device

    CN105322969A

  • Data compression method, data decompression method, compression equipment and decompression equipment

    CN108880559A

  • Estimating space in a compressed volume

    US20100174879A1