CN103761240A - Database access method and database access device - Google Patents

Database access method and database access device Download PDF

Info

Publication number
CN103761240A
CN103761240A CN201310681688.XA CN201310681688A CN103761240A CN 103761240 A CN103761240 A CN 103761240A CN 201310681688 A CN201310681688 A CN 201310681688A CN 103761240 A CN103761240 A CN 103761240A
Authority
CN
China
Prior art keywords
lock
client
database
current
sql statement
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.)
Granted
Application number
CN201310681688.XA
Other languages
Chinese (zh)
Other versions
CN103761240B (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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201310681688.XA priority Critical patent/CN103761240B/en
Publication of CN103761240A publication Critical patent/CN103761240A/en
Priority to PCT/CN2014/093424 priority patent/WO2015085914A1/en
Application granted granted Critical
Publication of CN103761240B publication Critical patent/CN103761240B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2336Pessimistic concurrency control approaches, e.g. locking or multiple versions without time stamps
    • G06F16/2343Locking methods, e.g. distributed locking or locking implementation details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2336Pessimistic concurrency control approaches, e.g. locking or multiple versions without time stamps
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)

Abstract

The invention discloses a database access method and a database access device, wherein the method comprises the steps of receiving a database access request from a client, determining whether the client has database connection at present, under the circumference that the client has no database connection at present, selecting a database connection from a connection pool and providing the selected database connection for the client, executing the database access request based on the current database connection of the client, after the database access request is completely executed, determining whether the client has an unreleased lock at present, and if the client has the unreleased lock at present, keeping the database connection for the client, otherwise, recovering the database connection to the connection pool.

Description

