CN109213635B - Damaged data table repairing method and system of wave recording device - Google Patents

Damaged data table repairing method and system of wave recording device Download PDF

Info

Publication number
CN109213635B
CN109213635B CN201811058746.2A CN201811058746A CN109213635B CN 109213635 B CN109213635 B CN 109213635B CN 201811058746 A CN201811058746 A CN 201811058746A CN 109213635 B CN109213635 B CN 109213635B
Authority
CN
China
Prior art keywords
file
data
damaged
data table
wave recording
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.)
Active
Application number
CN201811058746.2A
Other languages
Chinese (zh)
Other versions
CN109213635A (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.)
Xuji Group Co Ltd
XJ Electric Co Ltd
Xuchang XJ Software Technology Co Ltd
Original Assignee
Xuji Group Co Ltd
XJ Electric Co Ltd
Xuchang XJ Software Technology 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 Xuji Group Co Ltd, XJ Electric Co Ltd, Xuchang XJ Software Technology Co Ltd filed Critical Xuji Group Co Ltd
Priority to CN201811058746.2A priority Critical patent/CN109213635B/en
Publication of CN109213635A publication Critical patent/CN109213635A/en
Application granted granted Critical
Publication of CN109213635B publication Critical patent/CN109213635B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a system for repairing a damaged data table of a wave recording device, wherein an automatic backup module in the system backs up correct configuration data and wave recording constant value data, before the wave recording device accesses the configuration data and the constant value data, an automatic restoration module is called firstly, the automatic restoration module detects whether the current configuration and constant value data table is damaged or not, if the current configuration and constant value data table is damaged, a damaged table file is backed up firstly so as to be convenient for later analysis, and then the damaged data table is restored by using the backed up correct data, so that the wave recording device can be ensured to acquire the correct data. The invention uses the automatic backup and automatic restoration method, solves the problem that the device can not normally operate because the data sheet of the wave recording device is damaged, greatly reduces the probability of misjudgment of the wave recording device because of data error, and improves the robustness of the wave recording device.

Description

