CN101415029B - Method and apparatus for distributing files - Google Patents

Method and apparatus for distributing files Download PDF

Info

Publication number
CN101415029B
CN101415029B CN 200810226474 CN200810226474A CN101415029B CN 101415029 B CN101415029 B CN 101415029B CN 200810226474 CN200810226474 CN 200810226474 CN 200810226474 A CN200810226474 A CN 200810226474A CN 101415029 B CN101415029 B CN 101415029B
Authority
CN
China
Prior art keywords
file
distributed
mapping relations
destination server
control documents
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.)
Active
Application number
CN 200810226474
Other languages
Chinese (zh)
Other versions
CN101415029A (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.)
BEIJING BEIDA FOUNDER ELECTRONICS Co Ltd
New Founder Holdings Development 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 CN 200810226474 priority Critical patent/CN101415029B/en
Publication of CN101415029A publication Critical patent/CN101415029A/en
Application granted granted Critical
Publication of CN101415029B publication Critical patent/CN101415029B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention discloses a document distributing method and a device thereof, and relates to the field of Internet. The invention solves the problem of a plurality of manual operations needed when distributing files in the prior art. In the embodiment of the invention, after the mapping relations are set between a source file and a target server, for each mapping relation, the paths of the files that are to be distributed and are comprised in the source file in the mapping relation is confirmed; the files to be distributed are searched according to the paths; then the searched files to be distributed is automatically distributed to the target server in the mapping relation. The embodiment of the invention is mainly used in the field of the Internet and leads the files to be automatically transmitted to a plurality of target servers when transmitting the files on a plurality of target servers.

Description

Document distribution method and device
Technical field
The present invention relates to internet arena, the distribution method and the device that adopt during particularly to a plurality of webservers (web server) Transmit message.
Background technology
The application essence of the Internet (internet) is: use web server that network information (such as text, image file etc.) browsing service is provided.And growing Internet technology is so that web server will be born a large amount of services.The web server of separate unit is because the restriction that is subject to bandwidth can't high efficiency response white elephant like this.
A lot of web websites are often disposed a plurality of mirror image web servers in several places in the whole nation for access at a high speed can both be provided at regional; Again or in order to obtain high Concurrency Access, the file content of placing a plurality of storages in same machine room is consistent web server, and carries out load balance process between a plurality of web servers, to alleviate the burden of each web server.
And those contents that are placed on the web server generally all need to often be upgraded or be changed, such as news etc.Existing method generally is to adopt the ftp uploading tools.In this method, when the user sent to a file on 1 web server, the user need manually arrange the path once; When the user sent to a file on the N platform web server, the user need manually arrange path N time.In the face of this when file is sent to the situation of many web servers, it is not only loaded down with trivial details but also lose time that the method just seems.
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.
Description of drawings
Fig. 1 is the flow chart of the method for the embodiment of the invention 1 file distributing;
Fig. 2 is the structure chart of the device of the embodiment of the invention 1 file distributing;
Fig. 3 is the flow chart of the method for the embodiment of the invention 2 file distributing;
Fig. 4 is the structure chart of the device of the embodiment of the invention 2 file distributing.
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.

Claims (7)

