WO2022148299A1 - 一种文件传输方法、装置、设备及存储介质 - Google Patents

一种文件传输方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2022148299A1
WO2022148299A1 PCT/CN2021/143263 CN2021143263W WO2022148299A1 WO 2022148299 A1 WO2022148299 A1 WO 2022148299A1 CN 2021143263 W CN2021143263 W CN 2021143263W WO 2022148299 A1 WO2022148299 A1 WO 2022148299A1
Authority
WO
WIPO (PCT)
Prior art keywords
transmission
file
rate
target
transmission channel
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.)
Ceased
Application number
PCT/CN2021/143263
Other languages
English (en)
French (fr)
Inventor
徐如庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Wave Intelligent Technology Co Ltd
Original Assignee
Suzhou Wave Intelligent Technology Co Ltd
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 Suzhou Wave Intelligent Technology Co Ltd filed Critical Suzhou Wave Intelligent Technology Co Ltd
Priority to US18/033,460 priority Critical patent/US11792258B1/en
Publication of WO2022148299A1 publication Critical patent/WO2022148299A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • 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/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/16Central resource management; Negotiation of resources or communication parameters, e.g. negotiating bandwidth or QoS [Quality of Service]
    • H04W28/18Negotiating wireless communication parameters
    • H04W28/22Negotiating communication rate

