CN105554054A - Method for file transmission saving between terminals - Google Patents

Method for file transmission saving between terminals Download PDF

Info

Publication number
CN105554054A
CN105554054A CN201510630464.5A CN201510630464A CN105554054A CN 105554054 A CN105554054 A CN 105554054A CN 201510630464 A CN201510630464 A CN 201510630464A CN 105554054 A CN105554054 A CN 105554054A
Authority
CN
China
Prior art keywords
file
data
preserved
buffering area
receiving terminal
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
Application number
CN201510630464.5A
Other languages
Chinese (zh)
Inventor
张涢
王会
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Meibeike Technology Co Ltd
Original Assignee
Shenzhen Meibeike Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Meibeike Technology Co Ltd filed Critical Shenzhen Meibeike Technology Co Ltd
Priority to CN201510630464.5A priority Critical patent/CN105554054A/en
Publication of CN105554054A publication Critical patent/CN105554054A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method for file transmission saving between terminals. A transmitting side saves a transmitted file in a transmitting side underlying buffer area and transmits the file to a receiving side underlying buffer area in fragments according to network speed; a file terminal data processing module takes out file data from the receiving side underlying buffer area; packet header and packet body data are analyzed according to the first fragment of data taken out from the file buffer area so that length and type information of the file is obtained; then a file saving linear message queue buffer area is created; finally a file saving thread is created, multiple fragments of data are acquired from the file saving buffer area, the multiple fragments of data are merged into a fragment of file data, and the fragment of file data are saved in a local file path; and multiple fragments of data are repeatedly acquired from the file buffer area and the data are merged and then locally saved until the file is completely saved. The beneficial effects of the method for file transmission saving between the terminals are that the problem of low efficiency in file receiving can be solved, and the defect of operation of frequent write-in of local data can be reduced.

Description

A kind of method that between terminal, file transfer is preserved
Technical field
The invention belongs to network communication field, particularly relate to the method that between terminal, file transfer is preserved.
Background technology
The user that develops into of network technology carries out file transfer and information interaction provides great convenience, can realize resource-sharing in tremendous range.
Along with the development of society's science and technology, use the people of mobile terminal to get more and more, the demand of people to the function of mobile terminal also gets more and more.As people not only wish the function being realized network interaction and acquisition of information by mobile terminal, also wish to carry out the functions such as file transfer by mobile terminal, along with the rise of mobile Internet, between user and user, the file transfer between terminal and terminal also becomes more and more general.But due to the disposal ability of mobile terminal, display capabilities, the restriction of bandwidth, causes file transfer not convenient, and need complicated step could realize the transmission of file, the efficiency of transmission of complex operation, file is low, and speed is slow.
Present stage, file transfer is to receiving terminal, and file is saved in local path by receiving terminal, needs to do write operation very frequently, and just can start to process next segment data after write one piece of data, causes the efficiency of file reception terminal very low.
Summary of the invention
For the deficiency that above-mentioned prior art exists, when the object of the invention is to solve reception file, the problem of inefficiency, reduces the operation of frequent write local data, is achieved by the following technical solution.
Between terminal, file transfer preserves the method realized, and wherein, described method comprises the steps:
S1, transmitting terminal send file to receiving terminal, and the file data needing to send is processed by Communication Layer bottom buffering area by transmitting terminal, and segment transmissions is to receiving terminal;
S2, receiving terminalreceive transmitting terminalthe file data sent, the data segment that receiving terminal receives, first leaves in receiving terminal communication buffer district;
S3, receiving terminal data processing module take out file data from communication bottom document buffering area;
S4, according to obtain file size length information, the data obtaining follow-up length length are file data;
The linear message queue buffering area that S5, establishment file are preserved;
File data in first paragraph data is put into file and is preserved buffering area by S6, receiving terminal data processing module, then continues to obtain second segment file data and puts into file preservation buffering area;
Thread preserved by S7, establishment file, preserves buffering area and obtains multiple segment data, this multiple segment data is merged into segment file data, be saved in local file path by these segment file data from file;
S8, repeat from filebuf, to obtain multiple segment data and merging data, be then saved in this locality, until this file is preserved complete.
Described receiving terminal data processing module takes out file data from communication bottom document buffering area, and according to the first paragraph Data Analysis packet header of taking out from filebuf, inclusion data, obtain file size length, type information.
The linear message queue buffering area that described establishment file is preserved, performs the principle of first in first out.
Described receiving terminal data processing module is that the file data of length is all put into file and preserved buffering area by instructing length
The present invention compared with prior art has following beneficial effect: when solving reception file, the problem of inefficiency, reduces the operation of frequent write local data.
Accompanying drawing explanation
Fig. 1 is the flowage structure block diagram of the method that between a kind of terminal of the present invention, file transfer is preserved.
Fig. 2 is the structural representation of a specific embodiment of Fig. 1.
Embodiment
Below in conjunction with accompanying drawing, the embodiment of the present invention is described in detail.
As shown in Figure 1, a kind of method that between terminal, file transfer is preserved, comprising:
S1, file transmitting terminal send file to file reception end, and the file data needing to send is processed by Communication Layer bottom buffering area by file transmitting terminal, and segment transmissions is to file reception end.
S2, file reception termination receive the file data that file transmitting terminal sends.The data segment that receiving terminal receives, first can in receiving terminal communication buffer district.
S3, file receiving terminal data processing module take out file data from communication bottom document buffering area.According to the first paragraph Data Analysis packet header of taking out from filebuf, inclusion data, obtain file size length, type, etc. relevant information.
S4 is according to the file size length information obtained, and the data obtaining follow-up length length are file data.
S5 creates file and preserves buffering area, and this buffering area is linear message queue, performs the principle of first in first out.
File data in first paragraph data is put into file and is preserved buffering area by S6 file receiving terminal data processing module, then continues to obtain second segment file data and puts into file preservation buffering area ... .. length is instructed to be that the file data of length is all put into file and preserved buffering area.
S7 creates file and preserves thread, preserves buffering area and obtains multistage (25,50,100, according to performance change) data, this multiple segment data is merged into segment file data, these segment file data be saved in local file path from file.
S8 repeats from filebuf, to obtain multiple segment data and merging data, is then saved in this locality, until this file is preserved complete.
As shown in Figure 2, it is the structure chart of a specific embodiment of the method that between terminal, file transfer is preserved, in the present embodiment, the file of transmission is kept at transmitting terminal bottom buffering area by the transmitting terminal of file, network environment residing for transmitting terminal detecting or network speed, file fragmentation is transferred to receiving terminal, multistage is specifically divided into determine according to network speed, the receiving terminal of file receives multistage file and is placed on receiving terminal bottom buffering area, the terminal data processing module of file takes out file data with the data of each 1K-8K from receiving terminal bottom buffering area, according to the first paragraph Data Analysis packet header of taking out from filebuf, inclusion data, obtain file size length, type, etc. relevant information, create file again and preserve buffering area, this buffering area is linear message queue, perform the principle of first in first out, finally create file and preserve thread, preserve buffering area from file and obtain multistage (25, 50, 100, according to performance change) data, this multiple segment data is merged into segment file data, these segment file data are saved in local file path.Repeat from filebuf, to obtain multiple segment data and merging data, be then saved in this locality, until this file is preserved complete.
Above content is only preferred embodiment of the present invention, and for those of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, this description should not be construed as limitation of the present invention.

