CN102096584B - Method, equipment and system for modifying time stamp on page script - Google Patents

Method, equipment and system for modifying time stamp on page script Download PDF

Info

Publication number
CN102096584B
CN102096584B CN200910260326.7A CN200910260326A CN102096584B CN 102096584 B CN102096584 B CN 102096584B CN 200910260326 A CN200910260326 A CN 200910260326A CN 102096584 B CN102096584 B CN 102096584B
Authority
CN
China
Prior art keywords
page script
timestamp
information
server
time
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
CN200910260326.7A
Other languages
Chinese (zh)
Other versions
CN102096584A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN200910260326.7A priority Critical patent/CN102096584B/en
Publication of CN102096584A publication Critical patent/CN102096584A/en
Priority to HK11109472.5A priority patent/HK1155257A1/en
Application granted granted Critical
Publication of CN102096584B publication Critical patent/CN102096584B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention discloses a method, equipment and a system for modifying a time stamp on a page script. By applying the technical scheme provided by the embodiment of the invention, a dynamic modification process of time stamp information of the page script can be realized, so that a front-end development engineer, a back-end development engineer and a configuration administrator can ignore problems related to the time stamp, and the time stamp quoted by javascript in a website page can be automatically updated to the latest version only after new javascript is issued.

Description

A kind of amending method of time stamp on page script, equipment and system
Technical field
The embodiment of the present application relates to communication technical field, particularly a kind of amending method of time stamp on page script, equipment and system.
Background technology
Javascript is a kind of case sensitive client script language of OO regime type of the prototype succession being developed by the LiveScript of Netscape, fundamental purpose is for settlement server end instruction, such as Perl, the speed issue of leaving over, for client provides more smooth result of browse.Service end need to be verified data at that time, because network speed is quite slow, only had 28.8kbps, and the time of verification step waste is too many.So the browser Navigator of Netscape has added Javascript, and the basic function of data verification is provided.
JavaScript is the page script language according to " ECMAScript " standard formulation.
In a system based on web, the javaScript in the page (js) script, css script and other the script that need to introduce from external file, be referred to as assets file, all needs to demonstrate the url address of file of being cited,
For example: introduce a javascript script:
<script?type=″text/javascript″src=″http://a.tbcdn.cn/app/tc/detail.js″></script>
This introducing mode, there is a drawback, be exactly after the javascript of service end file update, can not upgrade timely user at the javascript of browser end buffer memory, only have after user forces to refresh the page, just can download up-to-date javascript from service end, if there are great changes in the version of javascript, old javascript can not the compatible new html page, will produce bug, causes user to access this page and occurs obstacle.
In order to address this problem, introduced the concept of timestamp,, when the content of javascript file changes, website service end adds timestamp parameter when quoting javascript, as:
<script
type=″text/javascript″src=″http://a.tbcdn.cn/app/tc/detail.js?t=200910231422″>
</script>
After adding timestamp, browser thinks that variation has occurred the url of this document, and meeting active request service end, obtains up-to-date javascript file, thereby guarantees that user can browse to the normal page.
In realizing the process of the embodiment of the present application, applicant finds at least to exist in prior art following problem:
The problem that service time, stamp brought is, upgrade javascript file at every turn and all will upgrade by hand the timestamp of javascript, revise all references to the file of the service end of this javascript, bring very large workload, and after revised file, also will be published to production environment on line just can come into force, brought thus the cost of very large modification, test, issue, and there is coarse problem in manual amendment's timestamp sometimes, as: have people by the time modification of timestamp to following or be modified to the historical time.The problem that can bring is like this to cause user to be loaded into the javascript that is buffered in local browser end of early version, can produce equally the mistake of page browsing, and according to the observation, industry does not temporarily also on-the-fly modify technology and the application of timestamp.
Summary of the invention
The embodiment of the present application provides a kind of amending method, equipment and system of time stamp on page script, realizes on-the-fly modifying the timestamp information of page script.
For achieving the above object, the embodiment of the present application provides a kind of amending method of time stamp on page script on the one hand, be applied to comprise in the system of page script server, timestamp configuration device and application server, described page script server is to described application server issue page script, and send the page script message that makes an announcement to described timestamp configuration device, described method specifically comprises the following steps:
Described timestamp configuration device receives page script that described page script server the sends message that makes an announcement;
Described timestamp configuration device, according to the described page script message that makes an announcement, generates the timestamp information of corresponding page script;
Described timestamp configuration device sends to the corresponding application server of described page script by the timestamp information of described page script, and after described application server is proved to be successful described timestamp information, by described application server, according to described timestamp information, corresponding page script is carried out the renewal of timestamp information.
Preferably, described page script server is to described application server issue page script, and sends the page script message that makes an announcement to described timestamp configuration device, specifically comprises:
Described page script server is issued page script to described application server, and records name information and the issuing time of described page script;
Described page script server is according to the name information of described page script and issuing time, generates the corresponding page script message that makes an announcement;
Described page script server is within the default response time after described application server issue page script, to the described timestamp configuration device transmission page script message that makes an announcement.
Preferably, described timestamp configuration device, according to the described page script message that makes an announcement, generates the timestamp information of corresponding page script, specifically comprises:
Described timestamp configuration device, according to the described page script the receiving message that makes an announcement, obtains described page script server to name information and the issuing time of the page script of described application server issue;
Described timestamp configuration device, according to described name information and issuing time, generates the timestamp information of corresponding page script.
Preferably, described timestamp configuration device, according to described name information and issuing time, generates the timestamp information of corresponding page script, specifically comprises:
Described timestamp configuration device, according to described name information and issuing time, generates the timestamp cache information of corresponding page script;
Described timestamp configuration device compares the timestamp cache information of described page script and nearest timestamp replacement time of described page script, the checking that the time of carrying out is upgraded legitimacy;
When described timestamp configuration device, determine the corresponding time of timestamp cache information of described page script and be later than the nearest timestamp replacement of described page script during the time, described timestamp cache information is carried out to persistence conversion, generate the timestamp information of corresponding page script, when described timestamp configuration device determines that the corresponding time of timestamp cache information of described page script is replaced the time early than the nearest timestamp of described page script, abandon described timestamp cache information.
Preferably, described timestamp configuration device, specifically comprises the configuration server issue page and configuration server,
Wherein, the described configuration server issue page is according to described name information and issuing time, generate the timestamp cache information of corresponding page script, and described timestamp cache information is sent to configuration server, the checking of the described timestamp cache information time of carrying out being upgraded to legitimacy by described configuration server, and when being proved to be successful, the timestamp cache information of described page script is carried out to persistence conversion, generate the timestamp information of corresponding page script.
Preferably, described timestamp configuration device also comprises after the timestamp information of described page script is sent to the corresponding application server of described page script:
Described application server carries out legitimate verification according to default proof rule to the timestamp information receiving;
When described legitimate verification failure, the timestamp information receiving described in described application server abandons;
When described legitimate verification success, described application server determines that according to the name information of page script entrained in described timestamp information needing update time stabs the page script of information, and according to issuing time entrained in described timestamp information, upgrading describedly needs update time and stabs the corresponding timestamp information of page script of information.
On the other hand, the embodiment of the present application also provides a kind of timestamp configuration device, be applied to comprise in the system of page script server, timestamp configuration device and application server, described page script server is to described application server issue page script, and send the page script message that makes an announcement to described timestamp configuration device, specifically comprise:
Receiver module, for receiving page script that described page script server the sends message that makes an announcement;
Generation module, is connected with described receiver module, for the message that makes an announcement according to the received page script of described receiver module, generates the timestamp information of corresponding page script;
Sending module, be connected with described generation module, timestamp information for page script that described generation module is generated sends to the corresponding application server of described page script, and after described application server is proved to be successful described timestamp information, by described application server, according to described timestamp information, corresponding page script is carried out the renewal of timestamp information.
Preferably, described generation module, specifically comprises:
Obtain submodule, for the message that makes an announcement according to the received described page script of described receiver module, obtain described page script server to name information and the issuing time of the page script of described application server issue;
Generate submodule, be connected with the described submodule that obtains, name information and the issuing time for obtaining submodule described in basis, obtained, generate the timestamp information of corresponding page script.
Preferably, described timestamp configuration device specifically comprises the configuration server issue page and configuration server,
Wherein, the described configuration server issue page, according to described name information and issuing time, generates the timestamp cache information of corresponding page script, and described timestamp cache information is sent to configuration server;
The nearest timestamp replacement time of the timestamp cache information of the page script that described configuration server sends the described configuration server issue page and described page script compares, the time of carrying out is upgraded the checking of legitimacy, when described configuration server, determine the corresponding time of timestamp cache information of described page script and be later than the nearest timestamp replacement of described page script during the time, described timestamp cache information is carried out to persistence conversion, generate the timestamp information of corresponding page script, when described configuration server determines that the corresponding time of timestamp cache information of described page script is replaced the time early than the nearest timestamp of described page script, abandon described timestamp cache information.
On the other hand, the embodiment of the present application also provides a kind of page script server, is applied to comprise in the system of page script server, timestamp configuration device and application server, specifically comprises:
Release module, for issuing page script to described application server, and records name information and the issuing time of described page script;
Generation module, is connected with described generation module, for name information and the issuing time of the page script issued according to described release module, generates the corresponding page script message that makes an announcement;
Notification module, is connected with described generation module, for send page script that described generation module the generates message that makes an announcement to described timestamp configuration device.
Preferably, described page script server also comprises module is set, be connected with described notification module with described release module, be used for setting the response time, within the scope of the default response time in described release module after described application server issue page script, notify described notification module to send page script that described generation module the generates message that makes an announcement to described timestamp configuration device.
On the other hand, the embodiment of the present application also provides a kind of application server, is applied to comprise in the system of page script server, timestamp configuration device and application server, specifically comprises:
Receiver module, the page script of issuing for receiving described page script server, and the timestamp information that sends of described timestamp configuration device;
Authentication module, is connected with described receiver module, for the received timestamp information of described receiver module being carried out to legitimate verification according to default proof rule;
Processing module, be connected with described authentication module, when failed for the legitimate verification that carries out when described authentication module, the timestamp information receiving described in abandoning, or during the legitimate verification carrying out when described authentication module success, according to the name information of page script entrained in described timestamp information, determine that needing update time stabs the page script of information, and according to issuing time entrained in described timestamp information, upgrading describedly needs update time and stabs the corresponding timestamp information of page script of information.
Preferably, described application server also comprises:
Module is set, is connected with described authentication module, for setting proof rule, make described authentication module to the received timestamp information of described receiver module, carry out legitimate verification according to described proof rule;
Wherein, described proof rule comprises according to the name information comprising in described timestamp information and/or issuing time the received timestamp information of described receiver module is carried out to legitimate verification.
On the other hand, the embodiment of the present application also provides a kind of page script delivery system, comprises page script server, timestamp configuration device and application server, wherein:
Described page script server, for to described application server issue page script, and sends the page script message that makes an announcement to described timestamp configuration device;
Described timestamp configuration device, be connected with described page script server, for receiving page script that described page script server the sends message that makes an announcement, according to the described page script message that makes an announcement, generate the timestamp information of corresponding page script, and send to the corresponding application server of described page script;
Described application server, be connected with described timestamp configuration device with described page script server, for receiving the page script that described page script server is issued, the timestamp information sending with described timestamp configuration device, and the timestamp information receiving is carried out to legitimate verification, according to the result, carry out the processing of the corresponding timestamp information of page script.
Preferably, described application server carries out the processing of the corresponding timestamp information of page script according to the result, specifically comprise:
Carry out when described application server legitimate verification failure time, the timestamp information receiving described in abandoning; Or,
Carry out when described application server legitimate verification success time, according to the name information of page script entrained in described timestamp information, determine that needing update time stabs the page script of information, and according to issuing time entrained in described timestamp information, upgrading describedly needs update time and stabs the corresponding timestamp information of page script of information.
Compared with prior art, the embodiment of the present application has the following advantages:
The technical scheme proposing by application the embodiment of the present application, the timestamp information that can realize page script on-the-fly modifies process, make front end Developmental Engineer, rear end Developmental Engineer and Configuration Management Officer, all needn't go to pay close attention to the problem relevant with timestamp, as long as issued new javascript, the timestamp of in the page of website, this javascript being quoted can be updated to up-to-date automatically.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of the amending method of a kind of time stamp on page script of proposing of the embodiment of the present application;
Fig. 2 is a kind of page script delivery system structural representation that the embodiment of the present application proposes;
Fig. 3 is a kind of page script server architecture schematic diagram that the embodiment of the present application proposes;
Fig. 4 is a kind of application server structural representation that the embodiment of the present application proposes;
Fig. 5 is a kind of timestamp configuration device structural representation that the embodiment of the present application proposes;
Fig. 6 is the another kind of application server structural representation that the embodiment of the present application proposes;
Fig. 7 is the output schematic flow sheet of the amending method of a kind of time stamp on page script of proposing of the embodiment of the present application.
Embodiment
In order to solve problems of the prior art, the amending method of a kind of time stamp on page script that the embodiment of the present application proposes, be applied to comprise in the system of page script server, timestamp configuration device and application server, described page script server is issued page script to described application server, and in the message that makes an announcement to described timestamp configuration device transmission page script.
As shown in Figure 1, the schematic flow sheet of the amending method of a kind of time stamp on page script proposing for the embodiment of the present application, specifically comprises the following steps:
Step S101, described timestamp configuration device receive page script that described page script server the sends message that makes an announcement.
Wherein, described page script server is issued page script to described application server, and in the message that makes an announcement to described timestamp configuration device transmission page script, specifically comprises:
Described page script server is issued page script to described application server, and records name information and the issuing time of described page script;
Described page script server is according to the name information of described page script and issuing time, generates the corresponding page script message that makes an announcement;
Described page script server is within the default response time after described application server issue page script, to the described timestamp configuration device transmission page script message that makes an announcement.
Wherein, default response time scope is the time interval arranging according to the needs of concrete application scenarios, arranging of such time interval can guarantee that the page script that page script server is issued completes the process of transmitting to application server, the impact of the technical scheme that the delay phenomenon of avoiding causing because of Internet Transmission problem proposes the application.
The concrete corresponding time span of default response time scope can need to be adjusted according to concrete system, and the variation of concrete time span does not affect the application's protection domain.
Step S102, described timestamp configuration device, according to the described page script message that makes an announcement, generate the timestamp information of corresponding page script.
Described timestamp configuration device, according to the described page script message that makes an announcement, generates the timestamp information of corresponding page script, specifically comprises:
Described timestamp configuration device, according to the described page script the receiving message that makes an announcement, obtains described page script server to name information and the issuing time of the page script of described application server issue;
Described timestamp configuration device, according to described name information and issuing time, generates the timestamp information of corresponding page script.
Preferably, described timestamp configuration device, according to described name information and issuing time, generates the timestamp information of corresponding page script, specifically comprises:
Described timestamp configuration device, according to described name information and issuing time, generates the timestamp cache information of corresponding page script;
Described timestamp configuration device compares the timestamp cache information of described page script and nearest timestamp replacement time of described page script, the checking that the time of carrying out is upgraded legitimacy;
When described timestamp configuration device, determine the corresponding time of timestamp cache information of described page script and be later than the nearest timestamp replacement of described page script during the time, described timestamp cache information is carried out to persistence conversion, generate the timestamp information of corresponding page script, when described timestamp configuration device determines that the corresponding time of timestamp cache information of described page script is replaced the time early than the nearest timestamp of described page script, abandon described timestamp cache information.
Wherein, need to further be pointed out that, above-mentioned persistence transforms carries out instantaneous state to the conversion of permanent state to timestamp in fact exactly, and persistant data is exactly that data are saved in to corresponding memory location in database in fact.
Data persistence is exactly to be memory model by the data model translation in internal memory, and the general designation that memory model is converted to the data model in internal memory, data model can be any data structure or object model, memory model can be relational model, XML, binary stream etc., and cmp and Hibernate are that object model is realized to the difference of changing between relational model.
The concepts such as " persistence " this concept and " temporarily " are relative, and data have in computing machine generally two storage ground, inside save as temporaryly, because power supply shutdown will loss of data, if need Reusability, will persist, and realized persistence.
Accordingly, the timestamp cache information of the page script that timestamp configuration device receives is at first instantaneous state, just be stored in buffer memory, when determining that the corresponding time of timestamp cache information of this page script is later than the nearest timestamp replacement of this page script during the time, judge that this timestamp cache information is effective, need to carry out concrete storage, therefore, need to carry out persistence conversion, be about to this information and store corresponding position in database into, in order to calling, wherein, if other times stamp data have been stored in relevant position, cover accordingly, the renewal of deadline stamp information.
Wherein, described timestamp configuration device, specifically comprise the configuration server issue page and configuration server, the described configuration server issue page is according to described name information and issuing time, generate the timestamp cache information of corresponding page script, and described timestamp cache information is sent to configuration server, the checking of the described timestamp cache information time of carrying out being upgraded to legitimacy by described configuration server, and when being proved to be successful, the timestamp cache information of described page script is carried out to persistence conversion, generate the timestamp information of corresponding page script.
Step S103, described timestamp configuration device send to the corresponding application server of described page script by the timestamp information of described page script.
Step S104, described application server carry out legitimate verification according to default proof rule to the timestamp information receiving.
When described legitimate verification failure, execution step S105;
When described legitimate verification success, execution step S106.
The timestamp information receiving described in step S105, described application server abandon;
Step S106, described application server determine that according to the name information of page script entrained in described timestamp information needing update time stabs the page script of information, and according to issuing time entrained in described timestamp information, upgrading describedly needs update time and stabs the corresponding timestamp information of page script of information.
Compared with prior art, the embodiment of the present application has the following advantages:
The technical scheme proposing by application the embodiment of the present application, the timestamp information that can realize page script on-the-fly modifies process, make front end Developmental Engineer, rear end Developmental Engineer and Configuration Management Officer, all needn't go to pay close attention to the problem relevant with timestamp, as long as issued new javascript, the timestamp of in the page of website, this javascript being quoted can be updated to up-to-date automatically.
In order to realize the technical scheme of the embodiment of the present application, the embodiment of the present application has also proposed a kind of page script delivery system, and its structural representation as shown in Figure 2, comprises page script server 21, timestamp configuration device 22 and application server 23.
Described page script server 21, for issuing page scripts to described application server 23, and in the message that makes an announcement to described timestamp configuration device 22 transmission page scripts, its concrete structure as shown in Figure 3, comprising:
Release module 31, for issuing page script to described application server, and records name information and the issuing time of described page script;
Generation module 32, is connected with described generation module 31, for name information and the issuing time of the page script issued according to described release module 31, generates the corresponding page script message that makes an announcement;
Notification module 33, is connected with described generation module 32, for send page script that described generation module 32 the generates message that makes an announcement to described timestamp configuration device.
In concrete application scenarios, described page script server also comprises module 34 is set, be connected with described notification module 33 with described release module 31, be used for setting the response time, within the scope of the default response time in described release module 31 after described application server issue page script, notify described notification module 33 to send page script that described generation module the generates message that makes an announcement to described timestamp configuration device.
Described timestamp configuration device 22, be connected with described page script server 21, for receiving page script that described page script server 21 the sends message that makes an announcement, according to the described page script message that makes an announcement, generate the timestamp information of corresponding page script, and send to the corresponding application server 23 of described page script, its structural representation as shown in Figure 4, comprising:
Receiver module 41, for receiving page script that described page script server 21 the sends message that makes an announcement;
Generation module 42, is connected with described receiver module 41, for the message that makes an announcement according to the received page script of described receiver module 41, generates the timestamp information of corresponding page script, specifically comprises:
Obtain submodule 421, for the message that makes an announcement according to the received described page script of described receiver module 41, obtain described page script server 21 to name information and the issuing time of the page script of described application server 23 issues;
Generate submodule 422, be connected with the described submodule 421 that obtains, name information and the issuing time for obtaining submodule described in basis, obtained, generate the timestamp information of corresponding page script.
Sending module 43, be connected with described generation module 42, timestamp information for page script that described generation module 42 is generated sends to the corresponding application server 23 of described page script, and after described application server is proved to be successful described timestamp information, by described application server 23, the renewal of timestamp information will corresponding page script be carried out according to described timestamp information.
In concrete application scenarios, as shown in Figure 5, described timestamp configuration device 22 specifically comprises the configuration server issue page 51 and configuration server 52.
Wherein, the described configuration server issue page 51, according to described name information and issuing time, generates the timestamp cache information of corresponding page script, and described timestamp cache information is sent to configuration server 52;
The nearest timestamp replacement time of the timestamp cache information of the page script that 52 pairs of described configuration server issue pages 51 of described configuration server send and described page script compares, the checking that the time of carrying out is upgraded legitimacy.
When described configuration server 52, determine the corresponding time of timestamp cache information of described page script and be later than the nearest timestamp replacement of described page script during the time, described timestamp cache information is carried out to persistence conversion, generate the timestamp information of corresponding page script;
When described configuration server 52 determines that the corresponding time of timestamp cache information of described page script is replaced the time early than the nearest timestamp of described page script, abandon described timestamp cache information.
Described application server 23, be connected with described timestamp configuration device 22 with described page script server 21, for receiving the page script that described page script server 21 is issued, the timestamp information sending with described timestamp configuration device 22, and the timestamp information receiving is carried out to legitimate verification, according to the result, carry out the processing of the corresponding timestamp information of page script.
In concrete application scenarios, described application server 23 carries out the processing of the corresponding timestamp information of page script according to the result, specifically comprise:
Carry out when described application server 23 legitimate verification failure time, the timestamp information receiving described in abandoning; Or,
Carry out when described application server 23 legitimate verification success time, according to the name information of page script entrained in described timestamp information, determine that needing update time stabs the page script of information, and according to issuing time entrained in described timestamp information, upgrading describedly needs update time and stabs the corresponding timestamp information of page script of information.
Based on above-mentioned technical thought, the structural drawing of application server 23 as shown in Figure 6, specifically comprises with lower module:
Receiver module 61, the page script of issuing for receiving described page script server 21, and the timestamp information that sends of described timestamp configuration device 22;
Authentication module 62, is connected with described receiver module 61, for the received timestamp information of described receiver module 61 being carried out to legitimate verification according to default proof rule;
Processing module 63, be connected with described authentication module 62, when failed for the legitimate verification that carries out when described authentication module 62, the timestamp information receiving described in abandoning, or during the legitimate verification carrying out when described authentication module 62 success, according to the name information of page script entrained in described timestamp information, determine that needing update time stabs the page script of information, and according to issuing time entrained in described timestamp information, upgrading describedly needs update time and stabs the corresponding timestamp information of page script of information.
Further, described application server 23 also comprises:
Module 64 is set, is connected with described authentication module 62, for setting proof rule, make described authentication module 62 to the received timestamp information of described receiver module 61, carry out legitimate verification according to described proof rule;
Wherein, described proof rule comprises according to the name information comprising in described timestamp information and/or issuing time the received timestamp information of described receiver module is carried out to legitimate verification.
Compared with prior art, the embodiment of the present application has the following advantages:
The technical scheme proposing by application the embodiment of the present application, the timestamp information that can realize page script on-the-fly modifies process, make front end Developmental Engineer, rear end Developmental Engineer and Configuration Management Officer, all needn't go to pay close attention to the problem relevant with timestamp, as long as issued new javascript, the timestamp of in the page of website, this javascript being quoted can be updated to up-to-date automatically.
Below, further combined with concrete example, the technical scheme of the embodiment of the present application is described.
Step S701, assets publisher server issue assets file.
File name and the date issued of the assets file of step S702, the issue of assets publisher server record, by perl script, in issue assets, generate original time stamp data.
The generative process of time stamp data is as follows:
Time stamp data produces when issue assets file, uses perl script to generate this data, and then the form with http interface externally provides access, and the data of Json form are provided, as:
{
″time_stamp″:″200909141335″,
″file_names″:[
{″file_name″:″app/tc/detail.js″},
{″file_name″:″app/tc/d?etail.css″}
]
}
Step S703, after assets file distribution completes, after assets publisher server is waited for 10 minutes, by the timestamp information notice configUI of assets issue.
The issuing process of time stamp data is as follows:
After Assets file distribution, wait for 10 minutes, guarantee that the machine on line all issued, ask afterwards the disclosed servlet interface of configUI, configUI verifies according to the username and password of arranging before, after checking, then go for the interface of asking the disclosed http of assets issue script, will after data packing, be published to configServer.
Just institute is to a kind of time example having in the application to it is pointed out that above-mentioned 10 minutes, and other time numerical value that can reach constructed effect also can be applied to herein, and specifically the variation of time span does not affect protection scope of the present invention.
Step S704, configUI initiatively call openly http interface out of perl script, get the ison data of timestamp.
Step S705, configUI form the data structure of configServer according to these data, be published to configServer.
Step S706, configServer receive after time stamp data, the validity judgement of deadline stamp information, and when this timestamp information is legal, this timestamp information is carried out to persistence conversion.
So-called validity judgement, whether definite corresponding time of this timestamp information is later than the nearest timestamp replacement time of corresponding page script, if be later than, judged that this timestamp information is legal, and this timestamp information is converted into persistant data.
Step S707, configServer have subscribed to the data notification receiving on the appServer machine of these data to each.
Whether step S708, each appServer check this timestamp information legal.
If illegal, perform step S711;
If legal, perform step S709.
Step S709, according to legal data, carry out the renewal of local cache data.
Step S710, corresponding information is carried out to persistence conversion, and according to corresponding data, local information is upgraded, so just completed the automatic renewal of time stamp data.
Above-mentioned step S707 is the renewal process of time stamp data to step S710:
ConfigServer can push data on each appServer of hour of log-on stamp renewal after receiving up-to-date data, after appServer receives up-to-date time stamp data, do verification, if the new time is newer than the local time, the time of this up-to-date time being replaced to local internal memory, preserve a to disk simultaneously.
After corresponding timestamp information upgrades, page access process is as follows:
When service end is played up generation html, the pathname of the assets file that can play up as required generates up-to-date timestamp, so just can guarantee that the assets script that user accesses is up-to-date.
Step S711, abandon illegal timestamp information.
Compared with prior art, the embodiment of the present application has the following advantages:
The technical scheme proposing by application the embodiment of the present application, the timestamp information that can realize page script on-the-fly modifies process, make front end Developmental Engineer, rear end Developmental Engineer and Configuration Management Officer, all needn't go to pay close attention to the problem relevant with timestamp, as long as issued new javascript, the timestamp of in the page of website, this javascript being quoted can be updated to up-to-date automatically.
Through the above description of the embodiments, those skilled in the art can be well understood to the embodiment of the present application and can realize by hardware, and the mode that also can add necessary general hardware platform by software realizes.Understanding based on such, the technical scheme of the embodiment of the present application can embody with the form of software product, it (can be CD-ROM that this software product can be stored in a non-volatile memory medium, USB flash disk, portable hard drive etc.) in, comprise some instructions with so that computer equipment (can be personal computer, server, or the network equipment etc.) carry out the embodiment of the present application each implement the method described in scene.
It will be appreciated by those skilled in the art that accompanying drawing is a schematic diagram of preferably implementing scene, the module in accompanying drawing or flow process might not be that enforcement the embodiment of the present application is necessary.
It will be appreciated by those skilled in the art that the module in the device of implementing in scene can be distributed in the device of implementing scene according to implementing scene description, also can carry out respective change and be arranged in the one or more devices that are different from this enforcement scene.The module of above-mentioned enforcement scene can be merged into a module, also can further split into a plurality of submodules.
Above-mentioned the embodiment of the present application sequence number, just to describing, does not represent the quality of implementing scene.
Disclosed is above only the several concrete enforcement scene of the embodiment of the present application, and still, the embodiment of the present application is not limited thereto, and the changes that any person skilled in the art can think of all should fall into the protection domain of the embodiment of the present application.

