CN106375483A - File transmission method and device - Google Patents

File transmission method and device Download PDF

Info

Publication number
CN106375483A
CN106375483A CN201610988962.1A CN201610988962A CN106375483A CN 106375483 A CN106375483 A CN 106375483A CN 201610988962 A CN201610988962 A CN 201610988962A CN 106375483 A CN106375483 A CN 106375483A
Authority
CN
China
Prior art keywords
file
browser
application interface
file fragmentation
server
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
CN201610988962.1A
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 Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201610988962.1A priority Critical patent/CN106375483A/en
Publication of CN106375483A publication Critical patent/CN106375483A/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 Transfer Between Computers (AREA)

Abstract

The invention discloses a file transmission method and device. The method comprises the following steps: a browser sends a file transmission request to a server via a first application interface of a host process, the file transmission request is used for indicating transmission of object files to the server, the object files are obtained by the browser via the first application interface, and the object files are divided into a plurality of file segments via a second application interface of the browser beforehand; via the first application interface, the browser receives a confirmation message sent by the server; the confirmation message is used for indicating a first file segment set that exists in the server; the first file segment set comprises file segments, received by the server, among the plurality of file segments; the browser then is used for transmitting the plurality of file segments excluding the first file segment set via the first application interface. The file transmission method and device help solve a technical problem that based on relevant technologies, a browser on a mobile terminal does not support plug-ins and therefore breakpoint resume of files cannot be realized via the browser on the mobile terminal.

Description

