Summary of the invention
In view of this, the application provides date storage method and device during a kind of Internet data center's inspection, energy
Enough in inspection device failure, the inspection data for being used for accident analysis are obtained.
In order to solve the above technical problems, the technical solution of the application is achieved in that
Data storage device during a kind of Internet data center's inspection, which includes: real-time timepiece chip, CAN
Data receiver circuit, 485 data receiver circuits, data storage processing device and storage unit;
The real-time timepiece chip, for starting timing after the write time;
The CAN data receiver circuit, for monitoring the bus data on CAN data/address bus;When monitoring bus data
When be sent to the data storage processing device;
485 data receiver circuit, for monitoring the bus data on 485 data/address bus;When monitoring bus data
When be sent to the data storage processing device;
The data storage processing device, for receiving the CAN data receiver circuit and/or 485 data receiver
When the bus data that circuit is sent, runing time is obtained from the real-time timepiece chip;And it by the bus data received and obtains
The storage unit is arrived in the runing time binding storage obtained.
Date storage method during a kind of Internet data center's inspection is applied on inspection device, this method comprises:
Receive the bus data and/or 485 data receiver circuit hair that the CAN data receiver circuit monitors
When the bus data sent, runing time is obtained from the real-time timepiece chip;And by the fortune of the bus data received and acquisition
The storage of row temporal binding.
A kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor
The step of date storage method during Internet data center's inspection is realized when execution.
As can be seen from the above technical solution, the data for increasing similar black box in the application in inspection device store dress
It sets, stores the data in CAN bus and 485 buses, and obtain the time of corresponding data, in inspection device failure, storage
Data will not lose.The program can obtain the inspection data for being used for accident analysis in inspection device failure.
Embodiment one
It is that data storage device is illustrated during Internet data center's inspection in the embodiment of the present application one referring to Fig. 1, Fig. 1
Figure.The device includes: that real-time timepiece chip, controller local area network (Controller Area Network, CAN) data connect
Receive circuit, 485 data receiver circuits, data storage processing device, storage unit, lithium battery and discharging management circuit;
Here data storage processing device is different from the processor of inspection device, and unrelated with the processor of inspection device,
It is to exist and the processor in black box.
Real-time timepiece chip, for the first time in use, needing that current time is written to real-time clock (RTC) chip;
Real-time timepiece chip starts timing after the write time.
CAN data receiver circuit, for monitoring the bus data on CAN data/address bus;The hair when monitoring bus data
Give the data storage processing device;
485 data receiver circuits, for monitoring the bus data on 485 data/address bus;The hair when monitoring bus data
Give the data storage processing device;
Data storage processing device cannot directly monitor the bus data in bus, pass through CAN data receiver circuit and 485
Data receiver circuit monitors bus data, and is sent to notebook data storage processor;
Data storage processing device receives the CAN data receiver circuit and/or 485 data receiver circuit is sent
Bus data when, obtain runing time from the real-time timepiece chip;And by the operation of the bus data received and acquisition
Temporal binding is stored to the storage unit.
When receiving CAN bus data, CAN bus data are bound into storage to storage with the runing time currently obtained
Unit;
When receiving 485 bus, 485 bus datas are bound into storage to storage list with the runing time currently obtained
Member;
When receiving 485 bus datas and CAN bus data simultaneously, by 485 bus datas and CAN bus data, with
And the runing time binding storage currently obtained is into storage unit.
Data to be stored are written in storage unit by data storage processing device by USB interface.
The data stored in storage unit will not lose because of place inspection device failure.
Data in storage unit can be read by other equipment.
Data storage device in the embodiment of the present application uses lithium battery power supply;
Discharging management circuit stops the lithium battery power supply when determining that there is power input in the external world, that is to say, that prevents lithium
Battery discharge.
When being implemented in the embodiment of the present application, also wrapped for data storage device during Internet data center's inspection
Crystal oscillator is included, for providing basic clock signal for the device.A usual system shares a crystal oscillator, keeps convenient for each section
It is synchronous.
Data storage device during Internet data center's inspection further include: battery capacity manages circuit, for managing
The electricity of lithium battery, in case lithium battery influences the data storage of the data storage device without electricity.
The unit of above-described embodiment can integrate in one, can also be deployed separately;It can be merged into a unit, it can also
To be further split into multiple subelements.
The data storage device for increasing similar black box in inspection device, stores the number in CAN bus and 485 buses
According to, and the time of corresponding data is obtained, in inspection device failure, the data of storage will not lose.The program can patrol
When examining equipment fault, the inspection data for being used for accident analysis are obtained.
Embodiment two
Data storage device in Fig. 1 can save power consumption, when not in use in a dormant state in order to save
Power consumption increases data decryptor wake-up circuit in Fig. 1, is specifically shown in Fig. 2, and Fig. 2 is the internet data in the embodiment of the present application two
Data storage device schematic diagram during the inspection of center.The device includes: real-time timepiece chip, CAN data receiver circuit, 485
Data receiver circuit, data storage processing device, storage unit, lithium battery, discharging management circuit and data decryptor wake up electricity
Road.
After increasing data decryptor wake-up circuit, only have an impact to the data storage processing device realization in Fig. 1, real-time clock
Chip, CAN data receiver circuit, 485 data receiver circuits, storage unit, lithium battery, the concrete function of discharging management circuit are equal
It with the function of being realized in Fig. 1, no longer describes one by one here, below for data decryptor wake-up circuit and data storage processor
Realization provides described below:
For the data storage procedure of data storage processing device:
Data storage processing device cannot directly monitor the bus data in bus, pass through CAN data receiver circuit and 485
Data receiver circuit monitors bus data, and is sent to notebook data storage processor;
Data storage processing device receives the CAN data receiver circuit and/or 485 data receiver circuit is sent
Bus data when, obtain runing time from the real-time timepiece chip;And by the operation of the bus data received and acquisition
Temporal binding is stored to the storage unit.
When receiving CAN bus data, CAN bus data are bound into storage to storage with the runing time currently obtained
Unit;
When receiving 485 bus, 485 bus datas are bound into storage to storage list with the runing time currently obtained
Member;
When receiving 485 bus datas and CAN bus data simultaneously, by 485 bus datas and CAN bus data, with
And the runing time binding storage currently obtained is into storage unit.
Data to be stored are written in storage unit by data storage processing device by USB interface.
The process switched between working condition and dormant state for data storage processing device is specific as follows:
Data decryptor wake-up circuit, data storage processing device in a dormant state when, if detecting on data/address bus has
Data then send wake-up signal to data storage processing device;
Data storage processing device, when receiving the wake-up signal that the data decryptor wake-up circuit is sent, from dormant state
It wakes up and enters working condition.
Data decryptor wake-up circuit is further used for when data storage processing device is in running order, if detecting number
According to no data in preset time in bus, then sleep signal is sent to data storage processing device;
Data storage processing device, when receiving the sleep signal that the data decryptor wake-up circuit is sent, from working condition
Suspend mode enters dormant state.
Data storage processing device is further used for when receiving sleep signal, sends the sleep signal to storage unit;
For sending the wake-up signal to storage unit when receiving wake-up signal;
Storage unit is further used for when receiving the sleep signal of data storage processing device transmission, from working condition
Suspend mode enters dormant state;When receiving the wake-up signal of data storage processing device transmission, is waken up from dormant state and enter work
Make state.
Storage unit is further used for that preset data removing window and preset data amount threshold value is arranged;If it is determined that current
The data volume of storage reaches preset data amount threshold value, and this unit is currently at working condition, then current time is starting point, will be pre-
If the data before data dump window are deleted.
When being implemented in the embodiment of the present application, also wrapped for data storage device during Internet data center's inspection
Crystal oscillator is included, for providing basic clock signal for the device.A usual system shares a crystal oscillator, keeps convenient for each section
It is synchronous.
Data storage device during Internet data center's inspection further include: battery capacity manages circuit, for managing
The electricity of lithium battery, in case lithium battery influences the data storage of the data storage device without electricity.
The unit of above-described embodiment can integrate in one, can also be deployed separately;It can be merged into a unit, it can also
To be further split into multiple subelements.
The data storage device for increasing similar black box in inspection device, stores the number in CAN bus and 485 buses
According to, and the time of corresponding data is obtained, in inspection device failure, the data of storage will not lose.The program can patrol
When examining equipment fault, the inspection data for being used for accident analysis are obtained.
And increases the working condition of data storage processing device and the switching of dormant state, power consumption can be saved.
Same inventive concept is based in the embodiment of the present application, it is also proposed that a kind of Internet data center's inspection is several in the process
According to storage method.
With reference to the accompanying drawing, data stored during Internet data center's inspection in detailed description the embodiment of the present application
Journey.
It is that data Stored Procedure is illustrated during Internet data center's inspection in the embodiment of the present application referring to Fig. 3, Fig. 3
Figure.Specific steps are as follows:
Step 301, data storage processing device receives the bus data that the CAN data receiver circuit monitors, and/or
When the bus data that 485 data receiver circuit is sent, runing time is obtained from the real-time timepiece chip.
Step 302, by the bus data received and the binding storage of the runing time of acquisition.
In order to save electric energy and power consumption, this method further comprises:
When in the sleeping state, it if detecting has data on data/address bus, is waken up from dormant state and enters work shape
State;
When in running order, if no data in preset time is detected on data/address bus, from working condition suspend mode
Into dormant state.
May include the suspend mode of data storage processing device and storage unit and the conversion of working condition when specific implementation:
Data decryptor wake-up circuit, data storage processing device in a dormant state when, if detecting on data/address bus has
Data then send wake-up signal to data storage processing device;
Data storage processing device, when receiving the wake-up signal that the data decryptor wake-up circuit is sent, from dormant state
It wakes up and enters working condition.
Data decryptor wake-up circuit is further used for when data storage processing device is in running order, if detecting number
According to no data in preset time in bus, then sleep signal is sent to data storage processing device;
Data storage processing device, when receiving the sleep signal that the data decryptor wake-up circuit is sent, from working condition
Suspend mode enters dormant state.
Data storage processing device is further used for when receiving sleep signal, and Xiang Suoshu storage unit sends the suspend mode
Signal;For when receiving wake-up signal, Xiang Suoshu storage unit to send the wake-up signal;
Storage unit is further used for when receiving the sleep signal of data storage processing device transmission, from working condition
Suspend mode enters dormant state;When receiving the wake-up signal of data storage processing device transmission, is waken up from dormant state and enter work
Make state.
Storage unit is further used for that preset data removing window and preset data amount threshold value is arranged;If it is determined that current
The data volume of storage reaches preset data amount threshold value, and this unit is currently at working condition, then current time is starting point, will be pre-
If the data before data dump window are deleted.
Lithium battery power supply is used in the embodiment of the present application;
When there is power input in the external world, stop the lithium battery power supply.
This power supply mode can save the electric energy of the lithium battery in data storage device.
In another embodiment, a kind of computer readable storage medium is additionally provided in the embodiment of the present application, is deposited thereon
Contain computer program, which is characterized in that the program realizes Internet data center's inspection process when being executed by processor
The step of middle date storage method.
When inspection device operation troubles, the data information of storage can be used for carrying out accident analysis.
Data supporting can be provided for inspection device operation troubles and failure responsibility judgment.
The data storage device for increasing similar black box in inspection device, stores the number in CAN bus and 485 buses
According to, and the time of corresponding data is obtained, in inspection device failure, the data of storage will not lose.The program can patrol
When examining equipment fault, the inspection data for being used for accident analysis are obtained.
And increases the working condition of data storage processing device and the switching of dormant state, power consumption can be saved.
The upper only presently preferred embodiments of the present invention, is not intended to limit the invention, all in spirit of the invention
Within principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the present invention.