Claims (15)

1. the amending method of a time stamp on page script, it is characterized in that, be applied to comprise page script server, in the system of timestamp configuration device and application server, described page script server is to described application server issue page script, and send the page script message that makes an announcement to described timestamp configuration device, wherein, described page script server is within the default response time after described application server issue page script, to described timestamp configuration device, send the page script message that makes an announcement, described method specifically comprises the following steps:
Described timestamp configuration device receives page script that described page script server the sends message that makes an announcement;
Described timestamp configuration device, according to the described page script message that makes an announcement, generates the timestamp information of corresponding page script;
Described timestamp configuration device sends to the corresponding application server of described page script by the timestamp information of described page script, and after described application server is proved to be successful described timestamp information, by described application server, according to described timestamp information, corresponding page script is carried out the renewal of timestamp information.
2. the method for claim 1, is characterized in that, described page script server is to described application server issue page script, and sends the page script message that makes an announcement to described timestamp configuration device, specifically comprises:
Described page script server is issued page script to described application server, and records name information and the issuing time of described page script;
Described page script server is according to the name information of described page script and issuing time, generates the corresponding page script message that makes an announcement;
Described page script server is within the default response time after described application server issue page script, to the described timestamp configuration device transmission page script message that makes an announcement.
3. method as claimed in claim 2, is characterized in that, described timestamp configuration device, according to the described page script message that makes an announcement, generates the timestamp information of corresponding page script, specifically comprises:
Described timestamp configuration device, according to the described page script the receiving message that makes an announcement, obtains described page script server to name information and the issuing time of the page script of described application server issue;
Described timestamp configuration device, according to described name information and issuing time, generates the timestamp information of corresponding page script.
4. method as claimed in claim 3, is characterized in that, described timestamp configuration device, according to described name information and issuing time, generates the timestamp information of corresponding page script, specifically comprises:
Described timestamp configuration device, according to described name information and issuing time, generates the timestamp cache information of corresponding page script;
Described timestamp configuration device compares the timestamp cache information of described page script and nearest timestamp replacement time of described page script, the checking that the time of carrying out is upgraded legitimacy;
When described timestamp configuration device, determine the corresponding time of timestamp cache information of described page script and be later than the nearest timestamp replacement of described page script during the time, described timestamp cache information is carried out to persistence conversion, generate the timestamp information of corresponding page script, when described timestamp configuration device determines that the corresponding time of timestamp cache information of described page script is replaced the time early than the nearest timestamp of described page script, abandon described timestamp cache information.
5. method as claimed in claim 4, is characterized in that, described timestamp configuration device specifically comprises the configuration server issue page and configuration server,
Wherein, the described configuration server issue page is according to described name information and issuing time, generate the timestamp cache information of corresponding page script, and described timestamp cache information is sent to configuration server, the checking of the described timestamp cache information time of carrying out being upgraded to legitimacy by described configuration server, and when being proved to be successful, the timestamp cache information of described page script is carried out to persistence conversion, generate the timestamp information of corresponding page script.
6. the method as described in any one in claims 1 to 3, is characterized in that, described timestamp configuration device also comprises after the timestamp information of described page script is sent to the corresponding application server of described page script:
Described application server carries out legitimate verification according to default proof rule to the timestamp information receiving;
When described legitimate verification failure, the timestamp information receiving described in described application server abandons;
When described legitimate verification success, described application server determines that according to the name information of page script entrained in described timestamp information needing update time stabs the page script of information, and according to issuing time entrained in described timestamp information, upgrading describedly needs update time and stabs the corresponding timestamp information of page script of information.
7. a timestamp configuration device, it is characterized in that, be applied to comprise in the system of page script server, timestamp configuration device and application server, described page script server is to described application server issue page script, and send the page script message that makes an announcement to described timestamp configuration device, wherein, described page script server is within the default response time after described application server issue page script, to described timestamp configuration device, send the page script message that makes an announcement, specifically comprise:
Receiver module, for receiving page script that described page script server the sends message that makes an announcement;
Generation module, is connected with described receiver module, for the message that makes an announcement according to the received page script of described receiver module, generates the timestamp information of corresponding page script;
Sending module, be connected with described generation module, timestamp information for page script that described generation module is generated sends to the corresponding application server of described page script, and after described application server is proved to be successful described timestamp information, by described application server, according to described timestamp information, corresponding page script is carried out the renewal of timestamp information.
8. timestamp configuration device as claimed in claim 7, is characterized in that, described generation module, specifically comprises:
Obtain submodule, for the message that makes an announcement according to the received described page script of described receiver module, obtain described page script server to name information and the issuing time of the page script of described application server issue;
Generate submodule, be connected with the described submodule that obtains, name information and the issuing time for obtaining submodule described in basis, obtained, generate the timestamp information of corresponding page script.
9. timestamp configuration device as claimed in claim 7, is characterized in that, specifically comprises the configuration server issue page and configuration server,
Wherein, the described configuration server issue page, according to name information and issuing time, generates the timestamp cache information of corresponding page script, and described timestamp cache information is sent to configuration server;
The nearest timestamp replacement time of the timestamp cache information of the page script that described configuration server sends the described configuration server issue page and described page script compares, the time of carrying out is upgraded the checking of legitimacy, when described configuration server, determine the corresponding time of timestamp cache information of described page script and be later than the nearest timestamp replacement of described page script during the time, described timestamp cache information is carried out to persistence conversion, generate the timestamp information of corresponding page script, when described configuration server determines that the corresponding time of timestamp cache information of described page script is replaced the time early than the nearest timestamp of described page script, abandon described timestamp cache information.
10. a page script server, is characterized in that, is applied to comprise in the system of page script server, timestamp configuration device and application server, specifically comprises:
Release module, for issuing page script to described application server, and records name information and the issuing time of described page script;
Generation module, is connected with described generation module, for name information and the issuing time of the page script issued according to described release module, generates the corresponding page script message that makes an announcement;
Notification module, be connected with described generation module, within the default response time after described application server issue page script in described release module, to described timestamp configuration device, send page script that described generation module the generates message that makes an announcement.
11. page script servers as claimed in claim 10, it is characterized in that, also comprise module is set, be connected with described notification module with described release module, be used for setting the response time, within the scope of the default response time in described release module after described application server issue page script, notify described notification module to send page script that described generation module the generates message that makes an announcement to described timestamp configuration device.
12. 1 kinds of application servers, is characterized in that, are applied to comprise in the system of page script server, timestamp configuration device and application server, specifically comprise:
Receiver module, the page script of issuing for receiving described page script server, and the timestamp information that sends of described timestamp configuration device;
Authentication module, is connected with described receiver module, for the received timestamp information of described receiver module being carried out to legitimate verification according to default proof rule;
Processing module, be connected with described authentication module, when failed for the legitimate verification that carries out when described authentication module, the timestamp information receiving described in abandoning, or during the legitimate verification carrying out when described authentication module success, according to the name information of page script entrained in described timestamp information, determine that needing update time stabs the page script of information, and according to issuing time entrained in described timestamp information, upgrading describedly needs update time and stabs the corresponding timestamp information of page script of information.
13. application servers as claimed in claim 12, is characterized in that, also comprise:
Module is set, is connected with described authentication module, for setting proof rule, make described authentication module to the received timestamp information of described receiver module, carry out legitimate verification according to described proof rule;
Wherein, described proof rule comprises according to the name information comprising in described timestamp information and/or issuing time the received timestamp information of described receiver module is carried out to legitimate verification.
14. 1 kinds of page script delivery systems, is characterized in that, comprise page script server, timestamp configuration device and application server, wherein:
Described page script server, for issuing page script to described application server, and at described page script server within the default response time after described application server issue page script, to the described timestamp configuration device transmission page script message that makes an announcement;
Described timestamp configuration device, be connected with described page script server, for receiving page script that described page script server the sends message that makes an announcement, according to the described page script message that makes an announcement, generate the timestamp information of corresponding page script, and send to the corresponding application server of described page script;
Described application server, be connected with described timestamp configuration device with described page script server, for receiving the page script that described page script server is issued, the timestamp information sending with described timestamp configuration device, and the timestamp information receiving is carried out to legitimate verification, according to the result, carry out the processing of the corresponding timestamp information of page script.
15. page script delivery systems as claimed in claim 14, is characterized in that, described application server carries out the processing of the corresponding timestamp information of page script according to the result, specifically comprise:
Carry out when described application server legitimate verification failure time, the timestamp information receiving described in abandoning; Or,
Carry out when described application server legitimate verification success time, according to the name information of page script entrained in described timestamp information, determine that needing update time stabs the page script of information, and according to issuing time entrained in described timestamp information, upgrading describedly needs update time and stabs the corresponding timestamp information of page script of information.
CN200910260326.7A 2009-12-15 2009-12-15 Method, equipment and system for modifying time stamp on page script Active CN102096584B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN200910260326.7A CN102096584B (en) 2009-12-15 2009-12-15 Method, equipment and system for modifying time stamp on page script
HK11109472.5A HK1155257A1 (en) 2009-12-15 2011-09-08 A method, device and system for modifying time stamp of a page script

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910260326.7A CN102096584B (en) 2009-12-15 2009-12-15 Method, equipment and system for modifying time stamp on page script

