×

METHOD AND AN APPARATUS FOR SPLITTING AND RECOVERING DATA IN A POWER SYSTEM

  • US 20140156603A1
  • Filed: 10/21/2013
  • Published: 06/05/2014
  • Est. Priority Date: 12/03/2012
  • Status: Abandoned Application
First Claim
Patent Images

1. A method for splitting and recovering data in a power system, comprising:

  • a database access layer calling interfaces TableOpen and TableGet corresponding to a first database to inquire in the first database when the database access layer receives a read request to a grid model and static parameters, wherein the input parameters of TableOpen are const char* app_name and const int table_no, and the input parameter of TableGet is char*field_name, and the output parameters of TableGet are char**field_buf_ptr and intbufsize, andthe database access layer calling an interface SelectSql corresponding to a second database to inquire in the second database by means of a data recovery unit DB_SERVICE when the database access layer receives a read request to historical data, wherein the input parameter of SelectSql is constchar*sql_str, and the output parameters of SelectSql are TSelectResultStru_outout_select result and SEQDBErrorStru_outout_db_error, whereinthe first database and the data recovery unit DB-SERVICE are set in a platform layer of the power system, and the first database and a second database constitute the whole database environment of the power system,the first database runs in the memory of the power system, which is consisted of the real-time image in the memory of a grid model and static parameters of the second database,the grid model, static parameters and historical data are stored in the second database,the access interfaces of the first and second databases are encapsulated in a database access layer,the data recovery unit DB-SERVICE is responsible for all of the associated read-write operations with the second database;

    the data recovery unit DB_SERVICE calling a main thread of a service process db_commit to write the received historical data with time scale characters into different files one by one when it receives a write request, and storing these files in a hard drive according to time to form a set of file sequence, and calling another thread of the service process db_commit to judge the state of the second database, such that the another thread can access and parse the file sequence to write its content to the second database if the second database is normal, or otherwise the another thread be into a state of loop waiting,the data recovery unit DB-SERVICE calling a synchronization program DB_Modify_Server to write the real-time data from the first database to the second database as the historical data when it receives a synchronization request from the second database, and calling the synchronization program DB_Modify_Server to access the grid model and static parameters of the second database to update the first database when it receives a synchronization request from the first database, andthe accesses of the grid model, static parameters and historical data are encapsulated into different services in the data recovery unit DB_SERVICE.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×