CN101051324A - Transaction managing method for internal storage data bank - Google Patents

Transaction managing method for internal storage data bank Download PDF

Info

Publication number
CN101051324A
CN101051324A CN 200710103758 CN200710103758A CN101051324A CN 101051324 A CN101051324 A CN 101051324A CN 200710103758 CN200710103758 CN 200710103758 CN 200710103758 A CN200710103758 A CN 200710103758A CN 101051324 A CN101051324 A CN 101051324A
Authority
CN
Grant status
Application
Patent type
Prior art keywords
storage
internal
mark
databank
data
Prior art date
Application number
CN 200710103758
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

Links

Abstract

An affairs managing method of internal memory databank includes providing data to internal memory databank by background of operation-maintenance subsystem, setting preset disc-storage mark in nonvolatile storage media to be unfinished mark, storing data in internal memory databank into said nonvolatile storage media and setting said disc-storage mark to be finished mark after process of storing data in internal memory databank to said nonvolatile storage media is finalized.

Description

一种内存数据库的事务管理方法 Transaction management method for memory database

技术领域 FIELD

本发明涉及内存数据库的管理方法,特别是一种内存数据库的事务管理方法。 Memory database management method of the present invention relates, in particular, a method of memory management transaction database.

背景技术 Background technique

随着嵌入式软件的广泛应用,软件系统中需要保存的数据大量出现,内存数据库的需求大量增加,事务操作是内存数据库最本质的操作之一,它的目的就是为了保证一次操作能够完全进行,为了保证事务操作能够永久的提交,通常是将内存数据库修改的数据保存在非易失的介质上后才回应事务提交完成。 With the extensive application of embedded software, software systems need to save the data appeared in large numbers, a substantial increase in demand for memory database, transaction operation operation is one of the most essential memory database, its purpose is to ensure a single operation can be carried out completely, in order to ensure permanent transaction operations can be submitted, usually the in-memory database to modify data stored on non-volatile media response after the completion of the transaction commits. 但在嵌入式系统中,I/O操作时间要求与嵌入式本身的时间要求来比相对较长,尤其是当需要考虑成本的时候,可能会选择I/O性能比较低的物理介质,这样写非易失存储介质的时间相对来说又会大大加长。 However, in embedded systems, I / O operation time and the time required for embedded itself requires a relatively long ratio, especially when considering the cost of the time required, may choose to I / O performance of the physical medium is relatively low, write time nonvolatile storage medium will be relatively much longer.

由于嵌入式系统中写文件的时间相对比较长,用户不得不忍受较长的事务操作。 Because the embedded file system write time is relatively long, users have to endure a long transaction operations. 那么目前对于实时性要求比较高的应用,用户为了提高事务处理的速度只有尽量减少写文件的内容以及写文件的次数、或者是使用读写性能更高的物理介质,这样处理的方式要么会因为选择存盘的数据而增加应用程序的复杂度,要么会因为选择性能较高的物理介质而增加用户的成本。 Then the current high demand for real-time applications, users in order to improve the speed of the transaction only to minimize the contents of the file and write the number of write files, or use a higher reading and writing performance of physical media, either way this treatment because select save data increases the complexity of the application, either because of the higher performance of selected physical medium increases the user's cost.

发明内容 SUMMARY

本发明目的在于提供一种使内存数据库的实时提交能够被完整处理的改进的内存数据库的事务管理方法。 The present invention aims to provide a real-time memory database that the submission of transaction management can be improved method of processing a complete memory database.

鉴于上述目的,本发明提供了一种内存数据库的事务管理方法,包括以下步骤:步骤1,操作维护子系统(Operating And Maintenance Subsystem,以下简称OMS)后台将数据提交到内存数据库;步骤2,设置非易失存储介质中预设的存盘标志为未完成,然后内存数据库中的数据存入上述非易失存储介质;步骤3,当内存数据库中的数据存入上述非易失存储介质的存储过程完成后,将上述存盘标志设置为已完成。 In view of the above-described object, the present invention provides a method for managing memory database transaction, comprising the following steps: Step 1, an operation and maintenance subsystem (Operating And Maintenance Subsystem, hereinafter referred to as OMS) submit data to a background memory database; Step 2, provided nonvolatile storage medium preset save flag is not completed, then the data stored in said memory database in non-volatile memory medium; step 3, when the data stored in said memory database in non-volatile storage medium storing procedure When finished, the flag is set to save the above has been completed.

