CN102546732B - File transmission method and system in webpage - Google Patents

File transmission method and system in webpage Download PDF

Info

Publication number
CN102546732B
CN102546732B CN201010624242.XA CN201010624242A CN102546732B CN 102546732 B CN102546732 B CN 102546732B CN 201010624242 A CN201010624242 A CN 201010624242A CN 102546732 B CN102546732 B CN 102546732B
Authority
CN
China
Prior art keywords
file
transmission
webpage
client
status
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201010624242.XA
Other languages
Chinese (zh)
Other versions
CN102546732A (en
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.)
Peking University Founder Group Co Ltd
Beijing Founder Electronics Co Ltd
Original Assignee
Peking University Founder Group Co Ltd
Beijing Founder Electronics 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 Peking University Founder Group Co Ltd, Beijing Founder Electronics Co Ltd filed Critical Peking University Founder Group Co Ltd
Priority to CN201010624242.XA priority Critical patent/CN102546732B/en
Publication of CN102546732A publication Critical patent/CN102546732A/en
Application granted granted Critical
Publication of CN102546732B publication Critical patent/CN102546732B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a file transmission method and system in a webpage. The method comprises the following steps of: first, loading a client end program with an FTP (file transfer protocol) transmission function, then packaging an OCX (object linking and embedding control extension) used for adding uploading files or selecting downloading files into the webpage, and finally, realizing file transmission through calling the client end program. The method has the advantages that the webpage is separated from specific operations in a file transmission process and users can perform other operations while transmitting files. Through adoption of the method and the system provided by the invention, the coupling of the webpage and a specific FTP transmission function can be reduced, the loading speed of the webpage is improved, the webpage operation is more flexible and the users do not need to wait for the webpage all the time.

Description

