System, cache server, method, and program for performing processing relating to rdb

By designing components for query generation, execution and object management in the game system, generating and managing cached objects, the problems of low processing speed and efficiency in high-frequency RDB search and update systems are solved, and the RDB-related processing is achieved high-speed and efficient.

CN119654628APending Publication Date: 2025-03-18CYGAMES INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380057286.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-08-05
Filing Date
2023-08-01
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

In systems such as gaming systems that request search and update RDB at high frequency, it is difficult for the prior art to achieve the rapid and efficient processing related to RDB.

Method used

A system is designed, including a query generation unit, a query execution unit and an object management unit. The query generation unit generates pre-defined SQL queries, the query execution unit executes these queries, and stores or deletes cache objects in the cache server based on the query results. The object management department manages these cache objects to ensure that when the selection instruction is executed, the results are obtained from the cache server instead of directly querying the RDB.

Benefits of technology

Through this method, it is possible to achieve the speed and efficiency of RDB-related processing in the gaming system, reduce direct query of RDB, thereby reducing database load and improving system response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119654628A_ABST
    Figure CN119654628A_ABST
Patent Text Reader

Abstract

Provided is a system capable of realizing high speed or high efficiency of processing in a specific system for searching and updating an RDB. A system according to one embodiment of the present invention is provided with: a query generation unit that generates a predefined query acting on one row of one table of a predetermined RDB; a query execution unit; and an object management unit in which the query generation unit generates a query including cache identification information for identifying the cache object, the object management unit stores the cache object in a predetermined memory or deletes the cache object from the predetermined memory in a predetermined case, and the object management unit stores the cache object in the predetermined memory in a case where the query for executing the selection instruction is executed. When the cache identification information included in the query is stored in the predetermined memory, the query execution unit acquires the cache object corresponding to the cache identification information from the predetermined memory without executing the query on the predetermined RDB.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a system, a cache server, a method and a program for performing RDB-related processing. Background Art

[0002] Relational databases (RDBs) are used as database management systems in many services. Generally speaking, the query processing provided by RDBs is performed using SQL, a dedicated programming language, which can describe extremely general and broad query processing, so a huge amount of research and development efforts have been invested in its optimization (Non-Patent Document 1).

[0003] In recent years, a large number of games that are executed on terminal devices having communication functions, such as smartphones, have been released. In many of these game services, databases (RDBs) are searched and updated at an extremely high frequency.

[0004] Prior art literature

[0005] Patent Literature

[0006] Non-patent literature 1: Daniel Abadi, Anastasia Ailamaki, David Andersen, Peter Bailis, Magdalena Balazinska, Philip Bernstein, Peter Boncz, Surajit Chaudhuri, Alvin Cheung, AnHai Doan, Luna Dong, Michael J.Franklin, Juliana Freire, AlonHalevy, Joseph M.Hellerstein, Stratos Idreos, Donald Kossmann, Tim Kraska, Sailesh Krishnamurthy, Volker Markl, Sergey Melnik, Tova Milo, C. Mohan, Thomas Neumann, Beng Chin Ooi, Fatma Ozcan, Jignesh Patel, Andrew Pavlo, Raluca Popa, Raghu Ramakrishnan, Christopher Re, Michael Stonebraker, and Dan Suciu. 2020. The Seattle Report on Database Research. SIGMOD Rec.48,4(December 2019),44-53. Summary of the invention

[0007] Problem that the invention aims to solve

[0008] A game system is a system that requests RDB search and update at a high frequency and uses only a portion of the functions of a data manipulation language (DML) (e.g., SQL (Structured Query Language) DML). Generally speaking, processing related to RDB requires high speed and high efficiency. In a game system that provides game services, high speed and high efficiency of processing related to RDB is also an important issue. It is believed that in a specific system such as a game system that requests RDB search and update at a high frequency using only a portion of the functions of DML, there is a lot of room for realizing high speed and high efficiency of processing related to RDB, but the mechanism and system to realize this have not yet been realized.

[0009] The present invention has been made to solve such a problem, and an object of the present invention is to provide a system that can realize faster or more efficient processing in a specific system that searches and updates RDB.

[0010] Solutions for solving problems

[0011] [1] A system according to one embodiment of the present invention comprises:

[0012] A query generation unit, which generates a predefined query acting on a row of a table of a prescribed relational database, wherein the predefined query includes an insert instruction, a select instruction, and a delete instruction query;

[0013] a query execution unit that executes the query generated by the query generation unit; and

[0014] An object management unit manages cache objects of query execution results obtained by executing queries by the query execution unit.

[0015] The query generation unit generates a query including cache identification information for identifying a cache object.

[0016] In the case where the query execution unit executes a query of an insert instruction or a select instruction and obtains a query execution result, the object management unit establishes a correspondence between the cache object based on the query execution result and the cache identification information contained in the executed query and stores the correspondence in a specified memory. In the case where the query execution unit executes a query of a delete instruction and obtains a query execution result, the object management unit deletes the cache object corresponding to the cache identification information contained in the query of the delete instruction from the specified memory.

