CN102298525A - System and method for dynamically updating data according to setting - Google Patents

System and method for dynamically updating data according to setting Download PDF

Info

Publication number
CN102298525A
CN102298525A CN2010102129470A CN201010212947A CN102298525A CN 102298525 A CN102298525 A CN 102298525A CN 2010102129470 A CN2010102129470 A CN 2010102129470A CN 201010212947 A CN201010212947 A CN 201010212947A CN 102298525 A CN102298525 A CN 102298525A
Authority
CN
China
Prior art keywords
resource
written
file
item
setting value
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.)
Pending
Application number
CN2010102129470A
Other languages
Chinese (zh)
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.)
Inventec Corp
Original Assignee
Inventec Corp
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 Inventec Corp filed Critical Inventec Corp
Priority to CN2010102129470A priority Critical patent/CN102298525A/en
Publication of CN102298525A publication Critical patent/CN102298525A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a system and method for dynamically updating data according to setting. The method comprises the following steps of: reading a loading set value corresponding to a resource item and judging whether the loading set value is instant loading; further judging whether a resource file is modified; reading the corresponding loading set value serving as an instantly-loaded resource item by using the resource file; and updating the resource item. According to the system and the method, modification in the resource file can be reflected instantly without restarting a main program, and a developer can control the displayed resource item.

Description

According to setting system and the method thereof that dynamically updates data
Technical field
The present invention relates to a kind of data update system and method thereof, be meant a kind of especially according to setting system and the method thereof that dynamically updates data.
Background technology
The developer of software is in order to allow its software of developing can allow the user of cognation not use, and therefore, all needs the family of languages that provides different no matter be with the software that network service or unit are carried out.
Because for the independently suitable waste of manpower cost of software developed in each family of languages, therefore, at present most multi-lingual be that software all is that literal, picture with each family of languages independently is a resource file, so as to separating with master routine, so, only need be when master routine starts, corresponding resource file is written in the storer, just can be when needs be exported, by reading corresponding literal or picture in the storer, the user of cognation uses so as to offering not according to key assignments.
Yet, when starting, master routine is written into resource file, and when exporting, read by needs the mode of corresponding literal or picture according to key assignments, after resource file being made amendment at every turn, all must restart master routine and be written into amended resource file, just can export literal or picture through revising, such situation is except the inconvenience that causes the software developer, if above-mentioned mode is applied in the application program that is executed in service end, when the developer need upgrade resource file and restart application program, the user of client can't use this network service with the possibility short time, causes user's puzzlement.
In sum, prior art has existed the modification in the resource file need restart the problem that just can be updated behind the master routine always since the midium or long term as can be known, therefore is necessary to propose improved technological means, solves this problem.
Summary of the invention
Because prior art exists the modification in the resource file need restart the problem that just can be updated behind the master routine, so disclosing a kind of foundation, the present invention sets system and the method thereof that dynamically updates data, wherein:
Disclosed in this invention according to setting the system that dynamically updates data, comprise at least: Storage Media, in order to the storage resources file; The resource read module is in order to by reading resource item in the resource file; Output module is in order to the output resource item; Set read module, in order to read the setting value that is written into of corresponding resource item; Set judge module, whether be written into setting value for being written into immediately in order to judgement; The file modification judge module is in order to judge that whether resource file is through revising; Resource insmods, in order to be written into resource item to storer, and in order to the resource read module is judged that in the file modification judge module resource file is through after revising, by being updated in the storer for being written into corresponding resource item immediately of being read in the resource file, make the resource item after output module output is upgraded with being written into setting value.
Disclosed in this invention according to setting the method that dynamically updates data, its step comprises at least: by reading resource item in the resource file of setting up in advance; Be written into resource item to storer; Output is stored in the resource item in the storer; Read the setting value that is written into of corresponding resource item; Judge resource file through after revising, by reading the corresponding resource item of setting value that be written in the resource file once more for being written into immediately; In this storer, upgrade the corresponding resource item of setting value that be written into for being written into immediately; Resource item after output is upgraded.
System and method for disclosed in this invention as above, be that with the difference between the prior art the present invention is written into setting value for after being written into immediately by reading with corresponding being written into setting value and judging of resource item, judge that further resource file is through after revising, read the corresponding resource item of setting value that be written into by resource file for being written into immediately, and renewal resource item, so as to solving the existing in prior technology problem, and can reach the technology effect of the resource item that provides the developer to control to be shown.
Description of drawings
Fig. 1 is the system architecture diagram that dynamically updates data according to setting provided by the present invention.
Fig. 2 A is provided by the present invention according to setting the method flow diagram that dynamically updates data.
Fig. 2 B is provided by the present invention by the detailed method process flow diagram that reads resource item in the resource file once more.
Fig. 3 is resource file synoptic diagram that the embodiment of the invention provided.
[main element symbol description]
110 Storage Medias
120 resource read modules
140 storeies
150 set read module
160 set judge module
170 file modification judge modules
180 resources insmod
190 output modules
311 resource items
312 resource items
Embodiment
Below describe conjunction with figs. and embodiment in detail feature of the present invention and embodiment, content is enough to make any those skilled in the art can fully understand the applied technological means of technical solution problem of the present invention easily and implements according to this, realizes the attainable effect of the present invention whereby.
Meeting of the present invention is according to the setting of developer to each resource item in the program, the resource item of the part that immediate updating is shown, and the resource item that just upgrades shown another part after program restarts.Wherein, the present invention is applied in the application program of unit, also can be applied under the master-slave architecture.
Resource item provided by the present invention is to comprise the content that program display of the present invention is watched to the user, including but not limited to literal, picture etc.Generally speaking, resource item provided by the present invention comprises key assignments and corresponding content.
Following elder generation illustrates System Operation of the present invention so that Fig. 1 is provided by the present invention according to setting the system architecture diagram that dynamically updates data.As shown in Figure 1, system of the present invention contains Storage Media 110, resource read module 120, sets read module 150, sets judge module 160, file modification judge module 170, resource insmod 180 and output module 190.
Storage Media 110 is generally hard disk, but the present invention is not as limit.Storage Media 110 is responsible for the storage resources file, Storage Media 110 stored resource files write down one or more resource items, resource file can be a text file/binary file, database/tables of data, a plurality of file or a tables of data, but the present invention is not as limit.
Storage Media 110 also can the storing and setting file, the corresponding setting value that is written into of resource item in the stored enactment documents record of storage module 110 and the resource file.The setting value that is written into of resource item comprises " being written into immediately " and " non-be written into immediately " two kinds at least, but the setting value that is written into provided by the present invention is not exceeded with these two kinds.
Resource read module 120 is responsible for reading resource item to the resource file that is stored in Storage Media 110.Wherein, resource read module 120 when reading resource item in the resource file, can read out all resource items in the resource file, or only read out the resource item that need be updated each time.
Setting read module 150 is responsible for reading and is written into setting value, under most situation, set read module 150 and will periodically read and be written into setting value, but the present invention is as limit, set read module 150 and also can only when the present invention is performed, read and be written into setting value.
Setting read module 150 is read be written into setting value and be stored in the resource item that is write down in the resource file of Storage Media 110 has corresponding relation.Generally speaking, each that set that read module 150 read is written into the specific resource item that setting value can correspond in the resource file respectively to be write down, but the present invention is not as limit, that is to say, being written into setting value may not have corresponding resource item, or resource item does not have the corresponding setting value that is written into.
The setting value that is written into that setting read module 150 is read is recorded in the specific enactment document usually, and generally speaking, it is stored by Storage Media 110 to write down the enactment document that is written into setting value, but the present invention is not as limit.That is to say that if enactment document is stored by Storage Media 110, then setting read module 150 can be by reading the be written into setting value corresponding with loaded each resource item of resource read module 120 in the enactment document that is stored in Storage Media 110.
Set judge module 160 and be responsible for judging whether the corresponding setting value that is written into of resource item that is read with resource read module 120 is " being written into immediately ".What deserves to be mentioned is, set in the judge module 160 and can define the default setting value that is written into, that is to say, if set judge module 160 default be written into setting value for " non-be written into immediately " time, when being written in the setting value that setting read module 150 is read, when not being written into setting value, setting judge module 160 and can be directly be written into setting value and judge that not having the setting value that is written into of the corresponding resource item that is written into setting value is " non-be written into immediately " to preset with the loaded resource item of resource read module 120 is corresponding.
File modification judge module 170 be responsible for judging the stored resource file of Storage Media 110 whether after resource read module 120 reads resource item through modification.File modification judge module 170 can set judge module 160 judge the resource item that is read with resource read module 120 corresponding be written into setting value for " being written into immediately " after, just judge resource file whether after resource read module 120 is reading resource item through revising, but the present invention is not as limit, for example, file modification judge module 170 also can be regardless of the judged result of setting judge module 160, directly judge resource file whether after resource read module 120 is reading resource item through revising.
File modification judge module 170 can be after resource read module 120 reads one or more resource items by Storage Media 110 in the stored resource file each time, the file size and/or the update time of the resource file when record resource read module 120 reads resource item, in addition, file modification judge module 170 also can periodically read the file size and/or the update time of the stored resource file of Storage Media 110, and reading the file size of resource file each time and/or after update time, according to the file size of the file size of the resource file that write down and/or update time and the resource file that read and/or judge that whether resource file is through revising update time, different when the file size and/or the update time of the resource file that is write down with the file size and/or the update time of the resource file that is read, represent that then this resource file is through revising, otherwise, identical when the file size and/or the update time of the resource file that is write down with the file size and/or the update time of the resource file that is read, represent that then this resource file is not through revising.But file modification judge module 170 judges that the resource file mode whether process is revised is not as limit.
What deserves to be mentioned is that judge the resource file that is stored in the Storage Media 110 through after revising at file modification judge module 170,120 meetings of resource read module are by reading the corresponding resource item that is written into setting value for " being written into immediately " in the resource file.
Resource insmods and 180 is responsible for being written into resource read module 120 by whole or resource item of being read in the resource file.Generally speaking, insmod 180 can be written into resource item in the storer 140 for resource.
Output module 190 is responsible for the output resources 180 loaded resource items that insmod, wherein, output module 190 shown resource items comprise not through resource 180 resource items that upgrade that insmod, and through resource 180 the resource items after upgrading that insmod.If resource item is insmoded by resource and 180 is written in the storer, then output module 190 can be read to the storer needs the resource item that shows.
Generally speaking, output module 190 can directly show resource item or the mode that resource item writes file is exported resource item.Can be webpage or alternative document and be output the file that module 190 writes resource item.
Then explain orally operation system of the present invention and method, and it is provided by the present invention according to setting the method flow diagram that dynamically updates data to please refer to Fig. 2 A with an embodiment.Present embodiment is applied in example in the master-slave architecture for the present invention, but the present invention is not as limit.
In the present embodiment, Storage Media 110, resource read module 120, set read module 150, set judge module 160, file modification judge module 170 and resource and insmod and 180 all be contained on the web service program that is executed in service end, and output module 190 is executed on the browser of client.
After the management of webpage person of service end starts the web service program, resource read module 120 in the web service program can be opened the resource file in the Storage Media 110 of store-service end, so as to the resource item (step 211) of playback record in resource file.Suppose in the present embodiment, resource file is " text-singular.xml ", if resource file as shown in Figure 3, then resource read module 120 is after opening resource file " text-singular.xml ", can read that to comprise key assignments (key) be the resource items such as resource item 312 of " modification " for " Confirm " and data for " Update " and data for the resource item 311 and the key assignments (key) of " affirmations ".
After the resource read module 120 of web service program was read resource item (step 211) in by resource file, the resource of web service program insmoded and 180 the resource item that resource read module 120 is read can be written in the storer 140 of service end (step 215).So, when user's operated client institute web pages downloaded comprises key assignments for the resource item of " Confirm " or " Update ", the output module 220 meeting foundations of web service program are with the key assignments that webpage comprised that is downloaded, by reading out corresponding resource items destination data in the storer 140, just " affirmation " or " modification ", and will write by the resource item that storer 140 is read in the webpage that is downloaded, so as to output resource item (step 220).
In fact, after the web service program was activated, what the setting read module 150 of web service program can read corresponding resource item was written into setting value (step 230).In the present invention, the log file that hypothetical record is written into setting value is " app.properties ", and log file " app.properties " is stored in the Storage Media 110 of service end, then set read module 150 and can open the log file " app.properties " that is stored in the Storage Media 110, so as to read out the be written into setting value corresponding by log file " app.properties " with resource item 311 and resource item 312.On practice, set read module 150 and read out and resource item 311 and resource item 312 corresponding being written into the setting value by log file " app.properties " except be activated the back in the web service program, no matter also can whether the request of downloading webpage that receive be arranged the web service program, periodically read out the be written into setting value corresponding with resource item 311 and resource item 312 by log file " app.properties ", so as to obtain each resource item up-to-date be written into setting value, but the present invention is not as limit.
The setting read module 150 of web service program read out corresponding resource item be written into setting value (step 230) after, will be shown in the flow process of Fig. 2 B, the setting judge module 160 of web service program can judge whether the enactment document that is written into that setting read module 150 is read is " being written into immediately " (step 261).In the present embodiment, suppose to set that read module 150 reads that corresponding with resource item 311 enactment document that is written into is " non-be written into immediately ", and the be written into enactment document corresponding with resource item 312 of setting that read module 150 reads is " being written into immediately ", but the present invention is not as limit.
Because corresponding with resource item 311 enactment document that is written into is " non-be written into immediately ", therefore the setting judge module 160 of web service program can be judged the be written into enactment document corresponding with resource item 311 and is not " being written into immediately " (step 261), so resource insmods and 180 will can not attempt upgrading resource item 311.That is to say, even the data " affirmation " of the resource item 311 that is write down in the resource file " text-singular.xml " are modified, comprise the webpage of key assignments for " Confirm " if the web service program receives to download, then to write the data of the resource item 311 in the webpage all also can be " affirmation " (step 220) to output module 190.
Equally the setting read module 150 of web service program read out corresponding resource item be written into setting value (step 230) after, resource file in the file modification judge module 170 meeting judgement Storage Medias 110 of web service program is after last time being read by resource read module 120, to judge instantly during in, whether through revising (step 262).Wherein, file modification judge module 170 is judged resource file whether through revising (step 262), with the setting judge module 160 of web service program judge with the corresponding enactment document that is written into of resource item 311 whether be relation that " being written into immediately " (step 261) do not have precedence.If the file modification judge module 170 of web service program is according to the file size of resource file or judge that whether resource file is through revising update time, then in the present embodiment, for the file modification judge module 170 that the web service program is provided judges that whether resource file is through revising, the resource read module 120 of web service program can read resource item (step 211) at every turn by resource file after, when record reads resource item, the file size of resource file and/or update time (step 240).So, judge file size/update time that the resource read module 120 of file size/update time of the resource file that is read to Storage Media 110 and web service program write down when last time reading resource file not simultaneously when file modification judge module 170, file modification judge module 170 can be judged resource file through revising.
If the file modification judge module of web service program 170 judges that resource file is not through revising (step 262), represent that then the resource items destination data does not all have change, therefore, the resource read module 120 of web service program does not need to open once more resource file to read resource item, that is to say, the output module 190 of web service program is when writing the resource items destination data in the webpage (step 220), and the resource items destination data that is written into can not change.
And if the file modification judge module of web service program 170 judges that resource file is through revising (step 262), and the setting judge module 160 of web service program is judged the be written into enactment document corresponding with resource item 311 and is " being written into immediately " (step 261), then the setting read module 150 of web service program can be by reading the corresponding resource item of setting value for being written into immediately that be written in the resource file, so as to judging resource file at file modification judge module 170 through after revising, the resource read module 120 of web service program can read the corresponding resource item (step 270) of setting value for being written into immediately that be written into by resource file.In the present embodiment, resource read module 120 can be opened resource file " text-singular.xml " again, and by reading the corresponding data that are written into setting value for the resource item 312 of " being written into immediately " in the resource file " text-singular.xml ".In addition, in the present embodiment, resource read module 120 also can write down by reading in the resource file " text-singular.xml " corresponding when being written into setting value for the resource item 312 of " being written into immediately " once more, the file size of resource file and/or update time (step 270).
Judge that at the file modification judge module 170 of web service program resource file is through revising, and the resource read module 120 of web service program reads the corresponding setting value that is written into for behind the resource item (step 260) that is written into immediately by resource file, and the resource of web service program insmods 180, and can correspondingly to be written into setting value be that the resource item that is written into immediately be updated in the storer 140 of service end.In the present embodiment, the data of supposing the resource item 311 in the resource file " text-singular.xml " are modified to " determining ", the data of resource item 312 are modified to " renewal ", then when user's operated client institute web pages downloaded comprises key assignments for the resource item of " Confirm " and " Update ", the output module 220 meeting foundations of web service program are with the key assignments that webpage comprised that is downloaded, by reading out corresponding resource items destination data in the storer 140, loaded " affirmation " and when the web service program begins to carry out just immediately by resource 180 " renewals " that are written into that insmod, and will write in the webpage that is downloaded the resource item (step 290) after upgrading so as to output by the resource item that storer 140 is read.So, after revising resource file, do not need to restart master routine and just can upgrade resource item, resource item be written into setting value when being written into immediately, resource item does not just need master routine to restart promptly and can upgrade.
Though embodiment disclosed in this invention is as above, be described content be not in order to direct qualification scope of patent protection of the present invention.Any persond having ordinary knowledge in the technical field of the present invention under the prerequisite that does not break away from spirit and scope disclosed in this invention, does a little change retouching to reaching of enforcement of the present invention in form on the details, all belong to scope of patent protection of the present invention.Scope of patent protection of the present invention, still must with appended claim scope the person of being defined be as the criterion.

