A method for synchronizing the daily status of client and server players

Through the methods of temporary client reset and regular server reset, the player's daily status data is synchronized staggered, solving the problem of peak server performance improvement caused by cross-day reset in the existing technology, and improving the performance of server and network.

CN115604330BActive Publication Date: 2025-05-30XIAMEN WOOBEST INTERACTIVE NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211192980.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-28
Publication Date
2025-05-30
Estimated Expiration
2042-09-28

AI Technical Summary

Technical Problem

When the existing technology resets the player's daily status across days, it leads to peak server performance improvements, causing server lag and player requests to delay response.

Method used

Using the method of temporary client reset and regular server reset, the client temporarily updates the player's daily status data when resetting the time node or logging in, while the server only performs synchronous reset when the player enters the action.

Benefits of technology

Synchronizing the player's daily status data by staggering peaks reduces the network peak fluctuations caused by data synchronization, reduces the performance peak of the server's time nodes across days, and improves the server's lag and player request delay response.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The present invention discloses a method for synchronizing the daily status of players between the client and the server, including temporary reset of the client and regular reset of the server; when the client is temporarily reset, only the client temporarily updates and resets the daily status data of the players, and the daily status data of the players on the server is not updated and reset; when the server is regularly reset, both the server and the client update and reset the daily status data of the players. The method of the present invention realizes the off-peak synchronization of the daily status data of the players, thereby reducing the network peak fluctuation caused by data synchronization, effectively reducing the performance peak of the server at the cross-day reset time node, and improving the situation of server lag and delayed response to player requests.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of game software, and particularly relates to a method for synchronizing the daily status of players between the client and the server. Background Art

[0002] Some functions in software games often have daily status. Common functions with daily status include the number of times to purchase items in the store. Many games limit the number of daily purchases by players in the store. After the number of items purchased by the player on the current day reaches the specified purchase limit, the player cannot continue to purchase items. After the daily purchase limit is reset across days, the player can purchase items in the store again.

[0003] For resetting the daily status of players across days, the currently common implementation scheme is initiated by the server. The server first resets the daily status of players, and then communicates with the client in real time to synchronize the daily status of players on the client. The reset operation of the server is usually triggered by a cross-day timer to reset the daily status of online players. The daily status of offline players is reset when the players log in to the game.

[0004] The existing scheme of the server initiating real-time synchronization and reset has some inevitable problems. With the increase in the scale of the game, the number of players, and the number of game functions with daily status, at the cross-day time point (for example: synchronizing and resetting at 0:00 every day), it brings serious performance overhead to the server, raises the performance peak of the server, resulting in server lag, delayed response to player requests, etc. In addition, simultaneously communicating with online players on the client to synchronize the daily status will also cause peak fluctuations in the network, resulting in network lag, online players receiving synchronization messages with delay, etc. Summary of the Invention

[0005] To solve the above problems, the present invention provides a method for synchronizing the daily status of players between the client and the server.

[0006] The present invention adopts the following technical solutions:

[0007] A method for synchronizing the daily status of players between the client and the server includes client temporary reset and server regular reset; when the client performs a temporary reset, only the client temporarily updates and resets the daily status data of players, and the daily status data of players on the server is not updated and reset; when the server performs a regular reset, both the server and the client update and reset the daily status data of players;

[0008] The client-side temporary reset includes a temporary reset triggered by a reset time node and a temporary reset triggered by a login action. The temporary reset triggered by the reset time node is that whenever the player is in an online state and reaches the reset time node, the client performs a temporary reset. The temporary reset triggered by the login action is that whenever the player performs a login operation, the client performs a temporary reset.

[0009] The server's regular reset is as follows: When the player executes a communication request for an input operation, the client first sends a status synchronization request to the server. After the server updates and resets the player's daily status data, it returns the updated reset result to the client. Then, the client determines whether the reset is successful based on the returned result.

[0010] Furthermore, the player's daily status data includes the daily reset time and the player's daily status values for each functional module.

[0011] Furthermore, the reset time node is a preset time node for updating and resetting the player's daily status data daily.

[0012] Furthermore, the client is provided with a client status synchronization module for managing the player's daily status data of the client, and the server is provided with a server status synchronization module for managing the player's daily status data of the server.

[0013] Furthermore, the client is also provided with a cross-day timer, which is used to set the reset time node and send a cross-day reset message.

[0014] Furthermore, after the client status synchronization module receives the cross-day reset message sent by the cross-day timer, the client determines whether the player is in an online state. If the player is in an online state, the client temporarily updates and resets the player's daily status data of the client. If the player is not in an online state, the client does not update and reset the player's daily status data of the client.

