CN105912703A - Data storage method and data query method and device - Google Patents

Data storage method and data query method and device Download PDF

Info

Publication number
CN105912703A
CN105912703A CN201610267040.1A CN201610267040A CN105912703A CN 105912703 A CN105912703 A CN 105912703A CN 201610267040 A CN201610267040 A CN 201610267040A CN 105912703 A CN105912703 A CN 105912703A
Authority
CN
China
Prior art keywords
data
monitoring
monitoring data
storage
key assignments
Prior art date
Application number
CN201610267040.1A
Other languages
Chinese (zh)
Inventor
胡在斌
李博
Original Assignee
北京百度网讯科技有限公司
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 北京百度网讯科技有限公司 filed Critical 北京百度网讯科技有限公司
Priority to CN201610267040.1A priority Critical patent/CN105912703A/en
Publication of CN105912703A publication Critical patent/CN105912703A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results

Abstract

The invention discloses a data storage method and a data query method and device. A specific implementation manner of the data storage method comprises the following steps: acquiring monitoring data which is generated through monitoring a data center; storing the acquired monitoring data in a preset key value type main memory database; transferring the monitoring data, the storage time of which achieves a preset length threshold value, stored in the key value type main memory database into a preset relationship type disk database. According to the implementation manner, the access timelines of real-time data is ensured, and the database deployment cost is reduced at the same time.

Description