其中,如果上述存储过程没有完成,而是在进行过程中出现异常,例如意外中断等,则停止存储过程,不对上述存盘标志改动,其仍为未完成,以便系统启动后重新提交数据。 Wherein, if the storage process is not completed, but an exception occurs during the process, such as accidental interruptions, stop the stored procedure, do not sign the above save the changes, it is still not complete, so that the system resubmit the data after startup.

所述方法还包括:步骤4,当系统启动时,读取非易失存储介质的上述存盘标志,并判断该存盘标志是否为未完成,如果是则进入步骤5,否则步骤结束;步骤5,更新内存数据库,在更新过程中拒绝所有OMS后台(即OMS的网管中心)对该内存数据库的操作;步骤6,更新完成后,将内存数据库中的数据重新存入非易失存储介质,转到步骤3。 The method further comprising: the step 4, when the system starts reading the above-described non-volatile storage medium save flag, and determines whether the save flag is not completed, the process proceeds to step 5 if otherwise, ending the step; Step 5, updating the database memory, OMS reject all background (i.e., network management center OMS) operation on the database in the memory update process; step 6, the update is complete, the data stored in the memory database and to re nonvolatile storage medium, to step 3.

其中,上述存盘标志可以是已完成或未完成,如果在该系统初始启动时,也可以先将存盘标志设置为初始化。 Wherein the flag may be a save has been completed or not completed, if the system is at initial startup, it can be provided first save flag is initialized.

所述步骤5中,根据非易失存储介质中的数据更新内存数据库,该更新不与OMS后台交互。 In step 5, according to the non-volatile data storage medium memory database updating, the update does not interact with the OMS background.

所述步骤1具体为,OMS后台发起事务操作,数据以文件或消息的方式传送到OMS前台,而后提交到内存数据库。 Step 1 specifically, OMS background operation to initiate a transaction, the data in files or messages sent to the OMS front, and then submitted to the database memory.

所述步骤1中,如果数据以消息的方式传送,则将其维护信息存放在保留内存中或非易失存储介质的配置文件中作备份,该数据的存储过程完成后,清除上述维护信息。 In step 1, if the message data is transferred in a manner, which will maintain the reservation information is stored in nonvolatile memory or configuration files for backup storage medium, the stored data of the procedure is completed, removing said maintenance information.

综上所述,本发明的有益效果在于,本发明可以同时保证事务处理的完整性和实时性,易于处理实时性要求较高的应用,保证数据能够完整实时地更新,不会因系统的故障、复位等异常而破坏上述操作,从而增加内存数据库的容灾性。 To sum up, the beneficial effects of the present invention, and the present invention can guarantee the integrity of the real-time transaction processing, while easy to handle applications requiring high real-time, to ensure that the data can be updated in real time complete, because the system does not fail , the above-described reset operation abnormality destroyed, thereby increasing the redundancy of the memory database.

附图说明 BRIEF DESCRIPTION

图1是本发明一较佳实施例的内存数据库的事务管理方法流程图。 FIG 1 of the present invention is a memory transaction management database according to a preferred embodiment of a flowchart of a method.

具体实施方式 detailed description

下面结合附图和具体实施例对本发明作进一步地介绍,但不作为对本发明的限定。 The following particular embodiments and the drawings in conjunction with embodiments of the present invention will be further described, but not limit the present invention.

本发明的原理为:在非易失存储介质中设置存盘标志,OMS后台将数据提交到内存数据库之后,直接回应事务提交完成,然后将上述数据从内存数据库存入非易失存储介质,用上述存盘标志来记录存盘是否成功,如果系统出现故障,通过该存盘标志即可重新自动存盘。 The principles of the present invention are: Save flag provided in the nonvolatile storage medium, the data submitted after the OMS background memory to the database, in direct response to the completion of the transaction commits, then the above data stored in non-volatile memory storage medium from the database, using the above save flag to record the save is successful, if the system fails, you can re-save automatically save by the flag. 这样可以保证整个过程既在可接受的时间内完成,又不会受系统故障的破坏。 This ensures that both the whole process is completed within an acceptable time, it will not compromised system failure.

