WO2017050283A1 - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
WO2017050283A1
WO2017050283A1 PCT/CN2016/099936 CN2016099936W WO2017050283A1 WO 2017050283 A1 WO2017050283 A1 WO 2017050283A1 CN 2016099936 W CN2016099936 W CN 2016099936W WO 2017050283 A1 WO2017050283 A1 WO 2017050283A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
storage device
compression
length
module
Prior art date
Application number
PCT/CN2016/099936
Other languages
French (fr)
Chinese (zh)
Inventor
朱炫鹏
牛克强
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017050283A1 publication Critical patent/WO2017050283A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0014Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the source coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • H04L67/5651Reducing the amount or size of exchanged application data

Definitions

  • the present invention relates to the field of communications, and in particular to a data processing method and apparatus.
  • remote replication technology is introduced to prevent user data loss or downtime of critical business systems due to various disasters.
  • the remote replication technology synchronizes the data on the local primary storage device mirrored volume (referred to as the source mirrored volume) to the mirrored volume of the remote storage device (referred to as the target mirrored volume).
  • the target mirrored volume When the data of the local storage device is lost, data can be recovered from the remote storage device, thereby ensuring high reliability of data in the storage device.
  • some storage devices use data compression technology.
  • the primary storage device compresses the data before the synchronization, and then transfers the compressed data to the backup storage device.
  • the storage device decompresses the data and writes the data to the target mirrored volume.
  • data compression can reduce transmission time, but on a high-speed Fibre Channel (FC) network, if the amount of compressed data is small, the total transmission time may increase. For example, a piece of 500-byte data is compressed into 400 bytes, which is reduced by 100 bytes. On an 8Gbps FC network, the 100-byte transmission time is 125ns, which means that it can save 125ns of transmission time.
  • the compression time of the primary storage device plus the decompression time of the standby storage device generally exceeds 125 ns, so that the total transmission time is increased instead of direct compression without compression.
  • the general storage device specifically negotiates and enables data compression before the remote replication starts, and then all The data is compressed by the transmission, and it is impossible to determine whether to enable data compression by each transmission.
  • the embodiments of the present invention provide a data processing method and apparatus, so as to at least solve the problem that the compression of all transmission data in the related art causes a certain data to be transmitted for a long time.
  • a data processing method includes: obtaining a length of data to be transmitted to a backup storage device; determining whether to compress the data according to a length of the data; In the case of YES, the data is compressed.
  • determining whether to compress the data according to the length of the data comprises: determining, according to the length of the data, whether a sum of a time for compressing the data and a time for transmitting the compressed data is smaller than a direct transmission The time of the data.
  • the method further includes: receiving a frame that is sent by the backup storage device to support compression of data; and determining, according to the received frame, that the standby storage device supports compression of data.
  • the method further includes: notifying, by the reserved bits of the Fibre Channel FC frame, whether the data is compressed by the reserved storage device.
  • the method further includes: transmitting the compressed data to the standby storage device.
  • a data processing method includes: receiving data sent by a primary storage device, wherein the data is that the primary storage device determines a location according to the length of the acquired data.
  • the data is compressed, the data after the data is compressed, and the received data is decompressed.
  • the method further includes: sending, to the primary storage device, a frame that supports compression of data, wherein the frame is used by the primary storage device to determine The storage device supports compression of data.
  • a data processing apparatus including: an obtaining module, configured to acquire a length of data to be transmitted to a backup storage device; and a determining module, configured to determine according to the length of the data Whether to compress the data; and the compression module is configured to perform compression processing on the data if the determination result is YES.
  • the determining module includes: a determining unit, configured to be long according to the data The degree is judged whether the sum of the time at which the data is compressed and the time at which the compressed data is transmitted is less than the time at which the data is directly transmitted.
  • a data processing apparatus including: a receiving module, configured to receive data sent by a primary storage device, where the data is the primary storage device according to the acquired The length of the data determines the data after the data is compressed, and the decompressing module is configured to decompress the received data.
  • a storage medium is also provided.
  • the storage medium is arranged to store program code for performing the following steps:
  • the length of the data to be transmitted to the standby storage device is acquired; whether the data is compressed according to the length of the data; and if the determination result is yes, the data is compressed.
  • the invention solves the problem that all the transmission data is compressed in the related art and causes some data to be transmitted for a long time, and it is possible to separately determine whether to perform data compression for each transmission, so that the total transmission time of the transmission data is the shortest.
  • FIG. 1 is a flow chart 1 of a data processing method according to an embodiment of the present invention.
  • FIG. 2 is a second flowchart of a data processing method according to an embodiment of the present invention.
  • FIG. 3 is a block diagram 1 of a data processing apparatus according to an embodiment of the present invention.
  • FIG. 4 is a block diagram of a data processing apparatus in accordance with a preferred embodiment of the present invention.
  • FIG. 5 is a block diagram 2 of a data processing apparatus according to an embodiment of the present invention.
  • FIG. 6 is a structural block diagram of a primary storage device and a standby storage device in a remote replication system according to an embodiment of the present invention
  • FIG. 7 is a schematic diagram of a data compression flag bit according to an embodiment of the present invention.
  • FIG. 8 is a flowchart of a method for enabling data compression of a primary storage device during data transmission according to an embodiment of the present invention
  • FIG. 9 is a flow chart of a method for enabling data storage during data transmission by a standby storage device in accordance with an embodiment of the present invention.
  • FIG. 1 is a flowchart 1 of a data processing method according to an embodiment of the present invention. As shown in FIG. 1, the method includes:
  • Step S102 Acquire a length of data to be transmitted to the backup storage device.
  • Step S104 determining whether to compress the data according to the length of the data
  • step S106 if the result of the determination is YES, the data is subjected to compression processing.
  • the length of the data to be transmitted to the backup storage device is obtained through the foregoing steps; whether the data is compressed according to the length of the data; and if the determination result is yes, the data is compressed, and the related technology is solved.
  • the problem of compressing all transmitted data leads to a problem of transmitting some data for a long time, and it is possible to individually determine whether or not to perform data compression for each transmission, so that the total transmission time of the transmitted data is the shortest.
  • determining whether to compress the data according to the length of the data may include: determining, according to the length of the data, whether a sum of a time for compressing the data and a time for transmitting the compressed data is less than a time for directly transmitting the data .
  • the standby storage device is advertised to the data storage device by the reserved bits of the Fibre Channel FC frame.
  • the compressed data is transmitted to the standby storage device.
  • FIG. 2 is a second flowchart of the data processing method according to the embodiment of the present invention. As shown in FIG. 2, the method includes:
  • Step S202 receiving data sent by the primary storage device, where the data is data after the primary storage device determines to compress the data according to the length of the acquired data, and compresses the data;
  • Step S204 performing decompression processing on the received data.
  • the primary storage device before receiving the data sent by the primary storage device, sending a frame supporting compression of the data to the primary storage device, wherein the frame is used by the primary storage device to determine that the standby storage device supports compression of data.
  • FIG. 3 is a block diagram of a data processing apparatus according to an embodiment of the present invention. As shown in FIG. 3, the method includes an obtaining module 32, a determining module 34, and a compressing module 36. Each module is briefly described.
  • the obtaining module 32 is configured to acquire a length of data to be transmitted to the standby storage device
  • the determining module 34 is configured to determine whether to compress the data according to the length of the data
  • the compression module 36 is arranged to perform compression processing on the data if the determination result is YES.
  • the determination module 34 includes:
  • the determining unit 42 is configured to determine whether the sum of the time for compressing the data and the time for transmitting the compressed data is smaller than the time for directly transmitting the data according to the length of the data.
  • FIG. 5 is a block diagram 2 of a data processing apparatus according to an embodiment of the present invention. As shown in FIG. 5, the receiving module 52 and the decompression module are included. 54, a brief description of each module below.
  • the receiving module 52 is configured to receive data sent by the primary storage device, where the data is data after the primary storage device determines to compress the data according to the length of the acquired data, and compresses the data;
  • the decompression module 54 is configured to decompress the received data.
  • FIG. 6 is a structural block diagram of a primary storage device and a standby storage device in a remote replication system according to an embodiment of the present invention.
  • the remote replication system includes a local primary storage device and a remote standby storage device, and the structures of the two are the same, which are further described below.
  • the main storage device 61 is implemented by the above-mentioned obtaining module 32, the judging module 34 and the compressing module 36, and the main device for storing data is the originating end of the remote copying.
  • the data compression module 602, the data decompression module 604, the data transmission module 606, and the source mirroring volume 608 are connected to the backup storage device 62 through the FC network 612;
  • the storage device 62 is functionally implemented by the receiving module 52 and the decompression module 54 described above, and is a device for storing backup data, which is a receiving end of remote replication.
  • the data compression module 602, the data decompression module 604, the data transmission module 606, and the target mirror volume 610 are connected to the main storage device 61 through the FC network 612;
  • the data compression module 602 performs a compression operation on the transmitted data.
  • the data decompression module 604 performs a decompression operation on the transmitted data
  • a data transmission module 606 for transmitting data on the FC network
  • a source mirrored volume 608 for storing a volume of source data
  • a target mirrored volume 610 for storing a volume of backup data
  • FC network 612 a network for transmitting data.
  • the embodiment of the present invention further provides a storage method for remote replication that determines whether to enable data compression separately for each transmission, and the method includes the following steps:
  • Step A the primary storage device 61 initiates a data transmission, and the data transmission module 606 sends a FCP_CMND frame with a write command to the backup storage device 62, where the Fibre Channel Protocol for SCSI (FCP) is carried;
  • FCP Fibre Channel Protocol for SCSI
  • Step B the data storage module 606 of the storage device 62 receives the write command, constructs the FCP_XFER_RDY frame, and sends the selected reserved position 1 to the primary storage device 61;
  • Step C the data transfer module 606 of the primary storage device 61 receives the FCP_XFER_RDY frame, and checks the selected reserved bit. If it is 1, go to step D, otherwise go to step G;
  • Step D the primary storage device 61 determines whether it is necessary to enable data compression according to the data length and the like, if necessary, go to step E; otherwise, go to step G;
  • Step E the main storage device 61 reads data from the mirrored volume, sends it to the data compression module 602 for compression, and sends the compressed data to the data transmission module 606;
  • Step F the data storage module 606 of the primary storage device 61 uses the compressed data to construct the FCP_DATA frame, the selected reserved position 1, is sent to the backup storage device 62, step I;
  • Step G the primary storage device 61 reads data from the mirrored volume, and sends it to the data transmission module 606;
  • Step H the data storage module 606 of the primary storage device 61 uses the data to construct the FCP_DATA frame, and sends the selected reserved location 0 to the standby storage device 62;
  • Step I The data transmission module 606 of the backup storage device 62 receives the FCP_DATA frame, and checks the selected reserved bit. If it is 1, go to step J, otherwise go to step K;
  • Step J the data storage module 606 of the storage device 62 sends the data to the data decompression module 604, the decompressed data is stored in the mirrored volume of the storage device 62, step L;
  • Step K The data transmission module 606 of the backup storage device 62 stores the data in the mirrored volume of the standby storage device 62;
  • Step L The data transmission module 606 of the backup storage device 62 sends an FCP_RSP frame to the primary storage device 61.
  • Step M The data transmission module 606 of the primary storage device 61 receives the FCP_RSP frame, and the current data transmission process ends.
  • FIG. 7 is a schematic diagram of a data compression flag according to an embodiment of the present invention.
  • the data compression flag of the embodiment of the present invention is: BIT18 (RSV 703) of the word 3WORD3 of the FC frame header 701 is located in the DF_CTL 702 field.
  • the bit is a reserved bit, and the embodiment of the present invention uses it as a flag to announce whether data compression is enabled.
  • FIG. 8 is a flowchart of a method for enabling data compression of a primary storage device during data transmission according to an embodiment of the present invention. As shown in FIG. 8, the method includes the following steps:
  • Step S802 sending an FCP_CMND frame with a write command to the backup storage device 62, and the data transmission module 606 constructs and issues an FCP_CMND frame, indicating that the data is ready to be written to the target mirrored volume 610;
  • Step S804 the data transmission module 606 receives the FCP_XFER_RDY frame sent by the backup storage device 62, indicating that the backup storage device 62 is ready to receive the written data.
  • Step S806 the data transmission module 606 checks whether the BIT18 of the WORD3 of the FCP_XFER_RDY frame is 1, if it is 1, it indicates that the backup storage device 62 supports data compression, and proceeds to step S808; otherwise, it indicates that the standby storage device 62 does not support data compression, and the process proceeds to step S818. ;
  • Step S808 according to the data length and other information to determine whether to enable data compression, if enabled, go to step S810, otherwise, go to step S818;
  • Step S810 reading data from the source mirror volume 608;
  • Step S812 the data is sent to the data compression module 602 for data compression
  • Step S814 the data transmission module 606 constructs the FCP_DATA frame using the compressed data
  • Step S816, the data transmission module 606 sets the BIT18 of the WORD3 of the FCP_DATA frame to 1, indicating that the carried data is compressed data, and proceeds to step S824;
  • Step S820 the data transmission module 606 constructs an FCP_DATA frame using the data
  • Step S822 the data transmission module 606 sets the BIT18 of the WORD3 of the FCP_DATA frame to 0, indicating that the carried data is uncompressed data;
  • Step S824 the data transmission module 606 sends an FCP_DATA frame to the backup storage device 62.
  • Step S826, the data transmission module 606 receives the FCP_RSP frame sent by the standby storage device 62, indicating that the write operation is completed.
  • FIG. 9 is a flowchart of a method for enabling data storage during data transmission by a standby storage device according to an embodiment of the present invention. As shown in FIG. 9, the method includes the following steps:
  • Step S902 the data transmission module 606 receives the FCP_CMND frame with the write command sent by the primary storage device 61, indicating that the primary storage device 61 is ready to write data to the target mirrored volume 610;
  • Step S904 the data transmission module 606 constructs an FCP_XFER_RDY frame
  • Step S906 the data transmission module 606 sets the BIT18 of the WORD3 of the FCP_XFER_RDY frame to 1, indicating that the local end supports data compression;
  • Step S908 the data transmission module 606 sends an FCP_XFER_RDY frame to the primary storage device 61, indicating that the data is ready to be received;
  • Step S910 the data transmission module 606 receives the FCP_DATA frame sent by the primary storage device 61;
  • Step S912 the data transmission module 606 checks whether the BIT18 of the WORD3 of the FCP_DATA frame is 1, if it is 1, it means that the carried data is compressed data, go to step S914; otherwise, it means that the carried data is uncompressed data, go to step S916;
  • Step S914 the compressed data is sent to the data decompression module 604 for data decompression;
  • Step S916 the decompressed data or uncompressed data is written to the target mirror volume 610;
  • step S918 the data transmission module 606 sends an FCP_RSP frame to the primary storage device 61, indicating that the write operation is completed.
  • the judgment is made according to the data length and the like, and if the compression can save the total transmission time, the compression is performed; otherwise, the compression is not performed, so that the total transmission time can be minimized.
  • the invention uses the reserved bits of the FC frame to notify the peer storage device whether to enable data compression, does not require additional negotiation messages and processes, does not occupy additional network bandwidth, and does not reduce the efficiency of remote replication.
  • Embodiments of the present invention also provide a storage medium.
  • the foregoing storage medium may be configured to store program code for performing the following steps:
  • Step S1 Obtain a length of data to be transmitted to the backup storage device.
  • Step S2 determining whether to compress the data according to the length of the data
  • step S3 if the result of the determination is YES, the data is subjected to compression processing.
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the embodiment of the present invention is applied to the field of communications, and solves the problem that all the transmission data is compressed in the related art and causes some data to be transmitted for a long time. It is possible to separately determine whether to perform data compression for each transmission, so as to transmit the total data.
  • the transmission time is the shortest.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed are a data processing method and device. The method comprises: acquiring the length of data to be transmitted to a standby storage apparatus; judging whether to compress the data according to the length of the data; and in the case where a judgement result is yes, compressing the data. The invention solves the problem in the related art that the time for transmitting some data is relatively long due to the fact that all transmission data are compressed, so that whether data compression is conducted can be determined separately for each transmission, thereby enabling the total transmission time for data transmission to be the shortest.