Date storage method, querying method and device
Technical field
The application relates to field of computer technology, is specifically related to data center's monitoring technical field, Particularly relate to date storage method, querying method and device.
Background technology
Along with the scale of data center is increasing, infrastructure (power environment system and cold water Robot control system(RCS)) data that monitor are more and more huger, and the data monitored are united on platform One storage and displaying.
For a user, platform monitors the ageing extremely important of data display, therefore needs To improve the real-time of monitoring data display further.
Summary of the invention
The purpose of the application is to propose data storage, querying method and the device of a kind of improvement, Solve the technical problem that background section above is mentioned.
First aspect, this application provides a kind of data query method, and described method includes: adopt Set pair data center is monitored generated monitoring data;The supervising data storage that will be gathered In default key assignments type memory database;Described key assignments type memory database will store the time Reach the monitoring data conversion storage of preset duration threshold value in default relationship type disk database.
In certain embodiments, described by described key assignments type memory database store the time reach The monitoring data conversion storage of preset duration threshold value to default relationship type disk database, including: with Predetermined period reaches described preset duration threshold value by storing the time in described key assignments type memory database Monitoring data conversion storage to described relationship type disk database.
In certain embodiments, described monitoring data are that described data center is carried out by monitoring device Monitoring generates;And described collection is monitored generated monitoring data and is data center Gathered by following either type: monitoring device periodically obtains equipment collection point to described number Carried out detecting acquired detected value according to center, the detected value obtained when this cycle and a upper cycle The variable quantity of the detected value obtained or rate of change reach to preset variable quantity threshold value or rate of change threshold value Time, upload the monitoring data for representing detected value;The monitoring that monitoring device periodically will obtain Data carry out full dose and upload;According to subscription period timing indicated in default subscription information from Monitoring device pulling data.
In certain embodiments, described monitoring device is multiple monitoring device, and each monitoring sets For operating under the control of unified time synchronized server.
In certain embodiments, described by the supervising data storage gathered in default key assignments type In memory database, including: to the same type monitoring data collected from different monitoring devices, Store with unified storage format.
In certain embodiments, described from the monitoring device acquisition monitoring data of data center it After, described method also includes:
The monitoring device with described data center is used to be uploaded the pattern matched of monitoring data Message protocol the monitoring data collected are resolved.
In certain embodiments, described collection is monitored generated monitoring number to data center According to this and the monitoring device of described use and described data center is uploaded the data lattice monitoring data The monitoring data collected are resolved by the message protocol of formula coupling, including: pass through thread pool Mode gathers and resolves monitoring data.
In certain embodiments, described supervision packet includes polytype monitoring data, and not It is respectively adopted different task queues with the monitoring data of type and deposits to realize asynchronous execution, institute The type stating monitoring data at least includes real-time status monitoring data and alarm data.
In certain embodiments, described key assignments type memory database is deployed in and is in strange land at least On two internal memory level storage mediums, and described by the supervising data storage gathered default In key assignments type memory database, including: by same monitoring data respectively in described at least two Deposit in grade storage medium.
Second aspect, this application provides a kind of data query method, and described method includes: connect Receiving the client inquiry request to monitoring data, wherein said monitoring data are to data center Equipment is monitored generated data, and described inquiry request includes for indicating inquiry prison in real time Control data or the parameter of history monitoring data;If the parameter instruction inquiry that described inquiry request includes During real-time monitoring data, from key assignments type memory database, obtain monitoring data and feed back to described Client is shown;If the parameter instruction query history monitoring data that described inquiry request includes, Relationship type disk database obtains monitor data and feed back to described client and be shown; Wherein, described key assignments type memory database is adopted for the storage when being acquired monitoring data The monitoring data of collection, described relationship type disk database is for described key assignments type internal storage data The time that stores in storehouse reaches the monitoring data of preset duration and carries out the monitoring of storage institute unloading during unloading Data.
The third aspect, this application provides a kind of data storage device, and described device includes: adopt Collection unit, is monitored generated monitoring data for gathering to data center;Memory element, For the supervising data storage that will be gathered in default key assignments type memory database;Unloading list Unit, for reaching the prison of preset duration threshold value by storing the time in described key assignments type memory database Control data conversion storage is in default relationship type disk database.
Fourth aspect, this application provides a kind of data query arrangement, and described device includes: adopt Collection unit, is monitored generated monitoring data for gathering to data center;Memory element, For the supervising data storage that will be gathered in default key assignments type memory database;Unloading list Unit, for reaching the prison of preset duration threshold value by storing the time in described key assignments type memory database Control data conversion storage is in default relationship type disk database.
Data storage, querying method and the device that the application provides, by by preset duration threshold value In data center's supervising data storage in key assignments type memory database, and when will exceed default Data center's monitoring data of long threshold value leave in traditional associative memory data base, simultaneously Ensure that the access of real-time data is ageing, also reduce data base's lower deployment cost.
Accompanying drawing explanation
By reading retouching in detail with reference to made non-limiting example is made of the following drawings Stating, other features, purpose and advantage will become more apparent upon:
Fig. 1 is that the application can apply to exemplary system architecture figure therein;
Fig. 2 is the flow chart of an embodiment of the date storage method according to the application;
Fig. 3 is the flow chart of an embodiment of the data query method according to the application;
Fig. 4 is the structural representation of an embodiment of the data storage device according to the application;
Fig. 5 is the structural representation of an embodiment of the data query arrangement according to the application;
Fig. 6 is adapted for the data platform server for realizing the embodiment of the present application or presentation device The structural representation of computer system.
Detailed description of the invention
With embodiment, the application is described in further detail below in conjunction with the accompanying drawings.It is appreciated that , specific embodiment described herein is used only for explaining related invention, rather than to this Bright restriction.It also should be noted that, for the ease of describe, accompanying drawing illustrate only with About the part that invention is relevant.
It should be noted that in the case of not conflicting, the embodiment in the application and embodiment In feature can be mutually combined.Describe this below with reference to the accompanying drawings and in conjunction with the embodiments in detail Application.
Fig. 1 shows and can apply the date storage method of the application, querying method and device The exemplary system architecture 100 of embodiment.
As it is shown in figure 1, system architecture 100 can include data monitoring device 101,102,103, Network 104,106, data platform server 105 and presentation device 107.Network 104,106 Respectively in order between data monitoring device 101,102,103 and data Platform Server 105 And the medium of communication link is provided between data platform server 105 and presentation device 107. Network 104,106 can include various connection type, the most wired, wireless communication link or Fiber optic cables etc..
User can use presentation device 107 by network 104 and data platform server 105 Alternately, to receive or to send message etc..Presentation device 101,102,103 can be have aobvious Display screen or other various electronic equipments being used for carrying out information displaying, include but not limited to intelligence Mobile phone, panel computer, E-book reader, MP3 player (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio frequency aspect 3), (Moving Picture Experts Group Audio Layer IV, dynamic image expert compresses MP4 Standard audio aspect 4) player, pocket computer on knee and desk computer etc..
Data platform server 105 could be for providing data to support for presentation device 107 Server, the data in data platform server 105 can be by data monitoring device 101, The data that equipment in 102 and 103 pairs of data centers is monitored and uploads.Additionally, number Multiple server can be included according to central server 105, permissible in data center server 105 Being provided with different types of multiple database application, different database applications can be deployed in phase On the specific service device answered.
It should be noted that the embodiment of the present application provided date storage method, querying method Typically performed by data platform server 101, correspondingly, date storage method, inquiry unit It is generally positioned in data platform server 101.
It should be understood that data monitoring device, network, data platform server and the exhibition in Fig. 1 Show the number of equipment the most schematically.According to realizing needs, can have any number of Data monitoring device, data platform server and presentation device.
With continued reference to Fig. 2, it is shown that according to an embodiment of the date storage method of the application Flow process 200.Described date storage method, comprises the following steps:
Step 201, gathers and data center is monitored generated monitoring data.
In the present embodiment, date storage method runs on electronic equipment thereon (such as Fig. 1 Shown data platform server) can be adopted by wired connection mode or radio connection Collection monitoring data.These monitoring data can be that data center is monitored generated data. In practice, can be in the power environment system to data center, the difference such as cold water automatic control system Equipment in system is monitored formed data.It should be noted that monitoring data are permissible It is to realize status data, such as voltage, electric current, power etc..
It is pointed out that above-mentioned radio connection can include but not limited to 3G/4G connect, WiFi connects, bluetooth connects, WiMAX connects, Zigbee connects, UWB (ultra wideband) Connect and other currently known or exploitation in the future radio connection.
Step 202, by the supervising data storage that gathered at default key assignments type memory database In.
In the present embodiment, electronic equipment (the data platform server in such as Fig. 1) is permissible Including multiple database servers for storing data.These database servers can include For disposing the server of key assignments type memory database, it is also possible to include for disposing relationship type magnetic The server of dish data base.Memory database, is the number that data are placed in internal memory directly operation According to storehouse.Relative to disk, the reading and writing data speed of internal memory to be several orders of magnitude higher, and therefore will Data are saved in memory database to compare and access the property that can be greatly enhanced application from disk Energy.Memory database can be divided into poke in associative memory data base and key assignments type from pattern According to storehouse, wherein key assignments type memory database more easily uses, and performance and extensibility are more preferable, Therefore use more than the memory database of relationship type in application.Key assignments type memory database can To be FastDB, Memcached, Redis and other key assignments type memory databases.Optional , this key assignments type memory database can select Redis data base.Relationship type disk database The data base on the basis of relational model can be built upon, and storage medium is the data base of disk, Such as MySQL database, oracle database etc..
For the monitoring data collected by step 201, this monitoring can be taken by electronic equipment Business device is stored in deployment key assignments type memory database.
Step 203, reaches preset duration threshold value by storing the time in key assignments type memory database Monitoring data conversion storage is in default relationship type disk database.
In the present embodiment, run on can be to key on electronic equipment thereon for date storage method Monitoring data in value type memory database detect.When these monitoring data are at internal storage data When the storage time in storehouse reaches preset duration threshold value, electronic equipment can be by these data from key Value type memory database dumps in the relationship type disk database preset.
In some optional implementations of the present embodiment, in step 203, can be with default week Phase reaches the monitoring data conversion storage of preset duration threshold value by storing the time in key assignments type memory database To relationship type disk database.By this method, electronic equipment can be periodically every one Section time unloading is once, it is to avoid constantly unloading data cause the read-write operation of storage medium too much, Thus increase the service life of storage medium.
In some optional implementations of the present embodiment, above-mentioned monitoring data are monitoring device (examples Data monitoring device as in Fig. 1) be monitored data center generating, and step 201 It is to be adopted by following either type that middle collection is monitored generated monitoring data to data center Collection: (1) monitoring device periodically acquisition equipment collection point carries out detection and obtained data center The detected value taken, the change of the detected value that the detected value obtained when this cycle and a upper cycle obtain When amount or rate of change reach to preset variable quantity threshold value or rate of change threshold value, upload for representing detection The monitoring data of value.In this mode, monitoring device monitor data occur significantly change time, Just upload, be conducive to reducing volume of transmitted data, reduce network load.(2) monitoring device Periodically the monitoring data of acquisition are carried out in full dose.The monitoring to detecting every time of this mode Data full dose is uploaded, and is conducive to improving the integrity degree of monitoring data.(3) according to default subscription Subscription period timing indicated in information is from monitoring device pulling data.In this approach, pin Different business can be used different subscription period, such as calculating power supply service efficiency The data of (PUE, Power Usage Effectiveness) reference point position, ageing require pole Height, can use shorter subscription period.
In some optional implementations of the present embodiment, above-mentioned monitoring device is that multiple monitoring sets Standby, and each monitoring device operates under the control of unified time synchronized server.Time Between sync server from gps satellite, obtain standard clock signal information, by these information at net The equipment such as in network, transmission, requires time for the equipment such as computer of signal in network, controller just may be used With Tong Bu with standard time source.In this implementation, it is possible to use time synchronized server is to respectively Individual monitoring device provides unified time synchronized service, to reduce what the delay of network service produced Impact, is further ensured that the accuracy of the ageing of data and data.
In some optional implementations of the present embodiment, step 202 farther includes: to from The same type monitoring data that different monitoring equipment collects, store with unified storage format. In the present embodiment, the type of monitoring data can be real-time status data, can be alarm number According to, it is also possible to it is other types.For the data of same type, such as real-time status data, Can store abstract for all data contents for key assignments form on Cun Chu.The structure of table is permissible It is set to relatively simple structure, such as four field: id (identifier) of storage, key (key), Val (is worth), and createtime (creates the time).The most such as, for alarm data, it is also possible to Design unified memory architecture, unified from each monitoring system collect warning information alarm grade, The storage mode of the fields such as warning information.During storage data, same with unified storage format storage Class data, it is possible to achieve transparent to upper layer application of equipment communication protocol, it is ensured that upper layer application is adjusted With the normalization of interface, be conducive to carrying out adaptation with upper application module.
In some optional implementations of the present embodiment, after step 201, above-mentioned data Storage method farther includes: use the monitoring device with data center to be uploaded monitoring data The monitoring data collected are resolved by the message protocol of pattern matched.In this realization side In formula, being binary data for collecting, electronic equipment is adopted according to different message protocols Differently resolve.The message protocol used can with monitoring data from monitoring Equipment pre-builds association, thus message protocol can be used for the data uploaded with this monitoring device Pattern matched.
In some optional implementations of the present embodiment, data center is supervised by above-mentioned collection Control the monitoring data generated and use monitoring device the uploaded monitoring data with data center The message protocol of pattern matched the monitoring data collected are resolved, can pass through Thread pool mode gathers and monitors data.By thread pool mode, data acquisition effect can be improved Rate and packet parsing efficiency.
In some optional implementations of the present embodiment, supervision packet includes polytype prison Control data, and different types of monitoring data are respectively adopted different task queues and deposit to realize Asynchronous execution.Wherein, the type of monitoring data at least includes real-time status monitoring data and alarm Data.In this implementation, different types of data.Different task queues is used to deposit Different types of data, each queue asynchronous execution, can improve data acquisition efficiency further With packet parsing efficiency.
In some optional implementations of the present embodiment, key assignments type memory database is deployed in place On at least two internal memory level storage medium in strange land, and above-mentioned steps 202 includes: will be with One monitoring data are respectively at least two internal memory level storage medium.In this implementation, logical Cross the backup storage that the data in key assignments type memory database are carried out strange land, be conducive to improving prison The disaster tolerance performance of control data.
The method that above-described embodiment of the application provides is by by the data in preset duration threshold value Heart supervising data storage is in key assignments type memory database, and will exceed the number of preset duration threshold value Leave in traditional associative memory data base according to center monitoring data, ensure that in real time simultaneously The access of property data is ageing, also reduces data base's lower deployment cost.
With further reference to Fig. 3, it illustrates the flow process of an embodiment of data query method 300.The flow process 300 of this data query method, comprises the following steps:
Step 301, receives the client inquiry request to monitoring data.
In the present embodiment, data query method runs on electronic equipment thereon (such as Fig. 1 Shown data platform server) multiple database server for storing data can be included. These database servers can include the server for disposing key assignments type memory database, also The server for disposing relationship type disk database can be included.Wherein key assignments type internal storage data The monitoring data that storehouse is gathered for the storage when being acquired monitoring data, relationship type disk Data base reaches the monitoring number of preset duration for storing the time in key assignments type memory database According to the monitoring data storing institute's unloading when carrying out unloading.Key assignments type memory database and relationship type In disk database, the storage method of data is referred to Fig. 2 correspondence embodiment, the most superfluous State.
Electronic equipment can receive client by wired connection mode or radio connection (presentation device in such as Fig. 1) inquiry request to monitoring data.Wherein, inquiry request Including for indicating inquiry real-time monitoring data or the parameter of history monitoring data.This parameter is permissible For the different value of user setup, corresponding value respectively with inquire about real-time monitoring data and go through with inquiry History monitoring data are corresponding.
Step 302, if real-time monitoring data is inquired about in the parameter instruction that inquiry request includes, from Key assignments type memory database obtains monitor data and feed back to client and be shown.
In the present embodiment, the inquiry request received based on step 301, electronic equipment is permissible Parameter in this inquiry request is judged.When this parameter instruction inquiry real-time monitoring data, Electronic equipment can obtain corresponding monitoring data from key assignments type memory database and feed back to visitor Family end is shown.
Step 303, if the parameter instruction query history monitoring data that inquiry request includes, is closing It is type disk database to obtain monitor data and feed back to client to be shown.
In the present embodiment, if electronic equipment judges above-mentioned parameter instruction query history monitoring data, Then electronic equipment can obtain corresponding monitoring data in relationship type disk database and feed back to Client is shown.
From figure 3, it can be seen that the method that above-described embodiment of the application provides is receiving inquiry During request, the inquiry to real time data and the inquiry to historical data can be distinguished, for the former Data can be read from key assignments type memory database, the latter is then read from relevant database Fetch data.Thus, when the scheme that the present embodiment describes can ensure that the access of real-time data Effect property, also reduces data base's lower deployment cost.
With further reference to Fig. 4, as to the realization of method shown in above-mentioned Fig. 2, the application provides One embodiment of a kind of data storage device, this device embodiment and the method shown in Fig. 2 Embodiment is corresponding, and this device specifically can apply in various data platform server.
As shown in Figure 4, the data storage device 400 described in the present embodiment includes: collecting unit 401, memory element 402, unloading unit 403.Wherein, collecting unit 401 be used for gathering right Data center is monitored generated monitoring data;Memory element 402 is for being gathered Supervising data storage is in default key assignments type memory database;Unloading unit 403 is for by key The time that stores in value type memory database reaches the monitoring data conversion storage of preset duration threshold value to presetting Relationship type disk database in.
In the present embodiment, the collecting unit 401 of data storage device 400, memory element 402, The concrete process of unloading unit 403 is referred to the step 201 of Fig. 2 correspondence embodiment, step 202 and step 203, repeat no more here.
In some optional implementations of the present embodiment, unloading unit 403 can be used further In: reach preset duration threshold value with predetermined period by key assignments type memory database stores the time Monitoring data conversion storage is to relationship type disk database.Concrete process is referred in Fig. 2 embodiment Corresponding implementation, repeats no more here.
In some optional implementations of the present embodiment, monitoring data are that monitoring device is to data Center is monitored generation, and collecting unit 401 can be to be adopted by following either type Collection monitoring data: monitoring device periodically obtains equipment collection point and detects data center Acquired detected value, the detected value that the detected value obtained when this cycle and a upper cycle obtain When variable quantity or rate of change reach to preset variable quantity threshold value or rate of change threshold value, upload for representing The monitoring data of detected value;The monitoring data of acquisition are periodically carried out full dose and upload by monitoring device; According to subscription period timing indicated in default subscription information from monitoring device pulling data.
In some optional implementations of the present embodiment, monitoring device is multiple monitoring device, And each monitoring device operates under the control of unified time synchronized server.
In some optional implementations of the present embodiment, memory element 402 is further used for: To the same type monitoring data collected from different monitoring devices, carry out with unified storage format Storage.
In some optional implementations of the present embodiment, above-mentioned data storage device also includes solving Analysis unit, for after the monitoring device acquisition monitoring data of data center, using and number The message protocol of pattern matched of monitoring data is uploaded to collection according to the monitoring device at center To monitoring data resolve.
In some optional implementations of the present embodiment, above-mentioned data acquisition unit 401 sum Can be to be further used for gathering and resolve monitoring data by thread pool mode according to resolution unit.
In some optional implementations of the present embodiment, above-mentioned supervision packet includes polytype Monitoring data, and different types of monitoring data be respectively adopted different task queues deposit with Realizing asynchronous execution, the type of monitoring data at least includes real-time status monitoring data and alarm number According to.
In some optional implementations of the present embodiment, key assignments type memory database is deployed in place On at least two internal memory level storage medium in strange land, and memory element 402 is further used for: By same monitoring data respectively at least two internal memory level storage medium.
With further reference to Fig. 5, as to the realization of method shown in above-mentioned Fig. 3, the application provides One embodiment of a kind of data query arrangement, this device embodiment and the method shown in Fig. 3 Embodiment is corresponding, and this device specifically can apply in various data platform server.
As it is shown in figure 5, the data storage device 500 described in the present embodiment includes: receive unit 501, real-time monitoring data query unit 502, history monitoring data query unit 503.Wherein, Receive the inquiry request that unit 501 is used for receiving client to monitoring data, wherein monitor data Being that the equipment to data center is monitored generated data, this inquiry request includes for referring to Show inquiry real-time monitoring data or the parameter of history monitoring data;Real-time monitoring data query unit If 502 when the parameter instruction inquiry real-time monitoring data that inquiry request includes, from key assignments type Memory database obtains monitor data and feed back to client and be shown;History monitoring data If the parameter instruction query history monitoring data that query unit 503 includes for inquiry request, Relationship type disk database obtains monitor data and feed back to client and be shown.
In the present embodiment, data query arrangement 500 reception unit 501, monitor number in real time It is referred to Fig. 3 according to concrete process of query unit 502, history monitoring data query unit 503 The corresponding step 301 of embodiment, step 302 and step 303, repeat no more here.
Below with reference to Fig. 6, it illustrates the data platform be suitable to for realizing the embodiment of the present application The structural representation of the computer system 600 of server or presentation device.
As shown in Figure 6, computer system 600 includes CPU (CPU) 601, its Can be according to the program being stored in read only memory (ROM) 602 or from storage part 608 It is loaded into the program in random access storage device (RAM) 603 and performs various suitable action And process.In RAM 603, also storage has system 600 to operate required various program sums According to.CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input / output (I/O) interface 605 is also connected to bus 604.
It is connected to I/O interface 605: include the importation 606 of keyboard, mouse etc. with lower component; Including such as cathode ray tube (CRT), liquid crystal display (LCD) etc. and speaker etc. Output part 607;Storage part 608 including hard disk etc.;And include such as LAN card, The communications portion 609 of the NIC of modem etc..Communications portion 609 is via such as The network of the Internet performs communication process.Driver 610 is connected to I/O interface also according to needs 605.Detachable media 611, such as disk, CD, magneto-optic disk, semiconductor memory etc., Be arranged on as required in driver 610, in order to the computer program read from it according to Needs are mounted into storage part 608.
Especially, according to embodiment of the disclosure, the process described above with reference to flow chart is permissible It is implemented as computer software programs.Such as, embodiment of the disclosure and include a kind of computer journey Sequence product, it includes the computer program being tangibly embodied on machine readable media, described meter Calculation machine program comprises the program code for performing the method shown in flow chart.In such enforcement In example, this computer program can be downloaded and installed from network by communications portion 609, And/or be mounted from detachable media 611.
Flow chart in accompanying drawing and block diagram, it is illustrated that according to the various embodiment of the application system, Architectural framework in the cards, function and the operation of method and computer program product.This point On, each square frame in flow chart or block diagram can represent a module, program segment or code A part, a part for described module, program segment or code comprise one or more for Realize the executable instruction of the logic function of regulation.It should also be noted that at some as replacement In realization, the function marked in square frame can also be sent out to be different from the order marked in accompanying drawing Raw.Such as, two square frames succeedingly represented can essentially perform substantially in parallel, they Sometimes can also perform in the opposite order, this is depending on involved function.It is also noted that It is, the square frame in each square frame in block diagram and/or flow chart and block diagram and/or flow chart Combination, can realize by the special hardware based system of the function or operation that perform regulation, Or can realize with the combination of specialized hardware with computer instruction.
Being described in the embodiment of the present application involved unit can be real by the way of software Existing, it is also possible to realize by the way of hardware.Described unit can also be arranged on process In device, for example, it is possible to be described as: a kind of processor includes collecting unit, memory element, turns Memory cell.Wherein, the title of these unit is not intended that under certain conditions to this unit itself Restriction, such as, collecting unit be also described as " gather data center is monitored The unit of the monitoring data generated ".
As on the other hand, present invention also provides a kind of nonvolatile computer storage media, This nonvolatile computer storage media can be described in above-described embodiment included in device Nonvolatile computer storage media;Can also be individualism, be unkitted allocate in terminal non- Volatile computer storage medium.Above-mentioned nonvolatile computer storage media storage have one or The multiple program of person, when one or more program is performed by an equipment so that described Equipment: gather and data center is monitored generated monitoring data;The monitoring that will be gathered Data are stored in default key assignments type memory database;By in described key assignments type memory database The storage time reaches the monitoring data conversion storage of preset duration threshold value to the relationship type data in magnetic disk preset In storehouse.Or, above-mentioned nonvolatile computer storage media storage has one or more program, When one or more program is performed by an equipment so that described equipment: receive visitor The family end inquiry request to monitoring data, wherein said monitoring data are the equipment to data center Being monitored generated data, described inquiry request includes for indicating inquiry to monitor number in real time According to or history monitoring data parameter;If the parameter instruction inquiry that described inquiry request includes is in real time During monitoring data, from key assignments type memory database, obtain monitoring data and feed back to described client End is shown;If the parameter instruction query history monitoring data that described inquiry request includes, Relationship type disk database obtains monitor data and feed back to described client and be shown;Its In, described key assignments type memory database is gathered for the storage when being acquired monitoring data Monitoring data, described relationship type disk database is for described key assignments type memory database The middle storage time reaches the monitoring data of preset duration and carries out the monitoring number of storage institute unloading during unloading According to.
Above description is only the preferred embodiment of the application and saying institute's application technology principle Bright.It will be appreciated by those skilled in the art that invention scope involved in the application, do not limit In the technical scheme of the particular combination of above-mentioned technical characteristic, also should contain simultaneously without departing from In the case of described inventive concept, above-mentioned technical characteristic or its equivalent feature carry out combination in any And other technical scheme formed.Such as features described above and (but not limited to) disclosed herein The technical characteristic with similar functions is replaced mutually and the technical scheme that formed.

