CN104967634A - File upload method and apparatus thereof - Google Patents

File upload method and apparatus thereof Download PDF

Info

Publication number
CN104967634A
CN104967634A CN201410215992.XA CN201410215992A CN104967634A CN 104967634 A CN104967634 A CN 104967634A CN 201410215992 A CN201410215992 A CN 201410215992A CN 104967634 A CN104967634 A CN 104967634A
Authority
CN
China
Prior art keywords
file
slices
section
slice size
network
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
CN201410215992.XA
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.)
Tencent Technology Beijing Co Ltd
Original Assignee
Tencent Technology Beijing 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 Tencent Technology Beijing Co Ltd filed Critical Tencent Technology Beijing Co Ltd
Priority to CN201410215992.XA priority Critical patent/CN104967634A/en
Publication of CN104967634A publication Critical patent/CN104967634A/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]

Abstract

The invention discloses a file upload method and an apparatus thereof, and belongs to the computer technology field. The method comprises acquiring the network situation of the current network before slicing a file to be uploaded every time; slicing the file according to the network situation at the time for slicing to obtain the slicing file of this time; and uploading the slicing file of this time. The invention has the advantages of solving the problem that a request data packet with larger data size is easy to lose so as to cause the failure of uploading the whole file when the network condition is not well; and being able to upload the file after obtaining the slicing file by slicing the file to be uploaded according to the network condition, thus reducing the packet loss ratio and improving the success rate for uploading files, and saving the network resource.

Description

