CN102306148A - Share memory database access method - Google Patents

Share memory database access method Download PDF

Info

Publication number
CN102306148A
CN102306148A CN201110066130A CN201110066130A CN102306148A CN 102306148 A CN102306148 A CN 102306148A CN 201110066130 A CN201110066130 A CN 201110066130A CN 201110066130 A CN201110066130 A CN 201110066130A CN 102306148 A CN102306148 A CN 102306148A
Authority
CN
China
Prior art keywords
client
memory database
memory
side program
shared drive
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
CN201110066130A
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 DIGITAL CHINA SI-TECH INFORMATION TECHNOLOGY Co Ltd
Beijing Si Tech Information Technology Co Ltd
Original Assignee
BEIJING DIGITAL CHINA SI-TECH INFORMATION TECHNOLOGY Co Ltd
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 DIGITAL CHINA SI-TECH INFORMATION TECHNOLOGY Co Ltd filed Critical BEIJING DIGITAL CHINA SI-TECH INFORMATION TECHNOLOGY Co Ltd
Priority to CN201110066130A priority Critical patent/CN102306148A/en
Publication of CN102306148A publication Critical patent/CN102306148A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a share memory database access method, which comprises the following steps that: a memory database service progress stores memory data into a share memory; then a client program sends a Socket connection request to the memory database service progress; the memory database service progress receives the connection request and sends a memory ID of the share memory to the client program; the client program receives the memory ID and maps the share memory corresponding to the memory ID to an own progress space, so that the client program can directly access the share memory and increase and/or delete and/or modify and/or check the memory data in the share memory; and when the client program quits, the memory database service progress releases the Socket connection with the client program. By the method, the client program can directly access the share memory, so that the Socket communication required by each access can be avoided; therefore, the access time of a memory database can be saved.

Description