[0017] In the case of executing a query of a selection instruction, if the specified memory stores cache identification information included in the query, the query execution unit does not execute the query on the specified relational database, but obtains the cache object corresponding to the cache identification information from the specified memory.

[0018] [2] One embodiment of the present invention is a system according to [1], wherein:

[0019] The query generation unit generates a query to which query identification information generated based on a given argument is added as an annotation.

[0020] [3] One embodiment of the present invention is a system according to [2], wherein:

[0021] When the query execution unit executes a query of an insert instruction or a select instruction and obtains a query execution result, the object management unit does not store a cache object based on the query execution result in a predetermined memory if the given argument satisfies a predetermined condition.

[0022] [4] One embodiment of the present invention is a system according to any one of [1] to [3], wherein:

[0023] The query generated by the query generation unit is a SQL query,

[0024] The query generation unit generates a query of an INSERT instruction, a SELECT instruction, a SELECT FOR UPDATE instruction, an UPDATE instruction, or a DELETE instruction.

[0025] [5] One embodiment of the present invention is a system according to [4], wherein:

[0026] When the query execution unit executes a query of an UPDATE instruction and obtains a query execution result, the object management unit deletes the cache object corresponding to the cache identification information included in the query from the predetermined memory.

[0027] [6] One embodiment of the present invention is a system according to any one of [1] to [5], wherein:

[0028] The specified memory is a memory of a cache server included in the system or an SSD memory.

[0029] [7] One embodiment of the present invention is a system according to any one of [1] to [6], wherein:

[0030] The system comprises a game server,

[0031] The predetermined relational database is a relational database that stores information related to the game.

[0032] [8] A cache server according to one embodiment of the present invention comprises:

[0033] A query receiving unit receives a predefined query acting on a row of a table of a prescribed relational database from a service providing server, wherein the predefined query includes an insert instruction, a select instruction, and a delete instruction query;

[0034] a query execution unit that executes the query received by the query reception unit; and

[0035] an object management unit, which manages cache objects of query execution results obtained based on the query execution unit executing the query,

[0036] The query receiving unit receives a query including cache identification information for identifying a cache object.

[0037] In the case where the query execution unit executes a query of an insert instruction or a select instruction and obtains a query execution result, the object management unit establishes a correspondence between the cache object based on the query execution result and the cache identification information contained in the executed query and stores the correspondence in a specified memory. In the case where the query execution unit executes a query of a delete instruction and obtains a query execution result, the object management unit deletes the cache object corresponding to the cache identification information contained in the query of the delete instruction from the specified memory.

[0038] In the case of executing a query of a selection instruction, if the specified memory stores cache identification information included in the query, the query execution unit does not execute the query on the specified relational database, but obtains the cache object corresponding to the cache identification information from the specified memory.

[0039] [9] An embodiment of the present invention is a cache server according to [8], wherein:

[0040] The query generation unit generates a query to which query identification information generated based on a given argument is added as an annotation.

[0041]

[10] A method according to one embodiment of the present invention comprises:

[0042] A generating step, generating a predefined query acting on a row of a table of a specified relational database, wherein the predefined query includes a query of an insert instruction, a select instruction, and a delete instruction;

[0043] an execution step of executing the query generated in the generation step; and

[0044] a storage step or a deletion step, storing or deleting a cache object of a query execution result obtained by executing a query by the query execution unit,

[0045] The query generated in the generating step includes cache identification information for identifying the cache object.

[0046] The storing step includes, when a query of the insert instruction or the select instruction is executed in the executing step and a query execution result is obtained, establishing a correspondence between a cache object based on the query execution result and cache identification information included in the executed query and storing the correspondence in a specified memory,

[0047] The deleting step includes, when a query of the delete instruction is executed in the executing step and a query execution result is obtained, deleting the cache object corresponding to the cache identification information included in the query of the delete instruction from the specified memory,

[0048] The execution step includes, in the case of executing a query of a selection instruction, if the specified memory stores cache identification information contained in the query, not executing the query on the specified relational database, but obtaining the cache object corresponding to the cache identification information from the specified memory.

[0049]

[11] One embodiment of the present invention is the method according to

[10] , wherein:

[0050] In the step of generating the query, a query is generated to which query identification information generated based on the given argument is added as an annotation.

[0051]

[12] A program according to one embodiment of the present invention is a program that causes a computer to execute each step of the method according to

[10] or

[11] .

[0052] Effects of the Invention

[0053] According to the present invention, it is possible to realize faster or more efficient processing in a specific system that searches and updates an RDB. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 This is an overall configuration diagram of an information processing system according to one embodiment of the present invention.

[0055] Figure 2 This is a block diagram showing the hardware configuration of a service providing system according to one embodiment of the present invention.

[0056] Figure 3 This is a functional block diagram of a service providing system according to one embodiment of the present invention.