File uploading method and device
Technical field
The embodiment of the present invention relates to field of computer technology, particularly a kind of file uploading method and device.
Background technology
Files passe refers to by the files passe on mobile terminal on server, so as this file of server buffer or this file is supplied to other mobile terminal use.Along with information explosion formula increase, need the data volume uploaded increasing, such as, audio file and video file.
The files passe of mobile terminal generally includes following steps: mobile terminal sends connection request to server; The connection request of server mobile terminal receive; Server sets up HTTP(Hyper Text Transfer Protocol according to this connection request and mobile terminal, HTML (Hypertext Markup Language)) long connection; Mobile terminal sends request packet by this HTTP long connection to server, and this request data package comprises larger data volume usually; Server mobile terminal receive send request data package and buffer memory.
In the process realizing the embodiment of the present invention, inventor finds that background technology at least exists following problem: because mobile terminal comprises larger data volume to the request data package that server sends, the larger easier packet loss of the data volume that request data package comprises, thus cause the failure of whole files passe, especially, when network condition is bad, the failure causing whole files passe is more prone to.
Summary of the invention
In order to solve when network condition is bad, comprise the easy packet loss of request data package of larger data amount thus causing the problem of whole files passe failure, embodiments providing a kind of file uploading method and device.Described technical scheme is as follows:
First aspect, provides a kind of file uploading method, it is characterized in that, described method comprises:
Before file to be uploaded is cut into slices at every turn, obtain current residing network of network situation;
Described file is cut into slices by described network condition when cutting into slices according to this, obtains this section file;
This section file described is uploaded.
Second aspect, provide a kind of files passe device, it is characterized in that, described device comprises:
Situation acquisition module, for before cutting into slices to file to be uploaded at every turn, obtains current residing network of network situation;
File section module, described file is cut into slices by described network condition during for cutting into slices according to this, obtains this section file;
Files passe module, for uploading this section file described.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
By before cutting into slices to file to be uploaded at every turn, obtain current residing network of network situation; File is cut into slices by network condition when cutting into slices according to this, obtains this section file; This section file is uploaded; Solve when network condition is bad, comprise the easy packet loss of request data package of larger data amount thus cause the problem of whole files passe failure; Reach and file to be uploaded can be carried out uploading after section obtains section file according to network condition again, reduce packet loss, improve the success rate of files passe, save the effect of Internet resources.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the example arrangement schematic diagram of a kind of implementation environment involved by file uploading method that each embodiment of the present invention provides;
Fig. 2 is the method flow diagram of the file uploading method that one embodiment of the invention provides;
Fig. 3 A is the method flow diagram of the file uploading method that another embodiment of the present invention provides;
Fig. 3 B is the schematic diagram of the file section that another embodiment of the present invention provides;
Fig. 4 is the block diagram of the files passe device that one embodiment of the invention provides;
Fig. 5 is the block diagram of the files passe device that another embodiment of the present invention provides;
Fig. 6 is the structural representation of the transmitting terminal that one embodiment of the invention provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Please refer to Fig. 1, it illustrates the structural representation of a kind of implementation environment involved by file uploading method that the embodiment of the present invention provides.This implementation environment comprises transmitting terminal 120 and receiving terminal 140.
Transmitting terminal 120 can be specifically: smart mobile phone, panel computer, E-book reader, MP3 player (Moving Picture Experts Group Audio Layer III, dynamic image expert compression standard audio frequency aspect 3), MP4(Moving Picture Experts Group Audio Layer IV, dynamic image expert compression standard audio frequency aspect 4) player, wearable electronic and super this etc.
Transmitting terminal 120 can be connected by wireless network or cable network with receiving terminal 140.
Receiving terminal 140 can be the terminal as transmitting terminal 120, also can be server.Server can be a station server, or the server cluster be made up of some station servers, or a cloud computing service center.
Please refer to Fig. 2, it illustrates the method flow diagram of the file uploading method that one embodiment of the invention provides.The present embodiment is mainly applied to transmitting terminal to illustrate with this file uploading method.This file uploading method, comprising:
Step 202, before cutting into slices to file to be uploaded, obtains current residing network of network situation at every turn;
Step 204, file is cut into slices by network condition when cutting into slices according to this, obtains this section file;
Step 206, uploads this section file.
In sum, the file uploading method that the present embodiment provides, by before cutting into slices to file to be uploaded at every turn, obtains current residing network of network situation; File is cut into slices by network condition when cutting into slices according to this, obtains this section file; This section file is uploaded; Solve when network condition is bad, comprise the easy packet loss of request data package of larger data amount thus cause the problem of whole files passe failure; Reach and can send the request data package corresponding with this network condition according to network condition, reduce packet loss, improve the success rate of files passe, save the effect of Internet resources.
Please refer to Fig. 3 A, it illustrates the method flow diagram of the file uploading method that another embodiment of the present invention provides.The present embodiment is mainly applied in the implementation environment shown in Fig. 1 with this file uploading method and illustrates.This file uploading method, comprising:
Step 301, before cutting into slices to file to be uploaded, obtains current residing network of network situation at every turn;
Before file to be uploaded is cut into slices at every turn, transmitting terminal obtains current residing network of network situation, network condition comprises network type and the network bandwidth, network type comprises again mobile network and WLAN (wireless local area network), mobile network can be divided into again 2G network, 3G network, 4G network and in the future 5G network faster, and WLAN (wireless local area network) mainly refers to WiFi network.
Step 302, file is cut into slices by network condition when cutting into slices according to this;
File is cut into slices according to network condition by transmitting terminal; Concrete, slice size when network condition when transmitting terminal is cut into slices according to this determines that this is cut into slices.The good and bad correlation of slice size and network condition, also namely network condition is better, and slice size is larger; Network condition is poorer, and slice size is less.
Under a kind of execution mode, this step comprises the steps: again
The first, if this section is first time section, then slice size when network type when transmitting terminal is cut into slices according to this determines from default corresponding relation that this is cut into slices.
Default corresponding relation comprises the corresponding relation between different network type and different slice size.Such as, the slice size corresponding to 4G network will be larger than the slice size corresponding to 2G network.
As shown in table 1, it illustrates the corresponding relation of 2G network, 3G network, 4G network and a kind of hypothesis between WiFi network and slice size:
Network type Slice size
2G network 100
3G network 300
4G network 1000
WiFi network 2500
Table 1
Suppose that the current residing network of network type that transmitting terminal gets is 4G network, then slice size when according to 4G network, transmitting terminal determines from the corresponding relation of table 1 that this is cut into slices is 1000.
The second, if this section is n-th section, n >=2, specifically comprise the steps:
1, the historical responses Time Calculation current network bandwidth of transmitting terminal corresponding to the section file uploaded;
To time period when receiving response that receiving terminal feeds back for this section file when the historical responses time refers to that transmitting terminal sends section file.Transmitting terminal can according to historical responses Time Calculation current network bandwidth, and the historical responses time, shorter then current network bandwidth was better, and the historical responses time, longer then current network bandwidth was poorer.
In addition, the historical responses Time Calculation current network bandwidth corresponding to section file when transmitting terminal can be cut into slices according to (n-1)th time that has uploaded; Transmitting terminal can also according to the historical responses Time Calculation current network bandwidth corresponding to all section files uploaded.
Whether the slice size that 2, transmitting terminal detects when cutting into slices for (n-1)th time mates with current network bandwidth;
Usually in advance one-to-one relationship is set to slice size and current network bandwidth, such as, when the network bandwidth sets a corresponding slice size in the first preset range, when the network bandwidth sets a corresponding slice size in the second preset range.
As shown in table 2, it illustrates the corresponding relation of a kind of hypothesis between network bandwidth scope and slice size:
The network bandwidth Slice size
[a,b1] 300
[b2,c1] 500
[c2,d1] 800
[d2,e] 1500
Table 2
Suppose that slice size when cutting into slices for (n-1)th time is 1500, transmitting terminal calculates current network bandwidth at [c, d1] in scope, then whether transmitting terminal to need to detect slice size 1500 consistent with the slice size 800 corresponding to current network bandwidth [c, d1].
If 3 detect that slice size when cutting into slices for (n-1)th time is not mated with current network bandwidth, then slice size when determining that this is cut into slices according to current network bandwidth.
Slice size during (n-1)th section and current network bandwidth do not mate and refer to that slice size when cutting into slices for (n-1)th time is for overload current network bandwidth or can not efficiency utilization current network bandwidth.
Such as, current network bandwidth can carry 800 bytes, but slice size during (n-1)th section is 1500 bytes, so the slice size of 1500 bytes is for overload current network, easy card and easy packet loss, therefore can not continue to continue to use slice size during (n-1)th section, need slice size when determining that this is cut into slices according to current network bandwidth, slice size when also cutting into slices by this is defined as 800.
Again such as, current network bandwidth can carry 1500 bytes, but slice size during (n-1)th section is 300 bytes, so 300 bytes slice size serious waste Internet resources and can not efficiency utilization current network bandwidth, therefore need slice size when determining that this is cut into slices according to current network bandwidth, slice size when also namely this can cut into slices by transmitting terminal is defined as 1500.
If 4 detect that slice size when cutting into slices for (n-1)th time is mated with current network bandwidth, then slice size when slice size during (n-1)th section is cut into slices as this by transmitting terminal.
Slice size during (n-1)th section is mated with current network bandwidth and is referred to that slice size when cutting into slices for (n-1)th time was for both can not overload current network bandwidth, again can efficiency utilization current network bandwidth.Such as, slice size during (n-1)th section is 800, and current network bandwidth is in [c, d1] scope, known by table 2, and slice size 800 and the network bandwidth [c, d1] mate, then determine slice size when this is cut into slices by 800.
In addition, it should be added that, because network type also may change along with the change of the network environment residing for transmitting terminal, therefore detect that slice size when cutting into slices for (n-1)th time is mated with current network bandwidth, before slice size when slice size during (n-1)th section is cut into slices as this by transmitting terminal, whether transmitting terminal can also Sampling network type change, specific as follows:
1), whether transmitting terminal Sampling network type there occurs change;
2) if detect, network type there occurs change, slice size when then according to the network type after changing, transmitting terminal determines from default corresponding relation that this is cut into slices, default corresponding relation comprises the corresponding relation between different network type and different slice size.
Such as, when network type becomes 3G network, slice size when transmitting terminal determines from the default corresponding relation shown in table 1 that this is cut into slices according to 3G network, is 300, so that slice size can network type after Adaptive change.
Step 303, cuts into slices according to slice size and obtains file of cutting into slices from file.
Transmitting terminal is cut into slices according to slice size and is obtained file of cutting into slices from file.Such as, suppose that slice size is 1000, then transmitting terminal is cut into slices and is obtained the section file that byte number is 1000 from file.
If transmitting terminal is first time section, cut into slices from the beginning of this file, if this section is n-th section, n >=2, then transmitting terminal is cut into slices backward from (n-1)th section and is obtained file of cutting into slices.
As Fig. 3 B, be network condition 1 when cutting into slices, obtaining slice size according to corresponding relation is 800, then from file 333, obtain according to slice size the section file 01 that size is 800; Be network condition 2 when cutting into slices, obtaining slice size according to corresponding relation is 400, then from file 333, obtain according to slice size the section file 02 that size is 400; Be network condition 3 when cutting into slices, obtaining slice size according to corresponding relation is 1200, then from file 333, obtain according to slice size the section file 03 that size is 1200; Be network condition 4 when cutting into slices, obtaining slice size according to corresponding relation is 200, then from file 333, obtain according to slice size the section file 04 that size is 200; By that analogy, backward file 333 is cut into slices successively, obtain file of cutting into slices.
Step 304, uploads this section file.
This section file is uploaded by transmitting terminal, concrete, this section file is encapsulated as separately a request data package and uploads by transmitting terminal, section file, the IP address of transmitting terminal and the IP address etc. of receiving terminal is mainly comprised, until transmitting terminal completes uploading of whole file in this request data package.Owing to being that this section file is encapsulated as separately a request data package and uploads, being also encapsulated as separately a request data package by each section file and uploading, therefore each request data package can be connected by an independent HTTP and uploads.
If transmitting terminal uploads section, file is unsuccessful, and so transmitting terminal can also continue to attempt sending this section file, until send successfully or reach predetermined number of attempts.
In sum, the file uploading method that the present embodiment provides, by before cutting into slices to file to be uploaded at every turn, obtains current residing network of network situation; File is cut into slices by network condition when cutting into slices according to this, obtains this section file; This section file is uploaded; Solve when network condition is bad, comprise the easy packet loss of request data package of larger data amount thus cause the problem of whole files passe failure; Reach and file to be uploaded can be carried out uploading after section obtains section file according to network condition again, reduce packet loss, improve the success rate of files passe, save the effect of Internet resources.
In addition, file section is obtained file of cutting into slices by transmitting terminal, and file of cutting into slices one by one is uploaded, even if network shakes, cause the situations such as packet loss to occur, a just section file of impact, transmitting terminal can also continue to attempt sending this section file.Moreover each request data package can be connected by an independent HTTP to be uploaded, and does not need to connect by HTTP is long, therefore, it is possible to saves energy, can also reduce the loss of flow.
Moreover, by detecting the slice size method of whether mating with current network bandwidth during (n-1)th section, when not mating, slice size when determining that this is cut into slices according to current network bandwidth; Upon a match, then slice size when slice size during (n-1)th section being cut into slices as this; According to the effect of the size of real-time network conditions adjustment section file, packet loss can be reduced, improves the success rate of files passe, also can make full use of Internet resources even if reach.Again due to the developing rapidly of network technology (network of 2G, 3G, 4G and/or other type), use the period of network and the continuous change of user place to use, the size changing and adjust section file whether is there occurs by Sampling network type, reach and suit measures to local conditions, the effect of suiting measures to differing conditions in terms of time.
It should be added that, the embodiment shown in Fig. 3 A is only implemented separately to determine slice size with network type and the network bandwidth, and network type and the network bandwidth can also consider and determine slice size by transmitting terminal; In addition, network condition can also be history packet loss, transmitting terminal running software situation, offered load, service good and bad, time period residing for transmitting terminal upload file of operator and the geographical position etc. of transmitting terminal, is not limited to the embodiment shown in Fig. 3 A.
History packet loss using network condition: transmitting terminal can by the reference feature of history packet loss as slice size when determining that this is cut into slices.History packet loss is lower, and slice size is larger; History packet loss is higher, and slice size is less.Whether transmitting terminal can also preset a packet loss and be used as history packet loss and impact slice size and cause the reference of which kind of degree impact, such as, suppose to preset a packet loss 5%, if history packet loss is less than this packet loss 5% preset, then slice size when this history packet loss can not be cut into slices to this impacts; If history packet loss is greater than this packet loss 5% preset, then slice size when will be cut into slices to this locality by this history packet loss impacts, and slice size when this being cut into slices according to predetermined policy diminishes by transmitting terminal.Also namely, history packet loss is higher, and slice size is less.
It should be added that, current network bandwidth and history packet loss can also be considered slice size when determining that this is cut into slices by transmitting terminal.Such as, a weight is set to current network bandwidth, a weight is also set to history packet loss, current network bandwidth and each self-corresponding weight of history packet loss are substituted into the computing formula preset and show that result of calculation is to determine slice size when this is cut into slices.
For another example, transmitting terminal running software fewer, slice size is larger; Transmitting terminal running software more, slice size is less.Offered load is fewer, and slice size is larger; Offered load is larger, and slice size is less.The service quality of operator is better, and slice size is larger; The service quality of operator is poorer, and slice size is less.Time period residing for transmitting terminal upload file is more idle, and slice size is larger; Time period residing for transmitting terminal upload file is busier, and slice size is less.
Above-mentioned network condition can be implemented separately to determine slice size, also can comprehensively implement to determine slice size.
Be below device embodiment of the present invention, for the details of wherein not detailed description, can with reference to the embodiment of the method for above-mentioned correspondence.
Please refer to Fig. 4, it illustrates the block diagram of the files passe device that one embodiment of the invention provides.This files passe device can realize becoming all or part of of transmitting terminal by software, hardware or both combinations.This files passe device can comprise: situation acquisition module 420, file section module 440 and files passe module 460;
Situation acquisition module 420, for before cutting into slices to file to be uploaded at every turn, obtains current residing network of network situation;
File section module 440, file to be uploaded is cut into slices by the network condition that during for cutting into slices according to this, situation acquisition module 420 gets, and obtains this section file;
Files passe module 460, this section file obtained for module 440 of being cut into slices by file is uploaded.
In sum, the files passe device that the present embodiment provides, by before cutting into slices to file to be uploaded at every turn, obtains current residing network of network situation; File to be uploaded is cut into slices by network condition when cutting into slices according to this, obtains this section file; This section file is uploaded; Solve when network condition is bad, comprise the easy packet loss of request data package of larger data amount thus cause the problem of whole files passe failure; Reach and file to be uploaded can be carried out uploading after section obtains section file according to network condition again, reduce packet loss, improve the success rate of files passe, save the effect of Internet resources.
Please refer to Fig. 5, it illustrates the block diagram of the files passe device that another embodiment of the present invention provides.This files passe device can realize becoming all or part of of transmitting terminal by software, hardware or both combinations.This files passe device can comprise: situation acquisition module 520, file section module 540 and files passe module 560;
Situation acquisition module 520, for before cutting into slices to file to be uploaded at every turn, obtains current residing network of network situation;
File section module 540, file to be uploaded is cut into slices by the network condition that during for cutting into slices according to this, situation acquisition module 520 gets, and obtains this section file;
Files passe module 560, this section file obtained for module 540 of being cut into slices by file is uploaded.
Further, file section module 540, comprising:
Size determining unit 541, slice size when network condition during for cutting into slices according to this determines that this is cut into slices, the good and bad correlation of slice size and network condition;
File section unit 542, obtains file of cutting into slices for cutting into slices from file according to slice size.
Further, size determining unit 541, comprising:
First determines subelement 501, if be first time section for this section, slice size when network type when then cutting into slices according to this determines from default corresponding relation that this is cut into slices, default corresponding relation comprises the corresponding relation between different network type and different slice size.
Further, size determining unit 541, also comprises:
Second determines subelement 502, if be n-th section for this section, n >=2, then according to the historical responses Time Calculation current network bandwidth corresponding to section file uploaded; Whether slice size when detecting (n-1)th section mates with current network bandwidth; If detect, slice size when cutting into slices for (n-1)th time is not mated with current network bandwidth, then slice size when determining that this is cut into slices according to current network bandwidth.
Further, files passe device, also comprises:
3rd determines subelement 503, if for detecting that slice size when cutting into slices for (n-1)th time is mated with current network bandwidth, then and slice size when slice size during (n-1)th section being cut into slices as this.
Further, files passe device, also comprises:
Whether type detection subelement 504, there occurs change for Sampling network type;
4th determines subelement 505, if for detecting that network type there occurs change, slice size when then determining from default corresponding relation that this is cut into slices according to the network type after changing, default corresponding relation comprises the corresponding relation between different network type and different slice size.
Further, files passe module 560, also uploads for this section file is encapsulated as separately a request data package.
In sum, the files passe device that the present embodiment provides, by obtaining current residing network of network situation; According to network condition, file to be uploaded is cut into slices, obtain file of cutting into slices; Section file is uploaded; Solve when network condition is bad, comprise the easy packet loss of request data package of larger data amount thus cause the problem of whole files passe failure; Reach and file to be uploaded can be carried out uploading after section obtains section file according to network condition again, reduce packet loss, improve the success rate of files passe, save the effect of Internet resources.
Please refer to Fig. 6, it illustrates the structural representation of the transmitting terminal that one embodiment of the present of invention provide.This transmitting terminal 600 for implementing the file uploading method provided in above-described embodiment, specifically:
Transmitting terminal 600 can comprise RF(Radio Frequency, radio frequency) circuit 610, the memory 620 including one or more computer-readable recording mediums, input unit 630, display unit 640, transducer 650, voicefrequency circuit 660, short range wireless transmission module 670, include the parts such as processor 680 and power supply 690 that more than or processes core.It will be understood by those skilled in the art that the transmitting terminal structure shown in Fig. 6 does not form the restriction to transmitting terminal, the parts more more or less than diagram can be comprised, or combine some parts, or different parts are arranged.Wherein:
RF circuit 610 can be used for receiving and sending messages or in communication process, the reception of signal and transmission, especially, after being received by the downlink information of base station, transfer to more than one or one processor 680 to process; In addition, base station is sent to by relating to up data.Usually, RF circuit 610 includes but not limited to antenna, at least one amplifier, tuner, one or more oscillator, subscriber identity module (SIM) card, transceiver, coupler, LNA(Low Noise Amplifier, low noise amplifier), duplexer etc.In addition, RF circuit 610 can also by radio communication and network and other devices communicatings.Radio communication can use arbitrary communication standard or agreement, include but not limited to GSM (Global System of Mobile communication, global system for mobile communications), GPRS (General Packet Radio Service, general packet radio service), CDMA (Code Division Multiple Access, code division multiple access), WCDMA (Wideband CodeDivision Multiple Access, Wideband Code Division Multiple Access (WCDMA)), LTE (Long Term Evolution, Long Term Evolution), Email, SMS (Short Messaging Service, Short Message Service) etc.Memory 620 can be used for storing software program and module, such as, memory 620 may be used for storing Preset Time list, the software program of storage of collected voice signal can also be used for, realize the software program that the software program of keyword identification, the software program realizing continuous speech recognition and realization arrange prompting item, binding relationship storing WAP (wireless access point) and user account etc. can also be used for.Processor 680 is stored in software program and the module of memory 620 by running, thus performs the application of various function and data processing.Memory 620 mainly can comprise storage program district and store data field, and wherein, storage program district can storage operation system, application program (such as sound-playing function, image player function etc.) etc. needed at least one function; Store data field and can store the data (such as voice data, phone directory etc.) etc. created according to the use of transmitting terminal 600.In addition, memory 620 can comprise high-speed random access memory, can also comprise nonvolatile memory, such as at least one disk memory, flush memory device or other volatile solid-state parts.Correspondingly, memory 620 can also comprise Memory Controller, to provide the access of processor 680 and input unit 630 pairs of memories 620.
Input unit 630 can be used for the numeral or the character information that receive input, and produces and to arrange with user and function controls relevant keyboard, mouse, action bars, optics or trace ball signal and inputs.Particularly, input unit 630 can comprise Touch sensitive surface 631 and other input equipments 632.Touch sensitive surface 631, also referred to as touch display screen or Trackpad, user can be collected or neighbouring touch operation (such as user uses any applicable object or the operations of annex on Touch sensitive surface 631 or near Touch sensitive surface 631 such as finger, stylus) thereon, and drive corresponding jockey according to the formula preset.Optionally, Touch sensitive surface 631 can comprise touch detecting apparatus and touch controller two parts.Wherein, touch detecting apparatus detects the touch orientation of user, and detects the signal that touch operation brings, and sends signal to touch controller; Touch controller receives touch information from touch detecting apparatus, and converts it to contact coordinate, then gives processor 680, and the order that energy receiving processor 680 is sent also is performed.In addition, the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave can be adopted to realize Touch sensitive surface 631.Except Touch sensitive surface 631, input unit 630 can also comprise other input equipments 632.Particularly, other input equipments 632 can include but not limited to one or more in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, action bars etc.
Display unit 640 can be used for the various graphical user interface showing information or the information being supplied to user and the transmitting terminal 600 inputted by user, and these graphical user interface can be made up of figure, text, icon, video and its combination in any.Display unit 640 can comprise display floater 641, optionally, the form such as LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) can be adopted to configure display floater 641.Further, Touch sensitive surface 631 can cover on display floater 641, when Touch sensitive surface 631 detects thereon or after neighbouring touch operation, send processor 680 to determine the type of touch event, on display floater 641, provide corresponding vision to export with preprocessor 680 according to the type of touch event.Although in figure 6, Touch sensitive surface 631 and display floater 641 be as two independently parts realize input and input function, in certain embodiments, can by Touch sensitive surface 631 and display floater 641 integrated and realize input and output function.
Transmitting terminal 600 also can comprise at least one transducer 650, such as optical sensor, motion sensor and other transducers.Particularly, optical sensor can comprise ambient light sensor and proximity transducer, and wherein, ambient light sensor the light and shade of environmentally light can regulate the brightness of display floater 641, proximity transducer when transmitting terminal 600 moves in one's ear, can cut out display floater 641 and/or backlight.As the one of motion sensor; Gravity accelerometer can detect the size of all directions (are generally three axles) acceleration; size and the direction of gravity can be detected time static, can be used for identifying the application (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating) of mobile phone attitude, Vibration identification correlation function (such as pedometer, knock) etc.; As for transmitting terminal 600 also other transducers such as configurable gyroscope, barometer, hygrometer, thermometer, infrared ray sensor, do not repeat them here.
Voicefrequency circuit 660, loud speaker 661, microphone 662 can provide the audio interface between user and transmitting terminal 600.Voicefrequency circuit 660 can by receive voice data conversion after the signal of telecommunication, be transferred to loud speaker 661, by loud speaker 661 be converted to voice signal export; On the other hand, the voice signal of collection is converted to the signal of telecommunication by microphone 662, voice data is converted to after being received by voicefrequency circuit 660, after again voice data output processor 680 being processed, through RF circuit 610 to send to another terminal, or export voice data to memory 620 to process further.Voicefrequency circuit 660 also may comprise earphone jack, to provide the communication of peripheral hardware earphone and transmitting terminal 600.
Short range wireless transmission module 670 can be WIFI(wireless fidelity, Wireless Fidelity) module or bluetooth module etc.By short range wireless transmission module 670, transmitting terminal 600 can help that user sends and receive e-mail, browsing page and access streaming video etc., and its broadband internet wireless for user provides is accessed.Although Fig. 6 shows short range wireless transmission module 670, be understandable that, it does not belong to must forming of transmitting terminal 600, can omit in the scope of essence not changing invention as required completely.
Processor 680 is control centres of transmitting terminal 600, utilize the various piece of various interface and the whole transmitting terminal of connection, software program in memory 620 and/or module is stored in by running or performing, and call the data be stored in memory 620, perform various function and the deal with data of transmitting terminal 600, thus integral monitoring is carried out to transmitting terminal.Optionally, processor 680 can comprise one or more process core; Optionally, processor 680 accessible site application processor and modem processor, wherein, application processor mainly processes operating system, user interface and application program etc., and modem processor mainly processes radio communication.Be understandable that, above-mentioned modem processor also can not be integrated in processor 680.
Transmitting terminal 600 also comprises the power supply 690(such as battery of powering to all parts), preferably, power supply can be connected with processor 680 logic by power-supply management system, thus realizes the functions such as management charging, electric discharge and power managed by power-supply management system.Power supply 690 can also comprise one or more direct current or AC power, recharging system, power failure detection circuit, power supply changeover device or the random component such as inverter, power supply status indicator.
Although not shown, transmitting terminal 600 can also comprise camera, bluetooth module etc., does not repeat them here.
Transmitting terminal 600 also includes memory, and one or more than one program, one of them or more than one program are stored in memory, and are configured to perform file uploading method described in above-mentioned any embodiment by more than one or one processor.
It should be added that, in another embodiment, transmitting terminal can comprise the parts more more or less than Fig. 6, or combines some parts, or different parts are arranged, realize all or part of function.
In addition, can also be implemented as the computer program performed by CPU according to method of the present invention, this computer program can store in a computer-readable storage medium.When this computer program is performed by CPU, perform the above-mentioned functions limited in method of the present invention.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (14)