Claims (12)

1. a date storage method, it is characterised in that described method includes:
Gather and data center is monitored generated monitoring data;
By the supervising data storage that gathered in default key assignments type memory database;
The monitoring number of preset duration threshold value is reached by described key assignments type memory database stores the time According to dumping in the relationship type disk database preset.
Method the most according to claim 1, it is characterised in that described by described key assignments type The time that stores in memory database reaches the monitoring data conversion storage of preset duration threshold value to the pass preset It is type disk database, including:
With predetermined period by described key assignments type memory database store the time reach described default time The monitoring data conversion storage of long threshold value is to described relationship type disk database.
Method the most according to claim 1, it is characterised in that described monitoring data are prisons Control equipment is monitored generation to described data center;And
It is by following arbitrary that described collection is monitored generated monitoring data to data center Mode gathers:
Monitoring device periodically obtains equipment collection point and carries out described data center acquired in detection Detected value, the variable quantity of the detected value that the detected value obtained when this cycle and a upper cycle obtain Or rate of change reaches to preset variable quantity threshold value or during rate of change threshold value, upload for representing detected value Monitoring data;
The monitoring data of acquisition are periodically carried out full dose and upload by monitoring device;
Number is pulled from monitoring device according to subscription period timing indicated in default subscription information According to.
Method the most according to claim 3, it is characterised in that described monitoring device is many Individual monitoring device, and each monitoring device carries out under the control of unified time synchronized server Operation.
Method the most according to claim 4, it is characterised in that the described prison that will be gathered Control data are stored in default key assignments type memory database, including:
To the same type monitoring data collected from different monitoring devices, with unified storage format Store.
Method the most according to claim 1, it is characterised in that described from data center Monitoring device acquisition monitoring data after, described method also includes:
The monitoring device with described data center is used to be uploaded the pattern matched of monitoring data Message protocol the monitoring data collected are resolved.
Method the most according to claim 6, it is characterised in that described collection is in data The heart is monitored the monitoring of generated monitoring data and described use and described data center and sets The monitoring data collected are entered by the message protocol of the standby pattern matched being uploaded monitoring data Row resolves, including:
Gather and resolve monitoring data by thread pool mode.
Method the most according to claim 7, it is characterised in that described supervision packet includes Polytype monitoring data, and different types of monitoring data are respectively adopted different task teams Row deposit to realize asynchronous execution, and the type of described monitoring data at least includes real-time status monitoring Data and alarm data.
Method the most according to claim 1, it is characterised in that poke in described key assignments type It is deployed according to storehouse at least two internal memory level storage medium being in strange land, and
Described by the supervising data storage gathered in default key assignments type memory database, bag Include:
By same monitoring data respectively in described at least two internal memory level storage medium.
10. a data query method, it is characterised in that described method also includes:
Receiving the client inquiry request to monitoring data, wherein said monitoring data are to data The equipment at center is monitored generated data, and described inquiry request includes for indicating inquiry Real-time monitoring data or the parameter of history monitoring data;
If during the parameter instruction inquiry real-time monitoring data that described inquiry request includes, from key assignments type Memory database obtains monitor data and feed back to described client and be shown;
If the parameter instruction query history monitoring data that described inquiry request includes, at relationship type magnetic Dish data base obtains monitor data and feed back to described client and be shown;
Wherein, described key assignments type memory database is for the storage when being acquired monitoring data The monitoring data gathered, described relationship type disk database is for described key assignments type internal memory The time that stores in data base reaches the monitoring data of preset duration and carries out storage institute unloading during unloading Monitoring data.
11. 1 kinds of data storage devices, it is characterised in that described device includes:
Collecting unit, is monitored generated monitoring data for gathering to data center;
Memory element, for the supervising data storage poke in default key assignments type that will be gathered According in storehouse;
Unloading unit, during for reaching to preset by the time that stores in described key assignments type memory database The monitoring data conversion storage of long threshold value is in default relationship type disk database.
12. 1 kinds of data query arrangement, it is characterised in that described device also includes:
Receive unit, for receiving the client inquiry request to monitoring data, wherein said prison Control data are that the equipment to data center is monitored generated data, described inquiry request bag Include for indicating inquiry real-time monitoring data or the parameter of history monitoring data;
Real-time monitoring data acquiring unit, if the parameter instruction included for described inquiry request is looked into When asking real-time monitoring data, from key assignments type memory database, obtain monitoring data and feed back to institute State client to be shown;
History monitoring data capture unit, if the parameter instruction included for described inquiry request is looked into Ask history monitoring data, relationship type disk database obtains monitoring data and feeds back to described Client is shown;
Wherein, described key assignments type memory database is for the storage when being acquired monitoring data The monitoring data gathered, described relationship type disk database is for described key assignments type internal memory The time that stores in data base reaches the monitoring data of preset duration and carries out storage institute unloading during unloading Monitoring data.
CN201610267040.1A 2016-04-26 2016-04-26 Data storage method and data query method and device CN105912703A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610267040.1A CN105912703A (en) 2016-04-26 2016-04-26 Data storage method and data query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610267040.1A CN105912703A (en) 2016-04-26 2016-04-26 Data storage method and data query method and device

