[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN103093529A - Method for dynamically refreshing data - Google Patents

Method for dynamically refreshing data Download PDF

Info

Publication number
CN103093529A
CN103093529A CN2013100091561A CN201310009156A CN103093529A CN 103093529 A CN103093529 A CN 103093529A CN 2013100091561 A CN2013100091561 A CN 2013100091561A CN 201310009156 A CN201310009156 A CN 201310009156A CN 103093529 A CN103093529 A CN 103093529A
Authority
CN
China
Prior art keywords
event
data
state
control switch
refresh
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.)
Granted
Application number
CN2013100091561A
Other languages
Chinese (zh)
Other versions
CN103093529B (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.)
GAOXIN MODERN INTELLIGENT SYSTEM CO Ltd
Original Assignee
GAOXIN MODERN INTELLIGENT SYSTEM CO Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by GAOXIN MODERN INTELLIGENT SYSTEM CO Ltd filed Critical GAOXIN MODERN INTELLIGENT SYSTEM CO Ltd
Priority to CN201310009156.1A priority Critical patent/CN103093529B/en
Publication of CN103093529A publication Critical patent/CN103093529A/en
Application granted granted Critical
Publication of CN103093529B publication Critical patent/CN103093529B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Dram (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention discloses a method for dynamically refreshing data. The method comprises the following steps of: establishing a correlation relationship between an objective function to be refreshed and an event, wherein the event is triggered by operating; monitoring the event, and testing the state that an internal memory controls a switch when the event is triggered; when the internal memory controls the switch to be under the first state, uploading the corresponding data to a first data area of the internal memory according to the triggered event, and calling all the correlated objective functions to refresh the data; and when the internal memory controls the switch to be under the second state, uploading the corresponding data to a second data area of the internal memory according to the triggered event, and calling all the correlated objective functions to refresh the data. With the adoption of the method disclosed by the invention, the configuration has effect in time.

Description

The method of dynamic refresh data
Technical field
The present invention relates to data and process, particularly relate to a kind of method of dynamic refresh data.
Background technology
On some public service terminals, when providing different service for the client, need to configure accordingly terminal device or the business software that moves on it.Traditional main implementation of the modification to configuration information is " at first stop business software, then revise configuration information, and then reopen business software ".Program just can be processed according to new configuration like this.
There are the following problems for the mode of this modification configuration:
1. complex operation step, need to first stop business software, and then revise configuration information, reopens at last business software again;
2. when the function ratio that provides when business software is more, and the configuration information of this modification can impact the normal operation of other functions if stop this business software when the operation of other functions is not affected;
3. just can not revise configuration when not allowing the program of intermediate suspension service ending must be waited until to some;
4. can not satisfy the requirement that some software requirements system runs without interruption 24 hours every days.
A kind of public service terminal of continuous service such as gate out of the station in track traffic of typically needing, gate out of the station can configure to make it to become entrance or outlet by modification.In the track traffic management system, Parameter File is by clearing administrative center (AFC clearing center, ACC) center unified management.When needs are updated the equipment the parameter configuration of software or business software, at first be issued to each routine calculation machine (Line Computer after generating Parameter File by ACC, LC) center, and then by each LC center transmit each station computer (Station Computer, SC) to this circuit.After each station receives the Parameter File that LC sends, Parameter File is forwarded to each terminal device in our station.Each terminal device is in order to come into force the parameter information that receives, and necessary restart facility software, can't provide service like this in restarting process, can affect the normal current of passenger.
Summary of the invention
Based on this, be necessary to provide a kind of method that business software can make the dynamic refresh data that configuration comes into force immediately that do not need to stop.
A kind of method of dynamic refresh data comprises the steps:
The objective function that foundation need to be refreshed and the incidence relation of event, described event is triggered by operation;
The monitoring event when Event triggered, detects the state of Memory control switch;
When described Memory control switch is in the first state, loads first data field of corresponding data in the internal memory according to the event of described triggering, and call related objective function and carry out Refresh Data;
When described Memory control switch is in the second state, loads second data field of corresponding data in the internal memory according to the event of described triggering, and call related objective function and carry out Refresh Data.
Therein in embodiment, described the first data field and the second data field be the preliminary data district each other.
In embodiment, the step of the objective function that described foundation need to be refreshed and the incidence relation of event is completed when equipment or business software initialization therein; When initialization, the Memory control switch is placed in the first state or the second state, namely begin the step of the event of monitoring after refreshing with the data execution of giving tacit consent to; State with the Memory control switch in each Event triggered and after successfully loading data is placed in second state or first state relative with described the first state or the second state.
In embodiment, the step of described monitoring event specifically comprises therein:
Read list of thing, described list of thing comprises the event that is triggered by operation;
Judge the event that whether is untreated in described list of thing, if, select one of them event according to selection strategy, put simultaneously refresh be designated true; Otherwise, put to refresh and be designated vacation, continue simultaneously to carry out the step whether event of being untreated is arranged in the decision event list.
In embodiment, the step of described monitoring event also comprises therein: upgrade described list of thing when the step that loads data runs succeeded.
In embodiment, also comprise judging whether the described sign that refreshes is genuine step therein, if described refreshing is designated very, carries out the step that loads data, otherwise continue after the dormancy Preset Time to judge whether the described sign that refreshes is true.
In embodiment, described Preset Time is 10 milliseconds therein.
In embodiment, also comprise judging whether data load successful step, when data load successfully, the Memory control switch is set to another state therein, and the event handling result is set is successfully; Be unsuccessfully otherwise the event handling result is set, and turn to and judge whether the described sign that refreshes is genuine step.
In embodiment, the data that described event according to triggering loads are configuration file therein.
Said method comes the executing data refresh operation by event trigger mechanism, simultaneously when each refresh data, load data and executing data refresh operation at other region of memory, make calling program both read new configuration data, realize the instant modification of configuration, can not cause the program outage again.
Description of drawings
Fig. 1 and Fig. 2 are the method flow diagram of the dynamic refresh data of an embodiment;
Fig. 3 is that the schematic diagram that reads and writes data is divided and controlled to region of memory.
Embodiment
As depicted in figs. 1 and 2, be the method flow diagram of the dynamic refresh data of an embodiment.The method is based on function call and the internal memory switching technology of unified interface, and implementation process is not subjected to interruptedly to read the purpose of amended configuration file, reaches the effect that configuration is come into force immediately.As shown in Figure 3, the method is divided the first data field and the second data field that is used for the storage data in internal memory, and adopt the Memory control switch to control toward the first data field or data (being save data) are write in the second data field, perhaps from the first data field or the second data field read data.The first data field and the second data field be the preliminary data district each other.
The method comprises the steps:
S110: operation initialization thread.Call initialization interface during program start, carry out the initialization data operation.
Initialization thread is mainly carried out following steps.
Step S111: the objective function that foundation need to be refreshed and the incidence relation of event, described event is triggered by operation.In event driven program, at first need with the objective function registration objective function that i.e. foundation need to be refreshed and the incidence relation of event (perhaps adding the processing function corresponding with this event).The operation of trigger event comprises the operation of modification equipment or software configuration etc.When event is triggered, processes accordingly function (objective function) and be called, to complete corresponding function.In one embodiment, utilize function pointer registration objective function.
In addition, when initialization, also comprise:
Step S113: the Memory control switch is placed in the first state or the second state.This step is used to specify the region of memory of the data preservation that next time loads.
Step S115: the data with acquiescence are carried out refresh operation.Want refresh data, at first need to load data in internal memory, this step depends on step S140, if load the data manipulation success in step S140, and execution in step S117, otherwise stop.
Step S117: the Memory control switch is placed in second state or first state relative with the first state or the second state.After data loaded successfully, after also namely being read into internal memory corresponding data district, business software can come refresh data by unified calling interface.Then the Memory control switch is placed in opposite state, when also being next Event triggered, data is loaded into another data field in two data fields of internal memory.
As a rule, have the main data area of an acquiescence in system, another is the preliminary data district.For example in the present embodiment, the first data field is the main data area, and the second data field is the preliminary data district.When program initialization, the data acquiescence is loaded into the main data area, so also the Memory control switch is placed in the first state in step S113, can read be used to the data that refresh from the first data field as the main data area thereby make when refresh data.Afterwards, the state of Memory control switch is set to the second state.For example, in one embodiment, during initialization, the state of Memory control switch is set to FALSE, then loads and refresh data.If successfully load, the state with the Memory control switch after loading is completed so is set to TRUE.
After the initialization of step S110 is completed, namely begin step S120: run case scanning thread.The event scanning thread is used for the event that monitoring system produces, the processing of the line correlation of going forward side by side.Mainly comprise:
Step S121: detect the event that whether is untreated in list of thing.If, execution in step S123, otherwise return to step S121 after execution in step S125.When the needs refresh data, the executing data refresh operation, trigger event, when different operations constantly produces, will trigger a plurality of events then.A plurality of events were kept in list of thing successively according to the triggered time.If there is the event that is untreated in list of thing, representative has the operation of refresh data, and need to process this moment to this event.This step realizes monitoring by the mode of cycle detection.
Step S123: select one of them event according to selection strategy, arrange refresh be designated true.The selection strategy of the present embodiment is First come first served (FIFO), and event was numbered successively from small to large according to the time that arrives, and all selects the minimum event of numbering at every turn.
Step S125: arrange to refresh and be designated vacation.
The above-mentioned sign that refreshes is used for informing that data load thread whether Event triggered is arranged, thereby determines whether to load data.Through step S121 ~ S125, event scanning thread output valve is the sign that refreshes of true or false.
Step S130: service data refreshes thread.This step is used for carrying out the operation of refresh data.Comprise the steps:
Step S131: whether detection refreshes sign is true.If, execution in step S140, otherwise execution in step S133 and return to step S131.Be designated true time when refreshing, execution in step S140 processes event.Otherwise whether circulation execution detection refreshes sign is genuine step.
Step S133: sleep Preset Time.In the present embodiment, Preset Time is preferably 10 milliseconds.
Simultaneously, in the Refresh Data thread, go back execution in step S135: whether the operation that loads data in detecting step S140 is successful.If, execution in step S137, otherwise return to step S131.
Step S137: with the state negate of Memory control switch.Also namely become the second state from the first state, perhaps become the first state from the second state.After each Event triggered and data load successfully, with the state negate of Memory control switch, data are loaded into another data field when specifying next time Event triggered.
Step S130 also generates the result of event handling according to the execution result of step S140.
The result of this event handling is also read by event scanning thread (step S120), and carries out following steps.
Step S127: whether decision event finishes dealing with.If, execution in step S129, otherwise return to execution in step S127.
Step S129: update event list.The state of the event of having finished dealing with is changed to process.So far, processed the completing of event, refresh operation is performed simultaneously.If also have other event in list of thing, repeat the above-mentioned step process next event that begins from step S121.
Step S140: service data loads thread.Comprise:
Step S141: the state that detects the Memory control switch.If the state of Memory control switch is the first state, execution in step S143, if the state of Memory control switch is the second state, execution in step S145.
Step S143: call the objective function of all opening relationships, load data, and store data in the first data field.With the first data field operational objective function in internal memory, executing data refresh operation.
Step S145: call the objective function of all opening relationships, load data, and store data in the second data field.With the second data field operational objective function in internal memory, executing data refresh operation.
Step S147: return to execution result.
The data that load according to the event that triggers related in the present embodiment method are configuration file, are used for the configuration of real-time change equipment or business software.
The above embodiment has only expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.Should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.

Claims (9)

1. the method for dynamic refresh data, comprise the steps:
The objective function that foundation need to be refreshed and the incidence relation of event, described event is triggered by operation;
The monitoring event when Event triggered, detects the state of Memory control switch;
When described Memory control switch is in the first state, loads first data field of corresponding data in the internal memory according to the event of described triggering, and call related objective function and carry out Refresh Data;
When described Memory control switch is in the second state, loads second data field of corresponding data in the internal memory according to the event of described triggering, and call related objective function and carry out Refresh Data.
2. the method for dynamic refresh data according to claim 1, is characterized in that, described the first data field and the second data field be the preliminary data district each other.
3. the method for dynamic refresh data according to claim 1, is characterized in that, the step of the objective function that described foundation need to be refreshed and the incidence relation of event is completed when equipment or business software initialization; When initialization, the Memory control switch is placed in the first state or the second state, namely begin the step of the event of monitoring after refreshing with the data execution of giving tacit consent to; State with the Memory control switch in each Event triggered and after successfully loading data is placed in second state or first state relative with described the first state or the second state.
4. the method for dynamic refresh data according to claim 1, is characterized in that, the step of described monitoring event specifically comprises:
Read list of thing, described list of thing comprises the event that is triggered by operation;
Judge the event that whether is untreated in described list of thing, if, select one of them event according to selection strategy, put simultaneously refresh be designated true; Otherwise, put to refresh and be designated vacation, continue simultaneously to carry out the step whether event of being untreated is arranged in the decision event list.
5. the method for dynamic refresh data according to claim 4, is characterized in that, the step of described monitoring event also comprises: upgrade described list of thing when the step that loads data runs succeeded.
6. the method for dynamic refresh data according to claim 4, it is characterized in that also comprise judging whether the described sign that refreshes is genuine step, if described refreshing is designated very, carry out the step that loads data, otherwise continue after the dormancy Preset Time to judge whether the described sign that refreshes is true.
7. the method for dynamic refresh data according to claim 6, is characterized in that, described Preset Time is 10 milliseconds.
8. the method for dynamic refresh data according to claim 6, is characterized in that, also comprise judging whether data load successful step, when data load successfully, the Memory control switch is set to another state, and the event handling result is set is successfully; Be unsuccessfully otherwise the event handling result is set, and turn to and judge whether the described sign that refreshes is genuine step.
9. the method for the described dynamic refresh data of according to claim 1 to 8 any one, is characterized in that, the data that described event according to triggering loads are configuration file.
CN201310009156.1A 2013-01-10 2013-01-10 The method of dynamic refresh data Expired - Fee Related CN103093529B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310009156.1A CN103093529B (en) 2013-01-10 2013-01-10 The method of dynamic refresh data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310009156.1A CN103093529B (en) 2013-01-10 2013-01-10 The method of dynamic refresh data

Publications (2)

Publication Number Publication Date
CN103093529A true CN103093529A (en) 2013-05-08
CN103093529B CN103093529B (en) 2016-01-06

Family

ID=48206058

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310009156.1A Expired - Fee Related CN103093529B (en) 2013-01-10 2013-01-10 The method of dynamic refresh data

Country Status (1)

Country Link
CN (1) CN103093529B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106357438A (en) * 2016-09-06 2017-01-25 杭州迪普科技有限公司 Configuration switching method and configuration switching device
CN107085530A (en) * 2017-05-17 2017-08-22 武汉斗鱼网络科技有限公司 Refresh the method, device and mobile terminal of application interface
CN108769152A (en) * 2018-05-15 2018-11-06 阿里巴巴集团控股有限公司 Service flushing policy registration, service refresh requests method, apparatus and equipment
CN114546534A (en) * 2022-02-28 2022-05-27 百果园技术(新加坡)有限公司 Application page starting method, device, equipment and medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001014968A1 (en) * 1999-05-27 2001-03-01 Invensys Plc Fieldbus upgradable apparatus and method
CN1859461A (en) * 2005-11-09 2006-11-08 华为技术有限公司 Realtime refreshing method and system based shared parameter list
CN1869933A (en) * 2005-05-24 2006-11-29 中国银联股份有限公司 Computer processing system for implementing data update and data updating method
CN101026488A (en) * 2007-01-12 2007-08-29 华为技术有限公司 Method and system for realizing distributed data loading
CN101267441A (en) * 2008-04-23 2008-09-17 北京航空航天大学 A C/S and B/S mixed architecture pattern realization method and platform
CN101329685A (en) * 2008-07-30 2008-12-24 烽火通信科技股份有限公司 Implementing method of memory database on household gateway
CN101645306A (en) * 2008-08-08 2010-02-10 株式会社瑞萨科技 Control method for nonvolatile memory and semiconductor device
CN102314368A (en) * 2011-09-26 2012-01-11 贵阳朗玛信息技术股份有限公司 Method and equipment for updating configuration data of server program
CN102831223A (en) * 2012-08-23 2012-12-19 大唐移动通信设备有限公司 Management method and system of distributed databases

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001014968A1 (en) * 1999-05-27 2001-03-01 Invensys Plc Fieldbus upgradable apparatus and method
CN1869933A (en) * 2005-05-24 2006-11-29 中国银联股份有限公司 Computer processing system for implementing data update and data updating method
CN1859461A (en) * 2005-11-09 2006-11-08 华为技术有限公司 Realtime refreshing method and system based shared parameter list
CN101026488A (en) * 2007-01-12 2007-08-29 华为技术有限公司 Method and system for realizing distributed data loading
CN101267441A (en) * 2008-04-23 2008-09-17 北京航空航天大学 A C/S and B/S mixed architecture pattern realization method and platform
CN101329685A (en) * 2008-07-30 2008-12-24 烽火通信科技股份有限公司 Implementing method of memory database on household gateway
CN101645306A (en) * 2008-08-08 2010-02-10 株式会社瑞萨科技 Control method for nonvolatile memory and semiconductor device
CN102314368A (en) * 2011-09-26 2012-01-11 贵阳朗玛信息技术股份有限公司 Method and equipment for updating configuration data of server program
CN102831223A (en) * 2012-08-23 2012-12-19 大唐移动通信设备有限公司 Management method and system of distributed databases

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106357438A (en) * 2016-09-06 2017-01-25 杭州迪普科技有限公司 Configuration switching method and configuration switching device
CN106357438B (en) * 2016-09-06 2019-12-06 杭州迪普科技股份有限公司 Configuration switching method and device
CN107085530A (en) * 2017-05-17 2017-08-22 武汉斗鱼网络科技有限公司 Refresh the method, device and mobile terminal of application interface
CN108769152A (en) * 2018-05-15 2018-11-06 阿里巴巴集团控股有限公司 Service flushing policy registration, service refresh requests method, apparatus and equipment
CN108769152B (en) * 2018-05-15 2020-11-10 创新先进技术有限公司 Service refresh policy registration method, service refresh request method, device and equipment
CN114546534A (en) * 2022-02-28 2022-05-27 百果园技术(新加坡)有限公司 Application page starting method, device, equipment and medium
CN114546534B (en) * 2022-02-28 2023-11-24 百果园技术(新加坡)有限公司 Application page starting method, device, equipment and medium

Also Published As

Publication number Publication date
CN103093529B (en) 2016-01-06

Similar Documents

Publication Publication Date Title
CN103685459B (en) Distributed system, server computer, distributed management server and failure prevention method
US10091307B2 (en) Application management method and terminal
CN107479951B (en) Process control method and device, storage medium and electronic equipment
CN109918141A (en) Thread execution method, thread execution device, terminal and storage medium
CN107678907A (en) Database business logic monitoring method, system and storage medium
US20130055271A1 (en) Apparatus and method for controlling polling
CN105157294B (en) Control method and system for intelligent oil return of multi-split air conditioner and multi-split air conditioner system
CN103093529B (en) The method of dynamic refresh data
CN103995755A (en) Server optimizing method based on mobile terminal and server system
CN109783311A (en) Monitor processing method, device, equipment and the readable storage medium storing program for executing of breakpoint behavior
CN110502366A (en) Case executes method, apparatus, equipment and computer readable storage medium
CN107797859A (en) A kind of dispatching method of timed task and a kind of dispatch server
CN102377880A (en) Mobile phone and power saving method thereof
CN109857540A (en) Management method, device, terminal and the computer readable storage medium of server
CN112015169B (en) Method, device and equipment for monitoring and maintaining equipment running state of intelligent equipment box
CN108763046A (en) Thread operation and monitoring method, device, computer equipment and storage medium
CN105302702B (en) The detection method and device of terminal capabilities
US20220083416A1 (en) Multi-thread exit method and mobile terminal
US12008396B2 (en) Application state control method apparatus, and terminal and computer-readable storage medium
CN105930215A (en) Control method and control device for mobile terminal
CN105242836B (en) Menu display method and device
CN111104576A (en) Processing method, device and system for webpage identification and electronic equipment
CN101964922B (en) Abnormal condition capturing method and device
CN105930231B (en) Data back up method and system, data reconstruction method and system and mobile terminal
CN103618723A (en) Method and device for preventing looped network protocol message from attacking device CPU

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160106

Termination date: 20220110