A method for multi-point settlement and data synchronization of a game server

By setting up a unified data interface on the game server and client, and using configuration tables to manage settlement and synchronization interfaces, the problem of data confusion is solved, and efficient data synchronization and maintainable communication processes are achieved.

CN115695452BActive Publication Date: 2025-10-24XIAMEN WOOBEST INTERACTIVE NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211338967.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-28
Publication Date
2025-10-24
Estimated Expiration
2042-10-28

AI Technical Summary

Technical Problem

When the various functional modules of the game server perform data settlement and synchronization, data confusion is likely to occur, performance and scalability are poor, and the communication process is difficult to manage.

Method used

Unified data sending and receiving interfaces are set up on the server and client respectively, and the settlement and synchronization interfaces are managed through the configuration table to achieve multi-point settlement and data synchronization, and adopt a unified data packet transmission mechanism.

Benefits of technology

It improves server performance and data synchronization efficiency, avoids data confusion, and enhances code maintainability and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115695452B_ABST
    Figure CN115695452B_ABST
Patent Text Reader

Abstract

The application discloses a kind of game server multi-point settlement and data synchronization method, comprising the following steps: S1, the unified data sending interface and data receiving interface are respectively set in server and client;S2, when player successfully logs in server, read first configuration table to obtain the settlement time point of each function module of server;S3, whenever reaches settlement time point, automatically read second configuration table to obtain the settlement interface set that need to carry out settlement currently, and pass into corresponding data to carry out data settlement;S4, data sending interface packs and sends the data returned by each settlement interface to client;S5, data receiving interface carries out data synchronization according to second configuration table and calls corresponding synchronization interface.This application decouples the communication process and business processing logic in the existing data settlement and synchronization process, significantly improves the efficiency and performance of data synchronization, avoids the generation of data synchronization confusion, and has strong expansibility.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a game server multi-point settlement and data synchronization method. BACKGROUND

[0002] Periodic data settlement and synchronization between game servers and clients is often required. Generally, each functional module of the server listens to the settlement time point event, and each functional module independently processes the settlement operation and then independently initiates a communication request to the client to synchronize the data to the client. Each functional module of the client needs to define an interface for receiving server messages, and then process the synchronization data of the server. When using this method, each functional module of the server needs to independently initiate a communication request each time settlement is performed. When multiple functional modules simultaneously perform settlement and communication requests, the client data synchronization is prone to confusion, the overall data settlement and synchronization process is relatively chaotic, difficult to manage, and has poor performance and scalability. SUMMARY

[0003] To solve the above problems, the present application provides a game server multi-point settlement and data synchronization method.

[0004] The present application adopts the following technical solutions:

[0005] A game server multi-point settlement and data synchronization method, comprising the following steps:

[0006] S1, a unified data sending interface is set on the server, and each functional module of the server is respectively provided with a settlement interface; a unified data receiving interface is set on the client, and each functional module of the client is respectively provided with a synchronization processing interface;

[0007] S2, when a player successfully logs in to the server, a first configuration table is read to obtain the settlement time point of each functional module of the server;

[0008] S3, whenever the settlement time point is reached, a second configuration table is automatically read to obtain a settlement interface set that needs to be settled at present, and the corresponding data is transmitted into each settlement interface for data settlement;

[0009] S4, the data sending interface packs the data returned by each settlement interface into a synchronization data packet and sends it to the client;

[0010] S5, after the data receiving interface of the client receives the synchronization data packet, the corresponding synchronization interface is called according to the second configuration table to perform data synchronization.

[0011] Further, the first configuration table is used to configure the settlement time point of each functional module of the server.

[0012] Further, the second configuration table is used for configuring a settlement interface set corresponding to each settlement time point and needing data settlement, and indicating a mapping relationship between each function module ID of the server and each function module ID of the client.

[0013] Further, the data sending interface is used for packing data settled by each settlement interface of the function module of the server into a synchronization data packet and sending to the client.

[0014] Further, the data receiving interface is used for receiving the synchronization data packet of the server, unpacking and respectively transmitting to each corresponding function module of the client for data synchronization processing.

[0015] Further, the step S2 further comprises: according to the settlement time point and the current time point, starting a corresponding timer for settlement time countdown.

[0016] Further, each settlement interface is pre-set with interface parameters and return value types; and each synchronization interface is pre-set with interface parameters.

[0017] Further, in the step S4, the data returned by each settlement interface is a data combination, the data combination is composed of a corresponding function module ID and settled data, and the function module ID corresponds to the settlement interface one by one.

[0018] After the above technical solution is adopted, compared with the background art, the present application has the following advantages:

[0019] 1. The present application sets uniform data sending interfaces and data receiving interfaces on the server and the client respectively, which are used for uniform data sending and receiving, each settlement interface only needs to realize specific settlement logic, each synchronization interface only needs to realize specific synchronization logic, and the communication process is realized by the data sending interface and the data receiving interface, so as to decouple the communication process and the specific business processing logic.

[0020] 2. The present application adopts multi-point settlement, a settlement interface set of a settlement time point can be set through a configuration table, so as to flexibly configure the settlement time point and the settlement frequency of each function module, and all business settlements of the same settlement time point only need one communication to synchronize all settlement data to the client, which significantly improves the performance of the server and the efficiency of data synchronization, and avoids the generation of data synchronization confusion.

