CN115086295A - File transmission method, file transmission device, server and storage medium - Google Patents
File transmission method, file transmission device, server and storage medium Download PDFInfo
- Publication number
- CN115086295A CN115086295A CN202210584928.3A CN202210584928A CN115086295A CN 115086295 A CN115086295 A CN 115086295A CN 202210584928 A CN202210584928 A CN 202210584928A CN 115086295 A CN115086295 A CN 115086295A
- Authority
- CN
- China
- Prior art keywords
- file
- transmitted
- data
- information
- folder
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 289
- 238000000034 method Methods 0.000 title claims abstract description 51
- 238000012545 processing Methods 0.000 claims abstract description 58
- 238000004891 communication Methods 0.000 claims description 30
- 238000004590 computer program Methods 0.000 claims description 11
- 238000012546 transfer Methods 0.000 abstract description 15
- 230000008569 process Effects 0.000 abstract description 9
- 238000013075 data extraction Methods 0.000 abstract 6
- 238000005516 engineering process Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 230000003993 interaction Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present disclosure relates to a file transfer method, a file transfer apparatus, a server, and a storage medium. The file transmission method comprises the following steps: acquiring target source data; determining a predefined data processing protocol, wherein the data processing protocol comprises a characteristic data extraction mode; the characteristic data extraction mode is at least used for compiling data in a first data format in the target source data into data in a second data format; extracting feature data of a target field from target source data based on a feature data extraction mode; the extracted feature data is stored based on a predetermined storage format. In the application, a data processing protocol for processing specific data can be defined in the platform, and a characteristic data extraction mode is defined through the data processing protocol to realize data extraction of the specific data. The feature data extraction of the target source data can be automatically realized in the whole process without human intervention, so that errors possibly caused by human operation can be reduced, and the automation and the process of data processing are realized.
Description
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a file transmission method, a file transmission apparatus, a server, and a storage medium.
Background
With the development of information technology, various terminal devices are emerging. In the process of using the device by a user, various files can be generated and used, a large number of files are often grouped into a set according to dimensions such as file organization structures, types and time, and a common folder structure is in the form. When information interaction is performed through terminal devices, data transmission, including various file transmission, sometimes needs to be performed between the terminal devices.
Disclosure of Invention
The disclosure provides a file transmission method, a file transmission device, a server and a storage medium.
In a first aspect of the embodiments of the present disclosure, a file transmission method is provided, including:
establishing communication connection with a data receiving end;
sending folder information of a folder to be transmitted to the data receiving end, wherein the folder information at least comprises directory information of the folder to be transmitted in a storage area;
receiving a file transmission request sent by the data receiving terminal, wherein the file transmission request is used for indicating the data sending terminal to send a file to be transmitted in the folder to be transmitted to the data receiving terminal; the file transmission request at least comprises file information of all files to be transmitted in the folder to be transmitted;
and sending the file to be transmitted to the data receiving end in a compressed data stream form based on the file transmission request.
In some embodiments, the file information at least includes file attribute information of all files to be transmitted and sequence information of the files to be transmitted during transmission;
the sending the file to be transmitted to the data receiving end in a compressed data stream form based on the file transmission request at least comprises:
and sending each file to be transmitted to the data receiving end in a compressed data stream mode in sequence based on the sequence information of each file to be transmitted during transmission.
In some embodiments, the file transmission request at least includes data breakpoint information of a file which is not completely transmitted, and the data breakpoint information at least includes position information of a data node which is interrupted during file transmission;
the sending the file to be transmitted to the data receiving end in a compressed data stream form based on the file transmission request at least comprises:
determining to send data start information of the file which is not transmitted to the data receiving end based on the data breakpoint information;
based on the data initial information, sending files which are not transmitted completely to the data receiving end; the data initial information at least comprises position information of initial data when the file which is not transmitted is retransmitted to the data receiving end.
In some embodiments, the sending the file to be transmitted to the data receiving end in the form of a compressed data stream based on the file transmission request includes:
generating a temporary file of the file to be transmitted, wherein the temporary file at least comprises file information of the file to be transmitted; the file format of the temporary file is different from the file format of the file to be transmitted; the file information at least comprises a file name of the file to be transmitted, an original length of the file, and/or the data initial information;
and sending the temporary file and the file to be transmitted to the data receiving end in a compressed data stream form based on the file transmission request, wherein the temporary file is used for determining whether the received file to be transmitted is correct or not according to the file name after the temporary file is received by the data receiving end, and determining the receiving progress of receiving the file to be transmitted according to the original length of the file.
A second aspect of the embodiments of the present disclosure provides a file transmission method, which is applied to a data receiving end and includes:
establishing communication connection with a data sending end;
receiving folder information of a folder to be transmitted, which is sent by the data sending end, based on the communication connection, wherein the folder information at least comprises directory information of the folder to be transmitted in a storage area;
generating a file transmission request based on the folder information of the folder to be transmitted, wherein the file transmission request is used for indicating the data sending end to send the file to be transmitted in the folder to be transmitted to the data receiving end; the file transmission request at least comprises file information of all files to be transmitted in the folder to be transmitted;
sending the file transmission request to the data sending end;
and receiving the file to be transmitted by the data receiving end in a compressed data stream form.
In some embodiments, the file information at least includes file attribute information of all files to be transmitted and sequence information of the files to be transmitted during transmission;
the receiving of the file to be transmitted by the data receiving end in the form of compressed data stream includes:
and sequentially receiving the files to be transmitted by the data receiving end based on the sequence information.
In some embodiments, the receiving the file to be transmitted, which is transmitted by the data receiving end in the form of compressed data stream, includes:
storing the received data breakpoint information of the file to be transmitted;
if the file to be transmitted is interrupted when the file to be transmitted is not received, generating a file transmission request containing the data breakpoint information; the data breakpoint information at least comprises position information of a data node interrupted during file transmission;
and sending the file transmission request containing the data breakpoint information to the data sending end, so that the data sending end sends the file which is not transmitted completely to the data receiving end based on the data breakpoint information.
In some embodiments, the receiving the file to be transmitted, which is transmitted by the data receiving end in the form of compressed data stream, includes:
receiving a temporary file of the file to be transmitted, wherein the temporary file at least comprises file information of the file to be transmitted; the file format of the temporary file is different from the file format of the file to be transmitted; the temporary file of the file to be transmitted is generated by the data sending end; the file information at least comprises a file name of the file to be transmitted, an original length of the file, and/or data initial information; the data starting information is determined by the data sending end according to the received data breakpoint information;
determining whether the received file to be transmitted is correct or not according to the file name; and
and determining the receiving progress of receiving the file to be transmitted based on the original file length of the file to be transmitted.
A third aspect of the embodiments of the present disclosure provides a file transmission apparatus, which is applied to a data sending end and includes:
the first processing unit is used for establishing communication connection with the data receiving end;
the second processing unit is used for sending folder information of a folder to be transmitted to the data receiving end, wherein the folder information at least comprises directory information of the folder to be transmitted in a storage area;
the third processing unit is configured to receive a file transmission request sent by the data receiving terminal, where the file transmission request is used to instruct the data sending terminal to send a file to be transmitted in the folder to be transmitted to the data receiving terminal; the file transmission request at least comprises file information of all files to be transmitted in the folder to be transmitted;
and the fourth processing unit is configured to send the file to be transmitted to the data receiving end in a compressed data stream form based on the file transmission request.
In some embodiments, the file information at least includes file attribute information of all files to be transmitted and sequence information of the files to be transmitted during transmission;
the fourth processing unit is used for
And sending each file to be transmitted to the data receiving end in a compressed data stream mode in sequence based on the sequence information of each file to be transmitted during transmission.
In some embodiments, the file transmission request at least includes data breakpoint information of a file which is not completely transmitted, and the data breakpoint information at least includes position information of a data node which is interrupted during file transmission;
the fourth processing unit is used for
Determining to send data start information of the file which is not transmitted to the data receiving end based on the data breakpoint information;
based on the data initial information, sending files which are not transmitted completely to the data receiving end; the data initial information at least comprises position information of initial data when the file which is not transmitted is retransmitted to the data receiving end.
In some embodiments, the fourth processing unit is configured to
Generating a temporary file of the file to be transmitted, wherein the temporary file at least comprises file information of the file to be transmitted; the file format of the temporary file is different from the file format of the file to be transmitted; the file information at least comprises a file name of the file to be transmitted, an original length of the file, and/or the data initial information;
and sending the temporary file and the file to be transmitted to the data receiving end in a compressed data stream form based on the file transmission request, wherein the temporary file is used for determining whether the received file to be transmitted is correct or not according to the file name after the temporary file is received by the data receiving end, and determining the receiving progress of receiving the file to be transmitted according to the original length of the file.
A fourth aspect of the embodiments of the present disclosure provides a file transmission apparatus, which is applied to a data receiving end and includes:
the first processing unit is used for establishing communication connection with the data sending end;
the second processing unit is used for receiving folder information of a folder to be transmitted, which is sent by the data sending end, based on the communication connection, wherein the folder information at least comprises directory information of the folder to be transmitted in a storage area;
the third processing unit is configured to generate a file transmission request based on the folder information of the folder to be transmitted, where the file transmission request is used to instruct the data sending end to send a file to be transmitted in the folder to be transmitted to the data receiving end; the file transmission request at least comprises file information of all files to be transmitted in the folder to be transmitted;
and the fourth processing unit is configured to send the file transmission request to the data sending end, and receive the file to be transmitted, which is transmitted by the data receiving end in a compressed data stream form.
In some embodiments, the file information at least includes file attribute information of all files to be transmitted and sequence information of the files to be transmitted during transmission;
and the fourth processing unit is configured to sequentially receive each file to be transmitted, which is transmitted by the data receiving end based on the sequence information.
In some embodiments, the fourth processing unit is configured to
Storing the received data breakpoint information of the file to be transmitted;
if the file to be transmitted is interrupted when the file to be transmitted is not received, generating a file transmission request containing the data breakpoint information; the data breakpoint information at least comprises position information of a data node interrupted during file transmission;
and sending the file transmission request containing the data breakpoint information to the data sending end, so that the data sending end sends the file which is not transmitted completely to the data receiving end based on the data breakpoint information.
In some embodiments, the fourth processing unit is configured to
Receiving a temporary file of the file to be transmitted, wherein the temporary file at least comprises file information of the file to be transmitted; the file format of the temporary file is different from the file format of the file to be transmitted; the temporary file of the file to be transmitted is generated by the data sending end; the file information at least comprises a file name of the file to be transmitted, an original length of the file, and/or data initial information; the data starting information is determined by the data sending end according to the received data breakpoint information;
determining whether the received file to be transmitted is correct or not according to the file name; and
and determining the receiving progress of receiving the file to be transmitted based on the original file length of the file to be transmitted.
A fifth aspect of embodiments of the present disclosure provides a server, including: a processor and a memory for storing a computer program operable on the processor, wherein the processor is operable to perform the steps of the method of the first and second aspects when executing the computer program.
A sixth aspect of embodiments of the present disclosure provides a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the method of the first and second aspects.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
the file transmission method in the embodiment of the disclosure comprises the following steps: establishing communication connection with a data receiving end; sending folder information of a folder to be transmitted to a data receiving end, wherein the folder information at least comprises directory information of the folder to be transmitted in a storage area; receiving a file transmission request sent by a data receiving terminal, wherein the file transmission request is used for indicating the data sending terminal to send a file to be transmitted in a folder to be transmitted to the data receiving terminal; the file transmission request at least comprises file information of all files to be transmitted in the folder to be transmitted; and sending the file to be transmitted to a data receiving end in a compressed data stream form based on the file transmission request. When the data transmitting end and the data receiving end transmit files, the data transmitting end transmits the files to be transmitted to the data receiving end in a compressed data stream mode according to the file transmission request transmitted by the data receiving end. The file transmission request sent by the data receiving end comprises file information of all files to be transmitted, so that the data sending end can directly send the files to be transmitted to the data receiving end after sending the folders to be transmitted to the data receiving end in a compressed data stream mode, one file does not need to be sent by receiving one file transmission request, and all the files to be transmitted do not need to be traversed in the folders, and therefore the file transmission time can be effectively shortened.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart illustrating a file transfer method according to an example embodiment.
Fig. 2 is a flowchart illustrating a file transfer method according to an exemplary embodiment.
Fig. 3 is a flowchart illustrating a file transfer method according to an exemplary embodiment.
Fig. 4 is a first schematic structural diagram of a file transfer device according to an exemplary embodiment.
Fig. 5 is a schematic structural diagram of a file transfer device according to an exemplary embodiment.
FIG. 6 is a device block diagram illustrating an electronic device in accordance with an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of devices consistent with certain aspects of the present disclosure, as detailed in the appended claims.
With the development of information technology, various terminal devices are emerging. In the process that a user uses the device, various files can be generated and used, a large number of files are often grouped into a set according to dimensions such as file organization structures, types and time, and common folder structures are in the form. When information interaction is performed through terminal devices, data transmission, including various file transmission, sometimes needs to be performed between the terminal devices.
The embodiment of the disclosure provides a file transmission method. Fig. 1 is a flowchart illustrating a file transfer method according to an exemplary embodiment. As shown in fig. 1, the file transfer method includes:
and step 13, sending the file to be transmitted to the data receiving end in a compressed data stream form based on the file transmission request.
In the embodiment of the disclosure, when a data sending end and a data receiving end transmit files, online transmission can be performed in a compressed data stream mode, after a sending end and a receiving end are connected, whether the two sides support the compressed file transmission mode is firstly confirmed, if the receiving end supports the compressed file transmission mode, folder information selected to be sent by a user is firstly obtained, and the folder information can not contain file information to be transmitted, and is sent to the receiving end;
after receiving the folder information, the receiver checks whether the folder is transmitted locally, and determines the file information of the file to be transmitted by the folder. And when the folder is not transmitted locally, establishing the folder to be transmitted, and receiving the file to be transmitted sent by the data sending end in a compressed data stream mode.
In the embodiment of the disclosure, before sending a file to a data receiving end, a data sending end receives a file transmission request sent by the data receiving end, where the file transmission request includes file information of all files to be transmitted in the folder to be transmitted. The data sending end can send all the files to be transmitted in the folder to be transmitted to the data receiving end according to the file transmission request, and in the process, one file is sent without receiving one file transmission request, and all the files to be transmitted do not need to be traversed in the folder, so that the file transmission time can be effectively reduced.
In some embodiments, the file information at least includes file attribute information of all files to be transmitted and sequence information of the files to be transmitted during transmission;
the sending the file to be transmitted to the data receiving end in a compressed data stream form based on the file transmission request at least includes:
and sending each file to be transmitted to the data receiving end in a compressed data stream mode in sequence based on the sequence information of each file to be transmitted during transmission.
In the embodiment of the present disclosure, the file attribute information includes information such as a file size, a file type, and a position of a file in a folder to be transmitted. When the file is transmitted, the file can be transmitted according to the sequence information of the files to be transmitted during transmission. For example, the folder contains a plurality of files to be transmitted, including a first file to be transmitted, a second file to be transmitted, and a third file to be transmitted, wherein it can be determined that the transmission sequence of the files is that the first file to be transmitted, the second file to be transmitted, and the third file to be transmitted, and when the files are transmitted, the files to be transmitted can be sequentially transmitted from the first file to be transmitted, the second file to be transmitted, and the third file to be transmitted.
In this disclosure, the sequence information may further include a transmission condition for determining a transmission sequence of each file to be transmitted. The transmission condition may be that the files to be transmitted are sequentially transmitted from the large file to the small file according to the file sizes of the files to be transmitted, or the first type file is transmitted first and then the second type file is transmitted according to the file format, for example, the text file is transmitted first and then the video file is transmitted.
The sending of each file to be transmitted to the data receiving end in the form of compressed data stream in sequence based on the sequence information of each file to be transmitted during transmission includes:
determining the transmission sequence of each file to be transmitted during file transmission according to the transmission conditions,
and sequentially transmitting the files to be transmitted to the data receiving end according to the determined transmission sequence.
In some embodiments, the file transmission request at least includes data breakpoint information of a file which is not completely transmitted, and the data breakpoint information at least includes location information of a data node which is interrupted during file transmission;
the sending the file to be transmitted to the data receiving end in a compressed data stream form based on the file transmission request at least includes:
determining to send data start information of the file which is not transmitted to the data receiving end based on the data breakpoint information;
based on the data initial information, sending files which are not transmitted completely to the data receiving end; the data initial information at least comprises position information of initial data when the file which is not transmitted is retransmitted to the data receiving end.
In the embodiment of the disclosure, in the file transmission process, when the file transmission is interrupted, the data receiving end can send the data breakpoint information of the file which is not completely transmitted to the data sending end through the file transmission request; because file transmission is performed based on compressed data stream, the position where data transmission is interrupted determined at a data receiving end may not be the same as the position corresponding to the data sending end, and therefore the data sending end is required to determine, according to the received data breakpoint information, data start information of a file which is not transmitted to the data receiving end; and when the file which is not transmitted is sent, the position information of the initial data resends the file to be transmitted to the data receiving end.
In some embodiments, the sending the file to be transmitted to the data receiving end in the form of a compressed data stream based on the file transmission request includes:
generating a temporary file of the file to be transmitted, wherein the temporary file at least comprises file information of the file to be transmitted; the file format of the temporary file is different from the file format of the file to be transmitted; the file information at least comprises a file name of the file to be transmitted, an original length of the file, and/or the data initial information;
and sending the temporary file and the file to be transmitted to the data receiving end in a compressed data stream form based on the file transmission request, wherein the temporary file is used for determining whether the received file to be transmitted is correct or not according to the file name after the temporary file is received by the data receiving end, and determining the receiving progress of receiving the file to be transmitted according to the original length of the file.
In the embodiment of the disclosure, when the data sending end sends the file to be transmitted to the data receiving end according to the received file transmission request, a temporary file may be generated first. Each time a file to be transmitted is sent, a temporary file may be provided. The file format of the temporary file is different from that of the file to be transmitted, so that the temporary file can be recognized by a data receiving end. The temporary file comprises file information of a corresponding file to be transmitted, and the file information at least comprises a file name of the file to be transmitted, an original length of the file, and/or data initial information.
When the file transmission request does not include the data breakpoint information, the corresponding temporary file may not include the data start information. When the file transmission request contains data breakpoint information, the data receiving end indicates the data sending end to send the file with transmission interruption. Therefore, when the file received by the data receiving end is interrupted in transmission, the file transmission can be resumed by loading the data breakpoint information of the file to be transmitted which is not completely transmitted in the file transmission request.
The embodiment of the disclosure provides a file transmission method. Fig. 2 is a flowchart illustrating a file transfer method according to an exemplary embodiment. As shown in fig. 2, the file transmission method applied to the data receiving end includes:
establishing communication connection with a data sending end;
receiving folder information of a folder to be transmitted, which is sent by the data sending end, based on the communication connection, wherein the folder information at least comprises directory information of the folder to be transmitted in a storage area;
generating a file transmission request based on the folder information of the folder to be transmitted, wherein the file transmission request is used for indicating the data sending end to send the file to be transmitted in the folder to be transmitted to the data receiving end; the file transmission request at least comprises file information of all files to be transmitted in the folder to be transmitted;
sending the file transmission request to the data sending end;
and receiving the file to be transmitted by the data receiving end in a compressed data stream form.
In the embodiment of the present disclosure, when the data sending end sends the folder information to the data receiving end, the data sending end may also send the file information of all the files to be transmitted in the folder to the data receiving end together. The data receiving end determines the required files to be transmitted according to the requirements, and can also completely receive all the files to be transmitted. And sending a file transmission request containing file information of all files to be transmitted to a data sending end, and indicating the data sending end to send the folders and the files to be transmitted in the folders in a compressed data stream mode.
In the embodiment of the disclosure, when a data sending end and a data receiving end transmit files, online transmission can be performed in a compressed data stream mode, after a sender and a receiver are connected, whether the sender and the receiver support the compressed file transmission mode is firstly confirmed, if the receiver supports the compressed file transmission mode, folder information selected to be sent by a user is firstly obtained, and the folder information can not contain file information to be transmitted, and is sent to the receiver;
after receiving the folder information, the receiver checks whether the folder is transmitted locally, and determines the file information of the file to be transmitted by the folder. And when the folder is not transmitted locally, establishing the folder to be transmitted, and receiving the file to be transmitted sent by the data sending end in a compressed data stream mode.
In the embodiment of the disclosure, before sending a file to a data receiving end, a data sending end receives a file transmission request sent by the data receiving end, where the file transmission request includes file information of all files to be transmitted in the folder to be transmitted. The data sending end can send all the files to be transmitted in the folder to be transmitted to the data receiving end according to the file transmission request, and in the process, one file is not required to be sent without receiving one file transmission request, and all the files to be transmitted are not required to be traversed in the folder, so that the file transmission time can be effectively reduced.
In some embodiments, the file information at least includes file attribute information of all files to be transmitted and sequence information of the files to be transmitted during transmission;
the receiving of the file to be transmitted by the data receiving end in the form of compressed data stream includes:
and sequentially receiving the files to be transmitted by the data receiving end based on the sequence information.
In the embodiment of the present disclosure, the file attribute information includes information such as a file size, a file type, and a position of a file in a folder to be transmitted. When the file is transmitted, the file can be transmitted according to the sequence information of the files to be transmitted during transmission. For example, the folder contains a plurality of files to be transmitted, including a first file to be transmitted, a second file to be transmitted, and a third file to be transmitted, wherein it can be determined that the transmission sequence of the files is that the first file to be transmitted, the second file to be transmitted, and the third file to be transmitted, and when the files are transmitted, the files to be transmitted can be sequentially transmitted from the first file to be transmitted, the second file to be transmitted, and the third file to be transmitted.
In this disclosure, the sequence information may further include a transmission condition for determining a transmission sequence of each file to be transmitted. The transmission condition may be that the files to be transmitted are sequentially transmitted from the large file to the small file according to the file sizes of the files to be transmitted, or the first type file is transmitted first and then the second type file is transmitted according to the file format, for example, the text file is transmitted first and then the video file is transmitted.
The data sending end determines the transmission sequence of the files to be transmitted when the files are transmitted according to the transmission conditions;
the sequentially receiving the files to be transmitted by the data receiving terminal based on the sequential information comprises:
and sequentially receiving the files to be transmitted which are sequentially transmitted by the data transmitting end according to the determined transmission sequence.
In some embodiments, the receiving the file to be transmitted, which is transmitted by the data receiving end in the form of compressed data stream, includes:
storing the received data breakpoint information of the file to be transmitted;
if the file to be transmitted is interrupted when the file to be transmitted is not received, generating a file transmission request containing the data breakpoint information; the data breakpoint information at least comprises position information of a data node interrupted during file transmission;
and sending the file transmission request containing the data breakpoint information to the data sending end, so that the data sending end sends the file which is not transmitted completely to the data receiving end based on the data breakpoint information.
In the embodiment of the disclosure, in the file transmission process, when the file transmission is interrupted, the data receiving end can send the data breakpoint information of the file which is not completely transmitted to the data sending end through the file transmission request; because file transmission is based on compressed data stream transmission, the position of data transmission interruption determined at a data receiving end may not be the same as the position corresponding to a data sending end, and therefore the data sending end is required to determine, according to received data breakpoint information, data start information of a file which is not transmitted to the data receiving end; and when the file which is not transmitted is sent, the position information of the initial data resends the file to be transmitted to the data receiving end.
In some embodiments, the receiving the file to be transmitted, which is transmitted by the data receiving end in the form of compressed data stream, includes:
receiving a temporary file of the file to be transmitted, wherein the temporary file at least comprises file information of the file to be transmitted; the file format of the temporary file is different from the file format of the file to be transmitted; the temporary file of the file to be transmitted is generated by the data sending end; the file information at least comprises a file name of the file to be transmitted, an original length of the file, and/or data initial information; the data starting information is determined by the data sending end according to the received data breakpoint information;
determining whether the received file to be transmitted is correct or not according to the file name; and
and determining the receiving progress of receiving the file to be transmitted based on the original file length of the file to be transmitted.
In the embodiment of the disclosure, when the data sending end sends a file to be transmitted to the data receiving end according to the received file transmission request, a temporary file can be generated first. Each time a file to be transmitted is sent, a temporary file may be provided. The file format of the temporary file is different from that of the file to be transmitted, so that the temporary file can be recognized by a data receiving end. The temporary file comprises file information of a corresponding file to be transmitted, and the file information at least comprises a file name of the file to be transmitted, an original length of the file, and/or data initial information.
When the file transmission request does not include the data breakpoint information, the corresponding temporary file may not include the data start information. When the file transmission request contains data breakpoint information, the data receiving end indicates the data sending end to send the file with transmission interruption. Therefore, when the file received by the data receiving end is interrupted in transmission, the file transmission can be resumed by loading the data breakpoint information of the file to be transmitted which is not completely transmitted in the file transmission request.
In the embodiment of the disclosure, when receiving a file to be transmitted, a data receiving end also receives a corresponding temporary file, and determines whether the received file to be transmitted is correct according to the file name; and determining the receiving progress of receiving the file to be transmitted based on the original file length of the file to be transmitted.
Fig. 3 is a flowchart illustrating a file transfer method according to an exemplary embodiment. As shown in fig. 3, includes:
According to the method and the device, the downloading request can be executed at the data receiving terminal only by sending the information of the folder to the data receiving terminal without the subfile information of the folder, and the transmission of the folder is started.
When the folder contains a plurality of files, all the subfiles in the directory can be written in by only one time of requesting the data sending end, the data receiving end decompresses the files in real time, one time of request execution is not needed for each file, and the problem of low transmission speed caused by slow start in a similar TCP protocol can be avoided.
The method and the device can decompress in real time at the data receiving end, temporarily store the completed file which is not transmitted and record the position of the file, inform the size and the position of the unfinished file to the data sending end when the data receiving end requests the file, and find the corresponding position of the corresponding file of the data sending end according to the relative position of the received file by the data sending end.
According to the method and the device, a temporary compressed file is generated before a compressed stream of the file is sent, the name of the file can be added with letter symbols and the like according to the name of the next file to be sent, characters which cannot be used in the real file serve as prefixes and are prevented from being repeated with the real name in a folder, the temporary file can be associated with the file to be sent, and a data receiving end can determine whether the file is the real file or not through the same rule or record the temporary file of the file information. The information of the temporary file comprises the position, the size, the breakpoint continuous transmission and other related information of the next file. The data receiving end can analyze the information when receiving the file, the progress can be calculated according to the size, and the breakpoint continuous transmission information can execute breakpoint continuous transmission operation.
The file transmission method can effectively reduce network requests, save transmission time, improve transmission speed and transmission success rate, and simultaneously still support breakpoint continuous transmission and progress calculation.
The embodiment of the disclosure provides a file transmission device. Fig. 4 is a first schematic structural diagram of a file transfer device according to an exemplary embodiment. As shown in fig. 4, the file transfer apparatus, applied to a data transmitting end, includes:
a first processing unit 41, configured to establish a communication connection with a data receiving end;
the second processing unit 42 is configured to send folder information of a folder to be transmitted to the data receiving end, where the folder information at least includes directory information of the folder to be transmitted in the storage area;
a third processing unit 43, configured to receive a file transmission request sent by the data receiving end, where the file transmission request is used to instruct the data sending end to send a file to be transmitted in the folder to be transmitted to the data receiving end; the file transmission request at least comprises file information of all files to be transmitted in the folder to be transmitted;
a fourth processing unit 44, configured to send the file to be transmitted to the data receiving end in a form of a compressed data stream based on the file transmission request.
In the embodiment of the disclosure, when a data sending end and a data receiving end transmit files, online transmission can be performed in a compressed data stream mode, after a sending end and a receiving end are connected, whether the two sides support the compressed file transmission mode is firstly confirmed, if the receiving end supports the compressed file transmission mode, folder information selected to be sent by a user is firstly obtained, and the folder information can not contain file information to be transmitted, and is sent to the receiving end;
after receiving the folder information, the receiver checks whether the folder is transmitted locally, and determines the file information of the file to be transmitted by the folder. And when the folder is not transmitted locally, establishing the folder to be transmitted, and receiving the file to be transmitted sent by the data sending end in a compressed data stream mode.
In the embodiment of the disclosure, before sending a file to a data receiving end, a data sending end receives a file transmission request sent by the data receiving end, where the file transmission request includes file information of all files to be transmitted in the folder to be transmitted. The data sending end can send all the files to be transmitted in the folder to be transmitted to the data receiving end according to the file transmission request, and in the process, one file is sent without receiving one file transmission request, and all the files to be transmitted do not need to be traversed in the folder, so that the file transmission time can be effectively reduced.
In some embodiments, the file information at least includes file attribute information of all files to be transmitted and sequence information of the files to be transmitted during transmission;
the fourth processing unit is used for
And sending each file to be transmitted to the data receiving end in a compressed data stream mode in sequence based on the sequence information of each file to be transmitted during transmission.
In the embodiment of the present disclosure, the file attribute information includes information such as a file size, a file type, and a position of a file in a folder to be transmitted. When the file is transmitted, the file can be transmitted according to the sequence information of the files to be transmitted during transmission. For example, the folder contains a plurality of files to be transmitted, including a first file to be transmitted, a second file to be transmitted, and a third file to be transmitted, wherein it can be determined that the transmission sequence of the files is that the first file to be transmitted, the second file to be transmitted, and the third file to be transmitted, and when the files are transmitted, the files to be transmitted can be sequentially transmitted from the first file to be transmitted, the second file to be transmitted, and the third file to be transmitted.
In this disclosure, the sequence information may further include a transmission condition for determining a transmission sequence of each file to be transmitted. The transmission condition may be that the files to be transmitted are sequentially transmitted from the large file to the small file according to the file sizes of the files to be transmitted, or the first type file is transmitted first and then the second type file is transmitted according to the file format, for example, the text file is transmitted first and then the video file is transmitted.
The sending of each file to be transmitted to the data receiving end in the form of compressed data stream in sequence based on the sequence information of each file to be transmitted during transmission includes:
determining the transmission sequence of each file to be transmitted during file transmission according to the transmission conditions,
and sequentially transmitting the files to be transmitted to the data receiving end according to the determined transmission sequence.
In some embodiments, the file transmission request at least includes data breakpoint information of a file which is not completely transmitted, and the data breakpoint information at least includes position information of a data node which is interrupted during file transmission;
the fourth processing unit is used for
Determining to send data start information of the file which is not transmitted to the data receiving end based on the data breakpoint information;
based on the data initial information, sending files which are not transmitted completely to the data receiving end; the data initial information at least comprises position information of initial data when the file which is not transmitted is retransmitted to the data receiving end.
In the embodiment of the disclosure, in the file transmission process, when the file transmission is interrupted, the data receiving end can send the data breakpoint information of the file which is not completely transmitted to the data sending end through the file transmission request; because file transmission is based on compressed data stream transmission, the position of data transmission interruption determined at a data receiving end may not be the same as the position corresponding to a data sending end, and therefore the data sending end is required to determine, according to received data breakpoint information, data start information of a file which is not transmitted to the data receiving end; and when the file which is not transmitted is sent, the position information of the initial data resends the file to be transmitted to the data receiving end.
In some embodiments, the fourth processing unit is configured to
Generating a temporary file of the file to be transmitted, wherein the temporary file at least comprises file information of the file to be transmitted; the file format of the temporary file is different from the file format of the file to be transmitted; the file information at least comprises a file name of the file to be transmitted, an original length of the file, and/or the data initial information;
and sending the temporary file and the file to be transmitted to the data receiving end in a compressed data stream form based on the file transmission request, wherein the temporary file is used for determining whether the received file to be transmitted is correct or not according to the file name after the temporary file is received by the data receiving end, and determining the receiving progress of receiving the file to be transmitted according to the original length of the file.
In the embodiment of the disclosure, when the data sending end sends the file to be transmitted to the data receiving end according to the received file transmission request, a temporary file may be generated first. Each time a file to be transmitted is sent, a temporary file may be provided. The file format of the temporary file is different from that of the file to be transmitted, so that the temporary file can be recognized by a data receiving end. The temporary file comprises file information of a corresponding file to be transmitted, and the file information at least comprises a file name of the file to be transmitted, an original length of the file, and/or data initial information.
When the file transmission request does not include the data breakpoint information, the corresponding temporary file may not include the data start information. When the file transmission request contains data breakpoint information, the data receiving end indicates the data sending end to send the file with transmission interruption. Therefore, when the file received by the data receiving end is interrupted in transmission, the file transmission can be resumed by loading the data breakpoint information of the file to be transmitted which is not completely transmitted in the file transmission request.
A fourth aspect of the disclosed embodiments provides a file transfer device.
Fig. 5 is a schematic structural diagram of a file transfer device according to an exemplary embodiment. As shown in fig. 5, the file transmission apparatus applied to the data receiving end includes:
a first processing unit 51, configured to establish a communication connection with a data sending end;
the second processing unit 52 is configured to receive, based on the communication connection, folder information of a folder to be transmitted, where the folder information at least includes directory information of the folder to be transmitted in a storage area;
a third processing unit 53, configured to generate a file transmission request based on the folder information of the folder to be transmitted, where the file transmission request is used to instruct the data sending end to send a file to be transmitted in the folder to be transmitted to the data receiving end; the file transmission request at least comprises file information of all files to be transmitted in the folder to be transmitted;
a fourth processing unit 54, configured to send the file transmission request to the data sending end, and receive the file to be transmitted, which is transmitted by the data receiving end in a compressed data stream form.
In the embodiment of the present disclosure, when the data sending end sends the folder information to the data receiving end, the data sending end may also send the file information of all the files to be transmitted in the folder to the data receiving end together. The data receiving end determines the required files to be transmitted according to the requirements, and can also completely receive all the files to be transmitted. And sending a file transmission request containing file information of all files to be transmitted to a data sending end, and indicating the data sending end to send the folders and the files to be transmitted in the folders in a compressed data stream mode.
In the embodiment of the disclosure, when a data sending end and a data receiving end transmit files, online transmission can be performed in a compressed data stream mode, after a sending end and a receiving end are connected, whether the two sides support the compressed file transmission mode is firstly confirmed, if the receiving end supports the compressed file transmission mode, folder information selected to be sent by a user is firstly obtained, and the folder information can not contain file information to be transmitted, and is sent to the receiving end;
after receiving the folder information, the receiver checks whether the folder is transmitted locally, and determines the file information of the file to be transmitted by the folder. And when the folder is not transmitted locally, establishing the folder to be transmitted, and receiving the file to be transmitted sent by the data sending end in a compressed data stream mode.
In the embodiment of the disclosure, before sending a file to a data receiving end, a data sending end receives a file transmission request sent by the data receiving end, where the file transmission request includes file information of all files to be transmitted in the folder to be transmitted. The data sending end can send all the files to be transmitted in the folder to be transmitted to the data receiving end according to the file transmission request, and in the process, one file is sent without receiving one file transmission request, and all the files to be transmitted do not need to be traversed in the folder, so that the file transmission time can be effectively reduced.
In some embodiments, the file information at least includes file attribute information of all files to be transmitted and sequence information of the files to be transmitted during transmission;
and the fourth processing unit is configured to sequentially receive each file to be transmitted, which is transmitted by the data receiving end based on the sequence information.
In the embodiment of the present disclosure, the file attribute information includes information such as a file size, a file type, and a position of a file in a folder to be transmitted. When the file is transmitted, the file can be transmitted according to the sequence information of the files to be transmitted during transmission. For example, the folder contains a plurality of files to be transmitted, including a first file to be transmitted, a second file to be transmitted, and a third file to be transmitted, wherein it can be determined that the transmission sequence of the files is that the first file to be transmitted, the second file to be transmitted, and the third file to be transmitted, and when the files are transmitted, the files to be transmitted can be sequentially transmitted from the first file to be transmitted, the second file to be transmitted, and the third file to be transmitted.
In this disclosure, the sequence information may further include a transmission condition for determining a transmission sequence of each file to be transmitted. The transmission condition may be that the files to be transmitted are sequentially transmitted from the large file to the small file according to the file sizes of the files to be transmitted, or the first type file is transmitted first and then the second type file is transmitted according to the file format, for example, the text file is transmitted first and then the video file is transmitted.
The data sending end determines the transmission sequence of the files to be transmitted when the files are transmitted according to the transmission conditions;
the sequentially receiving the files to be transmitted by the data receiving terminal based on the sequential information comprises:
and sequentially receiving the files to be transmitted which are sequentially transmitted by the data transmitting end according to the determined transmission sequence.
In some embodiments, the fourth processing unit is configured to
Storing the received data breakpoint information of the file to be transmitted;
if the file to be transmitted is interrupted when the file to be transmitted is not received, generating a file transmission request containing the data breakpoint information; the data breakpoint information at least comprises position information of a data node interrupted during file transmission;
and sending the file transmission request containing the data breakpoint information to the data sending end, so that the data sending end sends the file which is not transmitted completely to the data receiving end based on the data breakpoint information.
In the embodiment of the disclosure, in the file transmission process, when the file transmission is interrupted, the data receiving end can send the data breakpoint information of the file which is not completely transmitted to the data sending end through the file transmission request; because file transmission is performed based on compressed data stream, the position where data transmission is interrupted determined at a data receiving end may not be the same as the position corresponding to the data sending end, and therefore the data sending end is required to determine, according to the received data breakpoint information, data start information of a file which is not transmitted to the data receiving end; and when the file which is not transmitted is sent, the position information of the initial data resends the file to be transmitted to the data receiving end.
In some embodiments, the fourth processing unit is configured to
Receiving a temporary file of the file to be transmitted, wherein the temporary file at least comprises file information of the file to be transmitted; the file format of the temporary file is different from the file format of the file to be transmitted; the temporary file of the file to be transmitted is generated by the data sending end; the file information at least comprises a file name of the file to be transmitted, an original length of the file, and/or data initial information; the data starting information is determined by the data sending end according to the received data breakpoint information;
determining whether the received file to be transmitted is correct or not according to the file name; and
and determining the receiving progress of receiving the file to be transmitted based on the original file length of the file to be transmitted.
In the embodiment of the disclosure, when the data sending end sends the file to be transmitted to the data receiving end according to the received file transmission request, a temporary file may be generated first. Each time a file to be transmitted is sent, a temporary file may be provided. The file format of the temporary file is different from that of the file to be transmitted, so that the temporary file can be recognized by a data receiving end. The temporary file comprises file information of a corresponding file to be transmitted, and the file information at least comprises a file name of the file to be transmitted, an original length of the file, and/or data initial information.
When the file transmission request does not include the data breakpoint information, the corresponding temporary file may not include the data start information. When the file transmission request contains data breakpoint information, the data receiving end indicates the data sending end to send the file with transmission interruption. Therefore, when the file received by the data receiving end is interrupted in transmission, the file transmission can be resumed by loading the data breakpoint information of the file to be transmitted which is not completely transmitted in the file transmission request.
In the embodiment of the disclosure, when receiving a file to be transmitted, a data receiving end also receives a corresponding temporary file, and determines whether the received file to be transmitted is correct according to the file name; and determining the receiving progress of receiving the file to be transmitted based on the original file length of the file to be transmitted.
An embodiment of the present disclosure further provides a server, including: a processor and a memory for storing a computer program capable of running on the processor, wherein the processor is configured to execute the steps of the method according to the above embodiments when the processor runs the computer program.
The embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of the method in the foregoing embodiments.
FIG. 6 is a device block diagram illustrating an electronic device in accordance with an exemplary embodiment. For example, the electronic device can be a mobile phone, a computer, a digital broadcast electronic device, a messaging device, a gaming console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, an electronic device may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the electronic device, such as operations associated with touch, phone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power components 806 provide power to various components of the electronic device. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for electronic device devices.
The multimedia component 808 includes a screen that provides an output interface between the electronic device and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device. For example, the sensor assembly 814 may detect an open/closed state of the electronic device, the relative positioning of components, such as a display and keypad of the electronic device, the sensor assembly 814 may also detect a change in the position of the electronic device or a component of the electronic device, the presence or absence of user contact with the electronic device, orientation or acceleration/deceleration of the electronic device, and a change in the temperature of the electronic device. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, communications component 816 further includes a Near Field Communications (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (18)
1. A file transmission method is characterized in that the method applied to a data sending end comprises the following steps:
establishing communication connection with a data receiving end;
sending folder information of a folder to be transmitted to the data receiving end, wherein the folder information at least comprises directory information of the folder to be transmitted in a storage area;
receiving a file transmission request sent by the data receiving terminal, wherein the file transmission request is used for indicating the data sending terminal to send a file to be transmitted in the folder to be transmitted to the data receiving terminal; the file transmission request at least comprises file information of all files to be transmitted in the folder to be transmitted;
and sending the file to be transmitted to the data receiving end in a compressed data stream form based on the file transmission request.
2. The file transmission method according to claim 1, wherein the file information at least includes file attribute information of all files to be transmitted and sequence information of each file to be transmitted during transmission;
the sending the file to be transmitted to the data receiving end in a compressed data stream form based on the file transmission request at least comprises:
and sending each file to be transmitted to the data receiving end in a compressed data stream mode in sequence based on the sequence information of each file to be transmitted during transmission.
3. The file transmission method according to claim 1, wherein the file transmission request at least includes data breakpoint information of a file which is not completely transmitted, and the data breakpoint information at least includes location information of a data node which is interrupted during file transmission;
the sending the file to be transmitted to the data receiving end in a compressed data stream form based on the file transmission request at least comprises:
determining to send data start information of the file which is not transmitted to the data receiving end based on the data breakpoint information;
based on the data initial information, sending files which are not transmitted completely to the data receiving end; the data initial information at least comprises position information of initial data when the file which is not transmitted is retransmitted to the data receiving end.
4. The file transmission method according to claim 3, wherein the sending the file to be transmitted to the data receiving end in a compressed data stream based on the file transmission request comprises:
generating a temporary file of the file to be transmitted, wherein the temporary file at least comprises file information of the file to be transmitted; the file format of the temporary file is different from the file format of the file to be transmitted; the file information at least comprises a file name of the file to be transmitted, an original length of the file, and/or the data initial information;
and sending the temporary file and the file to be transmitted to the data receiving end in a compressed data stream form based on the file transmission request, wherein the temporary file is used for determining whether the received file to be transmitted is correct or not according to the file name after the temporary file is received by the data receiving end, and determining the receiving progress of receiving the file to be transmitted according to the original length of the file.
5. A file transmission method is characterized in that the file transmission method applied to a data receiving end comprises the following steps:
establishing communication connection with a data sending end;
receiving folder information of a folder to be transmitted, which is sent by the data sending end, based on the communication connection, wherein the folder information at least comprises directory information of the folder to be transmitted in a storage area;
generating a file transmission request based on the folder information of the folder to be transmitted, wherein the file transmission request is used for indicating the data sending end to send the file to be transmitted in the folder to be transmitted to the data receiving end; the file transmission request at least comprises file information of all files to be transmitted in the folder to be transmitted;
sending the file transmission request to the data sending end;
and receiving the file to be transmitted by the data receiving end in a compressed data stream form.
6. The file transmission method according to claim 5, wherein the file information at least includes file attribute information of all files to be transmitted and sequence information of each file to be transmitted during transmission;
the receiving of the file to be transmitted by the data receiving end in the form of compressed data stream includes:
and sequentially receiving the files to be transmitted by the data receiving end based on the sequence information.
7. The file transmission method according to claim 5, wherein the receiving the file to be transmitted, which is transmitted by the data receiving end in the form of compressed data stream, comprises:
storing the received data breakpoint information of the file to be transmitted;
if the file to be transmitted is interrupted when the file to be transmitted is not received, generating a file transmission request containing the data breakpoint information; the data breakpoint information at least comprises position information of a data node interrupted during file transmission;
and sending the file transmission request containing the data breakpoint information to the data sending end, so that the data sending end sends the file which is not transmitted completely to the data receiving end based on the data breakpoint information.
8. The file transmission method according to claim 7, wherein the receiving the file to be transmitted, which is transmitted by the data receiving end in the form of compressed data stream, comprises:
receiving a temporary file of the file to be transmitted, wherein the temporary file at least comprises file information of the file to be transmitted; the file format of the temporary file is different from the file format of the file to be transmitted; the temporary file of the file to be transmitted is generated by the data sending end; the file information at least comprises a file name of the file to be transmitted, an original length of the file, and/or data initial information; the data starting information is determined by the data sending end according to the received data breakpoint information;
determining whether the received file to be transmitted is correct or not according to the file name; and
and determining the receiving progress of receiving the file to be transmitted based on the original file length of the file to be transmitted.
9. A file transmission device is characterized in that the file transmission device applied to a data sending end comprises:
the first processing unit is used for establishing communication connection with the data receiving end;
the second processing unit is used for sending folder information of a folder to be transmitted to the data receiving end, wherein the folder information at least comprises directory information of the folder to be transmitted in a storage area;
the third processing unit is configured to receive a file transmission request sent by the data receiving terminal, where the file transmission request is used to instruct the data sending terminal to send a file to be transmitted in the folder to be transmitted to the data receiving terminal; the file transmission request at least comprises file information of all files to be transmitted in the folder to be transmitted;
and the fourth processing unit is configured to send the file to be transmitted to the data receiving end in a compressed data stream form based on the file transmission request.
10. The apparatus according to claim 9, wherein the file information at least includes file attribute information of all files to be transmitted and sequence information of each file to be transmitted during transmission;
the fourth processing unit is used for
And sending each file to be transmitted to the data receiving end in a compressed data stream mode in sequence based on the sequence information of each file to be transmitted during transmission.
11. The file transmission apparatus according to claim 9, wherein the file transmission request at least includes data breakpoint information of a file that is not completely transmitted, and the data breakpoint information at least includes location information of a data node that is interrupted during file transmission;
the fourth processing unit is used for
Determining to send data start information of the file which is not transmitted to the data receiving end based on the data breakpoint information;
based on the data initial information, sending files which are not transmitted completely to the data receiving end; the data initial information at least comprises position information of initial data when the file which is not transmitted is retransmitted to the data receiving end.
12. The document transportation apparatus according to claim 9, wherein the fourth processing unit is configured to perform the following operations
Generating a temporary file of the file to be transmitted, wherein the temporary file at least comprises file information of the file to be transmitted; the file format of the temporary file is different from the file format of the file to be transmitted; the file information at least comprises a file name of the file to be transmitted, an original length of the file, and/or the data initial information;
and sending the temporary file and the file to be transmitted to the data receiving end in a compressed data stream form based on the file transmission request, wherein the temporary file is used for determining whether the received file to be transmitted is correct or not according to the file name after the temporary file is received by the data receiving end, and determining the receiving progress of receiving the file to be transmitted according to the original length of the file.
13. A file transmission device is characterized in that the file transmission device is applied to a data receiving end and comprises:
the first processing unit is used for establishing communication connection with the data sending end;
the second processing unit is used for receiving folder information of a folder to be transmitted, which is sent by the data sending end, based on the communication connection, wherein the folder information at least comprises directory information of the folder to be transmitted in a storage area;
a third processing unit, configured to generate a file transmission request based on the folder information of the folder to be transmitted, where the file transmission request is used to instruct the data sending end to send a file to be transmitted in the folder to be transmitted to the data receiving end; the file transmission request at least comprises file information of all files to be transmitted in the folder to be transmitted;
and the fourth processing unit is configured to send the file transmission request to the data sending end, and receive the file to be transmitted, which is transmitted by the data receiving end in a compressed data stream form.
14. The apparatus according to claim 13, wherein the file information at least includes file attribute information of all files to be transmitted and sequence information of each file to be transmitted during transmission;
and the fourth processing unit is configured to sequentially receive each file to be transmitted, which is transmitted by the data receiving end based on the sequence information.
15. The document transportation apparatus according to claim 13, wherein the fourth processing unit is configured to
Storing the received data breakpoint information of the file to be transmitted;
if the file to be transmitted is interrupted when the file to be transmitted is not received, generating a file transmission request containing the data breakpoint information; the data breakpoint information at least comprises position information of a data node interrupted during file transmission;
and sending the file transmission request containing the data breakpoint information to the data sending end, so that the data sending end sends the file which is not transmitted completely to the data receiving end based on the data breakpoint information.
16. The document transportation apparatus according to claim 13, wherein the fourth processing unit is configured to perform the following operations
Receiving a temporary file of the file to be transmitted, wherein the temporary file at least comprises file information of the file to be transmitted; the file format of the temporary file is different from the file format of the file to be transmitted; the temporary file of the file to be transmitted is generated by the data sending end; the file information at least comprises a file name of the file to be transmitted, an original length of the file, and/or data initial information; the data starting information is determined by the data sending end according to the received data breakpoint information;
determining whether the received file to be transmitted is correct or not according to the file name; and
and determining the receiving progress of receiving the file to be transmitted based on the original file length of the file to be transmitted.
17. A server, comprising: a processor and a memory for storing a computer program operable on the processor, wherein the processor is operable to perform the steps of the method of any of claims 1 to 8 when executing the computer program.
18. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 8.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210584928.3A CN115086295A (en) | 2022-05-26 | 2022-05-26 | File transmission method, file transmission device, server and storage medium |
PCT/CN2023/092344 WO2023226717A1 (en) | 2022-05-26 | 2023-05-05 | File transmission method, file transmission apparatus, server and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210584928.3A CN115086295A (en) | 2022-05-26 | 2022-05-26 | File transmission method, file transmission device, server and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115086295A true CN115086295A (en) | 2022-09-20 |
Family
ID=83248509
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210584928.3A Pending CN115086295A (en) | 2022-05-26 | 2022-05-26 | File transmission method, file transmission device, server and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115086295A (en) |
WO (1) | WO2023226717A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023226717A1 (en) * | 2022-05-26 | 2023-11-30 | 北京快乐茄信息技术有限公司 | File transmission method, file transmission apparatus, server and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101547161A (en) * | 2008-03-28 | 2009-09-30 | 阿里巴巴集团控股有限公司 | Folder transmission system, folder transmission device and folder transmission method |
CN102137031A (en) * | 2010-01-21 | 2011-07-27 | 腾讯科技(深圳)有限公司 | Method and equipment for transmitting folders |
CN102469038A (en) * | 2010-11-15 | 2012-05-23 | 阿里巴巴集团控股有限公司 | Folder transmission method and device |
CN102651716A (en) * | 2011-02-24 | 2012-08-29 | 阿里巴巴集团控股有限公司 | Method and system for file folder transmission in instant communication, and instant receiving client side |
US20120331394A1 (en) * | 2011-06-21 | 2012-12-27 | Benjamin Trombley-Shapiro | Batch uploading of content to a web-based collaboration environment |
CN103888513A (en) * | 2014-02-25 | 2014-06-25 | 世纪龙信息网络有限责任公司 | Server-side multifile downloading method and system |
CN106230817A (en) * | 2016-07-29 | 2016-12-14 | 中国电子科技集团公司第二十八研究所 | Distributed mass data transmission method and system |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100401671C (en) * | 2005-05-31 | 2008-07-09 | 华为技术有限公司 | Method for transmitting files |
CN115086295A (en) * | 2022-05-26 | 2022-09-20 | 北京快乐茄信息技术有限公司 | File transmission method, file transmission device, server and storage medium |
-
2022
- 2022-05-26 CN CN202210584928.3A patent/CN115086295A/en active Pending
-
2023
- 2023-05-05 WO PCT/CN2023/092344 patent/WO2023226717A1/en unknown
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101547161A (en) * | 2008-03-28 | 2009-09-30 | 阿里巴巴集团控股有限公司 | Folder transmission system, folder transmission device and folder transmission method |
CN102137031A (en) * | 2010-01-21 | 2011-07-27 | 腾讯科技(深圳)有限公司 | Method and equipment for transmitting folders |
CN102469038A (en) * | 2010-11-15 | 2012-05-23 | 阿里巴巴集团控股有限公司 | Folder transmission method and device |
CN102651716A (en) * | 2011-02-24 | 2012-08-29 | 阿里巴巴集团控股有限公司 | Method and system for file folder transmission in instant communication, and instant receiving client side |
US20120331394A1 (en) * | 2011-06-21 | 2012-12-27 | Benjamin Trombley-Shapiro | Batch uploading of content to a web-based collaboration environment |
CN103888513A (en) * | 2014-02-25 | 2014-06-25 | 世纪龙信息网络有限责任公司 | Server-side multifile downloading method and system |
CN106230817A (en) * | 2016-07-29 | 2016-12-14 | 中国电子科技集团公司第二十八研究所 | Distributed mass data transmission method and system |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023226717A1 (en) * | 2022-05-26 | 2023-11-30 | 北京快乐茄信息技术有限公司 | File transmission method, file transmission apparatus, server and storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2023226717A1 (en) | 2023-11-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112003893B (en) | Resource downloading method and device | |
CN104778063A (en) | Method and device for updating resource | |
CN106126685B (en) | Page loading method and device | |
CN106126025B (en) | Interactive method and device for copying and pasting | |
CN107463372B (en) | Data-driven page updating method and device | |
CN113268179B (en) | Session message processing method, device, equipment and storage medium | |
CN115086295A (en) | File transmission method, file transmission device, server and storage medium | |
CN104780256A (en) | Address book management method and device and intelligent terminal | |
CN105187154A (en) | Response packet reception time delay method and response packet reception time delay device | |
CN109245992B (en) | Request processing method and device, electronic equipment and storage medium | |
CN114430410B (en) | System access method, device and equipment based on virtual domain name | |
CN107885464B (en) | Data storage method, device and computer readable storage medium | |
CN107483605B (en) | File downloading method and device and storage medium | |
CN113692067B (en) | Device connection method and device and readable storage medium | |
CN113110808B (en) | File printing method and device, electronic equipment and storage medium | |
CN112954596B (en) | Data sharing method, device, equipment and storage medium | |
CN112181453A (en) | Firmware upgrading method and device and storage medium | |
CN107707862A (en) | Treating method and apparatus, first terminal, the second terminal of Video Remote assistance | |
CN112769677A (en) | Data synchronization method, data synchronization device, electronic equipment, storage medium and program product | |
CN112422597B (en) | Network content access method, device and storage medium | |
CN112685061B (en) | Access method and device | |
CN113191792B (en) | Task processing method, device, electronic equipment, storage medium and program product | |
CN114238728B (en) | Vehicle data processing method, device and equipment | |
CN110311968B (en) | Method and device for loading file in streaming mode and intelligent equipment | |
CN114138289B (en) | Component issuing method and device, electronic equipment and storage medium |
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 |