1. a file uploading method, is characterized in that, described method comprises:
Before file to be uploaded is cut into slices at every turn, obtain current residing network of network situation;
Described file is cut into slices by described network condition when cutting into slices according to this, obtains this section file;
This section file described is uploaded.
2. method according to claim 1, is characterized in that, described file is cut into slices by described described network condition when cutting into slices according to this, obtains this section file, comprising:
Slice size when described network condition when cutting into slices according to this determines that this is cut into slices, the good and bad correlation of described slice size and described network condition;
Cut into slices from described file according to described slice size and obtain described section file.
3. method according to claim 2, is characterized in that, slice size when described described network condition when cutting into slices according to this determines that this is cut into slices, comprising:
If this section is first time section, then described slice size when network type when cutting into slices according to this determines from default corresponding relation that this is cut into slices, described default corresponding relation comprises the corresponding relation between different network type and different slice size.
4. method according to claim 2, is characterized in that, slice size when described described network condition when cutting into slices according to this determines that this is cut into slices, also comprises:
If this section is n-th section, n >=2, then according to the historical responses Time Calculation current network bandwidth corresponding to section file uploaded; Whether slice size when detecting (n-1)th section mates with described current network bandwidth; If slice size when detecting described (n-1)th section is not mated with described current network bandwidth, then described slice size when determining that this is cut into slices according to described current network bandwidth.
5. method according to claim 4, is characterized in that, whether slice size during described detection (n-1)th time section also comprises after mating with described current network bandwidth:
If slice size when detecting described (n-1)th section is mated with described current network bandwidth, then described slice size when slice size during described (n-1)th section being cut into slices as this.
6. method according to claim 5, it is characterized in that, if slice size when detecting described (n-1)th section described is mated with described current network bandwidth, then, before slice size when slice size during described (n-1)th section being cut into slices as this, also comprise:
Detect described network type and whether there occurs change;
If detect, described network type there occurs change, described slice size when then determining from described default corresponding relation that this is cut into slices according to the described network type after changing, described default corresponding relation comprises the corresponding relation between different network type and different slice size.
7. according to the arbitrary described method of claim 1 to 6, it is characterized in that, described file of being cut into slices by described this is uploaded, and comprising:
This section file described is encapsulated as separately a request data package upload.
8. a files passe device, is characterized in that, described device comprises:
Situation acquisition module, for before cutting into slices to file to be uploaded at every turn, obtains current residing network of network situation;
File section module, described file is cut into slices by described network condition during for cutting into slices according to this, obtains this section file;
Files passe module, for uploading this section file described.
9. device according to claim 8, is characterized in that, described file section module, comprising:
Size determining unit, slice size when described network condition during for cutting into slices according to this determines that this is cut into slices, the good and bad correlation of described slice size and described network condition;
File section unit, obtains described section file for cutting into slices from described file according to described slice size.
10. device according to claim 9, is characterized in that, described size determining unit, comprising:
First determines subelement, if be first time section for this section, described slice size when network type when then cutting into slices according to this determines from default corresponding relation that this is cut into slices, described default corresponding relation comprises the corresponding relation between different network type and different slice size.
11. devices according to claim 9, is characterized in that, described size determining unit, also comprises:
Second determines subelement, if be n-th section for this section, n >=2, then according to the historical responses Time Calculation current network bandwidth corresponding to section file uploaded; Whether slice size when detecting (n-1)th section mates with described current network bandwidth; If slice size when detecting described (n-1)th section is not mated with described current network bandwidth, then described slice size when determining that this is cut into slices according to described current network bandwidth.
12. devices according to claim 11, is characterized in that, described device, also comprises:
3rd determines subelement, if mate with described current network bandwidth for slice size when detecting described (n-1)th section, then and described slice size when slice size during described (n-1)th section being cut into slices as this.
13. devices according to claim 12, is characterized in that, described device, also comprises:
Whether type detection subelement, there occurs change for detecting described network type;
4th determines subelement, if for detecting that described network type there occurs change, described slice size when then determining from described default corresponding relation that this is cut into slices according to the described network type after changing, described default corresponding relation comprises the corresponding relation between different network type and different slice size.
Device described in 14. according to Claim 8 to 13 are arbitrary, is characterized in that, described files passe module, also uploads for this section file described is encapsulated as separately a request data package.
CN201410215992.XA 2014-05-21 2014-05-21 File upload method and apparatus thereof Pending CN104967634A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410215992.XA CN104967634A (en) 2014-05-21 2014-05-21 File upload method and apparatus thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410215992.XA CN104967634A (en) 2014-05-21 2014-05-21 File upload method and apparatus thereof