Claims (4)

1. the method that between terminal, file transfer is preserved, comprising:
S1, transmitting terminal send file to receiving terminal, and the file data needing to send is processed by Communication Layer bottom buffering area by transmitting terminal, and segment transmissions is to receiving terminal;
S2, receiving terminal receive the file data that transmitting terminal sends, and the data segment that receiving terminal receives, first leaves in receiving terminal communication buffer district;
S3, receiving terminal data processing module take out file data from communication bottom document buffering area;
S4, according to obtain file size length information, the data obtaining follow-up length length are file data;
The linear message queue buffering area that S5, establishment file are preserved;
File data in first paragraph data is put into file and is preserved buffering area by S6, receiving terminal data processing module, then continues to obtain second segment file data and puts into file preservation buffering area;
Thread preserved by S7, establishment file, preserves buffering area and obtains multiple segment data, this multiple segment data is merged into segment file data, be saved in local file path by these segment file data from file;
S8, repeat from filebuf, to obtain multiple segment data and merging data, be then saved in this locality, until this file is preserved complete.
2. the method that between a kind of terminal according to claim 1, file transfer is preserved, it is characterized in that, described receiving terminal data processing module takes out file data from communication bottom document buffering area, according to the first paragraph Data Analysis packet header of taking out from filebuf, inclusion data, obtain file size length, type information.
3. the method that between a kind of terminal according to claim 1, file transfer is preserved, is characterized in that, the linear message queue buffering area that described establishment file is preserved, and performs the principle of first in first out.
4. the method that between a kind of terminal according to claim 1, file transfer is preserved, is characterized in that, described receiving terminal data processing module is that the file data of length is all put into file and preserved buffering area by instructing length.
CN201510630464.5A 2015-09-29 2015-09-29 Method for file transmission saving between terminals Pending CN105554054A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510630464.5A CN105554054A (en) 2015-09-29 2015-09-29 Method for file transmission saving between terminals

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510630464.5A CN105554054A (en) 2015-09-29 2015-09-29 Method for file transmission saving between terminals