Publications (1)

Publication Number Publication Date
CN105912703A true CN105912703A (en) 2016-08-31

Family

ID=56752973

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610267040.1A CN105912703A (en) 2016-04-26 2016-04-26 Data storage method and data query method and device

Country Status (1)

Country Link
CN (1) CN105912703A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106856508A (en) * 2017-02-08 2017-06-16 北京百度网讯科技有限公司 The cloud monitoring method and cloud platform of data center
CN106959996A (en) * 2017-01-20 2017-07-18 华数传媒网络有限公司 A kind of back-end data synchronous method based on internet television
CN107153912A (en) * 2017-04-11 2017-09-12 广州市食蚁兽网络技术有限公司 One kind growth intelligent data analysis system
CN107844524A (en) * 2017-10-12 2018-03-27 金蝶软件(中国)有限公司 Data processing method, data processing equipment, computer equipment and storage medium
CN108134716A (en) * 2017-12-25 2018-06-08 千寻位置网络有限公司 Broadcast the monitoring method of data and system, control terminal, memory
CN108595302A (en) * 2018-04-04 2018-09-28 厦门科灿信息技术有限公司 A kind of data management-control method and system for monitoring system
CN110162557A (en) * 2019-04-01 2019-08-23 深圳达实智能股份有限公司 Big data quantity concurrent access method and electronic equipment based on real-time data base
CN110321373A (en) * 2019-07-12 2019-10-11 中国农业银行股份有限公司 A kind of query statistic method, apparatus and system
CN110417838A (en) * 2018-04-28 2019-11-05 华为技术有限公司 A kind of method of data synchronization and synchronous service equipment
WO2019218513A1 (en) * 2018-05-16 2019-11-21 平安科技(深圳)有限公司 Apparatus and method for monitoring testing process, and computer-readable storage medium
CN111258509A (en) * 2020-02-26 2020-06-09 于梦丽 Big data analysis system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104932408A (en) * 2015-05-28 2015-09-23 冶金自动化研究设计院 Industrial real-time data acquisition system based on RTUs and real-time database
CN105373347A (en) * 2015-10-23 2016-03-02 浪潮(北京)电子信息产业有限公司 Hot data identification and scheduling method and system for storage system
CN105426482A (en) * 2015-11-20 2016-03-23 华东交通大学 Figure-database integrated HBase transfer storage method of massive monitoring information of 10kV railway power distribution network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104932408A (en) * 2015-05-28 2015-09-23 冶金自动化研究设计院 Industrial real-time data acquisition system based on RTUs and real-time database
CN105373347A (en) * 2015-10-23 2016-03-02 浪潮(北京)电子信息产业有限公司 Hot data identification and scheduling method and system for storage system
CN105426482A (en) * 2015-11-20 2016-03-23 华东交通大学 Figure-database integrated HBase transfer storage method of massive monitoring information of 10kV railway power distribution network

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106959996A (en) * 2017-01-20 2017-07-18 华数传媒网络有限公司 A kind of back-end data synchronous method based on internet television
CN106856508A (en) * 2017-02-08 2017-06-16 北京百度网讯科技有限公司 The cloud monitoring method and cloud platform of data center
CN107153912A (en) * 2017-04-11 2017-09-12 广州市食蚁兽网络技术有限公司 One kind growth intelligent data analysis system
CN107844524A (en) * 2017-10-12 2018-03-27 金蝶软件(中国)有限公司 Data processing method, data processing equipment, computer equipment and storage medium
CN108134716A (en) * 2017-12-25 2018-06-08 千寻位置网络有限公司 Broadcast the monitoring method of data and system, control terminal, memory
CN108595302A (en) * 2018-04-04 2018-09-28 厦门科灿信息技术有限公司 A kind of data management-control method and system for monitoring system
CN110417838A (en) * 2018-04-28 2019-11-05 华为技术有限公司 A kind of method of data synchronization and synchronous service equipment
WO2019218513A1 (en) * 2018-05-16 2019-11-21 平安科技(深圳)有限公司 Apparatus and method for monitoring testing process, and computer-readable storage medium
CN110162557A (en) * 2019-04-01 2019-08-23 深圳达实智能股份有限公司 Big data quantity concurrent access method and electronic equipment based on real-time data base
CN110321373A (en) * 2019-07-12 2019-10-11 中国农业银行股份有限公司 A kind of query statistic method, apparatus and system
CN111258509A (en) * 2020-02-26 2020-06-09 于梦丽 Big data analysis system