A kind of shared drive data bank access method
Technical field
The present invention relates to a kind of shared drive data bank access method of avoiding process communication.
Background technology
Present visit to memory database; Generally all be to adopt the Socket communication mode; Be that application program is when needing the access memory database; Send solicited message through the Socket communication port to the memory database service processes; After the memory database service processes received the Socket request instruction, inquiry was perhaps revised internal storage data, then result is sent to application program through Socket again; Application program receives result, accomplishes once the visit to memory database.
When this Socket communication mode has seriously restricted and has disposed with main frame to the access efficiency of internal memory.As a rule, generally within several microseconds, and the speed of Socket communication is because the consumption of network I/O, the mutual wait of communicating pair etc., slow about 10 times than direct internal storage access of its interactive speed to the access speed of internal memory for process.Because the processing time major part expends in communication, " fast access of the internal memory " advantage of making can't obtain fully effectively performance.
Summary of the invention
Technical matters to be solved by this invention provides a kind of application program and avoids the method that the Socket communication mode directly conducts interviews to memory database, to improve the access speed of application program to memory database.
The technical scheme that the present invention solves the problems of the technologies described above is following: a kind of shared drive data bank access method comprises the steps:
Step 1: the memory database service processes is put into shared drive to internal storage data;
Step 2: client-side program sends the Socket connection request to said memory database service processes;
Step 3: the memory database service processes receives said connection request, and the internal memory ID of said shared drive is sent to said client-side program;
Step 4: after said client-side program receives said internal memory ID, the pairing shared drive of this internal memory ID is mapped to its oneself the process space;
Step 5: said client-side program is directly visited said shared drive, and the internal storage data in the shared drive is increased and/or deletes and/or change and/or look into operation;
Step 6: client-side program withdraws from, and the memory database service processes discharges and is connected with the Socket of client-side program.
Client-side program wherein is the types of applications program that needs the access memory database.
The invention has the beneficial effects as follows: the memory database service processes is with the shared drive ID Spoke-to-Client end program of memory database; Client-side program is mapped to the process space of oneself with it and then can directly conducts interviews to this shared drive; Thereby direct visit and operation have been realized to memory database; The time waste of having avoided each visit all must carry out Socket communication and having caused, the access time of having practiced thrift memory database.
On the basis of technique scheme, the present invention can also do following improvement.
Further, said client-side program and memory database service processes operate on the same main frame.
Adopt the beneficial effect of above-mentioned further scheme to be, when having solved client-side program and memory database service processes and having operated on the same main frame, the time waste problem of client-side program access memory database.
Further, in the step 3, the memory database service processes is accepted behind the said connection request client-side program to be carried out purview certification, and is authenticated through then the internal memory ID of said shared drive being sent to said client-side program; If authentication is not passed through, then do not send internal memory ID.
Adopt the beneficial effect of above-mentioned further scheme to be,, strengthened the shared drive safeness of Data Bank through purview certification.
Further, in step 4, when client-side program increases internal storage data and/or deletes and/or change and/or look into when operation, operation note in the interim affairs district that this Socket connects, and is locked to operation.
Further, in step 4, when client-side program to the increasing and/or delete and/or change and/or when looking into EO of internal storage data, will be in the interim affairs district should operation record deletion, and remove the lock of operation.
Adopt the beneficial effect of above-mentioned further scheme to be; Operation note can be known the operation note of current client-side program for the memory database service processes in the interim affairs district that this Socket connects, integrality and consistance that operation is locked and can guarantee data in the shared drive database.
Further; In step 4; When client-side program withdraws from unusually; The memory database service processes is inquired about interim affairs district; If in the interim affairs district uncompleted transaction journal is arranged and/or the lock that does not discharge is arranged, then proceed the subsequent operation of this connection according to the lock of uncompleted transaction journal and/or not release in the interim affairs district.
Adopt the beneficial effect of above-mentioned further scheme to be, avoid, guarantee that memory database data can not cause damage because of the unusual of client-side program because the fault of client-side program impacts to memory database.
Through memory database access method of the present invention, when application program (client-side program) and memory database are deployed on same the main frame, make application program can get around Socket communication, directly the data in the access memory database.Through the method, can significantly improve the efficient of the application access memory database of disposing with main frame, adapt to the high speed requirement that handle online Real-time Transaction in fields such as telecommunications, finance.
Description of drawings
Fig. 1 is the system architecture diagram of memory database access method of the present invention;
Fig. 2 is the process flow diagram of memory database access method of the present invention.
Embodiment
Below in conjunction with accompanying drawing principle of the present invention and characteristic are described, institute gives an actual example and only is used to explain the present invention, is not to be used to limit scope of the present invention.
As shown in Figure 1; Shared drive data bank access method of the present invention is applicable to that client-side program and memory database service processes run on same the main frame; Earlier setting up socket with the memory database service processes when client-side program will be visited the shared drive database in the shared drive district is connected; Through after the authentication; The memory database service processes sends to client-side program with the internal memory ID of shared drive; Client-side program is directly visited shared drive according to this internal memory ID; The shared drive database is increased and/or deletes and/or change and/or operation such as look into; Thereby all necessary trouble that connects through socket when having walked around, thereby accelerated time memory database operation at every turn to memory database operation.
The idiographic flow of memory database access method of the present invention as shown in Figure 2, comprises the steps:
Step 1: the memory database service processes is put into shared drive to internal storage data;
Step 2: client-side program sends the Socket connection request to said memory database service processes;
Step 3: the memory database service processes receives said connection request, and the internal memory ID of said shared drive is sent to said client-side program;
Step 4: after said client-side program receives said internal memory ID, the pairing shared drive of this internal memory ID is mapped to its oneself the process space;
Step 5: said client-side program is directly visited said shared drive, and the internal storage data in the shared drive is increased and/or deletes and/or change and/or look into operation;
Step 6: client-side program withdraws from, and the memory database service processes discharges and is connected with the Socket of client-side program.
Above-mentioned client-side program is the types of applications program that needs the access memory database.
Wherein, in the step 3, the memory database service processes is accepted behind the said connection request client-side program to be carried out purview certification, and is authenticated through then the internal memory ID of said shared drive being sent to said client-side program; If authentication is not passed through, then do not send internal memory ID.
In the step 4, when client-side program increases internal storage data and/or deletes and/or change and/or look into when operation, operation note in the interim affairs district that this Socket connects, and is locked to operation; When client-side program to the increasing and/or delete and/or change and/or when looking into EO of internal storage data, will be in the interim affairs district should operation record deletion, and remove the lock of operation, thereby guarantee the integrality and the consistance of data in the shared drive database.When client-side program withdraws from unusually; The memory database service processes is inquired about interim affairs district; If uncompleted transaction journal is arranged and/or the lock that does not discharge is arranged in the interim affairs district; Then proceed the subsequent operation of this connection according to the lock of uncompleted transaction journal and/or not release in the interim affairs district; To avoid fault owing to client-side program; Impact to memory database, guarantee that memory database data can not cause damage because of the unusual of client-side program.
With the ticketing system is example, and accounting routine (client-side program) and memory database are deployed on same the main frame, deposits the tariff package information that each phone number is ordered in the memory database.
Accounting routine is at first set up Socket with the memory database service processes and is connected; After authentication; Accounting routine obtains the shared drive ID that the memory database service processes sends over, and then this piece shared drive is mapped to the process space of oneself, accomplishes and lands preliminary work.
Next; Accounting routine is opened CDR file; Take out every ticket one by one, directly search the corresponding tariff package information of this number in the shared drive according to phone number then, combine the charging of every tickets of information completion such as air time, the other side's number of ticket.
When searching tariff package, accounting routine is directly visited shared drive, does not carry out Socket with the memory database process and communicates by letter, thereby make access efficiency significantly improve.
The present invention is being owing to increasing and/or deleting and/or change and/or look into the data in when operation direct control memory database, thereby increases substantially the access speed to memory database.On the main frame of CPU frequency 1.65GHz, from a table with 1,000 ten thousand records, according to record of search index, adopt the visit of Socket communication modes, average 60 microseconds consuming time; And adopt access method of the present invention, average only 7 microseconds consuming time.For the application scenarios of frequent access, the overall time of practicing thrift will be above more than 5 times.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, not all within spirit of the present invention and principle, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (6)