Publications (2)

Publication Number Publication Date
CN102096584A CN102096584A (en) 2011-06-15
CN102096584B true CN102096584B (en) 2014-04-09

Family

ID=44129692

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910260326.7A Active CN102096584B (en) 2009-12-15 2009-12-15 Method, equipment and system for modifying time stamp on page script

Country Status (2)

Country Link
CN (1) CN102096584B (en)
HK (1) HK1155257A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106250454B (en) * 2012-04-28 2020-04-14 阿里巴巴集团控股有限公司 Page script loading method and device
CN104750467A (en) * 2013-12-26 2015-07-01 广州华多网络科技有限公司 File reading method, device and system
CN104133672A (en) * 2014-07-04 2014-11-05 北京思特奇信息技术股份有限公司 Administrative division method and administrative division system based on client caching
CN106648784B (en) * 2016-12-27 2021-02-05 Tcl科技集团股份有限公司 OTA (over-the-air) upgrading method and system based on android system and android terminal
CN107967328B (en) * 2017-11-24 2021-04-02 四川长虹电器股份有限公司 Method for solving hibernate incompatibility caused by Hessian

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744525A (en) * 2005-09-22 2006-03-08 车欠军 Method for preventing network gam from being external
CN1984139A (en) * 2005-12-16 2007-06-20 中兴通讯股份有限公司 Method for updating system journal file under construction of client end/server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103218215A (en) * 2007-01-16 2013-07-24 吉兹莫克斯有限公司 Method and system for creating IT-oriented server-based web applications

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744525A (en) * 2005-09-22 2006-03-08 车欠军 Method for preventing network gam from being external
CN1984139A (en) * 2005-12-16 2007-06-20 中兴通讯股份有限公司 Method for updating system journal file under construction of client end/server

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WWW中缓存机制的应用研究;赵玉伟;《中国优秀博硕士学位论文全文数据库(硕士) 信息科技辑》;20060815(第08期);第50-51页以及图5-2 *
赵玉伟.WWW中缓存机制的应用研究.《中国优秀博硕士学位论文全文数据库(硕士) 信息科技辑》.2006,(第08期),第50-51页以及图5-2.

