CN1294516C - Modeling memory and access method of real time database - Google Patents

Modeling memory and access method of real time database Download PDF

Info

Publication number
CN1294516C
CN1294516C CNB2004100146245A CN200410014624A CN1294516C CN 1294516 C CN1294516 C CN 1294516C CN B2004100146245 A CNB2004100146245 A CN B2004100146245A CN 200410014624 A CN200410014624 A CN 200410014624A CN 1294516 C CN1294516 C CN 1294516C
Authority
CN
China
Prior art keywords
data
real
time
disk
model
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.)
Expired - Fee Related
Application number
CNB2004100146245A
Other languages
Chinese (zh)
Other versions
CN1564158A (en
Inventor
刘奇志
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University
Original Assignee
Nanjing University
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 Nanjing University filed Critical Nanjing University
Priority to CNB2004100146245A priority Critical patent/CN1294516C/en
Publication of CN1564158A publication Critical patent/CN1564158A/en
Application granted granted Critical
Publication of CN1294516C publication Critical patent/CN1294516C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

The present invention relates to a data modeling method of a real-time database and a storage and access method of the database on account of the modeling method. In the data modeling method, information comtained in all real-time measurement and control data items is split into static information and dynamic information, wherein the static information is expressed by a traditional E-R model, and the dynamic information is expressed by a clockface model. In the storage method of the database, the E-R model which expresses the static information is converted into a relation model and a two-dimensional table structure and is stored in a magnetic disc record-oriented file, the clockface model for expressing the dynamic information is stored in a magnetic disc stream-oriented, and the name of the magnetic disc stream-oriented and the names of the real-time measurement and control data items are consistent. In the access method, the time offset quantity of access data and an O point is calculated according to the time parameters of the access data, and furthermore, the offset quantity of a physical address is calculated. Then, the operation of reading or writing is carried out by direct positioning on the physical address of a magnetic disc. The present invention scores tense information in a real-time measurement and control data stream in a certain sampling period with a clockface, indexes do not need to be built, and the space-time resource of spending needed by management data is reduced.

Description

Real-time data base modeling, storage and access method
Technical field
The present invention relates to the real-time data base field, especially a kind of real-time data base modeling method reaches data storage and the data bank access method based on this modeling method.
Background technology
Conventional database systems generally adopts entity-contact model (E-R model) or expands entity-contact model (EE-R model) and come real application data is carried out modeling (conceptual model), and present the most widely used relevant database converts this conceptual model to relational model and then converts bivariate table version to stores data.This pattern easy to understand, but can not satisfy the demand of real-time system data handling utility.Its limitation is mainly reflected in following two aspects: at first be the restriction on the data model, the two-dimentional form data model that relational database adopted can not be handled three-dimensional or the multidimensional data that has temporal information effectively, the result has set up a large amount of tables often, with complicated mode handle, but still be difficult to imitate out the reality relation of data, what is worse, the connection between these tables often is hidden in the application program, rather than is present in the database that is easier to manage; The secondth, the restriction on the performance, for static application for example the relational database management system that designs of report generation be not to optimize for efficient data processing, though consequently some relational database management system can obtained satisfied performance on the specifically developed burn-in test procedure of this industry, its performance is but also unsatisfactory in the real world of real time data processing.
That is to say, because in real-time system, observing and controlling information comprises important temporal information in real time, conventional database systems is used as common parameter (attribute) to temporal information and is treated, cause that record count is rapid inflationary spiral in the database of these application systems, such as sampling period of a data item be 1s, then will produce 3600 records in 1 hour, in different again continuous TT﹠C system of a plurality of data item and their sampling period was arranged, the speed that the record number increases was well imagined; And the time of real-time system and space resources are generally all not too sufficient, so it is undesirable always that traditional database technique is applied in the real-time system efficient.
In brief, traditional database technique is applied in the real-time system, the model expressive force is not enough, and storage and access efficiency are low, all the more so under the numerous situation of record count, often need in the practical application to raise the efficiency, yet set up the cost that index needs spended time and storage space by index technology.
Technology such as the object relationship database in the database new technology attempt to change this present situation, but its essence is some characteristics that on the basis of relational database, merge Object-oriented Technique and traditional database, and new programming tool environment, to adapt to the new application based on Internet Web, the method to The design of real-time database does not propose basic suggestion.
No. 00811092 application documents of Chinese patent disclose " collections of the statistical figure of real-time data base object " (international application no: PCT/US00/17491), it is the method for coming the real-time statistics numeral of acquisition database object by data base management system (DBMS), its thought is based on the data processing of existing relational model, is not the method that at all solves real-time data base storage and access efficiency.
No. 00818943 application documents of Chinese patent disclose " information modelling approach and the database search method that utilizes modeling method " (international application no: PCT/KR00/00505), it is a kind of data parsing to be become semantic primitive, receive the information modelling approach of various data, comprise the spatial information data of time information data and indicating positions and the data of other type, not method, can not solve efficiency at real-time dataBase system.
No. 6644549 application documents of U.S. Pat disclose " Portable terminal with real-timedatabase access; printing and display ", it is a kind of terminal device that has real-time data base, its employed real-time data base technology is still traditional database technique, does not relate to the technology of improving or transforming rdal-time DBMS itself.
No. 6556882 application documents of U.S. Pat disclose " Method and apparatus for generatingreal-time data from static files ", it comprises a kind of with the method for real-time data memory in the static file database, this method purpose is to move manufacturing system with the imitation of the data in static file database real time data stream, so that analyze the performance of manufacturing system network, not the method that solves the efficiency of real-time data base own.
Summary of the invention
The objective of the invention is: in order to overcome present real-time data base storage and the low technical matters of access efficiency.
Further, technical matters to be solved by this invention is to ignore the technical matters of temporal information and disk storage structure in order to overcome present Database Modeling method.
Correspondingly, purpose of the present invention also comprises: a kind of date storage method and data bank access method based on above-mentioned modeling method is provided.
The technical scheme that realizes the object of the invention and take is summarized as follows:
A kind of modeling method of real-time data base real application data is provided, comprises employing the following step: at first, with the static information in all real-time measuring and control data items (as the data key name claim, the sampling period) separate, use the E-R model representation; Then the multidate information (as measured value) in each real-time measuring and control data is come out with the clock face model representation.In the clock face model, a clock face is represented a data item, marks the title and the sampling period of data item in the clock face, 0 expression initial moment of sampling of clock face.If the data item in identical sampling period is arranged, then may be incorporated on the same clock face.
Based on above-mentioned modeling method, a kind of storage means of real time data is provided, comprise employing the following step: the E-R model conversation that will represent static information becomes relational model and bivariate table structure to deposit magnetic disc storage formula file in; Deposit the clock face model of expression multidate information in the disk stream-oriented file, disk stream-oriented file name is with in real time the measuring and control data key name is consistent, when initial moment is sampled in 0 expression of clock face, and the initial memory address of corresponding disk.
Based on above-mentioned data modeling method and storage means, a kind of access method of real-time data base is provided, comprise employing the following step: search disk stream-oriented file name according to the visit data key name, according to the time parameter calculating of visit data and 0 time offset, and then calculate the physical address side-play amount, directly be positioned the disk physical address then, thereby the operation that reads or writes need not to set up index.Here, because the inherent characteristic of real-time measuring and control data, the regulation write operation can only be made amendment, and can not delete or insert.If visit data requires to relate to static information then opens magnetic disc storage formula file, because this moment, magnetic disc storage formula file was only stored static information, data volume is little, and the record number is few, so by traditional access mode visit.
Characteristics of the present invention are: the modeling of the multidate information in the static information in the database data item and each real-time measuring and control data is combined, especially pay attention to multidate information and, can solve the low problem of available data library storage and access efficiency with the most rational disk storage method.
The present invention delineates the temporal information in the real-time measuring and control data stream in certain sampling period with clock face, static information in the real-time observing and controlling information and multidate information are used record-oriented file and stream-oriented file separate storage respectively, the visit of convection type file can be carried out data locking according to time offset computational physics address offset amount, need not to set up index, reduce the time null resource of the required expense of management data, significant to the efficient and the performance that improve real-time system.Adopt technical scheme of the present invention, provide a kind of data modeling method of real-time data base and based on the data storage and the data bank access method of this kind modeling method, the engineering staff adopts this modeling method conceputal modeling with comparalive ease, Database Systems software adopts this storage means and access method can accelerate data storage and database access efficient, greatly improves the performance of real-time system.
Description of drawings
Fig. 1 clock face model structure synoptic diagram
Fig. 2 logical address space figure
Embodiment
Below in conjunction with accompanying drawing, the mode of an enforcement of the present invention is described:
At first, real-time system is carried out demand analysis, define which measuring and control data, static information in all real-time measuring and control data items (comprising that data item ID, data item title, measuring unit, analog quantity still are digital quantity, sampling period, high alarm setting, low alarm limit or the like) is separated, with traditional E-R model representation,, because being the engineering staff, data item name names, as primary key with data item ID or data item name so can guarantee not bear the same name; Then the multidate information in each real-time measuring and control data (comprising time and measured value) is come out with the clock face model representation.In the clock face model, a clock face is represented a data item, the circular visual representation of clock face, and the title of data item is indicated with literal in center of circle below, an acute angle is drawn in top, the center of circle, indicates the sampling period in the acute angle, 0 expression initial moment of sampling of clock face.If the data item in identical sampling period is arranged, then may be incorporated on the same clock face, the data item title that is about to the identical sampling period writes in the same clock face, cuts apart with comma, as shown in Figure 1.
Based on above-mentioned modeling method, a kind of storage means of real time data is provided, comprise employing the following step: the E-R model conversation that will represent static information becomes relational model and bivariate table structure to deposit magnetic disc storage formula file in; Deposit the clock face model of expression multidate information in the disk stream-oriented file.Stream-oriented file refers to that the data in the file do not form the record form, just a string ensemble of communication successively.Disk stream-oriented file name is with in real time the measuring and control data key name is consistent, in the time of initial moment of 0 expression sampling of clock face, and the initial memory address of corresponding disk.The logical address space of stream-oriented file distributes as shown in Figure 2, and the memory address number of data is made up of three parts: right cylinder number, read/write is No.1 and sector number.During the storage dynamic data, the pairing stream-oriented file of different pieces of information item can be stored on the different right cylinders, also be that the real-time measuring and control data of same data item all is positioned on the same right cylinder.Can data quantity stored determine on the same right cylinder by hardware, disc group such as a single driver, 6 discs are arranged, 10 magnetic heads, cylinder number is 1200, selected cylindrical magnetic track has 32 sectors, and 512B can be deposited in each sector, and then this right cylinder can be deposited 10 * 32 * 512=163840B data.Suppose that measuring and control data item of storage needs 4 byte spaces, then can store the data of more than 40,000 sampling on this right cylinder.Then this disk can be stored more than 40,000 sampled result of 1200 data item.
Based on above-mentioned data modeling method and storage means, a kind of access method of real-time data base is provided, comprise employing the following step: if visit data requires to relate to static information then opens magnetic disc storage formula file, because this moment, magnetic disc storage formula file was only stored static information, data volume is little, the record number is few, so by traditional access mode visit.Visit for real-time measuring and control data, earlier search disk stream-oriented file name according to the visit data key name, then according to the sample time offset in the initial moment of the time parameter of visit data and sampling period computed range, and then the physical address side-play amount at reckoning data place, directly be positioned the disk physical address then, thus the operation that reads or writes.Such as, if the sampling period is 1S, initial moment of sampling is 8:10:10, one time the temperature sampling value accounts for 4 bytes, the file start sector number is xxxx10, if the temperature sampling value that will inquire about 9:00:00, then time offset is (9-8) * 3600+ (0-10) * 60+ (0-10)=2990, the address offset amount is 2990 * 4/512=23, then directly is positioned the xxxx33 sector and carries out read operation.Here, because the inherent characteristic of real-time measuring and control data, the regulation write operation can only be made amendment, and can not delete or insert.
Further, the storage mode of sampled data in the sector can take up space according to sampling period and each sampled data and decide, such as sector for 512 bytes, a sector can be deposited sampled data 128 times, if each sampled data will account for 4 bytes, for with the time correspondence, can allow each sector deposit sampled data 120 times, so that the accurate location of data.Zone bit can also be set in data stream, be about to sampling instant and deposit in pairs with sampled value, so as after to obtain sector data further specified data value.
Operating unit that what deserves to be explained is disk is the sector, use magnetic disk memory, during concrete operations, according to the disk address that provides, the lever arm subassembly is positioned specified cylinder do mechanical motion, simultaneity factor selects the read/write head of appointment to determine magnetic track, final read/write head is followed the tracks of the magnetic track of rotation, the address of each sector when reading rotation, when this address is consistent with giving disk address, disk buffer in the internal memory is read in the data in this address in system, or from disk buffer data is write the designated disk address, finishes a disk read-write operation.
More than disclosed real-time data base modeling, storage and the access method of relating to specifically described, those skilled in the art can understand and implement, do not departing under the scope of the invention situation, can carry out the various modifications of form and details to modeling, storage and access method, therefore above advised but the modification that do not limit all within the scope of the present invention.

Claims (3)

1, a kind of storage means of real-time data base is characterized in that adopting the following step: at first, the static information in all real-time measuring and control data items is separated, with entity one contact E-R model representation; Then the multidate information in each real-time measuring and control data is come out with the clock face model representation; Become relational model and bivariate table structure to deposit magnetic disc storage formula file in the E-R model conversation of expression static information; Deposit the clock face model of expression multidate information in the disk stream-oriented file; In the clock face model, a clock face is represented a data item, and clock face is represented with circle, indicate the title of data item below the center of circle with literal, an acute angle is drawn in top, the center of circle, indicates the sampling period in the acute angle, in the time of initial moment of 0 of clock face expression sampling, the initial memory address of corresponding disk; The memory address number of data is made up of three parts: right cylinder number, read/write is No.1 and sector number; Disk stream-oriented file name is with the measuring and control data key name is consistent in real time; During the storage dynamic data, the pairing stream-oriented file of different pieces of information item is stored on the different right cylinders, promptly the real-time measuring and control data of same data item all is positioned on the same right cylinder.
2, the storage means of real-time data base according to claim 1 is characterized in that having the data item in identical sampling period, then is incorporated on the same clock face.
3, the storage means of real-time data base according to claim 1, its feature are that also data store at disk sector, and the operating unit of disk is the sector; According to the disk address that provides, the lever arm subassembly is positioned specified cylinder do mechanical motion, the read/write head of selecting appointment simultaneously is to determine magnetic track, final read/write head is followed the tracks of the magnetic track of rotation, read the address of each sector of when rotation, when this address is consistent with giving disk address, the data in this address are read in disk buffer in the internal memory, or data are write the designated disk address from disk buffer, finish a disk read-write operation.
CNB2004100146245A 2004-04-12 2004-04-12 Modeling memory and access method of real time database Expired - Fee Related CN1294516C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100146245A CN1294516C (en) 2004-04-12 2004-04-12 Modeling memory and access method of real time database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100146245A CN1294516C (en) 2004-04-12 2004-04-12 Modeling memory and access method of real time database

Publications (2)

Publication Number Publication Date
CN1564158A CN1564158A (en) 2005-01-12
CN1294516C true CN1294516C (en) 2007-01-10

Family

ID=34478488

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100146245A Expired - Fee Related CN1294516C (en) 2004-04-12 2004-04-12 Modeling memory and access method of real time database

Country Status (1)

Country Link
CN (1) CN1294516C (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100507869C (en) * 2006-10-10 2009-07-01 国际商业机器公司 Method for analyzing system performance sampled data based on relational model, equipment and system
US9626421B2 (en) * 2007-09-21 2017-04-18 Hasso-Plattner-Institut Fur Softwaresystemtechnik Gmbh ETL-less zero-redundancy system and method for reporting OLTP data
CN101520787B (en) * 2008-03-19 2011-04-06 中国科学院自动化研究所 Method for storing real-time data
CN101354270B (en) * 2008-05-05 2010-06-02 国网南京自动化研究院 Method for storing electric power scheduling mass data
CN102446183A (en) * 2010-10-12 2012-05-09 上海可鲁系统软件有限公司 Industrial data storage method
CN102541925A (en) * 2010-12-21 2012-07-04 中国移动通信集团山西有限公司 Method and device for rapidly storing and retrieving detailed tickets
CN102542029A (en) * 2011-12-22 2012-07-04 沈阳中科博微自动化技术有限公司 Block compressed storage method of industrial data
CN103353891B (en) * 2013-07-05 2017-03-29 北京人大金仓信息技术股份有限公司 Data base management system and its data processing method
CN104408097B (en) * 2014-11-17 2018-07-20 深圳市比一比网络科技有限公司 One kind is based on the newer hybrid index method and system of character field heat
DE102015108859B4 (en) * 2015-06-03 2018-12-27 Cortec Gmbh Method and system for processing data streams
CN107967360A (en) * 2017-12-22 2018-04-27 广东雅达电子股份有限公司 A kind of real-time data base file memory method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4868866A (en) * 1984-12-28 1989-09-19 Mcgraw-Hill Inc. Broadcast data distribution system
CN1190477A (en) * 1995-07-07 1998-08-12 瓦尔数据公司 Method and apparatus for modifying existing relational database schemas to reflect changes made in corresponding object model
US6063128A (en) * 1996-03-06 2000-05-16 Bentley Systems, Incorporated Object-oriented computerized modeling system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4868866A (en) * 1984-12-28 1989-09-19 Mcgraw-Hill Inc. Broadcast data distribution system
CN1190477A (en) * 1995-07-07 1998-08-12 瓦尔数据公司 Method and apparatus for modifying existing relational database schemas to reflect changes made in corresponding object model
US6063128A (en) * 1996-03-06 2000-05-16 Bentley Systems, Incorporated Object-oriented computerized modeling system

Also Published As

Publication number Publication date
CN1564158A (en) 2005-01-12

Similar Documents

Publication Publication Date Title
CN104504105B (en) A kind of storage method of real-time data base
CN1294516C (en) Modeling memory and access method of real time database
US5943677A (en) Sparsity management system for multi-dimensional databases
CN103366015B (en) A kind of OLAP data based on Hadoop stores and querying method
EP3007081B1 (en) Processing spatiotemporal data records
CN107402958A (en) A kind of establishment in GKF three-dimensional space datas storehouse and access method
CN108009979A (en) Three-dimensional point cloud compression and storage method and system based on space-time data fusion
CN103605805A (en) Storage method of massive time series data
JP2003330964A (en) Database system
CN1139489A (en) Apparatus for accelerating processing of transactions on computer databases
EP2916240A1 (en) Database storage system based on compact disk and method using the system
CN102231155A (en) Method for managing and organizing three-dimensional seismic data
CN102693286A (en) Method for organizing and managing file content and metadata
CN101587484B (en) Index method for main storage database based on T-lt tree
WO2015168988A1 (en) Data index creation method and device, and computer storage medium
Gong et al. Multi-level layout optimization for efficient spatio-temporal queries on isabela-compressed data
CN101975058A (en) Search method and device of borehole log data
Cohen et al. Scientific formats for object-relational database systems: a study of suitability and performance
CN102253947B (en) Method capable of progressively transmitting for storing and accessing aggregated vector data
US11803450B2 (en) Creating a tree of database states
US20220197885A1 (en) Hybrid shadow paging for storing a database
US7542974B2 (en) Apparatus and method to store, retrieve, and search both analog and digital data
Du et al. Out-of-core volume rendering for time-varying fields using a space-partitioning time (SPT) tree
US7529747B2 (en) Apparatus and method to store, retrieve, and search information
Karayannidis et al. SISYPHUS: A Chunk-Based Storage Manager for OLAP Cubes.

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C19 Lapse of patent right due to non-payment of the annual fee
CF01 Termination of patent right due to non-payment of annual fee