1. a shared drive data bank access method comprises the steps:
Step 1: the memory database service processes is put into shared drive to internal storage data;
Step 2: client-side program sends the Socket connection request to said memory database service processes;
Step 3: the memory database service processes receives said connection request, and the internal memory ID of said shared drive is sent to said client-side program;
Step 4: after said client-side program receives said internal memory ID, the pairing shared drive of this internal memory ID is mapped to its oneself the process space;
Step 5: said client-side program is directly visited said shared drive, and the internal storage data in the shared drive is increased and/or deletes and/or change and/or look into operation;
Step 6: client-side program withdraws from, and the memory database service processes discharges and is connected with the Socket of client-side program.
2. memory database access method according to claim 1 is characterized in that: said client-side program and memory database service processes operate on the same main frame.
3. memory database access method according to claim 1; It is characterized in that: in the step 3; The memory database service processes is accepted behind the said connection request client-side program to be carried out purview certification, and is authenticated through then the internal memory ID of said shared drive being sent to said client-side program; If authentication is not passed through, then do not send internal memory ID.
4. memory database access method according to claim 1; It is characterized in that: in step 4; When client-side program increases internal storage data and/or deletes and/or change and/or look into when operation, operation note in the interim affairs district that this Socket connects, and is locked to operation.
5. memory database access method according to claim 4; It is characterized in that: in step 4; When client-side program to the increasing and/or delete and/or change and/or when looking into EO of internal storage data, will be in the interim affairs district should operation record deletion, and remove the lock of operation.
6. memory database access method according to claim 4; It is characterized in that: in step 4; When client-side program withdraws from unusually; The memory database service processes is inquired about interim affairs district; If in the interim affairs district uncompleted transaction journal is arranged and/or the lock that does not discharge is arranged, then proceed the subsequent operation of this connection according to the lock of uncompleted transaction journal and/or not release in the interim affairs district.
CN201110066130A 2011-03-18 2011-03-18 Share memory database access method Pending CN102306148A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110066130A CN102306148A (en) 2011-03-18 2011-03-18 Share memory database access method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110066130A CN102306148A (en) 2011-03-18 2011-03-18 Share memory database access method

Publications (1)

Publication Number Publication Date
CN102306148A true CN102306148A (en) 2012-01-04

Family

ID=45380012

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110066130A Pending CN102306148A (en) 2011-03-18 2011-03-18 Share memory database access method

Country Status (1)

Country Link
CN (1) CN102306148A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104391876A (en) * 2014-10-30 2015-03-04 北京思特奇信息技术股份有限公司 Static data storing and querying method and system
CN104636260A (en) * 2013-11-06 2015-05-20 深圳市风景智联科技有限公司 Data management method and system for charging services
CN105159929A (en) * 2015-08-05 2015-12-16 北京思特奇信息技术股份有限公司 Memory database communication method and system
CN110287252A (en) * 2019-06-27 2019-09-27 南方电网科学研究院有限责任公司 A kind of data safety guard system
CN114880662A (en) * 2022-07-12 2022-08-09 北京安华金和科技有限公司 Process-based database audit processing method and device
WO2023124424A1 (en) * 2021-12-31 2023-07-06 深圳市兆珑科技有限公司 In-memory database access method and apparatus, system, server, and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567248A (en) * 2003-07-01 2005-01-19 华为技术有限公司 Log recording method and system for application program

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567248A (en) * 2003-07-01 2005-01-19 华为技术有限公司 Log recording method and system for application program

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
《http://blog.csdn.net/liangjm_1984/article/details/2764747》 20080804 匿名 进程间通讯(五):共享内存(下) 1-4 1-6 , *
《http://forfuture1978.iteye.com/blog/655736》 20100429 匿名 高级Linux程序设计第五章:进程间通信 1-20 1-6 , *
刘慧念: "TI达芬奇软件框架技术的研究与改进", 《电信科学》 *
匿名: "进程间通讯(五):共享内存(下)", 《HTTP://BLOG.CSDN.NET/LIANGJM_1984/ARTICLE/DETAILS/2764747》 *
匿名: "高级Linux程序设计第五章:进程间通信", 《HTTP://FORFUTURE1978.ITEYE.COM/BLOG/655736》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104636260A (en) * 2013-11-06 2015-05-20 深圳市风景智联科技有限公司 Data management method and system for charging services
CN104636260B (en) * 2013-11-06 2018-03-06 深圳市风景智联科技有限公司 A kind of data managing method and system for call charge service
CN104391876A (en) * 2014-10-30 2015-03-04 北京思特奇信息技术股份有限公司 Static data storing and querying method and system
CN105159929A (en) * 2015-08-05 2015-12-16 北京思特奇信息技术股份有限公司 Memory database communication method and system
CN110287252A (en) * 2019-06-27 2019-09-27 南方电网科学研究院有限责任公司 A kind of data safety guard system
WO2023124424A1 (en) * 2021-12-31 2023-07-06 深圳市兆珑科技有限公司 In-memory database access method and apparatus, system, server, and storage medium
CN114880662A (en) * 2022-07-12 2022-08-09 北京安华金和科技有限公司 Process-based database audit processing method and device

Similar Documents

Publication Publication Date Title
CN101650717B (en) Method and system for saving storage space of database
CN102306148A (en) Share memory database access method
US20190259024A1 (en) Security electronic file processing system and method based on block chain structure
CN102521712B (en) A kind of process instance data processing method and device
CN101599151A (en) A kind of system and method for self-adaptively selecting bank card for payment
CN103701783B (en) Preprocessing unit, data processing system consisting of same, and processing method
CN101556678A (en) Processing method of batch processing services, system and service processing control equipment
CN103618652A (en) Audit and depth analysis system and audit and depth analysis method of business data
CN101605136B (en) A method and an apparatus for Internet protocol security IPSec processing to packets
US20230068770A1 (en) Federated model training method and apparatus, electronic device, computer program product, and computer-readable storage medium
CN105426238A (en) Control method of equipment background instruction management system based on memory
CN105262614A (en) Service processing method and system based on service plug-in
CN105335143A (en) Business processing method and apparatus
CN107528912A (en) A kind of automatic method, system and relevant apparatus for realizing distributing real time system
CN102572954B (en) Roaming liquidation service scheduling method, middleware and system
CN105809526A (en) Asynchronous multithread processing-based on-line unified dutiable goods declaring method and system
CN110738502A (en) bill processing method and device and storage medium device
CN108762727B (en) Event-driven financial information processing method and system
CN107451301B (en) Processing method, device, equipment and storage medium for real-time delivery bill mail
WO2021088820A1 (en) Post-loan information management method and apparatus, device, and storage medium
US20190347596A1 (en) System for decommissioning information technology assets using solution data modelling
CN106203878B (en) Accounting crowdsourcing method based on platform
CN101840423A (en) Bill accuracy auditing system based on pair trading principle and data mining technology
CN106251121A (en) A kind of project management system based on mobile phone
CN111143383A (en) Data updating method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 100085 Haidian District, Zhongguancun, South Street, No. 6,, building information, floor, No. 16

Applicant after: SI-TECH Information Technology Ltd.

Address before: 100085, Beijing, Haidian District on the nine Street 9 digital science and Technology Plaza, two floor

Applicant before: Beijing Digital China SI-TECH Information Technology Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: BEIJING DIGITAL CHINA SI-TECH INFORMATION TECHNOLOGY LTD. TO: BEIJING SI-TECH INFORMATION TECHNOLOGY LTD.

C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120104