Document transmission method in a kind of webpage and system
Technical field
The present invention relates to the file transfer technology in internet arena, be specifically related to the document transmission method in a kind of webpage and system.
Background technology
Along with the raising of the universal of network and business complexity, even if in B/S system, the demand of transfer files also becomes more and more common and important.Considering the advantage of File Transfer Protocol compared with http protocol when transmitting large files in speed, can File Transfer Protocol be adopted when transmitting large files under normal circumstances.
FTP is the English abbreviation of File Transfer Protocol (file transfer protocol (FTP)), is mainly used in the transmitted in both directions of the control documents on Internet.Meanwhile, it is also an application program (Application), and user can be connected the PC of oneself by it with the server of all operation File Transfer Protocol all over the world, a large amount of program on access services device and information.The Main Function of FTP, which allow user connect a remote computer (these computers running ftp server program) exactly watch remote computer and have file, then file is copied local computer from remote computer, or the file of local computer is delivered to remote computer.
The method that tradition realizes FTP transfer function is: an embedded control can with FTP transfer function in webpage, this control is one and all functions are all encapsulated into DLL together, or the control of extended formatting is as OCX.Although the transmission of file can be realized like this, also there are two main shortcomings: first because control is larger, the loading velocity of webpage can be caused so slack-off; Secondly, because FTP transfer function is encapsulated on the control of webpage, in the transmitting procedure of file, current webpage does not allow to close, and jumps to other webpages, otherwise transmission will stop.For larger file, the time of generally uploading or downloading all can be long, and therefore second shortcoming change is more obvious.
Summary of the invention
For the defect existed in prior art, the object of the present invention is to provide the document transmission method in a kind of webpage and system, reduce being coupled of webpage itself and concrete FTP transfer function by the method and system, the loading velocity of raising webpage also makes web page operation more flexible.
For solving the problems of the technologies described above, the technical solution used in the present invention is as follows:
A document transmission method in webpage, comprises the following steps:
1) client-side program that has FTP transfer function is set, and will is used for selecting the OCX control of transfer files to be encapsulated in webpage;
2) the OCX control described in loading, selects the file needing to carry out transmitting;
3) transmission of file is carried out by described client-side program.
Further, the document transmission method in webpage as above, step 3) in, the transmission of described file comprises from this locality to ftp server upload file, or from ftp server to local download file.
Further, the document transmission method in webpage as above, step 3) in, in the process of file transfer, also comprise the operation whether program of viewing client-side and webpage close simultaneously, if; Then end of file transfer; If not, then file continues transmission.
Further, the document transmission method in webpage as above, step 3) in, when carrying out the transmission of file, detecting client-side program by described OCX control and whether running, if so, then reading the file status in the status file of record; If not, then start client-side program by described OCX control, and the fileinfo of the file needing transmission is saved in the status file of described record.
Further, the status file of described record be used for record transmitting and etc. listed files waiting for transmission, when file starts to transmit, will wait for that the Status Change of transfer files is for transmit, and be its generation transaction log file.
Further, described journal file called after file status+sequence number.
Further again, described journal file internal form is made up of 5 parts, is respectively:
Whether transmit: the delivery status of logo file;
Local filename: file local store path;
Ftp file name: the store path of file on ftp server;
File size: total size of file;
Pass byte number: the size transmitted.
Further, the document transmission method in webpage as above, by arranging and read the internal form information in journal file, realizes transmission and the breakpoint transmission function of file.
Present invention also offers the document transmission system in a kind of webpage, this system comprises:
OCX control packaging system: for will the OCX control of transfer files be selected to be encapsulated in webpage;
File selectingmeans: also select the file needing to carry out transmitting for the OCX control in Web page loading;
File transfer means: for arranging the client-side program with FTP transfer function, and carry out the transmission of file by client-side program.
Further, the document transmission system in webpage as above, whether described file transfer means also comprises program and checks module, close for viewing client-side program and webpage simultaneously, if so, then end of file transfer; If not, then file continues transmission.
Further, the document transmission system in webpage as above, described file transfer means also comprises program and starts module, for starting client-side program by described OCX control.
Further, document transmission system in webpage as above, the status file of record is provided with in described file transfer means, the status file of described record be used for record transmitting and etc. listed files waiting for transmission, when file starts to transmit, to wait for that the Status Change of transfer files is for transmit, and generate a transaction log file for it.
Effect of the present invention is: the present invention is by the independent encapsulation by being only responsible for the OCX control adding upload file or select download file, achieve being separated of webpage and concrete operations, reduce being coupled of webpage and concrete FTP transfer function, improve the loading velocity of webpage, and make web page operation more flexible, wait at webpage without the need to user always.
Accompanying drawing explanation
Fig. 1 is the structured flowchart of the document transmission system in the specific embodiment of the invention in a kind of webpage;
Fig. 2 is the flow chart of the document transmission method in the specific embodiment of the invention in a kind of webpage;
Fig. 3 is the design sketch utilizing OCX control to select upload file in the embodiment of the present invention 1;
Fig. 4 is the flow chart of a document transmission process in the embodiment of the present invention 1;
Fig. 5 utilizes client-side program to carry out the design sketch of files passe in the embodiment of the present invention 1.
Embodiment
Below by drawings and the specific embodiments, the invention will be further described.
Fig. 1 shows the structured flowchart of the document transmission system in the specific embodiment of the invention in a kind of webpage, and as shown in the figure, this system comprises:
OCX control packaging system 11: for being encapsulated in webpage by the OCX control of responsible selection transfer files, selects transfer files to comprise and adds upload file or select download file.OCX control is a kind of object linked and embedding user control, and the OCX control encapsulating various function in webpage is known technology for a person skilled in the art.
File selectingmeans 12: also select the file needing to carry out transmitting for the OCX control in Web page loading.
File transfer means 13: for arranging the client-side program with FTP transfer function, and carry out the transmission of file by described client-side program.FTP is mainly used in the transmitted in both directions of the control documents on Internet, it is a known application program, therefore, on the desktop of local computer, (or other space) arranges a client-side program with FTP transfer function is be very easy to realize for a person skilled in the art.
File transfer means 13 also comprises program and checks that module 131 and program start module 132.Wherein, program checks whether module 131 closes for viewing client-side program and webpage simultaneously, and program starts module 132 for when client-side program does not start, and starts client-side program, and then complete the transmission of file by described OCX control.The status file of record is provided with in file transfer means 13, the status file of described record be used for record transmitting and etc. listed files waiting for transmission, when file starts to transmit, will wait for that the Status Change of transfer files is for transmit, and generate a transaction log file for it.
Fig. 2 shows the flow chart based on the document transmission method in a kind of webpage of the document transmission system in Fig. 1, and as shown in the figure, the method comprises the following steps:
Step S21: the setting of client-side program and the encapsulation of OCX control;
The client-side program that one has FTP transfer function is set, and will is used for selecting the OCX control of transfer files to be encapsulated in webpage; The independent setting that the present invention is encapsulated by client-side program and OCX control just with load webpage and achieve file and select being separated of webpage and file transfer operation.Wherein, OCX control is a kind of object linked and embedding user control, is a kind of program that can be created the special purpose used by the application software run in the Windows system of Microsoft, can be inserted in Web page or other application program.In embodiments of the present invention just by OCX control being encapsulated into webpage to carry out the selection needing the file uploaded or download.
Step S22: the selection of transfer files;
OCX control in Web page loading, adds upload file by loading this OCX control or selects download file, namely carrying out the selection of transfer files.
Step S23: the transmission of file;
When carrying out the transmission of file, needing whether to be run by described OCX control viewing client-side program, if so, then reading the file status in the status file of record; If not, then start client-side program by described OCX control, and the fileinfo of the file that will transmit is saved in the status file of the record of the affiliated state being used for recording the file needing transmission, record status file be used for record transmitting and etc. listed files waiting for transmission, when file starts to transmit, to wait for that the Status Change of upload file is for upload, and generate a transaction log file for it.Journal file called after file status+sequence number.Journal file internal form is made up of 5 parts, is respectively:
(1) whether transmit: the delivery status of logo file;
(2) local filename: file is at the store path of this locality;
(3) ftp file name: the store path of file on ftp server;
(4) file size: total size of file;
(5) byte number is passed: the size transmitted.
In transmitting procedure, by arranging and read the internal form information in journal file, transmission and the breakpoint transmission function of file namely can be realized.
In addition, the transmission conditions of the file demand fulfillment of transmission are:
A. the file transmitted is needed to be in readable state;
B. be responsible for there is idle thread in the thread array of transmission.
In the transmitting procedure of file, can be determined the state of transfer files by viewing client-side program and webpage, if client-side program is also in operation, then file can continue transmission; If client-side program is closed but file is not also transmitted, then can start client-side program by the OCX control in webpage, make file continue transmission.
The embodiment that uploads and downloads below respectively by file is further detailed the present invention.
Embodiment 1
Uploading of file: " uploading " file is exactly be copied on ftp server from the computer of this locality by file.With Internet language, user by client-side program to distance host upload file.
Want to distance host upload file, first need to obtain the corresponding authority of this main frame.That is, want which platform computer to transmit file with, just must have the proper authorization of which platform computer.After obtaining the authorization, first the OCX control be encapsulated in webpage is loaded, the file needing to upload on distance host is selected by this control, be the effect schematic diagram being selected upload file by OCX control as shown in Figure 3, as can be seen from Figure, by increasing the file selecting multiple needs to upload, and file to be uploaded can be kept in the status file of record from local computer." CJ the Changjiang river derive advertisement publish the wrong .JPG of statistical tables and reports " needs the file uploaded just in this enforcement.Completed the selection of upload file by OCX control, and then complete the upload procedure of file by the client-side program with FTP transfer function.
The flow chart of a document transmission process is shown: first complete webpage and load namely by OCX control selection upload file in Fig. 4, then carry out viewing client-side and upload download tool and whether client-side program runs, if, then the file status directly read in the status file of record runs this program to carry out uploading of file, if not, then first start client-side program by OCX control, then carry out uploading of file.As can be seen from Figure in document transmission process, whether can be closed by viewing client-side program and webpage simultaneously determine whether file transfer completes.
Fig. 5 shows the design sketch being carried out files passe by client-side program.As can be seen from Figure, in the process of files passe, both can continue to increase the file to be uploaded be kept in the status file of record, also can delete the file having prepared to upload.
The selection of upload file and the transmission of file separate and carry out by the present embodiment, improve the loading velocity of webpage on the one hand, and make web page operation more flexible on the other hand, user is without the need to waiting at current web page always.
Embodiment 2
The download of file: " download " file is exactly the computer from ftp server copied files to this locality; With Internet language, user by client-side program from distance host download file.
Similar to the upload file in embodiment 1, want to download from distance host, also will obtain corresponding authority.After the corresponding authority of acquisition, first, load OCX control, by the ftp server of this control on distance host being selected the file needing to download, namely be equivalent to send an order with user orientation server, require that server transmits the portion copy of some files to user, the information of this file is saved in the status file of record; Then receive this file by client-side program, and complete the concrete downloading process of file, and be stored in the computer of user oneself.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technology thereof, then the present invention is also intended to comprise these change and modification.