Claims (10)

1. a foundation is set the method that dynamically updates data, it is characterized in that this method comprises the following step at least:
By reading at least one resource item in the resource file of setting up in advance;
Be written into those resource item to one storeies;
Output is stored in respectively this resource item in this storer;
Read the setting value that is written into of corresponding respectively this resource item;
Judge this resource file through after revising, by reading corresponding setting value respectively this resource item that is written in this resource file once more for being written into immediately;
In this storer, upgrade corresponding setting value respectively this resource item that is written into for being written into immediately; And
This resource item after output is upgraded.
2. foundation as claimed in claim 1 is set the method that dynamically updates data, it is characterized in that, wherein this method more comprises this resource file of judgement through after revising, and exports the step that is stored in respectively this resource item in this storer.
3. as claimed in claim 1 according to setting the method that dynamically updates data, it is characterized in that, wherein should judge this resource file through after revising, comprise the following step for the step of respectively this resource item of being written into immediately by reading the corresponding setting value that is written in this resource file:
That judges this resource item correspondence respectively is written into setting value for being written into immediately;
Judge that this resource file is through revising; And
By reading corresponding setting value respectively this resource item that is written in this resource file for being written into immediately.
4. as claimed in claim 1ly it is characterized in that according to setting the method dynamically update data, wherein this resource file of this judgements through the step revised for according to the file size of this resource file and/or judge this resource file process modification update time.
5. as claimed in claim 4 according to setting the method that dynamically updates data, it is characterized in that, wherein this method is after reading corresponding this once more and being written into the step of setting value for this resource item of being written into immediately after the step that is read this resource item respectively by this resource file and by this resource file, more comprises the file size that writes down this resource file and/or the step of update time.
6. a foundation is set the system that dynamically updates data, it is characterized in that this system comprises at least:
One Storage Media is in order to store a resource file;
One resource read module is in order to by reading at least one resource item in this resource file;
One output module is in order to export respectively this resource item;
One sets read module, in order to read the setting value that is written into of corresponding respectively this resource item;
One sets judge module, whether is written into setting value for being written into immediately in order to judge this;
One file modification judge module is in order to judge that whether this resource file is through revising; And
One resource insmods, in order to be written into respectively this resource item to one storer, and in order to this resource read module is judged that in this document modification judge module this resource file is through after revising, be written into setting value with this and be updated in this storer by what read in this resource file, make respectively this resource item after this output module output is upgraded for being written into corresponding respectively this resource item immediately.
7. as claimed in claim 6 according to setting the system that dynamically updates data, it is characterized in that, this resource read module file size and/or update time wherein,, this document revises judge module according to the file size of this resource file and/or judge that whether this resource file is through revising update time so as to being provided in order to write down this resource file.
8. foundation as claimed in claim 6 is set the system that dynamically updates data, it is characterized in that, wherein more in order to store an enactment document, this enactment document writes down the setting value that is written into of corresponding respectively this resource item to this Storage Media.
9. as claimed in claim 6ly it is characterized in that wherein this setting read module is periodically to read respectively to this Storage Media that this is written into setting value according to setting the system dynamically update data.
10. as claimed in claim 6 according to setting the system that dynamically updates data, it is characterized in that wherein this Storage Media is a hard disk.
CN2010102129470A 2010-06-24 2010-06-24 System and method for dynamically updating data according to setting Pending CN102298525A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010102129470A CN102298525A (en) 2010-06-24 2010-06-24 System and method for dynamically updating data according to setting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010102129470A CN102298525A (en) 2010-06-24 2010-06-24 System and method for dynamically updating data according to setting

