Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer; To combine the accompanying drawing in the embodiment of the invention below; Technical scheme in the embodiment of the invention is carried out clear, intactly description; Obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Embodiment one:
As shown in Figure 1, the method for power failure of equipment of the embodiment of the invention can may further comprise the steps:
Step S102: when device looses power, start standby power supply to this power devices;
In embodiments of the present invention, standby power supply can be a battery etc.; Can trigger by central processor CPU and start standby power supply to this power devices.
Step S104: under the standby power supply powering mode, the data of writing buffer memory CACHE are separated on physical aspect with the data of reading buffer memory CACHE with mirror image data respectively.
In embodiments of the present invention, the data among the buffer memory CACHE generally can be divided into write CACHE, to the plate mirror image with read three parts of CACHE.Such as this device A, two memory bars of B are arranged, data and the mirror image data of writing buffer memory CACHE before the power down are stored among the memory bar A, and the data storage of reading buffer memory CACHE is in memory bar B; After the power down, then will write the data of buffer memory CACHE and separate, mirror image data will be moved among the memory bar B, and make the data of writing buffer memory CACHE be stored in separately among the memory bar A with mirror image data.
Step S106: under the standby power supply powering mode, the said data of writing buffer memory CACHE are carried out safe protection treatment.
In this step, safe protection treatment can be under the standby power supply powering mode the said data of writing buffer memory CACHE to be write proof box, perhaps can be that following of standby power supply powering mode refreshes the said data of writing buffer memory CACHE automatically.The data of writing buffer memory CACHE such as being stored in separately among the memory bar A write proof box, perhaps only the data of writing buffer memory CACHE that are stored in separately among the memory bar A are refreshed automatically, reach the effect of power saving thus.
Further, as shown in Figure 2, in embodiments of the present invention, before step S104, can also comprise:
Step 202: under the standby power supply powering mode, the data in the internal memory are distinguished according to the data of writing buffer memory CACHE, mirror image data and the data of reading buffer memory CACHE.
Data among the buffer memory CACHE generally can be divided into write CACHE, to the plate mirror image with read three parts of CACHE.This three part possibly not be separated from each other on the physical store before separating on the physical aspect.Can this three partial datas identification be made a distinction through step 202.
Further, as shown in Figure 3, in embodiments of the present invention, after step S104, can also comprise:
Step S302: mirror image data and the data of reading buffer memory CACHE are merged on physical aspect.
The equipment of the embodiment of the invention can be: computing machine, server, switch, router, base station, memory device, gateway, terminal etc.
Embodiment of the invention method can be adjusted each sequence of steps according to actual needs.
Through the embodiment of the invention, the total power consumption of internal memory in the time of can reducing device looses power, the charging time of raising standby power supply reduces cost.
Embodiment two:
As shown in Figure 4, the embodiment of the invention a kind of electronic equipment is provided, can comprise:
Standby power supply 402 is used for when device looses power, this equipment being supplied power;
Data separating unit 404 is used for when device looses power, under the standby power supply powering mode, the data of writing buffer memory CACHE is separated on physical aspect with the data of reading buffer memory CACHE with mirror image data respectively;
Write data cached protected location 406, be used under the standby power supply powering mode, the data of writing buffer memory CACHE are carried out safe protection treatment.
Writing data cached protected location execution safe protection treatment specifically can be under the standby power supply powering mode; The said data of writing buffer memory CACHE are write proof box; Perhaps, can be under the standby power supply powering mode, the said data of writing buffer memory CACHE are refreshed automatically.
Further, as shown in Figure 5, alternatively, this electronic equipment can also comprise:
Discrimination unit 502 is used under the standby power supply powering mode, and the data in the internal memory are distinguished according to the data of writing buffer memory CACHE, mirror image data and the data of reading buffer memory CACHE; After data, the mirror image data of writing buffer memory CACHE and the data of reading buffer memory CACHE were distinguished, the trigger data separative element separated data.
Further, as shown in Figure 6, alternatively, this electronic equipment can further include:
Detection of power loss unit 602 is used for whether power down detects to this equipment, when detecting this device looses power, starts standby power supply, triggers said separative element 404, and perhaps the trigger region subdivision 502.
The equipment of the embodiment of the invention can be: computing machine, server, switch, router, base station, memory device, gateway, terminal etc.
Each unit of the embodiment of the invention can be integrated in one, and also can separate deployment.Said units can be merged into a unit, also can further split into a plurality of subelements.
Through the embodiment of the invention, the total power consumption of internal memory in the time of can reducing device looses power, the charging time of raising standby power supply reduces cost.
Embodiment three:
The embodiment of the invention provides a kind of network system, and is as shown in Figure 7, and this network system can comprise: computing machine 701, router 702, server 703 and memory device 704.In network system shown in Figure 7, any one electronic equipment in computing machine 701, router 702, server 703 and the memory device 704 can comprise: standby power supply, data separating unit and write data cached protected location.Wherein the effect of each unit and embodiment two are similar, no longer are repeated in this description here.
Those skilled in the art can set up other electronic equipments such as switch, base station in network system shown in Figure 7, and any one the electronic equipment of setting up can comprise standby power supply, data separating unit and write data cached protected location etc.
Each unit of embodiment of the invention system can be integrated in a device, also can be distributed in multiple arrangement.Said units can be merged into a unit, also can further split into a plurality of subelements.
A kind of method of power failure of equipment, electronic equipment and network system that the embodiment of the invention proposes; Through starting standby power supply to this power devices; The data of writing buffer memory CACHE are separated on physical aspect with the data of reading buffer memory CACHE with mirror image data respectively, the said data of writing buffer memory CACHE are carried out safe protection treatment, the total power consumption of internal memory in the time of can reducing device looses power; Improve the charging time of standby power supply, reduce cost.
The unit and the algorithm steps of each example of describing in conjunction with embodiment disclosed herein; Can realize with electronic hardware, computer software or the combination of the two; For the interchangeability of hardware and software clearly is described, the composition and the step of each example described prevailingly according to function in above-mentioned explanation.These functions still are that software mode is carried out with hardware actually, depend on the application-specific and the design constraint of technical scheme.The professional and technical personnel can use distinct methods to realize described function to each certain applications, but this realization should not thought and exceeds scope of the present invention.
The software module that the method for describing in conjunction with embodiment disclosed herein or the step of algorithm can use hardware, processor to carry out, perhaps the combination of the two is implemented.Software module can place random access memory (RAM), internal memory, ROM (read-only memory) (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or the storage medium of other form arbitrarily.
The above only is an embodiment of the present invention; Should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; Can also make some improvement and retouching, these improvement and retouching also should be regarded as protection scope of the present invention.