Summary of the invention
Embodiments of the invention provide a kind of easily distribution method and device, and the user does not need to carry out repeatedly loaded down with trivial details manual setting, and file is sent on many web servers.
For achieving the above object, embodiments of the invention adopt following technical scheme:
A kind of document distribution method comprises:
Mapping relations between source file and the destination server are set, comprise a source file and a destination server in each mapping relations;
Carry out in accordance with the following steps file distributing for each mapping relations:
Determine the path of the file to be distributed that the source file in the mapping relations comprises;
According to described path searching file to be distributed;
With the file automatic distributing to be distributed that finds destination server in the described mapping relations.
A kind of file distributing device comprises:
Module is set, is used for arranging the mapping relations between source file and the destination server, comprise a source file and a destination server in each mapping relations;
Processing module be used for to be determined the path of the file to be distributed that the source file of mapping relations comprises;
Search module, be used for according to described path searching file to be distributed;
Distribution module is for the destination server of the file automatic distributing to be distributed that will find to described mapping relations.
In the document distribution method and device that the embodiment of the invention provides, source file in each mapping relations of setting for the user after setting out mapping relations between source file and the destination server when the user is disposable, present embodiment needs to determine respectively the path of the file to be distributed that comprises in the source file, arrive file to be distributed according to the path searching of deciding again, after this, computer will send to the file to be distributed that finds on the destination server automatically.After adopting such scheme, the user has saved repeatedly loaded down with trivial details manual setting up procedure in the time file will being sent on many destination servers, make the operating process become convenient.And in embodiments of the present invention since be by computer automatically with file distributing to destination server, the transmitting efficiency of file is greatly improved.
Embodiment
In the time will sending to a plurality of source files on a plurality of destination servers, the disposable mapping relations that set out between source file and the destination server of user, for each mapping relations, embodiment provided by the present invention can determine the path of the file to be distributed that comprises in the source file, according to the path searching of deciding to file to be distributed, again with the file distributing that the finds destination server in the mapping relations.Because the distribution procedure of whole source file is all computer automatic execution, so adopt embodiment provided by the present invention then can save the complicated processes that the user manually arranges distribution of document, both for distribution of document has brought facility, the efficient of distribution of document was improved.Below in conjunction with accompanying drawing the method for File distribution of the present invention and the embodiment of device are described in detail.
Embodiment 1
Present embodiment provides a kind of document distribution method, and as shown in Figure 1, the method comprises:
101; the user at first defines the destination server that the source file that will send and source file will send to; and set out mapping relations between source file and the destination server; in general; often can run in the specific implementation a source file is sent to this situation of the different destination server of N platform; will arrange out this moment with the N bar mapping relations of described source file and N platform destination server; again or M source file will be sent to the different destination server of N platform the time, M*N mapping of destination server that will M source file is different from the N platform arranges out one by one.That is to say, comprise a source file and a destination server in each mapping relations.
For each mapping relations that the user arranges out, computer all carries out file distributing in accordance with the following steps:
102, determine the path of the file to be distributed that comprises in the source file by generating a file that contains file path information to be distributed.
103, search file to be distributed according to described path.
104, when the user arranges mapping relations between source file and the destination server, the file to be distributed that the path that has comprised destination server in the mapping relations, the computer path by described destination server will find automatically sends to destination server and gets on.
In order to realize above-mentioned document distribution method, the present invention also provides a kind of device of file distributing, and as shown in Figure 2, this device comprises: module 21 is set, and processing module 22 is searched module 23, distribution module 24.
When the user defines source file, after the destination server, the user can set out mapping relations between source file and the destination server by module 21 is set, wherein comprise a source file and a destination server in each mapping relations, by putting module 21 out each mapping relations are set for the user, the path of the file to be distributed that the source file that processing module 22 is used for definite each mapping relations comprises, search module 23 for the path of the file to be distributed of determining according to processing module 22, find file to be distributed, at last will search the file automatic distributing to be distributed that module 23 finds by distribution module 24 and to destination server, go.
In the present embodiment, as long as the user is by the disposable mapping relations that set out between source file and the destination server, computer just can be distributed file as follows for each mapping relations: the path of determining the file to be distributed that comprises in the source file, arrive file to be distributed according to the path searching of deciding again, after this, computer will send to the file to be distributed that finds on the destination server automatically.In the middle of the process that adopts present embodiment, the user is in the time will sending to a plurality of source files on many destination servers, only need to disposablely set out one to one mapping relations of a plurality of source files and Duo Tai destination server, computer can automatically be distributed to many destination servers with a plurality of source files and get on, saved whenever the process that sends a file and will manually arrange once the distribution of a destination server, in the middle of real life, often run into the situation that M source file is sent to N platform destination server, just saved M*N the distribution procedure that file manually is set this moment, make the method for file distributing become more convenient, transmitting efficiency also is improved.
Embodiment 2:
How document distribution method and device that present embodiment specifically describes among the present invention are realized.As shown in Figure 3, the method step of file distributing is as follows:
301, the user defines source file and destination server, and the file to be distributed in the described source file is for sending to the file in the same target server.(for example: when source file A was set, the file to be distributed that wherein comprises was all and will sends to destination server 1, the file in the destination server 2.) user sets out the mapping relations between source file and the destination server; in general; in the middle of actual life, often can run into a source file is sent to this situation of the different destination server of N platform; will arrange out this moment with the N bar mapping relations of described source file and N platform destination server; again or M source file will be sent to the different destination server of N platform the time, M*N mapping of destination server that will M source file is different from the N platform arranges out one by one.That is to say wherein and comprise a source file and a destination server in each mapping relations.
302, for each file to be distributed that is included in the source file, computer all can generate and comprise the control documents that this treats the fat file routing information.And all control documents that will generate, all be stored in the file under the same path.
Described control documents contain file path information to be distributed be because: the filename for control documents is changed in path that will described file to be distributed.The process that the path of described file to be distributed is converted to control file name is: with the space character in the file path to be distributed replace to other indications (for example: under windows operating system the blank character of file path to be distributed be, when converting control file name to, it is replaced to~) each control documents of adopting described method to generate, the routing information of corresponding file to be distributed is included in the filename of control documents, just can determine easily the path of file to be distributed by control documents, and because control documents only needs to comprise in the filename routing information of file to be distributed, in the control documents without any memory contents, so the size of control documents is 0 byte, so when the computer generation, copy, the high speed that has just guaranteed information when reading control documents is extracted.
303, each mapping relations that arranges for the user, computer all can create temporary folder corresponding to described mapping relations, and control documents corresponding to all files to be distributed that source file in the described mapping relations comprises copied in the described temporary folder.
304, computer reads the control documents in temporary folder corresponding to described mapping relations, and determines the path of file to be distributed according to the routing information of the file to be distributed that comprises in the control file name.
305, computer finds file to be distributed by the path of the file to be distributed determined in the said process.
306, when the user arranges mapping relations between source file and the destination server, the file to be distributed that the path that has comprised destination server in the mapping relations, the computer path by described destination server will find automatically sends to destination server and gets on.
307, every portion file to be distributed is sent to after the destination server, computer will be deleted the control documents that contains this file path information to be distributed in the described mapping temporary folder, represent to distribute complete with this, simultaneously can also avoid that portion file to be distributed is repeated to send to destination server and get on.
After this computer also can again turn back in the described mapping temporary folder of 303 steps and read the control documents that the next one contains file path information to be distributed, continues to carry out the automatic distributing process of lower a file to be distributed.By that analogy, until the file to be distributed in all mapping relations be sent.
The method of corresponding and above-mentioned file distributing, present embodiment also provides a kind of device of file distributing, in order to can realize said method, as shown in Figure 4, this device comprises: module 41 is set, generation module 42, processing module 43, search module 44, distribution module 45, removing module 46.
After the user defines source file and destination server, module 41 is set source file that the user defines out and the mapping relations between the destination server are set, wherein comprise a source file and a destination server in each mapping relations, for each file to be distributed that comprises in the source file, generation module 42 can generate respectively the control documents of corresponding each file to be distributed, and all control documents that will generate all are stored in the file under the same path, be arranged on each mapping relations for module 41 is set, processing module 43 can be determined the path of the file to be distributed that source file comprises in the mapping relations.
Processing module 43 is in the middle of the above process of specific implementation, and processing module 43 also comprises: creating unit 431, copied cells 432, processing unit 433.
Creating unit 431 creates temporary folder corresponding to described mapping relations, control documents corresponding to file to be distributed that copied cells 442 comprises source file in the described mapping relations copies in the corresponding temporary folder of creating unit 431 establishments, and processing unit 433 is determined the path of the file to be distributed that source file comprises according to the control documents in the described temporary folder.
Search the path of the file to be distributed out that module 44 determines according to processing module 43, find file to be distributed, will search the file automatic distributing to be distributed that module 44 finds by distribution module 45 at last and to destination server, go.Distribution module 45 whenever sends after a file to be distributed, and removing module 46 will be deleted control documents corresponding to file to be distributed in the described temporary folder that creating unit 431 creates, and represents that with this this part file to be distributed is sent.Avoid simultaneously distribution module 45 to repeat to send with portion and treat that a fat file goes to the destination server of correspondence.After this processing module 43 in the described present embodiment file distributing device also can continue to determine the path of lower a file to be distributed, until all file distributing to be distributed are complete.
By the described the present invention of present embodiment, when the user will send to a plurality of source files on a plurality of destination servers, only need the disposable mapping relations that set out source file and destination server, whole source file distribution procedure afterwards is all computer automatic execution, saved the complicated processes that the user manually arranges distribution of document, both saved time, improved again the transmitting efficiency of file.For the transmission of file has brought facility.
Through the above description of the embodiments, the those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform, can certainly pass through hardware, but the former is better execution mode in a lot of situation.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product is stored in the storage medium that can read, floppy disk such as computer, hard disk or CD etc., comprise some instructions with so that equipment (can be server, perhaps the network equipment etc.) carry out the described method of each embodiment of the present invention.
The above; be the specific embodiment of the present invention only, but protection scope of the present invention is not limited to this, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; can expect easily changing or replacing, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion by described protection range with claim.