[0057] Figure 4 This is a diagram showing a flowchart of the process of the service providing system according to one embodiment of the present invention. DETAILED DESCRIPTION

[0058] Hereinafter, an information processing system 1 according to an embodiment of the present invention will be described with reference to the accompanying drawings. In this specification, an application can refer to an application installed in a smartphone or a tablet terminal, or can also refer to all applications. In this specification, for the sake of convenience, more detailed descriptions than necessary are sometimes omitted.

[0059] Figure 1 FIG. 1 is an overall structural diagram of an information processing system 1 according to an embodiment of the present invention. Figure 1 As shown, the information processing system 1 includes a service providing system 10 and a player terminal 50. The service providing system 10 and the player terminal 50 are connected to a network 2 such as the Internet and can communicate with each other. The information processing system 1 of this embodiment is described assuming a known client server type system, but is not limited to this.

[0060] The service providing system 10 is a system configured to include one or more devices. The service providing system 10 can also be implemented by a virtual machine or a cloud system. The service providing system 10 includes a service providing server 12, a cache server 14, and a database server (DB server) 16. The service providing server 12 is a game server, or has the function of a game server. The service providing server 12 accepts access from a player terminal 50 and provides game services corresponding to the player via a network 2. Therefore, in the present embodiment, the service providing system 10 or the information processing system 1 is a game system. The cache server 14 is a server having the function of storing temporary data. The DB server 16 is a server having the function of storing persistent data, and is a relational database that stores information related to the game. In one example, the DB server 16 is a server on which MySQL is installed. Below, for the sake of convenience of explanation, it is assumed that the service providing system 10 is implemented by one device for explanation.

[0061] Figure 2 1 is a block diagram showing the hardware structure of a service providing system 10 according to an embodiment of the present invention. The service providing system 10 includes a processor 21, an input device 22, a display device 23, a storage device 24, and a communication device 25. These components are connected via a bus 26. In addition, an interface is provided between the bus 26 and each component as required.

[0062] The processor 21 controls the overall operation of the service providing system 10. For example, the processor 21 is a CPU. The processor 21 reads and executes programs and data stored in the storage device 24 to perform various processes. The processor 21 may be composed of a plurality of processors.

[0063] The input device 22 is a user interface for accepting user input to the service providing system 10 , and is, for example, a keyboard or a mouse. The display device 23 is a display for displaying application screens and the like to the user of the service providing system 10 under the control of the processor 21 .

[0064] The storage device 24 includes programs, data, and storage areas for realizing the cache server 14 or the functions of the cache server 14. The storage device 24 includes programs, data, and storage areas for realizing the DB server 16 or the functions of the DB server 16. The storage device 24 can include a known main storage device and auxiliary storage device.

[0065] The communication device 25 is a module, device or apparatus that can exchange data with other computers such as user terminals or servers via a network. The communication device 25 can be a device, module, etc. for wireless communication or a device, module, etc. for wired communication.

[0066] The player terminal 50 is a smart phone used by players who use game services, and can have the structure of a general smart phone. However, the player terminal 50 can be a terminal such as a personal computer or a tablet terminal. The player terminal 50 has a processing device such as a CPU that controls each part, a storage device such as a storage element such as a ROM or RAM, an input / output device such as a touch panel, and a communication device such as a wireless module. These components are connected via a bus.

[0067] In this embodiment, the player terminal 50 is installed with a game application AP1, and the service providing server 12 is installed with a server application AP2 corresponding to the game application AP1. When the game application AP1 is started on the player terminal 50, the player terminal 50 communicates with the service providing server 12, and the service providing server 12 and the player terminal 50 send and receive data required for providing game services. In one example, the service providing server 12 communicates with the player terminal 50 periodically or intermittently while the game application AP1 is started in the player terminal 50, executes the game according to the game operation input in the player terminal 50, and sends the result of the execution to the player terminal 50. The service providing server 12 generates a query according to the progress of the game and obtains data such as game information from the DB server 16, or generates a query according to the progress of the game and stores or deletes data such as game information in the DB server 16. In one example, the service providing server 12 generates a query according to the progress of the game and stores the player ID in the DB server 16 in association with various game information.

[0068] Figure 31 is a functional block diagram of a service providing system 10 according to an embodiment of the present invention. The service providing system 10 includes a query generating unit 31, a query executing unit 32, and an object managing unit 33. In the present embodiment, these functions are realized by executing a program stored in a storage device 24 by the processor 11. As described above, various functions are realized by reading a program, so a part or all of a function (part) may also be possessed by other functions. However, these functions may also be realized by hardware by constituting an electronic circuit for realizing a part or all of each function.