[0015] Furthermore, the client-side temporary reset is specifically as follows: After the client-side temporary reset is triggered, the client obtains the current time and compares whether the current time and the reset time node are on the same day. If they are not on the same day, the client updates and resets the player's daily status data of the client. If they are on the same day, the client keeps the player's daily status data of the client unchanged.

[0016] Furthermore, the server's regular reset includes the following steps:

[0017] S1. After the server receives the status synchronization request from the client, it obtains the current time and compares whether the current time and the reset time node are on the same day. If they are not on the same day, it updates the daily status data of the reset player and returns the updated data to the client. If they are on the same day, it returns the daily status data of the current server's player to the client;

[0018] S2. The client receives the return result from the server and determines whether the reset is successful. If the current daily status data of the player on the client is the same as the daily status data of the player returned by the client, it is determined that the reset is successful. If the current daily status data of the player on the client is different from the daily status data of the player returned by the client, it is determined that the reset fails and the data on the client is updated to the daily status data of the player returned by the server.

[0019] After adopting the above technical solution, compared with the background technology, the present invention has the following advantages:

[0020] The daily status data of the player in the present invention is reset separately by the client and is not synchronized with the real-time communication server. Only before the player's input operation triggers the communication server, the daily status data of the player on the client and the server is synchronized. By this method of delaying the synchronization of the daily status data of the player on the client and the server, the off-peak synchronization of the daily status data of the player is achieved, thereby reducing the network peak fluctuation caused by data synchronization, effectively reducing the performance peak of the server at the cross-day reset time node, and improving the situation of server freezing and delayed response of player requests. Detailed implementation manners

[0021] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0022] Embodiment

[0023] A method for synchronizing the daily status of client and server players, including client temporary reset and server regular reset; during the client temporary reset, only the client temporarily updates and resets the daily status data of the player, and the daily status data of the player on the server is not updated and reset; during the server regular reset, both the server and the client update and reset the daily status data of the player; the player daily status data includes the reset time of each day and the daily status values of each function module of the player. In this embodiment, the store shopping function module is taken as an example for illustration. When shopping in the store in the game, the number of purchases by the player in the store per day is limited. After the player reaches the specified purchase limit in the store on the same day, the player cannot continue to purchase goods. The daily status value of the player is the remaining number of purchases. After the daily purchase limit of the player is reset across days, the player can purchase goods in the store again. The specific method for synchronizing the daily status data of the player is as follows:

[0024] (1) Client temporary reset

[0025] The client temporary reset includes a temporary reset triggered by a reset time node and a temporary reset triggered by a login action; the client is provided with a client status synchronization module for managing the daily status data of the player on the client, and the client is also provided with a cross-day timer for setting the reset time node and sending a cross-day reset message.

[0026] The temporary reset triggered by the reset time node is: whenever the player is in an online state and reaches the reset time node, the client performs a temporary reset; specifically: when the client status synchronization module receives the cross-day reset message sent by the cross-day timer at 0:00 every day, the client determines whether the player is in an online state. If the player is in an online state, the client status synchronization module temporarily updates and resets the daily status data of the player on the client. If the player is not in an online state, the daily status data of the player on the client is not updated and reset. Among them, the reset time node is a preset time node for updating and resetting the daily status data of the player every day. The reset time node in this embodiment is set to 0:00 every day.

[0027] The temporary reset triggered by the login action is: whenever the player performs a login operation, the client performs a temporary reset;

[0028] After the client temporary reset is triggered, the client obtains the current time and compares whether the current time and the reset time node are on the same day. If they are not on the same day, the daily status data of the player on the client is updated and reset. If they are on the same day, the daily status data of the player on the client remains unchanged. The temporary reset of the client is performed separately by the client itself and is not synchronized with the real-time communication server. That is to say, at this time, the server does not update and reset the daily status data of the player.

[0029] (2) Server Regular Reset

[0030] The server is provided with a server status synchronization module for managing the daily player status data of the server. The server regular reset is as follows: when the client sends a communication request for an input operation, the client first sends a status synchronization request to the server. After the server updates and resets the daily player status data, it returns the updated and reset result to the client, and then the client determines whether the reset is successful according to the returned result.

[0031] The server regular reset includes the following steps:

[0032] S1. After the server receives the status synchronization request from the client, it obtains the current time and compares whether the current time and the reset time node are on the same day. If they are not on the same day, it updates and resets the daily player status data and returns the updated data to the client. If they are on the same day, it returns the daily player status data of the current server to the client;

