CN108279762A - Transaction methods based on hardware protection - Google Patents

Transaction methods based on hardware protection Download PDF

Info

Publication number
CN108279762A
CN108279762A CN201810058568.7A CN201810058568A CN108279762A CN 108279762 A CN108279762 A CN 108279762A CN 201810058568 A CN201810058568 A CN 201810058568A CN 108279762 A CN108279762 A CN 108279762A
Authority
CN
China
Prior art keywords
data
database
transaction
machine
storage device
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.)
Pending
Application number
CN201810058568.7A
Other languages
Chinese (zh)
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.)
Beijing Institute of Computer Technology and Applications
Original Assignee
Beijing Institute of Computer Technology and Applications
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 Beijing Institute of Computer Technology and Applications filed Critical Beijing Institute of Computer Technology and Applications
Priority to CN201810058568.7A priority Critical patent/CN108279762A/en
Publication of CN108279762A publication Critical patent/CN108279762A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/30Means for acting in the event of power-supply failure or interruption, e.g. power-supply fluctuations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to a kind of transaction methods based on hardware protection, are related to database technical field.Present invention utilizes the ups powers carried in database all-in-one machine can ensure that database remains able to continue working for a period of time after a loss of power, to complete the property of all data write operations, devise a kind of handover mechanism of main power source and ups power, so that in transaction process, the data that commit orders are not to wait for affairs are realistic (i.e. in data write-in bottom storage device), it is submitted successfully as long as being returned to user in related data write-in memory, bottom storage device can disposably be written in batches after data in EMS memory runs up to certain amount, improve the db transaction processing speed in database all-in-one machine.

Description

Transaction methods based on hardware protection
Technical field
The present invention relates to database technical fields, and in particular to a kind of transaction methods based on hardware protection.
Background technology
Traditional database is only capable of the dependency number in an affairs using serial mode when handling affairs as software product It submits successfully, otherwise can exist when power is off few according to that could be returned to user after realistic (i.e. in data write-in bottom storage device) The risk of loss of data is measured, although this transaction processing facility ensure that the integrality and consistency of database data, but to thing Business processing speed is influenced.
Invention content
(1) technical problems to be solved
The technical problem to be solved by the present invention is to:How affairs execution efficiency in db transaction process flow is promoted, Promote database performance.
(2) technical solution
In order to solve the above technical problem, the present invention provides a kind of transaction methods based on hardware protection, including Following steps:
Start issued transaction, in processing procedure, when main power source is powered, database all-in-one machine is using at efficient affairs submission Reason pattern is handled, i.e., commit orders be not to wait for affairs data it is realistic, that is, be not to wait for the realistic write-in bottom of data of affairs In layer storage device, data return at once to user as long as being written in memory and submit successful information;If data are written memory and lose It loses then to return to user and submits failure information;
In processing procedure, if main power source is cut off, the ups power of database all-in-one machine takes over power supply, and ups power is to behaviour Make system and send signal so that database all-in-one machine restores normal transaction tupe, i.e. commit orders are deferred to data and write After entering bottom storage device just submission successful information is returned to user;It returns to submit to user if memory failure is written in data and lose Lose information;
In ups power takes over power supply process, if until ups power electric power depletes main power source and does not also restore, for not having There are realistic affairs, commit orders to execute failure, for realistic affairs, commit orders run succeeded;If in ups power Before electric power depletes, main power source restores, then ups power sends signal before being stopped to operating system so that database one Machine restores efficient transaction commitment processing pattern.
Preferably, when database all-in-one machine is handled using efficient transaction commitment processing pattern, the data in memory are waited for Disposable batch is realistic after running up to preset certain amount.
Preferably, in transaction process, start whether monitoring thread monitoring main power source cuts off.
Preferably, bottom storage device is disk.
Preferably, bottom storage device is USB flash disk.
Preferably, bottom storage device is storage card.
(3) advantageous effect
Present invention utilizes the ups powers carried in database all-in-one machine can ensure that database remains able to after a loss of power Continue working for a period of time, to complete the property of all data write operations, devises cutting for a kind of main power source and ups power The system of changing planes so that in transaction process, commit orders are not to wait for realistic (the i.e. data write-in bottom storage of data of affairs In equipment), it is submitted successfully as long as being returned to user in related data write-in memory, waits for that data in EMS memory runs up to certain amount After bottom storage device can disposably be written in batches, improve the db transaction processing speed in database all-in-one machine.
Description of the drawings
Fig. 1 is flow chart of the method for the present invention.
Specific implementation mode
To keep the purpose of the present invention, content and advantage clearer, with reference to the accompanying drawings and examples, to the present invention's Specific implementation mode is described in further detail.
As shown in Figure 1, the present invention provides a kind of transaction methods based on hardware protection, include the following steps:
Start issued transaction, in processing procedure, when main power source is powered, database all-in-one machine is using at efficient affairs submission Reason pattern is handled, i.e., commit orders be not to wait for affairs data it is realistic (write-in bottom storage device in, the bottom storage Equipment is disk, USB flash disk or storage card), data return at once to user as long as being written in memory and submit successful information, wait for memory In data accumulation to preset certain amount after disposable batch it is realistic, in this case, in view of the presence of ups power, though So data do not have realistic at this time, but power supply can't fail moment, therefore can still ensure the integrality of data;If data are write Enter memory failure and then returns to submission failure information to user;
In processing procedure, if main power source is cut off, the ups power of database all-in-one machine takes over power supply, and ups power is to behaviour Make system and send signal so that database all-in-one machine restores normal transaction tupe, i.e. commit orders are deferred to data and write After entering bottom storage device just submission successful information is returned to user;It returns to submit to user if memory failure is written in data and lose Lose information;
In ups power takes over power supply process, if until ups power electric power depletes main power source and does not also restore, for not having There are realistic affairs, commit orders to execute failure, for realistic affairs, commit orders run succeeded, this ensure that The integrality of data;If before ups power electric power depletes, main power source restore, then ups power before being stopped to operating system Send signal so that database all-in-one machine restores efficient transaction commitment processing pattern.
In above-mentioned entire transaction process, start whether monitoring thread monitoring main power source cuts off.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, without departing from the technical principles of the invention, several improvement and deformations can also be made, these improvement and deformations Also it should be regarded as protection scope of the present invention.

