CN102065097B - Synchronous operation method of clients and servers - Google Patents
Synchronous operation method of clients and servers Download PDFInfo
- Publication number
- CN102065097B CN102065097B CN201010621856.2A CN201010621856A CN102065097B CN 102065097 B CN102065097 B CN 102065097B CN 201010621856 A CN201010621856 A CN 201010621856A CN 102065097 B CN102065097 B CN 102065097B
- Authority
- CN
- China
- Prior art keywords
- user
- server
- client
- vdb
- game
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Abstract
The invention provides a synchronous operation method of clients and servers, which comprises the following steps of: the clients use a dynamic scripting language LUA to build a virtual database (VDB), the VDB records the operation of a user in a game scene in real time; when the user closes the current game scene and opens a next game scene, the clients read the operation records of the user from the VDB and send the operation records carried in user operation requests to the servers which provide service for a next game scene; the servers check the received user operation requests and inform the clients of a checking result. By using the method, not only can the cost of the server be reduced, but also the operation consistency of clients can be ensured.
Description
Technical field
The present invention relates to online game technology, particularly relate to the method that in online game, client is synchronizeed with server operation.
Background technology
In network game system, for different scene of game, at network side, by different servers, provide service.When player is switched scene of game (being switching server) or reopened buttoned-up scene of game, need to make client keep synchronizeing in user's operating aspect with the current server that service is provided.At present, mainly adopt two kinds of synchronous modes.One is server file pattern, and another kind is data dump pattern.Wherein, the former adopts by the mode of server preservation user operating result and realizes, and latter adopts dropped users operating result also by client end interface, to carry out the mode operating of resetting and realizes.Take the article of setting up a stall as example, respectively above-mentioned two kinds of patterns are described below.
Fig. 1 is the processing schematic diagram while adopting server file pattern.As shown in Figure 1, in the situation that adopting server file pattern, when player closes scene of game, server A is filed the operating result of client, be kept in container, client end interface is not changed, to guarantee the consistency of operating data when user is switched to new server.When player is switched to new scene of game or reopens buttoned-up scene of game, the server B of current service reads the operating result of the client of current preservation from said vesse, thereby guarantees that client synchronizes with the operation of the current server that service is provided.
Fig. 2 is the processing schematic diagram while adopting data dump pattern.As shown in Figure 2, in the situation that adopting server file pattern, when player closes scene of game, server A is not filed to the operating result of client, but directly abandon these operating results, when player is switched to new scene of game or reopens after buttoned-up scene of game, the corresponding operation of resetting is carried out at the interface that needs client to work as front opening, to guarantee that client synchronizes with the operation of the current server that service is provided.
In above-mentioned two kinds of patterns, server file pattern can guarantee the consistent of client operation, does not need the client executing operation of resetting, but to sacrifice server stores and computing as cost, if server stress is excessive, easily produces and postpone or inconsistent mistake.And data dump pattern is in order to reduce server expense, directly cancelled the preservation of user's operation, to user, experience and brought totally unfavorable impact, affect the whole structure of product.
Summary of the invention
In view of this, a kind of method that provides client to synchronize with server operation is provided main purpose of the present invention, and the method can reduce server expense, can guarantee again the consistency of client operation.
In order to achieve the above object, the technical scheme that the present invention proposes is: a kind of method that client is synchronizeed with server operation, and the method comprises the following steps:
Client utilizes dynamic script language LUA to build a virtual data base VDB, the operation of described VDB real time record user in scene of game;
When user closes current scene of game and opens next scene of game, described client reads described user's operation note from described VDB, and described operation note is carried at and in user's operation requests, sends to the server that service is provided for described next scene of game;
Described server is verified the described user's operation requests receiving, and the result is notified to described client.
In sum, the method that the client that the present invention proposes is synchronizeed with server operation, by building one at client place in order to preserve the virtual data base of user's operation, can effectively guarantee client and the server consistency in user's operating aspect, can reduce server expense, can guarantee again the consistency of client operation simultaneously.
Accompanying drawing explanation
Processing schematic diagram when Fig. 1 is available technology adopting server file pattern;
Processing schematic diagram when Fig. 2 is available technology adopting data dump pattern;
Fig. 3 is the schematic flow sheet of the embodiment of the present invention one.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, the present invention is described in further detail below in conjunction with the accompanying drawings and the specific embodiments.
Core concept of the present invention is: in client, utilize dynamic script language LUA to build a virtual data base (Virtual Database, VDB), in order to preserve user's operation, after user is switched scene of game or while reopening a scene of game, by client, directly the user who preserves in this VDB is operated and sends to current server, so, can guarantee client and the server consistency in user's operating aspect, can reduce server expense, can guarantee again the consistency of client operation simultaneously.
Fig. 3 is the schematic flow sheet of the embodiment of the present invention one, and as shown in Figure 3, this embodiment mainly comprises:
Step 301, client utilize dynamic script language LUA to build a virtual data base VDB, the operation of described VDB real time record user in scene of game.
In this step, by build a VDB at client place, can avoid the expense that the special user of preservation operating result produces in server.Particularly, how to utilize LUA to build VDB,, by those skilled in the art are grasped, do not repeat them here.
Need to illustrate, because LUA language does not have too much requirement to data type, therefore, here the VDB that utilizes LUA to build can store the data of any type, correspondingly, all operations categorical data of client all can deposit in, and then can make the present invention have very high compatibility.
Step 302, when user closes current scene of game and opens next scene of game, described client reads described user's operation note from described VDB, and described operation note is carried at and in user's operation requests, sends to the server that service is provided for described next scene of game.
This step, customer end adopted sends the mode of user's operation requests user's operation note is notified to server, for user, is transparent.That is to say, in this step, by client, utilize the analog subscriber that records in VDB to operate, to server, resend user's operation requests one time, like this, user does not need to wait for client related interfaces execution replacement operation, so, can guarantee that on the one hand client and server maintenance user operates synchronous, also in the time of can effectively avoiding adopting traditional data dump pattern on the other hand, the impact that user is experienced.
Step 303, described server are verified the described user's operation requests receiving, and the result are notified to described client.
Here, concrete verification mode is identical to the method for user's operation requests checking with server in existing scheme, and this operation is transparent for user.
From technique scheme, can find out, adopt said method, can reduce the expense of server, reduce the pressure of server, the consistency that simultaneously also can keep user to operate.
In order further to set forth specific implementation of the present invention, provide the concrete example that realizes a VDB using Lua as development language below.
When realizing a VDB using Lua as development language, VDB externally provides general database manipulation interface (newly-built, to insert deletion, inquiry etc.), interface example following (only putting up interface):
function?CreateTable(table_name)
function?Insert(table_name,data,key)
function?DeleteKeytoIndex(table_name,index)
function?ClearTable(table_name)
function?DeleteByKey(table_name,key)
function?SearchByKey(table_name,key,item)
This technology that role in < < daggers and swords 2 > > projects has set up a stall system applies.When player has carried out added operation by goods, client can be inserted into this operation in corresponding operation storage table, to record this single stepping of player, be specially: tool_cookies.Insert (table_stall_item, g_stall_item[key], " item_card_onlyid ").When same article having been carried out to multistep operation, can upgrade the data item in VDB, concrete operations are: tool_cookies.UpdataByKey (table_stall_item, onlyid, count, cnt), other operations with above class of operation seemingly, do not repeat them here.
In sum, these are only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.
Claims (1)
1. the method that client is synchronizeed with server operation, is characterized in that, the method comprises the following steps:
Client utilizes dynamic script language LUA to build a virtual data base VDB, the operation of described VDB real time record user in scene of game;
When user closes current scene of game and opens next scene of game, described client reads described user's operation note from described VDB, and described operation note is carried at and in user's operation requests, sends to the server that service is provided for described next scene of game;
Described server is verified the described user's operation requests receiving, and the result is notified to described client.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010621856.2A CN102065097B (en) | 2010-12-27 | 2010-12-27 | Synchronous operation method of clients and servers |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010621856.2A CN102065097B (en) | 2010-12-27 | 2010-12-27 | Synchronous operation method of clients and servers |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102065097A CN102065097A (en) | 2011-05-18 |
CN102065097B true CN102065097B (en) | 2014-04-23 |
Family
ID=44000198
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201010621856.2A Active CN102065097B (en) | 2010-12-27 | 2010-12-27 | Synchronous operation method of clients and servers |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102065097B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102385628B (en) * | 2011-11-14 | 2015-05-13 | 北京锐安科技有限公司 | Java data base connectivity (JDBC)-based data distributed processing method |
CN103731340B (en) * | 2013-12-27 | 2017-01-11 | 北京像素软件科技股份有限公司 | Communication method for online game system |
CN103701918B (en) * | 2013-12-31 | 2017-04-12 | 北京像素软件科技股份有限公司 | Method and device for synchronizing client-side and server |
CN104503848B (en) * | 2014-12-04 | 2018-12-11 | 珠海金山网络游戏科技有限公司 | A kind of synchronization and execution method of the move under C/S framework |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1848124A (en) * | 2005-04-12 | 2006-10-18 | 国际商业机器公司 | Slitless game world system based on server/customer's machine and method thereof |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101741653B (en) * | 2008-11-21 | 2012-08-22 | 爱思开电讯投资(中国)有限公司 | Client server, intelligent terminal, online game system and method |
-
2010
- 2010-12-27 CN CN201010621856.2A patent/CN102065097B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1848124A (en) * | 2005-04-12 | 2006-10-18 | 国际商业机器公司 | Slitless game world system based on server/customer's machine and method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN102065097A (en) | 2011-05-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11086850B2 (en) | Persisting of a low latency in-memory database | |
CN104160381B (en) | Managing method and system for tenant-specific data sets in a multi-tenant environment | |
CN103888378B (en) | A kind of data exchange system and method based on caching mechanism | |
CN102065097B (en) | Synchronous operation method of clients and servers | |
CN110100230A (en) | The file system hierarchy structure and function stored using cloud object | |
CN104378423B (en) | Metadata cluster distributed memory system and reading, the method for write-in storage data | |
CN107835983A (en) | Backup-and-restore is carried out in distributed data base using consistent database snapshot | |
CN102833281B (en) | It is a kind of distributed from the implementation method counted up, apparatus and system | |
CN104731943B (en) | A kind of server and data processing method | |
CN104536965B (en) | A kind of data query display systems under the conditions of big data and method | |
CN101964820A (en) | Method and system for keeping data consistency | |
CN108809816A (en) | Message count is not seen across the offer of each equipment | |
CN101101550B (en) | Mapping a new user interface onto an existing integrated interface | |
CN107133251A (en) | For the method synchronized to the Query Result between heterogeneous database, server and the computer program being stored in computer-readable medium | |
US20150120674A1 (en) | Virtual program installation and state restoration | |
CN107656970A (en) | A kind of method of data synchronization, device and server | |
CN105635311A (en) | Method for synchronizing resource pool information in cloud management platform | |
CN109906597A (en) | To with data set that restricted data set and untethered system are stored and fetched from cloud network | |
CN107302569A (en) | A kind of security monitoring Data acquisition and storage method of facing cloud platform | |
CN108011846A (en) | The method and device of management business in network function virtualization architecture | |
CN107808035A (en) | A kind of Intelligent decorative design system based on computer development | |
CA2818949C (en) | Mobile computing based centralized menu system | |
CN108228628A (en) | Wide table generating method and its device in a kind of structured query language database | |
CN104317957A (en) | Open platform and system for processing reports and report processing method | |
CN109525495A (en) | A kind of data processing equipment, method and FPGA board |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |