A kind of running state of single plate is carried out method of data backup and device thereofTechnical field
The present invention relates to the data backup technology in the embedded system, particularly relate to and a kind of running state of single plate is carried out method of data backup and device thereof.
Background technology
Along with the rapid growth of market to the data business demand, be embedded in SDH (Synchronous DigitalHierarchy, SDH (Synchronous Digital Hierarchy)) the data veneer of transmission equipment is used more and more widely, the data veneer is later with respect to the time that common SDH veneer comes out, its consensus standard does not also have full maturity, upgrade than very fast, the data veneer that causes developing often faces the demand of renewal, and its stability does not have SDH veneer height.When experiment test, if veneer breaks down, the developer can directly follow the tracks of the veneer operation, searches failure cause.After product beginning, if veneer breaks down, the developer comes the analyzing and diagnosing fault according to user's description often.Because the complexity of data product, the investigation of a fault can relate to a large amount of state informations, and for example whether the configuration of certain register is correct, and whether the state of certain agreement is normal etc.These inner information are elusive often concerning the user, so be difficult to reach the purpose of investigating thoroughly fault by consumer-oriented mode.
Application number be 200610107843 Chinese patent application file " a kind of system and method that improves single-board exception handling ability " and in, also mentioned the method that the veneer data are backed up.This invention has mainly been described by down trigger module monitors CPU (veneer processor) reset mode, sends interrupt signal before cpu reset, and veneer receives the laggard line data backup of interrupt signal.
Analyze the realizability of this invention, give reset circuit if CPU sends reset signal, then system has probably occurred unusually, even at this moment send interrupt signal to CPU, CPU may also can't handle, and the veneer abnormal information also can't record; If it is unusual that CPU does not occur, then may only be send reset signal the time delayed slightly some, resetting can not appear in system, at this moment sends the effect that interrupt signal does not have recording exceptional information when resetting yet to CPU, therefore the situation that can break down and can't accurately locate.
Summary of the invention
Technical problem to be solved by this invention is to provide a kind of running state of single plate is carried out method of data backup and device thereof, is used for the running status and the fault message of remote analysis veneer, thereby realizes fault location.
To achieve these goals, the invention provides and a kind of running state of single plate is carried out method of data backup, it is characterized in that, comprising:
Step 1 is provided for depositing the memory cell of the running state of single plate information that needs backup on described veneer;
Step 2 is set the running state of single plate information that needs backup, gathers described running state of single plate information that need back up and dump in described memory cell; And
Step 3 uploads to the information of dump on the background terminal, by described background terminal the information of uploading is analyzed, to realize the fault location to described veneer.
Described running state of single plate is carried out method of data backup, wherein, in the describedstep 1, further comprise: described memory cell is divided into N independently piece, by the described step that needs the running state of single plate information of backup that each piece storage is once collected, wherein N is a natural number.
Described running state of single plate is carried out method of data backup, wherein, in the described step 2, further comprise: the step of setting the running state of single plate information of described needs backup according to the characteristic and/or the user's request of described veneer.
Described running state of single plate is carried out method of data backup, wherein, in the described step 2, the described running state of single plate information of backup that needs comprises: in the version of veneer collocation information, single board state information, veneer and running time information, board alarm information, the operation system information one or multinomial.
Described running state of single plate is carried out method of data backup, wherein, in the described step 2, acquisition mode is gathered the described step that needs the running state of single plate information of backup during with timing acquiring mode or dump; When the described running state of single plate information that need back up is the information of conversion in time, when gathering in described timing acquiring mode, or when the described running state of single plate information that needs backup be single board edition or running time during information, acquisition mode is gathered during with described dump.
Described running state of single plate is carried out method of data backup, wherein, in the described step 2, further comprise: described dump operation triggers with one of following condition:
Trigger dump operation during by the described veneer of reset key hard reset; Or
The user triggers dump operation when described veneer is issued the hard reset indication; Or
The user triggers dump operation when described veneer is issued the warm reset indication; Or
Described veneer triggers dump operation after receiving the dump request that the user issues; Or
Mode with aborted when described board software is unusual triggers dump operation.
Described running state of single plate is carried out method of data backup, wherein, in the described step 3, further comprises: the information of dump is uploaded on the described background terminal one of as follows:
When the user issues query requests, be saved on the described background terminal from the described running state of single plate information that need back up of described memory cell collection and as file; Or
When described memory cell for can plug chip the time, then obtain the information of described cell stores and be saved in the file by chip burner.
Described running state of single plate is carried out method of data backup, wherein, in the described step 3, further comprise: the step that described background terminal is analyzed described information according to the script file of different veneer correspondences.
To achieve these goals, the present invention also provides a kind of device that running state of single plate is carried out data backup, comprises veneer, background terminal, it is characterized in that, also comprises:
Memory cell is arranged on the described veneer, is used to deposit the running state of single plate information of needs backup;
The information setting module connects described veneer, is used to set the running state of single plate information of needs backup;
Information acquisition module connects described veneer, described information setting module, is used to gather the running state of single plate information of described needs backup;
The storage dump module connects described memory cell, described information acquisition module, and the storage dump that is used for gathering is in described memory cell; And
The information upload module connects described storage dump module, is used for information with dump and is uploaded to described background terminal and analyzes.
The described device that running state of single plate is carried out data backup wherein, also comprises: the information analysis module, be arranged on the described background terminal, and be used for the information of uploading is analyzed, to realize fault location to described veneer.
Useful technique effect of the present invention is:
Adopt the present invention running state of single plate information to be noted, help remote analysis running state of single plate and fault message, thereby make things convenient for the fault location of veneer in the various suitable moment.
Describe the present invention below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
Description of drawings
Fig. 1 is that the present invention carries out the method for data backup flow chart to running state of single plate information;
Fig. 2 is the principle schematic that hard reset of the present invention triggers the single board information backup;
Fig. 3 is the present invention carries out data backup to running state of single plate information a structure drawing of device.
Embodiment
Below in conjunction with the drawings and specific embodiments technical scheme of the present invention is made further more detailed description.
As shown in Figure 1, be that the present invention carries out the method for data backup flow chart to running state of single plate information, Fig. 2 is the principle schematic that hard reset of the present invention triggers the single board information backup.This flow process has been described the process of running state of single plate being carried out data backup, and in conjunction with Fig. 2, this process specifically comprises the steps:
Step 101 is provided with a zone as memory space on veneer, be used to deposit running state of single plate information;
In this step, memory space can be divided into natural number N independently piece, the once complete backup information of each piece storage, and this memory space can be stored N time backup information as required.
Backup information comprises in the information such as veneer collocation information, single board state information, board alarm information, operation system information one or multinomial.
Step 102, definition needs the content of the running state of single plate information of backup, and the information content can define arbitrarily according to veneer characteristic and/or user's request.
Step 103 is gathered the running state of single plate information of needs backup, and collection can be adopted following dual mode, but is not limited to this two kinds of formulas.
A1) timing acquiring mode
This mode is for some state informations, because change at any time, so need regularly gather; The collection of this mode can be finished in timed task, and the information of collection temporarily is kept in the internal memory.
A2) acquisition mode during dump
This mode for example single board edition, running time etc., is gathered when needs dump information for some relatively more fixing information again, to save the consumption of CPU.
Step 104 is carried out dump to the running state of single plate information that the needs of gathering back up;
In this step, can trigger the dump operation of running state of single plate information, specifically comprise by multiple condition:
Trigger dump operation during b1) by reset key hard reset veneer;
Trigger dump operation when b2) user issues the hard reset indication to veneer;
B3) veneer triggers dump operation after receiving the dump request that the user issues;
Trigger dump operation when b4) user issues the warm reset indication to veneer;
Adopt the mode of aborted to trigger dump operation when b5) board software is unusual.
Among Fig. 2, afterlogical circuit 21 is received the hard reset pulse signal, at first send interrupt signal to CPU20, trigger CPU20 and carry out data backup, and then send reset signal to resetcircuit 23,23 couples of CPU20 reset by reset circuit.
Step 105 uploads to the information of dump on the PC of backstage, the information of dump the mode on the PC of backstage of being delivered to be can be following several a kind of:
When c1) user issues query requests, be saved on the PC of backstage being used as file in the backup information collection on the veneer;
C2), then can the information in the chip be obtained and be saved in the file by chip burner if the chip of stored information is pluggable on the veneer.
Step 106 is analyzed for the backup information that is stored on the PC.
The critical data backup of adopting said method to realize is implemented in a plurality of data veneers.
In the foregoing description, running state of single plate is carried out method of data backup can single board state information be noted, thereby help the positioning analysis of single board default in the various suitable moment.
In the foregoing description, write down the veneer abnormal information in due course, the moment of record single board information can be hard reset, warm reset, exceptional reset, several situations of user instruction; This method has also been described the mode of single board information backup and the mode of analysis simultaneously, is a complete solution that improves single-board exception handling ability.
As shown in Figure 3, be the present invention carries out data backup to running state of single plate information structure drawing of device.Thisdevice 300 can carry out data backup to running state of single plate information, compriseveneer 30,backstage PC 40, also comprise:memory cell 31,information setting module 51,information acquisition module 52,storage dump module 53, information uploadmodule 54,information analysis module 41.
Memory cell 31 is arranged on theveneer 30, and the pluggable FLASH chip that is a 512K size is as memory space, and this FLASH chip is divided into 6 independently pieces when software is realized, every block size 64K, the information of depositing once to be collected.
Information setting module 51 is used to define the running state of single plate information that needs back up, and this information comprises: information, the alarm performance information of veneer, operating system relevant informations such as the version of veneer collocation information, single board state information, veneer and running time.
Information acquisition module 52 connectsveneer 30,information setting module 51, is used for the running state of single plate information of needs backup is gathered, and temporarily is kept in the internal memory.
Storage dump module 53 connectsmemory cell 31,information acquisition module 52, and the running state of single plate information that the needs that are used for collecting back up is carried out dump, leaves in thememory cell 31;
The condition thatstorage dump module 53 triggers dumps comprises: the user by network management system to veneer issue dump command/request back operation, user operation when veneer being issued the hard reset indication by network management system, the user operates when by network management system veneer being issued the warm reset indication, the user operates during by the reset key Reset Board.
Information uploadmodule 54, linkinformation dump module 53 is used for by query manipulation the single board backup information of dump being uploaded to backstage PC40.
Information analysis module 41, be arranged on the PC40 of backstage, be used for providing specific script file, and single board information analyzed according to script file and backup file to different veneers, analysis result shows the user with the form of form, thereby realizes the fault location to veneer 30.
The present invention helps remote analysis running state of single plate and fault message, makes things convenient for fault location.When veneer normally moves, some useful state informations are stored, when veneer breaks down, the user is saved in the file by the running state information of simple method with veneer, file is sent to the developer, the developer can be in lab analysis veneer ruuning situation at that time, thereby make things convenient for fault location.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.