[0033] S2. After the client receives the return result from the server, it determines whether the reset is successful. If the current daily player status data of the client is the same as the daily player status data returned by the client, it is determined that the reset is successful. If the current daily player status data of the client is different from the daily player status data returned by the client, it is determined that the reset fails and the data of the client is updated to the daily player status data returned by the server.

[0034] When the reset is successful, it means that the purchase times of the player are reset, and the player can continue to send a communication request for an input operation, that is, can continue to purchase goods. If the reset fails, the current client data is updated according to the daily player status data returned by the server. If there are no remaining purchase times after the update, otherwise the communication request for the player's input operation is stopped, that is, the player has no remaining purchase times on the current day and cannot purchase goods anymore. Each time the player successfully purchases a good, a complete communication will be carried out with the server, and the synchronization module of the server will deduct one purchase time and immediately synchronize it to the client.

[0035] The regular reset of the server is not triggered by a traditional cross-day timer on the server side, but by the client, specifically triggered by the player's input operation to trigger the communication server. When the player logs in, the client's temporary reset is performed first. Then, when the player's input operation triggers the communicator (for example, when the player enters the store and clicks to purchase an item), the client will send a status synchronization request to the server. Only at this time will the daily status data of the player on the client and the server be synchronized. By this method of delaying the synchronization of the daily status data of the player on the client and the server, the off-peak synchronization of the daily status data of the player is achieved, thereby reducing the network peak fluctuations caused by data synchronization, effectively reducing the performance peak of the server at the cross-day reset time node, and improving the server lag and the delayed response of the player's requests.

[0036] As described above, the above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A method for synchronizing the daily status of client and server players, characterized in that: It includes client temporary reset and server regular reset; when the client performs a temporary reset, only the client temporarily updates and resets the daily status data of the player, and the daily status data of the player on the server is not updated and reset; when the server performs a regular reset, both the server and the client update and reset the daily status data of the player; The client temporary reset includes a temporary reset triggered by a reset time node and a temporary reset triggered by a login action; the temporary reset triggered by the reset time node is that whenever the player is in an online state and reaches the reset time node, the client performs a temporary reset; the temporary reset triggered by the login action is that whenever the player performs a login operation, the client performs a temporary reset; The server regular reset is that when the player executes a communication request for an input operation, the client first sends a status synchronization request to the server. After the server updates and resets the daily status data of the player, it returns the update and reset result to the client, and then the client determines whether the reset is successful according to the returned result.

2. A method for synchronizing the daily status of client and server players according to claim 1, characterized in that: The daily status data of the player includes the daily reset time and the daily status values of each function module of the player.

3. A method for synchronizing the daily status of client and server players according to claim 2, characterized in that: The reset time node is a preset time node for updating and resetting the daily status data of the player every day.

4. A method for synchronizing the daily status of client and server players according to claim 3, characterized in that: The client is provided with a client status synchronization module for managing the daily status data of the client players, and the server is provided with a server status synchronization module for managing the daily status data of the server players.

5. A method for synchronizing the daily status of client and server players according to claim 4, characterized in that: The client is further provided with a cross-day timer, and the cross-day timer is used to set the reset time node and send a cross-day reset message.

6. A method for synchronizing the daily status of client and server players according to claim 5, characterized in that: After the client status synchronization module receives the cross-day reset message sent by the cross-day timer, the client determines whether the player is in an online state. If the player is in an online state, the client temporarily updates and resets the daily status data of the client player. If the player is in a non-online state, the daily status data of the client player is not updated and reset.

7. A method for synchronizing the daily status of client and server players according to claim 6, characterized in that: The client temporary reset is specifically that after the client temporary reset is triggered, the client obtains the current time and compares whether the current time and the reset time node are on the same day. If they are not on the same day, the daily status data of the client player is updated and reset. If they are on the same day, the daily status data of the client player remains unchanged.

8. A method for synchronizing the daily status of players between a client and a server as claimed in claim 7, characterized in that: The regular reset of the server includes the following steps: S1. After the server receives the status synchronization request from the client, it obtains the current time and compares whether the current time and the reset time node are on the same day. If they are not on the same day, it updates the daily status data of the reset players and returns the updated data to the client. If they are on the same day, it returns the daily status data of the current server players to the client; S2. The client receives the return result from the server and determines whether the reset is successful. If the current daily status data of the client players is the same as the daily status data returned by the client, it is determined that the reset is successful. If the current daily status data of the client players is different from the daily status data returned by the client, it is determined that the reset fails and the client data is updated to the daily status data of the server players returned.

Citation Information

Patent Citations

  • P2P (Peer-to-Peer)-based online game synchronization method controlled by server

    CN101841563A

  • information synchronization method and system

    CN102625156A