Claims (11)

1. the document transmission method in webpage, comprises the following steps:
1) client-side program that has FTP transfer function is set, and will is used for selecting the OCX control of transfer files to be encapsulated in webpage;
2) the OCX control described in loading, selects the file needing to carry out transmitting;
3) transmission of file is carried out by described client-side program; When carrying out the transmission of file, detecting client-side program by described OCX control and whether running, if so, then reading the file status in the status file of record; If not, then start client-side program by described OCX control, and the fileinfo of the file needing transmission is saved in the status file of described record.
2. document transmission method as claimed in claim 1, is characterized in that: step 3) in, the transmission of described file comprises from this locality to ftp server upload file, or from ftp server to local download file.
3. document transmission method as claimed in claim 1, is characterized in that: step 3) in, in the process of file transfer, also comprise the operation whether viewing client-side program and webpage close simultaneously, if; Then end of file transfer; If not, then file continues transmission.
4. document transmission method as claimed in claim 1, it is characterized in that: the status file of described record be used for record transmitting and etc. listed files waiting for transmission, when file starts to transmit, will wait for that the Status Change of transfer files is for transmit, and generate a transaction log file for it.
5. document transmission method as claimed in claim 4, is characterized in that: described journal file called after file status+sequence number.
6. document transmission method as claimed in claim 5, is characterized in that: described journal file internal form is made up of 5 parts, is respectively:
Whether transmit: the transmission state of logo file;
Local filename: file is at the store path of this locality;
Ftp file name: the store path of file on ftp server;
File size: total size of file;
Pass byte number: the size transmitted.
7. document transmission method as claimed in claim 6, is characterized in that: by arranging and read the internal form information in journal file, realizes transmission and the breakpoint transmission function of file.
8. the document transmission system in webpage, this system comprises:
OCX control packaging system: for will the OCX control of transfer files be selected to be encapsulated in webpage;
File selectingmeans: also select the file needing to carry out transmitting for the OCX control in Web page loading;
File transfer means: for arranging the client-side program with FTP transfer function, and carry out the transmission of file by client-side program; When carrying out the transmission of file, detecting client-side program by described OCX control and whether running, if so, then reading the file status in the status file of record; If not, then start client-side program by described OCX control, and the fileinfo of the file needing transmission is saved in the status file of described record.
9. whether document transmission system as claimed in claim 8, is characterized in that: described file transfer means also comprises program and checks module, close for viewing client-side program and webpage simultaneously, if so, then end of file transfer; If not, then file continues transmission.
10. document transmission system as claimed in claim 8, is characterized in that: described file transfer means also comprises program and starts module, for starting client-side program by described OCX control.
11. document transmission systems as claimed in claim 8, it is characterized in that: the status file being provided with record in described file transfer means, the status file of described record be used for record transmitting and etc. listed files waiting for transmission, when file starts to transmit, to wait for that the Status Change of transfer files is for transmit, and generate a transaction log file for it.
CN201010624242.XA 2010-12-31 2010-12-31 File transmission method and system in webpage Expired - Fee Related CN102546732B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010624242.XA CN102546732B (en) 2010-12-31 2010-12-31 File transmission method and system in webpage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010624242.XA CN102546732B (en) 2010-12-31 2010-12-31 File transmission method and system in webpage