[0069] The service providing server 12 sends a command statement for inserting, selecting, deleting or updating data to the database (RDB) of the DB server 16 according to the progress of the game. The query generation unit 31 generates the command statement, and in this embodiment, generates a pre-defined SQL query (a query using a prepared statement). The query generated by the query generation unit 31 is a pre-defined query (Single-Table Row-level Locking (STRL) Prepared Statement) that acts on only one row of a table. In this embodiment, the query generation unit 31 generates a pre-defined query that acts on only one row of a table, and the query is any one of the INSERT instruction, SELECT instruction, SELECT FOR UPDATE instruction, UPDATE instruction or DELETE instruction (command statement). Therefore, the query generation unit 31 does not generate a query that acts on multiple rows of a table, although it is an INSERT instruction, SELECT instruction, SELECT FOR UPDATE instruction, UPDATE instruction or DELETE instruction. The query includes variables, so the pre-defined query can refer to a query of a pre-defined type.

[0070] The query execution unit 32 executes the query generated by the query generation unit 31. The query execution unit 32 can send the query generated by the query generation unit 31 to the DB server 16 and obtain the query execution result from the DB server 16. The query execution result is obtained when the query is executed and no error occurs, and the query succeeds.

[0071] The object management unit 33 manages cache objects of query execution results obtained based on the query execution unit 32. In this embodiment, an object refers to the data of a row of a table in the RDB (query execution result), and thus there are objects of the number of rows in a table. The cache object is used to temporarily store objects, and is obtained by converting the data of the object into data in a specified format (serialized object).

[0072] The query generation unit 31 generates a query including a cache ID for identifying a cache object. The cache ID is an example of cache object identification information that can uniquely identify a cache object. In the present embodiment, the query generation unit 31 generates a query based on the progress of the game, which is a query for an INSERT instruction, a SELECT instruction, a SELECT FOR UPDATE instruction, an UPDATE instruction, or a DELETE instruction that acts only on one row of a table (a query using a precompiled statement), and also includes information about the cache object corresponding to the object set as the target of the query.

[0073] In the present embodiment, the query generation unit 31 generates a query to which a cache ID generated based on a part or all of a given independent variable (variable) is given as an annotation. For example, the independent variable here is a variable part (element) given to the query when the service providing server 12 sends a command statement for inserting, selecting, deleting or updating data to the RDB of the DB server 16 according to the progress of the game.

[0074] For example, the query generation unit 31 generates a query as shown in Example 1 below (a query using a prepared statement).

[0075] (Example 1)INSERT INTO person(vid,name,param)VALUES($1,$2,$3)--CacheID="person_$1_$2"

[0076] The query in Example 1 is an instruction statement for adding rows having variables (elements) "$1, $2, $3" corresponding to each column to the table "person" having three columns "vid, name, param". In the query in Example 1, "CacheID="person_$1_$2"" is the commented part, and "person_$1_$2" is the cache ID. In the query in Example 1, "INSERT INTO...VALUES...--CacheID=", which includes the "INSERT INTO...VALUES" part of the instruction statement and the "--CacheID=" part of the comment, is one of the pre-defined queries. Information about the table names included in the RDB and the columns included in each table is pre-defined, and in the query in Example 1, the table name "person" is used as a character string that constitutes the cache ID. "$1, $2, $3" represents the elements (values ​​or strings) corresponding to each column as variables (variable parts). In the query of Example 1, two elements "$1, $2" of the three elements "$1, $2, $3" are used as strings that constitute the cache ID. By setting such a structure, a cache ID that can identify a row of data (object) in a table in the RDB can be automatically generated, and objects can be associated with cache objects via the cache ID.

[0077] The query execution unit 32 and the object management unit 33 perform processing according to the type of query generated by the query generation unit 31. In this embodiment, it is assumed that the query is of five types corresponding to the basic functions (INSERT, SELECT, UPDATE, SELECT FOR UPDATE, DELETE). However, although the query is a query of the same basic function, it is also possible to define a different type of query for each table to be referenced (the number of variables may be different).

[0078] When the query generated by the query generation unit 31 is the query Q1 of the INSERT instruction, the query execution unit 32 sends the query Q1 to the DB server 16 and receives the result from the DB server 16. When the query execution unit 32 executes the query Q1 and obtains the query execution result (when the INSERT instruction succeeds), the object management unit 33 transforms the query execution result into a cache object, establishes a correspondence between the cache object and the cache ID included in the executed query Q1, and stores it in a specified memory (cache area M) of the cache server 14.

[0079] When the query generated by the query generation unit 31 is a query Q2 of a SELECT instruction, the query execution unit 32 determines whether the cache ID included in the query Q2 is stored in the cache area M of the cache server 14 .

[0080] In the case where the cache ID included in the query Q2 of the SELECT instruction is stored in the cache area M, the query execution unit 32 obtains the cache object corresponding to the cache ID from the specified memory. In this case, the query execution unit 32 does not execute the query Q2 to the DB server 16, that is, does not send (does not inquire) the query Q2 generated by the query generation unit 31 to the DB server 16. The query execution unit 32 can obtain the query execution result obtained when the query Q2 of the SELECT instruction is executed based on the acquired cache object. In the case where the cache ID included in the query Q2 is not stored in the cache area M, the query execution unit 32 sends the query Q2 to the DB server 16 and receives the result from the DB server 16. In the case where the query execution unit 32 executes the query Q2 and obtains the query execution result (in the case where the SELECT instruction is successful), the object management unit 33 converts the query execution result into a cache object, establishes a correspondence between the cache object and the cache ID included in the executed query Q2, and stores it in the cache area M.