Also Published As

Publication number Publication date
CN102096584A (en) 2011-06-15
HK1155257A1 (en) 2012-05-11

Similar Documents

Publication Publication Date Title
US10419289B2 (en) System and method for configuration management service
CN102096584B (en) Method, equipment and system for modifying time stamp on page script
CN101523393B (en) Locally storing web-based database data
WO2007130594A2 (en) Techniques to perform gradual upgrades
CN102195804A (en) Automatic updating method of software and system thereof
US20040111505A1 (en) Method, system, and article of manufacture for network management
CN102480510B (en) The implementation method of C/S and B/S mixed architecture and device
US20130326487A1 (en) Emulating cloud functioning of applications locally
CN103581247A (en) Method for testing distributed type Web based on cloud computing environment
CN103645910A (en) Methods for updating applications
CN110389765B (en) Parameter verification method and parameter verification system
CN102323884A (en) Web service container and method for issuing multiple Web services
CN103377064A (en) Page script loading method and page script loading device
CN103368867A (en) Method and system of cached object communicating with secondary site through network
CN110750243A (en) Project code development method and system
CN107861736A (en) Patch generates and update method and device, electronic equipment, storage medium
CN103237003A (en) Method and device for responding to high visiting flow in network
CN102446090A (en) Method and device for automatically generating test script
US7668905B2 (en) Method, system and computer program for providing web pages based on client state
CN102984282B (en) Intelligent terminal obtains the method and apparatus of the media data of cloud storage file
US20120311720A1 (en) Method for protecting application and method for executing application using the same
US20140047447A1 (en) Work scheduling method and system implemented via cloud platform
CN117032573A (en) Micro-service execution method, electronic device and readable storage medium
CN104079540A (en) Method, device and system of updating application as well as user equipment
CN116069725A (en) File migration method, device, apparatus, medium and program product

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1155257

Country of ref document: HK

C14 Grant of patent or utility model
GR01 Patent grant
REG Reference to a national code

Ref country code: HK

Ref legal event code: GR

Ref document number: 1155257

Country of ref document: HK