Publications (1)

Publication Number Publication Date
CN105554054A true CN105554054A (en) 2016-05-04

Family

ID=55832987

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510630464.5A Pending CN105554054A (en) 2015-09-29 2015-09-29 Method for file transmission saving between terminals

Country Status (1)

Country Link
CN (1) CN105554054A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111182047A (en) * 2019-12-24 2020-05-19 中国银联股份有限公司 Method and system for transferring files between large data platforms across a network
CN117194549A (en) * 2023-11-07 2023-12-08 上海柯林布瑞信息技术有限公司 Data transmission method and device based on task data configuration

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1635782A (en) * 2003-12-26 2005-07-06 北京中视联数字系统有限公司 A data transmission method based on digital television broadcasting protocol
CN101188544A (en) * 2007-12-04 2008-05-28 浙江大学 File transfer method for distributed file server based on buffer
CN101267454A (en) * 2008-04-30 2008-09-17 中兴通讯股份有限公司 A prompt method and system for file transmission information
CN101388909A (en) * 2008-10-14 2009-03-18 中兴通讯股份有限公司 P2P play-on-demand system and service method
CN101951370A (en) * 2010-09-17 2011-01-19 北京神州泰岳软件股份有限公司 Reliable file transmission method based on UDP
CN102137027A (en) * 2011-05-03 2011-07-27 厦门市美亚柏科信息股份有限公司 Reliable data transmission method and device thereof
CN103312732A (en) * 2012-03-07 2013-09-18 腾讯科技(深圳)有限公司 Method and device for data file transmission

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1635782A (en) * 2003-12-26 2005-07-06 北京中视联数字系统有限公司 A data transmission method based on digital television broadcasting protocol
CN101188544A (en) * 2007-12-04 2008-05-28 浙江大学 File transfer method for distributed file server based on buffer
CN101267454A (en) * 2008-04-30 2008-09-17 中兴通讯股份有限公司 A prompt method and system for file transmission information
CN101388909A (en) * 2008-10-14 2009-03-18 中兴通讯股份有限公司 P2P play-on-demand system and service method
CN101951370A (en) * 2010-09-17 2011-01-19 北京神州泰岳软件股份有限公司 Reliable file transmission method based on UDP
CN102137027A (en) * 2011-05-03 2011-07-27 厦门市美亚柏科信息股份有限公司 Reliable data transmission method and device thereof
CN103312732A (en) * 2012-03-07 2013-09-18 腾讯科技(深圳)有限公司 Method and device for data file transmission

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111182047A (en) * 2019-12-24 2020-05-19 中国银联股份有限公司 Method and system for transferring files between large data platforms across a network
CN117194549A (en) * 2023-11-07 2023-12-08 上海柯林布瑞信息技术有限公司 Data transmission method and device based on task data configuration
CN117194549B (en) * 2023-11-07 2024-01-26 上海柯林布瑞信息技术有限公司 Data transmission method and device based on task data configuration

Similar Documents

Publication Publication Date Title
US20220394316A1 (en) Message sending method and device, readable medium and electronic device
CN104199927B (en) Data processing method and data processing equipment
CN102413150B (en) Server and virtual desktop control method and virtual desktop control system
CN103580966A (en) Wireless link and wire link parallel data transmission method and system
EP4243559A3 (en) Method for establishing a connection, radio access network element device and computer storage medium
CN106302245A (en) The compression method of packet and device in a kind of LTE system
CN111314439A (en) Data sending method and device and electronic equipment
CN101969463A (en) Method for realizing whiteboard full-screen synchronization on web page
WO2018210231A1 (en) Data transmitting method and receiving method, and data transmitting device and receiving device
WO2015169186A1 (en) File transmission method and system
CN101977209A (en) Method for realizing page-turning synchronization on web page
JP2015527663A (en) Data distribution method and data distribution apparatus
CN105554054A (en) Method for file transmission saving between terminals
CN1988543A (en) Message type identifying method and device, message header compressing method and system
CN102638451A (en) Dynamic regrouping method for register list data of Modbus communication protocol
CN101447874B (en) Data synchronization method, client and server
CN102752320B (en) Proxy server active compression method and proxy server
CN104320162B (en) Method for synchronizing contact persons, intelligent mobile terminal and mobile terminal
CN104125321A (en) Contact information updating method, device and system
CN104965810A (en) Method and device for rapidly processing data message in multi-core mode
CN103873443A (en) Information processing method, local proxy server and network proxy server
CN105357305A (en) File sending method and device, file receiving method and device and terminal equipment
CN104038307A (en) Data stream transmission system and method
CN102685810A (en) Method and system for dynamic caching of user information
CN202615375U (en) Picture sharing system and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160504