CN107071073A - A kind of document transmission method and device applied to object storage system - Google Patents
A kind of document transmission method and device applied to object storage system Download PDFInfo
- Publication number
- CN107071073A CN107071073A CN201710500049.7A CN201710500049A CN107071073A CN 107071073 A CN107071073 A CN 107071073A CN 201710500049 A CN201710500049 A CN 201710500049A CN 107071073 A CN107071073 A CN 107071073A
- Authority
- CN
- China
- Prior art keywords
- file
- storage system
- object storage
- compressed
- uploaded
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/182—Distributed file systems
- G06F16/1824—Distributed file systems implemented using Network-attached Storage [NAS] architecture
- G06F16/1827—Management specifically adapted to NAS
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/565—Conversion or adaptation of application format or content
- H04L67/5651—Reducing the amount or size of exchanged application data
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
- Computer And Data Communications (AREA)
Abstract
本发明公开了一种应用于对象存储系统的文件传输方法及装置,该方法包括:遍历待上传文件,筛选出具有目标后缀名的第一目标文件,其中,所述目标后缀名为jpg/jpeg;利用lepton压缩工具将所述第一目标文件进行压缩得到压缩文件;将所述压缩文件和其余待上传文件传输至对象存储系统。由此可见,本方法,通过lepton压缩工具对第一目标文件进行压缩得到压缩文件,使得在向对象存储系统上传文件时,一部分文件是经过压缩过的,因此,能够大幅度减少网络传输数据所需的带宽,提高JPEG图像数据的传输速率。此外,本发明公开的应用于对象存储系统的文件传输装置,效果如上所述。
The invention discloses a file transmission method and device applied to an object storage system. The method includes: traversing the files to be uploaded, and screening out the first target file with the target suffix name, wherein the target suffix name is jpg/jpeg ; Use the lepton compression tool to compress the first target file to obtain a compressed file; transmit the compressed file and other files to be uploaded to the object storage system. It can be seen that, in this method, the first target file is compressed by the lepton compression tool to obtain a compressed file, so that when uploading files to the object storage system, some files are compressed, and therefore, the network transmission data can be greatly reduced. The required bandwidth increases the transfer rate of JPEG image data. In addition, the effect of the file transfer device applied to the object storage system disclosed in the present invention is as above.
Description
技术领域technical field
本发明涉及对象存储系统领域,特别是涉及一种应用于对象存储系统的文件传输方法及装置。The present invention relates to the field of object storage systems, in particular to a file transmission method and device applied to object storage systems.
背景技术Background technique
对象存储系统是综合了NAS和SAN的优点,同时具有SAN的高速直接访问和NAS的数据共享等优势,提供了高可靠性、跨平台性以及安全的数据共享的存储体系结构。由于对象存储系统具有存储功能,因此,客户端可以将文件上传到对象存储系统中进行保存,或者可以从对象存储系统中下载需要的文件。The object storage system combines the advantages of NAS and SAN, and has the advantages of high-speed direct access of SAN and data sharing of NAS, and provides a storage architecture with high reliability, cross-platform and safe data sharing. Since the object storage system has a storage function, a client can upload a file to the object storage system for storage, or can download a required file from the object storage system.
在云存储时代下,用户会产生海量的文件,尤其是图像文件,这些图像文件上传到对象存储系统时,需要海量的网络带宽,从而对传输网络的带宽带来巨大的压力,且传输时间过长,甚至导致网络瘫痪。In the era of cloud storage, users will generate a large number of files, especially image files. When these image files are uploaded to the object storage system, a large amount of network bandwidth is required, which puts huge pressure on the bandwidth of the transmission network, and the transmission time is too long. long, and even lead to network paralysis.
由此可见,如何降低传输网络的压力,提高传输效率是本领域技术人员亟待解决地问题。It can be seen that how to reduce the pressure on the transmission network and improve the transmission efficiency is an urgent problem to be solved by those skilled in the art.
发明内容Contents of the invention
本发明的目的是提供一种应用于对象存储系统的文件传输方法及装置,用于降低传输网络的压力,提高传输效率。The purpose of the present invention is to provide a file transmission method and device applied to an object storage system, which is used to reduce the pressure on the transmission network and improve transmission efficiency.
为解决上述技术问题,本发明提供一种应用于对象存储系统的文件传输方法,包括:In order to solve the above technical problems, the present invention provides a file transfer method applied to an object storage system, including:
遍历待上传文件,筛选出具有目标后缀名的第一目标文件,其中,所述目标后缀名为jpg/jpeg;Traversing the files to be uploaded, filtering out the first target file with the target suffix name, wherein the target suffix name is jpg/jpeg;
利用lepton压缩工具将所述第一目标文件进行压缩得到压缩文件;Using the lepton compression tool to compress the first target file to obtain a compressed file;
将所述压缩文件和其余待上传文件传输至对象存储系统。The compressed file and other files to be uploaded are transmitted to the object storage system.
优选地,还包括:Preferably, it also includes:
在所述压缩文件传输完成后,对所述压缩文件添加压缩标志。After the transmission of the compressed file is completed, a compression mark is added to the compressed file.
优选地,在筛选出具有目标后缀名的第一目标文件之前,还包括:Preferably, before filtering out the first target file with the target suffix name, it also includes:
判断全部所述待上传文件所占的存储空间和当前网络带宽的关系是否满足预设关系;Judging whether the relationship between the storage space occupied by all the files to be uploaded and the current network bandwidth satisfies the preset relationship;
如果是,则进入筛选出具有目标后缀名的第一目标文件的步骤。If yes, then enter the step of filtering out the first target file with the target suffix name.
优选地,所述将所述压缩文件和其余待上传文件传输至对象存储系统具体包括:Preferably, the transferring the compressed file and other files to be uploaded to the object storage system specifically includes:
对各所述压缩文件所占的存储空间和各所述其余待上传文件所占的存储空间进行排序;Sorting the storage space occupied by each of the compressed files and the storage space occupied by the remaining files to be uploaded;
按照由小到大的顺序将所述压缩文件和所述其余待上传文件传输所述对象存储系统。The compressed file and the remaining files to be uploaded are transmitted to the object storage system in ascending order.
优选地,其特征在于,还包括:Preferably, it is characterized in that it also includes:
在获取到用户的下载指令后,根据所述下载指令将所述对象存储系统中的待下载文件传输至客户端;After obtaining the user's download instruction, transmit the file to be downloaded in the object storage system to the client according to the download instruction;
遍历所述待下载文件,筛选出具有所述目标后缀名的第二目标文件;Traversing the files to be downloaded, filtering out the second target file with the target suffix name;
判断所述第二目标文件是否经过压缩;judging whether the second target file is compressed;
如果是,则利用所述lepton压缩工具将所述第二目标文件进行解压得到解压文件。If so, using the lepton compression tool to decompress the second target file to obtain a decompressed file.
为解决上述技术问题,本发明还提供一种应用于对象存储系统的文件传输装置,包括:In order to solve the above technical problems, the present invention also provides a file transfer device applied to an object storage system, including:
第一遍历模块,用于遍历待上传文件,筛选出具有目标后缀名的第一目标文件,其中,所述目标后缀名为jpg/jpeg;The first traversal module is used to traverse the files to be uploaded and filter out the first target file with the target suffix name, wherein the target suffix name is jpg/jpeg;
压缩模块,用于利用lepton压缩工具将所述第一目标文件进行压缩得到压缩文件;A compression module, configured to compress the first target file using a lepton compression tool to obtain a compressed file;
上传模块,用于将所述压缩文件和其余待上传文件传输至对象存储系统。An upload module, configured to transmit the compressed file and other files to be uploaded to the object storage system.
优选地,还包括:Preferably, it also includes:
添加模块,用于在所述压缩文件传输完成后,对所述压缩文件添加压缩标志。The adding module is used for adding a compression mark to the compressed file after the transmission of the compressed file is completed.
优选地,还包括:Preferably, it also includes:
第一判断模块,用于判断全部所述待上传文件所占的存储空间和当前网络带宽的关系是否满足预设关系;The first judging module is used to judge whether the relationship between the storage space occupied by all the files to be uploaded and the current network bandwidth satisfies the preset relationship;
如果是,则触发所述第一遍历模块执行筛选出具有目标后缀名的第一目标文件的步骤。If so, trigger the first traversal module to perform the step of filtering out the first target file with the target suffix name.
优选地,所述上传模块具体包括:Preferably, the upload module specifically includes:
排序单元,用于对各所述压缩文件所占的存储空间和各所述其余待上传文件所占的存储空间进行排序;A sorting unit, configured to sort the storage space occupied by each of the compressed files and the storage space occupied by each of the remaining files to be uploaded;
传输单元,用于按照由小到大的顺序将所述压缩文件和所述其余待上传文件传输所述对象存储系统。A transmission unit, configured to transmit the compressed file and the remaining files to be uploaded to the object storage system in ascending order.
优选地,还包括:Preferably, it also includes:
下载模块,用于在获取到用户的下载指令后,根据所述下载指令将所述对象存储系统中的待下载文件传输至客户端;A download module, configured to transmit the file to be downloaded in the object storage system to the client according to the download instruction after obtaining the user's download instruction;
第二遍历模块,用于遍历所述待下载文件,筛选出具有所述目标后缀名的第二目标文件;The second traversal module is used to traverse the files to be downloaded and filter out the second target files with the target suffix name;
第二判断模块,用于判断所述第二目标文件是否经过压缩;A second judging module, configured to judge whether the second target file has been compressed;
解压模块,用于在所述第二判断模块的判断结果为是的情况下,利用所述lepton压缩工具将所述第二目标文件进行解压得到解压文件。The decompression module is configured to use the lepton compression tool to decompress the second target file to obtain a decompressed file when the judgment result of the second judgment module is yes.
本发明所提供的应用于对象存储系统的文件传输方法,通过lepton压缩工具对第一目标文件进行压缩得到压缩文件,使得在向对象存储系统上传文件时,一部分文件是经过压缩过的,因此,能够大幅度减少网络传输数据所需的带宽,提高JPEG图像数据的传输速率。此外,本发明所提供的应用于对象存储系统的文件传输装置,亦具有上述效果。In the file transfer method applied to the object storage system provided by the present invention, the lepton compression tool is used to compress the first target file to obtain a compressed file, so that when the file is uploaded to the object storage system, a part of the file is compressed. Therefore, It can greatly reduce the bandwidth required for network transmission data and increase the transmission rate of JPEG image data. In addition, the file transmission device applied to the object storage system provided by the present invention also has the above effects.
附图说明Description of drawings
为了更清楚地说明本发明实施例,下面将对实施例中所需要使用的附图做简单的介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the embodiments of the present invention more clearly, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. As far as people are concerned, other drawings can also be obtained based on these drawings on the premise of not paying creative work.
图1为本发明实施例提供的一种应用于对象存储系统的文件传输方法的流程图;FIG. 1 is a flow chart of a file transfer method applied to an object storage system provided by an embodiment of the present invention;
图2为本发明实施例提供的另一种应用于对象存储系统的文件传输方法的流程图;FIG. 2 is a flowchart of another file transfer method applied to an object storage system provided by an embodiment of the present invention;
图3为本发明实施例提供的一种应用于对象存储系统的文件传输装置的结构图。FIG. 3 is a structural diagram of a file transfer device applied to an object storage system according to an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下,所获得的所有其他实施例,都属于本发明保护范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
本发明的核心是提供一种应用于对象存储系统的文件传输方法及装置,用于降低传输网络的压力,提高传输效率。The core of the present invention is to provide a file transmission method and device applied to an object storage system, which is used to reduce the pressure on the transmission network and improve transmission efficiency.
为了使本技术领域的人员更好地理解本发明方案,下面结合附图和具体实施方式对本发明作进一步的详细说明。In order to enable those skilled in the art to better understand the solution of the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
图1为本发明实施例提供的一种应用于对象存储系统的文件传输方法的流程图。如图1所示,应用于对象存储系统的文件传输方法包括:FIG. 1 is a flow chart of a file transfer method applied to an object storage system provided by an embodiment of the present invention. As shown in Figure 1, the file transfer methods applied to the object storage system include:
S10:遍历待上传文件,筛选出具有目标后缀名的第一目标文件,其中,目标后缀名为jpg/jpeg。S10: traverse the files to be uploaded, and filter out the first target file with the target suffix, wherein the target suffix is jpg/jpeg.
可以理解的是,待上传文件的类型有很多种,例如数据型的文件,图像型的文件等。尤其是图像型文件,在传输过程中会占用大量的网络带宽,导致传输时间过程,传输效率低的问题。本实施例中,将目标后缀名为jpg/jpeg的文件从待上传文件中筛选出来作为第一目标文件。It can be understood that there are many types of files to be uploaded, such as data-type files, image-type files, and the like. Especially for image-type files, a large amount of network bandwidth will be occupied during the transmission process, resulting in the problem of low transmission time and low transmission efficiency. In this embodiment, the file with the target suffix name jpg/jpeg is selected from the files to be uploaded as the first target file.
S11:利用lepton压缩工具将第一目标文件进行压缩得到压缩文件。S11: Using the lepton compression tool to compress the first target file to obtain a compressed file.
为了降低传输的数据量,本实施例采用lepton压缩工具实现文件的压缩。lepton压缩工具是Dropbox公司提供的一种开源压缩工具,能够对具有后缀名为jpg/jpeg的图像进行压缩,该压缩工具对JPEG图像的平均压缩率为22%,从而大幅度减少网络传输数据所需的带宽,提高JPEG图像数据的传输速率。In order to reduce the amount of data to be transmitted, this embodiment adopts the lepton compression tool to realize file compression. The lepton compression tool is an open source compression tool provided by Dropbox, which can compress images with the suffix jpg/jpeg. The average compression rate of the compression tool for JPEG images is 22%, thus greatly reducing the network transmission data. The required bandwidth increases the transfer rate of JPEG image data.
S12:将压缩文件和其余待上传文件传输至对象存储系统。S12: Transfer the compressed file and other files to be uploaded to the object storage system.
可以理解的是,其余待上传文件不需要压缩,因此会直接传输给上传线程池进行上传,当第一目标文件经过压缩后形成压缩文件,此时,该压缩文件可以直接传输给上传线程池进行上传。It is understandable that the remaining files to be uploaded do not need to be compressed, so they will be directly transmitted to the upload thread pool for uploading. When the first target file is compressed to form a compressed file, at this time, the compressed file can be directly transmitted to the upload thread pool for processing. upload.
作为一种优选地实施方式,S12具体包括:As a preferred implementation manner, S12 specifically includes:
对各压缩文件所占的存储空间和各其余待上传文件所占的存储空间进行排序;Sort the storage space occupied by each compressed file and the storage space occupied by the remaining files to be uploaded;
按照由小到大的顺序将压缩文件和其余待上传文件传输对象存储系统。Transfer the compressed file and other files to be uploaded to the object storage system in ascending order.
可以理解的是,所占的存储空间越小,则所需的传输时间就会越短,按照所占的存储空间进行排列上传,有助于在确定的时间范围内,传输较多的文件。例如,传输过程中,网络突然瘫痪,则前期传输的文件所占的存储空间越小,对象存储系统中获得的文件数量就会越多。It is understandable that the smaller the occupied storage space is, the shorter the required transmission time will be. Arranging and uploading according to the occupied storage space helps to transfer more files within a certain time range. For example, if the network suddenly crashes during the transfer process, the smaller the storage space occupied by the files transferred earlier, the more files will be obtained in the object storage system.
本实施例提供的应用于对象存储系统的文件传输方法,通过lepton压缩工具对第一目标文件进行压缩得到压缩文件,使得在向对象存储系统上传文件时,一部分文件是经过压缩过的,因此,能够大幅度减少网络传输数据所需的带宽,提高JPEG图像数据的传输速率。The file transfer method applied to the object storage system provided in this embodiment uses the lepton compression tool to compress the first target file to obtain a compressed file, so that when uploading files to the object storage system, some files are compressed. Therefore, It can greatly reduce the bandwidth required for network transmission data and increase the transmission rate of JPEG image data.
图2为本发明实施例提供的另一种应用于对象存储系统的文件传输方法的流程图。如图2所示,作为一种优选地实施方式,还包括:FIG. 2 is a flowchart of another file transfer method applied to an object storage system provided by an embodiment of the present invention. As shown in Figure 2, as a preferred embodiment, it also includes:
S20:在压缩文件传输完成后,对压缩文件添加压缩标志。S20: Add a compression mark to the compressed file after the transmission of the compressed file is completed.
由于对象存储系统中存储有大量的文件,而这些文件不仅类型不同,而且同一类型的文件中,可能有的经过了压缩,有的没有经过压缩。为了便于区别,本实施例中对经过压缩的文件添加压缩标志。在此基础上,可以通过判断文件是否有压缩标志来确定该文件是否被压缩过。Because there are a large number of files stored in the object storage system, and these files are not only of different types, but also some of the files of the same type may be compressed, and some may not be compressed. In order to facilitate the distinction, in this embodiment, a compression mark is added to the compressed file. On this basis, it can be determined whether the file has been compressed by judging whether the file has a compression flag.
作为一种优选地实施方式,在筛选出具有目标后缀名的第一目标文件之前,还包括:As a preferred implementation, before filtering out the first target file with the target suffix name, it also includes:
判断全部待上传文件所占的存储空间和当前网络带宽的关系是否满足预设关系;Determine whether the relationship between the storage space occupied by all files to be uploaded and the current network bandwidth satisfies the preset relationship;
如果是,则进入筛选出具有目标后缀名的第一目标文件的步骤。If yes, then enter the step of filtering out the first target file with the target suffix name.
在具体实施中,如果当前网络带宽足够,且待上传文件所占的存储空间均很小,则这种情况下,就无需对第一目标文件进行压缩,这是因为,压缩的过程也需要时间,而在网络带宽足够的情况下,该时间有可能就能完成对第一目标文件的传输。In a specific implementation, if the current network bandwidth is sufficient and the storage space occupied by the files to be uploaded is small, then in this case, there is no need to compress the first target file, because the compression process also takes time , and if the network bandwidth is sufficient, the transmission of the first target file may be completed within this time.
因此,本实施例中,首先判断全部待上传文件所占的存储空间从而确定所需的网络带宽,通过所需的网络带宽和当前网络带宽的关系就可以确定出是否有必要对第一目标文件压缩。可以理解的是,预设关系需要预先确定,至于预设关系的具体内容,本实施例不再赘述。Therefore, in this embodiment, at first judge the storage space occupied by all the files to be uploaded to determine the required network bandwidth, through the relationship between the required network bandwidth and the current network bandwidth, it can be determined whether it is necessary to upload the first target file compression. It can be understood that the preset relationship needs to be determined in advance, and the specific content of the preset relationship will not be repeated in this embodiment.
如图2所示,作为一种优选地实施方式,还包括:As shown in Figure 2, as a preferred embodiment, it also includes:
S21:在获取到用户的下载指令后,根据下载指令将对象存储系统中的待下载文件传输至客户端。S21: After obtaining the user's download instruction, transmit the file to be downloaded in the object storage system to the client according to the download instruction.
S22:遍历待下载文件,筛选出具有目标后缀名的第二目标文件。S22: traverse the files to be downloaded, and filter out the second target file with the target suffix name.
S23:判断第二目标文件是否经过压缩,如果是,进入S24。S23: Determine whether the second target file has been compressed, and if so, proceed to S24.
S24:利用lepton压缩工具将第二目标文件进行解压得到解压文件。S24: Using the lepton compression tool to decompress the second target file to obtain a decompressed file.
文件的传输可以为上传,也可以为下载,上文中步骤S10-S12为上传过程,而步骤S21-S22实现下载过程。可以理解的是,待下载文件与待上传文件可以是完全相同,也可以是完全不同,也可以是部分相同,因此,第二目标文件与第一目标文件也可以是完全相同,也可以是完全不同,也可以是部分相同。通过下载和解压可以将对应的文件从对象存储系统传输至客户端。The transmission of files can be uploaded or downloaded. Steps S10-S12 above are the uploading process, while steps S21-S22 realize the downloading process. It can be understood that the file to be downloaded and the file to be uploaded can be completely the same, completely different, or partly the same, therefore, the second target file can also be completely the same as the first target file, or can be completely different, or partly the same. The corresponding files can be transferred from the object storage system to the client by downloading and decompressing.
在上文中对于由于应用于对象存储系统的文件传输方法对应实施例进行了详细的描述,本发明还提供一种应用于对象存储系统的文件传输装置。由于装置部分的实施例与方法部分的实施例相互对应,因此装置部分的实施例请参见方法部分的实施例的描述,这里暂不赘述。In the foregoing, the corresponding embodiments of the file transfer method applied to the object storage system are described in detail, and the present invention also provides a file transfer device applied to the object storage system. Since the embodiment of the device part corresponds to the embodiment of the method part, please refer to the description of the embodiment of the method part for the embodiment of the device part, and details will not be repeated here.
图3为本发明实施例提供的一种应用于对象存储系统的文件传输装置的结构图。如图3所示,包括:FIG. 3 is a structural diagram of a file transfer device applied to an object storage system according to an embodiment of the present invention. As shown in Figure 3, including:
第一遍历模块10,用于遍历待上传文件,筛选出具有目标后缀名的第一目标文件,其中,目标后缀名为jpg/jpeg;The first traversal module 10 is used to traverse the files to be uploaded, and filter out the first target file with the target suffix name, wherein the target suffix name is jpg/jpeg;
压缩模块11,用于利用lepton压缩工具将第一目标文件进行压缩得到压缩文件;Compression module 11 is used to utilize lepton compression tool to compress the first target file to obtain a compressed file;
上传模块12,用于将压缩文件和其余待上传文件传输至对象存储系统。The upload module 12 is configured to transmit the compressed file and other files to be uploaded to the object storage system.
本实施例提供的应用于对象存储系统的文件传输装置,通过lepton压缩工具对第一目标文件进行压缩得到压缩文件,使得在向对象存储系统上传文件时,一部分文件是经过压缩过的,因此,能够大幅度减少网络传输数据所需的带宽,提高JPEG图像数据的传输速率。The file transfer device applied to the object storage system provided in this embodiment uses the lepton compression tool to compress the first target file to obtain a compressed file, so that when uploading files to the object storage system, some files are compressed. Therefore, It can greatly reduce the bandwidth required for network transmission data and increase the transmission rate of JPEG image data.
作为一种优选地实施方式,还包括:As a preferred embodiment, it also includes:
添加模块,用于在压缩文件传输完成后,对压缩文件添加压缩标志。Add a module for adding a compression flag to the compressed file after the compressed file transfer is completed.
作为一种优选地实施方式,还包括:As a preferred embodiment, it also includes:
第一判断模块,用于判断全部待上传文件所占的存储空间和当前网络带宽的关系是否满足预设关系;The first judging module is used to judge whether the relationship between the storage space occupied by all the files to be uploaded and the current network bandwidth satisfies the preset relationship;
如果是,则触发第一遍历模块执行筛选出具有目标后缀名的第一目标文件的步骤。If yes, the first traversal module is triggered to perform the step of filtering out the first target file with the target suffix name.
作为一种优选地实施方式,上传模块具体包括:As a preferred implementation, the upload module specifically includes:
排序单元,用于对各压缩文件所占的存储空间和各其余待上传文件所占的存储空间进行排序;A sorting unit, configured to sort the storage space occupied by each compressed file and the storage space occupied by the remaining files to be uploaded;
传输单元,用于按照由小到大的顺序将压缩文件和其余待上传文件传输对象存储系统。The transfer unit is configured to transfer the compressed file and other files to be uploaded to the object storage system in ascending order.
作为一种优选地实施方式,还包括:As a preferred embodiment, it also includes:
下载模块,用于在获取到用户的下载指令后,根据下载指令将对象存储系统中的待下载文件传输至客户端;The download module is used to transmit the file to be downloaded in the object storage system to the client according to the download instruction after obtaining the download instruction from the user;
第二遍历模块,用于遍历待下载文件,筛选出具有目标后缀名的第二目标文件;The second traversal module is used to traverse the files to be downloaded and filter out the second target files with the target suffix name;
第二判断模块,用于判断第二目标文件是否经过压缩;The second judging module is used to judge whether the second target file is compressed;
解压模块,用于在第二判断模块的判断结果为是的情况下,利用lepton压缩工具将第二目标文件进行解压得到解压文件。The decompression module is configured to use the lepton compression tool to decompress the second target file to obtain the decompressed file when the judgment result of the second judgment module is yes.
以上对本发明所提供的应用于对象存储系统的文件传输方法及装置进行了详细介绍。说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。The file transfer method and device applied to the object storage system provided by the present invention have been introduced in detail above. Each embodiment in the description is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and for the related part, please refer to the description of the method part. It should be pointed out that for those skilled in the art, without departing from the principle of the present invention, some improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that in this specification, relative terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations There is no such actual relationship or order between the operations. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710500049.7A CN107071073A (en) | 2017-06-27 | 2017-06-27 | A kind of document transmission method and device applied to object storage system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710500049.7A CN107071073A (en) | 2017-06-27 | 2017-06-27 | A kind of document transmission method and device applied to object storage system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN107071073A true CN107071073A (en) | 2017-08-18 |
Family
ID=59613335
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710500049.7A Pending CN107071073A (en) | 2017-06-27 | 2017-06-27 | A kind of document transmission method and device applied to object storage system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107071073A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110266814A (en) * | 2019-07-09 | 2019-09-20 | 联想(北京)有限公司 | Transmission method and transmitting device |
| CN113259424A (en) * | 2021-04-29 | 2021-08-13 | 西安点告网络科技有限公司 | Cross-regional data transmission method and system |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101552652A (en) * | 2009-05-13 | 2009-10-07 | 北京交大思源科技有限公司 | A document transmission method and transmission device |
| EP2501109A2 (en) * | 2011-03-08 | 2012-09-19 | Rackspace Us, Inc. | Massively scalable object storage system |
| CN103457910A (en) * | 2012-05-29 | 2013-12-18 | 腾讯科技(深圳)有限公司 | Method and terminal for uploading files |
| CN103677673A (en) * | 2013-12-23 | 2014-03-26 | Tcl集团股份有限公司 | Method and system for uploading files in classifying and batching mode |
| CN103873860A (en) * | 2014-03-18 | 2014-06-18 | 深信服网络科技(深圳)有限公司 | Document transmission method and device |
| CN104506381A (en) * | 2014-12-16 | 2015-04-08 | 新余兴邦信息产业有限公司 | Method and device for monitoring file uploading through instrument |
| CN105208065A (en) * | 2014-06-24 | 2015-12-30 | 腾讯科技(深圳)有限公司 | File transmitting method and device |
| CN105227649A (en) * | 2015-09-21 | 2016-01-06 | 北京金山安全软件有限公司 | File transmission method and device |
| CN106341482A (en) * | 2016-09-22 | 2017-01-18 | 江苏赞奇科技股份有限公司 | Cloud rendering mixed compression transmission system and method based on file type |
-
2017
- 2017-06-27 CN CN201710500049.7A patent/CN107071073A/en active Pending
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101552652A (en) * | 2009-05-13 | 2009-10-07 | 北京交大思源科技有限公司 | A document transmission method and transmission device |
| EP2501109A2 (en) * | 2011-03-08 | 2012-09-19 | Rackspace Us, Inc. | Massively scalable object storage system |
| CN103457910A (en) * | 2012-05-29 | 2013-12-18 | 腾讯科技(深圳)有限公司 | Method and terminal for uploading files |
| CN103677673A (en) * | 2013-12-23 | 2014-03-26 | Tcl集团股份有限公司 | Method and system for uploading files in classifying and batching mode |
| CN103873860A (en) * | 2014-03-18 | 2014-06-18 | 深信服网络科技(深圳)有限公司 | Document transmission method and device |
| CN105208065A (en) * | 2014-06-24 | 2015-12-30 | 腾讯科技(深圳)有限公司 | File transmitting method and device |
| CN104506381A (en) * | 2014-12-16 | 2015-04-08 | 新余兴邦信息产业有限公司 | Method and device for monitoring file uploading through instrument |
| CN105227649A (en) * | 2015-09-21 | 2016-01-06 | 北京金山安全软件有限公司 | File transmission method and device |
| CN106341482A (en) * | 2016-09-22 | 2017-01-18 | 江苏赞奇科技股份有限公司 | Cloud rendering mixed compression transmission system and method based on file type |
Non-Patent Citations (2)
| Title |
|---|
| JMPPOK: "是否需要对网络传输数据进行压缩?如何选择压缩算法?", 《HTTP://BLOG.CSDN.NET/JMPPOK/ARTICLE/DETAILS/38121115》 * |
| SHELLDON: "JPEG系列四 JPEG图像压缩优化", 《HTTPS://BLOG.CSDN.NET/SHELLDON/ARTICLE/DETAILS/54234436》 * |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110266814A (en) * | 2019-07-09 | 2019-09-20 | 联想(北京)有限公司 | Transmission method and transmitting device |
| CN113259424A (en) * | 2021-04-29 | 2021-08-13 | 西安点告网络科技有限公司 | Cross-regional data transmission method and system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN103677673B (en) | The method and system that a kind of document classification batch uploads | |
| CN108028833B (en) | A method, system and related equipment for NAS data access | |
| CN106445951B (en) | File transmission method and device | |
| CN105339924A (en) | Efficient data compression and analysis as a service | |
| US9398117B2 (en) | Protocol data unit interface | |
| US10250670B2 (en) | Streaming zip | |
| US10341433B2 (en) | Copy and paste between devices | |
| JP6464587B2 (en) | Information processing system, information processing apparatus, information transmission method, and program | |
| CN112243506B (en) | Data processing system and method | |
| US10540325B2 (en) | Method and device for identifying junk picture files | |
| CN102693297A (en) | Data processing method, node and ETL (extract transform and load) system | |
| CN105721526B (en) | The synchronous method and device of a kind of terminal, server file | |
| CN106020722A (en) | Method, device and system for deduplication of repeated data of cloud storage system | |
| CN112650710B (en) | Sending method and device for data migration, storage medium, and electronic device | |
| CN109325006A (en) | A method and device for compressing and storing, and a method and device for decompressing and downloading | |
| CN105446975A (en) | File packing method and device | |
| CN103414762B (en) | cloud backup method and device | |
| CN107071073A (en) | A kind of document transmission method and device applied to object storage system | |
| CN105069009A (en) | Folder uploading/downloading method and device | |
| US20140222772A1 (en) | Storage system and methods for time continuum data retrieval | |
| CN106210146A (en) | File loading method based on B/S framework, device, server and system | |
| CN105227661A (en) | Sharing files method and system, server | |
| CN104301438A (en) | File uploading method | |
| CN103716374A (en) | Method for sharing files and server | |
| CN104202233B (en) | A kind of information interacting method, terminal, server and system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170818 |