CN110493029B - Transmission method, transmission device, electronic equipment and storage medium - Google Patents

Transmission method, transmission device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110493029B
CN110493029B CN201910586438.5A CN201910586438A CN110493029B CN 110493029 B CN110493029 B CN 110493029B CN 201910586438 A CN201910586438 A CN 201910586438A CN 110493029 B CN110493029 B CN 110493029B
Authority
CN
China
Prior art keywords
file
files
transmitted
transmission
packaged
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.)
Active
Application number
CN201910586438.5A
Other languages
Chinese (zh)
Other versions
CN110493029A (en
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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201910586438.5A priority Critical patent/CN110493029B/en
Publication of CN110493029A publication Critical patent/CN110493029A/en
Application granted granted Critical
Publication of CN110493029B publication Critical patent/CN110493029B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/147Network analysis or design for predicting network behaviour
    • 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (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)

Abstract

The application discloses a transmission method, which comprises the following steps: determining a file to be packaged from a file set to be transmitted; calculating a target transmission time based on at least the transmission response parameter and the number of files associated with the set of files to be transmitted; the transmission response parameters are at least related to the response time of the receiving terminal, the file number is used for representing the total number of files in the file set to be transmitted after the files to be packaged are packaged, and the files to be packaged are packaged into at least one first file of which the file size meets a first threshold value. The application also discloses a transmission device, electronic equipment and a storage medium.

Description

Transmission method, transmission device, electronic equipment and storage medium
Technical Field
The present application relates to, but not limited to, the field of computer technologies, and in particular, to a transmission method, a transmission apparatus, an electronic device, and a storage medium.
Background
At present, in the process of file transmission, optimization processing is carried out on transmission of small files in files to be transmitted, so that the method for estimating the transmission time based on the current network speed and the size of the files to be transmitted cannot obtain accurate transmission time.
Disclosure of Invention
The embodiment of the application provides a transmission method, a transmission device, electronic equipment and a storage medium. The technical scheme of the embodiment of the application is realized as follows:
in one aspect, an embodiment of the present application provides a transmission method, including:
determining a file to be packaged from a file set to be transmitted;
calculating a target transmission time at least based on the transmission response parameter and the number of files associated with the file set to be transmitted;
the transmission response parameter is at least related to the response time of the receiving terminal, the file number is used for representing the total number of files in the file set to be transmitted after the files to be packaged are packaged, and the files to be packaged are packaged into at least one first file of which the file size meets a first threshold value.
Optionally, the determining a file to be packaged from the file set to be transmitted includes:
selecting a plurality of second files of which the file sizes meet a second threshold value from the file set to be transmitted; the file size of each second file is smaller than the file size of any third file in the file set to be transmitted, and the third files are files in the file set to be transmitted except the second files.
Optionally, the calculating the target transmission time based on at least the transmission response parameter and the number of files associated with the set of files to be transmitted includes:
acquiring a first size and a transmission network speed of a file set to be transmitted, and calculating first transmission time;
calculating a second transmission time based on the transmission response parameter and the number of files;
and calculating a target transmission time for transmitting the file set to be transmitted based on the first transmission time and the second transmission time.
Optionally, the method further includes:
the transmission response parameter is determined at least based on a response time of a receiving terminal of a set of files to be transmitted.
Optionally, obtaining the response time of the receiving terminal of the file set to be transmitted includes:
acquiring hardware configuration parameters and transmission network speed of the receiving terminal;
and obtaining the response time of the receiving terminal to the hypertext transfer protocol request at least based on the hardware configuration parameter and the transmission network speed.
Optionally, the method further includes:
and determining the size and/or the number of the first files at least based on the number of the files to be packaged, the total size of the files and the transmission network speed.
Optionally, the method further includes:
determining a file to be compressed from a file set to be transmitted;
and the file number represents the total number of files in the file set to be transmitted after the files to be packaged are packaged and compressed.
Optionally, the determining a file to be compressed from the set of files to be transmitted includes:
selecting at least one fourth file with the file size meeting a third threshold value from the file set to be transmitted; the file size of each fourth file is larger than that of any third file in the file set to be transmitted, and the third files are files in the file set to be transmitted, wherein the file sizes of the third files are between a second threshold value and a third threshold value.
Optionally, the calculating a target transmission time based on at least the transmission response parameter and the number of files associated with the set of files to be transmitted includes:
obtaining a second size and a transmission network speed of the file set to be transmitted, and calculating third transmission time;
calculating a second transmission time based on the transmission response parameter and the number of files;
and calculating a target transmission time for transmitting the file set to be transmitted based on the third transmission time and the second transmission time.
Optionally, the method further includes:
and adjusting the target transmission time at least based on the obtained transmission network speed and the transmission response parameter.
On the other hand, an embodiment of the present application further provides an electronic device, including: a processor, a memory, and a communication bus;
the communication bus is used for realizing communication connection between the processor and the memory;
the processor is used for executing the program for file transmission in the memory to realize the steps of the transmission method.
In another aspect, an embodiment of the present application further provides a transmission apparatus, including:
the first determining unit is used for determining the files to be packaged from the file set to be transmitted;
a first processing unit, configured to calculate a target transmission time based on at least a transmission response parameter and a number of files associated with the set of files to be transmitted;
the transmission response parameter is at least related to the response time of the receiving terminal, the file number is used for representing the total number of files in the file set to be transmitted after the files to be packaged are packaged, and the files to be packaged are packaged into at least one first file of which the file size meets a first threshold value.
Optionally, the first determining unit is further configured to select a plurality of second files of which file sizes meet a second threshold from the set of files to be transmitted; the file size of each second file is smaller than that of any third file in the file set to be transmitted, and the third files are files in the file set to be transmitted except the second files.
Optionally, the first processing unit is further configured to obtain a first size of the set of files to be transmitted and a transmission network speed, and calculate a first transmission time;
calculating a second transmission time based on the transmission response parameter and the number of files;
and calculating target transmission time for transmitting the file set to be transmitted based on the first transmission time and the second transmission time.
Optionally, the transmission device further includes:
and the second determining unit is used for determining the file size and/or the number of the first files at least based on the number of the files to be packaged, the total size of the files and the transmission network speed.
Optionally, the transmission device further includes:
the third determining unit is used for determining the file to be compressed from the file set to be transmitted;
and the file number represents the total number of files in the file set to be transmitted after the files to be packaged are packaged and compressed.
Optionally, the third determining unit is further configured to select at least one fourth file, of which the file size meets a third threshold, from the set of files to be transmitted; the file size of each fourth file is larger than that of any third file in the file set to be transmitted, and the third files are files in the file set to be transmitted, wherein the file sizes of the third files are between a second threshold value and a third threshold value.
Optionally, the first processing unit is further configured to obtain a second size and a transmission network speed of the set of files to be transmitted, and calculate a third transmission time;
calculating a second transmission time based on the transmission response parameter and the number of files;
and calculating target transmission time for transmitting the file set to be transmitted based on the third transmission time and the second transmission time.
Optionally, the transmission device further includes:
and the second processing unit is used for adjusting the target transmission time at least based on the obtained transmission network speed and the transmission response parameter.
In still another aspect, embodiments of the present application further provide a storage medium, where one or more programs are stored, and the one or more programs are executable by one or more processors to implement the steps of the transmission method as described above.
The transmission method provided by the embodiment of the application determines the files to be packaged from the file set to be transmitted; calculating a target transmission time based on at least the transmission response parameter and the number of files associated with the set of files to be transmitted; the transmission response parameters are at least related to the response time of the receiving terminal, the file number is used for representing the total number of files in a file set to be transmitted after the files to be packaged are packaged, and the files to be packaged are packaged into at least one first file of which the file size meets a first threshold value; that is to say, in the embodiment of the present application, the target transmission time may be calculated by using the transmission response parameter related to the response time of the receiving terminal and the number of files associated with the set of files to be transmitted, so as to obtain the accurate file transmission time of the set of files to be transmitted.
Drawings
Fig. 1 is a schematic flow chart of a transmission method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of another transmission method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another transmission method according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a transmission method according to another embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
Embodiments of the present application provide a transmission method that can be applied to any electronic terminal device having data transmission and/or data writing functions, where the electronic terminal device is equivalent to the electronic device described below.
Referring to fig. 1, the method includes the steps of:
step 101, determining a file to be packaged from a file set to be transmitted.
In the embodiment of the application, the file set to be transmitted comprises files to be packaged, the file set to be transmitted can be determined based on selection of a user and can also be determined based on automatic selection of acquired user description, for example, on a computer terminal device, a disk in a disk list can be determined as the file set to be transmitted based on selection of the user, and a folder in the disk or multiple files in the folder can also be determined as the file set to be transmitted. It can be understood that the files to be packaged comprise files in which the file attributes in the file set to be transmitted meet the preset conditions; here, the file attribute includes, but is not limited to, a file size or a file type.
In practical application, after determining a set of files to be transmitted, the electronic device determines files to be packaged from the set of files to be transmitted according to detected user operation, or automatically determines files to be packaged from the set of files to be transmitted based on received user description, and then the electronic device takes relevant information of the files to be packaged as one of factors for estimating target transmission time of the set of files to be transmitted.
Step 102, calculating a target transmission time at least based on the transmission response parameter and the file quantity associated with the file set to be transmitted.
The transmission response parameters are at least related to the response time of the receiving terminal, the file number is used for representing the total number of files in the file set to be transmitted after the files to be packaged are packaged, and the files to be packaged are packaged into at least one first file of which the file size meets a first threshold value.
In the embodiment of the application, the electronic device may actively obtain a transmission response parameter of a file set to be transmitted or receive the transmission response parameter fed back by other terminals, such as a receiving terminal, where the transmission response parameter is at least related to response time of the receiving terminal of the file set to be transmitted, and the response time is at least related to time for writing a file to be transmitted into a disk of the receiving terminal. The electronic device may further obtain the number of files associated with the set of files to be transmitted, where the number of files is used to represent the total number of files in the set of files to be transmitted after the files to be packaged are packaged, and illustratively, if there are 100 files in the set of files to be packaged, the determined number of files to be packaged is 80, and if the 80 files to be packaged are pre-estimated to be packaged into 8 first files, the total number of files is 28.
Here, after determining the file to be packaged from the file set to be transmitted, the electronic device may package the file to be packaged into at least one first file whose file size meets a first threshold, where the first threshold may be set by a user, or may be automatically set by the electronic device according to the current transmission network speed, the size of the file set to be transmitted, or a performance parameter, for example, setting the first threshold range at 200 ± 10M.
In practical application, after determining files to be packaged from the file set to be transmitted, the electronic device calculates target transmission time at least based on the transmission response parameters and the number of the files related to the file set to be transmitted so as to obtain transmission prediction time of the file set to be transmitted.
According to the transmission method, the files to be packaged are determined from the file set to be transmitted; calculating a target transmission time based on at least the transmission response parameter and the number of files associated with the set of files to be transmitted; the transmission response parameters are at least related to the response time of the receiving terminal, the file number is used for representing the total number of files in a file set to be transmitted after the files to be packaged are packaged, and the files to be packaged are packaged into at least one first file of which the file size meets a first threshold value; that is to say, in the embodiment of the present application, the target transmission time may be calculated based on the transmission response parameter related to the response time of the receiving terminal and the number of files associated with the set of files to be transmitted, so as to obtain the accurate file transmission time of the set of files to be transmitted.
Based on the foregoing embodiments, an embodiment of the present application provides a transmission method applied to an electronic device, and as shown in fig. 2, the method includes the following steps:
step 201, a plurality of second files with file sizes meeting a second threshold are selected from the file set to be transmitted.
The file size of each second file is smaller than that of any third file in the file set to be transmitted, and the third files are files in the file set to be transmitted except the plurality of second files.
In the embodiment of the application, considering that each file needs a transmission connection establishing time and a disk writing time when being transmitted, in order to improve the estimation accuracy of the file transmission time, a plurality of small files can be packaged and transmitted, so that the estimation accuracy of the file transmission time is improved, for example, in the embodiment, a plurality of second files are determined as files to be packaged; after the electronic equipment determines the file set to be transmitted, a plurality of second files with the file sizes meeting a second threshold value are selected from the file set to be transmitted to obtain files to be packaged, and if the files with the file sizes smaller than 5M in the file set to be transmitted are determined as the files to be packaged.
Step 202, obtaining a first size and a transmission network speed of a file set to be transmitted, and calculating a first transmission time.
In the embodiment of the present application, the first size may be understood as an original size of a set of files to be transmitted, that is, a total size of all files selected for transmission. The transmission network speed can be understood as the current network speed of the network for transmitting the file set to be transmitted.
In the embodiment of the application, the electronic device obtains the first size and the transmission network speed, and then divides the first size by the transmission network speed to obtain the first transmission time.
Step 203, calculating a second transmission time based on the transmission response parameter and the number of files.
In the embodiment of the application, because the files are sequentially transmitted in the transmission process, each file needs to establish an http request with the receiving terminal during transmission, that is, transmission connection establishment time is needed, and a write-in time needs to be considered when the file is written into a disk of the receiving terminal, the electronic device obtains the transmission response parameters and the number of the files, and then multiplies the number of the files by the transmission response parameters to obtain the second transmission time.
The transmission response parameters are at least related to the response time of the receiving terminal, the file number is used for representing the total number of files in the file set to be transmitted after the files to be packaged are packaged, and the files to be packaged are packaged into at least one first file of which the file size meets a first threshold value.
In the embodiment of the application, the electronic device may determine the transmission response parameter at least based on the response time of the receiving terminal of the file set to be transmitted.
In the embodiment of the application, the electronic device may obtain the response time of the receiving terminal of the file set to be transmitted by the following steps:
the first step is to obtain the hardware configuration parameters and transmission network speed of the receiving terminal.
In the embodiment of the present application, the hardware configuration parameters of the receiving terminal include, but are not limited to, configuration parameters of a processor of the receiving terminal and configuration parameters of a memory of the receiving terminal.
And secondly, acquiring the response time of the receiving terminal for the hypertext transfer protocol request at least based on the hardware configuration parameters and the transmission network speed.
In this embodiment, the electronic device may set a mapping table of (hardware configuration parameter + transmission network speed) and (response time) of the electronic device, which is obtained through a previous experiment.
Illustratively, the mapping table includes at least entry one: when the processor I7+ a Solid State Drive (SSD) + a network speed gigabit network card is transmitted, the response time is T1; the table entry one: when the processor I5+ a Hard Disk Drive (Hard Disk Drive, HDD) + a transmission network speed hundred megabits of network cards, the response time is T2.
In the embodiment of the application, the electronic device may determine the file size and/or the number of the first file at least based on the number of the files to be packaged, the total size of the files, and the transmission network speed.
The transmission method is used for improving the estimation accuracy of the file transmission time, the file transmission time is mainly determined based on the transmission response parameters and the total number of files to be packaged in the file set to be transmitted after packaging, so that the size and/or the number of the first files need to be determined, and the file size of the first files, namely the size of the files to be packaged, can be determined based on the number of the files to be packaged, the total size of the files and the transmission network speed, so that the fastest file transmission time can be obtained, and the file transmission efficiency and the estimation accuracy of the file transmission time can be improved.
And step 204, calculating target transmission time for transmitting the file set to be transmitted based on the first transmission time and the second transmission time.
In the embodiment of the application, the electronic device obtains the first transmission time and the second transmission time, and then adds the second transmission time to the first transmission time to obtain the target transmission time.
It should be noted that, for the description of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the description in the other embodiments, which is not repeated herein.
Based on the foregoing embodiments, an embodiment of the present application provides a transmission method applied to an electronic device, and as shown in fig. 3, the method includes the following steps:
step 301, determining a file to be packaged from a file set to be transmitted.
Step 302, determining a file to be compressed from a file set to be transmitted.
In the embodiment of the application, the file set to be transmitted comprises files to be packaged and files to be compressed.
The file number in this embodiment represents the total number of files in the file set to be transmitted after the files to be packaged are packaged and compressed.
In this embodiment of the present application, since the file transfer time is related to not only the transfer response parameter and the number of files, but also the file size, in order to further shorten the file transfer time of the file set to be transferred, step 302 determines a file to be compressed from the file set to be transferred, which includes: and selecting at least one fourth file with the file size meeting a third threshold from the file set to be transmitted, namely compressing the at least one fourth file with the file size larger than the third threshold.
The file size of each fourth file is larger than that of any third file in the file set to be transmitted, and the third files are files in the file set to be transmitted, wherein the file sizes of the third files are between a second threshold value and a third threshold value.
In the embodiment of the application, after the electronic equipment determines the file to be packaged and the file to be compressed from the file set to be transmitted, the file to be packaged is packaged and the file to be compressed is compressed.
Step 303, obtaining a second size and a transmission network speed of the file set to be transmitted, and calculating a third transmission time.
In this embodiment, the second size may be understood as a size of a set of files to be transmitted after a file to be compressed is compressed. The transmission network speed can be understood as the current network speed of the network for transmitting the file set to be transmitted.
In this embodiment, the electronic device obtains the second size and the transmission network speed, and then divides the second size by the transmission network speed to obtain the third transmission time.
Step 304, calculating a second transmission time based on the transmission response parameter and the number of files.
In the embodiment of the application, the electronic device obtains the transmission response parameter and the number of the files, and then multiplies the transmission response parameter by the number of the files to obtain the second transmission time.
Step 305, calculating a target transmission time for transmitting the file set to be transmitted based on the third transmission time and the second transmission time.
In the embodiment of the application, the electronic device obtains the third transmission time and the second transmission time, and then adds the second transmission time to the third transmission time to obtain the target transmission time.
It should be noted that, for the descriptions of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the descriptions in other embodiments, which are not described herein again.
Based on the foregoing embodiments, an embodiment of the present application provides a transmission method applied to an electronic device, and as shown in fig. 4, the method includes the following steps:
step 401, determining a file to be packaged from a file set to be transmitted.
In the embodiment of the application, the electronic device can determine the file to be packaged from the file set to be transmitted after the file transmission process is started. For example, the electronic device screens out the files to be packaged from the transmission file list corresponding to the file set to be transmitted. Here, the transmission file list includes files corresponding to all leaf nodes, including files corresponding to the empty directory, large files, and small files; illustratively, a small file includes a file having a file size of no more than 5M.
Further, the electronic device creates a package file from a memory or a hard disk, writes all the small files into the package file in sequence, limits the size of each package file to 200M and the number of files contained in a single package to be less than a specific number, such as 10000 small files, and generates unpacking information at the same time.
Step 402, calculating a target transmission time based on at least the transmission response parameter and the number of files associated with the set of files to be transmitted.
The transmission response parameters are at least related to the response time of the receiving terminal, the file number is used for representing the total number of files in the file set to be transmitted after the files to be packaged are packaged, and the files to be packaged are packaged into at least one first file of which the file size meets a first threshold value.
In the embodiment of the application, after the target transmission time of the file set to be transmitted is calculated by the electronic equipment, the target transmission time can be displayed on the electronic equipment, so that a user can master the transmission condition of the file set to be transmitted in real time.
In the embodiment of the present application, exemplarily, the number of files associated with the file set to be transmitted is used for representing the total number of files in the file set to be transmitted after the files to be packaged are packaged.
Firstly, in the file transmission process, the electronic equipment packs files with the file size smaller than a second threshold value m; further, after the packaging process, the electronic device may calculate how many small files (smallCount) are in total, and the total size smalltoltailsize of the small files, and how many packaged files (mergeCount) the small files will be packaged, and the number of files that will not be packaged (bigCount) with a file size greater than m. Then the total number of files is equal to the sum of the number of files of bigCount and the number of files of mergeCount.
And secondly, the electronic equipment detects the current network speed of the network for transmitting the file set to be transmitted to obtain the transmission network speed netSpeed. The electronic equipment determines the totalSize of the file set to be transmitted after packaging processing.
Finally, the electronic device may calculate a target transmission time T0 ═ totalSize/netSpeed + (bigCount + mergeCount) × transmission response parameter by using the following formula.
Further, verification is performed on the Migration establishment grant, and the target transmission time calculated by the transmission method improved by the embodiment of the application is basically consistent with the actual transmission time.
And step 403, adjusting the target transmission time at least based on the obtained transmission network speed and the transmission response parameters.
In the embodiment of the application, considering that the transmission response parameter has an association relation with the transmission network speed, it can be understood that the transmission response parameter dynamically changes along with the transmission network speed; then, after determining the target transmission time of the file set to be transmitted, the electronic device can also obtain the real-time transmission network speed and the real-time transmission response parameters, and dynamically adjust the target transmission time at least based on the obtained transmission network speed and the obtained transmission response parameters, so that the accuracy of prediction is improved.
Further, the electronic equipment sends the file set to be transmitted to the receiving terminal based on the determined target transmission time, and the receiving terminal unpacks and stores the file set to be transmitted according to unpacking information after receiving the file set to be transmitted.
It should be noted that, for the descriptions of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the descriptions in other embodiments, which are not described herein again.
Based on the foregoing embodiments, an embodiment of the present application provides an electronic device, where the electronic device may be applied to a transmission method provided in the embodiments corresponding to fig. 1 to 4, and as shown in fig. 5, the electronic device 5 includes: a processor 51, a memory 52 and a communication bus 53, wherein:
the communication bus 53 is used to realize a communication connection between the processor 51 and the memory 52.
The processor 51 is configured to execute the file transfer program stored in the memory 52 to implement the following steps:
determining a file to be packaged from a file set to be transmitted;
calculating a target transmission time based on at least the transmission response parameter and the number of files associated with the set of files to be transmitted;
the transmission response parameters are at least related to the response time of the receiving terminal, the file number is used for representing the total number of files in the file set to be transmitted after the files to be packaged are packaged, and the files to be packaged are packaged into at least one first file of which the file size meets a first threshold value.
In other embodiments of the present application, the processor 51 is configured to execute the file transfer program stored in the memory 52 to implement the following steps:
selecting a plurality of second files of which the file sizes meet a second threshold value from the file set to be transmitted; the file size of each second file is smaller than the file size of any third file in the file set to be transmitted, and the third files are files in the file set to be transmitted except the second files.
In other embodiments of the present application, the processor 51 is configured to execute a file transfer program stored in the memory 52 to implement the following steps:
obtaining a first size and a transmission network speed of a file set to be transmitted, and calculating first transmission time;
calculating a second transmission time based on the transmission response parameter and the number of files;
and calculating a target transmission time for transmitting the file set to be transmitted based on the first transmission time and the second transmission time.
In other embodiments of the present application, the processor 51 is configured to execute a file transfer program stored in the memory 52 to implement the following steps:
the transmission response parameter is determined at least on the basis of the response time of the receiving terminal of the set of files to be transmitted.
In other embodiments of the present application, the processor 51 is configured to execute the file transfer program stored in the memory 52 to implement the following steps:
acquiring hardware configuration parameters and transmission network speed of a receiving terminal;
and obtaining the response time of the receiving terminal for the hypertext transfer protocol request at least based on the hardware configuration parameters and the transmission network speed.
In other embodiments of the present application, the processor 51 is configured to execute the file transfer program stored in the memory 52 to implement the following steps:
and determining the size and/or the number of the first files at least based on the number of the files to be packaged, the total size of the files and the transmission network speed.
In other embodiments of the present application, the processor 51 is configured to execute a file transfer program stored in the memory 52 to implement the following steps:
determining a file to be compressed from a file set to be transmitted;
the file number represents the total number of files in a file set to be transmitted after the files to be packaged are packaged and compressed.
In other embodiments of the present application, the processor 51 is configured to execute the file transfer program stored in the memory 52 to implement the following steps:
selecting at least one fourth file with the file size meeting a third threshold from the file set to be transmitted; the file size of each fourth file is larger than that of any third file in the file set to be transmitted, and the third files are files in the file set to be transmitted, wherein the file sizes of the third files are between a second threshold value and a third threshold value.
In other embodiments of the present application, the processor 51 is configured to execute the file transfer program stored in the memory 52 to implement the following steps:
obtaining a second size and a transmission network speed of the file set to be transmitted, and calculating third transmission time;
calculating a second transmission time based on the transmission response parameter and the number of files;
and calculating a target transmission time for transmitting the file set to be transmitted based on the third transmission time and the second transmission time.
In other embodiments of the present application, the processor 51 is configured to execute the file transfer program stored in the memory 52 to implement the following steps:
and adjusting the target transmission time at least based on the obtained transmission network speed and the transmission response parameter.
It should be noted that, a specific implementation process of the step executed by the processor in this embodiment may refer to an implementation process in the transmission method provided in the embodiments corresponding to fig. 1 to 4, and is not described here again.
Based on the foregoing embodiments, an embodiment of the present application provides a transmission device, where the transmission device corresponds to the foregoing electronic device, and the transmission device may be applied to a transmission method provided in the embodiments corresponding to fig. 1 to 4, where the transmission device includes:
the first determining unit is used for determining the files to be packaged from the file set to be transmitted;
a first processing unit, configured to calculate a target transmission time based on at least the transmission response parameter and the number of files associated with the set of files to be transmitted;
the transmission response parameters are at least related to the response time of the receiving terminal, the file number is used for representing the total number of files in the file set to be transmitted after the files to be packaged are packaged, and the files to be packaged are packaged into at least one first file of which the file size meets a first threshold value.
Optionally, the first determining unit is further configured to select a plurality of second files of which the file sizes meet a second threshold from the set of files to be transmitted; the file size of each second file is smaller than that of any third file in the file set to be transmitted, and the third files are files in the file set to be transmitted except the plurality of second files.
Optionally, the first processing unit is further configured to obtain a first size and a transmission network speed of the set of files to be transmitted, and calculate a first transmission time;
calculating a second transmission time based on the transmission response parameter and the number of files;
and calculating a target transmission time for transmitting the file set to be transmitted based on the first transmission time and the second transmission time.
Optionally, the transmission device further includes:
and the second determining unit is used for determining the file size and/or the number of the first files at least based on the number of the files to be packaged, the total size of the files and the transmission network speed.
Optionally, the transmission device further includes:
the third determining unit is used for determining the file to be compressed from the file set to be transmitted;
the file number represents the total number of files in a file set to be transmitted after the files to be packaged are packaged and compressed.
Optionally, the third determining unit is further configured to select at least one fourth file, of which the file size meets a third threshold, from the set of files to be transmitted; the file size of each fourth file is larger than that of any third file in the file set to be transmitted, and the third files are files in the file set to be transmitted, wherein the file sizes of the third files are between a second threshold value and a third threshold value.
Optionally, the first processing unit is further configured to obtain a second size and a transmission network speed of the file set to be transmitted, and calculate a third transmission time;
calculating a second transmission time based on the transmission response parameter and the number of files;
and calculating a target transmission time for transmitting the file set to be transmitted based on the third transmission time and the second transmission time.
Optionally, the transmission device further includes:
and the second processing unit is used for adjusting the target transmission time at least based on the obtained transmission network speed and the transmission response parameter.
It should be noted that, a specific implementation process of the steps executed by the processor in this embodiment may refer to an implementation process in the transmission method provided in the embodiments corresponding to fig. 1 to 4, and details are not described here.
Based on the foregoing embodiments, embodiments of the application provide a computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps of:
determining a file to be packaged from a file set to be transmitted;
calculating a target transmission time based on at least the transmission response parameter and the number of files associated with the set of files to be transmitted;
the transmission response parameters are at least related to the response time of the receiving terminal, the file number is used for representing the total number of files in the file set to be transmitted after the files to be packaged are packaged, and the files to be packaged are packaged into at least one first file of which the file size meets a first threshold value.
In other embodiments of the present application, the one or more programs are executable by the one or more processors and further implement the steps of:
selecting a plurality of second files of which the file sizes meet a second threshold value from the file set to be transmitted; the file size of each second file is smaller than that of any third file in the file set to be transmitted, and the third files are files in the file set to be transmitted except the plurality of second files.
In other embodiments of the present application, the one or more programs are executable by the one or more processors and further implement the steps of:
obtaining a first size and a transmission network speed of a file set to be transmitted, and calculating first transmission time;
calculating a second transmission time based on the transmission response parameter and the number of files;
and calculating a target transmission time for transmitting the file set to be transmitted based on the first transmission time and the second transmission time.
In other embodiments of the present application, the one or more programs are executable by the one or more processors and further implement the steps of:
the transmission response parameter is determined at least on the basis of the response time of the receiving terminal of the set of files to be transmitted.
In other embodiments of the present application, the one or more programs are executable by the one or more processors and further implement the steps of:
acquiring hardware configuration parameters and transmission network speed of a receiving terminal;
and obtaining the response time of the receiving terminal for the hypertext transfer protocol request at least based on the hardware configuration parameter and the transmission network speed.
In other embodiments of the present application, the one or more programs are executable by the one or more processors and further implement the steps of:
and determining the size and/or the number of the first files at least based on the number of the files to be packaged, the total size of the files and the transmission network speed.
In other embodiments of the present application, the one or more programs are executable by the one or more processors and further implement the steps of:
determining a file to be compressed from a file set to be transmitted;
the file number represents the total number of files in a file set to be transmitted after the files to be packaged are packaged and compressed.
In other embodiments of the present application, the one or more programs are executable by the one or more processors and further implement the steps of:
selecting at least one fourth file with the file size meeting a third threshold value from the file set to be transmitted; the file size of each fourth file is larger than that of any third file in the file set to be transmitted, and the third files are files in the file set to be transmitted, wherein the file sizes of the third files are between a second threshold value and a third threshold value.
In other embodiments of the present application, the one or more programs are executable by the one or more processors and further implement the steps of:
obtaining a second size and a transmission network speed of the file set to be transmitted, and calculating third transmission time;
calculating a second transmission time based on the transmission response parameter and the number of files;
and calculating a target transmission time for transmitting the file set to be transmitted based on the third transmission time and the second transmission time.
In other embodiments of the present application, the one or more programs are executable by the one or more processors and further implement the steps of:
and adjusting the target transmission time at least based on the obtained transmission network speed and the transmission response parameter.
It should be noted that, a specific implementation process of the step executed by the processor in this embodiment may refer to an implementation process in the transmission method provided in the embodiments corresponding to fig. 1 to 4, and is not described here again.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application.

Claims (10)

1. A method of transmission, comprising:
determining a file to be packaged from a file set to be transmitted;
calculating a target transmission time at least based on the transmission response parameter and the number of files associated with the file set to be transmitted;
the transmission response parameters are at least related to response time of a receiving terminal, the file number is used for representing the total number of files in the file set to be transmitted after the files to be packaged are packaged, and the files to be packaged are packaged into at least one first file of which the file size meets a first threshold value; the response time of the receiving terminal is at least related to the time of writing the file to be transmitted into a disk of the receiving terminal; the first threshold value is determined based on the current transmission network speed, the size of the file set to be transmitted and the number of files to be packaged.
2. The method of claim 1, wherein determining files to be packaged from a collection of files to be transmitted comprises:
selecting a plurality of second files of which the file sizes meet a second threshold value from the file set to be transmitted; the file size of each second file is smaller than the file size of any third file in the file set to be transmitted, and the third files are files in the file set to be transmitted except the second files.
3. The method of claim 1, the calculating a target transfer time based at least on a transfer response parameter and a number of files associated with the set of files to be transferred comprising:
acquiring a first size and a transmission network speed of a file set to be transmitted, and calculating first transmission time;
calculating a second transmission time based on the transmission response parameter and the number of files;
and calculating target transmission time for transmitting the file set to be transmitted based on the first transmission time and the second transmission time.
4. The method of claim 1, further comprising:
and determining the file size and/or the number of the first files at least based on the number of the files to be packaged, the total size of the files and the transmission network speed.
5. The method of any of claims 1 to 4, further comprising:
determining a file to be compressed from a file set to be transmitted;
and the file number represents the total number of files in the file set to be transmitted after the files to be packaged are packaged and compressed.
6. The method of claim 5, further comprising at least one of:
the method for determining the file to be compressed from the file set to be transmitted comprises the following steps:
selecting at least one fourth file with the file size meeting a third threshold from the file set to be transmitted; the file size of each fourth file is larger than that of any third file in the file set to be transmitted, and the third files are files in the file set to be transmitted, wherein the file sizes of the third files are between a second threshold value and a third threshold value;
the calculating a target transmission time based on at least the transmission response parameter and the number of files associated with the set of files to be transmitted comprises:
obtaining a second size and a transmission network speed of the file set to be transmitted, and calculating third transmission time;
calculating a second transmission time based on the transmission response parameter and the number of files;
and calculating target transmission time for transmitting the file set to be transmitted based on the third transmission time and the second transmission time.
7. The method of claim 1, further comprising:
and adjusting the target transmission time at least based on the obtained transmission network speed and the transmission response parameter.
8. A transmission apparatus, comprising:
the first determining unit is used for determining the files to be packaged from the file set to be transmitted;
a first processing unit, configured to calculate a target transmission time based on at least a transmission response parameter and a number of files associated with the set of files to be transmitted;
the transmission response parameters are at least related to response time of a receiving terminal, the file number is used for representing the total number of files in the file set to be transmitted after the files to be packaged are packaged, and the files to be packaged are packaged into at least one first file of which the file size meets a first threshold value; the response time of the receiving terminal is at least related to the time of writing the file to be transmitted into a disk of the receiving terminal; the first threshold value is determined based on the current transmission network speed, the size of the file set to be transmitted and the number of files to be packaged.
9. An electronic device, comprising: a processor, a memory, and a communication bus;
the communication bus is used for realizing communication connection between the processor and the memory;
the processor is configured to execute a transmission program in the memory to implement the steps of the transmission method according to any one of claims 1 to 7.
10. A storage medium storing one or more programs, the one or more programs executable by one or more processors to perform the steps of the transmission method of any of claims 1-7.
CN201910586438.5A 2019-07-01 2019-07-01 Transmission method, transmission device, electronic equipment and storage medium Active CN110493029B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910586438.5A CN110493029B (en) 2019-07-01 2019-07-01 Transmission method, transmission device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910586438.5A CN110493029B (en) 2019-07-01 2019-07-01 Transmission method, transmission device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110493029A CN110493029A (en) 2019-11-22
CN110493029B true CN110493029B (en) 2022-07-26

Family

ID=68546462

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910586438.5A Active CN110493029B (en) 2019-07-01 2019-07-01 Transmission method, transmission device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110493029B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115037739B (en) * 2022-06-13 2024-02-23 深圳乐播科技有限公司 File transmission method and device, electronic equipment and storage medium
CN115270077B (en) * 2022-08-16 2024-01-26 南京网藤科技有限公司 Method, device, electronic equipment and computer readable medium for smoothing calculation progress

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106161633A (en) * 2016-07-20 2016-11-23 柏科数据技术(深圳)股份有限公司 A kind of based on the transmission method of packaging file under cloud computing environment and system
CN107766464A (en) * 2017-09-28 2018-03-06 努比亚技术有限公司 A kind of file memory method, terminal and computer-readable recording medium
CN108881454A (en) * 2018-06-28 2018-11-23 北京珠穆朗玛移动通信有限公司 Document transmission method, mobile terminal and storage medium
CN109842652A (en) * 2017-11-27 2019-06-04 中兴通讯股份有限公司 A kind of method for uploading of file, terminal, Cloud Server and computer storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685159B (en) * 2011-03-10 2016-08-17 腾讯科技(深圳)有限公司 Document transmission method and device
CN102708187B (en) * 2012-05-14 2014-04-30 成都信息工程学院 Reverse index mixed compression and decompression method based on Hbase database

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106161633A (en) * 2016-07-20 2016-11-23 柏科数据技术(深圳)股份有限公司 A kind of based on the transmission method of packaging file under cloud computing environment and system
CN107766464A (en) * 2017-09-28 2018-03-06 努比亚技术有限公司 A kind of file memory method, terminal and computer-readable recording medium
CN109842652A (en) * 2017-11-27 2019-06-04 中兴通讯股份有限公司 A kind of method for uploading of file, terminal, Cloud Server and computer storage medium
CN108881454A (en) * 2018-06-28 2018-11-23 北京珠穆朗玛移动通信有限公司 Document transmission method, mobile terminal and storage medium

Also Published As

Publication number Publication date
CN110493029A (en) 2019-11-22

Similar Documents

Publication Publication Date Title
CN109739810B (en) File synchronization method, server, client and device with storage function
EP3223165A1 (en) File processing method, system and server-clustered system for cloud storage
CN109246229A (en) A kind of method and apparatus of distribution resource acquisition request
CN110493029B (en) Transmission method, transmission device, electronic equipment and storage medium
EP3159803A1 (en) Data storage method and network interface card
CN110708377A (en) Data transmission method, device and storage medium
CN104199912B (en) A kind of method and device of task processing
JP6966432B2 (en) Cloud file processing method and equipment
CN109951494B (en) Simulation data processing method and device, simulation equipment and storage medium
CN109213774B (en) Data storage method and device, storage medium and terminal
CN109491788A (en) A kind of virtual platform implementation of load balancing and device
CN104239125B (en) Object processing method, distributed file system and client device
CN109902103A (en) Service data management method, device, equipment and computer readable storage medium
CN108234551A (en) A kind of data processing method and device
CN109213447A (en) A kind of SAN storage volume carry, discharging method and system
CN111683114A (en) Method and device for upgrading equipment program, terminal equipment and storage medium
CN106534247B (en) The method and apparatus of list downloading
CN112988039B (en) Data uploading method and device, cloud storage gateway and system and storage medium
CN104850431A (en) Stabilizing treatment method and device based on FOTA (Firmware Over-The-Air) upgrading
CN110489356B (en) Information processing method, information processing device, electronic equipment and storage medium
CN114553895B (en) Data synchronization method, system, storage medium and electronic equipment
CN110334018A (en) A kind of big data introduction method and relevant device
CN105549911B (en) The data transmission method and device of NVRAM
CN112631577B (en) Model scheduling method, model scheduler and model safety test platform
EP3346380A1 (en) Methods for adaptive placement of applications and devices thereof

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
GR01 Patent grant
GR01 Patent grant