Document transmission method and device
Technical field
The present invention relates to computer realm, in particular to a kind of document transmission method and device.
Background technology
At present, user passes through transmitting file on browser and generally can adopt following several ways:
(1) server is transferred in the form of list by browser file api.This mode being capable of compatible mobile terminal Browser, but, server interface pressure can be caused to increase for the larger file of data volume, and if in file transmission Disconnected, then need again to upload this document.
(2) file is transferred to server by the flash plug-in unit by installing in browser.This mode can realize file Breakpoint transmission, but cannot the larger file of transmitted data amount, and need flash plug-in unit is installed in a browser, due to moving This flash plug-in unit do not supported by moved end browser, it will cause to realize the breakpoint transmission of file in the browser of mobile terminal.
(3) file is transferred to server by the ftn plug-in unit by installing in browser.This mode can realize file Breakpoint transmission it is also possible to the larger file of transmitted data amount, but, which needs to install ftn plug-in unit in a browser, due to This ftn plug-in unit do not supported by mobile terminal browser yet, and the breakpoint that cannot realize file in the browser of mobile terminal also will be caused to continue Pass.
For above-mentioned problem, effective solution is not yet proposed at present.
Content of the invention
Embodiments provide a kind of document transmission method and device, at least to solve in correlation technique due to movement Plug-in unit do not supported by end browser, leads to realize the technical problem of the breakpoint transmission of file in the browser of mobile terminal.
One side according to embodiments of the present invention, there is provided a kind of document transmission method, comprising: browser passes through master and enters First application interface of journey sends file transmission request to server, and wherein, file transmission request passes to server for instruction Defeated file destination, file destination is that browser is got by the first application interface, and file destination is in advance by browser Second application interface is divided into multiple file fragmentations;Browser is disappeared by the confirmation that the first application interface the reception server sends Breath, wherein, confirms that message is used for indicating already present first file fragmentation set in server, the first file fragmentation set includes The file fragmentation that in multiple file fragmentations, being serviced device receives;Browser passes through the first application interface by multiple file fragmentations In file fragmentation in addition to the first file fragmentation set be transferred to server.
Another aspect according to embodiments of the present invention, additionally provides a kind of file transfer means, comprising: transmitting element, uses Send file transmission request in the first application interface that browser passes through host process to server, wherein, file transmission request is used In instruction to server transport file destination, file destination is that browser is got by the first application interface, and target literary composition Part is divided into multiple file fragmentations by the second application interface of browser in advance;Receiving unit, passing through first for browser should The confirmation message being sent with interface server, wherein, confirms that message is used for indicating already present first file in server Burst set, the first file fragmentation set includes the file fragmentation that in multiple file fragmentations, being serviced device receives;First biography Defeated unit, passes through the first application interface by the file in addition to the first file fragmentation set in multiple file fragmentations for browser Sliced transmission is to server.
In embodiments of the present invention, browser sends file transmission by the first application interface of host process to server and asks Ask, and after browser receives the confirmation message of server transmission by the first application interface, then connect by the first application File fragmentation in addition to the first file fragmentation set in multiple file fragmentations is transferred to server, wherein, file destination by mouth It is that browser is got by the first application interface and in advance multiple files are divided into by the second application interface of browser and divide Piece, confirms that message is used for indicating already present first file fragmentation set in server, the first file fragmentation set includes multiple The file fragmentation that in file fragmentation, being serviced device receives, has reached and need not install plug-in unit in a browser and can also realize literary composition The purpose of the breakpoint transmission of part, and then solve in correlation technique because mobile terminal browser does not support plug-in unit, lead to moving The technical problem of the breakpoint transmission of file cannot be realized, it is achieved thereby that simplifying browser setting, optimization browses in the browser of end The technique effect of device performance.
Brief description
Accompanying drawing described herein is used for providing a further understanding of the present invention, constitutes the part of the application, this Bright schematic description and description is used for explaining the present invention, does not constitute inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the schematic diagram of the hardware environment of document transmission method according to embodiments of the present invention;
Fig. 2 is the flow chart of a kind of optional document transmission method according to embodiments of the present invention;
Fig. 3 is the schematic diagram of the model framework of document transmission method according to embodiments of the present invention;
Fig. 4 is the schematic diagram of a kind of optional file transfer means according to embodiments of the present invention;
Fig. 5 is the schematic diagram of another kind of optional file transfer means according to embodiments of the present invention;
Fig. 6 is the schematic diagram of another kind of optional file transfer means according to embodiments of the present invention;
Fig. 7 is the schematic diagram of another kind of optional file transfer means according to embodiments of the present invention;
Fig. 8 is the schematic diagram of another kind of optional file transfer means according to embodiments of the present invention;And
Fig. 9 is a kind of structured flowchart of terminal according to embodiments of the present invention.
Specific embodiment
In order that those skilled in the art more fully understand the present invention program, below in conjunction with the embodiment of the present invention Accompanying drawing, is clearly and completely described to the technical scheme in the embodiment of the present invention it is clear that described embodiment is only The embodiment of a present invention part, rather than whole embodiments.Based on the embodiment in the present invention, ordinary skill people The every other embodiment that member is obtained under the premise of not making creative work, all should belong to the model of present invention protection Enclose.
It should be noted that term " first " in description and claims of this specification and above-mentioned accompanying drawing, " Two " it is etc. for distinguishing similar object, without for describing specific order or precedence.It should be appreciated that such use Data can exchange in the appropriate case so that embodiments of the invention described herein can with except here diagram or Order beyond those of description is implemented.Additionally, term " comprising " and " having " and their any deformation are it is intended that cover Cover non-exclusive comprising, for example, contain series of steps or process, method, system, product or the equipment of unit are not necessarily limited to Those steps clearly listed or unit, but may include clearly not listing or for these processes, method, product Or the intrinsic other steps of equipment or unit.
First, during the embodiment of the present invention is described occur part noun or term be applied to as follows Explain:
An application HTML under the kernel language of html5: WWW, standard generalized markup language (html) the 5th material alteration.
A kind of substandard application interface of browser host process of webworker:html5.
A kind of substandard application interface that file is supported with streaming operation of filereader:html5.
The application interface that a kind of substandard extension to list of formdata:html5 is realized.
Embodiment 1
According to embodiments of the present invention, there is provided a kind of embodiment of the method for document transmission method.
Alternatively, in the present embodiment, above-mentioned document transmission method can apply to as shown in Figure 1 by server 102 In the hardware environment being constituted with terminal 104.As shown in figure 1, server 102 is attached with terminal 104 by network, above-mentioned Network includes but is not limited to: wide area network, Metropolitan Area Network (MAN) or LAN, and terminal 104 is not limited to pc, mobile phone, panel computer etc..This The document transmission method of inventive embodiments can be executed by server 102 it is also possible to be executed by terminal 104, can also be Jointly executed by server 102 and terminal 104.Wherein, the document transmission method of the terminal 104 execution embodiment of the present invention can also It is to be executed by client mounted thereto.
Before the document transmission method to the embodiment of the present invention describes in detail, introduce two kinds of files herein first and pass Defeated mode:
Second passes: is exactly to feel that file is once just uploaded to browsing device net page for from user's impression, uplink time is shorter. For from technology is realized, in server, have existed for this document, when user initiates the request uploading this document, server Directly in response to asking and user's this document can be notified to have existed, the upload of this document can be done directly.Need explanation It is that second biography needs to notify to server by the cryptographic Hash of file, and server can judge this document according to the cryptographic Hash receiving Whether exist, if server judges that this document exists, a marker bit can be returned and notify user.
Resume: be user upload first during this document because of network interrupt etc. reason lead to upload first failure, when The cryptographic Hash of this document when user initiates the upload request to this document again, can be sent first to server, server can So that it is processed and is returned with the size of the file having uploaded, divided with the file realized after this size of this document Piece starts to upload.It should be noted that the document transmission method in the embodiment of the present invention has stressed how need not browse The breakpoint transmission that plug-in unit can also realize file using the application interface of browser is installed in device.
Fig. 2 is the flow chart of a kind of optional document transmission method according to embodiments of the present invention, as shown in Fig. 2 the party Method may comprise steps of:
Step s202, the first application interface that browser passes through host process sends file transmission request to server, wherein, For instruction to server transport file destination, file destination is that browser passes through the first application interface acquisition for file transmission request Arrive, and file destination is divided into multiple file fragmentations by the second application interface of browser in advance;
Step s204, browser passes through the confirmation message that the first application interface the reception server sends, and wherein, confirms message For indicating already present first file fragmentation set in server, the first file fragmentation set is included in multiple file fragmentations The file fragmentation that being serviced device receives;
Step s206, browser pass through the first application interface by multiple file fragmentations in addition to the first file fragmentation set File fragmentation be transferred to server.
By above-mentioned steps s202 to step s206, the first application interface that browser passes through host process sends to server File transmission request, and after browser receives the confirmation message of server transmission by the first application interface, then pass through File fragmentation in addition to the first file fragmentation set in multiple file fragmentations is transferred to server by the first application interface, its In, file destination is that browser is got by the first application interface and is divided into by the second application interface of browser in advance Multiple file fragmentations, confirm that message is used for indicating already present first file fragmentation set, the first file fragmentation collection in server Close and include the file fragmentation that in multiple file fragmentations, being serviced device receives, reached and plug-in unit need not be installed in a browser also The purpose of the breakpoint transmission of file can be realized, and then solve because mobile terminal browser does not support plug-in unit in correlation technique, Lead to realize the technical problem of the breakpoint transmission of file in the browser of mobile terminal, it is achieved thereby that simplify browser setting Put, optimize the technique effect of browser performance.
It should be noted that browser in the embodiment of the present invention can be mobile terminal browser or non-moving End browser, the embodiment of the present invention is not specifically limited to it.Browser can be any type with html5 Webpage Application, the such as video player of webpage version or client edition, instant messaging application, browser application etc..The present invention is real Apply the browser in example and can have host process, the host process of browser can be used for processing the operation pages in browser for the user Upper performed operation and browser client carry out data interaction, process the various request of Client-initiated, process registration, readjustment Etc. event.The host process of browser can be also used for processing other events or request, no longer illustrates one by one herein.Browser Can also have the first application interface, this first application interface can be the application interface of browser host process, alternatively, first Application interface can be webworker, and wherein webworker connects for a kind of substandard application of browser host process of html5 Mouthful.Because browser host process is single thread execution, so it should avoid as early as possible in ui in browser page operating process Thread continually dom operation and complexity mathematical calculation, with reach avoid browser page interim card affect Consumer's Experience mesh 's.The embodiment of the present invention can be by the handling process of document transmission method and calculating process in the process of the first application interface Execution, so can mitigate the pressure of browser host process.Browser can also have the second application interface, and this second application connects Mouth can be the application interface that file is supported with streaming operation, and alternatively, the second application interface can be filereader, its In, filereader is a kind of substandard application interface that file is supported with streaming operation of html5.Using the second application interface Can realize the pretreatment operation to file, the size of such as calculation document, divide documents into multiple file fragmentations etc..Need Illustrate, the document transmission method of the embodiment of the present invention can using the host process in browser, the first application interface and Second application interface is realized to install the breakpoint transmission that plug-in unit can also realize file in a browser, and then can reduce clear Look at the setting of device, optimize the serviceability of browser.
Also, it should be noted the file destination in the embodiment of the present invention can be any type of file, such as text, Picture, audio frequency, video file etc., the embodiment of the present invention is not specifically limited to the type of file destination.The embodiment of the present invention Document transmission method can upload file destination in a browser, namely user can by browser by file destination transmit to Server, wherein, server could be for server browser being supported and safeguarding.Herein it should be noted that The document transmission method of the embodiment of the present invention can transmit file destination little for data volume to browser it is also possible to by data volume Big file destination transmits to server, and maximum can reach 8gb, even more greatly.
In the practical application scene to server transport file destination, user choose need transmission file destination it Afterwards, this file destination can be uploaded in the upload page of browser first, then the host process of browser can by with The data interaction of this upload page gets this file destination.Browser execution host process during, the first of host process Application interface can get this file destination from host process, and calls the second application interface of browser to draw file destination It is divided into multiple file fragmentations.Herein it should be noted that file destination is divided into multiple file fragmentations by the second application interface, its In each file fragmentation size can identical it is also possible to different.In the second application interface, file destination is divided into multiple literary compositions After part burst, the first application interface can calculate the cryptographic Hash of each file fragmentation in multiple file fragmentations respectively, above-mentioned Process is browser in the process to the pretreatment of file destination to before server transport file destination.Need explanation herein It is that, if the data volume of file destination is very big, browser single treatment will be very painstaking, now needs to divide file destination Become multiple file fragmentations, the division of file destination needs to rely on the second application interface filereader of browser, In filereader, file itself provides Fragmentation to realize file destination is cut, and filereader provides The api of readarraybuffer, can be in the form of being converted into buffer by the file fragmentation after cutting, in order to right with realization It carries out bit manipulation, and this is also the premise of the cryptographic Hash calculating each file fragmentation for browser by the first application interface.Also It should be noted that the computational methods of the cryptographic Hash of file fragmentation may be referred to the realization of md5, sha increased income, the present invention is implemented The computational methods that example is adopted to the cryptographic Hash of the first application interface calculation document burst are not specifically limited, herein no longer one by one Citing describes in detail.
Above-mentioned steps s202 to step s206 is one of cyclic process to server transport file destination for the browser, Namely above-mentioned steps s202 to step s206 be one of multiple file fragmentations from browser to server transport file destination The process of file fragmentation, is described in detail below above-mentioned steps s202 to step s206:
In the technical scheme that step s202 provides, browser, can be first to before server transport file fragmentation Send file transmission request to server, wherein, this document transmission request can serve to indicate that to server transport file destination. Herein it should be noted that browser pass through the first application interface and the second application interface the file destination getting is carried out pre- After process, each file fragmentation in multiple file fragmentations of file destination division and multiple file fragmentation can be obtained Cryptographic Hash, browser can carry in following information when sending file transmission request to server in file transmission request At least one of: the identification information of file destination, the size of file destination, the quantity of file fragmentation, the Kazakhstan of each file fragmentation Uncommon value, the information such as the size of each file fragmentation, label of each file fragmentation, can also carry it in file transmission request His information, no longer illustrates herein one by one.
In practical application scene, the first application interface that browser passes through host process please to server transmission file transmission Asking can be in the following ways: file transmission request can be xmlhttprequest, and the first application interface can be by calling Server pre-assigned http data transmission interface sends file transmission request to server.Herein it should be noted that clear Device of looking at can agree upon Data Transport Protocol and the response process for file transmission request in advance with server, works as browser After file transmission request is sent according to the Data Transport Protocol agreeing upon in advance to server by the first application interface, service Device can be carried out to this document transmission request according to the response policy decided through consultation in advance after being successfully received this document transmission request Response.
In the technical scheme that step s204 provides, server please in the file transmission receiving the first application interface transmission After asking, can immediately this document transmission request be responded, response process may include that and transmits request to this document first Parsed, therefrom got the identification information of file destination and the cryptographic Hash of each file fragmentation in file destination.Service Device can search whether the file having indicated by the identification information of file destination from locally stored, if finding such Whether file, then be transmitted through before this file destination is described on server, but be not aware that this file destination Upload complete.After server finds file destination in locally stored, server can continue to search for locally stored in The file fragmentation having existed and its corresponding cryptographic Hash, and will be locally stored in the transmission request of these cryptographic Hash and file in The cryptographic Hash of each file fragmentation of entrained file destination is compared, if the file fragmentation in server local storage Cryptographic Hash identical with the cryptographic Hash of certain file fragmentation in multiple file fragmentations of file destination, then explanation server in There is this document burst.Already present first file fragmentation collection in server be can determine that by above-mentioned response process server Close, wherein, the first file fragmentation set includes the file that in multiple file fragmentations of file destination, being serviced device has received and divides Piece.
Server is being responded to file transmission request to determine already present first file fragmentation collection in server After conjunction, can be sent to the first application interface of browser by pre-assigned http data transmission interface and confirm message, Wherein, this confirmation message can serve to indicate that already present first file fragmentation set in server.Server is to the first application Interface sends and confirms that message informs already present first file fragmentation set in the first application interface services device, is to notify the Next one application interface need not repeat to included file fragmentation in server transport the first file fragmentation set, but directly Connect the file fragmentation in addition to the first file fragmentation set in multiple file fragmentations of server transport file destination, to realize The breakpoint transmission of file, so can reduce and repeat to send the resource consumption caused by file fragmentation, reduce the process of browser Pressure.
Browser pass through first application interface the reception server send confirmation message after, can to received really Recognize message to be parsed, to determine already present first file fragmentation set in the server indicated by this confirmation message, enter And filter out the file fragmentation in addition to the first file fragmentation set from multiple file fragmentations of file destination, and these are civilian Part burst is transferred to server successively, and then realizes the breakpoint transmission of file destination.
In the technical scheme that step s206 provides, browser passes through the first application and receives confirmation message, and foundation should After confirming that message filtering goes out the file fragmentation in addition to the first file fragmentation set in multiple file fragmentations of file destination, clear Device of looking at can will remove the first file fragmentation set by the first application interface in multiple file fragmentations of the file destination filtering out Outside file fragmentation be transferred to server.Herein it should be noted that removing the first literary composition in multiple file fragmentations of file destination File fragmentation outside part burst set can be one or multiple, when removing in multiple file fragmentations of file destination When file fragmentation outside first file fragmentation set is one, browser can be by the first application interface directly by this residue File fragmentation be transferred to server, to complete the transmission of whole file destination;When removing in multiple file fragmentations of file destination When file fragmentation outside first file fragmentation set is multiple, browser can be by the first application interface from these remaining literary compositions Choose a file fragmentation to be transferred to server in part burst, and the alternative document in these remaining file fragmentations is divided Piece, then also need to transfer process shown in step s206 for repeated execution of steps s202, until these remaining file fragmentations are complete Portion is transferred to the transmission that server just can complete whole file destination.
As a kind of optional embodiment, step s206 browser will be removed in multiple file fragmentations by the first application interface File fragmentation outside first file fragmentation set is transferred to server and may include that
Step s2062, browser response confirmation message determines that the first file waiting to start to transmit in multiple file fragmentations divides Piece, wherein, the first file fragmentation is first file fragmentation or a random file fragmentation in the second file fragmentation set, the Two file fragmentation set include the file fragmentation in multiple file fragmentations in addition to the first file fragmentation set;
Step s2064, browser is started to server transport second literary composition from the first file fragmentation by the first application interface File fragmentation in part burst set.
In above-mentioned steps, it should be noted that browser receives server by the first application interface sending really After recognizing message, can respond thereto, with already present first file in the server according to indicated by this confirmation message The first file fragmentation waiting to start to be transferred to server is determined in burst set from multiple file fragmentations of file destination, herein It should be noted that " first " simply differentiation nominally herein, do not limit the order of file fragmentation.First file fragmentation Can be first file fragmentation in the second file fragmentation set or a random file fragmentation, wherein, the second file divides File fragmentation in addition to the first file fragmentation set in multiple file fragmentations that piece set includes in file destination.Need explanation , the second file fragmentation set can include one or more file fragmentation, and the first file fragmentation is the second file fragmentation One of in set, the file fragmentation in the second file fragmentation set can have sequencing it is also possible to not have successively Sequentially, when the file fragmentation in the second file fragmentation set has sequencing, the first file fragmentation can be that the second file divides In piece set first, to guarantee that server can receive file fragmentation according to the sequencing of file fragmentation, and then reaches Improve the accuracy of the file destination that server receives.When the file fragmentation in the second file fragmentation set does not have sequencing When, the first file fragmentation can be random one in the second file fragmentation set, and server can divide to the file receiving Piece is resequenced according to the identification information of file fragmentation to recover former file destination.Herein it should be noted that file divides The sequencing of piece can determine, wherein, the identification information of file fragmentation can be according to literary composition according to the identification information of file fragmentation The order of part burst label successively.
Also, it should be noted after the first file fragmentation is transferred to server by the first application interface by browser, Alternative document burst in second file fragmentation set is needed to repeat the step s202 extremely step in the embodiment of the present invention Rapid s206, namely the file fragmentation often sending in a second file fragmentation set is required for re-executing a present invention and implements Step s202 in example is to step s206.
In this embodiment, browser passes through according to received confirmation message from multiple file fragmentations of file destination The first file fragmentation is determined in the second file fragmentation set that file fragmentation in addition to the first file fragmentation set is constituted It is transferred to server, this first file fragmentation can be first or random in the second file fragmentation set, so may be used To avoid browser to repeat to transmit file fragmentation to server, and then can realize reducing the resource consumption of browser, optimize clear Look at device performance technique effect.
As a kind of optional embodiment, server is divided by the file that the first application interface transmits receiving browser After piece, the cryptographic Hash of the file fragmentation that server can be received using the calculating of the computational methods such as md5, sha, and will calculate To this document burst the transmission request of cryptographic Hash and received file in the cryptographic Hash of entrained this document burst enter Row compares, if both are identical, the file fragmentation that this document burst is file destination is described, then server will store this article Part burst and its corresponding cryptographic Hash, and this document burst is added to the first file fragmentation set;If both are different, say Bright this document burst is not the file fragmentation of file destination, and this document burst is likely to be illegal file, then server will be lost Abandon this document burst, and notify first application interface this document burst of browser to upload unsuccessfully, need again to upload this document Burst.
In this embodiment, server passes through to compare during the cryptographic Hash of file fragmentation receiving is asked with file transmission and is taken Whether the cryptographic Hash of the file fragmentation of band is identical, it is possible to achieve judge the received legitimacy of file fragmentation and safety, And then the accuracy of the file destination received by guarantee server.
As a kind of optional embodiment, step s202 browser is sent out to server by the first application interface of host process File transmission request is sent to may comprise steps of s2022 to step s2026:
Step s2022, browser calls the process of the first application interface, and entering to the first application interface by host process Journey transmits the first parameter, and wherein, the first parameter is used for pointing to file destination.
In the technical scheme that step s2022 provides, browser during execution host process, can call by host process The process of the first application interface, this invoked procedure between calling similar to function.Host process is calling the first application interface Can be used for pointing to the first parameter of file destination to the process transmission of the first application interface during process, so that the first application connects The process of mouth can be processed to file destination.
Step s2024, browser executes the process of the first application interface, at the file destination that the first parameter is pointed to Reason, obtains result, wherein, carries result in file transmission request.
In the technical scheme that step s2024 provides, browser redirects execution first application from the implementation procedure of host process The process of interface, to realize the file destination pointed by the first parameter is processed,
As a kind of optional embodiment, step s2024 browser executes the process of the first application interface, to the first parameter The file destination pointing to is processed, and obtains result and may include that
Step s20242, browser calls the process of the second application interface by the process of the first application interface, by target File is divided into multiple file fragmentations;
Step s20244, browser receives the many of the process return of the second application interface by the process of the first application interface Individual file fragmentation, and calculate the cryptographic Hash of each file fragmentation in multiple file fragmentations.
Herein it should be noted that the process to file destination can include but is not limited to: obtain the mark of file destination Knowledge information, obtain the data volume size of file destination, file destination is divided into multiple file fragmentations, divides for each file fragmentation Join identification information and calculate cryptographic Hash of each file fragmentation etc..Also, it should be noted file destination division need according to Second application interface filereader of bad browser, in filereader, file itself provides Fragmentation to realize to mesh Mark file is cut, and filereader provides the api of readarraybuffer, can be by the literary composition after cutting with realization Part burst is converted into the form of buffer, and in order to carry out bit manipulation to it, this is also to pass through the first application interface for browser Webworker calculates the premise of the cryptographic Hash of each file fragmentation.Also, it should be noted the calculating of the cryptographic Hash of file fragmentation Method may be referred to the realization of md5, sha increased income, and the embodiment of the present invention is divided to the first application interface webworker calculation document The computational methods that the cryptographic Hash of piece is adopted are not specifically limited, and no longer citing describes in detail one by one herein.
This embodiment, by being divided into multiple file fragmentations to file destination, can reduce browser single treatment target literary composition The pressure of part, especially in the case that file destination data volume is very big.This embodiment is passed through to calculate the Kazakhstan of each file fragmentation Uncommon value, and the cryptographic Hash of file fragmentation is notified to server, can be true according to the cryptographic Hash of file fragmentation in order to server Whether fixed received file fragmentation correct and safety, and then has reached the accurate of received file destination in server The effect of degree.
If the data volume of file destination is very big, browser single treatment will be very painstaking, now needs target literary composition Part is divided into multiple file fragmentations,
Step s2026, browser calls data transmission interface that file is transmitted request by the process of the first application interface It is sent to server.
In the step that step s2026 provides, browser, during the process of execution the first application interface, can be adjusted With the pre-assigned data transmission interface of server, such as http data transmission interface by carry in following information at least it One file transmission request is sent to server: the identification information of file destination, the size of file destination, the number of file fragmentation Amount, the information such as the cryptographic Hash of each file fragmentation, the size of each file fragmentation, label of each file fragmentation.
It should be noted that this embodiment calls the process of the first application interface by host process, and connect in the first application The pretreatment to file destination is completed in the process of mouth, and will using the data interaction between the first application interface and server The file fragmentation of file destination is transferred to server, is capable of need not installing plug-in unit in a browser and can also realize file The purpose of breakpoint transmission, and then solve in correlation technique because mobile terminal browser does not support plug-in unit, lead to clear in mobile terminal Looking at the technical problem of the breakpoint transmission that cannot realize file in device, it is achieved thereby that simplifying browser setting, optimizing browser The technique effect of energy.
As a kind of optional embodiment, pass through what the first application interface the reception server sent in step s206 browser After confirming message, the document transmission method of this embodiment can also comprise the following steps:
Step s208, browser determines the transmission progress of file destination by the first application interface, wherein, transmission progress by Indicated by the size of the size of the first file fragmentation set and file destination;
Step s209, transmission progress is transmitted by host process and is shown in the display page of browser by browser.
In above-mentioned steps, it should be noted that browser receives server by the first application interface sending really After recognizing message, target can be determined according to already present first file fragmentation set in the server indicated by confirmation message The transmission progress of file, wherein, the transmission progress of file destination can account for file destination for the size of the first file fragmentation set Size percentage ratio, for example, the size of the first file fragmentation set is 10mb, and the size of file destination is 100mb, then currently The transmission progress of file destination is 10%.Browser, after determining the transmission progress of file destination, can also pass through host process The transmission progress of file destination is transferred to host process by the interacting message and the first application interface between, and then host process can be by The transmission progress of this file destination transmits and is shown to the display page of browser.Herein it should be noted that target is civilian The transmission progress of part transmits, via the first application interface, host process, the process being shown to the display page of browser also may be used To be interpreted as the process of function call and parameter transmission.Also, it should be noted the biography to file destination for the embodiment of the present invention Degree of being input into is not specifically limited in the display location showing in the page of browser and display mode, for example, the biography of file destination Degree of being input into can be shown in the way of transmission progress bar.
This embodiment by determining the transmission progress of file destination according to confirmation message, and the transmission progress by file destination Transmit and shown to the display page of browser, the transmission being advantageously used for intuitively being determined clearly current goal file is entered Degree, and then improve the experience of user.
The document transmission method of the embodiment of the present invention can be implemented in model framework as shown in Figure 3, is embodied as flowing Journey is described as follows according to the sensing of arrow:
After user chooses the file destination needing to transmit, this file destination can be uploaded to the upper of browser first Pass the page in, then the host process (ftn_uploader as in Fig. 3: upper strata js) of browser can by with this upload page The page interaction get this file destination.Wherein, the host process of browser can be used for processing and the browser operation page (bag Include and upload the page) is interaction, event registration, readjustment etc.., during execution host process, the first of host process should for browser Can be transmitted by the message between host process with interface (ftn_uploader as in Fig. 3: bottom webworker) Postmessage gets this file destination from host process.Wherein, the second of browser can be called in webworker File destination is divided into multiple file fragmentations by application interface filereader, and in webworker calculate md5, sha and Initiate http request (namely file transmission request) to server (as the frame in Fig. 3 is convinced business).Herein it should be noted that The flow process represented by four-headed arrow that webworker and frame are convinced between business can be described as: webworker is first convinced business to frame Send xmlhttprespuest (namely file transmission request), file destination in this xmlhttprespuest, can be carried Identification information, the size of file destination, the quantity of file fragmentation, the cryptographic Hash of each file fragmentation, each file fragmentation big The information such as little, each file fragmentation label, frame is convinced after business receives this xmlhttprespuest and is determined locally exist File fragmentation, and the confirmation message carrying the local already present file fragmentation of instruction is sent to webworker, Webworker receive frame be convinced business send confirmation message after, can screen from multiple file fragmentations of file destination Go out the file fragmentation in addition to already present file fragmentation in business is convinced by frame, and therefrom select a file fragmentation to be sent to frame to put down Service, frame is convinced after business receives this document burst and can be judged whether this document burst is correct and pacifies according to cryptographic Hash first Entirely, if correct and safety, in locally stored this document burst, otherwise then abandon this document burst.Receive in webworker To frame be convinced business send confirmation message while, webworker can also according to confirm message indicated by frame be convinced business this The size of the already present file fragmentation in ground accounts for the transmission progress of the ratio-dependent file destination of size of file destination, and this is passed Degree of being input into is transferred to upper strata js process, and this transmission progress can be transmitted and be shown to the upload page by upper strata js process, with User is allow to understand the transmission progress of intuitively determination current goal file.
For the enforcement course of the document transmission method shown in Fig. 3, herein it should be noted that bottom webworker with The data transmission procedure that frame is convinced between business can repeat, and often sending a file fragmentation then needs execution once The flow process represented by four-headed arrow that webworker and frame are convinced between business, and return a current goal literary composition to uploading the page The transmission progress of part.
The document transmission method of the embodiment of the present invention is capable of need not installing plug-in unit in a browser can also realize literary composition The breakpoint transmission of part, therefore, it is possible to be applied to the breakpoint transmission executing file on the browser of mobile terminal, and to needs transmission The size of file does not limit.Additionally, the document transmission method of the embodiment of the present invention can support android and ios of main flow Platform, carries out special setting without browser, and practicality is stronger.
It should be noted that for aforesaid each method embodiment, in order to be briefly described, therefore it is all expressed as a series of Combination of actions, but those skilled in the art should know, the present invention is not limited by described sequence of movement because According to the present invention, some steps can be carried out using other orders or simultaneously.Secondly, those skilled in the art also should know Know, embodiment described in this description belongs to preferred embodiment, involved action and the module not necessarily present invention Necessary.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned enforcement The method of example can be realized by the mode of software plus necessary general hardware platform naturally it is also possible to pass through hardware, but a lot In the case of the former is more preferably embodiment.Based on such understanding, technical scheme is substantially in other words to existing What technology contributed partly can be embodied in the form of software product, and this computer software product is stored in a storage In medium (as rom/ram, magnetic disc, CD), including some instructions with so that a station terminal equipment (can be mobile phone, calculate Machine, server, or network equipment etc.) execution each embodiment of the present invention described in method.
Embodiment 2
According to embodiments of the present invention, a kind of file transfer means for implementing above-mentioned document transmission method are additionally provided. Fig. 4 is the schematic diagram of a kind of optional file transfer means according to embodiments of the present invention, as shown in figure 4, this device can wrap Include:
Transmitting element 22, the first application interface passing through host process for browser sends file transmission to server please Ask, wherein, for instruction to server transport file destination, file destination is that browser passes through the first application for file transmission request Interface gets, and file destination is divided into multiple file fragmentations by the second application interface of browser in advance;Receiving unit 24, pass through, for browser, the confirmation message that the first application interface the reception server sends, wherein, confirm that message is used for instruction clothes Already present first file fragmentation set in business device, the first file fragmentation set includes being serviced device in multiple file fragmentations and connects The file fragmentation receiving;First transmission unit 26, passes through the first application interface for browser and will remove the in multiple file fragmentations File fragmentation outside one file fragmentation set is transferred to server.
It should be noted that the transmitting element 22 in this embodiment can be used for executing the step in the embodiment of the present application 1 S202, the receiving unit 24 in this embodiment can be used for executing step s204 in the embodiment of the present application 1, in this embodiment First transmission unit 26 can be used for executing step s206 in the embodiment of the present application 1.
Herein it should be noted that above-mentioned module is identical with the example that corresponding step is realized and application scenarios, but not It is limited to above-described embodiment 1 disclosure of that.It should be noted that above-mentioned module as device a part may operate in as In hardware environment shown in Fig. 1, can be realized by software it is also possible to be realized by hardware.
As a kind of optional embodiment, as shown in figure 5, transmitting element 22 may include that the first calling module 222, use In browser, the process of the first application interface, and process transmission first parameter to the first application interface are called by host process, Wherein, the first parameter is used for pointing to file destination;Processing module 224, executes the process of the first application interface for browser, right The file destination that first parameter is pointed to is processed, and obtains result, wherein, carries process knot in file transmission request Really;Second calling module 226, calls data transmission interface to transmit file for browser by the process of the first application interface Request is sent to server.
It should be noted that the first calling module 222 in this embodiment can be used for executing in the embodiment of the present application 1 Step s2022, the processing module 224 in this embodiment can be used for executing step s2024 in the embodiment of the present application 1, and this is real Apply the second calling module 226 in example to can be used for executing step s2026 in the embodiment of the present application 1.
Herein it should be noted that above-mentioned module is identical with the example that corresponding step is realized and application scenarios, but not It is limited to above-described embodiment 1 disclosure of that.It should be noted that above-mentioned module as device a part may operate in as In hardware environment shown in Fig. 1, can be realized by software it is also possible to be realized by hardware.
As a kind of optional embodiment, as shown in fig. 6, processing module 224 may include that division module 2242, it is used for Browser calls the process of the second application interface by the process of the first application interface, file destination is divided into multiple files and divides Piece;Computing module 2244, is returned by the process that the process of the first application interface receives the second application interface for browser Multiple file fragmentations, and calculate the cryptographic Hash of each file fragmentation in multiple file fragmentations.
It should be noted that the division module 2242 in this embodiment can be used for executing the step in the embodiment of the present application 1 Rapid s20242, the computing module 2244 in this embodiment can be used for executing step s20244 in the embodiment of the present application 1.
Herein it should be noted that above-mentioned module is identical with the example that corresponding step is realized and application scenarios, but not It is limited to above-described embodiment 1 disclosure of that.It should be noted that above-mentioned module as device a part may operate in as In hardware environment shown in Fig. 1, can be realized by software it is also possible to be realized by hardware.
As a kind of optional embodiment, as shown in fig. 7, the first transmission unit 26 may include that determining module 262, use Determine the first file fragmentation waiting to start to transmit in multiple file fragmentations, wherein, the first file in browser response confirmation message Burst is first file fragmentation or a random file fragmentation in the second file fragmentation set, the second file fragmentation set bag Include the file fragmentation in addition to the first file fragmentation set in multiple file fragmentations;Transport module 264, passes through for browser One application interface starts to the file fragmentation server transport the second file fragmentation set from the first file fragmentation.
It should be noted that the determining module 262 in this embodiment can be used for executing the step in the embodiment of the present application 1 S2062, the transport module 264 in this embodiment can be used for executing step s2064 in the embodiment of the present application 1.
Herein it should be noted that above-mentioned module is identical with the example that corresponding step is realized and application scenarios, but not It is limited to above-described embodiment 1 disclosure of that.It should be noted that above-mentioned module as device a part may operate in as In hardware environment shown in Fig. 1, can be realized by software it is also possible to be realized by hardware.
As a kind of optional embodiment, as shown in figure 8, the device of this embodiment also comprises determining that unit 28, for After browser passes through the confirmation message that the first application interface the reception server sends, browser passes through the first application interface and determines The transmission progress of file destination, wherein, the size indication of the size by the first file fragmentation set for the transmission progress and file destination Show;Transmission progress is transmitted and is shown to the display page of browser by the second transmission unit 29 for browser by host process In.
It should be noted that the determining unit 28 in this embodiment can be used for executing the step in the embodiment of the present application 1 S208, the second transmission unit 29 in this embodiment can be used for executing step s209 in the embodiment of the present application 1.
Herein it should be noted that above-mentioned module is identical with the example that corresponding step is realized and application scenarios, but not It is limited to above-described embodiment 1 disclosure of that.It should be noted that above-mentioned module as device a part may operate in as In hardware environment shown in Fig. 1, can be realized by software it is also possible to be realized by hardware.
As a kind of optional embodiment, in above-mentioned module, the first application interface can be the webworker of browser, the Two application interfaces can be the filereader of browser.
By above-mentioned module, can solve in correlation technique because mobile terminal browser does not support plug-in unit, lead to moving The technical problem of the breakpoint transmission of file cannot be realized in the browser of moved end, and then reach simplification browser setting, optimization browses The technique effect of device performance.
Embodiment 3
According to embodiments of the present invention, a kind of server for implementing above-mentioned document transmission method or terminal are additionally provided.
Fig. 9 is a kind of structured flowchart of terminal according to embodiments of the present invention, as shown in figure 9, this terminal may include that one Individual or multiple (in figure only illustrates one) processor 201, memorizer 203 and transmitting device 205 are (in above-described embodiment Dispensing device), as shown in figure 9, this terminal can also include input-output equipment 207.
Wherein, memorizer 203 can be used for storing software program and module, such as the file transmission side in the embodiment of the present invention Method and the corresponding programmed instruction/module of device, processor 201 pass through to run be stored in software program in memorizer 203 and Module, thus executing various function application and data processing, that is, realizes above-mentioned document transmission method.Memorizer 203 can wrap Include high speed random access memory, nonvolatile memory can also be included, such as one or more magnetic storage device, flash memory or Other non-volatile solid state memories of person.In some instances, memorizer 203 can further include remote with respect to processor 201 The memorizer of journey setting, these remote memories can be by network connection to terminal.The example of above-mentioned network includes but does not limit In the Internet, intranet, LAN, mobile radio communication and combinations thereof.
Above-mentioned transmitting device 205 is used for receiving via network or sends data, can be also used for processor with Data transfer between memorizer.Above-mentioned network instantiation may include cable network and wireless network.In an example, Transmitting device 205 includes a network adapter (network interface controller, nic), and it can pass through netting twine It is connected with router with other network equipments thus can be communicated with the Internet or LAN.In an example, transmission dress Putting 205 is radio frequency (radio frequency, rf) module, and it is used for wirelessly being communicated with the Internet.
Wherein, specifically, memorizer 203 is used for storing application program.
Processor 201 can call the application program of memorizer 203 storage by transmitting device 205, to execute following steps Rapid: the first application interface that browser passes through host process sends file transmission request to server, wherein, file transmission request is used In instruction to server transport file destination, file destination is that browser is got by the first application interface, and target literary composition Part is divided into multiple file fragmentations by the second application interface of browser in advance;Browser passes through the first application interface and receives service The confirmation message that device sends, wherein, confirms that message is used for indicating already present first file fragmentation set in server, the first literary composition Part burst set includes the file fragmentation that in multiple file fragmentations, being serviced device receives;Browser passes through the first application interface File fragmentation in addition to the first file fragmentation set in multiple file fragmentations is transferred to server.
Processor 201 is additionally operable to execute following step: browser calls the process of the first application interface by host process, and To process transmission first parameter of the first application interface, wherein, the first parameter is used for pointing to file destination;Browser execution first The process of application interface, the file destination that the first parameter is pointed to is processed, and obtains result, and wherein, file transmission please Result is carried in asking;Browser calls data transmission interface that file is transmitted request by the process of the first application interface It is sent to server.
Processor 201 is additionally operable to execute following step: browser calls the second application by the process of the first application interface The process of interface, file destination is divided into multiple file fragmentations;Browser receives second by the process of the first application interface Multiple file fragmentations that the process of application interface returns, and calculate the cryptographic Hash of each file fragmentation in multiple file fragmentations.
Processor 201 is additionally operable to execute following step: browser response confirmation message determines in multiple file fragmentations to be waited out Begin the first file fragmentation of transmission, wherein, the first file fragmentation be first file fragmentation in the second file fragmentation set or A random file fragmentation, the second file fragmentation set includes the literary composition in multiple file fragmentations in addition to the first file fragmentation set Part burst;Browser is by the first application interface from the first file fragmentation starts to server transport the second file fragmentation set File fragmentation.
Processor 201 is additionally operable to execute following step: passes through what the first application interface the reception server sent in browser After confirming message, browser determines the transmission progress of file destination by the first application interface, and wherein, transmission progress is by first Indicated by the size of the size of file fragmentation set and file destination;Transmission progress is transmitted by host process and shows by browser To in the display page of browser.
Using the embodiment of the present invention, there is provided a kind of file transmission scenario, browser is connect by the first application of host process Mouth sends file transmission request to server, and is disappeared by the confirmation that the first application interface receives server transmission in browser After breath, then by the first application interface, the file fragmentation in addition to the first file fragmentation set in multiple file fragmentations is transmitted To server, wherein, file destination is that browser is got by the first application interface and in advance should by the second of browser It is divided into multiple file fragmentations with interface, confirm that message is used for indicating already present first file fragmentation set in server, the One file fragmentation set includes the file fragmentation that in multiple file fragmentations, being serviced device receives, and having reached need not be in browser Middle installation plug-in unit can also realize the purpose of the breakpoint transmission of file, and then solves in correlation technique due to mobile terminal browser Do not support plug-in unit, lead to realize the technical problem of the breakpoint transmission of file in the browser of mobile terminal, it is achieved thereby that simple Change browser setting, optimize the technique effect of browser performance.
Alternatively, the specific example in the present embodiment may be referred to showing described in above-described embodiment 1 and embodiment 2 Example, the present embodiment will not be described here.
It will appreciated by the skilled person that the structure shown in Fig. 9 is only illustrating, terminal can be smart mobile phone (as android mobile phone, ios mobile phone etc.), panel computer, palm PC and mobile internet device (mobile internet Devices, mid), the terminal unit such as pad.Fig. 9 does not cause it to limit to the structure of above-mentioned electronic installation.For example, terminal is also May include the assembly (as network interface, display device etc.) more or more less than shown in Fig. 9, or have with shown in Fig. 9 Different configurations.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can To be completed come the device-dependent hardware of command terminal by program, this program can be stored in a computer-readable recording medium In, storage medium may include that flash disk, read only memory (read-only memory, rom), random access device (random Access memory, ram), disk or CD etc..
Embodiment 4
Embodiments of the invention additionally provide a kind of storage medium.Alternatively, in the present embodiment, above-mentioned storage medium can For executing the program code of document transmission method.
Alternatively, in the present embodiment, above-mentioned storage medium may be located at multiple in the network shown in above-described embodiment On at least one of network equipment network equipment.
Alternatively, in the present embodiment, storage medium is arranged to store for executing the program code of following steps:
S1, the first application interface that browser passes through host process sends file transmission request to server, and wherein, file passes Defeated ask for instruction to server transport file destination, file destination is that browser is got by the first application interface, And file destination is divided into multiple file fragmentations by the second application interface of browser in advance;
S2, browser passes through the confirmation message that the first application interface the reception server sends, and wherein, confirms that message is used for referring to Show already present first file fragmentation set in server, the first file fragmentation set includes in multiple file fragmentations being serviced The file fragmentation that device receives;
S3, browser passes through the first application interface by the file in addition to the first file fragmentation set in multiple file fragmentations Sliced transmission is to server.
Alternatively, storage medium is also configured to store the program code for executing following steps: browser passes through master Process calls the process of the first application interface, and process transmission first parameter to the first application interface, and wherein, the first parameter is used In sensing file destination;Browser executes the process of the first application interface, and the file destination that the first parameter is pointed to is processed, Obtain result, wherein, in file transmission request, carry result;Browser is adjusted by the process of the first application interface With data transmission interface, file transmission request is sent to server.
Alternatively, storage medium is also configured to store for executing the program code of following steps: browser passes through the The process of one application interface calls the process of the second application interface, and file destination is divided into multiple file fragmentations;Browser leads to Cross multiple file fragmentations that the process of process reception second application interface of the first application interface returns, and calculate multiple files and divide The cryptographic Hash of each file fragmentation in piece.
Alternatively, storage medium is also configured to store the program code for executing following steps: browser response is really Recognize message and determine the first file fragmentation waiting to start to transmit in multiple file fragmentations, wherein, the first file fragmentation is the second file First file fragmentation in burst set or a random file fragmentation, the second file fragmentation set includes multiple file fragmentations In file fragmentation in addition to the first file fragmentation set;Browser by the first application interface from the first file fragmentation start to File fragmentation in server transport the second file fragmentation set.
Alternatively, storage medium is also configured to store the program code for executing following steps: passes through in browser After the confirmation message that first application interface the reception server sends, browser determines file destination by the first application interface Transmission progress, wherein, transmission progress is indicated by the size of the first file fragmentation set and the size of file destination;Browser leads to Cross host process to transmit transmission progress and be shown in the display page of browser.
Alternatively, the specific example in the present embodiment may be referred to showing described in above-described embodiment 1 and embodiment 2 Example, the present embodiment will not be described here.
Alternatively, in the present embodiment, above-mentioned storage medium can include but is not limited to: u disk, read only memory (rom, Read-only memory), random access memory (ram, random access memory), portable hard drive, magnetic disc or CD etc. is various can be with the medium of store program codes.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
If the integrated unit in above-described embodiment is realized and as independent product using in the form of SFU software functional unit When selling or using, can be stored in the storage medium that above computer can read.Based on such understanding, the skill of the present invention The part that art scheme substantially contributes to prior art in other words or all or part of this technical scheme can be with soft The form of part product embodies, and this computer software product is stored in storage medium, including some instructions with so that one Platform or multiple stage computers equipment (can be personal computer, server or network equipment etc.) execution each embodiment institute of the present invention State all or part of step of method.
In the above embodiment of the present invention, the description to each embodiment all emphasizes particularly on different fields, and does not have in certain embodiment The part describing in detail, may refer to the associated description of other embodiment.
It should be understood that disclosed client in several embodiments provided herein, other sides can be passed through Formula is realized.Wherein, device embodiment described above is only the schematically division of for example described unit, and only one Kind of division of logic function, actual can have other dividing mode when realizing, for example multiple units or assembly can in conjunction with or It is desirably integrated into another system, or some features can be ignored, or do not execute.Another, shown or discussed mutual it Between coupling or direct-coupling or communication connection can be by some interfaces, the INDIRECT COUPLING of unit or module or communication link Connect, can be electrical or other form.
The described unit illustrating as separating component can be or may not be physically separate, show as unit The part showing can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.The mesh to realize this embodiment scheme for some or all of unit therein can be selected according to the actual needs 's.
In addition, can be integrated in a processing unit in each functional unit in each embodiment of the present invention it is also possible to It is that unit is individually physically present it is also possible to two or more units are integrated in a unit.Above-mentioned integrated list Unit both can be to be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
The above is only the preferred embodiment of the present invention it is noted that ordinary skill people for the art For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications also should It is considered as protection scope of the present invention.

Claims (12)

1. a kind of document transmission method is it is characterised in that include:
The first application interface that browser passes through host process sends file transmission request to server, wherein, described file transmission Ask for instruction to described server transport file destination, described file destination is that described browser is applied by described first Interface gets, and described file destination is divided into multiple file fragmentations by the second application interface of described browser in advance;
Described browser receives the confirmation message that described server sends, wherein, described confirmation by described first application interface Message is used for indicating already present first file fragmentation set in described server, and described first file fragmentation set includes described The file fragmentation having been received by described server in multiple file fragmentations;
Described browser will remove described first file fragmentation set by described first application interface in the plurality of file fragmentation Outside file fragmentation be transferred to described server.
2. method according to claim 1 it is characterised in that described browser by the first application interface of host process to Server sends file transmission request and includes:
Described browser calls the process of described first application interface by described host process, and to described first application interface Process transmission first parameter, wherein, described first parameter is used for pointing to described file destination;
Described browser executes the process of described first application interface, and the described file destination that described first parameter is pointed to is carried out Process, obtain result, wherein, in described file transmission request, carry described result;
Described browser calls data transmission interface to send out the transmission request of described file by the process of described first application interface Give described server.
3. method according to claim 2 is it is characterised in that described browser executes entering of described first application interface Journey, the described file destination that described first parameter is pointed to is processed, and obtains result and includes:
Described browser calls the process of described second application interface by the process of described first application interface, by described target File is divided into the plurality of file fragmentation;
Described browser receives the described of the process return of described second application interface by the process of described first application interface Multiple file fragmentations, and calculate the cryptographic Hash of each file fragmentation in the plurality of file fragmentation.
4. method according to claim 1 is it is characterised in that described browser will be described by described first application interface In multiple file fragmentations, the file fragmentation in addition to described first file fragmentation set is transferred to described server and includes:
Described browser response is described to confirm that message determines the first file fragmentation waiting to start to transmit in the plurality of file fragmentation, Wherein, described first file fragmentation is first file fragmentation in the second file fragmentation set or a random file fragmentation, Described second file fragmentation set includes the file in addition to described first file fragmentation set in the plurality of file fragmentation and divides Piece;
Described browser is started to described in described server transport from described first file fragmentation by described first application interface File fragmentation in second file fragmentation set.
5. method according to claim 1 receives it is characterised in that passing through described first application interface in described browser After the confirmation message that described server sends, methods described also includes:
Described browser determines the transmission progress of described file destination by described first application interface, wherein, described transmit into Degree is indicated by the described size of the first file fragmentation set and the size of described file destination;
Described transmission progress is transmitted by described host process and is shown in the display page of described browser by described browser.
6. method according to any one of claim 1 to 5 is it is characterised in that described first application interface is described clear Look at the webworker of device, described second application interface is the filereader of described browser.
7. a kind of file transfer means are it is characterised in that include:
Transmitting element, the first application interface passing through host process for browser sends file transmission request to server, wherein, For instruction to described server transport file destination, described file destination is that described browser passes through for described file transmission request Described first application interface gets, and described file destination be divided into by the second application interface of described browser in advance many Individual file fragmentation;
Receiving unit, receives, by described first application interface, the confirmation message that described server sends for described browser, Wherein, described confirmation message is used for indicating already present first file fragmentation set in described server, described first file divides Piece set includes the file fragmentation having been received by described server in the plurality of file fragmentation;
First transmission unit, passes through described first application interface for described browser described by removing in the plurality of file fragmentation File fragmentation outside first file fragmentation set is transferred to described server.
8. device according to claim 7 is it is characterised in that described transmitting element includes:
First calling module, calls the process of described first application interface for described browser by described host process, and to Process transmission first parameter of described first application interface, wherein, described first parameter is used for pointing to described file destination;
Processing module, executes the process of described first application interface for described browser, the institute that described first parameter is pointed to State file destination to be processed, obtain result, wherein, in described file transmission request, carry described result;
Second calling module, calls data transmission interface by institute for described browser by the process of described first application interface State file transmission request and be sent to described server.
9. device according to claim 8 is it is characterised in that described processing module includes:
Division module, calls entering of described second application interface for described browser by the process of described first application interface Journey, described file destination is divided into the plurality of file fragmentation;
Computing module, receives entering of described second application interface for described browser by the process of described first application interface The plurality of file fragmentation that journey returns, and calculate the cryptographic Hash of each file fragmentation in the plurality of file fragmentation.
10. device according to claim 7 is it is characterised in that described first transmission unit includes:
Determining module, determines for described browser response described confirmation message and waits in the plurality of file fragmentation to start transmission First file fragmentation, wherein, described first file fragmentation is first file fragmentation or random in the second file fragmentation set One file fragmentation, described second file fragmentation set includes removing described first file fragmentation set in the plurality of file fragmentation Outside file fragmentation;
Transport module, is started to described clothes from described first file fragmentation by described first application interface for described browser Business device transmits the file fragmentation in described second file fragmentation set.
11. devices according to claim 7 are it is characterised in that described device also includes:
Determining unit, for receiving, by described first application interface, the confirmation message that described server sends in described browser Afterwards, described browser determines the transmission progress of described file destination by described first application interface, wherein, described transmit into Degree is indicated by the described size of the first file fragmentation set and the size of described file destination;
Described transmission progress is transmitted by described host process for described browser and is shown to described clear by the second transmission unit Look in the display page of device.
12. devices according to any one of claim 7 to 11 are it is characterised in that described first application interface is described The webworker of browser, described second application interface is the filereader of described browser.
CN201610988962.1A 2016-11-09 2016-11-09 File transmission method and device Pending CN106375483A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610988962.1A CN106375483A (en) 2016-11-09 2016-11-09 File transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610988962.1A CN106375483A (en) 2016-11-09 2016-11-09 File transmission method and device