本发明的事务管理方法中的存盘标志设置操作可以包括以下步骤:步骤11,系统初始启动时,在非易失存储介质上设置存盘标志Val为初始化;步骤12,OMS后台更新内存数据库的数据,数据可以以文件或消息的方式传送到OMS前台,存入内存数据库,其中,可以根据文件传输协议(File Transfer Protocol,以下简称FTP)传送数据;步骤13,内存数据库更新完成后,将存盘标志Val设置为未完成,同时开始将内存数据库的数据存入非易失存储介质;步骤14,如果上述存储过程正常完成,则将存盘标志Val设置为已完成;如果在上述存储过程中出现异常情况,例如故障、意外中断或复位,则不改动上述存盘标志Val,其仍为未完成。 Save flag setting operation transaction management method of the invention may include the following steps: Step 11, the initial system startup, save flag Val is provided on the nonvolatile memory the initialization medium; Step 12, the background data update OMS memory database, data may be transmitted as files or messages to the OMS front, the database stored in memory, wherein the can (file transfer protocol, hereinafter referred to as FTP) file transfer protocol in accordance with the data transfer; step 13, the memory database update is complete, the save flag Val set not completed, and starts the data stored in the nonvolatile memory database storage medium; step 14, if the storage process is normally completed, the save flag is set to completed Val; if abnormality occurs in the storage process, For example a failure, an unexpected interruption or reset the save flag Val is not altered, which is still not complete.

本发明的内存数据库的事务管理方法可以通过系统启动操作的步骤详细说明,如图1所示,其包括以下步骤:步骤21,系统上电启动,根据存盘标志Val判断上一次存盘的状态;步骤22,如果上述存盘标志Val为初始化或已完成,则表示上次存盘正常,转入步骤23;如果上述存盘标志Val为未完成,则说明上次存盘过程未完成,转到步骤25;步骤23,OMS后台发起事务操作,更新内存数据库的数据;步骤24,更新完成后将存盘标志Val设置为未完成,将上述数据存储到非易失存储介质,转到步骤27;步骤25,重新更新内存数据库,该更新不用和OMS后台交互,根据非易失存储介质中的数据更新内存数据库;步骤26,更新完成后将内存数据库中的数据存储到非易失存储介质;步骤27,如果存储过程正常完成,则设置上述存盘标志Val为已完成;如果在存储过程中系统出现异 Transaction database memory management method of the present invention may be operated by a system boot steps detailed description, as shown in FIG. 1, which includes the following steps: step 21, the system is powered on, in accordance with a determination Val save the save flag state; step 22, if save flag Val is above or initialization has been completed, then the last save normal, proceeds to step 23; if the above-save flag Val is not completed, then the last save process is not completed, go to step 25; step 23 , the OMS background operation to initiate a transaction, updating data memory database; step 24, after the completion of the update to save flag Val is not completed, the above-described data stored in the nonvolatile storage medium, go to step 27; step 25, re-update the memory database, without updating the interactive and background OMS, according to the non-volatile data storage medium to update the database memory; step 26, the update is complete after the data stored in the nonvolatile memory database to the storage medium; step 27, if stored during normal complete, the save flag Val is provided above has been completed; if the system during storage iso ,例如故障、复位等,则停止存储过程并保持存盘标志Val为未完成,流程结束。 , E.g. failure, reset, stop and hold the stored procedure save flag Val is not completed, the process ends.

在所述步骤12中,如果数据是以消息的方式传送,则将此操作的维护信息保存在保留内存或非易失存储介质的配置文件中做备份,待该更新操作完成后清除保存的维护信息;采用保留内存是由于在系统非掉电启动时,存放在保留内存中的数据不会被破坏;采用非易失存储介质的配置文件备份文件是由于有些操作系统不提供保留内存或者由于某些原因而破坏保存在保留内存中的数据,例如某些操作系统会掉电启动,这种情况下保存在保留内存中的数据将被破坏,因此可以将上述维护信息保存在相对稳定的非易失存储介质的配置文件中。 In step 12, if the data is a message transfer scheme, the maintenance information stored in this reserved memory operation or non-volatile storage medium for backup configuration file to be stored after the update operation is completed purge maintenance information; using reserved memory when the system is due to the non-power-down start, reserved memory is stored in the data will not be destroyed; non-volatile storage medium using the backup file is a configuration file because some operating systems do not provide or due to a reserved memory For these reasons the destruction saved in the reservation data memory, for example, certain operating system starts down, in this case to retain stored data in memory will be destroyed, thus maintaining the above-described information may be stored in non-volatile relatively stable loss of configuration file storage medium. 因为配置文件较小,所以读写速度较快,一定程度上可以代替保留内存的方式。 Because the configuration file small, fast reading and writing, can be used instead of reserved memory mode to some extent.

