CN108347463B - Terminal file uploading method - Google Patents
Terminal file uploading method Download PDFInfo
- Publication number
- CN108347463B CN108347463B CN201710057731.3A CN201710057731A CN108347463B CN 108347463 B CN108347463 B CN 108347463B CN 201710057731 A CN201710057731 A CN 201710057731A CN 108347463 B CN108347463 B CN 108347463B
- Authority
- CN
- China
- Prior art keywords
- file
- server
- handheld terminal
- block
- transmission
- 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.)
- Expired - Fee Related
Links
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]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1074—Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
- H04L67/1078—Resource delivery mechanisms
- H04L67/108—Resource delivery mechanisms characterised by resources being split in blocks or fragments
Abstract
The application discloses a method for uploading files by a handheld terminal, which comprises the following steps: for each file which needs to be uploaded to a server currently, the handheld terminal device divides the file into file blocks and requests the server to upload the file; when the server agrees with the request, the handheld terminal equipment triggers a transmission process of sequentially uploading the file blocks of the file to the server; the handheld terminal device successfully receives a message according to the file block which is returned by the server latest, and records the file transmission progress; and when the transmission process is interrupted and needs to be resumed, the handheld terminal equipment determines the initial file block which is continuously transmitted at the current breakpoint according to the file transmission progress and triggers the transmission process to be continued from the initial file block. The invention can realize breakpoint continuous transmission, effectively reduce resource overhead of the server end and avoid reducing service concurrent processing performance of the private network server.
Description
Technical Field
The invention relates to a mobile communication technology, in particular to a terminal file uploading method.
Background
With the development of social economy and the change of industrial requirements, a TD-LTE broadband cluster with the outstanding characteristics of large bandwidth, high speed and full IP is leading the cluster communication to enter a brand new era. The TD-LTE broadband trunking communication system takes a fourth generation mobile communication technology TD-LTE as a core technology, combines the characteristics of high speed, large bandwidth, resource sharing, quick call establishment, command scheduling and the like in the digital trunking technology with the TD-LTE, and is a broadband digital trunking system integrating voice, data and video.
Compared with the traditional narrow-band cluster communication system, the TD-LTE wide-band cluster system has larger bandwidth and better transmission performance and has the capability of transmitting large data files which cannot be realized by the narrow-band system. A user of the broadband trunking system can use the handheld terminal to take pictures and take photos, and upload large files such as pictures and videos to a storage server on a network side, so that the broadband trunking system is used in application scenes such as field office and mobile law enforcement.
Due to the reasons of limited coverage of wireless private network signals and the like, when large files such as videos and the like are uploaded, connection interruption is caused by movement to an area with poor signal quality or no network coverage, and the files to be uploaded cannot be uploaded continuously, so that a user needs to perform uploading again, precious time is wasted, and the field office efficiency of mobile law enforcement is seriously influenced.
The TD-LTE-based broadband trunking system file uploading system is divided into a terminal, a base station, a trunking core network, a storage server and other components (as shown in FIG. 1).
In the existing terminal file transmission scheme, a storage server end records the transmission progress of a file, after the file is uploaded and interrupted, when the connection is recovered, a terminal asks the server for the transmission progress of the file to be uploaded, and the remaining files are continuously transmitted according to the interruption point recorded by the transmission progress.
In the above scheme, the transmission schedule of the uploaded file stored by the server is generally recorded once at certain time intervals. If the time interval is set too long, the granularity of the transmission progress record is too coarse, and further, the breakpoint time provided for the terminal when the transmission is resumed after the interruption is not accurate enough, that is, the file transmission progress requested by the terminal may not be the latest transmission record, which may result in the repeated transmission of data for a long time. In order to improve the accuracy of breakpoint information, a time interval needs to be set to be short, and if the time interval is set to be too short, the server will frequently record the file transmission progress, so that the server is busy in processing and high in system resource overhead, and thus, a higher performance requirement is put forward on the server.
The existing file servers of part of private networks have much poorer performance than the public network servers, and often one server merges and deploys a plurality of service functions, and the server frequently reads and writes and transmits progress records, which is not favorable for the processing of the concurrence of a plurality of services by the special network servers with poorer performance.
Therefore, the existing file uploading scheme of the terminal has the problems of high server side expense and high performance requirement, and is not beneficial to the concurrent processing of multiple services by a special network server with poor performance.
Disclosure of Invention
In view of the above, the main object of the present invention is to provide a method for uploading a terminal file, which can implement breakpoint continuous transmission, effectively reduce resource overhead of a server, and avoid reducing service concurrency processing performance of a private network server.
In order to achieve the purpose, the technical scheme provided by the invention is as follows:
a method for uploading files by a handheld terminal comprises the following steps:
for each file which needs to be uploaded to a server currently, the handheld terminal device divides the file into file blocks and requests the server to upload the file;
when the server agrees with the request, the handheld terminal equipment triggers a transmission process of sequentially uploading the file blocks of the file to the server; the handheld terminal device successfully receives a message according to the file block which is returned by the server latest, and records the file transmission progress;
and when the transmission process is interrupted and needs to be resumed, the handheld terminal equipment determines the initial file block which is continuously transmitted at the current breakpoint according to the file transmission progress and triggers the transmission process to be continued from the initial file block.
In summary, according to the terminal file uploading method provided by the present invention, the terminal receives a response according to the received sent file block, records the file transmission progress, and when the transmission is resumed after the file transmission interruption occurs, the terminal performs the breakpoint transmission according to the file transmission progress stored by the terminal. Therefore, the terminal is responsible for recording the uploading progress of the file and controlling the breakpoint transmission, so that the transmission overhead of the server side can be greatly reduced, and the reduction of the service concurrent processing performance of the private network server is avoided.
Drawings
Fig. 1 is a schematic diagram of a conventional TD-LTE based broadband trunking system file uploading system;
FIG. 2 is a schematic flow chart of a method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
The core idea of the invention is as follows: and the terminal receives a response according to the received sent file block, records the file transmission progress, and when the transmission is resumed after the file transmission interruption occurs, the terminal performs breakpoint transmission according to the file transmission progress stored by the terminal. Therefore, when the terminal conducts breakpoint continuous transmission, the server is not required to actively record the file transmission progress, and the server is not required to inform the breakpoint information to the terminal according to the request of the terminal when conducting breakpoint continuous transmission, so that the resource overhead of the server side during file uploading can be effectively reduced, and the multi-service concurrent processing performance of the server is ensured.
Fig. 2 is a schematic flowchart of a method according to an embodiment of the present invention, and as shown in fig. 2, the method for uploading a file by a handheld terminal implemented by the embodiment mainly includes:
Preferably, the following method can be adopted in this step to segment the file to be uploaded:
when the length of the file exceeds a preset unit transmission block length threshold value, the file is divided into file blocks, wherein the length of each file block is smaller than the unit transmission block length threshold value.
The unit transmission block length threshold is used for limiting the maximum length of each file block obtained after segmentation, the smaller the value is set, the higher the accuracy of determining the breakpoint during breakpoint resuming is, the less the redundant data amount repeatedly transmitted during resuming is, but the resource overhead of recording the file transmission progress can be correspondingly increased, otherwise, if the threshold is set to be larger, the accuracy of determining the breakpoint during breakpoint resuming is reduced, the more the redundant data amount repeatedly transmitted during resuming is, but the resource overhead of recording the file transmission progress can be correspondingly reduced. In practical application, a person skilled in the art can set an appropriate value for the threshold according to actual needs and in combination with the above rule. Preferably, the unit transmission block length threshold may be smaller than the length of the maximum transmission unit MTU of the system, and the data block length obtained by packing the unit file blocks is smaller than the length of the MTU, so that the unit file block length threshold can be matched with the transmission capability of the system, and each file block can be transmitted to the server only through one system data block without being split, which is beneficial to improving the accuracy of breakpoint transmission.
Preferably, the following method can be adopted to request the upload of the file to the server:
step a1, the hand-held terminal device sends a file uploading request to the server.
Specifically, the file uploading request may carry an identifier of the handheld terminal device, a file name, a byte number of the file, a file block number of the file, check code information, and the like, so that the server may transmit and maintain the uploaded file.
Step a2, the server judges whether there is enough resource to meet the file uploading request according to the current available resource condition, if yes, agrees the request and informs the hand-held terminal device, otherwise, refuses the request and informs the hand-held terminal device.
In this step, after receiving the file upload request, the server determines whether the request can be accepted or not according to the current available storage space, that is, determines whether there is enough space to store the uploaded file, if so, the server can accept the request and notify the handheld terminal device that the file can be uploaded, otherwise, the server notifies the terminal device that the corresponding file cannot be uploaded.
In practical application, after the server determines that the file uploading request can be accepted, the corresponding file uploading information can be stored by using the combination of the identifier of the terminal device and the name of the file to be uploaded as the identifier.
It should be noted that, for the server, if a file block is successfully received, a file block successful reception message is returned to the handheld terminal device, that is, the file block successful reception message is used to indicate the successful reception of the corresponding file block. Therefore, the handheld terminal device can know that the corresponding file block is successfully received by the server every time the handheld terminal device receives a file block successful receiving message. Therefore, in this step, after the file uploading process is started, the handheld terminal device successfully receives the message according to the file block returned by the server, and can accurately record the file transmission progress, so that the corresponding continuous transmission breakpoint can be determined according to the file transmission progress after the file uploading is interrupted. Preferably, the file transmission progress can be recorded by adopting the following methods:
the method comprises the following steps: and when the handheld terminal equipment receives a file block successful receiving message returned by the server, updating the file transmission progress to a file block number corresponding to the file block successful receiving message.
The first method is simple and low in cost, and the file transmission progress is represented by the file block number corresponding to the latest returned file block successful receiving message.
The second method comprises the following steps: and when the handheld terminal equipment receives the file block successful receiving message returned by the server, deleting the file block number corresponding to the file block successful receiving message from the file block list which is not transmitted.
In the second method, the file transmission progress is represented by using the file block list which is not transmitted, and the file block corresponding to the message is successfully received according to the file block returned by the server, and the list is updated.
In practical application, the method is not limited to recording the file transmission progress, that is, the specific way of recording the file transmission progress can be various, and only the message needs to be successfully received according to the file block returned by the server.
In this step, different from the existing method, when a file is interrupted during the uploading process and is triggered to resume transmission, the handheld terminal device determines the start position of the breakpoint continuous transmission according to the file transmission progress of the file stored in the handheld terminal device, and does not need to obtain breakpoint information from the server side, so that the transmission overhead of the server can be reduced.
Preferably, when the file transmission progress is recorded in step 202 by the first method, the following method may be used to determine the starting file block of the current breakpoint continuous transmission according to the file transmission progress:
and determining the next file block of the file blocks corresponding to the recording file transmission progress as the initial file block.
Preferably, when the file transmission progress is recorded by the method two in step 202, the following method may be adopted to determine the starting file block of the current breakpoint continuous transmission according to the file transmission progress:
and determining the file block with the minimum sequence number in the file block list which is not transmitted as the initial file block.
Preferably, in order to further reduce the transmission overhead of the server, after all the file blocks of a file are uploaded to the server, the handheld terminal device may trigger the server to perform merging processing on the received file blocks of the file, and specifically, the following steps may be used to achieve the purpose:
step x1, when all file blocks of the file are uploaded to the server, the handheld terminal device informs the server that the file uploading is completed.
Step x2, the server merges and verifies the received file blocks of the file according to the notification; and if the verification is successful, sending a file uploading success message to the handheld terminal equipment, otherwise, sending a file uploading failure message to the handheld terminal equipment.
According to the technical scheme, the transmission processing of the server can be simplified, the server does not need to record the file progress frequently, the request and the file transmission progress are not needed between the handheld terminal device and the server, and the server only needs to respond to the terminal request passively, so that multiple services can be processed concurrently for the server with poor performance in part of private networks, and the service failure caused by the fact that the server is too busy is avoided.
In summary, the above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (7)
1. A method for uploading files by a handheld terminal is characterized by comprising the following steps:
for each file which needs to be uploaded to a server currently, the handheld terminal device divides the file into file blocks and requests the server to upload the file;
when the server agrees with the request, the handheld terminal equipment triggers a transmission process of sequentially uploading the file blocks of the file to the server; the handheld terminal device successfully receives a message according to the file block which is returned by the server latest, and records the file transmission progress;
when the transmission process is interrupted and needs to be resumed, the handheld terminal equipment determines an initial file block which is continuously transmitted at the current breakpoint according to the file transmission progress and triggers the transmission process to continue from the initial file block;
the segmenting comprises:
when the length of the file exceeds a preset unit transmission block length threshold value, dividing the file into file blocks, wherein the length of each file block is smaller than the unit transmission block length threshold value; the unit transport block length threshold is less than the length of the maximum transmission unit MTU of the system.
2. The method of claim 1, wherein requesting the upload of the file from the server comprises:
the handheld terminal device sends a file uploading request to the server; the file uploading request carries an identifier of the handheld terminal device, a file name, the byte number of the file, the file block number of the file and check code information;
and the server judges whether enough resources meet the file uploading request according to the current available resource condition, if so, the server agrees to the request and informs the handheld terminal equipment, and otherwise, the server refuses the request and informs the handheld terminal equipment.
3. The method of claim 1, wherein the recording file transmission progress comprises:
and when the handheld terminal equipment receives a file block successful receiving message returned by the server, updating the file transmission progress to a file block number corresponding to the file block successful receiving message.
4. The method of claim 3, wherein determining the starting file block of the current breakpoint continuous transmission according to the file transmission progress comprises:
and determining the next file block of the file block corresponding to the file transmission progress as the initial file block.
5. The method of claim 1, wherein the recording file transmission progress comprises:
and when the handheld terminal equipment receives the file block successful receiving message returned by the server, deleting the file block number corresponding to the file block successful receiving message from the file block list which is not transmitted.
6. The method of claim 5, wherein determining the starting file block of the current breakpoint continuous transmission according to the file transmission progress comprises:
and determining the file block with the minimum sequence number in the file block list which is not transmitted as the initial file block.
7. The method of claim 1, further comprising:
when all file blocks of the file are uploaded to the server, the handheld terminal equipment informs the server that the file is uploaded;
the server merges and verifies the received file blocks of the file according to the notification; and if the verification is successful, sending a file uploading success message to the handheld terminal equipment, otherwise, sending a file uploading failure message to the handheld terminal equipment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710057731.3A CN108347463B (en) | 2017-01-23 | 2017-01-23 | Terminal file uploading method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710057731.3A CN108347463B (en) | 2017-01-23 | 2017-01-23 | Terminal file uploading method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108347463A CN108347463A (en) | 2018-07-31 |
CN108347463B true CN108347463B (en) | 2021-06-18 |
Family
ID=62962014
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710057731.3A Expired - Fee Related CN108347463B (en) | 2017-01-23 | 2017-01-23 | Terminal file uploading method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108347463B (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109324897A (en) * | 2018-08-24 | 2019-02-12 | 平安科技(深圳)有限公司 | Data uploading method and system, terminal and computer readable storage medium |
CN109712692A (en) * | 2018-12-02 | 2019-05-03 | 河南美伦医疗电子股份有限公司 | Cloud brain electric management system based on cloud microtomy |
CN110784524A (en) * | 2019-10-14 | 2020-02-11 | 广州微算互联信息技术有限公司 | Cloud mobile phone file uploading keep-alive method, device and system |
CN111314449B (en) * | 2020-02-06 | 2021-02-02 | 北京东方金信科技股份有限公司 | File breakpoint continuous transmission method and system |
CN111585806A (en) * | 2020-04-30 | 2020-08-25 | 南通凡肯电子设备研发有限公司 | Control system and control method for double-host communication |
CN112351111B (en) * | 2020-12-30 | 2023-01-03 | 常州微亿智造科技有限公司 | Near-real-time progress monitoring method for uploading industrial quality inspection file to server terminal |
CN115037488A (en) * | 2021-02-23 | 2022-09-09 | 北京金山云网络技术有限公司 | Account identity verification method and device |
CN114069847B (en) * | 2021-10-29 | 2024-03-26 | 国电南瑞科技股份有限公司 | Distributed photovoltaic data backfill system and method |
CN113946618B (en) * | 2021-12-21 | 2022-03-04 | 深圳市思迅软件股份有限公司 | Cloud data interaction method and system, computer equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101867617A (en) * | 2010-06-13 | 2010-10-20 | 优视科技有限公司 | File uploading method base on mobile terminal and system and uploading server thereof |
CN103442037A (en) * | 2013-08-09 | 2013-12-11 | 华南理工大学 | Method for achieving multithreading breakpoint upload of oversized file based on FTP |
CN103685343A (en) * | 2012-09-03 | 2014-03-26 | 腾讯科技(深圳)有限公司 | File transfer method and file transfer system |
CN104468843A (en) * | 2014-12-31 | 2015-03-25 | 浪潮软件股份有限公司 | File uploading method and device |
CN104539739A (en) * | 2015-01-26 | 2015-04-22 | 浙江大学 | System, method and device for uploading files |
CN105227610A (en) * | 2014-06-30 | 2016-01-06 | 北京金山安全软件有限公司 | File uploading and storing method and device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101399729B (en) * | 2007-09-28 | 2010-12-08 | 鸿富锦精密工业(深圳)有限公司 | Management system and method for file download and upload |
CN102202075B (en) * | 2010-03-26 | 2013-12-04 | 联想(北京)有限公司 | Data sharing method and portable terminal |
-
2017
- 2017-01-23 CN CN201710057731.3A patent/CN108347463B/en not_active Expired - Fee Related
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101867617A (en) * | 2010-06-13 | 2010-10-20 | 优视科技有限公司 | File uploading method base on mobile terminal and system and uploading server thereof |
CN103685343A (en) * | 2012-09-03 | 2014-03-26 | 腾讯科技(深圳)有限公司 | File transfer method and file transfer system |
CN103442037A (en) * | 2013-08-09 | 2013-12-11 | 华南理工大学 | Method for achieving multithreading breakpoint upload of oversized file based on FTP |
CN105227610A (en) * | 2014-06-30 | 2016-01-06 | 北京金山安全软件有限公司 | File uploading and storing method and device |
CN104468843A (en) * | 2014-12-31 | 2015-03-25 | 浪潮软件股份有限公司 | File uploading method and device |
CN104539739A (en) * | 2015-01-26 | 2015-04-22 | 浙江大学 | System, method and device for uploading files |
Also Published As
Publication number | Publication date |
---|---|
CN108347463A (en) | 2018-07-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108347463B (en) | Terminal file uploading method | |
CN113596191B (en) | Data processing method, network element equipment and readable storage medium | |
US20150089028A1 (en) | Method, system and client for uploading image, network server and computer storage medium | |
CN111628847A (en) | Data transmission method and device | |
CN106488409B (en) | Method, device and system for unicast transmission of broadcast multicast data | |
US20130041943A1 (en) | Distribution system, distribution control device, and distribution control method | |
CN112600693B (en) | Service request processing method, system, electronic equipment and computer storage medium | |
JP6730447B2 (en) | Data transmission method, apparatus and session management device | |
CN113572864B (en) | Data processing method, network element equipment and readable storage medium | |
US11528303B2 (en) | Method and system for responding to video call service | |
CN107317760B (en) | SDU (service data Unit) segmentation processing method and data receiving end | |
US8958798B2 (en) | Radio access network, base station, and data transfer method | |
KR101209196B1 (en) | Method and Apparatus for transceiving data through Heterogeneous networks | |
CN113423078B (en) | Application program network fragment selection method, application server and PCF | |
CN107920372B (en) | Information indication method and device | |
WO2018233313A1 (en) | User plane selection method, device and system in radio access network | |
CN103795810A (en) | Data distribution system and method and central server of data distribution system | |
WO2014194526A1 (en) | Method, device and system for obtaining mobile network data resources | |
WO2014134823A1 (en) | Wireless transmission method for service data, apparatus and device thereof | |
CN111225423B (en) | Method and device for forwarding data | |
CN109195187B (en) | Network slice switching method based on log file of network slice server | |
CN104660651A (en) | P2P connecting method, server, terminal and communication system | |
CN104660656A (en) | P2P connecting method, server, terminal and communication system | |
JP2006041819A (en) | Stream distributing server, mobile terminal, stream distribution system, and stream distribution method | |
CN116209006B (en) | Management system, method, network device and storage medium for communication network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20210618 Termination date: 20220123 |