Description

数据处理方法及装置Data processing method and device 技术领域Technical field
本发明涉及通信领域,具体而言,涉及数据处理方法及装置。The present invention relates to the field of communications, and in particular to a data processing method and apparatus.
背景技术Background technique
在计算机网络存储系统中,为了防止因各种灾难导致用户数据丢失或关键业务系统宕机,引入了远程复制技术。远程复制技术将本地主存储设备镜像卷(简称源镜像卷)上的数据同步到异地备存储设备的镜像卷(简称目标镜像卷)上。当本地存储设备的数据丢失时,可以从异地存储设备中恢复数据,从而保证存储设备中数据的高可靠性。In computer network storage systems, remote replication technology is introduced to prevent user data loss or downtime of critical business systems due to various disasters. The remote replication technology synchronizes the data on the local primary storage device mirrored volume (referred to as the source mirrored volume) to the mirrored volume of the remote storage device (referred to as the target mirrored volume). When the data of the local storage device is lost, data can be recovered from the remote storage device, thereby ensuring high reliability of data in the storage device.
为了提高网络传输的效率,有些存储设备采用了数据压缩技术。主存储设备在同步前对数据进行压缩,将压缩后数据传输到备存储设备,备存储设备对数据解压后写入目标镜像卷。一般来说,数据压缩能够减少传输时间,但是在高速的光纤通道(Fibre Channel,简称为FC)网络上,如果压缩掉的数据量不大,总的传输时间可能反而会增大。例如一块500字节的数据,经过压缩后变成400字节,减少了100字节。在8Gbps的FC网络上,100字节的传输时间为125ns,也就是能够节省125ns的传输时间。但是主存储设备压缩的时间加上备存储设备解压的时间,一般会超过125ns,这样总的传输时间反而增加了,不如不做压缩直接传输。In order to improve the efficiency of network transmission, some storage devices use data compression technology. The primary storage device compresses the data before the synchronization, and then transfers the compressed data to the backup storage device. The storage device decompresses the data and writes the data to the target mirrored volume. In general, data compression can reduce transmission time, but on a high-speed Fibre Channel (FC) network, if the amount of compressed data is small, the total transmission time may increase. For example, a piece of 500-byte data is compressed into 400 bytes, which is reduced by 100 bytes. On an 8Gbps FC network, the 100-byte transmission time is 125ns, which means that it can save 125ns of transmission time. However, the compression time of the primary storage device plus the decompression time of the standby storage device generally exceeds 125 ns, so that the total transmission time is increased instead of direct compression without compression.
可见,在整个远程复制过程中,有的数据压缩了能节省时间,有的数据压缩了不能节省时间,现有技术中,一般的存储设备是在远程复制开始前专门协商启用数据压缩,之后所有的传输都进行数据压缩,无法做到每次传输单独决定是否启用数据压缩。It can be seen that during the entire remote replication process, some data compression can save time, and some data compression can not save time. In the prior art, the general storage device specifically negotiates and enables data compression before the remote replication starts, and then all The data is compressed by the transmission, and it is impossible to determine whether to enable data compression by each transmission.
针对相关技术中对所有传输数据都进行压缩导致传输某些数据时间较长的问题,还未提出有效的解决方案。An effective solution has not been proposed for the problem that the compression of all transmission data in the related art leads to the transmission of certain data for a long time.
发明内容 Summary of the invention
本发明实施例提供了数据处理方法及装置,以至少解决相关技术中对所有传输数据都进行压缩导致传输某些数据时间较长的问题。The embodiments of the present invention provide a data processing method and apparatus, so as to at least solve the problem that the compression of all transmission data in the related art causes a certain data to be transmitted for a long time.
根据本发明实施例的一个方面,提供了一种数据处理方法,包括:获取向备存储设备待传输的数据的长度;根据所述数据的长度判断是否对所述数据进行压缩;在判断结果为是的情况下,对所述数据进行压缩处理。According to an aspect of the embodiments of the present invention, a data processing method includes: obtaining a length of data to be transmitted to a backup storage device; determining whether to compress the data according to a length of the data; In the case of YES, the data is compressed.
进一步地,根据所述数据的长度判断是否对所述数据进行压缩包括:根据所述数据的长度判断对所述数据进行压缩的时间与传输压缩后的所述数据的时间之和是否小于直接传输所述数据的时间。Further, determining whether to compress the data according to the length of the data comprises: determining, according to the length of the data, whether a sum of a time for compressing the data and a time for transmitting the compressed data is smaller than a direct transmission The time of the data.
进一步地,所述方法还包括:接收所述备存储设备发送的支持对数据进行压缩的帧;根据接收到的帧确定所述备存储设备支持对数据进行压缩。Further, the method further includes: receiving a frame that is sent by the backup storage device to support compression of data; and determining, according to the received frame, that the standby storage device supports compression of data.
进一步地,所述方法还包括:通过光纤通道FC帧的保留位向所述备存储设备通告是否对数据进行压缩。Further, the method further includes: notifying, by the reserved bits of the Fibre Channel FC frame, whether the data is compressed by the reserved storage device.
进一步地,在对待传输的所述数据进行压缩处理之后,所述方法还包括:将压缩后的所述数据传输给所述备存储设备。Further, after performing compression processing on the data to be transmitted, the method further includes: transmitting the compressed data to the standby storage device.
根据本发明实施例的另一方面,提供了一种数据处理方法,包括:接收主存储设备发送的数据,其中,所述数据是所述主存储设备根据获取的所述数据的长度判断对所述数据进行压缩的情况下,对所述数据进行压缩处理之后的数据;对接收到的所述数据进行解压缩处理。According to another aspect of the present invention, a data processing method includes: receiving data sent by a primary storage device, wherein the data is that the primary storage device determines a location according to the length of the acquired data. When the data is compressed, the data after the data is compressed, and the received data is decompressed.
进一步地,在接收所述主存储设备发送的数据之前,所述方法还包括:向所述主存储设备发送支持对数据进行压缩的帧,其中,所述帧用于所述主存储设备确定所述备存储设备支持对数据进行压缩。Further, before receiving the data sent by the primary storage device, the method further includes: sending, to the primary storage device, a frame that supports compression of data, wherein the frame is used by the primary storage device to determine The storage device supports compression of data.
根据本发明实施例的另一方面,还提供了一种数据处理装置,包括:获取模块,设置为获取向备存储设备待传输的数据的长度;判断模块,设置为根据所述数据的长度判断是否对所述数据进行压缩;压缩模块,设置为在判断结果为是的情况下,对所述数据进行压缩处理。According to another aspect of the present invention, a data processing apparatus is provided, including: an obtaining module, configured to acquire a length of data to be transmitted to a backup storage device; and a determining module, configured to determine according to the length of the data Whether to compress the data; and the compression module is configured to perform compression processing on the data if the determination result is YES.
进一步地,所述判断模块包括:判断单元,设置为根据所述数据的长 度判断对所述数据进行压缩的时间与传输压缩后的所述数据的时间之和是否小于直接传输所述数据的时间。Further, the determining module includes: a determining unit, configured to be long according to the data The degree is judged whether the sum of the time at which the data is compressed and the time at which the compressed data is transmitted is less than the time at which the data is directly transmitted.
根据本发明实施例的再一方面,还提供了一种数据处理装置,包括:接收模块,设置为接收主存储设备发送的数据,其中,所述数据是所述主存储设备根据获取的所述数据的长度判断对所述数据进行压缩的情况下,对所述数据进行压缩处理之后的数据;解压缩模块,设置为对接收到的所述数据进行解压缩处理。According to still another aspect of the present invention, a data processing apparatus is provided, including: a receiving module, configured to receive data sent by a primary storage device, where the data is the primary storage device according to the acquired The length of the data determines the data after the data is compressed, and the decompressing module is configured to decompress the received data.
根据本发明的又一个实施例,还提供了一种存储介质。该存储介质设置为存储用于执行以下步骤的程序代码:According to still another embodiment of the present invention, a storage medium is also provided. The storage medium is arranged to store program code for performing the following steps:
获取向备存储设备待传输的数据的长度;根据所述数据的长度判断是否对所述数据进行压缩;在判断结果为是的情况下,对所述数据进行压缩处理。Obtaining a length of data to be transmitted to the backup storage device; determining whether to compress the data according to the length of the data; and if the determination result is yes, performing compression processing on the data.
通过本发明实施例,采用获取向备存储设备待传输的数据的长度;根据所述数据的长度判断是否对所述数据进行压缩;在判断结果为是的情况下,对所述数据进行压缩处理,解决了相关技术中对所有传输数据都进行压缩导致传输某些数据时间较长的问题,能够针对每次传输单独决定是否进行数据压缩,使传输数据总的传输时间最短。According to the embodiment of the present invention, the length of the data to be transmitted to the standby storage device is acquired; whether the data is compressed according to the length of the data; and if the determination result is yes, the data is compressed. The invention solves the problem that all the transmission data is compressed in the related art and causes some data to be transmitted for a long time, and it is possible to separately determine whether to perform data compression for each transmission, so that the total transmission time of the transmission data is the shortest.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的数据处理方法的流程图一;1 is a flow chart 1 of a data processing method according to an embodiment of the present invention;
图2是根据本发明实施例的数据处理方法的流程图二;2 is a second flowchart of a data processing method according to an embodiment of the present invention;
图3是根据本发明实施例的数据处理装置的框图一;3 is a block diagram 1 of a data processing apparatus according to an embodiment of the present invention;
图4是根据本发明优选实施例的数据处理装置的框图;4 is a block diagram of a data processing apparatus in accordance with a preferred embodiment of the present invention;
图5是根据本发明实施例的数据处理装置的框图二; FIG. 5 is a block diagram 2 of a data processing apparatus according to an embodiment of the present invention; FIG.
图6是根据本发明实施例的远程复制系统中主存储设备和备存储设备的结构框图;6 is a structural block diagram of a primary storage device and a standby storage device in a remote replication system according to an embodiment of the present invention;
图7是根据本发明实施例的数据压缩标志位的示意图;7 is a schematic diagram of a data compression flag bit according to an embodiment of the present invention;
图8是根据本发明实施例的主存储设备在数据传输时启用数据压缩的方法流程图;8 is a flowchart of a method for enabling data compression of a primary storage device during data transmission according to an embodiment of the present invention;
图9是根据本发明实施例的备存储设备在数据传输时启用数据压缩的方法流程图。9 is a flow chart of a method for enabling data storage during data transmission by a standby storage device in accordance with an embodiment of the present invention.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
本发明实施例提供了一种数据处理方法,图1是根据本发明实施例的数据处理方法的流程图一,如图1所示,包括:The embodiment of the present invention provides a data processing method. FIG. 1 is a flowchart 1 of a data processing method according to an embodiment of the present invention. As shown in FIG. 1, the method includes:
步骤S102,获取向备存储设备待传输的数据的长度;Step S102: Acquire a length of data to be transmitted to the backup storage device.
步骤S104,根据该数据的长度判断是否对该数据进行压缩;Step S104, determining whether to compress the data according to the length of the data;
步骤S106,在判断结果为是的情况下,对该数据进行压缩处理。In step S106, if the result of the determination is YES, the data is subjected to compression processing.
通过上述步骤,获取向备存储设备待传输的数据的长度;根据该数据的长度判断是否对该数据进行压缩;在判断结果为是的情况下,对该数据进行压缩处理,解决了相关技术中对所有传输数据都进行压缩导致传输某些数据时间较长的问题,能够针对每次传输单独决定是否进行数据压缩,使传输数据总的传输时间最短。The length of the data to be transmitted to the backup storage device is obtained through the foregoing steps; whether the data is compressed according to the length of the data; and if the determination result is yes, the data is compressed, and the related technology is solved. The problem of compressing all transmitted data leads to a problem of transmitting some data for a long time, and it is possible to individually determine whether or not to perform data compression for each transmission, so that the total transmission time of the transmitted data is the shortest.
进一步地,根据该数据的长度判断是否对该数据进行压缩可以包括:根据该数据的长度判断对该数据进行压缩的时间与传输压缩后的该数据的时间之和是否小于直接传输该数据的时间。Further, determining whether to compress the data according to the length of the data may include: determining, according to the length of the data, whether a sum of a time for compressing the data and a time for transmitting the compressed data is less than a time for directly transmitting the data .
进一步地,接收该备存储设备发送的支持对数据进行压缩的帧;根据接收到的帧确定该备存储设备支持对数据进行压缩。 Further, receiving, by the standby storage device, a frame that supports compression of the data; determining, according to the received frame, that the standby storage device supports compression of the data.
进一步地,通过光纤通道FC帧的保留位向该备存储设备通告是否对数据进行压缩。Further, the standby storage device is advertised to the data storage device by the reserved bits of the Fibre Channel FC frame.
进一步地,在对待传输的该数据进行压缩处理之后,将压缩后的该数据传输给该备存储设备。Further, after the data to be transmitted is compressed, the compressed data is transmitted to the standby storage device.
本发明实施例还提供了一种数据处理方法,图2是根据本发明实施例的数据处理方法的流程图二,如图2所示,包括:The embodiment of the present invention further provides a data processing method, and FIG. 2 is a second flowchart of the data processing method according to the embodiment of the present invention. As shown in FIG. 2, the method includes:
步骤S202,接收主存储设备发送的数据,其中,该数据是该主存储设备根据获取的该数据的长度判断对该数据进行压缩的情况下,对该数据进行压缩处理之后的数据;Step S202, receiving data sent by the primary storage device, where the data is data after the primary storage device determines to compress the data according to the length of the acquired data, and compresses the data;
步骤S204,对接收到的该数据进行解压缩处理。Step S204, performing decompression processing on the received data.
进一步地,在接收该主存储设备发送的数据之前,向该主存储设备发送支持对数据进行压缩的帧,其中,该帧用于该主存储设备确定该备存储设备支持对数据进行压缩。Further, before receiving the data sent by the primary storage device, sending a frame supporting compression of the data to the primary storage device, wherein the frame is used by the primary storage device to determine that the standby storage device supports compression of data.
本发明实施例提供了一种数据处理装置,图3是根据本发明实施例的数据处理装置的框图一,如图3所示,包括获取模块32、判断模块34和压缩模块36,下面对各个模块进行简要说明。The embodiment of the present invention provides a data processing apparatus. FIG. 3 is a block diagram of a data processing apparatus according to an embodiment of the present invention. As shown in FIG. 3, the method includes an obtaining module 32, a determining module 34, and a compressing module 36. Each module is briefly described.
获取模块32,设置为获取向备存储设备待传输的数据的长度;The obtaining module 32 is configured to acquire a length of data to be transmitted to the standby storage device;
判断模块34,设置为根据该数据的长度判断是否对该数据进行压缩;The determining module 34 is configured to determine whether to compress the data according to the length of the data;
压缩模块36,设置为在判断结果为是的情况下,对该数据进行压缩处理。The compression module 36 is arranged to perform compression processing on the data if the determination result is YES.
图4是根据本发明优选实施例的数据处理装置的框图,如图4所示,判断模块34包括:4 is a block diagram of a data processing apparatus in accordance with a preferred embodiment of the present invention. As shown in FIG. 4, the determination module 34 includes:
判断单元42,设置为根据该数据的长度判断对该数据进行压缩的时间与传输压缩后的该数据的时间之和是否小于直接传输该数据的时间。The determining unit 42 is configured to determine whether the sum of the time for compressing the data and the time for transmitting the compressed data is smaller than the time for directly transmitting the data according to the length of the data.
本发明实施例还提供了一种数据处理装置,图5是根据本发明实施例的数据处理装置的框图二,如图5所示,包括接收模块52和解压缩模块 54,下面对各个模块进行简要说明。The embodiment of the present invention further provides a data processing apparatus. FIG. 5 is a block diagram 2 of a data processing apparatus according to an embodiment of the present invention. As shown in FIG. 5, the receiving module 52 and the decompression module are included. 54, a brief description of each module below.
接收模块52,设置为接收主存储设备发送的数据,其中,该数据是该主存储设备根据获取的该数据的长度判断对该数据进行压缩的情况下,对该数据进行压缩处理之后的数据;The receiving module 52 is configured to receive data sent by the primary storage device, where the data is data after the primary storage device determines to compress the data according to the length of the acquired data, and compresses the data;
解压缩模块54,设置为对接收到的该数据进行解压缩处理。The decompression module 54 is configured to decompress the received data.
下面结合具体实施例对本发明实施例进行进一步说明。The embodiments of the present invention are further described below in conjunction with specific embodiments.
本发明实施例提供了一种每次传输单独决定是否启用数据压缩的远程复制的存储系统,图6是根据本发明实施例的远程复制系统中主存储设备和备存储设备的结构框图,如图6所示,该远程复制系统包括本地主存储设备和异地备存储设备,两者的结构相同,下面进行进一步说明。The embodiment of the present invention provides a storage system for remote replication that determines whether to enable data compression for each transmission. FIG. 6 is a structural block diagram of a primary storage device and a standby storage device in a remote replication system according to an embodiment of the present invention. As shown in FIG. 6, the remote replication system includes a local primary storage device and a remote standby storage device, and the structures of the two are the same, which are further described below.
主存储设备61,其功能由上述的获取模块32、判断模块34和压缩模块36一起实现,用于存储数据的主设备,是远程复制的发起端。由数据压缩模块602、数据解压缩模块604、数据传输模块606、源镜像卷608组成,通过FC网络612与备存储设备62相连;The main storage device 61 is implemented by the above-mentioned obtaining module 32, the judging module 34 and the compressing module 36, and the main device for storing data is the originating end of the remote copying. The data compression module 602, the data decompression module 604, the data transmission module 606, and the source mirroring volume 608 are connected to the backup storage device 62 through the FC network 612;
备存储设备62,其功能由上述的接收模块52和解压缩模块54一起实现,用于存储备份数据的设备,是远程复制的接收端。由数据压缩模块602、数据解压缩模块604、数据传输模块606、目标镜像卷610组成,通过FC网络612与主存储设备61相连;The storage device 62 is functionally implemented by the receiving module 52 and the decompression module 54 described above, and is a device for storing backup data, which is a receiving end of remote replication. The data compression module 602, the data decompression module 604, the data transmission module 606, and the target mirror volume 610 are connected to the main storage device 61 through the FC network 612;
数据压缩模块602,对传输的数据进行压缩操作;The data compression module 602 performs a compression operation on the transmitted data.
数据解压缩模块604,对传输的数据进行解压缩操作;The data decompression module 604 performs a decompression operation on the transmitted data;
数据传输模块606,在FC网络上传输数据;a data transmission module 606 for transmitting data on the FC network;
源镜像卷608,用于存储源数据的卷;a source mirrored volume 608 for storing a volume of source data;
目标镜像卷610,用于存储备份数据的卷;a target mirrored volume 610 for storing a volume of backup data;
FC网络612,用于传输数据的网络。FC network 612, a network for transmitting data.
本发明实施例还提供了一种每次传输单独决定是否启用数据压缩的远程复制的存储方法,该方法包括以下步骤: The embodiment of the present invention further provides a storage method for remote replication that determines whether to enable data compression separately for each transmission, and the method includes the following steps:
步骤A、主存储设备61启动一次数据传输,数据传输模块606向备存储设备62发送带写命令的FCP_CMND帧,其中,承载SCSI的光纤通道协议(Fibre Channel Protocol for SCSI,简称为FCP);Step A, the primary storage device 61 initiates a data transmission, and the data transmission module 606 sends a FCP_CMND frame with a write command to the backup storage device 62, where the Fibre Channel Protocol for SCSI (FCP) is carried;
步骤B、备存储设备62的数据传输模块606收到写命令,构造FCP_XFER_RDY帧,将选定的保留位置1,发送给主存储设备61;Step B, the data storage module 606 of the storage device 62 receives the write command, constructs the FCP_XFER_RDY frame, and sends the selected reserved position 1 to the primary storage device 61;
步骤C、主存储设备61的数据传输模块606收到FCP_XFER_RDY帧,查看选定的保留位,如果为1,转步骤D,否则转步骤G;Step C, the data transfer module 606 of the primary storage device 61 receives the FCP_XFER_RDY frame, and checks the selected reserved bit. If it is 1, go to step D, otherwise go to step G;
步骤D、主存储设备61根据数据长度等信息判断是否需要启用数据压缩,如果需要,转步骤E;否则,转步骤G;Step D, the primary storage device 61 determines whether it is necessary to enable data compression according to the data length and the like, if necessary, go to step E; otherwise, go to step G;
步骤E、主存储设备61从镜像卷读出数据,送入数据压缩模块602进行压缩,将压缩后的数据送给数据传输模块606;Step E, the main storage device 61 reads data from the mirrored volume, sends it to the data compression module 602 for compression, and sends the compressed data to the data transmission module 606;
步骤F、主存储设备61的数据传输模块606使用压缩后数据构造FCP_DATA帧,将选定的保留位置1,发送给备存储设备62,转步骤I;Step F, the data storage module 606 of the primary storage device 61 uses the compressed data to construct the FCP_DATA frame, the selected reserved position 1, is sent to the backup storage device 62, step I;
步骤G、主存储设备61从镜像卷读出数据,送给数据传输模块606;Step G, the primary storage device 61 reads data from the mirrored volume, and sends it to the data transmission module 606;
步骤H、主存储设备61的数据传输模块606使用数据构造FCP_DATA帧,将选定的保留位置0,发送给备存储设备62;Step H, the data storage module 606 of the primary storage device 61 uses the data to construct the FCP_DATA frame, and sends the selected reserved location 0 to the standby storage device 62;
步骤I、备存储设备62的数据传输模块606收到FCP_DATA帧,查看选定的保留位,如果为1,转步骤J,否则转步骤K;Step I: The data transmission module 606 of the backup storage device 62 receives the FCP_DATA frame, and checks the selected reserved bit. If it is 1, go to step J, otherwise go to step K;
步骤J、备存储设备62的数据传输模块606将数据送入数据解压缩模块604,将解压缩后的数据存入备存储设备62的镜像卷,转步骤L;Step J, the data storage module 606 of the storage device 62 sends the data to the data decompression module 604, the decompressed data is stored in the mirrored volume of the storage device 62, step L;
步骤K、备存储设备62的数据传输模块606将数据存入备存储设备62的镜像卷;Step K: The data transmission module 606 of the backup storage device 62 stores the data in the mirrored volume of the standby storage device 62;
步骤L、备存储设备62的数据传输模块606向主存储设备61发送FCP_RSP帧;Step L: The data transmission module 606 of the backup storage device 62 sends an FCP_RSP frame to the primary storage device 61.
步骤M、主存储设备61的数据传输模块606收到FCP_RSP帧,本次数据传输过程结束。 Step M: The data transmission module 606 of the primary storage device 61 receives the FCP_RSP frame, and the current data transmission process ends.
图7是根据本发明实施例的数据压缩标志位的示意图,如图7所示,本发明实施例的数据压缩标志位为:FC帧头701的字3WORD3的BIT18(RSV 703)位于DF_CTL 702字段,在FC协议中该位是保留位,本发明实施例将其作为通告是否启用数据压缩的标志位。FIG. 7 is a schematic diagram of a data compression flag according to an embodiment of the present invention. As shown in FIG. 7, the data compression flag of the embodiment of the present invention is: BIT18 (RSV 703) of the word 3WORD3 of the FC frame header 701 is located in the DF_CTL 702 field. In the FC protocol, the bit is a reserved bit, and the embodiment of the present invention uses it as a flag to announce whether data compression is enabled.
下面分别从主存储设备和备存储设备两侧进行详细说明。The following is a detailed description from both sides of the primary storage device and the standby storage device.
图8是根据本发明实施例的主存储设备在数据传输时启用数据压缩的方法流程图,如图8所示,该方法流程包括如下步骤:FIG. 8 is a flowchart of a method for enabling data compression of a primary storage device during data transmission according to an embodiment of the present invention. As shown in FIG. 8, the method includes the following steps:
步骤S802,向备存储设备62发送带写命令的FCP_CMND帧,数据传输模块606构造、发出FCP_CMND帧,表示准备向目标镜像卷610写入数据;Step S802, sending an FCP_CMND frame with a write command to the backup storage device 62, and the data transmission module 606 constructs and issues an FCP_CMND frame, indicating that the data is ready to be written to the target mirrored volume 610;
步骤S804,数据传输模块606收到备存储设备62发送的FCP_XFER_RDY帧,表示备存储设备62已经准备好接收写入的数据;Step S804, the data transmission module 606 receives the FCP_XFER_RDY frame sent by the backup storage device 62, indicating that the backup storage device 62 is ready to receive the written data.
步骤S806,数据传输模块606查看FCP_XFER_RDY帧的WORD3的BIT18是否为1,如果为1,表示备存储设备62支持数据压缩,转步骤S808;否则,表示备存储设备62不支持数据压缩,转步骤S818;Step S806, the data transmission module 606 checks whether the BIT18 of the WORD3 of the FCP_XFER_RDY frame is 1, if it is 1, it indicates that the backup storage device 62 supports data compression, and proceeds to step S808; otherwise, it indicates that the standby storage device 62 does not support data compression, and the process proceeds to step S818. ;
步骤S808,根据数据长度等信息决定是否启用数据压缩,如果启用,转步骤S810,否则,转步骤S818;Step S808, according to the data length and other information to determine whether to enable data compression, if enabled, go to step S810, otherwise, go to step S818;
步骤S810,从源镜像卷608读出数据;Step S810, reading data from the source mirror volume 608;
步骤S812,数据送入数据压缩模块602,进行数据压缩;Step S812, the data is sent to the data compression module 602 for data compression;
步骤S814,数据传输模块606使用压缩后数据构造FCP_DATA帧;Step S814, the data transmission module 606 constructs the FCP_DATA frame using the compressed data;
步骤S816,数据传输模块606将FCP_DATA帧的WORD3的BIT18设为1,表示携带的数据为压缩数据,转步骤S824;Step S816, the data transmission module 606 sets the BIT18 of the WORD3 of the FCP_DATA frame to 1, indicating that the carried data is compressed data, and proceeds to step S824;
步骤S818,从源镜像卷608读出数据;Step S818, reading data from the source mirror volume 608;
步骤S820,数据传输模块606使用数据构造FCP_DATA帧;Step S820, the data transmission module 606 constructs an FCP_DATA frame using the data;
步骤S822,数据传输模块606将FCP_DATA帧的WORD3的BIT18设为0,表示携带的数据为未压缩数据; Step S822, the data transmission module 606 sets the BIT18 of the WORD3 of the FCP_DATA frame to 0, indicating that the carried data is uncompressed data;
步骤S824,数据传输模块606向备存储设备62发送FCP_DATA帧;Step S824, the data transmission module 606 sends an FCP_DATA frame to the backup storage device 62.
步骤S826,数据传输模块606收到备存储设备62发送的FCP_RSP帧,表示写入操作完成。Step S826, the data transmission module 606 receives the FCP_RSP frame sent by the standby storage device 62, indicating that the write operation is completed.
图9是根据本发明实施例的备存储设备在数据传输时启用数据压缩的方法流程图,如图9所示,该方法包括以下步骤:FIG. 9 is a flowchart of a method for enabling data storage during data transmission by a standby storage device according to an embodiment of the present invention. As shown in FIG. 9, the method includes the following steps:
步骤S902,数据传输模块606收到主存储设备61发送的带写命令的FCP_CMND帧,表示主存储设备61准备向目标镜像卷610写入数据;Step S902, the data transmission module 606 receives the FCP_CMND frame with the write command sent by the primary storage device 61, indicating that the primary storage device 61 is ready to write data to the target mirrored volume 610;
步骤S904,数据传输模块606构造FCP_XFER_RDY帧;Step S904, the data transmission module 606 constructs an FCP_XFER_RDY frame;
步骤S906,数据传输模块606将FCP_XFER_RDY帧的WORD3的BIT18设为1,表示本端支持数据压缩;Step S906, the data transmission module 606 sets the BIT18 of the WORD3 of the FCP_XFER_RDY frame to 1, indicating that the local end supports data compression;
步骤S908,数据传输模块606向主存储设备61发送FCP_XFER_RDY帧,表示已准备好接收数据;Step S908, the data transmission module 606 sends an FCP_XFER_RDY frame to the primary storage device 61, indicating that the data is ready to be received;
步骤S910,数据传输模块606收到主存储设备61发送的FCP_DATA帧;Step S910, the data transmission module 606 receives the FCP_DATA frame sent by the primary storage device 61;
步骤S912,数据传输模块606查看FCP_DATA帧的WORD3的BIT18是否为1,如果为1,表示携带的数据为压缩数据,转步骤S914;否则,表示携带的数据为未压缩数据,转步骤S916;Step S912, the data transmission module 606 checks whether the BIT18 of the WORD3 of the FCP_DATA frame is 1, if it is 1, it means that the carried data is compressed data, go to step S914; otherwise, it means that the carried data is uncompressed data, go to step S916;
步骤S914,压缩数据送入数据解压缩模块604,进行数据解压缩;Step S914, the compressed data is sent to the data decompression module 604 for data decompression;
步骤S916,将解压后数据或未压缩数据写入目标镜像卷610;Step S916, the decompressed data or uncompressed data is written to the target mirror volume 610;
步骤S918,数据传输模块606向主存储设备61发送FCP_RSP帧,表示写入操作完成。In step S918, the data transmission module 606 sends an FCP_RSP frame to the primary storage device 61, indicating that the write operation is completed.
通过本发明实施例在每次数据传输时,根据数据长度等信息作出判断,如果压缩能够节省总传输时间,则进行压缩;否则不进行压缩,这样可使总传输时间最短。本发明利用FC帧的保留位向对端存储设备通告是否启用数据压缩,不需要额外的协商报文和流程,不占用额外的网络带宽,不会降低远程复制的效率。 According to the embodiment of the present invention, at each data transmission, the judgment is made according to the data length and the like, and if the compression can save the total transmission time, the compression is performed; otherwise, the compression is not performed, so that the total transmission time can be minimized. The invention uses the reserved bits of the FC frame to notify the peer storage device whether to enable data compression, does not require additional negotiation messages and processes, does not occupy additional network bandwidth, and does not reduce the efficiency of remote replication.
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:Embodiments of the present invention also provide a storage medium. Optionally, in the embodiment, the foregoing storage medium may be configured to store program code for performing the following steps:
步骤S1,获取向备存储设备待传输的数据的长度;Step S1: Obtain a length of data to be transmitted to the backup storage device.
步骤S2,根据该数据的长度判断是否对该数据进行压缩;Step S2, determining whether to compress the data according to the length of the data;
步骤S3,在判断结果为是的情况下,对该数据进行压缩处理。In step S3, if the result of the determination is YES, the data is subjected to compression processing.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory. A variety of media that can store program code, such as a disc or a disc.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性Industrial applicability
本发明实施例,应用于通信领域,解决了相关技术中对所有传输数据都进行压缩导致传输某些数据时间较长的问题,能够针对每次传输单独决定是否进行数据压缩,使传输数据总的传输时间最短。 The embodiment of the present invention is applied to the field of communications, and solves the problem that all the transmission data is compressed in the related art and causes some data to be transmitted for a long time. It is possible to separately determine whether to perform data compression for each transmission, so as to transmit the total data. The transmission time is the shortest.