Damaged data table repairing method and system of wave recording device
Technical Field
The invention belongs to the technical field of power engineering, and particularly relates to a method and a system for repairing a damaged data table of a wave recording device.
Background
The wave recording device is a main device in the intelligent substation, the fault wave recording data is a main basis for diagnosing the nature and the cause of faults in the intelligent substation, and the wave recording device has great reference value for improving the safety of a power grid and optimizing the quality of electric energy. Therefore, the robustness of the recording apparatus is particularly important.
The engineering configuration data and the fixed value data are main input conditions of a fault criterion algorithm of the wave recording device, if the engineering configuration is wrong, the wave recording device cannot normally operate and monitor information according to engineering requirements, if the wave recording fixed value is wrong, a fault criterion module carries out wave recording criterion analysis or fault diagnosis according to wrong information input, and a wrong result is necessarily output. Therefore, the accuracy of data such as recording fixed values and engineering configuration is an important factor influencing the robustness of the recording device.
The project configuration data and the recording fixed value data of the current wave recording device are generally stored in a database mode, such as a Mysql database, and in the debugging or running process of the wave recording device, if events such as forced power failure or abnormal shutdown of database service occur, a configuration and fixed value data table may be damaged, so that the wave recording device cannot run normally, and potential hazards are caused to safe running of a power grid.
Disclosure of Invention
The invention aims to provide a method and a system for repairing a damaged data table of a wave recording device, which are used for solving the problem that the wave recording device cannot normally operate after the data table is damaged.
In order to achieve the above object, the present invention provides a method for repairing a damaged data table of a wave recording device, comprising the following steps:
1) acquiring engineering configuration data and wave recording fixed value data of a wave recording device, and storing the engineering configuration data and the wave recording fixed value data into corresponding data tables;
2) and backing up each data table into a file with a corresponding set format, checking whether each data table is damaged or not when accessing the data tables, and replacing the original file in the corresponding data table with the backup file if the data table is damaged.
The method comprises the steps of backing up correct configuration data and wave recording fixed value data, detecting whether a current configuration and fixed value data table is damaged or not by a wave recording device before accessing the configuration data and the fixed value data, firstly backing up a damaged table file if the current configuration and fixed value data table is damaged so as to be convenient for later analysis, and then restoring the damaged data table by using the backed up correct data so as to ensure that the wave recording device can acquire correct data. The invention uses the automatic backup and automatic restoration method, solves the problem that the device can not normally operate because the data sheet of the wave recording device is damaged, greatly reduces the probability of misjudgment of the wave recording device because of data error, and improves the robustness of the wave recording device.
In order to solve the problem that the backup file is damaged or the original data cannot be restored, after each data table is backed up to be a file with a corresponding set format, each file is compressed to be a compressed file with the same name, if the data table is damaged and the backup file of the data table is lost or damaged, the compressed file with the same name is decompressed to be the file with the set format, and the decompressed file replaces the original file.
In order to meet the requirements of the data format of the wave recording device, all the data tables are backed up to be files in an sql format.
In order to provide a judgment basis for judging whether the data tables are damaged, after all the data tables are backed up to be files in an sql format, check codes of all the sql files are calculated, and the check codes obtained through calculation are recorded in a check code file.
In order to judge whether the data tables are damaged, the process of checking whether each data table is damaged is as follows: and exporting the sql file of the current data table, calculating the check code of the sql file, verifying the consistency of the check code and the check code recorded in the check code file, if the check code is inconsistent with the check code, indicating that the data table is damaged, otherwise, indicating that the data table is not damaged.
The invention also provides a system for repairing the damaged data table of the wave recording device, which comprises a data processing module, an automatic backup module and an automatic recovery module, wherein the data processing module is used for acquiring the engineering configuration data and the wave recording fixed value data of the wave recording device and storing the engineering configuration data and the wave recording fixed value data into the corresponding data table; the automatic backup module is used for backing up each data table into a file with a corresponding set format; the automatic restoration module is used for checking whether each data table is damaged or not when accessing the data tables, and replacing the backup files with the original files in the corresponding data tables if the data tables are damaged.
The automatic backup module of the repair system backs up correct configuration data and wave recording fixed value data, the wave recording device calls the automatic recovery module before accessing the configuration data and the fixed value data, the automatic recovery module detects whether a current configuration and fixed value data table is damaged or not, if the current configuration and fixed value data table is damaged, a damaged table file is backed up firstly so as to be convenient for later analysis, and then the damaged data table is recovered by using the backed-up correct data, so that the wave recording device can acquire correct data. The invention uses the automatic backup and automatic restoration method, solves the problem that the device can not normally operate because the data sheet of the wave recording device is damaged, greatly reduces the probability of misjudgment of the wave recording device because of data error, and improves the robustness of the wave recording device.
In order to solve the problem that the backup file is damaged or the original data cannot be restored, the automatic backup module compresses each file into a compressed file with the same name after backing up each data table into a file with a corresponding set format, decompresses the compressed file with the same name into the file with the set format if the data table is damaged and the backup file of the data table is lost or damaged, and replaces the original file with the decompressed file.
In order to meet the requirement of the data format of the wave recording device, the automatic backup module backs up all the data tables into files in the sql format.
In order to provide a judgment basis for judging whether the data tables are damaged, after all the data tables are backed up to be files in an sql format, check codes of all the sql files are calculated, and the check codes obtained through calculation are recorded in a check code file.
In order to judge whether the data tables are damaged, the process of checking whether each data table is damaged is as follows: and exporting the sql file of the current data table, calculating the check code of the sql file, verifying the consistency of the check code and the check code recorded in the check code file, if the check code is inconsistent with the check code, indicating that the data table is damaged, otherwise, indicating that the data table is not damaged.
Drawings
FIG. 1 is a backup flow diagram of an automatic backup module of the present invention;
fig. 2 is a schematic flow chart of a method for repairing a damaged data table of a wave recording apparatus according to the present invention.
Detailed Description
The following further describes embodiments of the present invention with reference to the drawings:
the invention provides a damaged data table repairing system of a wave recording device, which comprises a data processing module, an automatic backup module and an automatic restoration module, wherein the data processing module is used for acquiring engineering configuration data and wave recording fixed value data of the wave recording device and storing the engineering configuration data and the wave recording fixed value data into corresponding data tables; the automatic backup module is used for backing up each data table into a file with a corresponding set format; the automatic restoration module is used for checking whether each data table is damaged or not when accessing the data tables, and replacing the backup files with the original files in the corresponding data tables if the data tables are damaged.
In order to avoid the situation that the backup file is damaged or does not exist, the automatic backup module of this embodiment compresses each file into a compressed file with the same name after backing up each data table into a file with a corresponding set format, decompresses the compressed file with the same name into a file with a set format if the data table is damaged and the backup file of the data table is lost or damaged, and replaces the decompressed file with the original file in the corresponding data table.
Specifically, the invention provides a method for repairing a damaged data table of a wave recording device based on the system, which comprises the following steps:
1. the data processing module collects engineering configuration data and wave recording fixed value data, the collected engineering configuration data and the wave recording fixed value data are stored in a database, the database comprises a plurality of data tables, the database service used by the wave recording device is mysql, and the data table engine is MyISAM. The engineering configuration data includes: the method comprises the following steps of (1) transformer substation operation parameter information, analog quantity channel information, switching value channel information and primary equipment information (lines, transformers and the like); the recording fixed value data comprises: recording parameter fixed values, interval fixed values, frequency fixed values and the like, and the information is stored in a data table of the mysql database in a MyISAM engine mode.
2. The automatic backup module is invoked to backup each data table as a sql file using mysql, as shown in fig. 1. And calculating the check code of the sql file, and writing the check code into the check code file. The automatic backup module first reads a check code file, wherein the check code file adopts an xml file format and comprises a data table list to be backed up and md5 check code nodes of a backup table, such as the check code file format shown in table 1.
TABLE 1 check code File Format definition
Hierarchy Element(s) Description of the invention Type (B) M/O Number of
Stage 0 tablebklist Root element - M 1
Stage 1 table Data table names - M ≥1
Table Attribute 1 md5 md5 check code STRING M 1
An example of a check code file is as follows:
Figure BDA0001796511540000041
the automatic backup module automatically backs up the data tables one by one according to the read data table list, the automatic backup is realized by calling mysqldump, each data table generates an sql file, md5 check codes of the sql file are generated, and the md5 check codes are written into the md5 attribute values of the table nodes of the check code file. Meanwhile, each sql file is compressed into a zip file of the same name.
The generated backup files are as follows:
Figure BDA0001796511540000042
analog_channel_t.sql
Figure BDA0001796511540000043
digital_channel_t.sql
Figure BDA0001796511540000044
line_cfg_t.sql
Figure BDA0001796511540000058
tran_cfg_t.sql
Figure BDA0001796511540000051
station_cfg_t.sql
the generated compressed file is as follows:
Figure BDA0001796511540000052
analog_channel_t.zip
Figure BDA0001796511540000053
digital_channel_t.zip
Figure BDA0001796511540000054
line_cfg_t.zip
Figure BDA0001796511540000055
tran_cfg_t.zip
Figure BDA0001796511540000056
station_cfg_t.zip
example of check code files after all data table backups are completed:
Figure BDA0001796511540000057
and the automatic backup process is finished.
3. Before the wave recording device accesses the data table, the automatic restoration module is called to judge whether the data table is damaged or illegally modified and restore the damaged table, as shown in fig. 2.
The method for judging whether the data table is damaged or illegally modified comprises the following steps: and exporting the sql file of the current data table through mysql dial, calculating the md5 check code of the sql file, comparing the check code with the md5 check code recorded in the check code file, if the check code is consistent with the md5 check code, indicating that the data in the data table is normal and does not need to be repaired, and if the check code is inconsistent with the md5 check code, indicating that the table data is damaged or the table data is illegally modified by third-party software and the data table needs to be repaired.
Before a data table is repaired, a bad table file needs to be backed up firstly, the backed-up bad table file comprises three files of MYD, MYI and frm, and the purpose of backing up the three files is to compare and analyze possible consequences caused by table damage and actual problems of a wave recording device afterwards, so that the reason of the problems is convenient to locate.
And then repairing the bad data table, wherein the method comprises the following steps: and restoring the data table by using the sql file with the same name as the current data table through the mysql, decompressing the zip file with the same name if the sql file cannot be searched, and restoring the data table by using the decompressed sql file.
So far, the automatic reduction process is completed.
The specific embodiments are given above, but the present invention is not limited to the above-described embodiments. The basic idea of the present invention lies in the above basic scheme, and it is obvious to those skilled in the art that no creative effort is needed to design various modified models, formulas and parameters according to the teaching of the present invention. Variations, modifications, substitutions and alterations may be made to the embodiments without departing from the principles and spirit of the invention, and still fall within the scope of the invention.