Publications (2)

Publication Number Publication Date
CN102546732A CN102546732A (en) 2012-07-04
CN102546732B true CN102546732B (en) 2015-03-18

Family

ID=46352688

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010624242.XA Expired - Fee Related CN102546732B (en) 2010-12-31 2010-12-31 File transmission method and system in webpage

Country Status (1)

Country Link
CN (1) CN102546732B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108632383A (en) * 2018-05-15 2018-10-09 中国电子科技集团公司第二十八研究所 A kind of method of serial ports transmitting file
CN108737558A (en) * 2018-05-30 2018-11-02 安徽四创电子股份有限公司 A kind of general management platform of file based on OCX controls
CN110175305B (en) * 2019-05-05 2022-03-11 中国银行股份有限公司 Data processing method, data processing device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100476822C (en) * 2006-04-30 2009-04-08 中国工商银行股份有限公司 File transmission method and system
CN101567893A (en) * 2009-05-26 2009-10-28 中兴通讯股份有限公司 Method and system for uploading files in WEB application
CN101616145A (en) * 2008-06-26 2009-12-30 鸿富锦精密工业(深圳)有限公司 Cross-platform network communication means and be used for the communication server of cross-platform network communication

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020184363A1 (en) * 2001-04-20 2002-12-05 Steven Viavant Techniques for server-controlled measurement of client-side performance
US20060242206A1 (en) * 2005-04-22 2006-10-26 Microsoft Corporation System and method for peer to peer synchronization of files

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100476822C (en) * 2006-04-30 2009-04-08 中国工商银行股份有限公司 File transmission method and system
CN101616145A (en) * 2008-06-26 2009-12-30 鸿富锦精密工业(深圳)有限公司 Cross-platform network communication means and be used for the communication server of cross-platform network communication
CN101567893A (en) * 2009-05-26 2009-10-28 中兴通讯股份有限公司 Method and system for uploading files in WEB application

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种基于ActiveX的远程双向数据传输技术;郝平,应时彦,李瑞麟,梅一珉,彭宏;《浙江工业大学学报》;20020831;第30卷(第4期);全文 *