[0081] When the query generated by the query generation unit 31 is the query Q3 of the DELETE instruction, the query execution unit 32 sends the query Q3 to the DB server 16 and receives the result from the DB server 16. When the query execution unit 32 executes the query Q3 of the DELETE instruction and obtains the query execution result (when the DELETE instruction succeeds), the object management unit 33 deletes the cache object corresponding to the cache ID included in the query Q3 stored in the cache area M of the cache server 14 from the cache area M together with the cache ID.

[0082] When the query generated by the query generation unit 31 is the query Q4 of the SELECT FOR UPDATE instruction, the query execution unit 32 sends the query Q4 to the DB server 16 and receives the result from the DB server 16. When the SELECT FOR UPDATE instruction is executed, the object targeted by the query Q4 is temporarily locked, and the object management unit 33 temporarily locks the cache object corresponding to the cache ID included in the query Q4. In addition, when the object targeted by the query Q4 is locked, writing and locking of the object from other queries are blocked. In addition, when the processing of the query Q4 is completed, the lock of the object targeted by the query Q4 is released, and the lock of the cache object corresponding to the cache ID included in the query Q4 is also released.

[0083] When the query generated by the query generation unit 31 is the query Q5 of the UPDATE instruction, the query execution unit 32 sends the query Q5 to the DB server 16 and receives the result from the DB server 16. When the UPDATE instruction is executed, the object targeted by the query Q5 is temporarily locked, and the object management unit 33 temporarily locks the cache object corresponding to the cache ID included in the executed query Q5. When the query execution unit 32 executes the query Q5 of the UPDATE instruction and obtains the query execution result (when the UPDATE instruction is successful) and the cache ID included in the query Q5 is stored in the cache area M of the cache server 14, the object management unit 33 deletes the cache object corresponding to the cache ID from the cache area M together with the cache ID. In addition, when the object targeted by the query Q5 is locked, the writing and locking of the object from other queries are blocked. In addition, when the processing of the query Q5 is completed, the lock of the object targeted by the query Q5 is released, and the lock of the cache object corresponding to the cache ID included in the query Q5 is also released.

[0084] In the present embodiment, the cache server 14 functions as a proxy server for requesting a query, the service providing server 12 has the function of a query generating unit 31, and the cache server 14 has a query executing unit 32 and an object managing unit 33. The cache server 14 has a query receiving unit for receiving a query generated by the service providing server 12. The cache server 14 (query executing unit 32) delivers the query execution result obtained as a result of the received query to the service providing server 12. However, which component (device, system, etc.) has each functional unit of the service providing system 10 is not limited to the above description as long as it does not deviate from the main purpose of the invention. For example, it can also be configured that the service providing server 12 has a query generating unit 31, a query executing unit 32 and an object managing unit 33, and the cache server 14 only has the function of temporarily storing data on a specified memory.

[0085] Figure 4 This is a diagram for explaining an example of a flowchart of the processing of the service providing system 10 according to one embodiment of the present invention.

[0086] In step S1, the query generation unit 31 generates a query. In this embodiment, the query generation unit 31 generates a query of an INSERT instruction, a SELECT instruction, a SELECT FOR UPDATE instruction, an UPDATE instruction, or a DELETE instruction that acts only on one row of a table of the RDB of the DB server 16. The following steps are described for each type of query.

[0087] In the case where the query generated by the query generation unit 31 is an INSERT instruction, in step S2, the query execution unit 32 executes the query by sending the query to the DB server 16. In step S3, the query execution unit 32 determines whether the executed query is successful, that is, whether the query execution result is normally obtained from the DB server 16 (for example, whether no error message is generated). When the query is successful, this flowchart enters step S4, and when the query is not successful, this flowchart ends. In step S4, the object management unit 33 transforms the query execution result obtained by the query execution unit 32 into a cache object, establishes a correspondence between the cache object and the cache ID included in the query executed in step S2, and stores it in the specified memory (cache area M) of the cache server 14.

[0088] When the query generated by the query generation unit 31 is a SELECT instruction, in step S2, the query execution unit 32 determines whether the cache area M of the cache server 14 stores the cache ID included in the query. If the cache area M stores the cache ID included in the query, the query execution unit 32 obtains the cache object corresponding to the cache ID from the cache area M, and if the cache area M does not store the cache ID, the query is sent to the DB server 16.

[0089] In step S3, the query execution unit 32 determines whether the query execution is successful when sending the query to the DB server 16. When the query is successful, the flowchart proceeds to step S4. When the query is not sent to the DB server 16 or the query is not successful, the flowchart ends. In step S4, the object management unit 33 transforms the query execution result obtained by the query execution unit 32 into a cache object, establishes a correspondence between the cache object and the cache ID included in the query executed in step S2, and stores it in the cache area M.