以上所述仅为本发明的较佳实施例,并非用来限定本发明的实施范围;如果不脱离本发明的精神和范围,对本发明进行修改或者等同替换的,均应涵盖在本发明的权利要求的保护范围当中。 The foregoing is only preferred embodiments of the invention, and are not intended to limit the scope of embodiments of the present invention; without departing from the spirit and scope of the present invention, the present invention may be modified or equivalents, should fall in the claims of the present invention the scope of protection required of them.

Claims (5)

  1. 1.一种内存数据库的事务管理方法,其特征在于包括以下步骤:步骤1,操作维护子系统后台将数据提交到内存数据库;步骤2,设置非易失存储介质中预设的存盘标志为未完成,将内存数据库中的数据存入上述非易失存储介质;步骤3,当内存数据库中的数据存入上述非易失存储介质的存储过程完成后,将上述存盘标志设置为已完成。 A method of memory management transaction database, comprising the following steps: Step 1, the operation and maintenance subsystem submit data to a background memory database; Step 2, the nonvolatile storage medium provided preset save flag is not is completed, the data stored in said memory database in non-volatile memory medium; step 3, when the data stored in said memory database in non-volatile storage medium storing process is completed, the flag is set to save the above has been completed.
  2. 2.根据权利要求1所述的事务管理方法,其特征在于所述方法还包括:步骤4,系统启动时,读取非易失存储介质的上述存盘标志,并判断该存盘标志是否为未完成,如果是则进入步骤5,否则步骤结束;步骤5,更新内存数据库,在更新过程中拒绝所有操作维护子系统后台对该内存数据库的操作;步骤6,更新完成后,内存数据库中的数据重新存入非易失存储介质,转到步骤3。 The transaction management method according to claim 1, wherein said method further comprises: the step 4, the system starts reading the above-described non-volatile storage medium save flag, and determines that the save flag is not completed If yes, the process proceeds to step 5, otherwise step ends; step 5, to update memory database, to reject all operations during the update background operation of the maintenance subsystem memory database; step 6, the update is complete, the data memory database again stored in non-volatile storage medium, go to step 3.
  3. 3.根据权利要求2所述的事务管理方法,其特征在于所述步骤5中,根据非易失存储介质中的数据更新内存数据库,该更新不与操作维护子系统后台交互。 The transaction management method according to claim 2, wherein said step 5, the nonvolatile storage medium according to data memory database updating, the update does not interact with the background operation and maintenance subsystem.
  4. 4.根据权利要求3所述的事务管理方法,其特征在于所述步骤1具体为,操作维护子系统后台发起事务操作,数据以文件或消息的方式传送到操作维护子系统前台,而后提交到内存数据库。 The transaction management method according to claim 3, characterized in that said step 1 specifically, a background operation and maintenance subsystem initiate a transaction operation, the data file or message as to the operation and maintenance subsystem is transmitted to the foreground, and then submitted to Memory Database.
  5. 5.根据权利要求4所述的事务管理方法,其特征在于所述步骤1中,如果数据以消息的方式传送,则将其维护信息存放在保留内存中或非易失存储介质的配置文件中作备份,该数据的存储过程完成后,清除上述存放的维护信息。 The transaction management method as claimed in claim 4, wherein said step 1, if the message data is transferred in a manner, which will maintain the reservation information is stored in non-volatile memory or storage medium profile for backup, after the procedure the stored data is completed, clearing stored information of the maintenance.
CN 200710103758 2007-05-23 2007-05-23 Transaction managing method for internal storage data bank CN101051324A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200710103758 CN101051324A (en) 2007-05-23 2007-05-23 Transaction managing method for internal storage data bank

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200710103758 CN101051324A (en) 2007-05-23 2007-05-23 Transaction managing method for internal storage data bank

Publications (1)