Definitions

  • the present application relates to the field of computer communication, and in particular, to a file transmission method, apparatus, device and storage medium.
  • AI Artificial Intelligence
  • Artificial Intelligence is a technology that uses machines to simulate human cognitive ability. Artificial intelligence is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence.
  • the purpose of this application is to provide a file transmission method, device, device and storage medium to ensure the stability of server operation during the file transmission process.
  • the present application provides a file transmission method, including:
  • the preset transmission peak rate is less than or equal to the rated maximum transmission rate of the transmission channel;
  • transfer the target file in the transfer channel including:
  • the target file is transferred in units of data blocks in the transfer channel.
  • the target file is transmitted in units of data blocks in the transmission channel, including:
  • the target file is transferred in the unit of data blocks of the untransferred portion of the target file in the transfer channel.
  • the method further includes:
  • the method before counting the number of files of the target files transmitted in the transmission channel, the method further includes:
  • the step of counting the number of files of the target files transmitted in the transmission channel is performed.
  • a file transmission device comprising:
  • the quantity statistics module is used to count the number of target files transmitted in the transmission channel
  • a peak rate acquisition module configured to acquire the preset transmission peak rate of the transmission channel; wherein, the preset transmission peak rate is less than or equal to the rated maximum transmission rate of the transmission channel;
  • the average rate calculation module is used to calculate the average rate according to the number of files and the preset transmission peak rate
  • the rate adjustment module is used to adjust the transmission rate of the target file in the transmission channel to the average rate
  • the channel transmission module is used to transmit the target file in the transmission channel.
  • the channel transmission module includes:
  • the data block transmission module is used to transmit the target file in the unit of data block in the transmission channel.
  • a data block transmission module including:
  • the data volume statistics module is used to count the target data volume corresponding to the untransmitted part of the data block in the target file
  • the capacity judgment module is used to judge whether the target data amount is less than or equal to the preset data capacity, and if so, call the transmission sub-module;
  • the transmission sub-module is used to transmit the target file in the unit of the data block of the untransmitted part of the target file in the transmission channel.
  • a file transmission device including:
  • the processor is configured to implement the steps of the above-mentioned file transmission method when executing the computer program.
  • the present application also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned file transmission method are implemented.
  • the file transmission method provided by the present application firstly counts the number of files of the target file transmitted in the transmission channel, and obtains the preset transmission peak rate of the transmission channel, wherein the preset transmission peak rate is less than or equal to the rated maximum transmission rate of the transmission channel.
  • the average rate is calculated according to the number of files and the preset transmission peak rate, and the transmission rate of the target file in the transmission channel is adjusted to the average rate, and then the target file is transmitted in the transmission channel. Since the method presets the maximum rate of the transmission channel in the process of transmitting data, that is, the preset transmission peak rate, and the preset transmission peak rate is less than or equal to the rated maximum transmission rate of the transmission channel, the preset transmission peak rate of the transmission channel is then set.
  • the rate is evenly allocated to the target document for occupation, which relatively ensures that the resources occupied by the target document during transmission are controllable as a whole, and do not exceed the rated maximum resources of the server, which relatively ensures the stability of the server operation during the file transmission process.
  • the present application also provides a file transmission device, equipment and storage medium, the beneficial effects are the same as those described above.
  • FIG. 1 is a flowchart of a file transmission method disclosed in an embodiment of the present application.
  • FIG. 2 is a flowchart of a specific file transmission method disclosed in an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of a file transmission apparatus disclosed in an embodiment of the present application.
  • the core of this application is to provide a file transfer method to ensure the stability of the server operation during the file transfer process.
  • an embodiment of the present application discloses a file transmission method, including:
  • Step S10 Count the number of files of the target files transmitted in the transmission channel.
  • the target file in this embodiment refers to a file that needs to be transferred.
  • the file in this embodiment refers to a collection composed of data, and the type of the file can be used in artificial intelligence scenarios.
  • the data set file for model training can also be the file to be backed up that is uploaded to the cloud during cloud backup.
  • the number of files of the target files transmitted in the transmission channel is first counted, and the purpose is to allocate the resource occupation of each target file in the transmission channel according to the number of target files in the subsequent steps.
  • Step S11 Acquire the preset transmission peak rate of the transmission channel.
  • the preset peak transmission rate is less than or equal to the rated maximum transmission rate of the transmission channel.
  • this step further obtains the preset transmission peak rate of the transmission channel, and the preset transmission peak rate in this step refers to the artificially specified transmission channel in the process of data transmission.
  • the maximum allowable rate, and the rated maximum transmission rate refers to the theoretical maximum transmission rate that can be achieved by the transmission channel affected by the communication resources and computing resources in the server device.
  • the key point in this embodiment is that the preset peak transmission rate is less than or equal to the rated maximum transmission rate of the transmission channel, the purpose is to avoid excessive occupation of communication resources and computing resources in the server device when the file is transmitted based on the transmission channel, thereby ensuring that the server stable operation of the equipment.
  • Step S12 Calculate the average rate according to the number of files and the preset transmission peak rate.
  • this step After counting the number of files of the target files transmitted in the transmission channel and obtaining the preset transmission peak rate of the transmission channel, this step further calculates the average rate according to the number of files and the preset transmission peak rate.
  • the average rate is obtained by calculating the quotient between the preset transmission peak rate and the number of files, and represents the transmission rate assigned to each target file when the preset transmission peak rate is evenly allocated to each target file.
  • Step S13 Adjust the transmission rate of the target file in the transmission channel to an average rate.
  • this step further adjusts the transmission rate of the target file in the transmission channel to the average rate, in order to control the transmission rate of each target file in the transmission channel to be equally divided into the transmission channel.
  • Step S14 Transmit the target file in the transmission channel.
  • this step further transmits the target file in the transmission channel based on the average rate occupied by each target file in the transmission channel.
  • This embodiment achieves the technical purpose of dynamically adjusting the transmission rate used in the transmission of the target files according to the overall quantity of the target files.
  • the file transmission method provided by the present application firstly counts the number of files of the target file transmitted in the transmission channel, and obtains the preset transmission peak rate of the transmission channel, wherein the preset transmission peak rate is less than or equal to the rated maximum transmission rate of the transmission channel.
  • the average rate is calculated according to the number of files and the preset transmission peak rate, and the transmission rate of the target file in the transmission channel is adjusted to the average rate, and then the target file is transmitted in the transmission channel. Since the method presets the maximum rate of the transmission channel in the process of transmitting data, that is, the preset transmission peak rate, and the preset transmission peak rate is less than or equal to the rated maximum transmission rate of the transmission channel, the preset transmission peak rate of the transmission channel is then set.
  • the rate is evenly allocated to the target document for occupation, which relatively ensures that the resources occupied by the target document during transmission are controllable as a whole, and do not exceed the rated maximum resources of the server, which relatively ensures the stability of the server operation during the file transmission process.
  • transmitting the target file in the transmission channel includes:
  • the target file is transferred in units of data blocks in the transfer channel.
  • the target file is transmitted in the transmission channel, specifically, the data block is used as the transmission unit of the target file, that is, the target file is divided into data blocks, and the data blocks are transmitted block by block through the transmission channel, so as to achieve the The purpose of transferring the target file in the channel.
  • This embodiment further improves the transmission controllability of the process of transmitting the target file.
  • an embodiment of the present application discloses a file transmission method, including:
  • Step S20 Count the number of files of the target files transmitted in the transmission channel.
  • Step S21 Acquire the preset transmission peak rate of the transmission channel.
  • the preset peak transmission rate is less than or equal to the rated maximum transmission rate of the transmission channel.
  • Step S22 Calculate the average rate according to the number of files and the preset transmission peak rate.
  • Step S23 Adjust the transmission rate of the target file in the transmission channel to an average rate.
  • Step S24 Count the target data amount corresponding to the data blocks of the untransmitted part in the target file.
  • Step S25 Determine whether the target data volume is less than or equal to the preset data volume, and if so, perform Step S26.
  • Step S26 Transmit the target file in the unit of the data block of the untransmitted part in the target file in the transmission channel.
  • the purpose is to continue to transmit the data content with the target file as the transmission part in the transmission channel based on the average rate. Therefore, in this embodiment, the unit of data block is used in the transmission channel.
  • the target file In the process of transferring the target file, first count the target data volume corresponding to the data blocks in the untransmitted part of the target file, and then determine whether the target data volume is less than or equal to the preset data capacity, that is, whether the data volume of the data blocks in the target file is less than or equal to the data volume of the data block that can be transmitted per unit time of the transmission channel, the purpose is to determine whether the data block of the target file can be directly transmitted, and then when the target data volume is less than or equal to the preset data capacity, that is, the data block in the target file When the data volume is less than or equal to the data volume of the data blocks that can be transmitted by the transmission channel per unit time, the target file is transmitted in the transmission channel in units of data blocks of the untransmitted part of the target file. This embodiment further ensures the reliability of transmitting the target file in the unit of data block in the transmission channel.
  • the method when the target data volume is greater than the preset data volume, the method further includes:
  • this embodiment when the result of judging whether the target data volume is less than or equal to the preset data capacity is no, that is, when the target data volume is greater than the preset data capacity, this embodiment further records that the target file is not transmitted. Part of the data blocks are divided into sub-data blocks smaller than or equal to the preset data capacity, and the target file is transmitted in units of sub-data blocks. This embodiment ensures the reliability of transmitting the target file in units of data blocks in the transmission channel when the target data volume corresponding to the data blocks of the untransmitted part of the target file is greater than the preset data capacity.
  • the method before counting the number of files of the target files transmitted in the transmission channel, the method further includes:
  • the step of counting the number of files of the target files transmitted in the transmission channel is performed.
  • an embodiment of the present application provides a file transmission device, including:
  • the quantity statistics module 10 is used for counting the number of files of the target files transmitted in the transmission channel
  • the peak rate acquisition module 11 is used to acquire the preset transmission peak rate of the transmission channel; wherein, the preset transmission peak rate is less than or equal to the rated maximum transmission rate of the transmission channel;
  • an average rate calculation module 12 configured to calculate the average rate according to the number of files and the preset transmission peak rate
  • the rate adjustment module 13 is used to adjust the transmission rate of the target file in the transmission channel to an average rate
  • the channel transmission module 14 is used for transmitting the target file in the transmission channel.
  • the channel transmission module 14 includes:
  • the data block transmission module is used to transmit the target file in the unit of data block in the transmission channel.
  • the data block transmission module includes:
  • the data volume statistics module is used to count the target data volume corresponding to the untransmitted part of the data block in the target file
  • the capacity judgment module is used to judge whether the target data amount is less than or equal to the preset data capacity, and if so, call the transmission sub-module;
  • the transmission submodule is used to transmit the target file in the unit of the data block of the untransmitted part of the target file in the transmission channel.
  • the file transmission device provided by the present application firstly counts the number of files of the target file transmitted in the transmission channel, and obtains the preset transmission peak rate of the transmission channel, wherein the preset transmission peak rate is less than or equal to the rated maximum transmission rate of the transmission channel.
  • the average rate is calculated according to the number of files and the preset transmission peak rate, and the transmission rate of the target file in the transmission channel is adjusted to the average rate, and then the target file is transmitted in the transmission channel. Since the device is preset with the maximum rate of the transmission channel in the process of transmitting data, that is, the preset transmission peak rate, and the preset transmission peak rate is less than or equal to the rated maximum transmission rate of the transmission channel, the preset transmission peak rate of the transmission channel is then set.
  • the rate is evenly allocated to the target document for occupation, which relatively ensures that the resources occupied by the target document during transmission are controllable as a whole, and do not exceed the rated maximum resources of the server, which relatively ensures the stability of the server operation during the file transmission process.
  • a file transmission device including:
  • the processor is configured to implement the steps of the above-mentioned file transmission method when executing the computer program.
  • the file transmission device provided by the present application firstly counts the number of files of the target file transmitted in the transmission channel, and obtains the preset transmission peak rate of the transmission channel, wherein the preset transmission peak rate is less than or equal to the rated maximum transmission rate of the transmission channel.
  • the average rate is calculated according to the number of files and the preset transmission peak rate, and the transmission rate of the target file in the transmission channel is adjusted to the average rate, and then the target file is transmitted in the transmission channel. Since the device is preset with the maximum rate of the transmission channel in the process of transmitting data, that is, the preset transmission peak rate, and the preset transmission peak rate is less than or equal to the rated maximum transmission rate of the transmission channel, the preset transmission peak rate of the transmission channel is then set.
  • the rate is evenly allocated to the target document for occupation, which relatively ensures that the resources occupied by the target document during transmission are controllable as a whole, and do not exceed the rated maximum resources of the server, which relatively ensures the stability of the server operation during the file transmission process.
  • the present application also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned file transmission method are implemented.
  • the computer-readable storage medium provided by the present application firstly counts the number of files of the target files transmitted in the transmission channel, and obtains the preset transmission peak rate of the transmission channel, wherein the preset transmission peak rate is less than or equal to the rated transmission channel.
  • the maximum transmission rate is calculated, and the average rate is calculated according to the number of files and the preset transmission peak rate, and the transmission rate of the target file in the transmission channel is adjusted to the average rate, and then the target file is transmitted in the transmission channel.
  • the transmission channel The preset transmission peak rate is evenly allocated to the target document for occupation, which relatively ensures that the resources occupied by the target document transmission are controllable as a whole and do not exceed the rated maximum resources of the server, which relatively ensures the stability of the server operation during the file transmission process. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Quality & Reliability (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请公开了一种文件传输方法、装置、设备及存储介质。该方法的步骤包括:统计在传输信道中传输的目标文件的文件数量;获取传输信道的预设传输峰值速率;其中,预设传输峰值速率小于或等于传输信道的额定最大传输速率;根据文件数量以及预设传输峰值速率计算均值速率;将目标文件在传输信道中的传输速率调整为均值速率;在传输信道中传输目标文件。本方法相对确保了文件传输过程中服务器运行的稳定性。此外,本申请还提供一种文件传输装置、设备及存储介质,有益效果同上所述。

Description

一种文件传输方法、装置、设备及存储介质
本申请要求在2021年1月7日提交中国专利局、申请号为202110018431.0、发明名称为“一种文件传输方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机通信领域,特别是涉及一种文件传输方法、装置、设备及存储介质。
背景技术
人工智能,简称AI(Artificial Intelligence),是用机器来模拟人类认知能力的技术。人工智能是研究、开发用于模拟、延伸和扩展人的智能的理论、方法、技术及应用系统的一门新的技术科学。
由于人工智能的实现是基于具有特定数据特征的数据文件集作为样本数据,训练能够辨识该特征的模型,因此往往需要基于大量的数据集文件作为模型训练的基础,进而对于人工智能场景下的模型训练任务来说,数据集文件传输的重要性不言而喻,而在文件传输的过程中往往需要占用服务器的运算及通信资源,由于服务器中的资源往往有限,当前难以确保文件传输过程中服务器运行的稳定性。
由此可见,提供一种文件传输方法,以确保文件传输过程中服务器运行的稳定性,是本领域技术人员需要解决的问题。
发明内容
本申请的目的是提供一种文件传输方法、装置、设备及存储介质,以确保文件传输过程中服务器运行的稳定性。
为解决上述技术问题,本申请提供一种文件传输方法,包括:
统计在传输信道中传输的目标文件的文件数量;
获取传输信道的预设传输峰值速率;其中,预设传输峰值速率小于或等于传输信道的额定最大传输速率;
根据文件数量以及预设传输峰值速率计算均值速率;
将目标文件在传输信道中的传输速率调整为均值速率;
在传输信道中传输目标文件。
可选地,在传输信道中传输目标文件,包括:
在传输信道中以数据块为单位传输目标文件。
可选地,在传输信道中以数据块为单位传输目标文件,包括:
统计目标文件中未传输部分的数据块对应的目标数据量;
判断目标数据量是否小于或等于预设数据容量;
若是,则在传输信道中以目标文件中未传输部分的数据块为单位传输目标文件。
可选地,当目标数据量大于预设数据容量时,方法还包括:
将目标文件中未传输部分的数据块划分为小于或等于预设数据容量的子数据块;
以子数据块为单位传输目标文件。
可选地,在统计在传输信道中传输的目标文件的文件数量之前,方法还包括:
判断传输信道中目标文件的文件数量是否发生变化;
若是,则执行统计在传输信道中传输的目标文件的文件数量的步骤。
此外,本申请还提供一种文件传输装置,包括:
数量统计模块,用于统计在传输信道中传输的目标文件的文件数量;
峰值速率获取模块,用于获取传输信道的预设传输峰值速率;其中,预设传输峰值速率小于或等于传输信道的额定最大传输速率;
均值速率计算模块,用于根据文件数量以及预设传输峰值速率计算均值速率;
速率调整模块,用于将目标文件在传输信道中的传输速率调整为均值速率;
信道传输模块,用于在传输信道中传输目标文件。
可选地,信道传输模块,包括:
数据块传输模块,用于在传输信道中以数据块为单位传输目标文件。
可选地,数据块传输模块,包括:
数据量统计模块,用于统计目标文件中未传输部分的数据块对应的目标数据量;
容量判断模块,用于判断目标数据量是否小于或等于预设数据容量,若是,则调用传输子模块;
传输子模块,用于在传输信道中以目标文件中未传输部分的数据块为单位传输目标文件。
此外,本申请还提供一种文件传输设备,包括:
存储器,用于存储计算机程序;
处理器,用于执行计算机程序时实现如上述的文件传输方法的步骤。
此外,本申请还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现如上述的文件传输方法的步骤。
本申请所提供的文件传输方法,首先统计在传输信道中传输的目标文件的文件数量,并获取传输信道的预设传输峰值速率,其中,预设传输峰值速率小于或等于传输信道的额定最大传输速率,进而根据文件数量以及预设传输峰值速率计算均值速率,并将目标文件在该传输信道中的传输速率调整为均值速率,进而在传输信道中传输目标文件。由于本方法预先设置有传输信道在传输数据过程的速率最大值,即预设传输峰值速率,并且预设传输峰值速率小于或等于传输信道的额定最大传输速率,进而将传输信道的预设传输峰值速率平均分配至目标文档进行占用,以此相对确保了目标文档传输时占用的资源整体可控,并且不超过服务器的额定最大资源,相对确保了文件传输过程中服务器运行的稳定性。此外,本申请还提供一种文件传输装置、设备及存储介质,有益效果同上所述。
附图说明
为了更清楚地说明本申请实施例,下面将对实施例中所需要使用的附图做简单的介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例公开的一种文件传输方法的流程图;
图2为本申请实施例公开的一种具体的文件传输方法的流程图;
图3为本申请实施例公开的一种文件传输装置的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下,所获得的所有其他实施例,都属于本申请保护范围。
由于人工智能的实现是基于具有特定数据特征的数据文件集作为样本数据,训练能够辨识该特征的模型,因此往往需要基于大量的数据集文件作为模型训练的基础,进而对于人工智能场景下的模型训练任务来说,数据集文件传输的重要性不言而喻,而在文件传输的过程中往往需要占用服务器的运算及通信资源,由于服务器中的资源往往有限,当前难以确保文件传输过程中服务器运行的稳定性。
为此,本申请的核心是提供一种文件传输方法,以确保文件传输过程中服务器运行的稳定性。
为了使本技术领域的人员更好地理解本申请方案,下面结合附图和具体实施方式对本申请作进一步的详细说明。
请参见图1所示,本申请实施例公开了一种文件传输方法,包括:
步骤S10:统计在传输信道中传输的目标文件的文件数量。
需要说明的是,本实施方式中的目标文件指的是需要进行文件传输的文件,另外,本实施例中的文件指的是由数据构成的集合,文件的类型可以为人工智能场景中用于进行模型训练的数据集文件,也可以是在进行云端备份时上传至云端的待备份文件等,应根据实际传输场景而定,在此不做具体限定。
本步骤在进行文件传输时,首先统计传输信道中传输的目标文件的文件数量,目的是在后续步骤中,根据目标文件的数量分配各个目标文件对传输信道中资源的占用。
步骤S11:获取传输信道的预设传输峰值速率。
其中,预设传输峰值速率小于或等于传输信道的额定最大传输速率。
统计在传输信道中传输的目标文件的文件数量之后,本步骤进一步获取传输信道的预设传输峰值速率,本步骤中的预设传输峰值速率指的是人为规定的传输信道在进行数据传输过程中允许的最大速率,而额定最大传输速率指的是的受服务器设备中通信资源及运算资源共同影响的传输信道在理论上能够达到的最大传输速率。本实施例中的重点在于预设传输峰值速率小于或等于传输信道的额定最大传输速率,目的是避免在基于传输信道对文件进行传输时,过度占用服务器设备中通信资源及运算资源,进而确保服务器设备的稳定运行。
步骤S12:根据文件数量以及预设传输峰值速率计算均值速率。
在统计在传输信道中传输的目标文件的文件数量,并获取传输信道的预设传输峰值速率之后,本步骤进一步根据文件数量以及预设传输峰值速率计算均值速率。均值速率是通过预设传输峰值速率与文件数量进行商运算得到的,表征将预设传输峰值速率平均分配给每一个目标文件的情况下,每一个目标文件被分配的传输速率。
步骤S13:将目标文件在传输信道中的传输速率调整为均值速率。
在根据文件数量以及预设传输峰值速率计算均值速率之后,本步骤进一步将目标文件在传输信道中的传输速率调整为均值速率,目的是控制传输信道中各目标文件均分传输信道的传输速率。
步骤S14:在传输信道中传输目标文件。
在将目标文件在传输信道中的传输速率调整为均值速率之后,本步骤进一步基于传输信道中各目标文件占用的均值速率,在传输信道中传输目标文件。本实施例实现了根据目标文件的整体数量,对于目标文件传输时所使用的传输速率进行动态调整的技术目的。
本申请所提供的文件传输方法,首先统计在传输信道中传输的目标文件的文件数量,并获取传输信道的预设传输峰值速率,其中,预设传输峰值速率小于或等于传输信道的额定最大传输速率,进而根据文件数量以及预设传输峰值速率计算均值速率,并将目标文件在该传输信道中的传输速率调整为均值速率,进而在传输信道中传输目标文件。由于本方法预先设置有传输信道在传输数据过程的速率最大值,即预设传输峰值速率,并且预设传输峰值 速率小于或等于传输信道的额定最大传输速率,进而将传输信道的预设传输峰值速率平均分配至目标文档进行占用,以此相对确保了目标文档传输时占用的资源整体可控,并且不超过服务器的额定最大资源,相对确保了文件传输过程中服务器运行的稳定性。
在上述实施例的基础上,作为一种可选的实施方式,在传输信道中传输目标文件,包括:
在传输信道中以数据块为单位传输目标文件。
需要说明的,本实施方式在传输信道中传输目标文件,具体是以数据块作为目标文件的传输单位,即将目标文件划分为数据块,并通过传输信道逐块传输数据块,以此达到在传输信道中传输目标文件的目的。本实施方式进一步提高了传输目标文件过程的传输可控性。
请参见图2所示,本申请实施例公开了一种文件传输方法,包括:
步骤S20:统计在传输信道中传输的目标文件的文件数量。
步骤S21:获取传输信道的预设传输峰值速率。
其中,预设传输峰值速率小于或等于传输信道的额定最大传输速率。
步骤S22:根据文件数量以及预设传输峰值速率计算均值速率。
步骤S23:将目标文件在传输信道中的传输速率调整为均值速率。
步骤S24:统计目标文件中未传输部分的数据块对应的目标数据量。
步骤S25:判断目标数据量是否小于或等于预设数据容量,若是,则执行步骤S26。
步骤S26:在传输信道中以目标文件中未传输部分的数据块为单位传输目标文件。
由于将目标文件在传输信道中的传输速率调整为均值速率,目的是基于均值速率继续在传输信道中传输以目标文件为传输部分的数据内容,因此本实施例在传输信道中以数据块为单位传输目标文件的过程中,首先统计目标文件中未传输部分的数据块对应的目标数据量,进而判断目标数据量是否小于或等于预设数据容量,也就是目标文件中数据块的数据量是否小于或等于传输信道单位时间能够传输的数据块的数据量,目的是判定能否直接对目标 文件的数据块进行传输,进而当目标数据量小于或等于预设数据容量,即目标文件中数据块的数据量小于或等于传输信道单位时间能够传输的数据块的数据量时,在传输信道中以目标文件中未传输部分的数据块为单位传输目标文件。本实施例进一步确保了在传输信道中以数据块为单位传输目标文件的可靠性。
在上述实施例的基础上,作为一种可选的实施方式,当目标数据量大于预设数据容量时,方法还包括:
将目标文件中未传输部分的数据块划分为小于或等于预设数据容量的子数据块;
以子数据块为单位传输目标文件。
需要说明的是,在本实施方式中,当判断目标数据量是否小于或等于预设数据容量的结果为否,即目标数据量大于预设数据容量时,本实施方式进一步将目标文件中未传输部分的数据块划分为小于或等于预设数据容量的子数据块,并以子数据块为单位传输目标文件。本实施方式确保了当目标文件中未传输部分的数据块对应的目标数据量大于预设数据容量时,在传输信道中以数据块为单位传输目标文件的可靠性。
在上述一系列实施例的基础上,作为一种可选的实施方式,在统计在传输信道中传输的目标文件的文件数量之前,方法还包括:
判断传输信道中目标文件的文件数量是否发生变化;
若是,则执行统计在传输信道中传输的目标文件的文件数量的步骤。
需要说明的是,本实施方式在统计在传输信道中传输的目标文件的文件数量之前,首先判断传输信道中目标文件的文件数量是否发生变化,进而当传输信道中目标文件的文件数量发生变化时,动态调整传输信道中目标文件的占用的传输速率,以此进一步确保了文件传输过程中服务器运行的稳定性。
请参见图3所示,本申请实施例提供了一种文件传输装置,包括:
数量统计模块10,用于统计在传输信道中传输的目标文件的文件数量;
峰值速率获取模块11,用于获取传输信道的预设传输峰值速率;其中,预设传输峰值速率小于或等于传输信道的额定最大传输速率;
均值速率计算模块12,用于根据文件数量以及预设传输峰值速率计算均值速率;
速率调整模块13,用于将目标文件在传输信道中的传输速率调整为均值速率;
信道传输模块14,用于在传输信道中传输目标文件。
在上述实施例的基础上,作为一种可选的实施方式,信道传输模块14,包括:
数据块传输模块,用于在传输信道中以数据块为单位传输目标文件。
在上述实施例的基础上,作为一种可选的实施方式,数据块传输模块,包括:
数据量统计模块,用于统计目标文件中未传输部分的数据块对应的目标数据量;
容量判断模块,用于判断目标数据量是否小于或等于预设数据容量,若是,则调用传输子模块;
传输子模块,用于在传输信道中以目标文件中未传输部分的数据块为单位传输目标文件。
本申请所提供的文件传输装置,首先统计在传输信道中传输的目标文件的文件数量,并获取传输信道的预设传输峰值速率,其中,预设传输峰值速率小于或等于传输信道的额定最大传输速率,进而根据文件数量以及预设传输峰值速率计算均值速率,并将目标文件在该传输信道中的传输速率调整为均值速率,进而在传输信道中传输目标文件。由于本装置预先设置有传输信道在传输数据过程的速率最大值,即预设传输峰值速率,并且预设传输峰值速率小于或等于传输信道的额定最大传输速率,进而将传输信道的预设传输峰值速率平均分配至目标文档进行占用,以此相对确保了目标文档传输时占用的资源整体可控,并且不超过服务器的额定最大资源,相对确保了文件传输过程中服务器运行的稳定性。
此外,本申请还提供一种文件传输设备,包括:
存储器,用于存储计算机程序;
处理器,用于执行计算机程序时实现如上述的文件传输方法的步骤。
本申请所提供的文件传输设备,首先统计在传输信道中传输的目标文件的文件数量,并获取传输信道的预设传输峰值速率,其中,预设传输峰值速率小于或等于传输信道的额定最大传输速率,进而根据文件数量以及预设传输峰值速率计算均值速率,并将目标文件在该传输信道中的传输速率调整为均值速率,进而在传输信道中传输目标文件。由于本设备预先设置有传输信道在传输数据过程的速率最大值,即预设传输峰值速率,并且预设传输峰值速率小于或等于传输信道的额定最大传输速率,进而将传输信道的预设传输峰值速率平均分配至目标文档进行占用,以此相对确保了目标文档传输时占用的资源整体可控,并且不超过服务器的额定最大资源,相对确保了文件传输过程中服务器运行的稳定性。
此外,本申请还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现如上述的文件传输方法的步骤。
本申请所提供的计算机可读存储介质,首先统计在传输信道中传输的目标文件的文件数量,并获取传输信道的预设传输峰值速率,其中,预设传输峰值速率小于或等于传输信道的额定最大传输速率,进而根据文件数量以及预设传输峰值速率计算均值速率,并将目标文件在该传输信道中的传输速率调整为均值速率,进而在传输信道中传输目标文件。由于本计算机可读存储介质预先设置有传输信道在传输数据过程的速率最大值,即预设传输峰值速率,并且预设传输峰值速率小于或等于传输信道的额定最大传输速率,进而将传输信道的预设传输峰值速率平均分配至目标文档进行占用,以此相对确保了目标文档传输时占用的资源整体可控,并且不超过服务器的额定最大资源,相对确保了文件传输过程中服务器运行的稳定性。
以上对本申请所提供的一种文件传输方法、装置、设备及存储介质进行了详细介绍。说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。应当指出,对于本技 术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。
还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。

Claims (10)

  1. 一种文件传输方法,其特征在于,包括:
    统计在传输信道中传输的目标文件的文件数量;
    获取所述传输信道的预设传输峰值速率;其中,所述预设传输峰值速率小于或等于所述传输信道的额定最大传输速率;
    根据所述文件数量以及所述预设传输峰值速率计算均值速率;
    将所述目标文件在所述传输信道中的传输速率调整为所述均值速率;
    在所述传输信道中传输所述目标文件。
  2. 根据权利要求1所述的文件传输方法,其特征在于,所述在所述传输信道中传输所述目标文件,包括:
    在所述传输信道中以数据块为单位传输所述目标文件。
  3. 根据权利要求2所述的文件传输方法,其特征在于,所述在所述传输信道中以数据块为单位传输所述目标文件,包括:
    统计所述目标文件中未传输部分的数据块对应的目标数据量;
    判断所述目标数据量是否小于或等于预设数据容量;
    若是,则在所述传输信道中以所述目标文件中未传输部分的数据块为单位传输所述目标文件。
  4. 根据权利要求3所述的文件传输方法,其特征在于,当所述目标数据量大于所述预设数据容量时,所述方法还包括:
    将所述目标文件中未传输部分的数据块划分为小于或等于所述预设数据容量的子数据块;
    以所述子数据块为单位传输所述目标文件。
  5. 根据权利要求1至4任意一项所述的文件传输方法,其特征在于,在所述统计在传输信道中传输的目标文件的文件数量之前,所述方法还包括:
    判断所述传输信道中所述目标文件的所述文件数量是否发生变化;
    若是,则执行所述统计在传输信道中传输的目标文件的文件数量的步骤。
  6. 一种文件传输装置,其特征在于,包括:
    数量统计模块,用于统计在传输信道中传输的目标文件的文件数量;
    峰值速率获取模块,用于获取所述传输信道的预设传输峰值速率;其中,所述预设传输峰值速率小于或等于所述传输信道的额定最大传输速率;
    均值速率计算模块,用于根据所述文件数量以及所述预设传输峰值速率计算均值速率;
    速率调整模块,用于将所述目标文件在所述传输信道中的传输速率调整为所述均值速率;
    信道传输模块,用于在所述传输信道中传输所述目标文件。
  7. 根据权利要求6所述的文件传输装置,其特征在于,所述信道传输模块,包括:
    数据块传输模块,用于在所述传输信道中以数据块为单位传输所述目标文件。
  8. 根据权利要求7所述的文件传输装置,其特征在于,所述数据块传输模块,包括:
    数据量统计模块,用于统计所述目标文件中未传输部分的数据块对应的目标数据量;
    容量判断模块,用于判断所述目标数据量是否小于或等于预设数据容量,若是,则调用传输子模块;
    所述传输子模块,用于在所述传输信道中以所述目标文件中未传输部分的数据块为单位传输所述目标文件。
  9. 一种文件传输设备,其特征在于,包括:
    存储器,用于存储计算机程序;
    处理器,用于执行所述计算机程序时实现如权利要求1至5任一项所述的文件传输方法的步骤。
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至5任一项所述的文件传输方法的步骤。
PCT/CN2021/143263 2021-01-07 2021-12-30 一种文件传输方法、装置、设备及存储介质 Ceased WO2022148299A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/033,460 US11792258B1 (en) 2021-01-07 2021-12-30 File transmission method and apparatus, device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110018431.0 2021-01-07
CN202110018431.0A CN112738270B (zh) 2021-01-07 2021-01-07 一种文件传输方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2022148299A1 true WO2022148299A1 (zh) 2022-07-14

Family

ID=75591046

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/143263 Ceased WO2022148299A1 (zh) 2021-01-07 2021-12-30 一种文件传输方法、装置、设备及存储介质

Country Status (3)

Country Link
US (1) US11792258B1 (zh)
CN (1) CN112738270B (zh)
WO (1) WO2022148299A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112738270B (zh) 2021-01-07 2022-12-30 苏州浪潮智能科技有限公司 一种文件传输方法、装置、设备及存储介质
CN116366638B (zh) * 2023-04-21 2025-11-04 中国银行股份有限公司 数据传输方法、装置、电子设备及存储介质

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0512174A1 (en) * 1991-05-08 1992-11-11 Semaphore, Inc. Parallel rule-based data transmission method and apparatus
CN1402550A (zh) * 2001-04-24 2003-03-12 派威公司 对大量小型数据文件提供数据服务的方法
US20090287844A1 (en) * 2007-01-31 2009-11-19 Unlimi-Tech Software Inc. Data Transfer Method, System and Protocol
WO2011006834A1 (de) * 2009-07-16 2011-01-20 Itv Solutions Gmbh Steuerung der datenrate eines medien-downloads anhand von client-wiedergabestatusinformation
CN101997916A (zh) * 2010-11-03 2011-03-30 同辉佳视(北京)信息技术有限公司 一种基于网络进行文件传输的方法和装置
CN105871986A (zh) * 2015-12-11 2016-08-17 乐视网信息技术(北京)股份有限公司 数据下载方法、装置及终端
CN106231440A (zh) * 2016-07-22 2016-12-14 华为技术有限公司 一种流媒体文件分片下载方法、装置及终端
US20160366108A1 (en) * 2015-06-13 2016-12-15 Avocado Systems Inc. Application and data protection tag
CN110620795A (zh) * 2018-06-19 2019-12-27 优视科技有限公司 文件下载中断续传的方法、装置及终端
CN112738270A (zh) * 2021-01-07 2021-04-30 苏州浪潮智能科技有限公司 一种文件传输方法、装置、设备及存储介质

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001054370A2 (en) * 2000-01-24 2001-07-26 The University Of Manitoba Method and system for segmented file transfer
US8285681B2 (en) * 2009-06-30 2012-10-09 Commvault Systems, Inc. Data object store and server for a cloud storage environment, including data deduplication and data management across multiple cloud storage sites
US8886790B2 (en) * 2009-08-19 2014-11-11 Opanga Networks, Inc. Systems and methods for optimizing channel resources by coordinating data transfers based on data type and traffic
EP2468030B1 (en) * 2009-08-19 2016-07-20 Opanga Networks, Inc. Enhanced data delivery based on real time analysis of network communications quality and traffic
US10514986B2 (en) * 2015-09-30 2019-12-24 Commvault Systems, Inc. Dynamic triggering of block-level backups based on block change thresholds and corresponding file identities in a data storage management system
KR101979117B1 (ko) * 2017-11-24 2019-05-15 한국과학기술원 비동기 데이터 요청에 대한 비직교 멀티캐스트 전송 방법
CN109981732A (zh) * 2019-02-18 2019-07-05 百度在线网络技术(北京)有限公司 海量文件传输控制方法及装置
CN110620807B (zh) * 2019-05-14 2020-11-06 北京邮电大学 文件传输方法、服务器、系统、设备以及存储介质
CN110109884A (zh) * 2019-05-23 2019-08-09 苏州浪潮智能科技有限公司 一种文件读取方法、装置、设备及介质
CN110650546B (zh) * 2019-09-29 2023-08-15 Tcl移动通信科技(宁波)有限公司 文件传输的方法、装置、存储介质以及终端
CN111338780B (zh) * 2020-02-28 2023-03-31 中国工商银行股份有限公司 并发文件的传输方法及装置

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0512174A1 (en) * 1991-05-08 1992-11-11 Semaphore, Inc. Parallel rule-based data transmission method and apparatus
CN1402550A (zh) * 2001-04-24 2003-03-12 派威公司 对大量小型数据文件提供数据服务的方法
US20090287844A1 (en) * 2007-01-31 2009-11-19 Unlimi-Tech Software Inc. Data Transfer Method, System and Protocol
WO2011006834A1 (de) * 2009-07-16 2011-01-20 Itv Solutions Gmbh Steuerung der datenrate eines medien-downloads anhand von client-wiedergabestatusinformation
CN101997916A (zh) * 2010-11-03 2011-03-30 同辉佳视(北京)信息技术有限公司 一种基于网络进行文件传输的方法和装置
US20160366108A1 (en) * 2015-06-13 2016-12-15 Avocado Systems Inc. Application and data protection tag
CN105871986A (zh) * 2015-12-11 2016-08-17 乐视网信息技术(北京)股份有限公司 数据下载方法、装置及终端
CN106231440A (zh) * 2016-07-22 2016-12-14 华为技术有限公司 一种流媒体文件分片下载方法、装置及终端
CN110620795A (zh) * 2018-06-19 2019-12-27 优视科技有限公司 文件下载中断续传的方法、装置及终端
CN112738270A (zh) * 2021-01-07 2021-04-30 苏州浪潮智能科技有限公司 一种文件传输方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN112738270B (zh) 2022-12-30
US20230308503A1 (en) 2023-09-28
CN112738270A (zh) 2021-04-30
US11792258B1 (en) 2023-10-17

Similar Documents

Publication Publication Date Title
CN109257294A (zh) 基于redis的服务动态降级方法、装置、服务器及存储介质
CN106411774A (zh) 一种控制交易数据量的方法和装置
CN105162859B (zh) 服务器动态扩容系统及方法
KR20220058606A (ko) 자원 관리 플랫폼에 기반하는 태스크 분배 방법 및 시스템
WO2022148299A1 (zh) 一种文件传输方法、装置、设备及存储介质
EP1580954A3 (en) Content utilization management method corresponding to network transfer, program, and content transfer system
CN102404399A (zh) 一种云存储资源模糊动态分配方法
CN110149701B (zh) 一种上行信息传输方法及设备
CN103634407B (zh) 一种云存储文件断点续传的方法和装置
CN109144666A (zh) 一种跨云平台的资源处理方法及系统
CN103703830B (zh) 一种物理资源调整方法、装置及控制器
CN106161284B (zh) 一种资源调度方法及系统
WO2016197458A1 (zh) 一种流量控制的方法及装置
CN107222412A (zh) 一种基于网络拓扑判定的sdn混合模式流表下发方法及装置
CN103607731B (zh) 一种测量报告的处理方法及装置
CN117724840A (zh) 计算任务的分配方法、装置、存储介质及电子设备
CN105812437A (zh) 一种业务分发方法、系统及相关装置
CN111372277B (zh) 数据分发方法、装置及存储介质
CN105224805B (zh) 基于流式计算的资源管理方法及装置
CN104038358A (zh) 一种内容调度方法及内容调度装置
CN105656794A (zh) 数据分发方法及装置
CN109800079B (zh) 医保系统中的节点调整方法及相关装置
CN109327398A (zh) 一种防止丢包的方法及装置
CN114844880B (zh) 一种文件上传方法、装置、电子设备及存储介质
CN110784297A (zh) 一种资源单元的分配方法及装置

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: 21917338

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: 21917338

Country of ref document: EP

Kind code of ref document: A1