Similar Documents

Publication Publication Date Title
US10191529B2 (en) Real-time data management for a power grid
Hashem et al. The role of big data in smart city
US20190116271A1 (en) Application resource usage information
Jiang et al. Rethinking behaviors and activities of base stations in mobile cellular networks based on big data analysis
CN105074679B (en) System and method for developing, disposing and implementing the application of power system computation machine
Hong et al. IoT-based smart garbage system for efficient food waste management
CN104115139B (en) Configurable workflow ability is provided
Sherchan et al. Using on-the-move mining for mobile crowdsensing
Jaradat et al. The internet of energy: smart sensor networks and big data management for smart grid
Khanna et al. Unravelling relationships: Hospital occupancy levels, discharge timing and emergency department access block
CN101981531B (en) Aggregating recurrent schedules to optimize resource consumption
AU2005239409B2 (en) System and method for efficient configuration in a fixed network automated meter reading system
CN102498739B (en) The feedback about the power consumption in battery-operated electronic equipment is provided to user
CN103197138B (en) A kind of intelligent electric meter and monitoring method with power supply reliability and rate of qualified voltage monitoring function
CN104641245B (en) The method, apparatus and system of detection device electricity
CN105338061B (en) A kind of implementation method and system of lightweight messages middleware
CN104520815B (en) A kind of method and device of task schedule
CN104821612B (en) Charging circuit and electronic equipment with charging circuit
US7930143B2 (en) Systems and methods for sensor-based computing
US10650336B2 (en) Method and system for adaptively switching prediction strategies optimizing time-variant energy consumption of built environment
Jayaraman et al. Scalable energy-efficient distributed data analytics for crowdsensing applications in mobile environments
JP2017530570A (en) RF energy harvesting by network nodes
CN101453743B (en) Real-time monitoring system, apparatus and method
CN105354290B (en) A kind of method and system for searching specific people based on mobile terminal MAC Address
Alippi et al. Energy management in wireless sensor networks with energy-hungry sensors

Legal Events

Date Code Title Description
PB01 Publication
C06 Publication
SE01 Entry into force of request for substantive examination
C10 Entry into substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160831

RJ01 Rejection of invention patent application after publication