Background technology
Since the self-information industry prosperity, people deepen day by day to the degree of dependence of computing machine, and are also more and more higher to the requirement of computer system stability.Influencing in the middle of computer stability all multifactor, power supply is a considerable ring.Cause data to run off or damage for fear of power interruption, common people can additionally be installed standby power supply additional for computer system, when primary power (for example commercial power supply) interrupts, can utilize standby power supply to take over the powered operation of primary power, allow computer system lose continuation running a period of time under the situation of primary power.
In computer system, and modal standby power supply and UPS (UninterruptiblePower Supply, UPS).UPS charge is high, if user's demand only is when power interruption, can utilize standby power supply and of short duration time (for example 15 to 20 seconds) in will be as yet not the data storage of storage get up and shut down then, UPS obviously wastes one's talent on a petty job.In other words, the user is the price that the demand that satisfies the level in spring has but been paid S-class, quite calculates.
Moreover the data processing method during the power supply aborted is to utilize standby power supply to keep System Operation earlier traditionally, and (or default unused time of standby power supply arrive after) just enters shutdown (shutdown) program with computer shutdown before standby power supply is depleted.These practices have a very big shortcoming, are just carrying out shutdown programm if primary power recovers when system exactly, system can be because shortcoming judges mechanism that whether primary power recovers can't Auto Power On; Though so the time primary power restoring electricity, system still can be compelled to shutdown.Again start need be carried out by the professional under server (server) environment, and is former for quite busy MIS people if all must ask the MIS personnel to handle boot program after each power interruption, is an extra work burden.Even if system is start again very successfully, but the operating environment that enters after the operating system is to return original state (initial state), but not the state before the power interruption, so the user opens each application program and associated profiles again arduously in regular turn, to be connected the preceding work of outage.
Lift a simple example, a station server is being managed the running of tens of personal computers in the computing machine classroom, and after the power interruption, server and all computing machines be shutdown automatically all.After primary power recovers, must finish loaded down with trivial details server opening program by the professional earlier, then each student hurries in separately computing machine is returned to the preceding situation of outage, inconvenience very.
Summary of the invention
In view of this, purpose of the present invention is exactly that a kind of data processing method with state recovery function is being provided, and can recover the duty before the computer circuit breaking behind telegram in reply automatically.
For reaching above-mentioned purpose of the present invention, the invention provides a kind of data processing method with state recovery function, be applicable to data processing equipment with a standby power supply, wherein data processing equipment has a storage device, when data processing equipment is the data processing equipment of original state at shutdown (shutdown) state, this method comprises the following steps: one, the step of primary power telegram in reply: a. data processing equipment judges whether the primary power supply is normal, if execution in step (b) then makes then if not that data processing equipment is an original state; B. data processing equipment is by carrying out Basic Input or Output System (BIOS) (Basic Input Output System), and data processing equipment judges whether there is an environmental parameter in the storage device, if then directly jump into execution in step d, then continues execution in step c if not; C. activation manipulation system (Operating System), and jump into execution in step e; Two, the step of monitoring primary power source de-energizes: d. is stored to the environmental parameter of storage device in the data processing equipment, the operating environment of operating system when making data processing equipment recovery primary power source de-energizes; E. data processing equipment is carried out this operating system; F. when the primary power supply failure, soon utilize standby power supply, data processing equipment is carried out one and is waited for step, and primary power does not recover normally then to jump into execution in step g yet when finishing as if waiting step, and primary power recovers then execution in step e in carrying out as if waiting step; G. the environmental parameter with the present Operational System Control environment of data processing equipment is stored in the storage device; And h. makes data processing equipment start shooting again (reboot), to carry out the step of primary power telegram in reply.
Moreover, the invention provides a kind of data processing equipment of tool state recovery function, comprising:
One standby power supply when the data processing equipment primary power source de-energizes is provided; One storage device is used to store an environmental parameter; One monitoring primary power source de-energizes program code is used for when the primary power supply failure, the environmental parameter of the Operational System Control environment that the storage data treating apparatus was carried out at that time, and data processing equipment started shooting again (reboot); One primary power telegram in reply program code is used for recovering supply when just often and again starting shooting when primary power, and the environmental parameter of storage device is stored in the data processing equipment, makes data processing equipment restore the operating environment of operating system when being primary power source de-energizes.
For above-mentioned purpose of the present invention, feature and advantage can be become apparent, a preferred embodiment cited below particularly, and cooperate appended accompanying drawing, elaborate.
Description of drawings
Fig. 1 shows a kind of data processing method process flow diagram with state recovery function according to a preferred embodiment of the present invention provided.
Fig. 2 shows the structural drawing of the data processing equipment with the inventive method.Among the figure
110 place the step of original state with data processing equipment
The normal determining step of 120 primary power supplies
130 activate the step of BIOS
Whether 140 storage devices the determining step of storage condition parameter
The step of 150 activation manipulation systems
155 store back the step of data processing equipment with environmental parameter
160 enter the step of operator scheme
170 primary powers interrupt changing the step of adopting the standby power supply power supply
180 carry out the step of wait routine
190 judge the step whether primary power recovers
The step of 195 storage condition parameters
197 steps of starting shooting again
200 data processing equipments
201 standby power supplies
203 storage devices
205 BIOS
207 operating systems
209 primary powers telegram in reply program code
211 monitoring primary power source de-energizes program codes
213 environmental parameters
215 wait routine codes
Embodiment
Method of the present invention can allow has no progeny in the primary power 300 (for example commercial power supply), data processing equipment 200 utilizes the extremely short time, to deposit in the storage device 203 corresponding to the environmental parameter 213 of present duty, the environmental parameter 213 of elder generation is read again after primary power 300 recovers, the situation before being used for recovering to cut off the power supply.Implement the data processing equipment 200 of the inventive method, its concrete example can be server or personal computer (personal computer, PC) etc.And the storage device 203 that the inventive method is utilized can be a hard disk (hard disk) etc.
Please refer to Fig. 1, a kind of data processing method process flow diagram with state recovery function that provides according to a preferred embodiment of the present invention has been provided for it.Before the start, in data processing equipment 200 was under the state of supplying without any power supply, the present invention claimed that the data processing equipment 200 under this state is in original state.Step 110 is carved at this moment and is not had any type of primary power supply for data processing equipment 200, for example civil power or be equal to the battery etc. of civil power status.The execution opportunity of step 120, be when data processing equipment 200 heavily gives start (reboot), or primary power 300 have the supply electric power in, step 120 in the stage data processing equipment 200 judge whether primary power 300 supply normal, if normal situation is failed in primary power 300 supply, represent that then data processing equipment 200 is by just entering into step 120 via step 197 start (reboot), this moment is still by standby power supply 201 power supplies, therefore with being about to the original state that data processing equipment 200 places step 110.If step 120 in the stage data processing equipment 200 judge that primary powers 300 supplies have been normal, then data processing equipment 200 enters step 130.Step 130 is primary power 300 normal power supply, and data processing equipment 200 carries out Basic Input or Output System (BIOS) 205 (Basic Input Output System, activation BIOS).Step 140 is for after being finished of BIOS 205, and data processing equipment 200 judges that whether storage device 203 has the preceding environmental parameter 213 of cutting off the power supply, if then jump into to step 155, then continues execution in step 150 if not.Step 150 be data processing equipment 200 activation manipulation systems (Operating System, OS) 207, the Windows of Microsoft (Microsoft) for example, operating system 207 just then enters step 160 after activating and finishing.Step 155 is read environmental parameter 213 and is stored back data processing equipment 200 again from storage device 203.Step 160 is data processing equipment 200 executive operating systems 207, the data processing equipment 200 of this moment is carried out types of applications on operating system platform, at the data processing equipment 200 of step 160, represent that it enters operator scheme (operating mode, or runtime mode).
Step 170 is when primary power 300 supply failuries, and data processing equipment 200 soon adopts standby power supply 201 power supplies, and this standby power supply 201 is as dry cell, lithium battery or Ni-MH battery etc.When data processing equipment 200 adopts standby power supply 201 power supplies, data processing equipment 200 can be carried out the step 180 of a wait program, whether and step 180 is to allow 200 idle for example 15 seconds stand-by period of data processing equipment, really interrupt to determine primary power 300 supplies.When data processing equipment 200 was carried out wait routine step 180, data processing equipment 200 can judge constantly that whether primary power 300 supplies recover, and are step 190.If wait routine primary power 300 when carrying out recovers, then data processing equipment 200 promptly is back to the operator scheme of step 160, and primary power 300 does not recover yet when finishing as if wait routine, and then execution in step 195.The setting that it should be noted that the stand-by period can be according to the decision of the capacity of standby power supply 201, and with the kind of above-mentioned standby power supply 201, having no progeny in primary power 300, will to allow data processing equipment 200 continue operation 15 to 20 seconds be absolute feasible.
Primary power 300 does not recover yet if wait routine finishes the back, 200 execution in step 195 of data processing equipment, it deposits present environmental parameter 213 in the storage device 203 in, environmental parameter 213 reflects the operating environment of present data processing equipment 200 with loyalty, has for example opened which archives or has carried out which application program etc.After treating that environmental parameter 213 storages finish, data processing equipment 200 execution in step 197 are started shooting data processing equipment 200 (reboot) again, and get back to step 120 and carry out.
After the above-mentioned exposure of the present invention explanation, the inventive method principle can be divided into the step of primary power telegram in reply and the step of monitoring primary power source de-energizes, and primary power telegram in reply step mainly includes step 110, step 120, step 130, step 140, step 155 etc.; And monitoring primary power source de-energizes step mainly includes step 160, step 170, step 180, step 190, step 195, step 197 etc.
Because the present invention stores the back that finishes in environmental parameter 213 to carry out the action of start (reboot) again, rather than shutdown (shutdown), whole electric power is cut off fully, therefore data processing equipment 200 is if lucky primary power 300 recovers when carrying out again boot program, then step 120 can be judged and have primary power 300 supplies at this moment and carry out boot program automatically, can be by force with data processing equipment 200 shutdown.On the other hand, again data processing equipment 200 can not be in original state if primary power 300 recovers then yet after the start, data processing equipment 200 can enter the start flow process automatically when primary power 300 recovers, do not need operating personnel to utilize manual mode power-on, therefore data processing equipment 200 can be started shooting in the very first time that restores electricity, and ageing ratio was better in the past.
As indicated above, to have no progeny in the primary power 300 if do not recover yet through a wait program, 200 of data processing equipments can be stored in environmental parameter 213 in the storage device 203.Under these situations after primary power 300 restores electricity, just can judge when boot program proceeds to step 140 and have environmental parameter 213 in the storage device 203.The flow process of starting shooting this moment can execution in step 150, but execution in step 155, and utilizes the operating environment of environmental parameter 213 restoring data treating apparatus 200, and to reply the state before the outage, convenience more significantly promotes.
The more important thing is, utilize state recovery function of the present invention, can simplify complicated shutdown programm, as long as the inventive method is write (coding) in BIOS 205 with software realization means, or utilize the application program under the operating system 207 to realize it, can significantly simplify boot program.For instance, the workplace that has many computing machines in big office or computing machine classroom etc., if every computing machine all can be supported the data processing method of tool state recovery function of the present invention, when the user leaves after, need only general supply cut away just and can close all computing machines.When treating down less important start as long as general supply is opened, can be simultaneously with all computer bootings, every computing machine all returns to the state before the shutdown automatically then, and is very convenient.Certainly, the scope of application of the present invention is not limited to the occasion of multi-section computing machine, is in to use to have so convenience equally.If user's computing machine is supported this data processing method, as long as in computing machine, be equipped with a standby power supply (for example dry cell), just can be when primary power recovers Auto Power On and enter the operating system recovery outage before state, convenience is splendid.
Fig. 2 shows the Organization Chart of the data processing equipment with the inventive method.The data processing equipment 200 of tool state recovery function of the present invention includes the standby power supply 201 when 300 outages of data processing equipment 200 primary powers are provided; Storage device 203 is a storage condition parameter 213; Monitoring primary power source de-energizes program code 211 is used for when primary power 300 supply failuries, the environmental parameter 213 of operating system 207 operating environments that storage data treating apparatus 203 was carried out at that time, and with data processing equipment 200 start shooting again (reboot); Primary power telegram in reply program code 209, be used for when primary power 300 recovery supplies just often and are again started shooting, the environmental parameter 213 of storage device 203 is stored in the data processing equipment 200 operating environment of operating system 207 when making data processing equipment 200 recoveries for primary power 300 outages.Moreover data processing equipment 200 further comprises wait routine code 215, and it is used to make data processing equipment 200 idle first-class to treat the time, whether has really accused interruption to determine primary power 300 supplies.
The present invention is in the setting (BIOS Setup) of the BIOS 205 of data processing equipment 200, can cooperate this parameter setting of POWER LOSE is become Auto Power On, thus, in a single day data processing equipment 200 just can restore automatically when primary power 300 incoming calls and be original operating environment.Perhaps a little modification is done on the power supply line road of data processing equipment 200, made it possible to just trigger data treating apparatus 200 activating powers start automatically when primary power 300 incoming calls.In view of the above, arrange in pairs or groups civil power incoming call of the present invention activates the mechanism of mains supply automatically, and its effect more brings out the best in each other.
The disclosed data processing method with state recovery function of the above embodiment of the present invention has the following advantages at least:
1. restored electricity when avoiding primary power to carry out shutdown programm in system, computing machine is still shutdown but.
2. primary power recovers back computing machine Auto Power On soon, and is ageing good.
3. promptly recover the preceding mode of operation of outage behind the computer booting automatically, convenience more greatly improves.
4. computing machine only need be equipped with general battery and can support data processing method of the present invention, saves the huge expense that is equipped with UPS, and economic benefit is very outstanding.
5. can utilize general supply to close many computing machines simultaneously, and when opening, general supply simultaneously all computer bootings are also replied the preceding state of shutdown, not only can effectively avoid the data that primary power interrupts suddenly being caused to run off, more can avoid by platform start, shutdown trouble, simplify start, shutdown process, convenience is splendid.
In sum; though the present invention discloses as above with a preferred embodiment; right its is not in order to limit the present invention; anyly have the knack of this operator; without departing from the spirit and scope of the present invention; when can doing various changes and retouching, thus protection scope of the present invention with accompanying claim the person of being defined be as the criterion.