Publications (1)

Publication Number Publication Date
CN104967634A true CN104967634A (en) 2015-10-07

Family

ID=54221575

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410215992.XA Pending CN104967634A (en) 2014-05-21 2014-05-21 File upload method and apparatus thereof

Country Status (1)

Country Link
CN (1) CN104967634A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107249022A (en) * 2017-05-27 2017-10-13 北京小米移动软件有限公司 Backup image method and device
CN107483573A (en) * 2017-08-08 2017-12-15 郑州云海信息技术有限公司 The transmission method and device of image file in cloud platform
CN108111553A (en) * 2016-11-24 2018-06-01 腾讯科技(深圳)有限公司 The method and device of service is provided
CN108141412A (en) * 2015-10-28 2018-06-08 英特尔Ip公司 The operation based on slice in wireless network with end to end network slice
CN108574735A (en) * 2018-04-11 2018-09-25 努比亚技术有限公司 Data processing method, terminal and computer readable storage medium
CN109982160A (en) * 2019-04-09 2019-07-05 北京奇艺世纪科技有限公司 A kind of method, apparatus, client device and server that video uploads
CN110995796A (en) * 2019-11-20 2020-04-10 中国建设银行股份有限公司 Data transmission method and device based on private line
CN111953979A (en) * 2020-07-16 2020-11-17 西安万像电子科技有限公司 Image processing method and device
CN112153681A (en) * 2020-09-22 2020-12-29 北京达佳互联信息技术有限公司 Resource segmentation method and device, electronic equipment and storage medium
CN113747245A (en) * 2021-09-06 2021-12-03 北京字跳网络技术有限公司 Multimedia resource uploading method and device, electronic equipment and readable storage medium
CN115021778A (en) * 2022-06-02 2022-09-06 广州番禺电缆集团有限公司 Intelligent cable based on network stability feedback monitoring information

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101145933A (en) * 2007-10-26 2008-03-19 北大方正集团有限公司 Transmission method, receiving method and corresponding device for distribution system and media data
CN101656756A (en) * 2009-09-17 2010-02-24 中国科学院声学研究所 File transferring method with self-adaptive control of transmission speed and system thereof
CN101848067A (en) * 2010-06-22 2010-09-29 中兴通讯股份有限公司 Data transmission method and system for self-adaptive bandwidth
CN102123303A (en) * 2011-03-25 2011-07-13 天脉聚源(北京)传媒科技有限公司 Audio/video file playing method and system as well as transmission control device
CN102571966A (en) * 2012-01-16 2012-07-11 上海方正数字出版技术有限公司 Network transmission method for large extensible markup language (XML) document
CN103763637A (en) * 2014-01-21 2014-04-30 北京云视睿博传媒科技有限公司 Stream media broadcasting method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101145933A (en) * 2007-10-26 2008-03-19 北大方正集团有限公司 Transmission method, receiving method and corresponding device for distribution system and media data
CN101656756A (en) * 2009-09-17 2010-02-24 中国科学院声学研究所 File transferring method with self-adaptive control of transmission speed and system thereof
CN101848067A (en) * 2010-06-22 2010-09-29 中兴通讯股份有限公司 Data transmission method and system for self-adaptive bandwidth
CN102123303A (en) * 2011-03-25 2011-07-13 天脉聚源(北京)传媒科技有限公司 Audio/video file playing method and system as well as transmission control device
CN102571966A (en) * 2012-01-16 2012-07-11 上海方正数字出版技术有限公司 Network transmission method for large extensible markup language (XML) document
CN103763637A (en) * 2014-01-21 2014-04-30 北京云视睿博传媒科技有限公司 Stream media broadcasting method and system

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI800476B (en) * 2015-10-28 2023-05-01 美商蘋果公司 Slice-based operation in wireless networks with end-to-end network slicing
CN108141412A (en) * 2015-10-28 2018-06-08 英特尔Ip公司 The operation based on slice in wireless network with end to end network slice
CN108141412B (en) * 2015-10-28 2022-03-04 苹果公司 Slice-based operation in a wireless network with end-to-end network slices
CN108111553B (en) * 2016-11-24 2020-12-25 腾讯科技(深圳)有限公司 Method and device for providing service
CN108111553A (en) * 2016-11-24 2018-06-01 腾讯科技(深圳)有限公司 The method and device of service is provided
CN107249022B (en) * 2017-05-27 2020-12-18 北京小米移动软件有限公司 Image backup method and device
CN107249022A (en) * 2017-05-27 2017-10-13 北京小米移动软件有限公司 Backup image method and device
CN107483573A (en) * 2017-08-08 2017-12-15 郑州云海信息技术有限公司 The transmission method and device of image file in cloud platform
CN108574735A (en) * 2018-04-11 2018-09-25 努比亚技术有限公司 Data processing method, terminal and computer readable storage medium
CN108574735B (en) * 2018-04-11 2022-07-12 柴森森 Data processing method, terminal and computer readable storage medium
CN109982160A (en) * 2019-04-09 2019-07-05 北京奇艺世纪科技有限公司 A kind of method, apparatus, client device and server that video uploads
CN110995796A (en) * 2019-11-20 2020-04-10 中国建设银行股份有限公司 Data transmission method and device based on private line
CN111953979A (en) * 2020-07-16 2020-11-17 西安万像电子科技有限公司 Image processing method and device
CN112153681A (en) * 2020-09-22 2020-12-29 北京达佳互联信息技术有限公司 Resource segmentation method and device, electronic equipment and storage medium
CN112153681B (en) * 2020-09-22 2024-02-23 北京达佳互联信息技术有限公司 Resource segmentation method, device, electronic equipment and storage medium
CN113747245A (en) * 2021-09-06 2021-12-03 北京字跳网络技术有限公司 Multimedia resource uploading method and device, electronic equipment and readable storage medium
WO2023029846A1 (en) * 2021-09-06 2023-03-09 北京字跳网络技术有限公司 Multimedia resource uploading method and apparatus, electronic device, and readable storage medium
CN115021778A (en) * 2022-06-02 2022-09-06 广州番禺电缆集团有限公司 Intelligent cable based on network stability feedback monitoring information
CN115021778B (en) * 2022-06-02 2023-10-24 广州番禺电缆集团有限公司 Intelligent cable based on network stability feedback monitoring information