1. a document distribution method is characterized in that, comprising:
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:
Computer creates temporary folder corresponding to described mapping relations, and control documents corresponding to file to be distributed that source file in the described mapping relations is comprised copies in the described temporary folder;
Described computer reads the control documents in temporary folder corresponding to described mapping relations, and determine 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, wherein, described control documents is generated by described computer, and generates respectively control documents for each file to be distributed of described source file;
Described computer is according to described path searching file to be distributed;
The destination server of the file automatic distributing to be distributed that described computer will find in the described mapping relations.
2. document distribution method according to claim 1 is characterized in that, after the mapping relations that arrange between source file and the destination server, before carrying out file distributing in accordance with the following steps for each mapping relations, the method also comprises:
Each file to be distributed of corresponding source file generates respectively control documents.
3. document distribution method according to claim 2 is characterized in that, after the destination server of file automatic distributing to be distributed in described mapping relations that will find, the method also comprises:
Delete the control documents in the described temporary folder.
4. document distribution method according to claim 1 is characterized in that, the file to be distributed in the described source file is for sending to the file in the different target server.
5. a file distributing device is characterized in that, comprising:
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 reading the control documents of temporary folder corresponding to described mapping relations, and determine 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, described processing module comprises creating unit, copied cells and processing unit, described creating unit creates temporary folder corresponding to described mapping relations, control documents corresponding to file to be distributed that described copied cells comprises source file in the described mapping relations copies in the corresponding temporary folder of described creating unit establishment, and described processing unit 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 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.
6. file distributing device according to claim 5 is characterized in that, also comprises:
Generation module is used for generating 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.
7. file distributing device according to claim 6 is characterized in that, this document dispensing device also comprises:
Removing module, the file automatic distributing to be distributed that is used for will finding at distribution module is deleted the control documents in the described temporary folder after the destination server of described mapping relations.
CN 200810226474 2008-11-12 2008-11-12 Method and apparatus for distributing files Active CN101415029B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200810226474 CN101415029B (en) 2008-11-12 2008-11-12 Method and apparatus for distributing files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200810226474 CN101415029B (en) 2008-11-12 2008-11-12 Method and apparatus for distributing files

Publications (2)

Publication Number Publication Date
CN101415029A CN101415029A (en) 2009-04-22
CN101415029B true CN101415029B (en) 2013-02-06

Family

ID=40595337

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200810226474 Active CN101415029B (en) 2008-11-12 2008-11-12 Method and apparatus for distributing files

Country Status (1)

Country Link
CN (1) CN101415029B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580279A (en) * 2013-10-12 2015-04-29 北京神州泰岳软件股份有限公司 Network file distributing method and system
CN104899014A (en) * 2014-03-07 2015-09-09 无锡天脉聚源传媒科技有限公司 System and method for automatically distributing resources
CN108829349A (en) * 2018-05-30 2018-11-16 郑州易通众联电子科技有限公司 Date storage method, data storage device and electronic equipment based on electronic equipment
CN111144840A (en) * 2019-12-20 2020-05-12 北京明略软件系统有限公司 Multi-department file distribution method and device

Also Published As

Publication number Publication date
CN101415029A (en) 2009-04-22

Similar Documents

Publication Publication Date Title
JP6621543B2 (en) Automatic update of hybrid applications
CN102404338B (en) File synchronization method and device
US8997041B2 (en) Method of managing script, server performing the same and storage media storing the same
CN101167071B (en) Methods and devices for synchronizing modifiable documents with multiple clients
AU757667B2 (en) Access to content addressable data over a network
CN101677325B (en) Method, device and system for publishing media description information and acquiring media
CN104820602A (en) Method, device and system for publishing software package
CN110399425B (en) Intelligent network disk micro-service system
JP5375972B2 (en) Distributed file system, data selection method thereof, and program
CN102882985A (en) File sharing method based on cloud storage
CN104537076A (en) File reading and writing method and device
CN104348859B (en) File synchronisation method, device, server, terminal and system
CN101415029B (en) Method and apparatus for distributing files
CN103414793A (en) Picture downloading and uploading device and method
CN102521218A (en) File combining method and file combining device
CN102882960B (en) A kind of sending method of resource file and device
CN110221792A (en) File to be printed format conversion method, device, equipment and storage medium
JPH1115723A (en) Multimedia data supplying method and multimedia data server
CN106302641B (en) A kind of methods, devices and systems of upper transmitting file
EP1454268B1 (en) Electronic file management
CN104978372A (en) Multimedia information processing method, multimedia device and multimedia network system
CN105653566B (en) A kind of method and device for realizing database write access
CN108874856A (en) A kind of page generates system, method and server
CN102801768A (en) Data processing method and system and network device
CN102622368A (en) Miniature weblog message processing method and miniature weblog message processing device

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220620

Address after: 3007, Hengqin international financial center building, No. 58, Huajin street, Hengqin new area, Zhuhai, Guangdong 519031

Patentee after: New founder holdings development Co.,Ltd.

Patentee after: Beijing Beida Founder Electronics Co., Ltd.

Address before: 100871, Beijing, Haidian District Cheng Fu Road 298, founder building, 5 floor

Patentee before: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd.

Patentee before: Beijing Beida Founder Electronics Co., Ltd.