[0090] In the case where the query generated by the query generation unit 31 is a DELETE instruction, in step S2, the query execution unit 32 executes the query by sending the query to the DB server 16. In step S3, the query execution unit 32 determines whether the executed query is successful. When the query is successful, the flowchart enters step S4, and when the query is not successful, the flowchart ends. In step S4, when a cache object corresponding to the cache ID included in the query executed in step S2 is stored in the cache area M, the object management unit 33 deletes the cache object together with the cache ID from the cache area M.

[0091] In the case where the query generated by the query generation unit 31 is an UPDATE instruction, in step S2, the query execution unit 32 executes the query by sending the query to the DB server 16. In step S3, the query execution unit 32 determines whether the executed query is successful. When the query is successful, this flowchart enters step S4, and when the query is not successful, this flowchart ends. In step S4, if a cache object corresponding to the cache ID included in the query executed in step S2 is stored in the cache area M, the object management unit 33 deletes the cache object together with the cache ID from the cache area M.

[0092] When the query generated by the query generation unit 31 is a SELECT FOR UPDATE instruction, in step S2, the query execution unit 32 executes the query by sending the query to the DB server 16. The SELECT FOR UPDATE instruction is not an instruction to change an object, and therefore is neither an instruction to store a cache object nor an instruction to delete a cache object, so in step S3, when the query executed in step S2 is a SELECT FOR UPDATE instruction, this flowchart ends.

[0093] Next, main functions and effects of the service providing system 10 (information processing system 1) according to the embodiment of the present invention will be described.

[0094] In the past, it was an important issue in the game system to achieve the speed, efficiency and even reliability of the existing RDB, including the cache and data access layer as peripheral software. In particular, the improvement of the query cache mechanism, which is indispensable in the use case of RDB and can improve the overall performance of the server-side system, is an important issue. Query cache refers to the following mechanism: the result of a query executed once is saved in the memory, and the execution of the second query is not executed on the RDB, but the data accumulated in the memory is returned, thereby reducing the load on the database and improving the overall response speed of the system. The query cache is designed in a universal way that can be applied to almost all applications, and is not optimized for specific SQL use cases.

[0095] In an embodiment of the present invention, the database query during general game operation is concerned with a query that only uses one query to act on one row of a table. In this embodiment, the query generated by the query generation unit 31 is a query of any one of the INSERT instruction, SELECT instruction, SELECT FOR UPDATE instruction, UPDATE instruction or DELETE instruction, which is a query that acts on only one row of a table and uses a precompiled statement. In this way, all the inquiries to the RDB of the DB server 16 during the game operation of the game server (service providing server 12) are the above-mentioned queries. In addition, in this embodiment, when the query generation unit 31 generates a query, based on the parameters of the query that can determine the object, a character string that can identify the cache object is automatically generated, and the character string is assigned as an annotation comment. In addition, in this embodiment, the object management unit 33 performs the locking and life management of the cache object when executing the query according to each type of query (INSERT, SELECT, UPDATE (SELECT FOR UPDATE), DELETE).

[0096] By adopting such a structure, the query cache mechanism of the RDB in the game system can be improved, and the association between the cache object and the RDB and the life management of the cache object can be unified and automatically performed, thereby achieving high-speed and high-efficiency processing in the game system.