Similar Documents

Publication Publication Date Title
CN104967634A (en) File upload method and apparatus thereof
CN104142862B (en) The overload protection method of server and device
CN104834529A (en) Method and device for optimizing performance of application
CN104978115A (en) Content display method and device
CN104135502B (en) A kind of method, relevant device and system realizing application message and remind
CN105119806A (en) Message updating method and device
CN104427083A (en) Volume adjusting method and device
CN103177217B (en) A kind of file scanning method, system and client and server
CN104618222A (en) Method and device for matching expression image
CN105306383A (en) Message push method, terminal and push server
CN104978176A (en) Application program interface calling method and device
CN104572690A (en) Webpage data acquisition method, webpage data acquisition device and webpage data acquisition system
CN104683456A (en) Service processing method, server and terminal
CN104065693A (en) Method, device and system for accessing network data in webpage applications
CN105243638A (en) Image uploading method and apparatus
CN104980455A (en) Multi-terminal data synchronization method based on cloud storage, device and system thereof
CN104144312A (en) Video processing method and related device
CN104393848A (en) Method and device for adjusting volume
CN104837042A (en) Digital multimedia data encoding method and apparatus
CN104243538A (en) Resource sharing method and system
CN104133757A (en) Method for obtaining memory information and terminal
CN104123276A (en) Method, device and system for intercepting popup windows in browser
CN103068016B (en) The method of mobile terminal and reduction power consumption thereof
CN105491135A (en) Data connection establishing method and device
CN106453597A (en) Data synchronization cycle adjustment method, device and system

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