Claims (4)

1. A method for repairing a damaged data table of a wave recording device is characterized by comprising the following steps:
1) acquiring engineering configuration data and wave recording fixed value data of a wave recording device, and storing the engineering configuration data and the wave recording fixed value data into corresponding data tables;
2) backing up each data table into a file with a corresponding set format, checking whether each data table is damaged or not when accessing the data tables, and replacing the original file in the corresponding data table with the backup file if the data table is damaged;
in the step 2), all the data tables are backed up to be files in an sql format;
after all the data tables are backed up into files in an sql format, calculating check codes of all the sql files, and recording the calculated check codes into a check code file;
the process of checking whether the data table is damaged is as follows: and exporting the sql file of the current data table, calculating the check code of the sql file, verifying the consistency of the check code and the check code recorded in the check code file, if the check code is inconsistent with the check code, indicating that the data table is damaged, otherwise, indicating that the data table is not damaged.
2. The method for repairing a damaged data table of a recording apparatus according to claim 1, wherein in step 2), after each data table is backed up as a file corresponding to a set format, each file is compressed into a compressed file of the same name, and if a data table is damaged and the data table backup file is lost or damaged, the compressed file of the same name is decompressed into the file of the set format, and the decompressed file is substituted for the original file.
3. A damaged data table repair system of a wave recording device is characterized by comprising a data processing module, an automatic backup module and an automatic restoration module, wherein the data processing module is used for acquiring engineering configuration data and wave recording fixed value data of the wave recording device and storing the engineering configuration data and the wave recording fixed value data into corresponding data tables; the automatic backup module is used for backing up each data table into a file with a corresponding set format; the automatic restoration module is used for checking whether each data table is damaged or not when accessing the data tables, and replacing the backup files with the original files in the corresponding data tables if the data tables are damaged;
the automatic backup module backs up all the data tables into files in an sql format;
after all the data tables are backed up into files in an sql format, calculating check codes of all the sql files, and recording the calculated check codes into a check code file;
the process of checking whether the data table is damaged is as follows: and exporting the sql file of the current data table, calculating the check code of the sql file, verifying the consistency of the check code and the check code recorded in the check code file, if the check code is inconsistent with the check code, indicating that the data table is damaged, otherwise, indicating that the data table is not damaged.
4. The system of claim 3, wherein the automatic backup module compresses each file into a compressed file of the same name after backing up each table as a file of a corresponding set format, decompresses the compressed file of the same name into the file of the set format if the table is damaged and the table backup file is lost or damaged, and replaces the decompressed file with the original file in the corresponding table.
CN201811058746.2A 2018-09-11 2018-09-11 Damaged data table repairing method and system of wave recording device Active CN109213635B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811058746.2A CN109213635B (en) 2018-09-11 2018-09-11 Damaged data table repairing method and system of wave recording device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811058746.2A CN109213635B (en) 2018-09-11 2018-09-11 Damaged data table repairing method and system of wave recording device