[0021] 3. The present application adopts the form of the configuration table to uniformly manage each settlement interface and synchronization interface, the interface information can be flexibly modified, added or deleted through the configuration table, the code maintainability is improved, and the expansibility is strong. BRIEF DESCRIPTION OF DRAWINGS

[0022] Figure 1 A method flowchart of the present application. DETAILED DESCRIPTION

[0023] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application and do not limit the present application.

[0024] Embodiment

[0025] As shown in the figure, a game server multi-point settlement and data synchronization method comprises the following steps: Figure 1

[0026] S1, a unified data sending interface is set on the server, and each functional module of the server is respectively provided with a settlement interface; a unified data receiving interface is set on the client, and each functional module of the client is respectively provided with a synchronization processing interface; the data sending interface is used to package the data returned by the settlement interfaces of each functional module of the server into a synchronization data packet and send it to the client; the data receiving interface is used to receive the synchronization data packet of the server, unpack it and respectively transmit it to each corresponding functional module of the client for data synchronization processing.

[0027] S2, when a player successfully logs in the server, a first configuration table for configuring the settlement time points of each functional module of the server is read to obtain the settlement time points of each functional module of the server, such as 12:00:00 or 23:59:59, etc., and then according to the settlement time points and the current time points, a corresponding timer is started for settlement time countdown.

[0028] S3, whenever the settlement time point is reached, the timer triggers the check logic to automatically read a second configuration table to obtain a settlement interface set that needs to be settled by the current server, traverse each settlement interface, and respectively transmit the corresponding specified type parameters into each settlement interface for data settlement; wherein the second configuration table is used to configure the settlement interface set that needs to be settled at each settlement time point, and indicate the mapping relationship between the server functional module ID and the client functional module ID.

[0029] S4, the data sending interface packages the data returned by each settlement interface into a synchronization data packet and sends it to the client; each settlement interface is pre-set with interface parameters and return value types; the data returned by each settlement interface is a data combination, which is composed of a corresponding functional module ID and settled data, and the functional module ID corresponds to the settlement interface one by one. Here, the data sending interface of the server packages the data combination returned by each settlement interface into a large data packet, which can be sent to the client at one time for data synchronization.​

[0030] S5, the data receiving interface of the client receives the synchronization data packet issued by the server, unpacks the synchronization data packet, and then finds the corresponding client function module ID according to the second configuration table, calls the synchronization interface of the corresponding client function module to perform data synchronization processing, wherein each synchronization interface is also pre-configured with interface parameters.

[0031] The embodiment realizes the hot-pluggable addition, deletion or modification of the function modules of the server and the client requiring the fixed-point settlement through the configuration table, provides unified fixed-point settlement and data synchronization process encapsulation, decouples the communication process and the business processing in the data settlement and synchronization process, so that each settlement interface only needs to realize the specific settlement logic and does not need to care about other details, and through the unified data sending interface and the data receiving interface, multiple business settlements only need to communicate once to synchronize all settlement data to the client, thereby improving the efficiency of data settlement and synchronization, improving the performance of the server and the maintainability of the code.

[0032] The above merely describes the preferred embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for multi-point settlement and data synchronization of a game server, characterized in that: The method comprises the following steps: S1, setting a unified data sending interface on a server, and each functional module of the server is provided with a settlement interface; setting a unified data receiving interface on a client, and each functional module of the client is provided with a synchronous processing interface; S2, when a player successfully logs in the server, reading a first configuration table to obtain the settlement time points of the functional modules of the server; the first configuration table is used to configure the settlement time points of the functional modules of the server; S3, whenever the settlement time points are reached, automatically reading a second configuration table to obtain a settlement interface set that needs to be settled at present, and transmitting corresponding data into each settlement interface for data settlement; the second configuration table is used to configure the settlement interface set that needs to be settled at each settlement time point, and indicate the mapping relationship between the server functional module ID and the client functional module ID; S4, the data sending interface packs the data returned by each settlement interface into a synchronous data packet and sends it to the client; S5, after the data receiving interface of the client receives the synchronous data packet, the corresponding synchronous interface is called for data synchronization according to the second configuration table.

2. The method for multi-point settlement and data synchronization of a game server according to claim 1, characterized in that: The data sending interface is used to pack the data settled by the settlement interfaces of the functional modules of the server into a synchronous data packet and send it to the client.

3. The method for multi-point settlement and data synchronization of a game server according to claim 2, characterized in that: The data receiving interface is used to receive the synchronous data packet of the server, unpack it and transmit it to each corresponding functional module of the client for data synchronization processing.

4. The method for multi-point settlement and data synchronization of a game server according to claim 3, characterized in that: Step S2 further comprises: according to the settlement time point and the current time point, starting a corresponding timer for settlement time countdown.

5. The method for multi-point settlement and data synchronization of a game server according to claim 4, characterized in that: Each settlement interface is provided with interface parameters and return value types in advance; each synchronous interface is provided with interface parameters in advance.

6. The method for multi-point settlement and data synchronization of a game server according to claim 5, characterized in that: In step S4, the data returned by each settlement interface is a data combination, which is composed of a corresponding functional module ID and settled data, and the functional module ID corresponds to the settlement interface one by one.

Citation Information

Patent Citations

  • Network game server side

    CN102789541A