Publication Number Publication Date
CN101051324A true true CN101051324A (en) 2007-10-10

Family

ID=38782736

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200710103758 CN101051324A (en) 2007-05-23 2007-05-23 Transaction managing method for internal storage data bank

Country Status (1)

Country Link
CN (1) CN101051324A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101587476B (en) 2008-05-22 2012-02-08 中兴通讯股份有限公司 Memory database systems and applications for implementing distributed storage
CN102934089A (en) * 2010-06-17 2013-02-13 微软公司 Error detection for files
US8996829B2 (en) 2009-12-11 2015-03-31 Microsoft Technology Licensing, Llc Consistency without ordering dependency
CN105117308A (en) * 2015-09-29 2015-12-02 联想(北京)有限公司 Data processing method, device and system
CN102929983B (en) * 2012-10-18 2016-11-16 京信通信系统(中国)有限公司 Embedded database method and apparatus for synchronizing databases to flash
US9563487B2 (en) 2011-08-11 2017-02-07 Microsoft Technology Licensing, Llc. Runtime system

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101587476B (en) 2008-05-22 2012-02-08 中兴通讯股份有限公司 Memory database systems and applications for implementing distributed storage
US9430160B2 (en) 2009-12-11 2016-08-30 Microsoft Technology Licensing, Llc Consistency without ordering dependency
US8996829B2 (en) 2009-12-11 2015-03-31 Microsoft Technology Licensing, Llc Consistency without ordering dependency
US8793440B2 (en) 2010-06-17 2014-07-29 Microsoft Corporation Error detection for files
US8984233B2 (en) 2010-06-17 2015-03-17 Microsoft Corporation Error detection for files
CN102934089B (en) * 2010-06-17 2015-04-01 微软公司 Error detection for files
CN102934089A (en) * 2010-06-17 2013-02-13 微软公司 Error detection for files
US9448869B2 (en) 2010-06-17 2016-09-20 Microsoft Technology Licensing, Llc Error detection for files
US9563487B2 (en) 2011-08-11 2017-02-07 Microsoft Technology Licensing, Llc. Runtime system
CN102929983B (en) * 2012-10-18 2016-11-16 京信通信系统(中国)有限公司 Embedded database method and apparatus for synchronizing databases to flash
CN105117308A (en) * 2015-09-29 2015-12-02 联想(北京)有限公司 Data processing method, device and system

Similar Documents

Publication Publication Date Title
US6330642B1 (en) Three interconnected raid disk controller data processing system architecture
US6205558B1 (en) Recovery of file systems after modification failure
US6523087B2 (en) Utilizing parity caching and parity logging while closing the RAID5 write hole
US20060095659A1 (en) Hard disk drive with support for atomic transactions
US6799244B2 (en) Storage control unit with a volatile cache and a non-volatile backup cache for processing read and write requests
US20070162692A1 (en) Power controlled disk array system using log storage area
US20080120459A1 (en) Method and apparatus for backup and restore in a dynamic chunk allocation storage system
US7386695B2 (en) Storage system with multiple copy targeting
US6618794B1 (en) System for generating a point-in-time copy of data in a data storage system
US6052764A (en) Computer data restoration assembly and associated method
US20090055593A1 (en) Storage system comprising function for changing data storage mode using logical volume pair
US6766491B2 (en) Parity mirroring between controllers in an active-active controller pair
US20060143407A1 (en) Methods and structure for improved storage system performance with write-back caching for disk drives
US20060095688A1 (en) Storage system and method of controlling the same
US20060277328A1 (en) System and method for updating the firmware of a device in a storage network
US7219257B1 (en) Method for boot recovery
US20120144110A1 (en) Methods and structure for storage migration using storage array managed server agents
JP2004252686A (en) Information processing system
US20120173824A1 (en) Managing cache data and metadata
CN101271396A (en) Electronic device and method for on-line updating firmware
US7987158B2 (en) Method, system and article of manufacture for metadata replication and restoration
US20040186971A1 (en) Apparatus and method for protecting data recorded on a storage medium
JP2005242403A (en) Computer system
JP2005222110A (en) Storage subsystem
US20050223180A1 (en) Accelerating the execution of I/O operations in a storage system

Legal Events

Date Code Title Description
C06 Publication
C10 Request of examination as to substance
C12 Rejection of an application for a patent