Publications (2)

Publication Number Publication Date
CN109213635A CN109213635A (en) 2019-01-15
CN109213635B true CN109213635B (en) 2020-10-30

Family

ID=64983477

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811058746.2A Active CN109213635B (en) 2018-09-11 2018-09-11 Damaged data table repairing method and system of wave recording device

Country Status (1)

Country Link
CN (1) CN109213635B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624545A (en) * 2012-02-22 2012-08-01 中兴通讯股份有限公司 Data backup method, data backup device, data recovery method and data recovery device of network management system
CN103150380A (en) * 2013-03-13 2013-06-12 河海大学 Table format customizable Excel table analysis method
CN103885855A (en) * 2012-12-20 2014-06-25 航天信息股份有限公司 Data backup and recovery method and data backup and recovery device
CN105808675A (en) * 2016-03-01 2016-07-27 万达信息股份有限公司 Method for migrating from Informix database to KingbaseES
CN107315657A (en) * 2017-06-19 2017-11-03 浙江大华技术股份有限公司 A kind of method and device of data backup

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624545A (en) * 2012-02-22 2012-08-01 中兴通讯股份有限公司 Data backup method, data backup device, data recovery method and data recovery device of network management system
CN103885855A (en) * 2012-12-20 2014-06-25 航天信息股份有限公司 Data backup and recovery method and data backup and recovery device
CN103150380A (en) * 2013-03-13 2013-06-12 河海大学 Table format customizable Excel table analysis method
CN105808675A (en) * 2016-03-01 2016-07-27 万达信息股份有限公司 Method for migrating from Informix database to KingbaseES
CN107315657A (en) * 2017-06-19 2017-11-03 浙江大华技术股份有限公司 A kind of method and device of data backup

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"中小变电站监控组态软件的设计与开发";王兆华;《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》;20071015;论文正文第4章、第5章 *

