KR101335499B1 - Query cashing method and apparatus for database middleware - Google Patents

Query cashing method and apparatus for database middleware Download PDF

Info

Publication number
KR101335499B1
KR101335499B1 KR1020120025333A KR20120025333A KR101335499B1 KR 101335499 B1 KR101335499 B1 KR 101335499B1 KR 1020120025333 A KR1020120025333 A KR 1020120025333A KR 20120025333 A KR20120025333 A KR 20120025333A KR 101335499 B1 KR101335499 B1 KR 101335499B1
Authority
KR
South Korea
Prior art keywords
query
database
caching
middleware
server
Prior art date
Application number
KR1020120025333A
Other languages
Korean (ko)
Other versions
KR20130104124A (en
Inventor
양성우
Original Assignee
(주)네오위즈게임즈
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by (주)네오위즈게임즈 filed Critical (주)네오위즈게임즈
Priority to KR1020120025333A priority Critical patent/KR101335499B1/en
Publication of KR20130104124A publication Critical patent/KR20130104124A/en
Application granted granted Critical
Publication of KR101335499B1 publication Critical patent/KR101335499B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/40Data acquisition and logging

Landscapes

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

Abstract

온라인 게임에 있어서, 온라인 게임이 게임 서비스 제공 지역 구분에 의한 사용자 필터링 시에 사용자의 지역 IP에 따른 일괄 필터링을 수행하지 않고, 게임 서버로부터 사용자 인증 요청 신호 수신 시, 게임 서버로부터 수신된 사용자 단말의 IP 및 사용자 정보를 기저장된 필터링 대상 IP와 허용 대상 사용자 정보와 비교하여 사용자를 필터링할 수 있도록 하는 기술을 제공한다. 본 발명의 일 실시예에 따른 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법은, 데이터베이스 미들웨어를 위한 쿼리 캐싱 장치가, 쿼리를 캐싱하기 위한 캐시 데이터베이스를 구축하는 단계, 데이터베이스 미들웨어가 적어도 하나의 컨텐츠 서버로부터 전송된 쿼리를 수신하는지 판별하는 단계, 데이터베이스 미들웨어에 수신된 쿼리를 분석하여 캐싱이 필요한 쿼리인지 판별하는 단계, 캐싱이 필요한 쿼리로 판별된 경우, 캐시 데이터베이스에 쿼리를 NoSQL(Not Only SQL)형식의 쿼리로 저장하는 단계, 데이터를 저장하는 데이터베이스 서버로 캐시 데이터베이스에 저장된 쿼리의 전송 가능 여부를 확인하는 단계, 및 데이터베이스 서버로 캐시 데이터베이스에 저장된 쿼리를 전송 가능한 것으로 판단되는 경우, 캐시 데이터베이스에 저장된 쿼리를 데이터베이스 서버로 전송하는 단계를 포함한다.In an online game, when an online game does not perform batch filtering according to a user's local IP when filtering a user by division of a game service providing region, and receives a user authentication request signal from a game server, It provides a technology that enables filtering of users by comparing IP and user information with previously stored filtering target IP and allowed target user information. In the query caching method for database middleware according to an embodiment of the present invention, a query caching apparatus for database middleware may include constructing a cache database for caching a query, and querying the database middleware from at least one content server. Determining whether to receive a query, analyzing a query received by the database middleware to determine whether the query requires caching, and if the query requires caching, storing the query in a cache database as a query in the form of Not Only SQL (NoSQL). Checking whether the query stored in the cache database can be transmitted to the database server storing data, and if it is determined that the query stored in the cache database can be transmitted to the database server, And transmitting to the switch server.

Description

데이터베이스 미들웨어를 위한 쿼리 캐싱 방법 및 장치{QUERY CASHING METHOD AND APPARATUS FOR DATABASE MIDDLEWARE}Query caching method and apparatus for database middleware {QUERY CASHING METHOD AND APPARATUS FOR DATABASE MIDDLEWARE}

본 발명은, 데이터베이스 미들웨어에 있어서, 수신한 쿼리가 캐싱이 필요한 쿼리인지 아닌지를 판별하여 캐싱이 필요한 쿼리를 캐싱한 후, 데이터베이스 서버의 동작 상태에 따라 캐싱한 쿼리를 데이터베이스 서버로 전송하여, 데이터베이스 서버의 부하를 분산하는 기술에 관한 것이다.The present invention, in the database middleware, determines whether the received query is a query that requires caching, caches the query that requires caching, and then transmits the cached query to the database server according to the operation state of the database server. It relates to a technique for distributing the load.

정보 통신 기술의 발전에 따라 수많은 정보들이 정보 통신 기기에서 활용 가능한 데이터 형태로 저장되며, 정보 통신 기기는 각종 데이터를 온라인을 통해 제공하거나 제공 받을 수 있게 되었다. 이에 각종 정보 통신 기기에서 처리해야하는 데이터의 양이 급증하게 되었다. 데이터의 양이 급증하게 됨에 따라 효율적인 데이터 관리의 필요성이 대두되었으며, 이러한 요구를 만족하고자 데이터베이스(database)가 사용되고 있다.With the development of information and communication technology, a great deal of information is stored in the form of data that can be used in an information communication device, and the information communication device can provide or receive various data online. As a result, the amount of data to be processed in various information communication devices has increased rapidly. As the amount of data has increased rapidly, the need for efficient data management has emerged, and a database is being used to satisfy this demand.

데이터베이스는 여러 사람에 의해 공유되어 사용될 목적으로 통합하여 관리되는 데이터의 집합을 의미하며, 자료항목의 중복을 없애고 자료를 구조화하여 저장함으로써 자료 검색과 갱신의 효율을 높이도록 하기 위한 데이터의 집합체를 나타낸다.A database refers to a collection of data that is integrated and managed for the purpose of being shared and used by many people. A database represents a collection of data to improve the efficiency of data retrieval and update by eliminating duplication of data items and structuring and storing the data. .

데이터베이스 서버는 데이터베이스 운용 프로그램이 설치되어 데이터를 데이터베이스화하여 저장 및 관리하는 서버를 의미한다. 데이터베이스 서버는 복수개의 정보 통신 기기로부터 데이터를 전송 받아 저장하는 한편, 복수개의 정보 통신 기기에서 요청하는 데이터를 검색하여 제공하는 역할을 수행한다.
데이터베이스에서 쿼리는 일종의 명령어와 같은 역할을 수행한다.데이터베이스 서버는 사용자 단말로부터 직접 쿼리를 수신하거나 데이터베이스 미들웨어를 통해 수신하여 쿼리에 대응하는 명령을 수행하게 된다. 그러나 사용자 단말 또는 데이터베이스 미들웨어를 통해 쿼리를 수신하여 명령을 수행하는 종래의 기술에 의하면, 동시다발적으로 다수의 단말에서 동시에 쿼리를 수신하기 때문에, 데이터베이스 서버에 대한 큰 부하가 일어나는 문제점이 생길 수 있다.
예를 들어, 게임 서버 등에서는 사용자 단말 등으로부터 명령을 입력받게 되면, 데이터베이스 서버에 해당 쿼리를 전송하고 이에 대한 처리 결과를 사용자 단말에 다시 전송하게 되는데, 이러한 경우 데이터베이스 서버에 큰 부하가 생겨 게임 서버의 작동이 중단되는 등의 사고가 발생하고 있다.
The database server refers to a server in which a database operation program is installed to store and manage data in a database. The database server receives and stores data from a plurality of information communication devices, and searches for and provides data requested by the plurality of information communication devices.
In a database, a query acts as a kind of command. The database server receives a query directly from a user terminal or through a database middleware to execute a command corresponding to the query. However, according to the conventional technology of receiving a query through a user terminal or a database middleware and executing a command, since a plurality of terminals simultaneously receive a query simultaneously, a large load on the database server may occur. .
For example, when a game server receives a command from a user terminal, the game server transmits a corresponding query to the database server and transmits a result of the processing to the user terminal. In such a case, the game server has a large load. An accident has occurred such as the operation of the system is stopped.

이에 본 발명은, 데이터베이스 미들웨어에 있어서, 수신한 쿼리가 캐싱이 필요한 쿼리인지 아닌지를 판별하여 캐싱이 필요한 쿼리를 캐싱한 후, 데이터베이스 서버의 동작 상태에 따라 캐싱한 쿼리를 데이터베이스 서버로 전송하여, 데이터베이스 서버의 부하를 분산할 수 있도록 하는데 그 목적이 있다.Accordingly, the present invention, in the database middleware, determines whether the received query is a query that requires caching, caches the query that requires caching, and transmits the cached query to the database server according to the operation state of the database server, thereby Its purpose is to allow load balancing of servers.

상기 목적을 달성하기 위하여, 본 발명의 일 실시예에 따른 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법은, 데이터베이스 미들웨어를 위한 쿼리 캐싱 장치가, 쿼리를 캐싱하기 위한 캐시 데이터베이스를 구축하는 단계; 상기 데이터베이스 미들웨어가 적어도 하나의 컨텐츠 서버로부터 전송된 상기 쿼리를 수신하는지 판별하는 단계; 상기 데이터베이스 미들웨어에 수신된 상기 쿼리를 분석하여 캐싱이 필요한 쿼리인지 판별하는 단계; 상기 캐싱이 필요한 쿼리로 판별된 경우, 상기 캐시 데이터베이스에 상기 쿼리를 NoSQL(Not Only SQL)형식의 쿼리로 저장하는 단계; 데이터를 저장하는 데이터베이스 서버로 상기 캐시 데이터베이스에 저장된 쿼리의 전송 가능 여부를 확인하는 단계; 및 상기 데이터베이스 서버로 상기 캐시 데이터베이스에 저장된 쿼리를 전송 가능한 것으로 판단되는 경우, 상기 캐시 데이터베이스에 저장된 쿼리를 상기 데이터베이스 서버로 전송하는 단계; 포함한다.In order to achieve the above object, a query caching method for database middleware according to an embodiment of the present invention, the query caching apparatus for database middleware, comprising: building a cache database for caching queries; Determining whether the database middleware receives the query sent from at least one content server; Analyzing the query received by the database middleware to determine whether the query requires caching; If it is determined that the query requires caching, storing the query in the cache database as a query in the form of Not Only SQL (NoSQL); Checking whether or not a query stored in the cache database can be transmitted to a database server storing data; And when it is determined that the query stored in the cache database can be transmitted to the database server, transmitting the query stored in the cache database to the database server. .

상기 캐싱이 필요한 쿼리인지 판별하는 단계는, 상기 컨텐츠 서버에서 기설정한 쿼리의 우선 순위가 기설정된 기준 순위보다 낮은 경우, 캐싱이 필요한 쿼리로 판별하는 것이 바람직하다.In the determining of whether the query requires caching, when the priority of the query preset by the content server is lower than the predetermined reference rank, the query may be determined as a query requiring caching.

상기 캐싱이 필요한 쿼리인지 판별하는 단계는, 상기 쿼리에 기설정된 단어가 포함된 경우, 캐싱이 필요한 쿼리로 판별하는 것이 바람직하다.In the determining of whether the query requires caching, if a predetermined word is included in the query, the query may be determined as a query requiring caching.

상기 캐싱이 필요한 쿼리인지 판별하는 단계는, 상기 쿼리가 로그(log)를 요청하는 쿼리인 경우, 캐싱이 필요한 쿼리로 판별하는 것이 바람직하다.In the determining of whether the query requires caching, when the query is a query requesting a log, the query may be determined as a query requiring caching.

상기 캐싱이 필요한 쿼리가 아닌 것으로 판별된 경우, 상기 데이터베이스 미들웨어에서 상기 데이터베이스 서버로 상기 쿼리를 전송하도록 제어하는 단계; 를 더 포함하는 것이 바람직하다.If it is determined that the caching is not a required query, controlling the database middleware to transmit the query to the database server; .

상기 쿼리로 저장하는 단계는, 상기 캐싱이 필요한 쿼리가 상기 NoSQL 형식의 쿼리인지 판별하는 단계; 상기 쿼리가 상기 NoSQL 형식의 쿼리가 아닌 경우, 상기 쿼리를 상기 NoSQL형식의 쿼리로 변환하는 단계; 및 상기 NoSQL 형식의 쿼리를 상기 캐시 데이터베이스에 저장하는 단계; 를 포함하는 것이 바람직하다.The storing of the query may include determining whether the query requiring caching is a query of the NoSQL format; If the query is not the NoSQL type query, converting the query to the NoSQL type query; And storing the NoSQL format query in the cache database. .

상기 전송 가능 여부를 확인하는 단계는, 상기 데이터베이스 서버로 상기 캐시 데이터베이스에 저장된 쿼리의 전송 가능 여부를 확인하기 위한 주기를 지정하는 타이머를 설정하는 단계; 및 상기 타이머에 설정된 전송 가능 여부를 확인 주기에 도달 시, 상기 캐시 데이터베이스에 저장된 쿼리를 전송할지 여부를 확인하는 데이터 전송 판별 신호를 송신하는 단계; 를 포함하는 것이 바람직하다.The checking of the transmission possibility may include setting a timer for specifying a period for checking whether the query stored in the cache database can be transmitted to the database server; And transmitting a data transmission determination signal for confirming whether or not to transmit a query stored in the cache database when the transmission period set in the timer reaches a confirmation period. .

상기 데이터베이스 서버로 전송하는 단계는, 상기 캐시 데이터베이스에 저장된 쿼리의 우선 순위를 판별하는 단계; 판별된 우선 순위에 따라 상기 데이터베이스 서버로 상기 캐시 데이터베이스에 저장된 쿼리를 전송하는 단계; 상기 캐시 데이터베이스에 저장된 쿼리가 존재 시, 상기 캐시 데이터베이스에 저장된 쿼리의 전송 가능 여부를 재확인하는 단계; 를 포함하는 것이 바람직하다.The transmitting to the database server may include determining a priority of a query stored in the cache database; Transmitting a query stored in the cache database to the database server according to the determined priority; Reconfirming whether the query stored in the cache database can be transmitted when the query stored in the cache database exists; .

상기 우선 순위를 판별하는 단계는, 상기 캐시 데이터베이스에 상기 쿼리가 저장된 순서에 따라 상기 쿼리의 우선 순위를 판별하는 것이 바람직하다.In the determining of the priority, the priority of the query may be determined according to the order in which the query is stored in the cache database.

상기 우선 순위를 판별하는 단계는, 상기 컨텐츠 서버에서 설정한 쿼리의 우선 순위에 따라 상기 쿼리의 우선 순위를 판별하는 것이 바람직하다.In the determining of the priority, the priority of the query may be determined according to the priority of the query set by the content server.

상기 목적을 달성하기 위하여, 본 발명의 일 실시예에 따른 데이터베이스 미들웨어를 위한 쿼리 캐싱 장치는, 적어도 하나의 컨텐츠 서버로부터 쿼리를 수신하여 적어도 하나의 데이터베이스 서버로 상기 쿼리를 전송하는 데이터베이스 미들웨어에 상기 쿼리가 수신되는지 감지하고, 상기 데이터베이스 미들웨어로 수신된 쿼리가 캐싱이 필요한 쿼리인지 판별하는 쿼리 판별부; 캐싱이 필요한 것으로 판별된 상기 쿼리가 NoSQL(Not Only SQL)형식의 쿼리인지 판별하고, 상기 NoSQL형식의 쿼리가 아닌 경우, 상기 NoSQL형식의 쿼리로 변환하는 NoSQL 변환부; 상기 캐싱이 필요한 것으로 판별된 쿼리를 캐싱하는 캐싱 쿼리 저장부; 및 기설정된 주기에 따라 상기 데이터베이스 서버로 상기 캐싱 쿼리 저장부에 저장된 쿼리의 전송 가능 여부를 확인하고, 상기 데이터베이스 서버로부터 캐싱된 쿼리에 대한 송신 신호 수신 시, 상기 캐싱 쿼리 저장부로 상기 캐싱된 쿼리를 상기 데이터베이스 서버로 전송할 것을 요청하는 주기 판별부; 를 포함한다.In order to achieve the above object, a query caching apparatus for database middleware according to an embodiment of the present invention, the query to the database middleware that receives the query from at least one content server and transmits the query to at least one database server A query determining unit for detecting whether a query is received and determining whether a query received by the database middleware is a query requiring caching; A NoSQL conversion unit for determining whether the query determined to be caching is a NoSQL (Not Only SQL) type query, and converting the query to a NoSQL type query if it is not a NoSQL type query; A caching query storage unit for caching the query determined to be caching required; And checking whether the query stored in the caching query storage unit can be transmitted to the database server according to a predetermined period, and when receiving a transmission signal for the cached query from the database server, sending the cached query to the caching query storage unit. A period determination unit requesting transmission to the database server; .

상기 쿼리 판별부는, 상기 컨텐츠 서버에서 기설정한 쿼리의 우선 순위가 기설정된 기준 순위보다 낮은 경우, 상기 캐싱이 필요한 쿼리로 판별하는 것이 바람직하다.When the priority of a query preset by the content server is lower than a predetermined reference rank, the query determining unit may determine that the query requires caching.

상기 쿼리 판별부는, 상기 쿼리에 기설정된 단어가 포함된 경우, 상기 캐싱이 필요한 쿼리로 판별하는 것이 바람직하다.When the query determination unit includes a predetermined word, the query determining unit determines that the query requires the caching.

상기 쿼리 판별부는, 상기 쿼리가 로그(log)를 요청하는 쿼리인 경우, 상기 캐싱이 필요한 쿼리로 판별하는 것이 바람직하다.When the query is a query requesting a log, the query determining unit may determine that the query requires caching.

상기 캐싱 쿼리 저장부는, 상기 쿼리의 캐싱 순서에 따라 상기 캐싱된 쿼리를 상기 데이터베이스 서버로 전송하는 것이 바람직하다.Preferably, the caching query storage unit transmits the cached query to the database server according to the caching order of the query.

상기 캐싱 쿼리 저장부는, 상기 컨텐츠 서버에서 설정한 쿼리의 우선 순위에 따라 상기 캐싱된 쿼리를 상기 데이터베이스 서버로 전송하는 것이 바람직하다.Preferably, the caching query storage unit transmits the cached query to the database server according to the priority of the query set by the content server.

본 발명에 의하면, 데이터베이스 미들웨어에 있어서, 데이터 베이스 미들웨어가 수신한 쿼리가 캐싱이 필요한 쿼리인지 아닌지를 판별하여 캐싱이 필요한 쿼리를 캐싱한 후, 데이터베이스 서버의 동작 상태에 따라 캐싱한 쿼리를 데이터베이스 서버로 전송하여, 데이터베이스 서버의 부하를 분산할 수 있다. 따라서 원활한 데이터 제공이 가능할 뿐만 아니라 효율적으로 부하를 분산함으로서, 데이터베이스 서버를 구축하는데 소요되는 비용을 줄일 수 있다.According to the present invention, in database middleware, whether the query received by the database middleware is a query that requires caching, caches the query that requires caching, and then caches the cached query according to the operation state of the database server. By transmitting, the load on the database server can be distributed. Therefore, not only data can be provided smoothly but also the load can be efficiently distributed, thereby reducing the cost of building a database server.

도1 은 본 발명의 일 실시예에 따른 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법에 대한 플로우차트이다.
도2 는 본 발명의 일 예에 따른 캐시 데이터베이스에 쿼리를 캐싱하는 흐름을 나타낸다.
도3 은 본 발명의 일 예에 따른 데이터베이스 서버의 상태를 확인하는 흐름을 나타낸다.
도4 는 본 발명의 일 예에 따른 캐싱한 쿼리를 데이터베이스 서버로 전송하는 흐름을 나타낸다.
도5 는 본 발명의 일 실시예에 따른 데이터베이스 미들웨어를 위한 쿼리 캐싱 시스템의 블록도이다.
도6 은 본 발명의 일 에 따른 쿼리 캐싱 장치의 블록도를 나타낸다.
1 is a flowchart of a query caching method for database middleware according to an embodiment of the present invention.
2 illustrates a flow of caching a query in a cache database according to an example of the present invention.
3 shows a flow of checking the state of a database server according to an embodiment of the present invention.
4 illustrates a flow of transmitting a cached query to a database server according to an embodiment of the present invention.
5 is a block diagram of a query caching system for database middleware according to an embodiment of the present invention.
6 is a block diagram of a query caching apparatus according to an embodiment of the present invention.

이하, 첨부된 도면을 참조하여 본 발명의 각 실시예에 따른 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법 및 장치에 대하여 설명하기로 한다.Hereinafter, a query caching method and apparatus for database middleware according to embodiments of the present invention will be described with reference to the accompanying drawings.

이하의 실시 예는 본 발명의 이해를 돕기 위한 상세한 설명이며, 본 발명의 권리 범위를 제한하는 것이 아님은 당연할 것이다. 따라서, 본 발명과 동일한 기능을 수행하는 균등한 발명 역시 본 발명의 권리 범위에 속할 것이다. The following embodiments are detailed description to help understand the present invention, and it should be understood that the present invention is not intended to limit the scope of the present invention. Accordingly, equivalent inventions performing the same functions as the present invention are also within the scope of the present invention.

또한 각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.In addition, in adding reference numerals to the constituent elements of the drawings, it is to be noted that the same constituent elements are denoted by the same reference numerals even though they are shown in different drawings. In the following description of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present invention rather unclear.

또한, 본 발명의 구성 요소를 설명하는 데 있어서, 제 1, 제 2, A, B, (a), (b) 등의 용어를 사용할 수 있다. 이러한 용어는 그 구성 요소를 다른 구성 요소와 구별하기 위한 것일 뿐, 그 용어에 의해 해당 구성 요소의 본질이나 차례 또는 순서 등이 한정되지 않는다. 어떤 구성 요소가 다른 구성요소에 "연결", "결합" 또는 "접속"된다고 기재된 경우, 그 구성 요소는 그 다른 구성요소에 직접적으로 연결되거나 또는 접속될 수 있지만, 각 구성 요소 사이에 또 다른 구성 요소가 "연결", "결합" 또는 "접속"될 수도 있다고 이해되어야 할 것이다.In addition, in describing the component of this invention, terms, such as 1st, 2nd, A, B, (a), (b), can be used. These terms are intended to distinguish the constituent elements from other constituent elements, and the terms do not limit the nature, order or order of the constituent elements. When a component is described as being "connected", "coupled", or "connected" to another component, the component may be directly connected to or connected to the other component, It should be understood that an element may be "connected," "coupled," or "connected."

본 발명의 실시 예에서 “통신”, “통신망” 및 “네트워크”는 동일한 의미로 사용될 수 있다. 상기 세 용어들은, 파일을 사용자 단말, 다른 사용자들의 단말 및 다운로드 서버 사이에서 송수신할 수 있는 유무선의 근거리 및 광역 데이터 송수신망을 의미한다.In the embodiments of the present invention, " communication ", " communication network ", and " network " The three terms refer to wired and wireless local area and wide area data transmission and reception networks capable of transmitting and receiving a file between a user terminal, a terminal of another user, and a download server.

본 발명에서 컨텐츠 서버(Contents Server)란 사용자들이 컨텐츠(contents)를 이용하기 위하여 접속하게 되는 서버 컴퓨터를 의미한다. 컨텐츠 서버는 사용자들의 사용자 단말로 적어도 하나 이상의 컨텐츠를 제공할 수 있으며, 컨텐츠의 기능이나 용량에 따라서 하나 이상의 컨텐츠 서버가 존재할 수 있다.In the present invention, a content server refers to a server computer to which users access to use contents. The content server may provide at least one or more contents to user terminals of users, and one or more contents servers may exist according to the function or capacity of the contents.

본 발명에서 데이터베이스 서버(Database Server)는 컨텐츠 서버로부터 전송되는 컨텐츠를 포함한 각종 데이터를 저장하는 데이터베이스 서버 컴퓨터를 의미하며, 데이터베이스 프로그램이 설치 및 운용되어 저장된 각종 데이터를 처리한다. 그리고 데이터베이스 미들웨어(Database Middleware)는 컨텐츠 서버 및 사용자 단말의 다양한 운영 체제(Operation System : OS) 환경 및 다양한 데이터베이스 환경을 조절할 뿐만 아니라, 복수개의 컨텐츠 서버 및 사용자 단말에 대한 데이터 전송을 제어하는 장치를 의미한다.In the present invention, a database server refers to a database server computer that stores various data including contents transmitted from a content server, and processes a variety of stored data by installing and operating a database program. The database middleware refers to a device that not only controls various operating system (OS) environments and various database environments of a content server and a user terminal, but also controls data transmission to a plurality of content servers and user terminals. do.

그리고 쿼리(query)는 데이터베이스에 저장된 데이터의 검색 또는 갱신 시 발생하는 질문 또는 문의를 기술하는 데이터 조작언어를 의미하며, 데이터베이스에서 쿼리는 일종의 명령어와 같은 역할을 수행한다. 통상 관계 데이터베이스의 구조적 질의 언어(Structured Query Language : 이하 SQL)의 형식으로 표현되지만, 경우에 따라서는 SQL 이외의 형식으로 표현될 수도 있다. SQL 이외의 형식으로 표현되는 쿼리를 NoSQL(No SQL 또는 Not Only SQL)이라 하며, SQL이 관계형 데이터베이스에서 데이터를 조작하기 위한 쿼리인데 반해 NoSQL은 비관계형 데이터베이스에서 데이터를 조작할 수 있도록 제안된 쿼리이다. NoSQL은 최근 데이터베이스 서버가 처리해야할 데이터 양이 증가하고, 저장할 데이터가 지속적으로 변화하며 데이터의 요구과 일관적이지 않은 온라인에서의 사용자 요구를 수용하고, 기존 관계형 데이터베이스가 갖는 수평적 확장성의 한계를 극복하기 위해 제안된 쿼리이다.In addition, a query refers to a data manipulation language that describes a question or query that occurs when retrieving or updating data stored in a database. In the database, a query serves as a kind of command. In general, although expressed in the form of a structured query language (SQL) of a relational database, it may be expressed in a form other than SQL in some cases. Queries expressed in a non-SQL format are called NoSQL (No SQL or Not Only SQL), whereas SQL is a query for manipulating data in a relational database. . NoSQL has recently increased the amount of data that a database server has to handle, constantly changing data to accommodate user demands that are inconsistent with data needs, and overcome the horizontal scalability of traditional relational databases. This is a suggested query.

도1 은 본 발명의 일 실시예에 따른 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법에 대한 플로우차트이다. 1 is a flowchart of a query caching method for database middleware according to an embodiment of the present invention.

본 발명에 따른 쿼리 캐싱 방법은 먼저 쿼리 캐싱 장치가 캐시 데이터베이스를 구축한다(S100). 캐시 데이터베이스는 쿼리 캐싱 장치에 구현될 수 있으며, 데이터를 직접 캐싱하는 것이 아니라 쿼리를 캐싱하므로 저장 용량은 크지 않아도 된다. 또한 캐시의 특성상 고속 데이터 전송을 지원할 수 있는 것이 하드디스크 드라이브(Hard Disk Drive : HDD)와 같은 저속 대용량 저장 매체보다는 램디스크(RAM-Disk)나 메모리(Memory)와 같이 고속 저용량 저장 매체에 구현되는 것이 바람직하다. 즉 캐싱 장치는 고속 저용량 저장 매체를 구비하고, 캐싱 데이터베이스는 캐싱 장치의 저장 매체에 구현되는 것이 바람직하다.In the query caching method according to the present invention, the query caching apparatus first constructs a cache database (S100). The cache database can be implemented in a query caching device, and caches the query rather than caching the data directly, so the storage capacity does not have to be large. Also, due to the nature of the cache, it is possible to support high speed data transfer in high speed low capacity storage media such as RAM-Disk or memory rather than low speed mass storage media such as Hard Disk Drive (HDD). It is preferable. In other words, the caching apparatus has a high speed and low capacity storage medium, and the caching database is implemented in the storage medium of the caching apparatus.

이후 쿼리 캐싱 장치는 데이터베이스 미들웨어가 쿼리를 수신하는지 감지하여 판별한다(S200). 데이터베이스 미들웨어가 쿼리를 수신했다는 것은 컨텐츠 서버가 데이터베이스 서버로 데이터를 검색 또는 갱신하기 위한 질의를 전송했다는 의미이다. 상기한 바와 같이, 데이터베이스 미들웨어는 컨텐츠 서버의 다양한 OS 환경이나 데이터베이스 서버의 다양한 데이터베이스 환경을 조율하기 위한 장치로서, 데이터베이스 미들웨어는 컨텐츠 서버와 데이터베이스 서버 사이에 배치되어 컨텐츠 서버와 데이터베이스 서버 사이에 전송되는 데이터를 상호 인식 가능하도록 변환하는 역할을 수행한다.Thereafter, the query caching apparatus detects and determines whether the database middleware receives the query (S200). When the database middleware receives a query, it means that the content server has sent a query to retrieve or update data to the database server. As described above, the database middleware is an apparatus for coordinating various OS environments of the content server or various database environments of the database server, and the database middleware is disposed between the content server and the database server and transmitted between the content server and the database server. It converts to be mutually recognizable.

경우에 따라서 데이터베이스 서버는 사용자 단말로부터 직접 쿼리를 수신하거나 데이터베이스 미들웨어를 통해 수신할 수도 있다. 그러나 일반적으로 사용자 단말이 컨텐츠 서버를 통하지 않고 데이터베이스 서버에 직접 전송하는 경우는 거의 없다. 따라서 본 발명에서 데이터베이스 미들웨어는 컨텐츠 서버와 데이터베이스 서버 사이에서 데이터를 전송하는 역할을 수행하는 것으로 가정하여 설명한다.In some cases, the database server may receive the query directly from the user terminal or through the database middleware. However, in general, the user terminal rarely transmits directly to the database server without passing through the content server. Therefore, in the present invention, it is assumed that the database middleware plays a role of transferring data between the content server and the database server.

데이터베이스 미들웨어가 쿼리를 수신한 것으로 판별되면, 캐싱 장치는 수신한 쿼리를 논리적으로 분석한다. 데이터베이스에서 사용되는 쿼리는 데이터의 저장, 검색, 갱신 및 삭제와 같은 데이터의 처리를 위한 질의와 데이터베이스의 데이터 구조를 설정하기 위한 질의가 있다. 그러나 이러한 쿼리의 종류에 따른 구분 이외에 쿼리의 내용에 따른 논리적인 분류가 가능하다. 예를 들어, 로그(log)성 쿼리(또는 쿼리 로그)는 이전까지 데이터베이스에 전송된 쿼리의 내역 과 같은 정보로서 데이터베이스에 저장된 데이터에 대한 직접적인 요청 내역이 아니며, 저장된 로그 데이터의 양이 방대하여 데이터 처리에 시간 및 부하가 소요된다. 또한 즉시적으로 처리해야 할 필요성이 높지 않다. 이에 로그성 쿼리는 캐싱이 되는 것이 데이터베이스의 부하 경감을 위해 바람직하다. 상기한 바와 같이 캐싱 장치는 쿼리를 논리적으로 분류할 수 있다. 쿼리의 논리적 분류는 우선 컨텐츠 서버에서 기설정한 쿼리의 우선 순위에 따라 분류될 수 있다. 즉 컨텐츠 서버에서 데이터베이스로 전송하는 쿼리는 모두 동일한 우선 순위를 가질수도 있으나 서로 다른 우선 순위가 설정될 수도 있다. 서로 다른 우선 순위가 설정된 경우에, 캐싱 장치는 기준 우선 순위보다 낮은 우선 순위를 갖는 쿼리를 캐싱할 쿼리로 판별할 수 있다. 그리고 쿼리에 설정된 문의 데이터의 우선 순위에 따라 쿼리의 캐싱 여부를 판별할 수도 있다. 또한 캐싱 장치는 쿼리에 포함된 단어를 분석하여 쿼리의 캐싱 여부를 판별할 수 있다. 예를 들어, 쿼리에 캐시 기능에 대한 용어가 포함되어 있으면, 해당 쿼리를 캐싱하는 것으로 판별할 수도 있다.If it is determined that the database middleware has received the query, the caching device logically analyzes the received query. Queries used in the database include a query for processing data such as storing, retrieving, updating and deleting data, and a query for setting a data structure of the database. However, in addition to the classification according to the type of query, logical classification according to the contents of the query is possible. For example, a loggable query (or query log) is information such as the history of queries previously sent to the database and is not a direct request for data stored in the database. Takes time and load. In addition, the need for immediate treatment is not high. Therefore, it is desirable to log the query as caching to reduce the load on the database. As described above, the caching apparatus may logically classify the query. The logical classification of the query may be classified according to the priority of the query previously set in the content server. That is, all queries sent from the content server to the database may have the same priority, but different priorities may be set. When different priorities are set, the caching apparatus may determine a query having a priority lower than the reference priority as a query to be cached. In addition, whether or not to cache the query may be determined according to the priority of the query data set in the query. In addition, the caching apparatus may determine whether the query is cached by analyzing words included in the query. For example, if a query contains a term for a cache function, it may be determined to cache the query.

판별 결과, 캐싱이 필요하지 않거나, 캐싱하지 않아야 하는 쿼리인 것으로 판별되면, 캐싱 장치는 쿼리를 즉각 전송 신호를 데이터베이스 미들웨어로 전달하여, 데이터베이스 미들웨어가 캐시장치로 데이터를 전송하지 않고 곧바로 데이터베이스 서버로 쿼리를 전송하도록 한다(S500). 그러나 판별 결과, 캐싱이 필요하거나, 캐싱하여도 무방한 쿼리인 것으로 판별되면, 캐싱 장치는 데이터베이스 미들웨어로 전송된 쿼리를 수신하여 캐싱한다(S600). 이때 캐싱 장치는 쿼리를 NoSQL 형식으로 캐싱할 수 있으며, 수신된 쿼리가 NoSQL 형식의 쿼리가 아닌 경우에, NoSQL 형식으로 변환하여 캐싱할 수 있다.If the result of the determination determines that the query does not require caching or should not be cached, then the caching device immediately sends the query to the database middleware so that the database middleware queries the database server directly without sending the data to the cache device. To transmit (S500). However, if it is determined that caching is required or the query may be cached, the caching apparatus receives and caches the query transmitted to the database middleware (S600). In this case, the caching device may cache the query in the NoSQL format. If the received query is not a NoSQL format query, the caching apparatus may convert the cache to the NoSQL format and cache the query.

쿼리를 캐싱한 캐싱 장치는 이후 주기적으로 데이터베이스 서버의 상태를 확인한다(S700). 캐싱 장치가 쿼리를 캐싱하는 것은 데이터베이스 서버의 부하를 분산하기 위해서이다. 따라서 캐싱 장치는 데이터베이스 서버에 부하가 큰 상태인지 부하가 작은 상태인지 판별할 필요가 있다. 그러나 데이터베이스 서버의 상태를 확인하는 것 또한 작으나마 데이터베이스에 부하를 유발할 수 있으므로, 본 발명에서 캐싱 장치는 기설정된 주기에 따라 데이터베이스 서버의 부하를 확인하는 것이 바람직하다. 캐싱 장치가 데이터베이스 서버의 상태를 확인하는 것은 캐싱 장치가 데이터베이스 서버로 캐싱 데이터를 전송할지 여부를 문의하는 것이다.After caching the query, the caching apparatus periodically checks the state of the database server (S700). The caching device caches queries to balance the load on the database server. Therefore, the caching apparatus needs to determine whether the database server is under a heavy load or a low load. However, although checking the state of the database server is also small, it may cause a load on the database. In the present invention, the caching apparatus preferably checks the load of the database server according to a predetermined cycle. When the caching device checks the state of the database server, it asks whether the caching device sends caching data to the database server.

그리고 캐싱 장치는 데이터베이스 서버의 부하가 기설정된 기준 부하보다 낮아서, 데이터베이스 서버로부터 캐시된 쿼리에 대한 송신 요청이 수신되는지 판별한다(S800).The caching apparatus determines that the load of the database server is lower than the preset reference load, so that a transmission request for a cached query is received from the database server (S800).

판별결과, 송신 요청이 수신되지 않거나, 수신 불가 신호를 수신하면, 캐싱 장치는 다시 기설정된 주기 이후에 데이터베이스 서버의 상태를 확인한다(S700). 그러나 송신 요청이 수신되면, 캐싱 장치는 캐싱된 쿼리를 데이터베이스 서버로 전송한다(S900). 이때 캐싱 장치는 데이터베이스 서버로 전송하는 쿼리를 캐싱된 순서에 따라 전송하는 것이 바람직하다. 즉 먼저 캐싱된 쿼리를 우선적으로 데이터베이스 서버로 전송한다. 만일 캐싱된 순서대로 쿼리를 데이터베이스 서버로 전송하는 경우에, 일부 쿼리는 계속 캐싱된 상태로만 머물게 되어 처리되지 않는 경우가 발생할 수 있기 때문이다.As a result of the determination, when the transmission request is not received or when the reception impossible signal is received, the caching apparatus checks the state of the database server again after a predetermined period (S700). However, when the transmission request is received, the caching apparatus transmits the cached query to the database server (S900). In this case, it is preferable that the caching apparatus transmits the query transmitted to the database server in the cached order. In other words, cached queries are first sent to the database server. If you send queries to the database server in the cached order, some queries may remain cached and not processed.

결과적으로 도1 에 도시된 본 발명에 따른 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법은 캐싱 장치가 데이터베이스 미들웨어가 수신한 쿼리가 캐싱이 필요한 쿼리인지 판별하고, 캐싱이 필요한 쿼리인 경우, NoSQL형식으로 쿼리를 캐싱한 후, 데이터베이스 서버의 부하가 낮을 때 순차적으로 데이터베이스 서버로 캐싱된 쿼리를 전송하여 데이터베이스 서버의 부하를 분산하도록 한다.As a result, in the query caching method for database middleware according to the present invention shown in FIG. 1, the caching apparatus determines whether a query received by the database middleware is a query that requires caching, and if the query requires caching, caches the query in the NoSQL format. Then, when the load on the database server is low, the cached queries are sequentially sent to the database server to distribute the load on the database server.

도2 는 본 발명의 일 예에 따른 캐시 데이터베이스에 쿼리를 캐싱하는 흐름을 나타낸다.2 illustrates a flow of caching a query in a cache database according to an example of the present invention.

도2 의 데이터 쿼리를 캐싱하는 흐름은 먼저, 데이터베이스 미들웨어가 컨텐츠 서버로부터 수신하여 캐싱할 쿼리가 NoSQL형식의 쿼리인지 아닌지를 판별한다(S610). 그리고 판별결과 NoSQL 형식의 쿼리가 아니면, NoSQL 형식의 쿼리로 변환한다(S620). 상기한 바와 같이 NoSQL은 데이터베이스의 확장성을 위해 주로 사용되며, 이는 데이터베이스 서버뿐만 아니라 캐시 데이터베이스에도 마찬가지이다. 즉 캐시 데이터베이스의 확장성을 확보하기 위하여 본 발명의 캐시 장치는 캐싱할 쿼리가 NoSQL 형식의 쿼리인지 판별하고, NoSQL 형식의 쿼리가 아니면, NoSQL 형식의 쿼리로 변환한다. 그리고 NoSQL 형식의 쿼리를 캐시 데이터베이스에 캐싱한다(S630).The flow of caching the data query of FIG. 2 first determines whether the query to be cached by the database middleware from the content server is a query of NoSQL format (S610). If the determination result is not a NoSQL-type query, it is converted to a NoSQL-type query (S620). As mentioned above, NoSQL is used primarily for database scalability, as well as for database servers as well as cache databases. That is, in order to secure the scalability of the cache database, the cache device of the present invention determines whether the query to be cached is a query of the NoSQL type, and converts the query to the NoSQL type if the query is not the NoSQL type. The NoSQL type query is cached in the cache database (S630).

도3 은 본 발명의 일 예에 따른 데이터베이스 서버의 상태를 확인하는 흐름을 나타낸다.3 shows a flow of checking the state of a database server according to an embodiment of the present invention.

데이터 베이스 상태를 확인하는 흐름을 도3 을 참조하여 설명하면, 먼저 캐시 장치는 타이머를 설정한다(S710). 타이머는 캐시 장치에 내장될 수 있으며, 데이터베이스 상태를 확인하기 위한 주기를 카운트한다.The flow of checking the database state will be described with reference to FIG. 3. First, the cache apparatus sets a timer (S710). The timer may be embedded in the cache device and count the period for checking the database status.

이후 설정된 타이머에 의해 데이터베이스 서버의 상태를 확인할 주기인지 를 판별한다(S720). 판별결과, 데이터베이스 서버 확인 주기인 것으로 판별되면, 캐싱 장치는 데이터베이스 서버로 캐싱한 쿼리를 전송해도 되는지를 확인하기 위해 데이터베이스 서버의 상태를 문의한다(S730).After that, it is determined whether or not the period for checking the state of the database server is set by the timer (S720). As a result of the determination, if it is determined that the database server is checked, the caching apparatus queries the state of the database server to confirm whether the cached query may be transmitted to the database server (S730).

도4 는 본 발명의 일 예에 따른 캐싱한 쿼리를 데이터베이스 서버로 전송하는 흐름을 나타낸다.4 illustrates a flow of transmitting a cached query to a database server according to an embodiment of the present invention.

캐싱한 쿼리를 데이터베이스 서버로 전송하는 흐름은, 우선 캐싱된 쿼리의 순서를 판별한다(S910). 그리고 판별된 캐싱 순서에 따라 먼저 캐싱된 쿼리를 데이터베이스 서버로 전송한다(S920). 상기한 바와 같이 본 발명에서는 쿼리가 캐싱된 순서대로 먼저 캐싱된 쿼리가 먼저 데이터베이스 서버로 전송하는 것으로 가정하였다. 이는 캐싱된 쿼리 중 계속적으로 처리되지 않는 쿼리가 남아있지 않도록 하기 위함이다. 그러나 경우에 따라서는 다른 우선 순위를 설정하여 캐싱뒨 커리를 데이터베이스 서버로 전송할 수도 있다.The flow of transmitting the cached query to the database server first determines the order of the cached query (S910). In operation S920, the cached query is transmitted to the database server according to the determined caching order. As described above, in the present invention, it is assumed that the first cached query is first transmitted to the database server in the order in which the queries are cached. This is to ensure that no cached queries remain. However, in some cases, you may want to set a different priority to send a cached cache to the database server.

그리고 캐싱 장치는 캐싱된 쿼리가 전송되면, 남아있는 캐싱된 쿼리가 존재하는지 판별한다(S700). 만일 캐싱된 쿼리가 존재하는 것으로 판별되면, 캐싱 장치는 다시 데이터베이스 서버의 상태를 확인한다(S700). 캐싱 장치가 다시 데이터베이스 서버의 상태를 확인하는 것은 데이터베이스의 부하가 다시 높아졌는지 판별하기 위함이다. 만일 캐싱 장치가 데이터베이스의 상태를 확인하지 않고, 연속적으로 캐싱된 쿼리를 데이터베이스 서버로 전송하는 경우에, 데이터베이스 서버는 데이터베이스 미들웨어에서 곧바로 수신한 쿼리와 캐싱 장치에서 전송한 쿼리로 인해 부하가 크게 높아 질 수가 있다. 이는 데이터베이스 서버의 부하를 분산하고자 하는 본 발명의 목적에 위배된다. 따라서, 캐시 장치는 캐싱된 쿼리를 전송할 때마다 다시 데이터베이스 서버의 상태를 확인하여 데이터베이스 서버의 부하가 낮은 경우에만 캐싱된 쿼리를 전송하는 것이 바람직하다.When the cached query is transmitted, the caching apparatus determines whether there is a remaining cached query (S700). If it is determined that the cached query exists, the caching apparatus checks the state of the database server again (S700). The caching device checks the state of the database server again to determine if the load on the database is high again. If the caching device sends continuous cached queries to the database server without checking the state of the database, the database server may experience a high load due to queries received directly from the database middleware and queries sent by the caching device. There is a number. This violates the purpose of the present invention, which seeks to distribute the load of the database server. Therefore, the cache device preferably checks the state of the database server again each time the cached query is transmitted, and transmits the cached query only when the load of the database server is low.

그리고 도4 에서는 캐싱 장치에 캐싱된 쿼리가 존재하지 않는 것으로 판별되면, 종료하는 것으로 설명하였으나, 캐싱 장치는 다시 데이터베이스 미들웨어로 쿼리가 수신되는지 확인 할 수도 있다(S200).In FIG. 4, when it is determined that the cached query does not exist in the caching apparatus, it is described as being terminated. However, the caching apparatus may check whether the query is received by the database middleware again (S200).

도5 는 본 발명의 일 실시예에 따른 데이터베이스 미들웨어를 위한 쿼리 캐싱 시스템의 블록도이다.5 is a block diagram of a query caching system for database middleware according to an embodiment of the present invention.

도5 를 참조하면, 본 발명의 실시예에 따른 데이터베이스 미들웨어를 위한 쿼리 캐싱 시스템은 적어도 하나의 컨텐츠 서버(100), 데이터베이스 미들웨어(200), 캐싱 장치(300) 및 적어도 하나의 데이터베이스 서버(400)를 포함한다.Referring to FIG. 5, a query caching system for database middleware according to an embodiment of the present invention may include at least one content server 100, a database middleware 200, a caching apparatus 300, and at least one database server 400. It includes.

적어도 하나의 컨텐츠 서버(100) 각각에는 복수개의 사용자 단말(미도시)이 인터넷을 통해 접속되며, 컨텐츠 서버(100)는 복수개의 사용자 단말 각각에 컨텐츠를 제공한다. 여기서 컨텐츠 서버(100)가 제공하는 컨텐츠는 게임, 동영상, 문서 등 온라인 상에서 제공 가능한 모든 컨텐츠를 포함할 수 있다. 그리고 컨텐츠 서버(100)가 복수개인 경우에 복수개의 컨텐츠 서버는 각각 서로 다른 컨텐츠를 접속한 사용자 단말로 제공할 수 있다. 그리고 컨텐츠 서버(100)에 접속 가능한 사용자 단말로는 대표적으로 개인용 컴퓨터(PC)가 활용될 수 있으나, 컴퓨터 이외에 인터넷을 통해 컨텐츠 서버(100)에 접속하여 컨텐츠를 실행할 수 있는 다른 단말일 수 있다. 예를 들면, 이동통신 단말, 인터넷 접속이 가능한 텔레비전 등이 사용될 수 있다.A plurality of user terminals (not shown) are connected to each of the at least one content server 100 through the Internet, and the content server 100 provides contents to each of the plurality of user terminals. The content provided by the content server 100 may include all content that can be provided online, such as a game, a video, a document, and the like. In the case where there are a plurality of content servers 100, the plurality of content servers may provide different content to user terminals connected to each other. In addition, a personal computer (PC) may be typically used as a user terminal accessible to the content server 100, but may be another terminal capable of executing content by accessing the content server 100 through the Internet in addition to the computer. For example, a mobile communication terminal, a television with Internet access, or the like can be used.

데이터베이스 미들웨어(200)는 적어도 하나의 컨텐츠 서버(100)과 적어도 하나의 데이터베이스 서버(400) 사이에 배치되어, 컨텐츠 서버(100)와 데이터베이스 서버 사이에 전송되는 쿼리와 데이터가 상호 인식 가능하도록 변환하는 역할을 수행한다.The database middleware 200 is disposed between the at least one content server 100 and the at least one database server 400 to convert the queries and data transmitted between the content server 100 and the database server to be mutually recognizable. Play a role.

캐싱 장치(300)는 적어도 하나의 컨텐츠 서버(100)로부터 데이터베이스 미들웨어(200)로 전송된 쿼리를 분석하여, 쿼리를 캐싱할지 여부를 판별하고, 쿼리를 캐싱할 것으로 판별되면, 쿼리를 NoSQL 형식으로 캐싱한다. 그리고 주기적으로 데이터베이스 서버(400)의 부하 상태를 확인하여, 데이터베이스 서버(400)의 부하가 낮으면 캐싱된 쿼리를 캐싱 순서에 따라 데이터베이스 서버(400)로 전송한다.The caching apparatus 300 analyzes a query transmitted from the at least one content server 100 to the database middleware 200 to determine whether to cache the query, and if it is determined to cache the query, the query to NoSQL format. Caching In addition, the load state of the database server 400 is periodically checked, and if the load of the database server 400 is low, the cached query is transmitted to the database server 400 in the caching order.

데이터베이스 서버(400)는 적어도 하나의 컨텐츠 서버(100)로부터 전송되는 컨텐츠를 포함한 각종 데이터를 저장하고, 데이터베이스 미들웨어(200) 또는 캐싱 장치(300)에서 전송되는 쿼리에 따라 데이터를 검색하거나 갱신한다.The database server 400 stores various data including content transmitted from the at least one content server 100, and retrieves or updates data according to a query transmitted from the database middleware 200 or the caching apparatus 300.

도5 에서는 캐싱 장치(300)가 데이터베이스 미들웨어(200)과 별도의 장치로 도시되었으나, 캐싱 장치(300)는 데이터베이스 미들웨어(200)에 포함되어 구성될 수 있다. 또한 데이터베이스 미들웨어(200)와 캐싱 장치(300)은 데이터베이스 서버(400)에 포함되어 구성될 수 있을 뿐만 아니라, 경우에 따라서는 모듈(Module)형태로 구현되어 데이터베이스 서버(400)에 제공될 수도 있다.In FIG. 5, the caching apparatus 300 is illustrated as a separate device from the database middleware 200, but the caching apparatus 300 may be configured to be included in the database middleware 200. In addition, the database middleware 200 and the caching apparatus 300 may be included in the database server 400 and may be implemented in a module form and provided to the database server 400 in some cases. .

도6 은 본 발명의 일 에 따른 쿼리 캐싱 장치의 블록도를 나타낸다.6 is a block diagram of a query caching apparatus according to an embodiment of the present invention.

도6 을 참조하면 쿼리 캐싱 장치(300)는 쿼리 판별부(310), NoSQL 변환부(320), 캐싱 쿼리 저장부(330) 및 주기 판별부(340)를 포함한다.Referring to FIG. 6, the query caching apparatus 300 includes a query determination unit 310, a NoSQL transformation unit 320, a caching query storage unit 330, and a period determination unit 340.

쿼리 판별부(310)은 적어도 하나의 컨텐츠 서버(100)에서 데이터베이스 미들웨어(200)로 전송된 쿼리를 분석하여 쿼리의 캐싱 여부를 판별한다. 쿼리 판별부(310)는 쿼리의 내용에 따라 논리적으로 분석하여 쿼리의 캐싱 여부를 판별하며, 컨텐츠 서버(100)에서 기설정한 쿼리의 우선 순위에 따라 쿼리의 캐싱 여부를 판별할 수 있다. 또한 쿼리에 특정 단어가 포함되어 있는지에 따라 캐싱 여부를 판별할 수도 있다.The query determining unit 310 analyzes the query transmitted from the at least one content server 100 to the database middleware 200 to determine whether the query is cached. The query determination unit 310 may logically analyze the query according to the content of the query to determine whether the query is cached, or determine whether the query is cached according to the priority of the query preset by the content server 100. You can also determine whether to cache based on whether a query contains a specific word.

NoSQL 변환부(320)는 캐싱할 것으로 판단된 쿼리가 NoSQL 형식의 쿼리인지 판별하고, NoSQL 형식의 쿼리가 아니면, 즉 SQL 형식의 쿼리이면, NoSQL 형식의 쿼리로 전환한다.The NoSQL conversion unit 320 determines whether the query determined to be cached is a NoSQL-type query, and if the query is not a NoSQL-type query, that is, a SQL-type query, the NoSQL conversion unit 320 switches to a NoSQL-type query.

캐싱 쿼리 저장부(330)는 캐싱할 것으로 판단된 쿼리를 순차적으로 저장하고, 이후 데이터베이스 서버(400)로 저장된 순서로 전송한다.The caching query storage unit 330 sequentially stores the queries determined to be cached, and then transmits them to the database server 400 in the stored order.

주기 판별부(340)은 일종의 타이머로서, 데이터베이스 서버(400)의 상태를 확인하기 위한 주기가 설정되고, 설정된 주기가 되면, 데이터베이스 서버(400)로 캐싱 데이터를 전송할지 여부를 문의한다. 문의 결과, 데이터베이스 서버(400)로부터 캐시된 쿼리에 대한 송신 요청이 수신하면, 캐싱 쿼리 저장부(300)로 캐싱된 쿼리를 데이터베이스 서버(400)로 전송할 것을 요청한다.The period determination unit 340 is a kind of timer, and a period for checking the state of the database server 400 is set, and when the set period is reached, it inquires whether or not to transmit caching data to the database server 400. As a result of the query, when a transmission request for a cached query is received from the database server 400, the cached query storage unit 300 requests to transmit the cached query to the database server 400.

이상에서 전술한 본 발명의 실시예에 따른 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법 및 장치는, 단말에 기본적으로 설치된 애플리케이션(이는 단말에 기본적으로 탑재된 플랫폼이나 운영체제 등에 포함된 프로그램을 포함할 수 있음)에 의해 실행될 수 있고, 사용자가 애플리케이션 스토어 서버, 애플리케이션 또는 해당 서비스와 관련된 웹 서버 등의 애플리케이션 제공 서버를 통해 단말에 직접 설치한 애플리케이션(즉, 프로그램)에 의해 실행될 수도 있다. 이러한 의미에서, 전술한 본 발명의 실시예에 따른 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법은 단말에 기본적으로 설치되거나 사용자에 의해 직접 설치된 애플리케이션(즉, 프로그램)으로 구현되고 단말 등의 컴퓨터로 읽을 수 있는 기록매체에 기록될 수 있다.The query caching method and apparatus for database middleware according to the above-described embodiment of the present invention includes an application basically installed in a terminal (which may include a program included in a platform or an operating system basically loaded in the terminal). It may be executed by the user, or may be executed by an application (ie, a program) directly installed on the terminal by an application providing server such as an application store server, an application, or a web server associated with the corresponding service. In this sense, the query caching method for the database middleware according to the embodiment of the present invention described above is implemented as an application (that is, a program) basically installed in a terminal or directly installed by a user, and can be read by a computer such as a terminal. Can be recorded on the medium.

이러한 프로그램은 컴퓨터에 의해 읽힐 수 있는 기록매체에 기록되고 컴퓨터에 의해 실행됨으로써 전술한 기능들이 실행될 수 있다. Such a program may be recorded on a recording medium that can be read by a computer and executed by a computer so that the above-described functions can be executed.

이와 같이, 본 발명의 각 실시예에 따른 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법을 실행시키기 위하여, 전술한 프로그램은 컴퓨터의 프로세서(CPU)가 읽힐 수 있는 C, C++, JAVA, 기계어 등의 컴퓨터 언어로 코드화된 코드(Code)를 포함할 수 있다. As described above, in order to execute the query caching method for the database middleware according to each embodiment of the present invention, the above-described program is coded in a computer language such as C, C ++, JAVA, or machine language that can be read by a computer processor (CPU). Code may be included.

이러한 코드는 전술한 기능들을 정의한 함수 등과 관련된 기능적인 코드(Function Code)를 포함할 수 있고, 전술한 기능들을 컴퓨터의 프로세서가 소정의 절차대로 실행시키는데 필요한 실행 절차 관련 제어 코드를 포함할 수도 있다. The code may include a function code related to a function or the like that defines the functions described above and may include an execution procedure related control code necessary for the processor of the computer to execute the functions described above according to a predetermined procedure.

또한, 이러한 코드는 전술한 기능들을 컴퓨터의 프로세서가 실행시키는데 필요한 추가 정보나 미디어가 컴퓨터의 내부 또는 외부 메모리의 어느 위치(주소 번지)에서 참조 되어야 하는지에 대한 메모리 참조 관련 코드를 더 포함할 수 있다. In addition, such code may further include memory reference related code as to what additional information or media needed to cause the processor of the computer to execute the aforementioned functions should be referenced at any location (address) of the internal or external memory of the computer .

또한, 컴퓨터의 프로세서가 전술한 기능들을 실행시키기 위하여 원격(Remote)에 있는 어떠한 다른 컴퓨터나 서버 등과 통신이 필요한 경우, 코드는 컴퓨터의 프로세서가 컴퓨터의 통신 모듈(예: 유선 및/또는 무선 통신 모듈)을 이용하여 원격(Remote)에 있는 어떠한 다른 컴퓨터나 서버 등과 어떻게 통신해야만 하는지, 통신 시 어떠한 정보나 미디어를 송수신해야 하는지 등에 대한 통신 관련 코드를 더 포함할 수도 있다. In addition, when a processor of a computer needs to communicate with any other computer or server, etc., to perform the above-described functions, the code may be stored in a computer's communication module (e.g., a wired and / ) May be used to further include communication related codes such as how to communicate with any other computer or server in the remote, and what information or media should be transmitted or received during communication.

그리고, 본 발명을 구현하기 위한 기능적인(Functional) 프로그램과 이와 관련된 코드 및 코드 세그먼트 등은, 기록매체를 읽어서 프로그램을 실행시키는 컴퓨터의 장치 환경 등을 고려하여, 본 발명이 속하는 기술분야의 프로그래머들에 의해 용이하게 추론되거나 변경될 수도 있다.The functional program for implementing the present invention and the related code and code segment may be implemented by programmers in the technical field of the present invention in consideration of the device environment of the computer that reads the recording medium and executes the program, Or may be easily modified or modified by the user.

이상에서 전술한 바와 같은 프로그램을 기록한 컴퓨터로 읽힐 수 있는 기록매체는, 일 예로, ROM, RAM, CD-ROM, 자기 테이프, 플로피디스크, 광 미디어 저장장치 등이 있다. Examples of the computer-readable recording medium on which the above-described program is recorded include ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical media storage, and the like.

또한 전술한 바와 같은 프로그램을 기록한 컴퓨터로 읽힐 수 있는 기록매체는 네트워크로 커넥션된 컴퓨터 장치에 분산되어, 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다. 이 경우, 다수의 분산된 컴퓨터 중 어느 하나 이상의 컴퓨터는 상기에 제시된 기능들 중 일부를 실행하고, 그 결과를 다른 분산된 컴퓨터들 중 하나 이상에 그 실행 결과를 전송할 수 있으며, 그 결과를 전송받은 컴퓨터 역시 상기에 제시된 기능들 중 일부를 실행하여, 그 결과를 역시 다른 분산된 컴퓨터들에 제공할 수 있다.The computer-readable recording medium on which the above-described program is recorded may be distributed to a computer apparatus connected via a network so that computer-readable codes can be stored and executed in a distributed manner. In this case, one or more of the plurality of distributed computers may execute some of the functions presented above and send the results of the execution to one or more of the other distributed computers, The computer may also perform some of the functions described above and provide the results to other distributed computers as well.

특히, 본 발명의 각 실시예에 따른 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법을 실행시키기 위한 프로그램인 애플리케이션을 기록한 컴퓨터로 읽을 수 있는 기록매체는, 애플리케이션 스토어 서버(Application Store Server), 애플리케이션 또는 해당 서비스와 관련된 웹 서버 등의 애플리케이션 제공 서버(Application Provider Server)에 포함된 저장매체(예: 하드디스크 등)이거나, 애플리케이션 제공 서버 그 자체일 수도 있다.In particular, a computer-readable recording medium recording an application, which is a program for executing a query caching method for database middleware according to each embodiment of the present invention, may be associated with an application store server, an application, or a corresponding service. It may be a storage medium (eg, a hard disk, etc.) included in an application provider server such as a web server or the application providing server itself.

본 발명의 각 실시예에 따른 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법을 실행시키기 위한 프로그램인 애플리케이션을 기록한 기록매체를 읽을 수 있는 컴퓨터는, 일반적인 데스크 탑이나 노트북 등의 일반 PC 뿐만 아니라, 스마트 폰, 태블릿 PC, PDA(Personal Digital Assistants) 및 이동통신 단말 등의 모바일 단말을 포함할 수 있으며, 이뿐만 아니라, 컴퓨팅(Computing) 가능한 모든 기기로 해석되어야 할 것이다. A computer capable of reading a recording medium recording an application, which is a program for executing a query caching method for database middleware according to each embodiment of the present invention, may be a smart phone or a tablet PC as well as a general PC such as a general desktop or a laptop. It may include a mobile terminal such as PDA (Personal Digital Assistants) and a mobile communication terminal, as well as to be interpreted as any computing device (Computing).

또한, 본 발명의 실시예에 따른 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법을 실행시키기 위한 프로그램인 애플리케이션을 기록한 기록매체를 읽을 수 있는 컴퓨터가 스마트 폰, 태블릿 PC, PDA(Personal Digital Assistants) 및 이동통신 단말 등의 모바일 단말인 경우, 애플리케이션은 애플리케이션 제공 서버에서 일반 PC로 다운로드 되어 동기화 프로그램을 통해 모바일 단말에 설치될 수도 있다.In addition, a computer capable of reading a recording medium recording an application which is a program for executing a query caching method for database middleware according to an embodiment of the present invention may be a smart phone, a tablet PC, a personal digital assistant (PDA), a mobile communication terminal, or the like. In the case of a mobile terminal, the application may be downloaded from the application providing server to a general PC and installed on the mobile terminal through a synchronization program.

이상에서, 본 발명의 실시예를 구성하는 모든 구성 요소들이 하나로 결합되거나 결합되어 동작하는 것으로 설명되었다고 해서, 본 발명이 반드시 이러한 실시 예에 한정되는 것은 아니다. 즉, 본 발명의 목적 범위 안에서라면, 그 모든 구성 요소들이 하나 이상으로 선택적으로 결합하여 동작할 수도 있다. 또한, 그 모든 구성 요소들이 각각 하나의 독립적인 하드웨어로 구현될 수 있지만, 각 구성 요소들의 그 일부 또는 전부가 선택적으로 조합되어 하나 또는 복수 개의 하드웨어에서 조합된 일부 또는 전부의 기능을 수행하는 프로그램 모듈을 갖는 컴퓨터 프로그램으로서 구현될 수도 있다. 그 컴퓨터 프로그램을 구성하는 코드들 및 코드 세그먼트들은 본 발명의 기술 분야의 당업자에 의해 용이하게 추론될 수 있을 것이다. 이러한 컴퓨터 프로그램은 컴퓨터가 읽을 수 있는 저장매체(Computer Readable Media)에 저장되어 컴퓨터에 의하여 읽혀지고 실행됨으로써, 본 발명의 실시예를 구현할 수 있다. 컴퓨터 프로그램의 저장매체로서는 자기 기록매체, 광 기록매체, 등이 포함될 수 있다.While the present invention has been described in connection with what is presently considered to be the most practical and preferred embodiments, it is to be understood that the invention is not limited to the disclosed embodiments. That is, within the scope of the present invention, all of the components may be selectively coupled to one or more of them. In addition, although all of the components may be implemented as one independent hardware, some or all of the components may be selectively combined to perform a part or all of the functions in one or a plurality of hardware. As shown in FIG. Codes and code segments constituting the computer program may be easily inferred by those skilled in the art. Such a computer program can be stored in a computer-readable storage medium, readable and executed by a computer, thereby realizing an embodiment of the present invention. As a storage medium of the computer program, a magnetic recording medium, an optical recording medium, or the like can be included.

또한, 이상에서 기재된 "포함하다", "구성하다" 또는 "가지다" 등의 용어는, 특별히 반대되는 기재가 없는 한, 해당 구성 요소가 내재될 수 있음을 의미하는 것이므로, 다른 구성 요소를 제외하는 것이 아니라 다른 구성 요소를 더 포함할 수 있는 것으로 해석되어야 한다. 기술적이거나 과학적인 용어를 포함한 모든 용어들은, 다르게 정의되지 않는 한, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 사전에 정의된 용어와 같이 일반적으로 사용되는 용어들은 관련 기술의 문맥 상의 의미와 일치하는 것으로 해석되어야 하며, 본 발명에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.It is also to be understood that the terms such as " comprises, "" comprising," or "having ", as used herein, mean that a component can be implanted unless specifically stated to the contrary. But should be construed as including other elements. All terms, including technical and scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs, unless otherwise defined. Commonly used terms, such as predefined terms, should be interpreted to be consistent with the contextual meanings of the related art, and are not to be construed as ideal or overly formal, unless expressly defined to the contrary.

이상의 설명은 본 발명의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 발명에 개시된 실시예들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 발명의 기술 사상의 범위가 한정되는 것은 아니다. 본 발명의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.
The foregoing description is merely illustrative of the technical idea of the present invention and various changes and modifications may be made by those skilled in the art without departing from the essential characteristics of the present invention. Therefore, the embodiments disclosed in the present invention are intended to illustrate rather than limit the scope of the present invention, and the scope of the technical idea of the present invention is not limited by these embodiments. The scope of protection of the present invention should be construed according to the following claims, and all technical ideas falling within the scope of the same shall be construed as falling within the scope of the present invention.

Claims (17)

데이터베이스 미들웨어를 위한 쿼리 캐싱 장치가,
쿼리를 캐싱하기 위한 캐시 데이터베이스를 구축하는 단계;
상기 데이터베이스 미들웨어가 적어도 하나의 컨텐츠 서버로부터 전송된 상기 쿼리를 수신하는 것을 감지하는 단계;
상기 데이터베이스 미들웨어에 수신된 상기 쿼리가 캐싱이 필요한 쿼리인지 판별하는 단계;
상기 캐싱이 필요한 쿼리로 판별된 경우, 상기 캐시 데이터베이스에 상기 쿼리를 NoSQL(Not Only SQL)형식의 쿼리로 저장하는 단계;
데이터를 저장하는 데이터베이스 서버로 상기 캐시 데이터베이스에 저장된 쿼리를 전송할 수 있는지 여부를 확인하는 단계; 및
상기 데이터베이스 서버로 상기 캐시 데이터베이스에 저장된 쿼리를 전송할 수 있는 것으로 판단되는 경우, 상기 캐시 데이터베이스에 저장된 쿼리를 상기 데이터베이스 서버로 전송하는 단계; 를 포함하는 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법.
Query caching device for database middleware,
Building a cache database for caching queries;
Detecting that the database middleware receives the query sent from at least one content server;
Determining whether the query received by the database middleware is a query requiring caching;
If it is determined that the query requires caching, storing the query in the cache database as a query in the form of Not Only SQL (NoSQL);
Checking whether a query stored in the cache database can be sent to a database server storing data; And
If it is determined that the query stored in the cache database can be transmitted to the database server, transmitting the query stored in the cache database to the database server; Caching method for database middleware comprising a.
제1 항에 있어서,
상기 캐싱이 필요한 쿼리인지 판별하는 단계는,
상기 컨텐츠 서버에서 기설정한 쿼리의 우선 순위가 기설정된 기준 순위보다 낮은 경우, 캐싱이 필요한 쿼리로 판별하는 것을 특징으로 하는 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법.
The method according to claim 1,
Determining whether the query requires caching,
The query caching method for the database middleware, characterized in that if the priority of the query preset by the content server is lower than the predetermined reference rank, the query is determined to be caching.
제1 항에 있어서,
상기 캐싱이 필요한 쿼리인지 판별하는 단계는,
상기 쿼리에 기설정된 단어가 포함된 경우, 캐싱이 필요한 쿼리로 판별하는 것을 특징으로 하는 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법.
The method according to claim 1,
Determining whether the query requires caching,
And a predetermined word is included in the query. The query caching method for the database middleware is characterized by determining that the query requires caching.
제1 항에 있어서,
상기 캐싱이 필요한 쿼리인지 판별하는 단계는,
상기 쿼리가 로그(log)를 요청하는 쿼리인 경우, 캐싱이 필요한 쿼리로 판별하는 것을 특징으로 하는 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법.
The method according to claim 1,
Determining whether the query requires caching,
If the query is a query requesting a log, the query caching method for a database middleware, characterized in that it is determined as a query that requires caching.
청구항 5은(는) 설정등록료 납부시 포기되었습니다.Claim 5 was abandoned upon payment of a set-up fee. 제1 항에 있어서,
상기 캐싱이 필요한 쿼리가 아닌 것으로 판별된 경우, 상기 데이터베이스 미들웨어에서 상기 데이터베이스 서버로 상기 쿼리를 전송하도록 제어하는 단계; 를 더 포함하는 것을 특징으로 하는 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법.
The method according to claim 1,
If it is determined that the caching is not a required query, controlling the database middleware to transmit the query to the database server; Query caching method for a database middleware, characterized in that it further comprises.
청구항 6은(는) 설정등록료 납부시 포기되었습니다.Claim 6 has been abandoned due to the setting registration fee. 제1 항에 있어서,
상기 쿼리로 저장하는 단계는,
상기 캐싱이 필요한 쿼리가 상기 NoSQL 형식의 쿼리인지 판별하는 단계;
상기 쿼리가 상기 NoSQL 형식의 쿼리가 아닌 경우, 상기 쿼리를 상기 NoSQL형식의 쿼리로 변환하는 단계; 및
상기 NoSQL 형식의 쿼리를 상기 캐시 데이터베이스에 저장하는 단계; 를 포함하는 것을 특징으로 하는 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법.
The method according to claim 1,
Saving as the query,
Determining whether the query requiring caching is a query of the NoSQL format;
If the query is not the NoSQL type query, converting the query to the NoSQL type query; And
Storing the NoSQL format query in the cache database; Query caching method for a database middleware comprising a.
청구항 7은(는) 설정등록료 납부시 포기되었습니다.Claim 7 has been abandoned due to the setting registration fee. 제6 항에 있어서,
상기 전송 가능 여부를 확인하는 단계는,
상기 데이터베이스 서버로 상기 캐시 데이터베이스에 저장된 쿼리를 전송할 수 있는지 여부를 확인하기 위한 주기를 지정하는 타이머를 설정하는 단계; 및
상기 타이머가 전송 가능 여부의 확인 주기에 도달되었음을 감지 시, 상기 캐시 데이터베이스에 저장된 쿼리를 상기 데이터베이스 서버로 전송할지 여부를 확인하는 데이터 전송 판별 신호를 송신하는 단계; 를 포함하는 것을 특징으로 하는 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법.
The method of claim 6,
Checking whether the transmission is possible,
Setting a timer for specifying a period for checking whether a query stored in the cache database can be transmitted to the database server; And
Transmitting a data transmission determination signal confirming whether to transmit a query stored in the cache database to the database server when detecting that the timer reaches a confirmation period of whether the timer can be transmitted; Query caching method for a database middleware comprising a.
제1 항에 있어서,
상기 데이터베이스 서버로 전송하는 단계는,
상기 캐시 데이터베이스에 저장된 쿼리의 우선 순위를 판별하는 단계;
판별된 우선 순위에 따라 상기 데이터베이스 서버로 상기 캐시 데이터베이스에 저장된 쿼리를 전송하는 단계;
상기 캐시 데이터베이스에 상기 데이터베이스 서버로 미전송된 쿼리가 존재 시, 상기 데이터베이스 서버로 미전송된 쿼리의 전송 가능 여부를 재확인하는 단계; 를 포함하는 것을 특징으로 하는 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법.
The method according to claim 1,
The step of transmitting to the database server,
Determining a priority of a query stored in the cache database;
Transmitting a query stored in the cache database to the database server according to the determined priority;
Reconfirming whether or not the unsent query can be transmitted to the database server when the unsent query exists in the cache database; Query caching method for a database middleware comprising a.
청구항 9은(는) 설정등록료 납부시 포기되었습니다.Claim 9 has been abandoned due to the setting registration fee. 제8 항에 있어서,
상기 우선 순위를 판별하는 단계는,
상기 캐시 데이터베이스에 상기 쿼리가 저장된 순서에 따라 상기 쿼리의 우선 순위를 판별하는 것을 특징으로 하는 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법.
The method of claim 8,
Determining the priority,
Query caching method for a database middleware, characterized in that for determining the priority of the query in the order in which the query is stored in the cache database.
청구항 10은(는) 설정등록료 납부시 포기되었습니다.Claim 10 has been abandoned due to the setting registration fee. 제8 항에 있어서,
상기 우선 순위를 판별하는 단계는,
상기 컨텐츠 서버에서 설정한 쿼리의 우선 순위에 따라 상기 쿼리의 우선 순위를 판별하는 것을 특징으로 하는 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법.
The method of claim 8,
Determining the priority,
Query caching method for a database middleware, characterized in that for determining the priority of the query in accordance with the priority of the query set in the content server.
적어도 하나의 컨텐츠 서버로부터 쿼리를 수신하여 적어도 하나의 데이터베이스 서버로 상기 쿼리를 전송하는 데이터베이스 미들웨어에 상기 쿼리가 수신되는지 감지하고, 상기 데이터베이스 미들웨어로 수신된 쿼리가 캐싱이 필요한 쿼리인지 판별하는 쿼리 판별부;
캐싱이 필요한 것으로 판별된 상기 쿼리가 NoSQL(Not Only SQL)형식의 쿼리인지 판별하고, 상기 NoSQL형식의 쿼리가 아닌 경우, 상기 NoSQL형식의 쿼리로 변환하는 NoSQL 변환부;
상기 캐싱이 필요한 것으로 판별된 쿼리를 캐싱하는 캐싱 쿼리 저장부; 및
기설정된 주기에 따라 상기 데이터베이스 서버로 상기 캐싱 쿼리 저장부에 저장된 쿼리의 전송 가능 여부를 확인하고, 상기 데이터베이스 서버로부터 캐싱된 쿼리에 대한 송신 신호 수신 시, 상기 캐싱 쿼리 저장부로 상기 캐싱된 쿼리를 상기 데이터베이스 서버로 전송할 것을 요청하는 주기 판별부; 를 포함하는 데이터베이스 미들웨어를 위한 쿼리 캐싱 장치.
A query determination unit which receives a query from at least one content server and detects whether the query is received by a database middleware that transmits the query to at least one database server, and determines whether the query received by the database middleware is a query that requires caching ;
A NoSQL conversion unit for determining whether the query determined to be caching is a NoSQL (Not Only SQL) type query, and converting the query to a NoSQL type query if it is not a NoSQL type query;
A caching query storage unit for caching the query determined to be caching required; And
Check whether the query stored in the caching query storage unit can be transmitted to the database server according to a predetermined period, and when receiving a transmission signal for the cached query from the database server, the cached query storage unit to the cached query storage unit; A cycle determination unit requesting transmission to the database server; Query caching apparatus for database middleware comprising a.
청구항 12은(는) 설정등록료 납부시 포기되었습니다.Claim 12 is abandoned in setting registration fee. 제11 항에 있어서,
상기 쿼리 판별부는,
상기 컨텐츠 서버에서 기설정한 쿼리의 우선 순위가 기설정된 기준 순위보다 낮은 경우, 상기 캐싱이 필요한 쿼리로 판별하는 것을 특징으로 하는 데이터베이스 미들웨어를 위한 쿼리 캐싱 장치.
12. The method of claim 11,
The query determination unit,
The query caching apparatus for the database middleware, characterized in that if the priority of the query preset by the content server is lower than the predetermined reference rank, it is determined as the query that requires caching.
청구항 13은(는) 설정등록료 납부시 포기되었습니다.Claim 13 has been abandoned due to the set registration fee. 제11 항에 있어서,
상기 쿼리 판별부는,
상기 쿼리에 기설정된 단어가 포함된 경우, 상기 캐싱이 필요한 쿼리로 판별하는 것을 특징으로 하는 데이터베이스 미들웨어를 위한 쿼리 캐싱 장치.
12. The method of claim 11,
The query determination unit,
And a predetermined word is included in the query. The query caching apparatus for database middleware according to claim 1, wherein the query is determined to be a query requiring caching.
청구항 14은(는) 설정등록료 납부시 포기되었습니다.Claim 14 has been abandoned due to the setting registration fee. 제11 항에 있어서,
상기 쿼리 판별부는,
상기 쿼리가 로그(log)를 요청하는 쿼리인 경우, 상기 캐싱이 필요한 쿼리로 판별하는 것을 특징으로 하는 데이터베이스 미들웨어를 위한 쿼리 캐싱 장치.
12. The method of claim 11,
The query determination unit,
If the query is a query requesting a log (log), the query caching apparatus for a database middleware, characterized in that determining that the query requires caching.
청구항 15은(는) 설정등록료 납부시 포기되었습니다.Claim 15 is abandoned in the setting registration fee payment. 제11 항에 있어서,
상기 캐싱 쿼리 저장부는,
상기 쿼리의 캐싱 순서에 따라 상기 캐싱된 쿼리를 상기 데이터베이스 서버로 전송하는 것을 특징으로 하는 데이터베이스 미들웨어를 위한 쿼리 캐싱 장치.
12. The method of claim 11,
The caching query storage unit,
Query caching apparatus for a database middleware, characterized in that for transmitting the cached query to the database server according to the caching order of the query.
청구항 16은(는) 설정등록료 납부시 포기되었습니다.Claim 16 has been abandoned due to the setting registration fee. 제11 항에 있어서,
상기 캐싱 쿼리 저장부는,
상기 컨텐츠 서버에서 설정한 쿼리의 우선 순위에 따라 상기 캐싱된 쿼리를 상기 데이터베이스 서버로 전송하는 것을 특징으로 하는 데이터베이스 미들웨어를 위한 쿼리 캐싱 장치.
12. The method of claim 11,
The caching query storage unit,
Query caching apparatus for a database middleware, characterized in that for transmitting the cached query to the database server in accordance with the priority of the query set in the content server.
데이터베이스 미들웨어를 위한 쿼리 캐싱 장치가,
쿼리를 캐싱하기 위한 캐시 데이터베이스를 구축하는 단계;
상기 데이터베이스 미들웨어가 적어도 하나의 컨텐츠 서버로부터 전송된 상기 쿼리를 수신하는 것을 감지하는 단계;
상기 데이터베이스 미들웨어에 수신된 상기 쿼리가 캐싱이 필요한 쿼리인지 판별하는 단계;
상기 캐싱이 필요한 쿼리로 판별된 경우, 상기 캐시 데이터베이스에 상기 쿼리를 NoSQL(Not Only SQL)형식의 쿼리로 저장하는 단계;
데이터를 저장하는 데이터베이스 서버로 상기 캐시 데이터베이스에 저장된 쿼리를 전송할 수 있는지 여부를 확인하는 단계; 및
상기 데이터베이스 서버로 상기 캐시 데이터베이스에 저장된 쿼리를 전송할 수 있는 것으로 판단되는 경우, 상기 캐시 데이터베이스에 저장된 쿼리를 상기 데이터베이스 서버로 전송하는 단계; 를 포함하는 데이터베이스 미들웨어를 위한 쿼리 캐싱 방법을 구현하기 위한 프로그램이 기록된 컴퓨터로 읽을 수 있는 기록 매체.
Query caching device for database middleware,
Building a cache database for caching queries;
Detecting that the database middleware receives the query sent from at least one content server;
Determining whether the query received by the database middleware is a query requiring caching;
If it is determined that the query requires caching, storing the query in the cache database as a query in the form of Not Only SQL (NoSQL);
Checking whether a query stored in the cache database can be sent to a database server storing data; And
If it is determined that the query stored in the cache database can be transmitted to the database server, transmitting the query stored in the cache database to the database server; A computer-readable recording medium having recorded thereon a program for implementing a query caching method for database middleware comprising a.
KR1020120025333A 2012-03-13 2012-03-13 Query cashing method and apparatus for database middleware KR101335499B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020120025333A KR101335499B1 (en) 2012-03-13 2012-03-13 Query cashing method and apparatus for database middleware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020120025333A KR101335499B1 (en) 2012-03-13 2012-03-13 Query cashing method and apparatus for database middleware

Publications (2)

Publication Number Publication Date
KR20130104124A KR20130104124A (en) 2013-09-25
KR101335499B1 true KR101335499B1 (en) 2013-12-02

Family

ID=49453020

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020120025333A KR101335499B1 (en) 2012-03-13 2012-03-13 Query cashing method and apparatus for database middleware

Country Status (1)

Country Link
KR (1) KR101335499B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107180081A (en) * 2017-04-28 2017-09-19 广东亿迅科技有限公司 The call method and device of massive relation type database
KR20210029417A (en) 2019-09-06 2021-03-16 삼성에스디에스 주식회사 Storage system having cache and method for processing data thereby

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080077557A1 (en) * 2002-06-27 2008-03-27 Oracle International Corporation Detecting and processing cache hits for queries with aggregates

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080077557A1 (en) * 2002-06-27 2008-03-27 Oracle International Corporation Detecting and processing cache hits for queries with aggregates

Also Published As

Publication number Publication date
KR20130104124A (en) 2013-09-25

Similar Documents

Publication Publication Date Title
US10853329B2 (en) Distributed file system
CN101930449B (en) Client, brokerage server and method for providing cloud storage
CN104731516B (en) A kind of method, apparatus and distributed memory system of accessing file
US9628582B2 (en) Social-driven precaching of accessible objects
US9678735B2 (en) Data caching among interconnected devices
KR101850817B1 (en) The method and apparatus for auto installing applications into different terminal
KR102294326B1 (en) Prefetching application data for periods of disconnectivity
US20090240698A1 (en) Computing environment platform
US20150133049A1 (en) Method and apparatus for downloading content using nfc
KR101373461B1 (en) Terminal and method for using cloud sevices
TWI594132B (en) Method for accessing plural cloud storages and electronic communication apparatus
US20160013980A1 (en) Private Content Distribution Network
US20150163280A1 (en) Method and device for downloading file
CN113420051B (en) Data query method and device, electronic equipment and storage medium
Dutta et al. Caching to reduce mobile app energy consumption
KR101335499B1 (en) Query cashing method and apparatus for database middleware
US20200145490A1 (en) Systems and methods for content origin administration
US20190171615A1 (en) System, data management method, and file server
KR101899970B1 (en) Mobile terminal and cloud server for mobile cloud computing environment and method of mobile cloud computing using the same
KR101784057B1 (en) Apparatus and method sharing customizable contents using user information of the mobile terminal
CN102077169A (en) Handling messages in a computing device
US20230267099A1 (en) Data Management Method and Apparatus
KR20130113788A (en) System and method for distinguishing service registration ip of pc-room
KR101948437B1 (en) Apparatus and method sharing customizable contents using user information of the mobile terminal
CN117950569A (en) Data processing method, apparatus, device, storage medium, and program product

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20161031

Year of fee payment: 4

LAPS Lapse due to unpaid annual fee