Data bank access method and device
Technical field
The present invention relates to database access technology, be specifically related to a kind of data bank access method and database access device.
Background technology
Client generally includes building database to the access of database and connects, opens database, data access and close the operations such as database connection, and wherein, building database connects and opens a large amount of system resource and times of meeting consumption such as database manipulation.At present, in order to save system resource and time, in database access process, introduced connection pool technology.
The implementation of the database access based on connection pool is generally: in connection pool, store many databases that established and connect, for the database access request from client, from connection pool, obtain a database and connect, and this database is connected and offers client; After database access request is complete, this database connection is recovered in connection pool; Follow-up, for (can be for last time sending the client of database access request from client, also can be other clients) database access request, from connection pool, obtaining a database connection (can be that the database last time obtaining connects, also can connect for other databases), and this database is connected and offers client, same, after database access request is complete, this database connection is recovered in connection pool.
Seen from the above description, introducing after connection pool technology, after the data access operation of database completes, the database connection that client is used is not closed, but be stored in connection pool, and the database connection being stored in connection pool can be used again, the database in connection pool connect obtained multiplexing, avoided repeatedly building database connect and repeatedly close the operation that database connects, thereby saved system resource and time.
Because the SQL statement in database access request may be the SQL statement of the SQL statement that locks, release or not relate to the SQL statement (can be called common SQL statement) that adds release, therefore, introducing after connection pool technology, there is lock rights management careless omission problem in database access meeting, a concrete example, in Fig. 1, the first client is connected and is connected with MySQL database by the first database in connection pool, and the second client is connected and is connected with MySQL database by the second database in connection pool, the first client-requested is carried out SELECT GET_LOCK(' lock1 ', 0) SQL statement, the second client-requested is carried out SELECT GET_LOCK(' lock2 ', 0) SQL statement, after these two SQL statement are performed, the first client obtains lock lock1, and the second client obtains lock lock2, and the connection of the first database is connected and is recycled in connection pool with the second database, before the SQL statement of the first client and the second client-requested execution SELECT RELEASE_LOCK (' lock2 ') and SELECT RELEASE_LOCK (' lock1 '), if the first client-requested is carried out SELECT GET_LOCK(' lock2 ', 0) SQL statement, or the second client-requested is carried out SELECT GET_LOCK(' lock1 ', 0) SQL statement, because state and the database of lock connect and bind, therefore, be that the database that the first client is distributed is connected to aforementioned the first database connection, be that the database that the second client is distributed is connected to aforementioned the second database connection, the first client can obtain lock lock2, the second client can obtain lock lock1.But correct result should be that the first client and the second client all get clogged, thereby the first client can not obtain lock lock2, and the second client can not obtain lock lock1.
The problem that lock rights management in database access is slipped, existing solution is generally: make client monopolize a database at run duration and connect, until after this client exits, this database connection just can be recovered in connection pool, like this, at client run duration, the SQL statement of all SQL statement that lock of this client, release and common SQL statement all can connect and be performed based on same database, thereby the lock that this client obtains can not obtained by other clients.
Inventor finds realizing in process of the present invention, the reusing degree that the above-mentioned solution based on monopolizing database connection can make database connect reduces greatly, particularly, client also needs to carry out other logics at run duration except SQL statement is carried out in request, thereby carry out meeting life period interval between two SQL statement in client-requested, within this time interval, the shared database connection of client be not both recycled in connection pool, by this client, was not made full use of yet.Seen from the above description the reusing degree that, database connects awaits further raising.
Summary of the invention
In view of the above problems, the present invention has been proposed to a kind of overcome the problems referred to above or the data bank access method addressing the above problem at least in part and corresponding database access device are provided.
According to one aspect of the present invention, a kind of data bank access method is provided, the method comprises: receive the database access request from client; Judge client current whether have database connect; Client is current do not have database and connect in the situation that, from connection pool, choose database and connect, and offer described client; Based on the current database having of described client, connect the described database access request of carrying out; After described database access request is complete, according to the lock information corresponding to described client of storage, judges that described client is current and whether there is the lock not discharging; If described client is current, there is the lock not discharging, for described client keeps described database, connect, otherwise, described database is connected and is recycled in described connection pool.
According to a further aspect in the invention, provide a kind of database access device, wherein, described device comprises: receiver module, is suitable for receiving the database access request from client; Judge module, be suitable for judging described client current whether have database connect; Choose link block, be suitable for, described client is current do not have database and connect in the situation that, from connection pool, choosing database and connecting, and offer described client; Processing module, is suitable for connecting based on the current database having of described client the described database access request of carrying out; Connect recycling module, be suitable for after database access request is complete, according to the lock information corresponding to described client of storage, judge that described client is current and whether there is the lock not discharging, if described client is current, there is the lock not discharging, for keeping described database, described client connects, otherwise, described database is connected and is recycled in described connection pool.
After data bank access method of the present invention and device are complete by the database access request in client, whether judge that this client is current has a lock not discharging, and this client is current to be had the lock not discharging in the case of determining, this database is not connected and is recycled in connection pool, but continue to be taken by this client; Like this, can avoid lock that this client has owing to connecting and binding with database and this database is connected the possibility that is assigned to other clients and obtained by other clients; Thereby the lock authority problem that the present invention has brought in the case of having solved the database connection multiplexing in connection pool, improved to a certain extent the reusing degree that the database in connection pool connects.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to better understand technological means of the present invention, and can be implemented according to the content of instructions, and for above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the specific embodiment of the present invention.
Accompanying drawing explanation
By reading below detailed description of the preferred embodiment, various other advantage and benefits will become cheer and bright for those of ordinary skills.Figure of description is only for the object of preferred implementation is shown, and do not think limitation of the present invention.And in whole accompanying drawing, represent identical parts by identical reference symbol.In the accompanying drawings:
Fig. 1 shows the network architecture schematic diagram of database access;
Fig. 2 shows the data bank access method process flow diagram according to the embodiment of the present invention one;
Fig. 3 shows the data bank access method process flow diagram according to the embodiment of the present invention two;
Fig. 4 shows the database access device schematic diagram according to the embodiment of the present invention three.
Embodiment
Exemplary embodiment of the present disclosure is described below with reference to accompanying drawings in more detail.Although shown exemplary embodiment of the present disclosure in accompanying drawing, but should be appreciated that and can realize the disclosure and the embodiment that should do not set forth limits here with various forms.On the contrary, it is in order more thoroughly to understand the disclosure that these embodiment are provided, and can be by the those skilled in the art that conveys to complete the scope of the present disclosure.
Embodiment mono-, data bank access method.Below in conjunction with Fig. 2, the method for the present embodiment is elaborated.
In Fig. 2, S200, receive from the database access request of client.
Concrete, the SQL statement in this database access request can be the SQL statement locking, and can be also the SQL statement of release, can also be for not relating to the SQL statement (following referred to as common SQL statement) that adds release.The SQL statement here can be the SQL statement based on MYSQL.
S210, judge that this client is current and whether there is database and connect, in the situation that determining that this client is current not to be had database and connect, to S220, in the situation that determining that this client is current to be had database and connect, to S230.
Concrete, the present embodiment can according to local canned data judge this client current whether have database connect, for example, judge the local connection identifier information corresponding with this client (correspondence relationship information of the connection identifier that client identification is connected with database as whether stored) that whether stores, if local, store the connection identifier information corresponding with this client (as this locality stores the correspondence relationship information of the connection identifier that client identification is connected with database), represent this client current have database connect, if local, do not store the connection identifier information corresponding with this client (correspondence relationship information of not storing the connection identifier that client identification is connected with database as this locality), represent this client current do not have database connect, again for example, the current database corresponding to this client of the local storage of judgement connects the value of zone bit, the value of determining this database and connect zone bit be the first predetermined value (as 1 or true etc.) time, represent this client current have database connect, the value of determining this database and connect zone bit be the second predetermined value (as 0 or false etc.) time, represent that this client is current and do not there is database and connect.
The present embodiment can also adopt other modes judge this client current whether have database connect, no longer illustrated in greater detail of concrete judgment mode.
S220, from connection pool, choose database and connect, and offer this client.
Concrete, in the situation that determining that this client is current not to be had database and connect, should from connection pool, choose a database and connect, and this database of choosing is connected and offers this client; That is to say, the present embodiment can distribute a database that established and that be stored in connection pool for current this client without database connection and connect.The present embodiment can adopt existing connection allocation strategy (or be called database connect Selection Strategy) from connection pool for this client is chosen a database connection.
In abovementioned steps S210, if whether judge according to the connection identifier information corresponding with this client of this locality storage that this client is current has database and connects, in this step, from connection pool, choose after a database connects and offer this client, should store in this locality the connection identifier information that database that this chooses connects, the correspondence relationship information of the connection identifier that the database that this client identification chooses with this as stored is connected.
In abovementioned steps S210, if the value that connects zone bit according to the current database for this client setting of this locality storage judges that this client is current and whether has database and connect, in this step, from connection pool, choose after a database connects and offer this client, should this locality the current database for this client setting of the storage value that connects zone bit be set to the first predetermined value, as be set to 1 or true etc.
S230, based on the current database that has of client, connect the above-mentioned database access request of carrying out.
Concrete, it can be that to utilize abovementioned steps S220 be that the database that this client is distributed connects that the current database having of client connects, and can be also not need to carry out abovementioned steps S220, and the database that this client has had connects.
Based on the current database having of this client, connecting performing database request of access and can be specially the SQL statement that execution locks, can, for carrying out the SQL statement of release, can also be also to carry out common SQL statement.
In the SQL statement of this execution, be the SQL statement locking, conventionally in this SQL statement, carry out front/rear, client can obtain corresponding lock, for example, client-requested is carried out SELECT GET_LOCK(' lock1 ', 0) SQL statement, this SQL statement is before being performed, and client obtains lock lock1.
In the present embodiment, when client obtains lock, should safeguard the lock information that this client is corresponding, for example, store the lock title of this lock, for another example, increase the quantity of the current lock having of this client of its storage etc.; The in the situation that of storage lock title, the lock title of the current acquisition of client can be added in lock title set corresponding to this client; In the case of increasing the quantity of the current lock having of this client, the quantity of current this client lock having can be added to 1.In addition, client in the present embodiment, also to having in the situation of lock status sign, when the lock title of the current acquisition of client being added in lock title set corresponding to this client, should corresponding arrange the value of lock status sign corresponding to this client.Above-mentioned lock status sign is for representing the current lock that whether has of its corresponding client, and can express this client current is in lock, or outside locking.This lock status sign can be Boolean type variable.It should be noted that, the lock status sign in the present embodiment can not be used for the quantity of the lock that represents that client is current had.
The SQL statement that is release in the SQL statement of this execution, in this SQL statement, carry out front/rear, client can discharge corresponding lock, for example, client-requested is carried out the SQL statement of SELECT RELEASE_LOCK (' lock1 '), this SQL statement is after being performed, and client discharges its current lock lock1 having.
In the present embodiment, when client discharges its current lock having or multiple lock, should safeguard equally the lock information that this client is corresponding; As deleted the lock title of this lock of having stored, for another example, reduce the quantity of the current lock having of this client of its storage etc.; In the situation that deleting lock title, the lock title that can delete the lock of the current release of this client from lock title set corresponding to this client; In the case of reducing the quantity of the current lock having of this client, the quantity of current this client lock having can be subtracted to 1.In addition, client is in the present embodiment also to having in the situation of lock status sign, when deleting the lock title set corresponding from this client of the lock title of the lock of the current release of client, the value of lock status sign corresponding to this client should corresponding be set, in lock title set as corresponding in this client without any lock during title, lock status sign is set to represent that this client is at present in locking the value of outer state, for another example, while also there is at least one lock title in lock title set corresponding to this client, lock status sign is set to represent the value of this client state in lock.
In the SQL statement of this execution, be common SQL statement, complete front/rear in this SQL statement, would not carry out for this SQL statement the associative operation of the lock information corresponding with this client.
Lock title set in the present embodiment can be embodied in the form of lock information recording table; A concrete example, each client is a corresponding lock information recording table respectively, if each client identification is respectively to there being a lock information recording table, in this lock information recording table, at least includes lock title; If the SQL statement of this execution is the SQL statement locking, in this SQL statement, carry out front/rear, can find corresponding lock information recording table according to client identification, and the lock title of the current acquisition of this client is added in this lock information recording table finding; If the SQL statement that the SQL statement of this execution is release, in this SQL statement, carry out front/rear, can find corresponding lock information recording table according to client identification, and the lock title of deleting the lock of the current release of this client from this lock information recording table finding.The example that another is concrete, the corresponding same lock information recording table of all clients, should at least include client identification and lock title in this lock information recording table; A record in this lock information recording table includes the lock title of the current all locks that have of client, if the SQL statement of this execution is the SQL statement locking, in this SQL statement, carry out front/rear, can in lock information recording table, search corresponding record according to the client identification of this client, and in this record finding, append the lock title of the lock of the current acquisition of this client; If the SQL statement that the SQL statement of this execution is release, in this SQL statement, carry out front/rear, can in lock information recording table, search corresponding record according to client identification, and from this record finding, delete the lock title of the lock of the current release of this client.The example that another is concrete, the corresponding same lock information recording table of all clients, should at least include client identification and lock title in this lock information recording table; Client have N lock and this client in lock information recording table to should have N bar record in the situation that, if the SQL statement of this execution is the SQL statement locking, front/rear in this SQL statement execution, can in lock information recording table, append a record according to the lock title of the lock of the client identification of this client and the current acquisition of this client; If the SQL statement that the SQL statement of this execution is release, in this SQL statement, carry out front/rear, can in lock information recording table, search according to the lock title of the lock of client identification and the current release of this client the record of coupling, and the record of this coupling finding is deleted from lock information recording table.
At the present embodiment, be each client lock status sign is set respectively in the situation that, the concrete value of lock status sign should be relevant to interpolation operation and the deletion action of lock title in the set of lock title.
A concrete example, in each client respectively to should have a lock information recording table in the situation that, each lock information recording table is respectively to there being a lock status sign, and this lock status sign can be expressed the lock information recording table corresponding with it for empty, or is non-NULL; In the SQL statement of this execution, be the SQL statement locking, complete in this SQL statement, and after the lock title of the current acquisition of this client is added in lock information recording table corresponding to this client, value that should this lock status sign be set to the first value (as 1 or true), to represent that this lock information recording table is as non-NULL, i.e. current at least one lock that has of this client; The SQL statement that is release in the SQL statement of this execution, complete in this SQL statement, and delete the lock title of lock of the current release of this client from lock information recording table corresponding to this client after, value that should this lock status sign be set to the second value (as 0 or false), to represent that this lock information recording table is as empty, i.e. the current lock that do not have of this client.
The example that another is concrete, in the situation of the corresponding same lock information recording table of all clients in the present embodiment, each client is respectively to there being a lock status sign, and lock status sign can express in lock information recording table whether include the lock title that this client identification is corresponding, in the SQL statement of this execution, be the SQL statement locking, complete in this SQL statement, and after the lock title of the current acquisition of this client is added in lock information recording table corresponding to this client, value that should this lock status sign be set to the first value (as 1 or true), to represent including the lock title that this client identification is corresponding in this lock information recording table, i.e. current at least one lock that has of this client, the SQL statement that is release in the SQL statement of this execution, complete in this SQL statement, and delete the lock title of lock of the current release of this client from lock information recording table corresponding to this client after, should judge and in this lock information recording, whether still include lock title corresponding to this client, if still include lock title corresponding to this client, the value of lock status corresponding to this client sign be set to the first value (as 1 or true), to represent including lock title corresponding to this client in this lock information recording table, i.e. current at least one lock that has of this client, if no longer include lock title corresponding to this client in this lock information recording table, the value of should this client corresponding lock status sign be set to the second value (as 0 or false), to represent not include lock title corresponding to this client, the i.e. current lock that do not have of this client in this lock information recording table.
It should be noted that, the above-mentioned detailed process of safeguarding lock information corresponding to this client can be carried out before performing database request of access, also can after performing database request of access, carry out, certainly, the present embodiment is not got rid of the possibility of lock maintenance of information step and database access request execution step executed in parallel yet.
S240, after database access request is complete, according to the lock information corresponding to this client of storage, judge that this client is current and whether there is the lock not discharging, if this client is current, there is the lock not discharging, arrive S250, if this client is current, do not there is the lock not discharging, arrive S260.
Concrete, the present embodiment is according to lock information corresponding to current this client of having stored, to judge that this client is current whether to have a lock not discharging, and this lock information can be the quantity of lock title, lock or lock status sign.
A concrete example, in each client respectively to having separately one lock information recording table, the present embodiment can judge in lock information recording table corresponding to this opened client whether include lock title, if include lock title in this lock information recording table, determine that this client is current has a lock not discharging, if do not include lock title in this lock information recording table, determine that this client is current does not have a lock not discharging.
The example that another is concrete, in all clients all corresponding same lock information recording table, the present embodiment can judge in opened lock information recording table, whether to include lock title corresponding to this client, if include lock title corresponding to this client in this lock information recording table, determine that this client is current has a lock not discharging, if do not comprise lock title corresponding to this client in this lock information recording table, determine that this client is current does not have a lock not discharging.
The 3rd concrete example, in each client respectively to having the quantity of lock separately, the present embodiment can judge the currency of the quantity of lock corresponding to this client, if this currency is not initial value (initial value sign client current do not have the lock not discharging), determine that this client is current has a lock not discharging, if this currency is initial value, determine that this client is current does not have a lock not discharging.
The 4th concrete example, in each client respectively to having lock status separately sign, can judge the value of lock status sign corresponding to this client, if the value of lock status corresponding to this client is the first value, determine that this client is current has a lock not discharging, if the value of lock status corresponding to this client is the second value, determine that this client is current does not have a lock not discharging.
S250, for keeping this database, this client connects.
Concrete, for this client, do not carry out and discharge the operation that the current database having of this client connects; A concrete example, is still the connection identifier information corresponding with this client that this client retains local storage, the correspondence relationship information of the connection identifier being connected with database as client identification.
Because this database connects, be still kept rather than be recovered in connection pool, therefore, next of this client database request of access still can connect and be performed based on this database.
S260, by database connect be recycled in connection pool.
Concrete, for this client, carry out and discharge the operation that the current database having of this client connects, so that connecting, this database is recovered in connection pool; A concrete example, deletes the connection identifier information corresponding with this client of local storage, the correspondence relationship information of the connection identifier that the client identification of storing this locality as deleted is connected with database.
Because this database connects, be recovered in connection pool, therefore, for next database request of access of this client, can again from connection pool, choose database and connect, and connect and be performed based on the database of again choosing.
Seen from the above description, the present embodiment is only client is current still have lock in the situation that, just database corresponding this client can not connected and is recycled in connection pool, because the quantity of the SQL statement that locks in the database access request of client shared ratio in all SQL statement is very low, the impact of the reusing degree that therefore, the present embodiment connects database is very little.
Embodiment bis-, data bank access method.Below in conjunction with Fig. 3, the method for the present embodiment is elaborated.
In Fig. 3, after the method for the present embodiment starts, wait for the database access request that client is sent always, after the database access request receiving from client, whether the current database link information (the connection identifier information etc. connecting as database) that detects this client is empty, if the current database link information of this client is not empty, skip from connection pool and to choose the step that a database connects for this client, directly to follow-up, judge that whether the SQL statement in database access request is the determining step of the SQL statement that locks; If the current database link information of this client is empty, from connection pool, for this client, choosing a database connects, and store this database linkage information of choosing (the connection identifier information that this database connects as stored etc.), afterwards, to follow-up, judge that whether the SQL statement in database access request is the determining step of the SQL statement that locks; In the case of judging this SQL statement, be the SQL statement locking, lock title corresponding this SQL statement locking is added in the lock information recording table of this client, and lock status corresponding to this client sign is set to " in lock ", afterwards, to the step of carrying out this SQL statement; In the case of judging this SQL statement, not the SQL statement locking, should continue whether follow-up this SQL statement that judges is the step of the SQL statement of release, if judge the SQL statement that is not release, directly arrive the step of follow-up this SQL statement of execution; If judging is the SQL statement of release, lock the title corresponding SQL statement of this release is deleted from lock information recording table corresponding to this client, and in the situation that deleting in this lock information recording table last lock title, the lock status sign of this client is set to " lock is outer ", to the step of follow-up this SQL statement of execution; Carrying out after this SQL statement, judge whether lock information recording table corresponding to this client is empty (value of lock status sign is " in lock " still " lock is outer " as judged), if lock information recording table corresponding to this client is empty (if the value of lock status sign is " lock is outer "), current this client this database having is connected and is recovered in connection pool, and continue to wait for the database connection request from client; If lock information recording table corresponding to this client is non-NULL (if the value of lock status sign is " in lock "), do not carry out follow-up database and connect recycling step, and continue to wait for the database connection request from client.
Embodiment tri-, database access device.Below in conjunction with Fig. 4, the device of the present embodiment is elaborated.
Device shown in Fig. 4 mainly comprises: receiver module 400, judge module 410, choose link block 420, processing module 430, connect recycling module 440 and maintenance module 450.
Receiver module 400 is connected with judge module 410; Receiver module 400 is mainly suitable for receiving the database access request from client.
Concrete, the SQL statement in the database access request that receiver module 400 receives can be the SQL statement locking, and can be also the SQL statement of release, can also be for not relating to the SQL statement (following referred to as common SQL statement) that adds release.The SQL statement here can be the SQL statement based on MYSQL, and the database in corresponding the present embodiment can be the database based on MYSQL.
Judge module 410 except being connected with receiver module 400, also with choose link block 420 and processing module 430 is connected respectively; Judge module 410 is mainly suitable for judging that above-mentioned client is current whether has database and connect, and provides respectively its judged result information to choosing link block 420 and processing module 430.
Concrete, judge module 410 can according to local canned data judge this client current whether have database connect, for example, judge module 410 judges the local connection identifier information corresponding with this client (correspondence relationship information of the connection identifier that client identification is connected with database as whether stored) that whether stores, if local, store the connection identifier information corresponding with this client (as this locality stores the correspondence relationship information of the connection identifier that client identification is connected with database), judge module 410 judge this client current have database connect, judge module 410 triggers processing module 430 and carries out corresponding operation, if local, do not store the connection identifier information corresponding with this client (correspondence relationship information of not storing the connection identifier that client identification is connected with database as this locality), judge module 410 judges that this client is current not to be had database and connect, and judge module 410 triggers to be chosen link block 420 and carry out corresponding operation, again for example, the current database corresponding to this client of the local storage of judge module 410 judgement connects the value of zone bit, if this database connect the value of zone bit be the first predetermined value (as 1 or true etc.) time, judge module 410 judges that this client is current to be had database and connect, and judge module 410 triggers processing module 430 and carries out corresponding operation, if this database connect the value of zone bit be the second predetermined value (as 0 or false etc.) time, judge module 410 judges that this client is current not to be had database and connect, judge module 410 triggers to be chosen link block 420 and carries out corresponding operation.
Judge module 410 can also adopt other modes judge this client current whether have database connect, no longer illustrated in greater detail of concrete judgment mode.
Above-mentioned local canned data can be arranged in above-mentioned arbitrary module of the present embodiment, also can be independent of above-mentioned module and be stored in the device of the present embodiment.
Choose link block 420 except being connected with judge module 410, be also connected with processing module 430; Choose link block 420 be mainly suitable for above-mentioned client current do not have database connect in the situation that, from connection pool, choosing database connects, and trigger processing module 430 and carry out corresponding operation, as choose the connection identifier that link block 420 notification handler module 430 its databases of choosing connect, choose link block 420 and client identification also can also be offered to processing module 430 in the lump.
Concrete, in the situation that judge module 410 determines that this client is current not to be had database and connect, choose link block 420 and should from connection pool, choose a database and connect, and this database of choosing is connected and offers this client; That is to say, choosing link block 420 can connect for current database that established and that be stored in connection pool of client distribution without database connection.Choose link block 420 can adopt existing connection allocation strategy (or be called database connect Selection Strategy) from connection pool for this client is chosen a database connection.
If judge module 410 judges according to the connection identifier information corresponding with this client of this locality storage that this client is current, whether there is database and connect, choose link block 420 chooses after a database connects and offer this client from connection pool, should store in this locality the connection identifier information that database that this chooses connects, the correspondence relationship information of the connection identifier that the database that this client identification chooses with this as stored is connected.
If the value that judge module 410 connects zone bit according to the current database for this client setting of this locality storage judges that this client is current and whether has database and connect, choose link block 420 chooses after a database connects and offer this client from connection pool, should this locality the current database for this client setting of the storage value that connects zone bit be set to the first predetermined value, as be set to 1 or true etc.
Processing module 430 except with choose link block 420 is connected, also be connected recycling module 440 and connect, processing module 430 is mainly suitable for connecting based on the current database having of above-mentioned client the database access request from above-mentioned client that receiver module 400 receives of carrying out.
Concrete, the performed database access request of processing module 430 can be specially the SQL statement locking, and can, for the SQL statement of release, can also be also common SQL statement.
Connecting recycling module 440 is mainly suitable for after processing module 430 is complete for above-mentioned database access request, according to the lock information corresponding to client of this locality storage, judge that this client is current and whether there is the lock not discharging, if this client is current, there is the lock not discharging, connecting recycling module 440 connects for this client keeps its current database having, otherwise, connect recycling module 440 the current client database having connected and is recycled in connection pool.
Concrete, connect recycling module 440 and be the lock information corresponding to this client of having stored according to current this locality and judge that this client is current and whether there is the lock not discharging, this lock information can be the quantity of lock title, lock or lock status sign etc.The lock information of above-mentioned local storage can be arranged in above-mentioned arbitrary module of the present embodiment, also can be independent of above-mentioned module and is stored in the device of the present embodiment.
A concrete example, in each client respectively to having separately one lock information recording table, connect recycling module 440 and can judge in lock information recording table corresponding to this opened client whether include lock title, if include lock title in this lock information recording table, connect recycling module 440 and determine that this client is current has a lock not discharging, if do not include lock title in this lock information recording table, connect recycling module 440 and determine that this client is current does not have a lock not discharging.
The example that another is concrete, in all clients all corresponding same lock information recording table, connect recycling module 440 and can judge in opened lock information recording table, whether to include lock title corresponding to this client, if include lock title corresponding to this client in this lock information recording table, connect recycling module 440 and determine that this client is current has a lock not discharging, if do not comprise lock title corresponding to this client in this lock information recording table, connect recycling module 440 and determine that this client is current does not have a lock not discharging.
The 3rd concrete example, in each client respectively to having the quantity of lock separately, connect the currency that recycling module 440 can judge the quantity of lock corresponding to this client, if this currency is not initial value (initial value sign client current do not have the lock not discharging), connect recycling module 440 and determine that client is current has a lock not discharging, if this currency is initial value, connects recycling module 440 and determine that this client is current does not have a lock not discharging.
The 4th concrete example, in each client respectively to having lock status separately sign, connect the value that recycling module 440 can judge lock status sign corresponding to this client, if the value of lock status corresponding to this client is the first value, connect recycling module 440 and determine that this client is current has a lock not discharging, if the value of lock status corresponding to this client is the second value, connects recycling module 440 and determine that this client is current does not have a lock not discharging.
Connect recycling module 440 and database is connected to the concrete example being recycled in connection pool, connect recycling module 440 and delete the connection identifier information corresponding with this client of local storage, the correspondence relationship information of the connection identifier that the client identification of deleting local storage as connection recycling module 440 is connected with database.
The SQL statement that maintenance module 450 is mainly suitable in database access request is the SQL statement locking, the execution of the SQL statement that locks of storage and make the lock title of the lock that client obtains; SQL statement in database access request is the SQL statement of release, deletes the execution of SQL statement of release and the lock title of lock that client is discharged from the lock title of storage.
In the SQL statement of processing module 430 these execution, be the SQL statement locking, conventionally front/rear in this SQL statement execution, client can obtain corresponding lock.When client obtains lock, maintenance module 450 should be safeguarded the lock information that this client is corresponding, and for example, maintenance module 450 is stored the lock title of this lock in this locality, and for another example, maintenance module 450 increases the quantity of the current lock having of this client of local storage etc.; The in the situation that of this locality storage lock title, maintenance module 450 can be added on the lock title of the current acquisition of client in lock title set corresponding to this client; In the case of increasing the quantity of the current lock having of this client, maintenance module 450 can add 1 by the quantity of current this client lock having.
In addition, client is in the present embodiment also to having in the situation of lock status sign, when the lock title of the current acquisition of client being added in lock title set corresponding to this client, maintenance module 450 should corresponding arrange the value of lock status sign corresponding to this client.
The SQL statement that is release in the SQL statement of processing module 430 these execution, conventionally in this SQL statement, carry out front/rear, client can discharge corresponding lock, for example, client-requested is carried out the SQL statement of SELECT RELEASE_LOCK (' lock1 '), this SQL statement is after processed module 430 is carried out, and client discharges its current lock lock1 having.
In the present embodiment, when client discharges its current lock having or multiple lock, maintenance module 450 should be safeguarded the lock information that this client is corresponding equally; As the lock title of deleting local this lock of having stored, for another example, reduce the quantity of the current lock having of this client of local storage etc.; In the situation that deleting lock title, the lock title that maintenance module 450 can be deleted the lock of the current release of this client from lock title set corresponding to this client; In the case of reducing the quantity of the current lock having of this client, maintenance module 450 can subtract 1 by the quantity of current this client lock having.In addition, client is in the present embodiment also to having in the situation of lock status sign, when deleting the lock title set corresponding from this client of the lock title of the lock of the current release of client, maintenance module 450 should corresponding arrange the value of lock status sign corresponding to this client, as in lock title set corresponding to this client without any lock during title, maintenance module 450 lock status signs are set to represent that this client is at present in locking the value of outer state, for another example, while also there is at least one lock title in lock title set corresponding to this client, maintenance module 450 lock status signs are set to represent the value of this client state in lock.
In the SQL statement of this execution of processing module, be common SQL statement, carry out front/rearly in this SQL statement, the associated maintenance that maintenance module 450 would not be carried out the lock information corresponding with this client for this SQL statement operate.
Lock title set in the present embodiment can be embodied in the form of lock information recording table; The object lesson of lock information recording table and for the detailed process of the performed attended operation of this lock information recording table as the description in above-mentioned embodiment of the method, be not repeated.
It should be noted that, maintenance module 450 safeguards that the detailed process of lock information corresponding to this client can carry out before processing module 430 performing database request of access, also can after processing module 430 performing database request of access, carry out, certainly, the present embodiment is not got rid of the possibility of maintenance module 4450 maintenance lock information processes and processing module 430 performing database request of access executed in parallel yet.
A1, a kind of data bank access method, it comprises:
Reception is from the database access request of client;
Judge described client current whether have database connect;
Described client is current do not have database and connect in the situation that, from connection pool, choose database and connect, and offer described client;
Based on the current database having of described client, connect the described database access request of carrying out;
After described database access request is complete, according to the lock information corresponding to described client of storage, judges that described client is current and whether there is the lock not discharging;
If described client is current, there is the lock not discharging, for described client keeps described database, connect, otherwise, described database is connected and is recycled in described connection pool.
A2, the method as described in A1, wherein, described judge described client current whether have database connect comprise:
Judge whether to record the connection identifier information corresponding with described client;
If record the connection identifier information corresponding with described client, described client is current has database and connects, otherwise described client is current not to be had database and connect.
A3, the method as described in A2, wherein, connect choosing database from connection pool, and offers after described client, and described method also comprises:
Record client identification with described in the corresponding relation of the connection identifier information that is connected of the database chosen.
A4, the method as described in A1 or A2 or A3, wherein, described lock information comprises: the quantity of lock title or lock or lock status sign.
A5, the method as described in A4, wherein, described method also comprises:
SQL statement in described database access request is the SQL statement locking, the execution of the SQL statement locking described in storage and make the lock title of the lock that described client obtains;
The SQL statement that SQL statement in described database access request is release, from the lock title of storage, delete described release SQL statement execution and make the lock title of the lock that described client discharges.
A6, the method as described in A5, wherein, each client is respectively to there being lock information recording table separately, and described lock name storage is in sending the corresponding lock information recording of the client table of described database access request.
A7, the method as described in A6, wherein, each lock information recording table is respectively to there being lock status sign separately, and described lock status sign represents that lock information recording table is sky or non-NULL.
A8, the method as described in A7, wherein, described method also comprises:
After increase lock title in lock information recording table, the lock status sign that this lock information recording table is corresponding is set to non-NULL;
Deleting after lock title from lock information recording table, judge when whether this lock information recording table is sky;
If this lock information recording table is empty, the lock status sign that this lock information recording table is corresponding is set to sky, otherwise the lock status sign that this lock information recording table is corresponding is set to non-NULL.
A9, the method as described in A7, wherein, described lock information corresponding to described client according to storage judges that the current lock whether with not release of described client comprises:
Obtain lock status corresponding to described client sign, represent that lock information recording table is when empty judging described lock status sign, determine that described client is current and do not there is the lock not discharging, otherwise, determine that described client has the lock not discharging.
B10, a kind of database access device, it comprises:
Receiver module, is suitable for receiving the database access request from client;
Judge module, be suitable for judging described client current whether have database connect;
Choose link block, be suitable for, described client is current do not have database and connect in the situation that, from connection pool, choosing database and connecting, and offer described client;
Processing module, is suitable for connecting based on the current database having of described client the described database access request of carrying out;
Connect recycling module, be suitable for after described database access request is complete, according to the lock information corresponding to described client of storage, judge that described client is current and whether there is the lock not discharging, if described client is current, there is the lock not discharging, for keeping described database, described client connects, otherwise, described database is connected and is recycled in described connection pool.
B11, the device as described in B10, wherein, described judge module is also suitable for:
Judge whether to record the connection identifier information corresponding with described client;
If record the connection identifier information corresponding with described client, described client is current has database and connects, otherwise described client is current not to be had database and connect.
B12, the device as described in B11, wherein, described in choose link block and be also suitable for:
Connect choosing database from connection pool, and offer after described client, record client identification with described in the corresponding relation of the connection identifier information that is connected of the database chosen.
B13, the device as described in B10 or B11 or B12, wherein, described lock information comprises: the quantity of lock title or lock or lock status sign.
B14, the device as described in B13, wherein, institute's device also comprises:
Maintenance module, the SQL statement being suitable in described database access request is the SQL statement locking, the execution of the SQL statement locking described in storage and make the lock title of the lock that described client obtains; The SQL statement that SQL statement in described database access request is release, from the lock title of storage, delete described release SQL statement execution and make the lock title of the lock that described client discharges.
B15, the device as described in B14, wherein, each client is respectively to there being lock information recording table separately, and described processing module will be locked name storage in sending the corresponding lock information recording of the client table of described database access request.
B16, the device as described in B15, wherein, each lock information recording table is respectively to there being lock status sign separately, and described lock status sign represents that lock information recording table is sky or non-NULL.
B17, the device as described in B16, wherein, described processing module is also suitable for:
After increase lock title in lock information recording table, the lock status sign that this lock information recording table is corresponding is set to non-NULL;
Deleting after lock title from lock information recording table, judge when whether this lock information recording table is sky;
If this lock information recording table is empty, the lock status sign that this lock information recording table is corresponding is set to sky, otherwise the lock status sign that this lock information recording table is corresponding is set to non-NULL.
B18, the device as described in B16, wherein, described connection recycling module is also suitable for:
Obtain lock status corresponding to described client sign, represent that lock information recording table is when empty judging described lock status sign, determine that described client is current and do not there is the lock not discharging, otherwise, determine that described client has the lock not discharging.
The algorithm providing at this is intrinsic not relevant to any certain computer, virtual system or miscellaneous equipment with demonstration.Various general-purpose systems also can with based on using together with this teaching.According to description above, it is apparent constructing the desired structure of this type systematic.In addition, the present invention is not also for any certain programmed language.It should be understood that and can utilize various programming languages to realize content of the present invention described here, and the description of above language-specific being done is in order to disclose preferred forms of the present invention.
In the instructions that provided herein, a large amount of details have been described.But, can understand, embodiments of the invention can be put into practice in the situation that there is no these details.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand one or more in each inventive aspect, in the above in the description of exemplary embodiment of the present invention, each feature of the present invention is grouped together into single embodiment, figure or sometimes in its description.But, the method for the disclosure should be construed to the following intention of reflection: the present invention for required protection requires than the more feature of feature of clearly recording in each claim.Or rather, as reflected in claims below, inventive aspect is to be less than all features of disclosed single embodiment above.Therefore, claims of following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and can the module in the equipment in embodiment are adaptively changed and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and can put them in addition multiple submodules or subelement or sub-component.At least some in such feature and/or process or unit are mutually repelling, and can adopt any combination to combine all processes or the unit of disclosed all features in this instructions (comprising claim, summary and the accompanying drawing followed) and disclosed any method like this or equipment.Unless clearly statement in addition, in this instructions (comprising claim, summary and the accompanying drawing followed) disclosed each feature can be by providing identical, be equal to or the alternative features of similar object replaces.
In addition, those skilled in the art can understand, although embodiment more described herein comprise some feature rather than further feature included in other embodiment, the combination of the feature of different embodiment means within scope of the present invention and forms different embodiment.For example, in the following claims, the one of any of embodiment required for protection can be used with array mode arbitrarily.
All parts embodiment of the present invention can realize with hardware, or realizes with the software module of moving on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that and can use in practice microprocessor or digital signal processor (DSP) to realize according to the some or all functions of the some or all parts in the database access device of the embodiment of the present invention.The present invention can also be embodied as part or all equipment or the device program (for example, computer program and computer program) for carrying out method as described herein.Realizing program of the present invention and can be stored on computer-readable medium like this, or can there is the form of one or more signal.Such signal can be downloaded and obtain from internet website, or provides on carrier signal, or provides with any other form.
It should be noted, the present invention will be described rather than limit the invention for above-described embodiment, and those skilled in the art can design alternative embodiment in the case of not departing from the scope of claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and is not listed as element or step in the claims.Being positioned at word " " before element or " one " does not get rid of and has multiple such elements.The present invention can be by means of including the hardware of some different elements and realizing by means of the computing machine of suitably programming.In the unit claim of having enumerated some devices, several in these devices can be to carry out imbody by same hardware branch.The use of word first, second and C grade does not represent any order.Can be title by these word explanations.

Claims (10)

1. a data bank access method, it comprises:
Reception is from the database access request of client;
Judge described client current whether have database connect;
Described client is current do not have database and connect in the situation that, from connection pool, choose database and connect, and offer described client;
Based on the current database having of described client, connect the described database access request of carrying out;
After described database access request is complete, according to the lock information corresponding to described client of storage, judges that described client is current and whether there is the lock not discharging;
If described client is current, there is the lock not discharging, for described client keeps described database, connect, otherwise, described database is connected and is recycled in described connection pool.
The method of claim 1, wherein described judge described client current whether have database connect comprise:
Judge whether to record the connection identifier information corresponding with described client;
If record the connection identifier information corresponding with described client, described client is current has database and connects, otherwise described client is current not to be had database and connect.
3. method as claimed in claim 2, wherein, connects choosing database from connection pool, and offers after described client, and described method also comprises:
Record client identification with described in the corresponding relation of the connection identifier information that is connected of the database chosen.
4. the method as described in claim 1 or 2 or 3, wherein, described lock information comprises: the quantity of lock title or lock or lock status sign.
5. method as claimed in claim 4, wherein, described method also comprises:
SQL statement in described database access request is the SQL statement locking, the execution of the SQL statement locking described in storage and make the lock title of the lock that described client obtains;
The SQL statement that SQL statement in described database access request is release, from the lock title of storage, delete described release SQL statement execution and make the lock title of the lock that described client discharges.
6. method as claimed in claim 5, wherein, each client is respectively to there being lock information recording table separately, and described lock name storage is in sending the corresponding lock information recording of the client table of described database access request.
7. method as claimed in claim 6, wherein, each lock information recording table is respectively to there being lock status sign separately, and described lock status sign represents that lock information recording table is sky or non-NULL.
8. method as claimed in claim 7, wherein, described method also comprises:
After increase lock title in lock information recording table, the lock status sign that this lock information recording table is corresponding is set to non-NULL;
Deleting after lock title from lock information recording table, judge when whether this lock information recording table is sky;
If this lock information recording table is empty, the lock status sign that this lock information recording table is corresponding is set to sky, otherwise the lock status sign that this lock information recording table is corresponding is set to non-NULL.
9. method as claimed in claim 7, wherein, described lock information corresponding to described client according to storage judges that the current lock whether with not release of described client comprises:
Obtain lock status corresponding to described client sign, represent that lock information recording table is when empty judging described lock status sign, determine that described client is current and do not there is the lock not discharging, otherwise, determine that described client has the lock not discharging.
10. a database access device, it comprises:
Receiver module, is suitable for receiving the database access request from client;
Judge module, be suitable for judging described client current whether have database connect;
Choose link block, be suitable for, described client is current do not have database and connect in the situation that, from connection pool, choosing database and connecting, and offer described client;
Processing module, is suitable for connecting based on the current database having of described client the described database access request of carrying out;
Connect recycling module, be suitable for after described database access request is complete, according to the lock information corresponding to described client of storage, judge that described client is current and whether there is the lock not discharging, if described client is current, there is the lock not discharging, for keeping described database, described client connects, otherwise, described database is connected and is recycled in described connection pool.
CN201310681688.XA 2013-12-12 2013-12-12 Data bank access method and device Active CN103761240B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201310681688.XA CN103761240B (en) 2013-12-12 2013-12-12 Data bank access method and device
PCT/CN2014/093424 WO2015085914A1 (en) 2013-12-12 2014-12-10 Database access method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310681688.XA CN103761240B (en) 2013-12-12 2013-12-12 Data bank access method and device

Publications (2)

Publication Number Publication Date
CN103761240A true CN103761240A (en) 2014-04-30
CN103761240B CN103761240B (en) 2017-12-15

Family

ID=50528480

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310681688.XA Active CN103761240B (en) 2013-12-12 2013-12-12 Data bank access method and device

Country Status (2)

Country Link
CN (1) CN103761240B (en)
WO (1) WO2015085914A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104636131A (en) * 2014-12-12 2015-05-20 北京奇虎科技有限公司 Special instruction execution method and device
WO2015085914A1 (en) * 2013-12-12 2015-06-18 北京奇虎科技有限公司 Database access method and device
WO2016029790A1 (en) * 2014-08-28 2016-03-03 北京奇虎科技有限公司 Data transmission method and device
CN105511813A (en) * 2015-12-11 2016-04-20 北京奇虎科技有限公司 Method, device and system for accessing server disk

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113722351B (en) * 2021-08-30 2024-01-30 杭州安恒信息安全技术有限公司 Parameter restoration method and device in Oracle database access flow

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050086376A1 (en) * 2003-10-17 2005-04-21 Samsung Electronics Co., Ltd. Apparatus and method for synchronizing presence attribute data between terminal and server
CN101515291A (en) * 2009-03-26 2009-08-26 北京泰合佳通信息技术有限公司 Method for leading data into database in a batch way and system thereof
CN101753552A (en) * 2008-12-01 2010-06-23 鸿富锦精密工业(深圳)有限公司 Network communication system and method
CN103365929A (en) * 2012-04-10 2013-10-23 阿里巴巴集团控股有限公司 Management method and management system of database connection
CN103678603A (en) * 2013-12-13 2014-03-26 江苏物联网研究发展中心 Multi-source heterogeneous data efficient converging and storing frame system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI251764B (en) * 2004-12-13 2006-03-21 Inst Information Industry Remote data access system and method, database connection method, and data synchronization method
CN100395710C (en) * 2005-05-27 2008-06-18 华为技术有限公司 Method for access data base by multi-line program applied program
CN103761240B (en) * 2013-12-12 2017-12-15 北京奇虎科技有限公司 Data bank access method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050086376A1 (en) * 2003-10-17 2005-04-21 Samsung Electronics Co., Ltd. Apparatus and method for synchronizing presence attribute data between terminal and server
CN101753552A (en) * 2008-12-01 2010-06-23 鸿富锦精密工业(深圳)有限公司 Network communication system and method
CN101515291A (en) * 2009-03-26 2009-08-26 北京泰合佳通信息技术有限公司 Method for leading data into database in a batch way and system thereof
CN103365929A (en) * 2012-04-10 2013-10-23 阿里巴巴集团控股有限公司 Management method and management system of database connection
CN103678603A (en) * 2013-12-13 2014-03-26 江苏物联网研究发展中心 Multi-source heterogeneous data efficient converging and storing frame system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015085914A1 (en) * 2013-12-12 2015-06-18 北京奇虎科技有限公司 Database access method and device
WO2016029790A1 (en) * 2014-08-28 2016-03-03 北京奇虎科技有限公司 Data transmission method and device
CN104636131A (en) * 2014-12-12 2015-05-20 北京奇虎科技有限公司 Special instruction execution method and device
WO2016091068A1 (en) * 2014-12-12 2016-06-16 北京奇虎科技有限公司 Method and device for executing special instruction
CN104636131B (en) * 2014-12-12 2018-07-27 北京奇虎科技有限公司 A kind of execution method and device of special instruction
CN105511813A (en) * 2015-12-11 2016-04-20 北京奇虎科技有限公司 Method, device and system for accessing server disk

Also Published As

Publication number Publication date
WO2015085914A1 (en) 2015-06-18
CN103761240B (en) 2017-12-15

Similar Documents

Publication Publication Date Title
CN103761240A (en) Database access method and database access device
US6411957B1 (en) System and method of organizing nodes within a tree structure
CN103744628B (en) SSTable file storage method and device
CN109725926B (en) Method and device for managing baseline and data processing method
CN104246727A (en) Data processing system and method for operating a data processing system
CN105279017A (en) Cloud test platform based task distribution method, apparatus and system
CN104573112B (en) Page interrogation method and data processing node in OLTP Cluster Databases
CN109033278A (en) Data processing method, device, electronic equipment and computer storage medium
US11720607B2 (en) System for lightweight objects
CN106599247A (en) Method and device for merging data file in LSM-tree structure
CN103559307A (en) Caching method and device for query
CN111930924A (en) Data duplicate checking system and method based on bloom filter
US10650021B2 (en) Managing data operations in an integrated database system
US6412050B1 (en) Memory record update filtering
CN104598652A (en) Database inquiry method and database inquiry device
AU2006224669B2 (en) Method and system for maintaining consistency of a cache memory by multiple independent processes
CN104376126B (en) The method and device of nuclear symbol in binding in Linux drives
CN101178724A (en) Temporary table management method
CN112000670B (en) Multithreading program data unified management method and system and electronic equipment
CN104239538A (en) Method, system and device for compressing snapshot log
US9009731B2 (en) Conversion of lightweight object to a heavyweight object
CN114791985A (en) Domain name matching method and device and prefix tree updating method and device
CN110825846B (en) Data processing method and device
CN105302604A (en) Application version update method and apparatus
US20130090962A1 (en) Providing variability and materialization over links connecting product line resources

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220728

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.