Also Published As

Publication number Publication date
CN109213635A (en) 2019-01-15

Similar Documents

Publication Publication Date Title
CN110212645B (en) Power consumption information acquisition terminal power failure event reporting method and device
US8930284B2 (en) Extended system average interruption duration index (ESAIDI) metric to assess the system reliability impact of distribution automation failures
CN102479113B (en) Abnormal self-adapting processing method and system
CN110008129B (en) Reliability test method, device and equipment for storage timing snapshot
CN110088744B (en) Database maintenance method and system
CN112255552B (en) Fault diagnosis method and device for temperature acquisition device of fuel cell and vehicle
CN111830342A (en) Multi-system-fused intelligent substation relay protection dynamic scheduled inspection method
CN109815124B (en) MBSE-based interlocking function defect analysis method and device and interlocking system
CN109213635B (en) Damaged data table repairing method and system of wave recording device
CN111382198A (en) Data recovery method, device, equipment and storage medium
WO2024098986A1 (en) Relay protection apparatus defect detection method and system based on intelligent oscillograph
CN112699106A (en) Multi-dimensional alarm information time sequence incidence relation analysis method for relay protection device based on Apriori algorithm
CN108319573B (en) Energy statistical data based abnormity judgment and restoration method
CN101840363B (en) A kind of file block comparative approach and device
CN115664007A (en) Intelligent substation secondary circuit visualization and intelligent diagnosis system
CN113986618A (en) Cluster brain split automatic repairing method, system, device and storage medium
CN109639520B (en) Computer-aided test method for network communication of reactor protection system
CN112510826A (en) Method for determining configuration change boundary of modification and extension intelligent recorder
CN110854687B (en) Uninterrupted power transmission reconstruction method for reconstruction and expansion of intelligent substation 3/2 wiring
CN109992475B (en) Log processing method, server and storage medium
CN109446642B (en) Intelligent writing method and device for power grid equipment starting scheme
CN113139158A (en) Method and system for monitoring and correcting COMTRADE abnormal wave recording data based on Gaussian process regression
CN116383718B (en) Complex system reliability assessment method based on internal and external field data
CN110955967A (en) Modeling method and system for bus tie spare power automatic switching in BPA
CN112734594B (en) Low-voltage user power supply reliability research system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant