CN107633056A - Data managing method for power information acquisition terminal - Google Patents
Data managing method for power information acquisition terminal Download PDFInfo
- Publication number
- CN107633056A CN107633056A CN201710851589.XA CN201710851589A CN107633056A CN 107633056 A CN107633056 A CN 107633056A CN 201710851589 A CN201710851589 A CN 201710851589A CN 107633056 A CN107633056 A CN 107633056A
- Authority
- CN
- China
- Prior art keywords
- data
- identification
- set identification
- parameter
- specified
- 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.)
- Granted
Links
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of data managing method for power information acquisition terminal, includes analyzing all data of power information acquisition terminal, so as to establish ATL;One group of new database is established, described database includes data acquisition system, data structure and data field three parts;Obtain the instruction operated for the data of power information acquisition terminal;The corresponding data of the database of foundation is operated, and real-time update is carried out to the content of database, so as to complete the management of data.The inventive method, the difficulty of development and application program is reduced, reduce different processes and wasted to caused by internal memory use, running efficiency of system is improved, the problem of producing deadlock is avoided, reduces later maintenance expense, and it is smaller to device memory occupancy, securely and reliably, efficient stable.
Description
Technical field
Present invention relates particularly to a kind of data managing method for power information acquisition terminal.
Background technology
With the development and the improvement of people's living standards of national economy technology, electric energy has become the daily production of people
With secondary energy sources essential in life, production and life to people bring endless facility.
Including electric energy meter, numerous equipment including power information acquisition terminal, it can all be related to depositing for data at work
The management operation such as storage, read-write, and the kind equipment suffers from very harsh requirement for the reliabilities of data, accuracy etc..
Therefore, a kind of efficient, safe and reliable data managing method is extremely important for the kind equipment.
At present, because the strict limitation by running environment and hardware resource, power information acquisition terminal are carried out to data
Following five problems can be run into during management:
First, the business of power information collection is more complicated, it is necessary to which designing multi-course concurrency cooperates to processing items not
Same business, while related data are handled and circulated between different processes again, therefore the design of program is become more
It is complicated.
Second, the species of power information data is more, need to be preserved according to the multiple files of different type point.And power information is adopted
It is again very limited to collect the internal memory of terminal, internal memory use will be caused if different processes opens multiple identical files simultaneously
Waste.
Third, different process, which accesses same file, needs the protection of Read-Write Locks, and power information acquisition terminal
Cpu performance is again very limited, and complicated and unordered resource contention easily brings running efficiency of system problem, and is also easy to produce extremely
The problem of lock.
Fourth, power information acquisition terminal typically all lacks convenient remote debugging and analysis means, when discovery is asked at the scene
During topic, ex-post analysis can only be carried out by recording running log, if being not turned on journal function, problem analysis will be missed
Chance.
It is numb using the comparison of getting up of traditional software design maintenance fifth, the business that similar power information collection is so complicated
It is tired.When interface changes, associated program and dynamic base all must be recompilated and upgraded, and result in maintenance cost
Increase.
The content of the invention
It is an object of the invention to provide a kind of difficulty that can reduce development and application program, to device memory take compared with
It is small, and securely and reliably, the data managing method for power information acquisition terminal of efficient stable.
This data managing method for power information acquisition terminal provided by the invention, comprises the following steps:
S1. all data of power information acquisition terminal are analyzed, so as to establish ATL;The ATL include with it is all kinds of
All data of type power information acquisition terminal all templates correspondingly;The template is set identification, Data Identification, ginseng
Number mark, event identifier or the corresponding data format stored in database of field identification and corresponding default value;
S2. one group of new database is established, described database includes data acquisition system, data structure and data field three
Point;Wherein data acquisition system represents that the data set corresponding to some mark in database is fit, and this mark is referred to as set identification;Number
According to the corresponding data structure of some fit lower mark of representation data set, this mark includes real time data mark, history
Data Identification, parameter identification or event identifier;Data field represents can not divide again corresponding to some mark under data structure
The minimum memory unit cut, this mark are referred to as field identification;
S3. the instruction operated for the data of power information acquisition terminal is obtained;
S4. according to the step S3 instruction types obtained and the module library established according to step S1, the number established to step S2
Operated according to the corresponding data in storehouse, and real-time update is carried out to the content of database, so as to complete the management of data.
Data acquisition system described in step S2 includes the real time data to be upgraded in time with provisional and needs, has relatively low
Read-write frequency and relatively important configuration parameter, and with randomness and the logout that need not be changed and with persistence need
The historical data to be regularly updated.
Described real-time data memory is in real-time data base, and history data store is in historical data base, logout
It is stored in event database, configuration parameter is stored in configuration parameter storehouse, and described real-time data base, historical data base and thing
The template of part database is stored in data template storehouse, and the template in configuration parameter storehouse is stored in parameterized template storehouse.
Described data template storehouse and parameterized template storehouse is stored in control data corporation;The control data corporation is pair
The outer service processes that remote procedure call and uniform data management interface are provided.
The instruction that data are operated described in step S3, including read operation, write operation, deletion action, snoop-operations,
Backup operation and recovery operation.
Being operated to real time data described in step S4, data manipulation is specially carried out using following rule:
Real-time data base is the key value database using B+ tree constructions, and carries out data directory by major key;Described master
Key includes set identification, real time data mark and field identification;
If writing the real time data mark being not present or field identification, with the presence or absence of corresponding in first searching data ATL
Template:Preserved if pressing form in the presence of if, otherwise return to mistake;
If it is desired to when writing some data, SetData methods and specified location are called:Set identification, real time data mark,
Field identification and the data content of write-in:If without field identification, then it represents that write a data under specified set identification;If
There is no real time data mark, then it represents that write all data under specified set identification;If the length of write-in data exceedes data
The length that form is specified, then abandon the high byte that data have more;If the length of write-in data is less than the length that data format is specified,
Zero padding then is carried out to high byte;
If it is desired to read the real time data mark being not present or field identification, then whether there is in first searching data ATL
Corresponding templates:If returning to empty data in the presence of if, mistake is otherwise returned;
If it is desired to when reading some data, GetData methods and specified location are called:Set identification, real time data mark
And field identification;If without field identification, then it represents that read the data specified under set identification;If there is no real time data mark
Know, then it represents that read all data specified under set identification;
If it is desired to when emptying some data, ClearData methods and specified location are called:Set identification, real time data mark
Knowledge and field identification;If without field identification, then it represents that empty a data under specified set identification;If without real time data
Mark, then it represents that empty all data under specified set identification.
Being operated to configuration parameter described in step S4, data manipulation is specially carried out using following rule:
Configuration parameter storehouse is the key value database using B+ tree constructions, and carries out data directory by major key;Described master
Key includes set identification, parameter identification and field identification;
System first checks the integrality in current configuration parameters storehouse when starting:If it was found that there is damage or be not present, from backup
Partition recovery;If without backup, empty database is created as current configuration parameters storehouse;
If it is desired to write the set identification being not present, parameter identification or field identification, then first searching in parameterized template storehouse is
It is no corresponding templates to be present:Preserved if pressing form in the presence of if, in the absence of then returning to mistake;
If it is desired to when writing some parameter, SetParam methods and specified location are called:Set identification, parameter identification, word
Segment identification and the content of parameter of write-in;If without field identification, then it represents that write in the parameter under specified set identification;If printenv
Mark, then it represents that write all parameters under specified set identification;If the length of write parameters exceedes the length that parameter format is specified
Degree, then abandon the high byte that parameter has more;If otherwise the length of write parameters is less than the length that parameter format is specified, to high word
Section carries out zero padding;
If it is desired to read the set identification being not present, parameter identification or field identification, then first searching in parameterized template storehouse is
It is no corresponding templates to be present:If returning to default value in the presence of if, in the absence of then returning to mistake;
If it is desired to when reading some parameter, GetParam methods and specified location are called:Set identification, parameter identification and word
Segment identification;If without field identification, then it represents that read the parameter specified under set identification;If printenv identifies, then it represents that reading refers to
Determine all parameters under set identification;
If it is desired to when emptying some parameter, ClearParam methods and specified location are called:Set identification, parameter identification and
Field identification;If without field identification, then it represents that empty the parameter under specified set identification;If printenv identifies, then it represents that empties
Specify all parameters under set identification;
If it is desired to when monitoring some parameter modification, ChangeParam methods and specified location are called:Set identification, parameter
Mark and field identification;If without field identification, then it represents that monitor the parameter specified under set identification;If printenv identifies, table
Show all parameters monitored and specified under set identification.
If it is desired to when backing up some parameter, BackupParam methods and specified location are called:Set identification, parameter identification
And field identification;If without field identification, then it represents that the parameter under set identification is specified in backup;If printenv identifies, then it represents that standby
All parameters under the specified set identification of part.
If it is desired to when recovering some parameter, RestoreParam methods and specified location are called:Set identification, parameter identification
And field identification;If without field identification, then it represents that recover to specify the parameter under set identification;If printenv identifies, then it represents that extensive
All parameters under set identification are specified again.
Being operated to logout described in step S4, specially operated using following rule:
Event database is the key value database using queue structure, and carries out data directory by major key;Described master
Key includes set identification, event identifier and record number;
If it is desired to when writing some event, SendEvent methods and specified location are called:Set identification, event identifier and
Additional data;If the queue of some event is not write completely, newest logout is inserted into queue tail;If queue is
Write completely, then first delete oldest logout from queue head and insert newest logout;
If it is desired to when inserting some logout, first searching data ATL whether there is corresponding templates:If being pressed in the presence of if
Form preserves, in the absence of then returning to mistake;
If it is desired to when reading some logout, RecvEvent methods and specified location are called:Set identification, event mark
Knowledge and record number;If no record is numbered, then it represents that reads a kind of event specified under set identification;If without event identifier,
Represent to read all events specified under set identification;Compiled if it is desired to read the set identification being not present, event identifier or record
Number, then direct return recording is sky;
If it is desired to when emptying some event, then ClearEvent methods and specified location are called:Set identification and event mark
Know;If without event identifier, then it represents that empty all events under specified set identification, otherwise represent to empty under specified set identification
A kind of event;
If it is desired to when monitoring some event modification, ChangeEvent methods and specified location are called:Set identification and event
Mark;If event identifier, then it represents that monitor all events specified under set identification, otherwise represent to monitor and specify under set identification
A kind of event.
Being operated to historical data described in step S4, specially operated using following rule:
Historical data base is the key value database using B+ tree constructions, and carries out data directory by major key;Described master
Key includes task identification, set identification and time tag;
Each corresponding one of task identification gathers or freezes task, and preserves number according to the call format in data template storehouse
According to and the corresponding database file of each task;
If it is desired to write the task identification being not present, then first look into and whether there is this task template in data template storehouse:In the presence of
Then preserved by form, otherwise return to mistake;
If it is desired to when writing some data, SetData methods and specified location are called:Task identification, set identification, time
Label and the data of write-in;If without time tag, by the use of current time as time tag, the data of this table are write to specify and appointed
Under business mark;If the length of write-in data exceedes the length that data format is specified, the high byte that data have more is abandoned;If write-in
The length of data is less than the length that data format is specified, then carries out zero padding to high byte;
Such as require to read task identification, set identification or the time tag being not present, then direct returned data is sky;
If it is desired to when reading some data, GetData methods and specified location are called:Task identification, set identification and when
Between section;If without time interval, then it represents that read all data of this table;If without set identification, then it represents that read specified time
The data of all tables in section;Described time interval expression way is:Time started+end time+interval time, such as be spaced
Time can be expressed as:15 minutes, 1 hour, 1 day etc.;
If it is desired to when emptying some data, then ClearData methods and specified location are called:Task identification, set identification
And time interval;If without time interval, then it represents that empty all data of this set identification;If without set identification, then it represents that refer to
Fix time the data of all tables in section.
This data managing method for power information acquisition terminal provided by the invention, is provided for types of applications process
Unified data management interface, therefore reduce the difficulty of development and application program;When simultaneously different application process needs to open
During multiple same files, because application process does not open file directly, but opened indirectly by control data corporation, it is corresponding
With also not having documentary concept, only set identification, Data Identification and field identification etc. for process, and pass through these marks and visit
Required data are asked, therefore only need to open each file once by control data corporation and same file does not have weight
Multiple buffering area, thus reduce different processes and wasted to caused by internal memory use;All application processes can only be by remote
The journey invocation of procedure asks required data manipulation to control data corporation, therefore can realize the every request of sequential processes and monitoring
Data change, thus improve running efficiency of system, avoid the problem of producing deadlock;The long-range mistake that control data corporation provides
Journey calls the means for being also used as remote debugging and problem analysis, even if being not turned on journal function, passes through request data
Operation can also obtain the information of correlation;Finally, control data corporation can realize independent compilation, independent deployment and independent operating,
Even if interface changes, associated program and dynamic base all need not be recompilated and upgraded, thus reduce the later stage
Maintenance cost.
Brief description of the drawings
Fig. 1 is the method flow diagram of the inventive method.
Embodiment
It is the method flow diagram of the inventive method as shown in Figure 1:This power information that is used for provided by the invention gathers eventually
The data managing method at end, comprises the following steps:
This data managing method for power information acquisition terminal provided by the invention, comprises the following steps:
S1. all data of power information acquisition terminal are analyzed, so as to establish ATL;The ATL include with it is all kinds of
All data of type power information acquisition terminal all templates correspondingly;The template is set identification, Data Identification, ginseng
Number mark, event identifier or the corresponding data format stored in database of field identification and corresponding default value;
S2. one group of new database is established, described database includes data acquisition system, data structure and data field three
Point;Wherein data acquisition system represents that the data set corresponding to some mark in database is fit, and this mark is referred to as set identification;Number
According to the corresponding data structure of some fit lower mark of representation data set, this mark includes real time data mark, history
Data Identification, parameter identification or event identifier;Data field represents can not divide again corresponding to some mark under data structure
The minimum memory unit cut, this mark are referred to as field identification;
Data acquisition system includes the real time data to be upgraded in time with provisional and needs, has relatively low read-write frequency and phase
To important configuration parameter, with randomness and the logout that need not be changed and with persistence and need what is regularly updated
Historical data;Real-time data memory is in real-time data base, and in historical data base, logout is stored in history data store
In event database, configuration parameter is stored in configuration parameter storehouse, and described real-time data base, historical data base and event data
The template in storehouse is stored in data template storehouse, and the template in configuration parameter storehouse is stored in parameterized template storehouse;Data template storehouse and
Parameterized template storehouse is stored in control data corporation;The control data corporation is external offer remote procedure call and unified number
According to the service processes of management interface;
S3. the instruction operated for the data of power information acquisition terminal is obtained;The instruction that data are operated,
Including read operation, write operation, deletion action, snoop-operations, backup operation and recovery operation;
S4. according to the step S3 instruction types obtained and the module library established according to step S1, the number established to step S2
Operated according to the corresponding data in storehouse, and real-time update is carried out to the content of database, so as to complete the management of data;
Described operates to real time data, specially carries out data manipulation using following rule:
Real-time data base is the key value database using B+ tree constructions, and carries out data directory by major key;Described master
Key includes set identification, real time data mark and field identification;
If writing the real time data mark being not present or field identification, with the presence or absence of corresponding in first searching data ATL
Template:Preserved if pressing form in the presence of if, otherwise return to mistake;
If it is desired to when writing some data, SetData methods and specified location are called:Set identification, real time data mark,
Field identification and the data content of write-in:If without field identification, then it represents that write a data under specified set identification;If
There is no real time data mark, then it represents that write all data under specified set identification;If the length of write-in data exceedes data
The length that form is specified, then abandon the high byte that data have more;If the length of write-in data is less than the length that data format is specified,
Zero padding then is carried out to high byte;
If it is desired to read the real time data mark being not present or field identification, then whether there is in first searching data ATL
Corresponding templates:If returning to empty data in the presence of if, mistake is otherwise returned;
If it is desired to when reading some data, GetData methods and specified location are called:Set identification, real time data mark
And field identification;If without field identification, then it represents that read the data specified under set identification;If there is no real time data mark
Know, then it represents that read all data specified under set identification;
If it is desired to when emptying some data, ClearData methods and specified location are called:Set identification, real time data mark
Knowledge and field identification;If without field identification, then it represents that empty a data under specified set identification;If without real time data
Mark, then it represents that empty all data under specified set identification.
Described operates to configuration parameter, specially carries out data manipulation using following rule:
Configuration parameter storehouse is the key value database using B+ tree constructions, and carries out data directory by major key;Described master
Key includes set identification, parameter identification and field identification;
System first checks the integrality in current configuration parameters storehouse when starting:If it was found that there is damage or be not present, from backup
Partition recovery;If without backup, empty database is created as current configuration parameters storehouse;
If it is desired to write the set identification being not present, parameter identification or field identification, then first searching in parameterized template storehouse is
It is no corresponding templates to be present:Preserved if pressing form in the presence of if, in the absence of then returning to mistake;
If it is desired to when writing some parameter, SetParam methods and specified location are called:Set identification, parameter identification, word
Segment identification and the content of parameter of write-in;If without field identification, then it represents that write in the parameter under specified set identification;If printenv
Mark, then it represents that write all parameters under specified set identification;If the length of write parameters exceedes the length that parameter format is specified
Degree, then abandon the high byte that parameter has more;If otherwise the length of write parameters is less than the length that parameter format is specified, to high word
Section carries out zero padding;
If it is desired to read the set identification being not present, parameter identification or field identification, then first searching in parameterized template storehouse is
It is no corresponding templates to be present:If returning to default value in the presence of if, in the absence of then returning to mistake;
If it is desired to when reading some parameter, GetParam methods and specified location are called:Set identification, parameter identification and word
Segment identification;If without field identification, then it represents that read the parameter specified under set identification;If printenv identifies, then it represents that reading refers to
Determine all parameters under set identification;
If it is desired to when emptying some parameter, ClearParam methods and specified location are called:Set identification, parameter identification and
Field identification;If without field identification, then it represents that empty the parameter under specified set identification;If printenv identifies, then it represents that empties
Specify all parameters under set identification;
If it is desired to when monitoring some parameter modification, ChangeParam methods and specified location are called:Set identification, parameter
Mark and field identification;If without field identification, then it represents that monitor the parameter specified under set identification;If printenv identifies, table
Show all parameters monitored and specified under set identification.
If it is desired to when backing up some parameter, BackupParam methods and specified location are called:Set identification, parameter identification
And field identification;If without field identification, then it represents that the parameter under set identification is specified in backup;If printenv identifies, then it represents that standby
All parameters under the specified set identification of part.
If it is desired to when recovering some parameter, RestoreParam methods and specified location are called:Set identification, parameter identification
And field identification;If without field identification, then it represents that recover to specify the parameter under set identification;If printenv identifies, then it represents that extensive
All parameters under set identification are specified again.
Described operates to logout, is specially operated using following rule:
Event database is the key value database using queue structure, and carries out data directory by major key;Described master
Key includes set identification, event identifier and record number;
If it is desired to when writing some event, SendEvent methods and specified location are called:Set identification, event identifier and
Additional data;If the queue of some event is not write completely, newest logout is inserted into queue tail;If queue is
Write completely, then first delete oldest logout from queue head and insert newest logout;
If it is desired to when inserting some logout, first searching data ATL whether there is corresponding templates:If being pressed in the presence of if
Form preserves, in the absence of then returning to mistake;
If it is desired to when reading some logout, RecvEvent methods and specified location are called:Set identification, event mark
Knowledge and record number;If no record is numbered, then it represents that reads a kind of event specified under set identification;If without event identifier,
Represent to read all events specified under set identification;Compiled if it is desired to read the set identification being not present, event identifier or record
Number, then direct return recording is sky;
If it is desired to when emptying some event, then ClearEvent methods and specified location are called:Set identification and event mark
Know;If without event identifier, then it represents that empty all events under specified set identification, otherwise represent to empty under specified set identification
A kind of event;
If it is desired to when monitoring some event modification, ChangeEvent methods and specified location are called:Set identification and event
Mark;If event identifier, then it represents that monitor all events specified under set identification, otherwise represent to monitor and specify under set identification
A kind of event.
Described operates to historical data, is specially operated using following rule:
Historical data base is the key value database using B+ tree constructions, and carries out data directory by major key;Described master
Key includes task identification, set identification and time tag;
Each corresponding one of task identification gathers or freezes task, and preserves number according to the call format in data template storehouse
According to and the corresponding database file of each task;
If it is desired to write the task identification being not present, then first look into and whether there is this task template in data template storehouse:In the presence of
Then preserved by form, otherwise return to mistake;
If it is desired to when writing some data, SetData methods and specified location are called:Task identification, set identification, time
Label and the data of write-in;If without time tag, by the use of current time as time tag, the data of this table are write to specify and appointed
Under business mark;If the length of write-in data exceedes the length that data format is specified, the high byte that data have more is abandoned;If write-in
The length of data is less than the length that data format is specified, then carries out zero padding to high byte;
Such as require to read task identification, set identification or the time tag being not present, then direct returned data is sky;
If it is desired to when reading some data, GetData methods and specified location are called:Task identification, set identification and when
Between section;If without time interval, then it represents that read all data of this table;If without set identification, then it represents that read specified time
The data of all tables in section;Described time interval expression way is:Time started+end time+interval time, such as be spaced
Time can be expressed as:15 minutes, 1 hour, 1 day etc.;
If it is desired to when emptying some data, then ClearData methods and specified location are called:Task identification, set identification
And time interval;If without time interval, then it represents that empty all data of this set identification;If without set identification, then it represents that refer to
Fix time the data of all tables in section.
This data managing method provided by the invention, it first can according to the power information acquisition terminal of each type
The information such as the types of the data that can relate to, structure, establish corresponding module library, are then run in power information acquisition terminal
When, an empty database is initially set up, then constantly by read-write to data in database (if without counting accordingly
According to or template etc., then need to establish according to the corresponding template of corresponding Rule in ATL and in database corresponding
Data format), to enable originally empty database quickly to be formed, so as to obtain one be directed to concrete application when " perfection "
Database, i.e. data in the database and its form etc., be all to have targetedly, and each power information acquisition terminal
The data faced are different, and the database that it is finally established is also different, so that the database of power information acquisition terminal
The effect of " customization " is similar to when being formed, so as to improve the practicality of the database of power information acquisition terminal
And reliability.
For reliability, the design of prior art, each program has the data managing method of oneself, not only interface
Disunity, and function and performance are also different.And the inventive method, after this data management part functional independence is come out, no
Above mentioned problem is address only, while also more preferable in reliability etc. uniformity, will not be because of individual program the defects of or mistake
By mistake, loss of data or database file is caused to damage.Therefore, said from this respect, the inventive method causes the reliable of whole system
Property has obtained effective raising.
This data managing method provided by the invention, is applicable not only to power information acquisition terminal, is also applied for other
Need the equipment for carrying out similar data management, including all types of measuring instruments (such as electric energy meter, water meter, gas meter, flow meter, heat
Table etc.), electric energy management terminal, distribution terminal, electric energy quality monitoring equipment, grid automation terminal, acquisition terminal, concentrator,
Data acquisition unit, measuring instrument, write by hand device, fault detector etc..
Claims (9)
1. a kind of data managing method for power information acquisition terminal, comprise the following steps:
S1. all data of power information acquisition terminal are analyzed, so as to establish ATL;The ATL includes and all types of use
All data of power information acquisition terminal all templates correspondingly;The template is set identification, Data Identification, parameter mark
Know, event identifier or field identification correspond to the data format stored in database and corresponding default value;
S2. one group of new database is established, described database includes data acquisition system, data structure and data field three parts;
Wherein data acquisition system represents that the data set corresponding to some mark in database is fit, and this mark is referred to as set identification;Data
The corresponding data structure of some fit lower mark of representation data set, this mark include real time data mark, history number
According to mark, parameter identification or event identifier;Data field represents can not split again corresponding to some mark under data structure
Minimum memory unit, this mark be referred to as field identification;
S3. the instruction operated for the data of power information acquisition terminal is obtained;
S4. according to the step S3 instruction types obtained and the module library established according to step S1, the database established to step S2
Corresponding data operated, and real-time update is carried out to the content of database, so as to complete the management of data.
2. the data managing method according to claim 1 for power information acquisition terminal, it is characterised in that step S2
Described data acquisition system includes the real time data to be upgraded in time with provisional and needs, with relatively low read-write frequency and relatively
Important configuration parameter, with randomness and the logout that need not be changed and with persistence and need what is regularly updated to go through
History data.
3. the data managing method according to claim 2 for power information acquisition terminal, it is characterised in that described
Real-time data memory is in real-time data base, and for history data store in historical data base, logout is stored in event data
In storehouse, configuration parameter is stored in configuration parameter storehouse, and the template of described real-time data base, historical data base and event database
It is stored in data template storehouse, the template in configuration parameter storehouse is stored in parameterized template storehouse.
4. the data managing method according to claim 3 for power information acquisition terminal, it is characterised in that described
Data template storehouse and parameterized template storehouse are stored in control data corporation;The control data corporation is external offer remote process
Call the service processes with uniform data management interface.
5. the data managing method according to claim 4 for power information acquisition terminal, it is characterised in that step S3
The described instruction that data are operated, including read operation, write operation, deletion action, snoop-operations, backup operation and recovery
Operation.
6. the data managing method according to claim 5 for power information acquisition terminal, it is characterised in that step S4
Described operates to real time data, specially carries out data manipulation using following rule:
Real-time data base is the key value database using B+ tree constructions, and carries out data directory by major key;Described major key bag
Include set identification, real time data mark and field identification;
If writing the real time data mark being not present or field identification, with the presence or absence of corresponding mould in first searching data ATL
Plate:Preserved if pressing form in the presence of if, otherwise return to mistake;
If it is desired to when writing some data, SetData methods and specified location are called:Set identification, real time data mark, field
Mark and the data content of write-in:If without field identification, then it represents that write a data under specified set identification;If no
Real time data identifies, then it represents that writes all data under specified set identification;If the length of write-in data exceedes data format
The length specified, then abandon the high byte that data have more;If the length of write-in data is less than the length that data format is specified, right
High byte carries out zero padding;
If it is desired to the real time data mark being not present or field identification are read, then with the presence or absence of corresponding in first searching data ATL
Template:If returning to empty data in the presence of if, mistake is otherwise returned;
If it is desired to when reading some data, GetData methods and specified location are called:Set identification, real time data mark and word
Segment identification;If without field identification, then it represents that read the data specified under set identification;If being identified without real time data,
Then represent to read all data specified under set identification;
If it is desired to when emptying some data, ClearData methods and specified location are called:Set identification, real time data mark and
Field identification;If without field identification, then it represents that empty a data under specified set identification;If there is no real time data mark
Know, then it represents that empty all data under specified set identification.
7. the data managing method according to claim 6 for power information acquisition terminal, it is characterised in that step S4
Described operates to configuration parameter, specially carries out data manipulation using following rule:
Configuration parameter storehouse is the key value database using B+ tree constructions, and carries out data directory by major key;Described major key bag
Include set identification, parameter identification and field identification;
System first checks the integrality in current configuration parameters storehouse when starting:If it was found that there is damage or be not present, from backup subregion
Recover;If without backup, empty database is created as current configuration parameters storehouse;
If it is desired to write the set identification being not present, parameter identification or field identification, then first search and whether deposited in parameterized template storehouse
In corresponding templates:Preserved if pressing form in the presence of if, in the absence of then returning to mistake;
If it is desired to when writing some parameter, SetParam methods and specified location are called:Set identification, parameter identification, field mark
The content of parameter known and write;If without field identification, then it represents that write in the parameter under specified set identification;If printenv mark
Know, then it represents that write all parameters under specified set identification;If the length of write parameters exceedes the length that parameter format is specified,
Then abandon the high byte that parameter has more;If otherwise the length of write parameters is less than the length that parameter format is specified, to high byte
Carry out zero padding;
If it is desired to read the set identification being not present, parameter identification or field identification, then first search and whether deposited in parameterized template storehouse
In corresponding templates:If returning to default value in the presence of if, in the absence of then returning to mistake;
If it is desired to when reading some parameter, GetParam methods and specified location are called:Set identification, parameter identification and field mark
Know;If without field identification, then it represents that read the parameter specified under set identification;If printenv identifies, then it represents that reads and specifies collection
Close all parameters under mark;
If it is desired to when emptying some parameter, ClearParam methods and specified location are called:Set identification, parameter identification and field
Mark;If without field identification, then it represents that empty the parameter under specified set identification;If printenv identifies, then it represents that empties specified
All parameters under set identification;
If it is desired to when monitoring some parameter modification, ChangeParam methods and specified location are called:Set identification, parameter identification
And field identification;If without field identification, then it represents that monitor the parameter specified under set identification;If printenv identifies, then it represents that prison
Listen all parameters under specified set identification.
If it is desired to when backing up some parameter, BackupParam methods and specified location are called:Set identification, parameter identification and word
Segment identification;If without field identification, then it represents that the parameter under set identification is specified in backup;If printenv identifies, then it represents that backup refers to
Determine all parameters under set identification.
If it is desired to when recovering some parameter, RestoreParam methods and specified location are called:Set identification, parameter identification and word
Segment identification;If without field identification, then it represents that recover to specify the parameter under set identification;If printenv identifies, then it represents that refers to
Determine all parameters under set identification.
8. the data managing method according to claim 7 for power information acquisition terminal, it is characterised in that step S4
Described operates to logout, is specially operated using following rule:
Event database is the key value database using queue structure, and carries out data directory by major key;Described major key bag
Include set identification, event identifier and record number;
If it is desired to when writing some event, SendEvent methods and specified location are called:Set identification, event identifier and additional
Data;If the queue of some event is not write completely, newest logout is inserted into queue tail;If queue has been write
It is full, then first delete oldest logout from queue head and insert newest logout;
If it is desired to when inserting some logout, first searching data ATL whether there is corresponding templates:If pressing form in the presence of if
Preserve, in the absence of then returning to mistake;
If it is desired to when reading some logout, RecvEvent methods and specified location are called:Set identification, event identifier and
Record number;If no record is numbered, then it represents that reads a kind of event specified under set identification;If without event identifier, then it represents that
Read all events specified under set identification;If it is desired to the set identification being not present, event identifier or record number are read, then
Direct return recording is sky;
If it is desired to when emptying some event, then ClearEvent methods and specified location are called:Set identification and event identifier;If
Without event identifier, then it represents that empty all events under specified set identification, otherwise represent to empty one under specified set identification
Class event;
If it is desired to when monitoring some event modification, ChangeEvent methods and specified location are called:Set identification and event mark
Know;If event identifier, then it represents that monitor all events specified under set identification, otherwise represent to monitor and specify under set identification
A kind of event.
9. the data managing method according to claim 8 for power information acquisition terminal, it is characterised in that step S4
Described operates to historical data, is specially operated using following rule:
Historical data base is the key value database using B+ tree constructions, and carries out data directory by major key;Described major key bag
Include task identification, set identification and time tag;
Each corresponding one of task identification gathers or freezes task, and preserves data simultaneously according to the call format in data template storehouse
And each corresponding database file of task;
If it is desired to write the task identification being not present, then first look into and whether there is this task template in data template storehouse:In the presence of then pressing
Form preserves, and otherwise returns to mistake;
If it is desired to when writing some data, SetData methods and specified location are called:Task identification, set identification, time tag
With the data of write-in;If without time tag, by the use of current time as time tag, the data of this table are write into appointed task mark
Under knowledge;If the length of write-in data exceedes the length that data format is specified, the high byte that data have more is abandoned;If write data
Length be less than the length specified of data format, then zero padding is carried out to high byte;
Such as require to read task identification, set identification or the time tag being not present, then direct returned data is sky;
If it is desired to when reading some data, GetData methods and specified location are called:Task identification, set identification and time zone
Between;If without time interval, then it represents that read all data of this table;If without set identification, then it represents that read specified time section
The data of all tables;Described time interval expression way is:Time started+end time+interval time, such as interval time
It can be expressed as:15 minutes, 1 hour, 1 day etc.;
If it is desired to when emptying some data, then ClearData methods and specified location are called:Task identification, set identification and when
Between section;If without time interval, then it represents that empty all data of this set identification;If without set identification, then it represents that when specifying
Between all tables in section data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710851589.XA CN107633056B (en) | 2017-09-19 | 2017-09-19 | Data management method for electricity consumption information acquisition terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710851589.XA CN107633056B (en) | 2017-09-19 | 2017-09-19 | Data management method for electricity consumption information acquisition terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107633056A true CN107633056A (en) | 2018-01-26 |
CN107633056B CN107633056B (en) | 2020-12-22 |
Family
ID=61103069
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710851589.XA Active CN107633056B (en) | 2017-09-19 | 2017-09-19 | Data management method for electricity consumption information acquisition terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107633056B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110147379A (en) * | 2019-04-02 | 2019-08-20 | 平安科技(深圳)有限公司 | Information collecting method, device, computer equipment based on data lock |
CN112025704A (en) * | 2020-08-25 | 2020-12-04 | 杭州湖西云百生科技有限公司 | Real-time distributed robot control method and system based on memory type database |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101976251A (en) * | 2010-10-26 | 2011-02-16 | 国电南瑞科技股份有限公司 | Method for realizing power utilization information acquisition terminal embedded database management model |
US20140156603A1 (en) * | 2012-12-03 | 2014-06-05 | State Grid Corporation Of China | Method and an apparatus for splitting and recovering data in a power system |
CN105404634A (en) * | 2014-09-15 | 2016-03-16 | 南京理工大学 | Key-Value data block based data management method and system |
-
2017
- 2017-09-19 CN CN201710851589.XA patent/CN107633056B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101976251A (en) * | 2010-10-26 | 2011-02-16 | 国电南瑞科技股份有限公司 | Method for realizing power utilization information acquisition terminal embedded database management model |
US20140156603A1 (en) * | 2012-12-03 | 2014-06-05 | State Grid Corporation Of China | Method and an apparatus for splitting and recovering data in a power system |
CN105404634A (en) * | 2014-09-15 | 2016-03-16 | 南京理工大学 | Key-Value data block based data management method and system |
Non-Patent Citations (2)
Title |
---|
樊重俊等: "《数据库基础及应用》", 31 January 2015 * |
邱红锴: ""用电及能效信息采集系统嵌入式实时数据库关键技术研究"", 《中国优秀硕士学位论文全文数据库(电子期刊)》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110147379A (en) * | 2019-04-02 | 2019-08-20 | 平安科技(深圳)有限公司 | Information collecting method, device, computer equipment based on data lock |
CN110147379B (en) * | 2019-04-02 | 2023-06-30 | 平安科技(深圳)有限公司 | Information acquisition method and device based on data lock and computer equipment |
CN112025704A (en) * | 2020-08-25 | 2020-12-04 | 杭州湖西云百生科技有限公司 | Real-time distributed robot control method and system based on memory type database |
Also Published As
Publication number | Publication date |
---|---|
CN107633056B (en) | 2020-12-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109241175A (en) | Method of data synchronization, device, storage medium and electronic equipment | |
US7904488B2 (en) | Time stamp methods for unified plant model | |
CN103617176B (en) | One kind realizes the autosynchronous method of multi-source heterogeneous data resource | |
CN110300963A (en) | Data management system in large-scale data repository | |
CN105354036B (en) | Database manipulation code generating method and device | |
CN105488187A (en) | Method and device for extracting multi-source heterogeneous data increment | |
CN104318481A (en) | Power-grid-operation-oriented holographic time scale measurement data extraction conversion method | |
CN107943831B (en) | HBase-based power grid historical data centralized storage method | |
CN106503158A (en) | Method of data synchronization and device | |
CN102110102A (en) | Data processing method and device, and file identifying method and tool | |
CN110019469A (en) | Distributed data base data processing method, device, storage medium and electronic device | |
CN103389925B (en) | A kind of real time backup method based on process name identification | |
CN111913933B (en) | Power grid historical data management method and system based on unified support platform | |
CN110175206A (en) | Intellectual analysis operational approach, system and medium for multiple database separation | |
CN114218218A (en) | Data processing method, device and equipment based on data warehouse and storage medium | |
CN111061802B (en) | Power data management processing method, device and storage medium | |
CN107633056A (en) | Data managing method for power information acquisition terminal | |
CN106802928B (en) | Power grid historical data management method and system | |
CN106780157B (en) | Ceph-based power grid multi-temporal model storage and management system and method | |
CN103488564A (en) | Multichannel test data compressing and merging method for distributed real-time test system | |
CN114528270A (en) | System and method for automatically associating real-time stream data with service dimension information in cloud environment | |
CN108804606A (en) | A kind of electric power measures class Data Migration to the method and system of HBase | |
CN113641651A (en) | Business data management method, system and computer storage medium | |
CN106843825A (en) | A kind of software configuration management method based on Temporal Model | |
CN110515803A (en) | For the processing method of log information, device and electronic equipment |
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 |