Publications (1)

Publication Number Publication Date
CN106375483A true CN106375483A (en) 2017-02-01

Family

ID=57893227

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610988962.1A Pending CN106375483A (en) 2016-11-09 2016-11-09 File transmission method and device

Country Status (1)

Country Link
CN (1) CN106375483A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107172131A (en) * 2017-04-26 2017-09-15 腾讯科技(深圳)有限公司 File uploading method and device
CN107197363A (en) * 2017-07-04 2017-09-22 武汉斗鱼网络科技有限公司 A kind of video broadcasting method and device
CN109361754A (en) * 2018-11-05 2019-02-19 中国广核电力股份有限公司 A kind of document transmission method and device based on browser
CN109756567A (en) * 2018-12-28 2019-05-14 北京东方国信科技股份有限公司 A kind of cross-domain task schedule breaker point continuous transmission method
CN109819339A (en) * 2017-11-20 2019-05-28 创盛视联数码科技(北京)有限公司 The method of HTML5 breakpoint transmission
CN110198349A (en) * 2019-05-27 2019-09-03 腾讯科技(深圳)有限公司 Document transmission method and device, storage medium and electronic device
CN111404990A (en) * 2020-02-14 2020-07-10 Oppo(重庆)智能科技有限公司 File transmission method, device, client and storage medium
CN112383614A (en) * 2020-11-11 2021-02-19 常州微亿智造科技有限公司 File transmission method and device
CN112383636A (en) * 2020-11-20 2021-02-19 浙江百应科技有限公司 PC (personal computer) end file uploading method based on web worker
CN112468511A (en) * 2020-12-11 2021-03-09 建信金融科技有限责任公司 File transmission method and device
CN113411393A (en) * 2021-06-17 2021-09-17 中国工商银行股份有限公司 File pushing method and device
CN113472905A (en) * 2021-09-06 2021-10-01 广州朗国电子科技股份有限公司 Universal file accelerated transmission method
CN114143308A (en) * 2021-11-29 2022-03-04 中国平安人寿保险股份有限公司 File uploading information processing method and device, computer equipment and storage medium
CN114567506A (en) * 2022-03-09 2022-05-31 平安科技(深圳)有限公司 File uploading method and device, computer equipment and storage medium
CN115174555A (en) * 2022-06-28 2022-10-11 平安科技(深圳)有限公司 File transmission method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100125591A1 (en) * 2008-11-19 2010-05-20 Yaakov Ben Tsvi Merging files on storage and retrieve
CN105472035A (en) * 2016-01-04 2016-04-06 百度在线网络技术(北京)有限公司 File transmission method and device
CN105812456A (en) * 2016-03-08 2016-07-27 北京恒华伟业科技股份有限公司 File transmission method and device
CN106060160A (en) * 2016-07-07 2016-10-26 腾讯科技(深圳)有限公司 File uploading method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100125591A1 (en) * 2008-11-19 2010-05-20 Yaakov Ben Tsvi Merging files on storage and retrieve
CN105472035A (en) * 2016-01-04 2016-04-06 百度在线网络技术(北京)有限公司 File transmission method and device
CN105812456A (en) * 2016-03-08 2016-07-27 北京恒华伟业科技股份有限公司 File transmission method and device
CN106060160A (en) * 2016-07-07 2016-10-26 腾讯科技(深圳)有限公司 File uploading method and device

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107172131B (en) * 2017-04-26 2020-12-04 腾讯科技(深圳)有限公司 File uploading method and device
CN107172131A (en) * 2017-04-26 2017-09-15 腾讯科技(深圳)有限公司 File uploading method and device
CN107197363A (en) * 2017-07-04 2017-09-22 武汉斗鱼网络科技有限公司 A kind of video broadcasting method and device
CN107197363B (en) * 2017-07-04 2020-07-10 武汉斗鱼网络科技有限公司 Video playing method and device
CN109819339A (en) * 2017-11-20 2019-05-28 创盛视联数码科技(北京)有限公司 The method of HTML5 breakpoint transmission
CN109361754A (en) * 2018-11-05 2019-02-19 中国广核电力股份有限公司 A kind of document transmission method and device based on browser
CN109756567A (en) * 2018-12-28 2019-05-14 北京东方国信科技股份有限公司 A kind of cross-domain task schedule breaker point continuous transmission method
CN110198349A (en) * 2019-05-27 2019-09-03 腾讯科技(深圳)有限公司 Document transmission method and device, storage medium and electronic device
CN111404990B (en) * 2020-02-14 2023-06-02 Oppo(重庆)智能科技有限公司 File transmission method, device, client and storage medium
CN111404990A (en) * 2020-02-14 2020-07-10 Oppo(重庆)智能科技有限公司 File transmission method, device, client and storage medium
CN112383614A (en) * 2020-11-11 2021-02-19 常州微亿智造科技有限公司 File transmission method and device
CN112383636A (en) * 2020-11-20 2021-02-19 浙江百应科技有限公司 PC (personal computer) end file uploading method based on web worker
CN112468511B (en) * 2020-12-11 2023-02-03 建信金融科技有限责任公司 File transmission method and device
CN112468511A (en) * 2020-12-11 2021-03-09 建信金融科技有限责任公司 File transmission method and device
CN113411393A (en) * 2021-06-17 2021-09-17 中国工商银行股份有限公司 File pushing method and device
CN113472905A (en) * 2021-09-06 2021-10-01 广州朗国电子科技股份有限公司 Universal file accelerated transmission method
CN114143308A (en) * 2021-11-29 2022-03-04 中国平安人寿保险股份有限公司 File uploading information processing method and device, computer equipment and storage medium
CN114567506A (en) * 2022-03-09 2022-05-31 平安科技(深圳)有限公司 File uploading method and device, computer equipment and storage medium
CN114567506B (en) * 2022-03-09 2024-03-19 平安科技(深圳)有限公司 File uploading method and device, computer equipment and storage medium
CN115174555A (en) * 2022-06-28 2022-10-11 平安科技(深圳)有限公司 File transmission method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106375483A (en) File transmission method and device
CN100481088C (en) Web page resource issuing method and issuing system
US7946495B2 (en) Information providing system, information providing apparatus, information providing method, portable terminal, information outputting method, and computer program
CN112039824B (en) Communication method, system, device and computer readable storage medium
US20180144063A1 (en) Method for associating application service information, and application association platform server and client
CN102486794B (en) Method, device and system for acquiring rich-media file
CN103781028B (en) A kind of information subscribing mthods, systems and devices of mobile terminal
CN105573733B (en) Method, web front-end and the system that browser is communicated with web front-end
CN106649446B (en) Information pushing method and device
WO2014187220A1 (en) Electronic device, storage medium and file transferrting method
CN102904959A (en) Network accelerating method and gateway
CN103618710A (en) Individual processing method and device of file between mobile device and computing device
US20140258891A1 (en) Electronic device, storage medium and method for processing information
CN106817391A (en) Document breakpoint transmission method and apparatus
CN104537005A (en) Data processing method and device for webpage crawling
CN107291759A (en) The treating method and apparatus of browser page resource
CN107911547A (en) Interactive system, the method for interface layout
CN110298896A (en) Picture code-transferring method, device and electronic equipment
CN108694009A (en) terminal control method and device
CN104424340A (en) Social network application information processing method, device and system
CN106155842A (en) A kind of data migration method and device
CN109672718A (en) File delivery method, server, storage medium and device between system
CN112818270A (en) Data cross-domain transfer method and device and computer equipment
CN101834894A (en) Method, device and system for remote processing
CN103685491A (en) Application service providing method, system and related equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for 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: 20170201