Publications (1)

Publication Number Publication Date
CN102298525A true CN102298525A (en) 2011-12-28

Family

ID=45358963

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010102129470A Pending CN102298525A (en) 2010-06-24 2010-06-24 System and method for dynamically updating data according to setting

Country Status (1)

Country Link
CN (1) CN102298525A (en)

Similar Documents

Publication Publication Date Title
US7490298B2 (en) Creating documentation screenshots on demand
US6353926B1 (en) Software update notification
US8370826B2 (en) Automatically managing versioning of mashup widgets
US7530079B2 (en) Managing application customization
CN102622241B (en) A kind of method for upgrading software and device
CN101167071B (en) Methods and devices for synchronizing modifiable documents with multiple clients
CN102081535B (en) Android-based application program upgrading method and system and application development platform
US20020078262A1 (en) System and methods for providing compatibility across multiple versions of a software system
CN101295260A (en) Image forming apparatus, program updating system, and program updating program
CN112558980A (en) Multi-software-package management method and device
US7778983B2 (en) Application migration file scanning and conversion
CN101248414A (en) User data profile namespace
CN104090749A (en) Processing method and system for updating and changing interface theme of WinCE product
CN101535934A (en) Methods and systems for providing a customized user interface for viewing and editing meta-data
CN102682014A (en) Open-type plug-in module management platform implemented on browser and open-type plug-in module management method
US20090271455A1 (en) Content Migration Tool and Method Associated Therewith
CN1794172A (en) Promote trnas-application and trans-edition file protocol
US7761924B2 (en) Manipulation of information embedded in content
US20110078673A1 (en) Persisting the changes for managed components in an application server
WO2011066261A1 (en) Fast restart on a virtual machine
US20050120331A1 (en) Hosting environment abstraction agents
CN103473367A (en) Method for using local application program in browser and web browser
US20120131539A1 (en) Find and Track Information Of Interface Usage Of Software Libraries By Other Software
US8196093B2 (en) Apparatus and method for componentizing legacy system
CN101326515A (en) Metadata driven deployment of applications

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20111228