Claims (10)

  1. 一种数据处理方法,包括:A data processing method comprising:
    获取向备存储设备待传输的数据的长度;Obtaining the length of data to be transmitted to the standby storage device;
    根据所述数据的长度判断是否对所述数据进行压缩;Determining whether to compress the data according to the length of the data;
    在判断结果为是的情况下,对所述数据进行压缩处理。When the result of the determination is YES, the data is subjected to compression processing.
  2. 根据权利要求1所述的方法,其中,根据所述数据的长度判断是否对所述数据进行压缩包括:The method of claim 1, wherein determining whether to compress the data based on the length of the data comprises:
    根据所述数据的长度判断对所述数据进行压缩的时间与传输压缩后的所述数据的时间之和是否小于直接传输所述数据的时间。Whether the sum of the time for compressing the data and the time for transmitting the compressed data is less than the time for directly transmitting the data is determined according to the length of the data.
  3. 根据权利要求2所述的方法,其中,所述方法还包括:The method of claim 2, wherein the method further comprises:
    接收所述备存储设备发送的支持对数据进行压缩的帧;Receiving a frame sent by the backup storage device to support compression of data;
    根据接收到的帧确定所述备存储设备支持对数据进行压缩。Determining, according to the received frame, that the standby storage device supports compression of data.
  4. 根据权利要求3所述的方法,其中,所述方法还包括:The method of claim 3, wherein the method further comprises:
    通过光纤通道FC帧的保留位向所述备存储设备通告是否对数据进行压缩。Whether the data is compressed is advertised to the standby storage device by a reserved bit of the Fibre Channel FC frame.
  5. 根据权利要求1至4中任一项所述的方法,其中,在对待传输的所述数据进行压缩处理之后,所述方法还包括:The method according to any one of claims 1 to 4, wherein after the data to be transmitted is subjected to compression processing, the method further comprises:
    将压缩后的所述数据传输给所述备存储设备。Transmitting the compressed data to the standby storage device.
  6. 一种数据处理方法,包括:A data processing method comprising:
    接收主存储设备发送的数据,其中,所述数据是所述主存储设备根据获取的所述数据的长度判断对所述数据进行压缩的情况下,对所 述数据进行压缩处理之后的数据;Receiving data sent by the primary storage device, where the data is determined by the primary storage device to compress the data according to the length of the acquired data, Data after the data is compressed;
    对接收到的所述数据进行解压缩处理。Decompressing the received data.
  7. 根据权利要求6所述的方法,其中,在接收所述主存储设备发送的数据之前,所述方法还包括:The method of claim 6, wherein the method further comprises: before receiving the data sent by the primary storage device:
    向所述主存储设备发送支持对数据进行压缩的帧,其中,所述帧用于所述主存储设备确定所述备存储设备支持对数据进行压缩。Sending to the primary storage device a frame supporting compression of data, wherein the frame is used by the primary storage device to determine that the standby storage device supports compression of data.
  8. 一种数据处理装置,包括:A data processing device comprising:
    获取模块,设置为获取向备存储设备待传输的数据的长度;Obtaining a module, configured to acquire a length of data to be transmitted to the standby storage device;
    判断模块,设置为根据所述数据的长度判断是否对所述数据进行压缩;a determining module, configured to determine whether to compress the data according to the length of the data;
    压缩模块,设置为在判断结果为是的情况下,对所述数据进行压缩处理。The compression module is configured to perform compression processing on the data if the determination result is YES.
  9. 根据权利要求8所述的装置,其中,所述判断模块包括:The apparatus of claim 8 wherein said determining module comprises:
    判断单元,设置为根据所述数据的长度判断对所述数据进行压缩的时间与传输压缩后的所述数据的时间之和是否小于直接传输所述数据的时间。The determining unit is configured to determine, according to the length of the data, whether a sum of a time for compressing the data and a time for transmitting the compressed data is less than a time for directly transmitting the data.
  10. 一种数据处理装置,其中,包括:A data processing device, comprising:
    接收模块,设置为接收主存储设备发送的数据,其中,所述数据是所述主存储设备根据获取的所述数据的长度判断对所述数据进行压缩的情况下,对所述数据进行压缩处理之后的数据;The receiving module is configured to receive data sent by the primary storage device, where the data is compressed by the primary storage device when the data is compressed according to the length of the acquired data. After the data;
    解压缩模块,设置为对接收到的所述数据进行解压缩处理。 And a decompression module, configured to decompress the received data.