[0097] In addition, by performing such automatic cache object management, the life of the cache object can be controlled independently of the application. Thus, the cache server 14 can store the objects of the RDB as cache objects and realize a distributed memory cache system. In addition, the function of transparently converting all entries (all objects) of the RDB into object data representations inherent to the programming language (such as PHP language, C# language) can be installed on the cache server 14, thereby realizing "Distributed On-Memory Serialized Object Cache". Thus, in the server-side program coded by multiple engineers, the cache layer can be safely and efficiently installed. In addition, in this case, the data structure of the cache object stored by the cache server 14 is a serialized object, and the serialized object refers to the binary data representation when the data structure adopted by the programming language is saved to the outside.

[0098] As described above, in the embodiment of the present invention, all queries are pre-defined and can be installed as pre-compiled statements. Therefore, when the cache server is started, the cache server 14 of this embodiment can use the parameters within the range of the player ID that the cache server is responsible for to execute the pre-compiled statements of all SELECT statements, and save the data (objects) of each row of the RDB table corresponding to the SELECT statement as a serialized object. Such technology does not exist in previous Web applications and cloud applications.

[0099] Unless otherwise mentioned, the above-mentioned effects are also applicable to other embodiments and modifications.

[0100] The system of the embodiment of the present invention can be set as either the information processing system 1 or the service providing system 10. In one or more embodiments of the present invention, the service providing system 10 can be set without the DB server 16. In this embodiment, the DB server 16 is configured to be able to communicate with the service providing system 10. In addition, in an embodiment in which the cache server 14 does not function as a proxy server but only has a function of temporarily storing in a cache area, the service providing system 10 can be set without the cache server 14. In this embodiment, the cache server 14 is configured to be able to communicate with the service providing system 10. In addition, in this embodiment, the service providing system 10 can be implemented by the service providing server 12.

[0101] In one or more embodiments of the present invention, it can also be applied to a system that provides a specified service other than a game system, and the game system is a system that generates a query using a precompiled statement in which a query acts only on a row of a table and executes the query. In this embodiment, the service providing server 12 can be an application server that provides a specified service other than a game service, or has the function of an application server. In this embodiment, the service providing server 12 is not a game server and does not have the function of a game server.

[0102] In one or more embodiments of the present invention, when each functional unit of the service providing system 10 described above can perform the same action, the language of the query generated by the query generating unit 31 and executed by the query executing unit 32 may be a language other than SQL. For example, the query language only needs to have an insert instruction equivalent to an INSERT instruction, a selection instruction equivalent to a SELECT instruction, a lock-holding instruction equivalent to a SELECT FOR UPDATE instruction, an update instruction equivalent to an UPDATE instruction, and a delete instruction equivalent to a DELETE instruction.

[0103] In one or more embodiments of the present invention, the query generation unit 31 may also be configured to generate a query for any one of the INSERT instruction, the SELECT instruction, and the DELETE instruction, and the query is a pre-defined query that only acts on one row of a table. In one or more embodiments of the present invention, the query generation unit 31 may also be configured to generate a query for any one of the INSERT instruction, the SELECT instruction, the UPDATE instruction, and the DELETE instruction, and the query is a pre-defined query that only acts on one row of a table. In one or more embodiments of the present invention, the query generation unit 31 may also be configured to generate a query for any one of the INSERT instruction, the SELECT instruction, the SELECT FOR UPDATE instruction, and the DELETE instruction, and the query is a pre-defined query that only acts on one row of a table.

[0104] In one or more embodiments of the present invention, when the given independent variable satisfies the prescribed condition, even when the query execution unit 32 executes the query of the INSERT instruction or the SELECT instruction and obtains the query execution result, the object management unit 33 does not convert the query execution result into a cache object. Therefore, in this case, the object management unit 33 does not store the cache object in the cache area M of the cache server 14. In one example, the query generation unit 31 can generate a query to which the prescribed condition is given as an annotation.

[0105] For example, the query generation unit 31 generates a query as shown in Example 1 below (a query using a prepared statement).

[0106] (Example 2) INSERT INTO person(vid,name,param)VALUES($1,$2,$3)--CacheID="person_$1_$2",Ignore=$1lt 0

[0107] The query of Example 2 is a query in which the prescribed condition "Ignore = $1 lt 0" is added to the query of Example 1. The prescribed condition is that "$1" is less than 0. In this case, when "$1" is less than 0, the object management unit 33 does not store the cache object in the cache area M. As comparison operators, various operators such as less-than (lt), greater-than (gt), equal (eq), partially equal (pe), AND, OR, and NOT can be installed.

[0108] In one or more embodiments of the present invention, the cache server 14 can save the serialized object as one object and one file in the specified memory or SSD memory (solid state drive memory) of the cache server 14. In one example, when the PHP language is used in the installation of the application server (service providing server 12) that executes the game logic on the server side, the cache server 14 saves it as a serialized object of PHP. In one example, when the C# language is used in the installation of the application server (service providing server 12), the cache server 14 saves it as a serialized object in the Protocol Buffers format that is easiest to handle in C#. In this way, the format of the serialized object can be set to be different for each programming language that describes the application.

[0109] In one or more embodiments of the present invention, the cache object may also be the data of the object itself. In this embodiment, obtaining the cache object means obtaining the query execution result.

[0110] In the embodiment of the present invention, the player terminal 50 may also be configured to receive data that can be downloaded in advance from the service providing server 12 before the player plays the game and store it as data associated with the game application program AP1. In this case, the player terminal 50 has functions required to implement the game service in addition to functions that need to be installed in the service providing server 12, such as updating of data associated with the player. Alternatively, the player terminal 50 may also be configured as a thin client terminal for input and output. In this case, the service providing server 12 has functions required to implement the game service in addition to the input and output functions in the player terminal 50.

[0111] As described above, an embodiment of the present invention can be set as an information processing system 1 or a service providing system 10. An embodiment of the present invention can also be set as a cache server 14 having a query execution unit 32 and an object management unit 33. An embodiment of the present invention can also be set as a program for implementing the functions of the embodiment of the present invention described above, the information processing shown in the flowchart, and a computer-readable storage medium storing the program. In addition, an embodiment of the present invention can also be set as a method for implementing the functions of the embodiment of the present invention described above, the information processing shown in the flowchart. In addition, an embodiment of the present invention can also be set as a server that can supply a computer with a program for implementing the functions of the embodiment of the present invention described above, the information processing shown in the flowchart.

[0112] In the above-described processing or action, as long as there is no conflict in the processing or action such as using data that should not be available in the step, the processing or action can be freely changed. In addition, the above-described embodiments are examples for illustrating the present invention, and the present invention is not limited to these embodiments. The present invention can be implemented in various ways without departing from its purpose.

[0113] Description of Reference Numerals

[0114] 1: information processing system; 2: network; 10: service providing system; 12: service providing server; 14: cache server; 16: database server; 21: processor; 22: display device; 23: input device; 24: storage device; 25: communication device; 26: bus; 31: query generating unit; 32: query executing unit; 33: object management unit; 50: player terminal.

Claims

1. A system comprising: A query generation unit, which generates a predefined query acting on a row of a table of a prescribed relational database, wherein the predefined query includes an insert instruction, a select instruction, and a delete instruction query; A query execution unit, which executes the query generated by the query generation unit; as well as an object management unit, which manages cache objects of query execution results obtained based on the query execution unit executing the query, The query generation unit generates a query including cache identification information for identifying a cache object. In the case where the query execution unit executes a query of an insert instruction or a select instruction and obtains a query execution result, the object management unit establishes a correspondence between the cache object based on the query execution result and the cache identification information contained in the executed query and stores the correspondence in a specified memory. In the case where the query execution unit executes a query of a delete instruction and obtains a query execution result, the object management unit deletes the cache object corresponding to the cache identification information contained in the query of the delete instruction from the specified memory. In the case of executing a query of a selection instruction, if the specified memory stores cache identification information included in the query, the query execution unit does not execute the query on the specified relational database, but obtains the cache object corresponding to the cache identification information from the specified memory.

2. The system according to claim 1, wherein: The query generation unit generates a query to which query identification information generated based on a given argument is added as an annotation.

3. The system according to claim 2, wherein: When the query execution unit executes a query of an insert instruction or a select instruction and obtains a query execution result, the object management unit does not store a cache object based on the query execution result in a predetermined memory if the given argument satisfies a predetermined condition.

4. The system according to any one of claims 1 to 3, wherein: The query generated by the query generation unit is a SQL query, The query generation unit generates a query of an INSERT instruction, a SELECT instruction, a SELECT FOR UPDATE instruction, an UPDATE instruction, or a DELETE instruction.

5. The system according to claim 4, wherein: When the query execution unit executes a query of an UPDATE instruction and obtains a query execution result, the object management unit deletes the cache object corresponding to the cache identification information included in the query from the predetermined memory.

6. The system according to claim 1, wherein: The specified memory is a memory of a cache server included in the system or an SSD memory.

7. The system according to claim 1, wherein: The system comprises a game server, The predetermined relational database is a relational database that stores information related to the game.

8. A cache server comprising: A query receiving unit receives a predefined query acting on a row of a table of a prescribed relational database from a service providing server, wherein the predefined query includes an insert instruction, a select instruction, and a delete instruction query; a query execution unit, which executes the query received by the query reception unit; as well as an object management unit, which manages cache objects of query execution results obtained based on the query execution unit executing the query, The query receiving unit receives a query including cache identification information for identifying a cache object. In the case where the query execution unit executes a query of an insert instruction or a select instruction and obtains a query execution result, the object management unit establishes a correspondence between the cache object based on the query execution result and the cache identification information contained in the executed query and stores the correspondence in a specified memory. In the case where the query execution unit executes a query of a delete instruction and obtains a query execution result, the object management unit deletes the cache object corresponding to the cache identification information contained in the query of the delete instruction from the specified memory. In the case of executing a query of a selection instruction, if the specified memory stores cache identification information included in the query, the query execution unit does not execute the query on the specified relational database, but obtains the cache object corresponding to the cache identification information from the specified memory.

9. The cache server according to claim 8, wherein: The query generation unit generates a query to which query identification information generated based on a given argument is added as an annotation.

10. A method comprising: A generating step, generating a predefined query acting on a row of a table of a specified relational database, wherein the predefined query includes a query of an insert instruction, a select instruction, and a delete instruction; An execution step, executing the query generated in the generation step; as well as a storage step or a deletion step, storing or deleting a cache object of a query execution result obtained by executing a query by the query execution unit, The query generated in the generating step includes cache identification information for identifying the cache object. The storing step includes, when a query of the insert instruction or the select instruction is executed in the executing step and a query execution result is obtained, establishing a correspondence between a cache object based on the query execution result and cache identification information included in the executed query and storing the correspondence in a specified memory, The deleting step includes, when a query of the delete instruction is executed in the executing step and a query execution result is obtained, deleting the cache object corresponding to the cache identification information included in the query of the delete instruction from the specified memory, The execution step includes, in the case of executing a query of a selection instruction, if the specified memory stores cache identification information contained in the query, not executing the query on the specified relational database, but obtaining the cache object corresponding to the cache identification information from the specified memory.

11. The method according to claim 10, wherein: In the step of generating the query, a query is generated to which query identification information generated based on the given argument is added as an annotation.

12. A program for causing a computer to execute each step of the method according to claim 10 or 11.