Also Published As

Publication number Publication date
CN102546732A (en) 2012-07-04

Similar Documents

Publication Publication Date Title
US7840647B2 (en) System, method, and computer program product for executing scripts on mobile devices
US7870190B2 (en) Information processing system, information processing apparatus, information processing method, and computer program
KR101618879B1 (en) Consumption of items via a user device
US8595186B1 (en) System and method for building and delivering mobile widgets
US20160154964A1 (en) Method and System of Managing Digital Multimedia Content
US8832161B2 (en) Interface for extending functionality of memory cards
US20080086727A1 (en) System for subscription and distribution service
US20110314035A1 (en) Creation, Transfer and Use of a Portable Data Map Using Metadata
CN108287758A (en) A kind of application resource management method, application method and device
CN102662928A (en) Rich text editing method for importing documents and device thereof
US9495323B2 (en) Copying data onto an expandable memory
CN103389969A (en) Method, device and system for previewing PDF (portable document format) file on mobile terminal
US8620957B1 (en) Storing and accessing data using a shell interface
CN104035937A (en) Extensible system and method for electronic document online browsing
CN104160397A (en) Location independent files
CN102546732B (en) File transmission method and system in webpage
CN104657677A (en) File encryption method based on alternate data streams
US9558191B2 (en) Automatic identification of photo books system and method
US20130179398A1 (en) Device for synchronously sharing files and method for synchronously sharing files
JP2007122609A (en) Structured document, content delivery server device and content delivery system
CN101345946B (en) Mobile phone cartoon generating system and method based on picture
JP2007328750A (en) Compound document preparing method and registering method to blog
CN105872857A (en) Video processing method and device and electronic equipment
CN102426547B (en) Method and system for recovering cloud data
CN103856504A (en) System and method for object file access in image file by analyzing access path

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150318

Termination date: 20191231