CN104050282B - Resource file update method and device - Google Patents
Resource file update method and device Download PDFInfo
- Publication number
- CN104050282B CN104050282B CN201410301119.2A CN201410301119A CN104050282B CN 104050282 B CN104050282 B CN 104050282B CN 201410301119 A CN201410301119 A CN 201410301119A CN 104050282 B CN104050282 B CN 104050282B
- Authority
- CN
- China
- Prior art keywords
- resource file
- ftp
- destination host
- host
- file
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/178—Techniques for file synchronisation in file systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Stored Programmes (AREA)
Abstract
The present invention relates to a kind of resource file update method and device.Resource file update method includes:From it is in need update resource file destination host in select a destination host as source host, other purposes main frame be referred to as receive destination host;The former resource file on source host is updated, and by the version number of the new resources file after renewal and renewal time record in synchronous directory;The version number of new resources file and renewal time in synchronous directory are compared with the version number of the former resource file that receives destination host local record and its renewal time respectively, selecting version number and renewal time all inconsistent resource files needs synchronous resource file as the reception destination host;Source host, which will receive destination host, needs the latest edition of synchronous resource file to be transferred to reception destination host, receives destination host and local respective resources file is updated according to the latest edition of the resource file of reception.The present invention can effectively improve the renewal efficiency of B/S class application software.
Description
Technical field
The present invention relates to network technique field, more particularly to a kind of resource file update method and device.
Background technology
In IT industries, the software upgrading mode of B/S (Browser/Server, Browser/Server Mode) structure is general
All it is direct renewal service end code file, update mode has two ways:A kind of is that by hand the code updated will be needed literary
Part uploads to destination host by FTP (File Transfer Protocol, FTP) instrument, and another is to pass through
Shell script or Software tool, which automatically update the covering of whole application program, arrives destination host.
For internet portal web site, can all there be many platform services the slightly bigger portal website front end of visit capacity
Device is as load support, and this kind of network site code will update code file and use above-mentioned first way obviously just relatively backward,
Speed hand-manipulated is slow, and easily goes wrong, after a certain main frame updates file with other main frames are variant will
Website visiting is caused to break down.The second way can also have following drawback:1) file that need not be updated can be repeated
Transmission, renewal speed can be relatively slow;2) system does not have colophon, it is not known that have updated which differential file, and the system for the treatment of goes out
Version rollback is not very convenient after problem, just can only be by operating by hand.
Therefore, improve the renewal efficiency of Internet resources file and reduce the risk in resource file renewal process,
It is the major issue that network technique field needs to solve.
The content of the invention
The technical problems to be solved by the invention are to provide a kind of resource file update method and device, improve internet money
The renewal efficiency of source file, and reduce the risk in resource file renewal process.
In order to solve the above technical problems, the present invention proposes a kind of resource file update method, applied to internet, bag
Include:
Step one, from it is in need update resource file destination host in select a destination host as source host,
Other purposes main frame in addition to the source host is referred to as to receive destination host;
Step 2, updates the former resource file on source host first, and by the version number of the new resources file after renewal and
The renewal time of the new resources file is recorded in synchronous directory;
Step 3, by the renewal time of the version number of new resources file and the new resources file in synchronous directory respectively with connecing
The version number and its renewal time for receiving the former resource file of destination host local record are compared, and select version number and renewal
Time all inconsistent resource files are used as the reception destination host to need synchronous resource file;
Step 4, source host, which will receive destination host, needs the latest edition of synchronous resource file to be transferred to the reception
Destination host, the reception destination host updates local respective resources file according to the latest edition of the resource file of reception.
Further, above-mentioned resource file update method can also have the characteristics that the step 4 includes:
Configure FTP tasks, it would be desirable to which the host ip of synchronous reception destination host, FTP FTP accounts, this connects
Receiving destination host needs synchronous resource file catalogue to store into database;
Start after the FTP tasks, the FTP tasks carryings, source host is by the resource listed by the resource file catalogue
The latest edition of file is transferred to the reception destination host, the reception destination host according to the host ip for receiving destination host
According to updating local respective resources file after reception.
Further, above-mentioned resource file update method can also have the characteristics that, before the FTP tasks are started,
Also include:
Whether be logical, if FTP passages are obstructed if detecting the corresponding FTP passages of the FTP tasks, to the FTP passages
Corresponding FTP tasks are indicated, and remind operator, if FTP passages are logical, are able to carry out starting the FTP
The operation of business.
Further, above-mentioned resource file update method can also have the characteristics that, starting the FTP tasks includes:Hand
Work starts FTP tasks or sets timed task automatic start FTP tasks.
Further, above-mentioned resource file update method can also have the characteristics that, after the FTP tasks are started,
Also include:When the latest edition that source host is transferred to the resource file for receiving destination host is wrong, by the reception mesh
Main frame resource file return back to update before version.
In order to solve the above technical problems, the present invention proposes a kind of resource file updating device, applied to internet, including
Setup module, preliminary update module, screening module and the final updated module being sequentially connected, wherein:
Setup module, for from it is in need update resource file destination host in select a destination host as source
Main frame, the other purposes main frame in addition to the source host is referred to as to receive destination host;
Preliminary update module, for updating the former resource file on source host first, and by the new resources file after renewal
Version number and the new resources file renewal time record in synchronous directory;
Screening module, for the renewal time of the version number of new resources file in synchronous directory and the new resources file to be divided
It is not compared with the version number for receiving the former resource file that destination host is locally recorded and its renewal time, selects version number
It is used as the reception destination host to need synchronous resource file with renewal time all inconsistent resource files;
Final updated module, will receive destination host for source host needs the latest edition of synchronous resource file to transmit
To the reception destination host, the reception destination host updates locally corresponding according to the latest edition of the resource file of reception
Resource file.
Further, above-mentioned resource file updating device can also have the characteristics that, the final updated module includes:
Dispensing unit, for configuring FTP tasks, it would be desirable to the host ip of synchronous reception destination host, file transmission association
Discussing FTP accounts, the reception destination host needs synchronous resource file catalogue to store into database;
After start unit, the FTP tasks for starting the configuration of described dispensing unit, the FTP tasks carryings, source host will
The latest edition of resource file listed by the resource file catalogue is transferred to described connect according to the host ip for receiving destination host
Destination host is received, the reception destination host is according to updating local respective resources file after reception.
Further, above-mentioned resource file updating device can also have the characteristics that, the final updated module also includes
Probe unit, the probe unit is connected with the dispensing unit and the start unit respectively, and the probe unit is used to visit
Whether be logical, if FTP passages are obstructed if surveying the corresponding FTP passages of the FTP tasks, FTP corresponding to the FTP passages appoints
Business is indicated, and reminds operator, if FTP passages are logical, can start the start unit.
Further, above-mentioned resource file updating device can also have the characteristics that, the start unit includes opening by hand
Subunit or start by set date subelement, the start-up by hand subelement are used for start-up by hand FTP tasks, start by set date
Unit is used to set timed task automatic start FTP tasks.
Further, above-mentioned resource file updating device can also have the characteristics that, the final updated module also includes
Rollback unit, the rollback unit is connected with the start unit, and the rollback unit is used to be transferred to described connect in source host
When the latest edition of the resource file of receipts destination host is wrong, the resource file of the reception destination host is return back to before renewal
Version.
The resource file update method and device of the present invention, can effectively improve the renewal efficiency of B/S class application software, with
That the number of servers that want synchronous is more, effect is more obvious, the time linear growth effect of saving.In addition, of the invention
Resource file update method and device, additionally it is possible at utmost reduce resource file renewal process in risk, reduce risks
The loss brought.
Brief description of the drawings
Fig. 1 is the flow chart of resource file update method in the embodiment of the present invention;
Fig. 2 is the structured flowchart of resource file updating device in the embodiment of the present invention.
Embodiment
The principle and feature of the present invention are described below in conjunction with accompanying drawing, the given examples are served only to explain the present invention, and
It is non-to be used to limit the scope of the present invention.
Fig. 1 is the flow chart of resource file update method in the embodiment of the present invention.Resource file more new technological process shown in Fig. 1
It can apply to internet.As shown in figure 1, in the present embodiment, resource file update method may include steps of:
Step S101, from it is in need update resource file destination host in select a destination host as source master
Machine, the other purposes main frame in addition to source host is referred to as to receive destination host;
Step S102, updates the former resource file on source host first, and by the version number of the new resources file after renewal
Recorded with the renewal time of the new resources file in synchronous directory;
Step S103, by the renewal time of the version number of new resources file and the new resources file in synchronous directory respectively with
The version number and its renewal time for receiving the former resource file of destination host local record are compared, and select version number and more
All inconsistent resource files of new time are used as the reception destination host to need synchronous resource file;
Step S104, source host, which will receive destination host, needs the latest edition of synchronous resource file to be transferred to reception mesh
Main frame, the reception destination host updates local resource file according to the latest edition of the resource file of reception.
Wherein, i.e. in the latest edition synchronous directory of the synchronous resource file of reception destination host needs what is recorded is new
Resource file.
In embodiments of the present invention, step S104 can be realized by following sub-step a to d:
Step a, configures FTP tasks, it would be desirable to the host ip of synchronous reception destination host, FTP FTP accounts
Number, the reception destination host need synchronous resource file catalogue to store into database;
Step b, whether the corresponding FTP passages of detection FTP tasks are logical, if FTP passages are obstructed, logical to the FTP
The corresponding FTP tasks in road are indicated, and remind operator, if FTP passages are logical, are able to carry out step c;
Step c, starts FTP tasks, after FTP tasks carryings, and source host is by the resource file listed by resource file catalogue
Latest edition according to receive destination host host ip be transferred to reception destination host, the reception destination host according to after reception more
New local respective resources file;
Starting FTP tasks can be using one of the following two kinds mode:Start-up by hand FTP tasks set timed task certainly
It is dynamic to start FTP tasks.
Step d, when the latest edition that source host is transferred to the resource file for receiving destination host is wrong, by the reception mesh
Main frame resource file return back to update before version.
The resource file update method of the present invention, can effectively improve the renewal efficiency of B/S class application software, with wanting
Synchronous number of servers is more, and effect is more obvious, the time linear growth effect of saving.In addition, the resource of the present invention
File updating method, additionally it is possible at utmost reduce the risk in resource file renewal process, the loss brought of reducing risks.
The invention also provides a kind of resource file updating device, the resource file update method above-mentioned to perform.This
The resource file updating device of invention can apply to the renewal of resource file in internet.
Fig. 2 is the structured flowchart of resource file updating device in the embodiment of the present invention.As shown in Fig. 2 in the present embodiment, money
Setup module 210 that source file updating device can include being sequentially connected, preliminary update module 220, screening module 230 and final
Update module 240.Wherein, setup module 210 be used for from institute it is in need renewal resource file destination host in select a mesh
Main frame as source host, the other purposes main frame in addition to the source host is referred to as to receive destination host.Preliminary update module
220 are used to update the former resource files on source host first, and by the version number of the new resources file after renewal and the new resources
The renewal time of file is recorded in synchronous directory.Screening module 230 is used for the version number of new resources file in synchronous directory
With renewal time of the new resources file respectively with the version number of the former resource file that receives destination host local record and its more
The new time is compared, and selects version number and renewal time all inconsistent resource files as the reception destination host needs
Synchronous resource file.Final updated module 240 is used for source host needs synchronous resource file most by destination host is received
Redaction is transferred to the reception destination host, and the reception destination host updates according to the latest edition of the resource file of reception
Local respective resources file.
In embodiments of the present invention, final updated module 240 can include dispensing unit and start unit.Dispensing unit is used
In configuration FTP tasks, it would be desirable to the host ip of synchronous reception destination host, FTP FTP accounts, the reception purpose
Main frame needs synchronous resource file catalogue to store into database.The FTP that start unit is used to start configuration of described dispensing unit appoints
After business, FTP tasks carryings, source host is by the latest edition of the resource file listed by resource file catalogue according to reception destination host
Host ip be transferred to reception destination host, receive destination host according to updating local respective resources file after reception.
Wherein, start unit can include start-up by hand subelement or start by set date subelement.Start-up by hand subelement is used
In start-up by hand FTP tasks, start by set date subelement is used to set timed task automatic start FTP tasks.
In embodiments of the present invention, final updated module 240 can further include probe unit.Probe unit is distinguished
It is connected with dispensing unit and start unit, probe unit is used to detect whether the corresponding FTP passages of FTP tasks are logical, if
FTP passages are obstructed, then the corresponding FTP tasks of the FTP passages are indicated, and remind operator, if FTP passages are logical
, then it can start start unit.
In embodiments of the present invention, final updated module 240 can further include rollback unit.Rollback unit is with opening
Moving cell is connected, and rollback unit is used for when the latest edition that source host is transferred to the resource file for receiving destination host is wrong,
The version that the resource file of the reception destination host is return back to before updating.
The resource file updating device of the present invention, can effectively improve the renewal efficiency of B/S class application software, with wanting
Synchronous number of servers is more, and effect is more obvious, the time linear growth effect of saving.In addition, the resource of the present invention
File updating device, additionally it is possible at utmost reduce the risk in resource file renewal process, the loss brought of reducing risks.
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all the present invention spirit and
Within principle, any modification, equivalent substitution and improvements made etc. should be included in the scope of the protection.
Claims (10)
1. a kind of resource file update method, applied to internet, it is characterised in that including:
Step one, from it is in need update resource file destination host in select a destination host as source host, will remove
Other purposes main frame outside the source host is referred to as receiving destination host;
Step 2, updates the former resource file on source host first, and the version number of the new resources file after renewal is new with this
The renewal time of resource file is recorded in synchronous directory;
Step 3, by the renewal time of the version number of new resources file and the new resources file in synchronous directory respectively with receiving mesh
Main frame local record former resource file version number and its renewal time be compared, select version number and renewal time
All inconsistent resource file needs synchronous resource file as the reception destination host;
Step 4, source host, which will receive destination host, needs the latest edition of synchronous resource file to be transferred to the reception purpose
Main frame, the reception destination host updates local respective resources file according to the latest edition of the resource file of reception.
2. resource file update method according to claim 1, it is characterised in that the step 4 includes:
Configure FTP tasks, it would be desirable to host ip, FTP FTP accounts, reception mesh of synchronous reception destination host
Main frame need synchronous resource file catalogue to store into database;
Start after the FTP tasks, the FTP tasks carryings, source host is by the resource file listed by the resource file catalogue
Latest edition be transferred to the reception destination host according to the host ip for receiving destination host, the reception destination host according to
Local respective resources file is updated after reception.
3. resource file update method according to claim 2, it is characterised in that before the FTP tasks are started, also
Including:
Whether be logical, if FTP passages are obstructed if detecting the corresponding FTP passages of the FTP tasks, to FTP passages correspondence
FTP tasks be indicated, and remind operator, if FTP passages are logical, be able to carry out starting the FTP tasks
Operation.
4. resource file update method according to claim 2, it is characterised in that starting the FTP tasks includes:By hand
Start FTP tasks or timed task automatic start FTP tasks are set.
5. according to the resource file update method described in claim 2, it is characterised in that after the FTP tasks are started, also wrap
Include:When the latest edition that source host is transferred to the resource file for receiving destination host is wrong, by the reception purpose master
The version that the resource file of machine is return back to before updating.
6. a kind of resource file updating device, applied to internet, it is characterised in that including the setup module, just being sequentially connected
Update module, screening module and final updated module are walked, wherein:
Setup module, for from it is in need update resource file destination host in select a destination host as source master
Machine, the other purposes main frame in addition to the source host is referred to as to receive destination host;
Preliminary update module, for updating the former resource file on source host first, and by the version of the new resources file after renewal
The renewal time of this number and the new resources file is recorded in synchronous directory;
Screening module, for by the renewal time of the version number of new resources file and the new resources file in synchronous directory respectively with
The version number and its renewal time for receiving the former resource file of destination host local record are compared, and select version number and more
All inconsistent resource files of new time are used as the reception destination host to need synchronous resource file;
Final updated module, will receive destination host for source host needs the latest edition of synchronous resource file to be transferred to institute
Reception destination host is stated, the reception destination host updates local respective resources according to the latest edition of the resource file of reception
File.
7. resource file updating device according to claim 6, it is characterised in that the final updated module includes:
Dispensing unit, for configuring FTP tasks, it would be desirable to host ip, the FTP FTP of synchronous reception destination host
Account, the reception destination host need synchronous resource file catalogue to store into database;
After start unit, the FTP tasks for starting the configuration of described dispensing unit, the FTP tasks carryings, source host will be described
The latest edition of resource file listed by resource file catalogue is transferred to the reception mesh according to the host ip for receiving destination host
Main frame, the reception destination host is according to updating local respective resources file after reception.
8. resource file updating device according to claim 7, it is characterised in that the final updated module also includes visiting
Unit is surveyed, the probe unit is connected with the dispensing unit and the start unit respectively, the probe unit is used to detect
Whether the corresponding FTP passages of the FTP tasks are logical, if FTP passages are obstructed, FTP tasks corresponding to the FTP passages
It is indicated, and reminds operator, if FTP passages are logical, the start unit can be started.
9. resource file updating device according to claim 7, it is characterised in that the start unit includes start-up by hand
Subelement or start by set date subelement, the start-up by hand subelement are used for start-up by hand FTP tasks, and start by set date is single
Member is used to set timed task automatic start FTP tasks.
10. resource file updating device according to claim 7, it is characterised in that the final updated module also includes
Rollback unit, the rollback unit is connected with the start unit, and the rollback unit is used to be transferred to described connect in source host
When the latest edition of the resource file of receipts destination host is wrong, the resource file of the reception destination host is return back to before renewal
Version.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410301119.2A CN104050282B (en) | 2014-06-27 | 2014-06-27 | Resource file update method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410301119.2A CN104050282B (en) | 2014-06-27 | 2014-06-27 | Resource file update method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104050282A CN104050282A (en) | 2014-09-17 |
CN104050282B true CN104050282B (en) | 2017-08-01 |
Family
ID=51503114
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410301119.2A Active CN104050282B (en) | 2014-06-27 | 2014-06-27 | Resource file update method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104050282B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110333880B (en) * | 2018-03-29 | 2024-02-02 | 杭州海康威视数字技术股份有限公司 | Configuration updating method, device, equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102012933A (en) * | 2010-12-02 | 2011-04-13 | 清华大学 | Distributed file system and method for storing data and providing services by utilizing same |
CN102868731A (en) * | 2012-08-27 | 2013-01-09 | 济南大学 | Method and device for software online updating and downloading acceleration |
CN103177082A (en) * | 2013-02-21 | 2013-06-26 | 用友软件股份有限公司 | Main server, slave server, index synchronizing system and index synchronizing method |
CN103544303A (en) * | 2013-10-31 | 2014-01-29 | 北京锐安科技有限公司 | Data synchronization method, system and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8103651B2 (en) * | 2004-04-13 | 2012-01-24 | Hewlett-Packard Development Company, L.P. | Auto-updating reader program for document files |
-
2014
- 2014-06-27 CN CN201410301119.2A patent/CN104050282B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102012933A (en) * | 2010-12-02 | 2011-04-13 | 清华大学 | Distributed file system and method for storing data and providing services by utilizing same |
CN102868731A (en) * | 2012-08-27 | 2013-01-09 | 济南大学 | Method and device for software online updating and downloading acceleration |
CN103177082A (en) * | 2013-02-21 | 2013-06-26 | 用友软件股份有限公司 | Main server, slave server, index synchronizing system and index synchronizing method |
CN103544303A (en) * | 2013-10-31 | 2014-01-29 | 北京锐安科技有限公司 | Data synchronization method, system and device |
Also Published As
Publication number | Publication date |
---|---|
CN104050282A (en) | 2014-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105159704B (en) | A kind of method and device of batch deployment operation system | |
CN101388911B (en) | Off-line data collecting method for network application program | |
CN103442026B (en) | A kind of applied program processing method, device and system | |
CN101946493B (en) | Method and system for providing connectivity between clients connected to the internet | |
CN106612188A (en) | Method and device for extending software function based on micro service architecture | |
CN102917061B (en) | Resource synchronization method and system | |
CN102904959B (en) | Network accelerating method and gateway | |
CN105760159A (en) | Website developing method and system | |
CN105791344A (en) | Grayscale release service processing method, system, load balancer and service bus device | |
CN102904960A (en) | Information synchronizing system and method based on really simple syndication (RSS) | |
CN103685496A (en) | Transmission method and device of file data | |
EP4050850A1 (en) | Service upgrading method, device and system | |
CN105959302A (en) | Terminal management framework and method | |
CN105577710A (en) | Service providing method, service acquiring method, devices and system | |
CN107566518A (en) | The method and apparatus of management equipment information during installation file | |
TWI534635B (en) | Cloud service system and method thereof | |
CN101924791B (en) | Method, device and system for displaying multimedia information | |
CN104050282B (en) | Resource file update method and device | |
CN102769625A (en) | Client-side Cookie information acquisition method and device | |
CN110460668A (en) | A kind of file uploading method, device, computer equipment and storage medium | |
CN101577730A (en) | Method for uploading and downloading files synchronously based on FTP protocol | |
CN103312594B (en) | A kind of method and device entering Chatroom | |
CN105516319B (en) | The method and apparatus for managing HTTP message | |
CN101207507A (en) | System for managing mobile terminal capability information | |
CN106331051A (en) | File transmission method and system, file receiving device and file transmission 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |