[summary of the invention]
For the extension storage system that solves the prior art mobile phone users does not support breakpoint transmission in document transmission process, the technical problem that wastes time and energy the invention provides a kind of wireless network hard disk system of the support breakpoint transmission based on privately owned file transfer protocol (FTP).
The extension storage system that the present invention solves the prior art mobile phone users does not support breakpoint transmission in document transmission process, the technology scheme of putting that technical problem adopted that wastes time and energy is: the document transmission method that a kind of wireless network hard disk system is provided, this wireless network hard disk system comprises: portable terminal and the data storage server that carries out communication by mobile communications network and portable terminal, and this document transmission method comprises: a. sets up control channel between portable terminal and data storage server; B. portable terminal sends username and password to data storage server, the logon data storage server; C. send the fileinfo of predetermined file to destination end by portable terminal or data storage server; D. the breakpoint information of returning according to destination end sends predetermined file from the position corresponding with breakpoint information.
According to one preferred embodiment of the present invention, in steps d, portable terminal or data storage server send the data of pre-sizing in the predetermined file at interval with preset time.
According to one preferred embodiment of the present invention, in steps d, the each size of data that sends of portable terminal is 512 bytes-16K byte, and the each size of data that sends of data storage server is 8K byte-100K byte, and the time interval is 10ms-100ms.
According to one preferred embodiment of the present invention, in steps d, portable terminal or data storage server are less than or equal to the each data volume that receives of destination end in each data volume that sends.
According to one preferred embodiment of the present invention, this document transmission method further comprises: e. portable terminal or data storage server carry out overtime detection to the transmission state of the each transmission of predetermined file.
According to one preferred embodiment of the present invention, time-out time is set to 30s-120s.
According to one preferred embodiment of the present invention, this document transmission method further comprises: f. portable terminal or data storage server store predetermined file under the predetermined store path into according to the suffix of the predetermined file that is received.
According to one preferred embodiment of the present invention, further comprise the step that adopts the BASE64 cryptographic algorithm that username and password is encrypted among the step b.
According to one preferred embodiment of the present invention, this document transmission method further comprises: g. is after portable terminal lands, and portable terminal interval inbound data storage server at the fixed time sends line detection signal.
According to one preferred embodiment of the present invention, this document transmission method further comprises: h. is after portable terminal lands, if portable terminal is in the given time without any action, data storage server will cut off and being connected of portable terminal.
By adopting said structure and method, by adopting said structure and steps flow chart, realize the breakpoint transmission function of file, thereby saved data download time, reduced taking of Internet resources.Also, improved network communication efficient by transfer files being carried out the cutting whole into sections transmission and the piecemeal transmission course being carried out overtime detection.In addition, by utilizing username and password, and significant datas such as username and password are carried out encryption, and then strengthened the fail safe of system, prevent from illegally to land and malicious attack as identifying information.In addition, also provide abundant individual and group's file management instruction, and be provided at that line states detects automatically, file detects automatically and the automatic memory function of file.
[embodiment]
The present invention is described in detail below in conjunction with drawings and Examples.
As shown in Figure 1, Fig. 1 is the schematic block diagram of wireless network hard disk system of the present invention.In the present embodiment, wireless network hard disk system as the portable terminal of client (for example mainly comprises, mobile phone) and as the data storage server of server end, wherein portable terminal is connected and transfer instruction and data by mobile communications network with data storage server.Data storage server is by the database memory space certain for the user opens up, and the file of storage is managed.In the present embodiment, can adopt Wireless IP network such as CDMA1X/GPRS/GSM/CDMA2000/WCDMA/TD-CDMA/WLAN, and then realize the wireless telecommunications between portable terminal and the data storage server as transport vehicle.
As shown in Figure 2, Fig. 2 is the schematic block diagram of the document transmission system of wireless network hard disk system of the present invention.File transfer is finished by two passages (control channel and data channel).The terminal use can be by the form input instruction of user interface with graphic button or command word, and resolve by User Agreement and to convert instruction to, and be transferred to server end by control channel, and replying also of server end submitted to the user by similar fashion.And file can be by suitable transfer function conversion after data channel transmit.Wherein, the present invention adopts privately owned file transfer protocol (FTP).The privately owned file transfer protocol (FTP) of Cai Yonging mainly comprises following command word in the present embodiment:
LoginName<login account number〉account number of system login
PassWord<password〉the system login password
DataType<data type〉and data type (A=ASCII, E=EBCDIC, I=binary)
IpPort<IP and port sequence〉port id of IP address and two bytes
FileList<path〉obtain under the path All Files tabulation (comprising file and catalogue)
CurrentDirestory<path〉change the working directory on the server
DownMarker<document misregistration amount〉starting point of continuous transmitting file
UpMarker<document size information〉treat the size information of upload file
DownFile<file to be downloaded〉download specified file from server
UpFile<treat upload file〉upload specified file to server
DeleteFile<treat deleted file or catalogue〉deletion server end specified file or empty list
BeginRename<treat Rename file or catalogue〉specify and desire renaming objects
Title after EndRename<rename〉determine the title after the rename
CreateDirectory<directory name to be created〉on server, set up assigned catalogue
JumpSpace<network hard disc space〉switch to the individual subscriber space or the communal space
GetNetDiskSpace obtains the space size that the current network hard disk has been used
The IfConnect attonity is except from admitting on the server
Logoff logs off from server
Above command word is the basis that whole agreement and even whole system technology realize.Some simple functions can be realized in the utility command word separately, and the reasonable combination collocation between the command word can supporting business layer flexible services.
Referring to Fig. 3, Fig. 3 is the flow chart of the landfall process of wireless network hard disk system of the present invention.In the landfall process of present embodiment, mainly comprise:
If the user logins, nullify earlier: Logoff;
Obtain server ip and port numbers, between portable terminal and data storage server, set up control channel;
Send user name: LoginName (encryption);
Send user cipher: PassWord (encryption);
But obtain current network hard disk usage space situation: GetNetDiskSpace
The current directory of server: CurrentDirectory (encryption) is set;
Wire data type is set: DataType;
Send data channel parameter: IpPort (encryption);
Set up data channel;
Obtain listed files order: FileList (encryption);
Login finishes.
In the standard File Transfer Protocol, username and password adopts plaintext transmission.Wireless network hard disk in the present embodiment then preferably adopts enciphered data, by cryptographic algorithm significant datas such as user name, password is encrypted, and cryptographic algorithm can be used BASE64.By being that the basis utilizes username and password as identifying information and carry out encryption with privately owned file transfer protocol (FTP), fail safe that can enhanced system avoids adopting IMSI as illegally landing and malicious attack that the User Recognition mark may bring.
In addition, referring to Fig. 4 and Fig. 5, Fig. 4 is the flow chart of the file upload procedure of wireless network hard disk system of the present invention, and Fig. 5 is the flow chart of the file download process of wireless network hard disk system of the present invention.At present embodiment, file upload with downloading process in further increased breakpoint continuous pass on Gong can, its idiographic flow is as follows:
In upload procedure:
The long-range storing path of location upload file;
Select local file;
File size limitation detects;
Long-range file process of the same name;
Network hard disc space real-time update;
The current directory CurrentDirectory (encryption) of server is set:
Open this locality and treat upload file;
Send upload file information: UpMarker (encryption);
Obtain the upload file breakpoint location, the locating file breakpoint;
Wire data type is set: DataType;
Send data channel parameter: IpPort (encryption);
Announcement server begins to receive file: UpFile (encryption);
Set up data channel;
Begin to send file from breakpoint location.
In the downloading process:
Downloaded files is wanted in selection;
The current directory of server: CurrentDirectory (encryption) is set;
Check local memory space;
Locate local store path according to file in download information;
There has been file process of the same name in this locality;
Detect local temporary files;
Open local file, obtain the file in download breakpoint location, the locating file breakpoint;
Send the breakpoint information of downloading: DownMarker (encryption);
Wire data type is set: DataType;
Send data channel parameter: IpPort (encryption);
Set up data channel;
Begin to receive file (server sends file from breakpoint location) from breakpoint location;
Close data transmission channel.
In addition, according to a large amount of actual test results, find common network communication flow process inefficiency when the big file of transmission, and it is frequent to make mistakes.Thereby in the present embodiment, improve network communication efficient with the file that preset time sends pre-sizing at interval by Control Server end and cell-phone customer terminal, for example, utilize following parameter to be provided with:
Server sends data 32k/ time, and the 10ms that pauses between the operation next time, receives data 32k/ time.Cell-phone customer terminal transmission data 512 bytes/time, and the 10ms that pauses between the operation next time, receive data 100k/ time, and the 10ms that pauses between the operation next time, the overtime setting that sends at every turn and receive is 120s.
Carry out the piecemeal cutting by the file that will send and receive at every turn, whole file transfer action is made up of many tiny actions, each tiny operation all is provided with abnormality detection, be convenient to catch the mistake in the file transfer, and when error of transmission occurring, only need to occur wrong piecemeal and transmit again and get final product.
Message transmission rate and control time principle are as follows:
(1) server sends data and should avoid too fast, can be controlled in 8K-32K/ time better, is not more than 100K/ time; And pause can be controlled in 10ms-100ms between operation next time, and same mobile phone sends data also should avoid too anxious too soon, can be controlled in 512 bytes-8K/ time better, be not more than 16K/ time, and pause can be controlled in 10ms-100ms between operation next time;
(2) because transfer of data still is that cell-phone customer terminal all has the traffic volume restriction at server end, therefore, wish the data that obtain as much as possible when receiving data, preferably the data of sending are all taken out at every turn.Each numerical value that receives data should be greater than or equal to the data volume (should be too not big) of each transmission.The each data volume that sends of concrete numeric reference.Principle can not add pause between each operation, but wishes to avoid the I/O operation too continuously and frequent and expend cpu resource, pauses between each operation to can be controlled in 10ms-15ms and get final product, and is not more than 100ms.
(3) if the waiting-timeout time is provided with improperly, when transmission 1M or bigger file, mortality is higher.Wireless network hard disk transfer files size is limited in the 5M at present, and the time-out time of employing is 120s
The actual overtime scope that is provided with can be arranged on 30s-120s.If can't stand the wait of the long period in the file transfer, this is overtime be provided with shorter, if pursue the success rate of file transfer, this is overtime be provided with longer.Those skilled in the art can carry out the file transfer present situation according to wireless network, and transmission quantity, the time interval and the overtime setting of each transmission are set.
In addition, wireless network hard disk of the present invention also provides presence to detect automatically, and it is implemented as follows: if after user's login, server has received the order of client, show that the user is online certainly; If after the user login in the given time in (for example, 10 minutes) without any action, server can discharge user's connection resource, cuts off user's connection, and is not online with respect to the network hard disc server user; Client at one's leisure at the fixed time at interval in (for example, per 15 minutes) can send a whether online sense command to server, the correct response that obtains server shows that it is online.
The information of management and group is recorded in the background data base, and server is therefrom obtained group data information, and corresponding to certain network hard disc space, the JUMP order user in the use agreement can visit different network hard disc spaces.
In addition, wireless network hard disk of the present invention also further provides the automatic detection of file type and storage automatically, its specific implementation is: refer to discern different file types according to the filename suffix, automatically locate a store path based on the automatic detection of file type after download is finished, downloaded files is saved under this path.
In addition, also at server end the Internet interface is set, the user can be by directly landing the website and import the also storage file in the access server end of username and password, and this storage file is operated accordingly, for example, uploads, downloads, deletion etc.
In sum: the present invention has proposed a kind of wireless network hard disk design based on privately owned file transfer protocol (FTP) according to practical application request and wireless network present situation and in conjunction with actual test, and safety, privately owned file transfer protocol (FTP) have flexibly been adopted in the communication of its bottom.User's entry stage has been strengthened safety verification by adopting username and password as identifying information and by encrypting, and prevents from illegally to land and malicious attack.In the file transfer stage, carry out refinement to uploading process of downloading, for breakpoint transmission, improve network communication efficient, set up perfect fault processing mechanism and provide support.In addition, also support the abundant individual and the instruction of group's file management, and be provided at that line states detects automatically, file detects automatically and memory function automatically.
Cell-phone customer terminal provides outside the basic file transfer and personal document's management function of network hard disc for the user, automatic detection and automatic storage of having increased the downloaded files type wait the local file management function, have increased groups of users management and relevant file-sharing.
In the design of whole wireless network hard disk system, provide the approach of two kinds of visits and operational network hard disk: by cell-phone customer terminal with pass through Website login.With respect to the network hard disc server, user's visit and manipulating approach are transparent, and it is consistent that the user selects the handled data of any approach.
In the above-described embodiments, only the present invention has been carried out exemplary description, but those skilled in the art can design various execution modes according to different actual needs under the situation of the scope and spirit that do not break away from the present invention and protected.