PCT/CN2016/099936 2015-09-25 2016-09-23 Data processing method and device WO2017050283A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510624722.9A CN106559444A (en) 2015-09-25 2015-09-25 Data processing method and device
CN201510624722.9 2015-09-25

Publications (1)

Publication Number Publication Date
WO2017050283A1 true WO2017050283A1 (en) 2017-03-30

Family

ID=58385729

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/099936 WO2017050283A1 (en) 2015-09-25 2016-09-23 Data processing method and device

Country Status (2)

Country Link
CN (1) CN106559444A (en)
WO (1) WO2017050283A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1385969A (en) * 2001-05-10 2002-12-18 华邦电子股份有限公司 Method and device for data transmission by dynamic adjusting compaction rate
CN101599986A (en) * 2008-06-02 2009-12-09 宏碁股份有限公司 The method of increasing transmission speed of files and computer system
CN102984753A (en) * 2011-09-05 2013-03-20 普天信息技术研究院有限公司 A method for improving the transmission efficiency of wireless communication data
CN103699587A (en) * 2013-12-06 2014-04-02 北京奇虎科技有限公司 Dynamic compression method and dynamic compression device for files

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013095615A1 (en) * 2011-12-23 2013-06-27 Intel Corporation Bitstream processing using coalesced buffers and delayed matching and enhanced memory writes
TWI530105B (en) * 2012-11-26 2016-04-11 財團法人資訊工業策進會 Data processing apparatus and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1385969A (en) * 2001-05-10 2002-12-18 华邦电子股份有限公司 Method and device for data transmission by dynamic adjusting compaction rate
CN101599986A (en) * 2008-06-02 2009-12-09 宏碁股份有限公司 The method of increasing transmission speed of files and computer system
CN102984753A (en) * 2011-09-05 2013-03-20 普天信息技术研究院有限公司 A method for improving the transmission efficiency of wireless communication data
CN103699587A (en) * 2013-12-06 2014-04-02 北京奇虎科技有限公司 Dynamic compression method and dynamic compression device for files