Claims (6)

1. a kind of transaction methods based on hardware protection, which is characterized in that include the following steps:
Start issued transaction, in processing procedure, when main power source is powered, database all-in-one machine uses efficient transaction commitment processing mould Formula is handled, i.e., commit orders be not to wait for affairs data it is realistic, that is, the realistic write-in bottom of data for being not to wait for affairs is deposited It stores up in equipment, data return at once to user as long as being written in memory and submit successful information;If memory failure is written in data It is returned to user and submits failure information;
In processing procedure, if main power source is cut off, the ups power of database all-in-one machine takes over power supply, and ups power is to operation System sends signal so that database all-in-one machine restores normal transaction tupe, i.e. commit orders are deferred to data write-in bottom It is just returned to user after layer storage device and submits successful information;It returns to submit to user if memory failure is written in data and unsuccessfully believe Breath;
In ups power takes over power supply process, if until ups power electric power depletes main power source and does not also restore, for not writing Real affairs, commit orders execute failure, and for realistic affairs, commit orders run succeeded;If in ups power electric power Before depleting, main power source restores, then ups power sends signal before being stopped to operating system so that database all-in-one machine is extensive Multiple efficient transaction commitment processing pattern.
2. the method as described in claim 1, which is characterized in that database all-in-one machine using efficient transaction commitment processing pattern into When row processing, disposable batch is realistic after the data accumulation in memory to preset certain amount.
3. the method as described in claim 1, which is characterized in that in transaction process, start monitoring thread and monitor main power source Whether cut off.
4. the method as described in claims 1 or 2 or 3, which is characterized in that bottom storage device is disk.
5. the method as described in claims 1 or 2 or 3, which is characterized in that bottom storage device is USB flash disk.
6. the method as described in claims 1 or 2 or 3, which is characterized in that bottom storage device is storage card.
CN201810058568.7A 2018-01-22 2018-01-22 Transaction methods based on hardware protection Pending CN108279762A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810058568.7A CN108279762A (en) 2018-01-22 2018-01-22 Transaction methods based on hardware protection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810058568.7A CN108279762A (en) 2018-01-22 2018-01-22 Transaction methods based on hardware protection

Publications (1)

Publication Number Publication Date
CN108279762A true CN108279762A (en) 2018-07-13

Family

ID=62804452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810058568.7A Pending CN108279762A (en) 2018-01-22 2018-01-22 Transaction methods based on hardware protection

Country Status (1)

Country Link
CN (1) CN108279762A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109213631A (en) * 2018-08-22 2019-01-15 郑州云海信息技术有限公司 A kind of transaction methods, device, equipment and readable storage medium storing program for executing

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101051324A (en) * 2007-05-23 2007-10-10 中兴通讯股份有限公司 Transaction managing method for internal storage data bank
CN101699439A (en) * 2009-11-16 2010-04-28 中兴通讯股份有限公司 Database transaction submitting method and device
US20100191884A1 (en) * 2008-06-12 2010-07-29 Gravic, Inc. Method for replicating locks in a data replication engine
CN102279855A (en) * 2010-06-10 2011-12-14 三星电子(中国)研发中心 Device and method for treating transactions with database
US20120150802A1 (en) * 2009-08-25 2012-06-14 Peter Popov Database replication
US20120191681A1 (en) * 2005-11-30 2012-07-26 International Business Machines Corporation Failure tolerant transaction processing system
CN103077222A (en) * 2012-12-31 2013-05-01 中国科学院计算技术研究所 Method and system for ensuring consistence of distributed metadata in cluster file system
CN104914974A (en) * 2015-05-22 2015-09-16 福建天晴数码有限公司 Service protecting method and protecting system after powering down
CN106356097A (en) * 2016-08-25 2017-01-25 浙江宇视科技有限公司 Protection method and device for preventing data loss
CN107070919A (en) * 2011-09-09 2017-08-18 甲骨文国际公司 Idempotence for db transaction
CN107133112A (en) * 2017-04-28 2017-09-05 维沃移动通信有限公司 A kind of asynchronous process fsync method and mobile terminal

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120191681A1 (en) * 2005-11-30 2012-07-26 International Business Machines Corporation Failure tolerant transaction processing system
CN101051324A (en) * 2007-05-23 2007-10-10 中兴通讯股份有限公司 Transaction managing method for internal storage data bank
US20100191884A1 (en) * 2008-06-12 2010-07-29 Gravic, Inc. Method for replicating locks in a data replication engine
US20120150802A1 (en) * 2009-08-25 2012-06-14 Peter Popov Database replication
CN101699439A (en) * 2009-11-16 2010-04-28 中兴通讯股份有限公司 Database transaction submitting method and device
CN102279855A (en) * 2010-06-10 2011-12-14 三星电子(中国)研发中心 Device and method for treating transactions with database
CN107070919A (en) * 2011-09-09 2017-08-18 甲骨文国际公司 Idempotence for db transaction
CN103077222A (en) * 2012-12-31 2013-05-01 中国科学院计算技术研究所 Method and system for ensuring consistence of distributed metadata in cluster file system
CN104914974A (en) * 2015-05-22 2015-09-16 福建天晴数码有限公司 Service protecting method and protecting system after powering down
CN106356097A (en) * 2016-08-25 2017-01-25 浙江宇视科技有限公司 Protection method and device for preventing data loss
CN107133112A (en) * 2017-04-28 2017-09-05 维沃移动通信有限公司 A kind of asynchronous process fsync method and mobile terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘波: "《大型数据库系统Oracle与实训》", 28 February 2015, 中国铁道出版社 *
王志宇: ""基于.NET/GPRS/GIS技术的城市照明监控管理系统设计与实现"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109213631A (en) * 2018-08-22 2019-01-15 郑州云海信息技术有限公司 A kind of transaction methods, device, equipment and readable storage medium storing program for executing

Similar Documents

Publication Publication Date Title
CN105745624B (en) Virtual machine backup from storage snapshot
KR101983405B1 (en) Managing replicated virtual storage at recovery sites
CN103827834B (en) A kind of moving method of internal storage data, computing machine and device
US20080016300A1 (en) Asynchronous replication with write concurrency grouping
CN102165408A (en) Apparatus, method and program for deciding data recall order
CN105264511B (en) System and method for the Host Detection of USB asynchronous notifications abilities
US9342420B2 (en) Communication of conditions at a primary storage controller to a host
US7584266B2 (en) Autonomous storage for backup, restore, and file access
CN109558213A (en) The method and apparatus for managing the virtual machine snapshot of OpenStack platform
CN102722536A (en) Method and device for realizing snapshot based on distributed file system
CN109445928A (en) A kind of access request processing method, device, equipment and readable storage medium storing program for executing
CN108279762A (en) Transaction methods based on hardware protection
CN108469891A (en) Switching on and shutting down management method, terminal device and the storage medium of portable device
CN109685190A (en) A kind of IC card power-off protection method and device
CN107329966B (en) Machine data storage method and system
CN108874312A (en) Date storage method and storage equipment
WO2005109252A1 (en) System and method for facilitating a consistent point-in-time copy
TWI245995B (en) System, method and computer readable storage medium for automated equipment automation program (EAPp) refresh
CN202600778U (en) Asynchronous processing system for updating hotlist data
CN109213631A (en) A kind of transaction methods, device, equipment and readable storage medium storing program for executing
CN107436826B (en) A kind of cold data processing method and terminal
CN108123815A (en) A kind of ARM servers and the BIOS upgrade methods for retaining configuration information
US20080256309A1 (en) Maintain owning application information of data for a data storage system
CN112000282A (en) Storage double-live method, device and related components
CN105353980A (en) Memory data migration method, computer and apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20180713

WD01 Invention patent application deemed withdrawn after publication