Also Published As

Publication number Publication date
CN106559444A (en) 2017-04-05

Similar Documents

Publication Publication Date Title
TWI427479B (en) Control method, system, computer program product, computer readable medium in fibre channel communications
KR20180105675A (en) Method, apparatus, and system for synchronizing data
US8285997B2 (en) Backup apparatus with higher security and lower network bandwidth consumption
TW201540002A (en) Data transmission system and method for Bluetooth interface
CN103532984A (en) Data transmission method, device and system of websocket protocol
US9377961B2 (en) System and method for calculating data compression ratio without writing data to media
US20170177602A1 (en) Compressed data layout with variable group size
US10346074B2 (en) Method of compressing parity data upon writing
JP4347351B2 (en) Data encryption apparatus, data decryption apparatus, data encryption method, data decryption method, and data relay apparatus
US9558718B2 (en) Streaming video data in the graphics domain
JP2017068255A (en) Device and method for processing image
US10277652B2 (en) Transmission apparatus, transmission method, and program
US20160092131A1 (en) Storage system, storage system control method, and recording medium storing virtual tape device control program
US9582561B2 (en) Size-based data synchronization
US20110206128A1 (en) Method and apparatus for transmitting video content compressed by codec
WO2017050283A1 (en) Data processing method and device
WO2012163059A1 (en) Method, device and system for device redirection data transmission
KR20130070947A (en) Server and method for controlling voice recognition of device, and the device
JP4998166B2 (en) Data input terminal, input data transmission method, input data transmission program
CN100401671C (en) Method for transmitting files
US8131091B2 (en) Method and apparatus for compressing text and image
CN107171820B (en) Information transmission, sending and acquisition method and device
US10116576B2 (en) Methods and apparatus for random access of HEVC bitstream for MMT
US8850117B2 (en) Storage apparatus and method maintaining at least an order of writing data
US7668094B2 (en) Time-offset regulated method and system for synchronization and rate control of media data

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16848164

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16848164

Country of ref document: EP

Kind code of ref document: A1