Game data processing method and device, storage medium and computer device

CN117695664BActive Publication Date: 2026-11-03BEIJING FIRST WAVE INTERACTIVE TECH LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211593819.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-13
Publication Date
2026-11-03
Estimated Expiration
2042-12-13

AI Technical Summary

Technical Problem

Mobile devices have low computing power, making it difficult to support complex game state machines, resulting in poor game performance. Furthermore, when the client and server states are inconsistent, complex troubleshooting and repair are required, increasing the difficulty and cost of problem finding.

Method used

The game's combat calculations are transferred from the client to the server. The client only executes the results calculated by the server and displays the combat performance through command data packets. Command encoding and cache pools are used to manage lost data, and the command mapping table is dynamically updated to ensure data integrity.

Benefits of technology

It reduces the computational burden on the client, avoids display errors, simplifies troubleshooting state machine issues, and improves game stability and player experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117695664B_ABST
    Figure CN117695664B_ABST
Patent Text Reader

Abstract

The application discloses a game data processing method and device, a storage medium and a computer device. The method comprises the following steps: based on a received game battle instruction, sending game battle data to a game server, so as to calculate battle performance data corresponding to the game battle data through the game server, and sending a command data packet to a game client according to the battle performance data; receiving the command data packet, and analyzing the command data packet to obtain at least one battle performance command; obtaining an execution method corresponding to the battle performance command, and executing the battle performance command according to the execution method. In the application, the client is used as an execution unit and does not participate in battle calculation, so that the client calculation cost is reduced, the requirement on the performance of the client is lowered, and the situation that the picture display is wrong due to the fact that the state calculation of the client and the server is inconsistent and the state of the client needs to be corrected is avoided, and the game experience of a player is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a game data processing method and apparatus, storage medium, and computer equipment. Background Technology

[0002] Existing game systems maintain a complex data state machine on both the client and server sides. During gameplay, the client directly calculates combat commands, quickly displays combat effects based on the calculation results, and periodically communicates with the server via the network. The server's state machine calculates data and periodically verifies it against the client's data to ensure consistency between the client and server states. However, with the continuous development of mobile games, more and more players are choosing to play on smartphones and other mobile devices. Mobile devices generally have lower performance than computers, and many mobile devices cannot support the computational power of complex state machines. Reducing the complexity of the state machine, on the other hand, can negatively impact the game experience. Summary of the Invention

[0003] In view of this, this application provides a game data processing method and apparatus, storage medium, and computer equipment. The client acts as an execution mechanism and does not participate in combat calculations, which reduces client computing overhead, lowers the performance requirements of the client, and avoids screen display errors caused by inconsistent client and server state calculations that require correction of the client state, thus helping to improve the player's gaming experience.

[0004] According to one aspect of this application, a game data processing method is provided, applied to a game client, the method comprising:

[0005] Based on the received game battle commands, game battle data is sent to the game server, so that the game server can calculate the battle performance data corresponding to the game battle data, and send command data packets to the game client based on the battle performance data;

[0006] Receive the command data packet and parse the command data packet to obtain at least one combat performance command;

[0007] Obtain the execution method corresponding to the combat performance command, and execute the combat performance command according to the execution method.

[0008] Optionally, the command data packet carries a first command encoding; parsing the command data packet to obtain at least one combat performance command includes:

[0009] Based on the first command code and the second command code corresponding to the received historical command data packets, verify whether there is any command data packet loss;

[0010] When there is no command packet loss, the command packet is parsed to obtain at least one combat performance command;

[0011] When command packet loss occurs, a request to retrieve the lost command carrying the second command encoding is sent to the game server, so that the game server sends a lost command data packet carrying the third command encoding to the game client based on the second command encoding; and,

[0012] Based on the third command code and the second command code corresponding to the received packet loss command data packet, determine whether to parse the packet loss command data packet.

[0013] Optionally, the game server sends a packet loss command data packet carrying a third command code to the game client based on the second command code, including:

[0014] The game server determines at least one lost target command data packet based on the second command encoding, and when the number of the lost target command data packets is less than a preset first number, it sends the lost target command data packets one by one; and...

[0015] When the number of target command data packets is greater than or equal to a preset first number, calculate the combat result performance data corresponding to multiple target command data packets, generate the third command code corresponding to the combat result performance data based on the second command code, and send the packet loss command data packet to the game client according to the third command code and the combat result performance data.

[0016] Optionally, the method further includes:

[0017] The received command data packet and the lost command data packet are placed into the cache pool as command data packets to be executed;

[0018] Accordingly, parsing the command data packet to obtain at least one combat performance command includes:

[0019] If the number of command data packets to be executed in the cache pool is less than the preset second number, the command data packets to be executed are retrieved one by one in the order in which they were put into the cache pool, and the retrieved command data packets to be executed are parsed to obtain at least one combat performance command.

[0020] If the number of command data packets to be executed in the cache pool is equal to the preset second number, then the preset third number of commands to be executed that are ranked first in the cache pool are taken as commands to be synchronized, the combat performance result to be synchronized corresponding to the command to be synchronized is determined, and the combat performance result to be synchronized is displayed.

[0021] Optionally, sending game battle data to the game server based on the received game battle commands includes:

[0022] A first instruction number corresponding to the game battle instruction is generated, and game battle data is sent to the game server based on the game battle instruction and the first instruction number; wherein, the game server verifies whether there is game battle data packet loss based on the first instruction number carried in the game battle data and the second instruction number corresponding to the received historical game battle data, and if game battle data packet loss is verified, it sends a request to the game client to retrieve the packet loss data carrying the second instruction number, and if no battle data packet loss is verified, it calculates the battle performance data corresponding to the game battle data;

[0023] Accordingly, the method further includes:

[0024] When the packet loss data acquisition request is received, the game server is sent packet loss game battle data based on the second instruction number carried in the packet loss data acquisition request.

[0025] Optionally, the method for obtaining the execution method corresponding to the combat performance command includes:

[0026] The execution method corresponding to the combat performance command is obtained from the first command mapping table, wherein the first command mapping table is dynamically updated based on a new version of the command mapping table periodically retrieved by the game client or issued by the game server; or...

[0027] Based on the command mapping table identifier indicated by the command data packet, query the second command mapping table corresponding to the command mapping table identifier, and obtain the execution method corresponding to the combat performance command from the second command mapping table.

[0028] Optionally, executing the combat performance command according to the execution method includes:

[0029] In a preset game combat system, the target combat system corresponding to the combat performance command is invoked, and the combat performance command is executed through the target combat system according to the execution method. The game combat system includes at least one of a character system, an animation system, a special effects system, a sound effects system, and a scene system.

[0030] According to another aspect of this application, a game data processing apparatus is provided, the apparatus comprising:

[0031] The sending module is used to send game battle data to the game server based on the received game battle instructions, so that the game server can calculate the battle performance data corresponding to the game battle data, and send command data packets to the game client based on the battle performance data;

[0032] A receiving module is used to receive the command data packet and parse the command data packet to obtain at least one combat performance command;

[0033] An execution module is used to obtain the execution method corresponding to the combat performance command and execute the combat performance command according to the execution method.

[0034] Optionally, the command data packet carries a first command encoding; the receiving module is used to:

[0035] Based on the first command code and the second command code corresponding to the received historical command data packets, verify whether there is any command data packet loss;

[0036] When there is no command packet loss, the command packet is parsed to obtain at least one combat performance command;

[0037] When command packet loss occurs, a request to retrieve the lost command carrying the second command encoding is sent to the game server, so that the game server sends a lost command data packet carrying the third command encoding to the game client based on the second command encoding; and,

[0038] Based on the third command code and the second command code corresponding to the received packet loss command data packet, determine whether to parse the packet loss command data packet.

[0039] Optionally, the game server determines at least one lost target command data packet based on the second command encoding, and when the number of the target command data packets is less than a preset first number, sends the target command data packets one by one as the lost data packets; and,

[0040] When the number of target command data packets is greater than or equal to a preset first number, calculate the combat result performance data corresponding to multiple target command data packets, generate the third command code corresponding to the combat result performance data based on the second command code, and send the packet loss command data packet to the game client according to the third command code and the combat result performance data.

[0041] Optionally, the device further includes a cache module for:

[0042] The received command data packet and the lost command data packet are placed into the cache pool as command data packets to be executed;

[0043] Accordingly, the receiving module is used for:

[0044] If the number of command data packets to be executed in the cache pool is less than the preset second number, the command data packets to be executed are retrieved one by one in the order in which they were put into the cache pool, and the retrieved command data packets to be executed are parsed to obtain at least one combat performance command.

[0045] If the number of command data packets to be executed in the cache pool is equal to the preset second number, then the preset third number of commands to be executed that are ranked first in the cache pool are taken as commands to be synchronized, the combat performance result to be synchronized corresponding to the command to be synchronized is determined, and the combat performance result to be synchronized is displayed.

[0046] Optionally, the sending module is used to:

[0047] A first instruction number corresponding to the game battle instruction is generated, and game battle data is sent to the game server based on the game battle instruction and the first instruction number; wherein, the game server verifies whether there is game battle data packet loss based on the first instruction number carried in the game battle data and the second instruction number corresponding to the received historical game battle data, and if game battle data packet loss is verified, it sends a request to the game client to retrieve the packet loss data carrying the second instruction number, and if no battle data packet loss is verified, it calculates the battle performance data corresponding to the game battle data;

[0048] Accordingly, the sending module is also used for:

[0049] When the packet loss data acquisition request is received, the game server is sent packet loss game battle data based on the second instruction number carried in the packet loss data acquisition request.

[0050] Optionally, the execution module is used to:

[0051] The execution method corresponding to the combat performance command is obtained from the first command mapping table, wherein the first command mapping table is dynamically updated based on a new version of the command mapping table periodically retrieved by the game client or issued by the game server; or...

[0052] Based on the command mapping table identifier indicated by the command data packet, query the second command mapping table corresponding to the command mapping table identifier, and obtain the execution method corresponding to the combat performance command from the second command mapping table.

[0053] Optionally, the execution module is used to:

[0054] In a preset game combat system, the target combat system corresponding to the combat performance command is invoked, and the combat performance command is executed through the target combat system according to the execution method. The game combat system includes at least one of a character system, an animation system, a special effects system, a sound effects system, and a scene system.

[0055] According to another aspect of this application, a storage medium is provided that stores a computer program thereon, which, when executed by a processor, implements the above-described game data processing method.

[0056] According to another aspect of this application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the program to implement the above-described game data processing method.

[0057] By employing the above technical solutions, this application provides a game data processing method, apparatus, storage medium, and computer device. Based on user-inputted game combat commands, it sends game combat data to a game server. The game server calculates the combat performance corresponding to the game combat command and generates a corresponding command data packet, which is returned to the game client. The game client executes the combat performance commands in the command data packet to display the combat performance effect. The client in this application, as the execution mechanism, does not need to perform combat calculations, reducing client computational overhead and lowering performance requirements. This avoids situations where inconsistencies between the client and server state machine calculation results necessitate state corrections, leading to incorrect game visuals for players and improving the player's gaming experience. Furthermore, unlike existing methods that directly calculate game combat commands on the game client, display combat performance effects based on the calculation results, and periodically verify the results against the game server's calculations, this embodiment utilizes the game server to perform the specific calculation process. If a logical state problem occurs, only the game server needs to be checked. This solves the problem of existing methods requiring troubleshooting of both the client and server state machines when verifying inconsistencies between client and server states, which is difficult and costly for client-side problem repair. This reduces the difficulty of state machine problem troubleshooting, improves troubleshooting efficiency, and enhances game stability and correctness.

[0058] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0059] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0060] Figure 1 A flowchart illustrating a game data processing method provided in an embodiment of this application is shown;

[0061] Figure 2 A flowchart illustrating another game data processing method provided in an embodiment of this application is shown;

[0062] Figure 3 This illustration shows a schematic diagram of combat performance based on different combat systems in another game data processing method provided in this application embodiment;

[0063] Figure 4 This illustration shows a schematic diagram of the structure of a game data processing device provided in an embodiment of this application;

[0064] Figure 5 A schematic diagram of the device structure of a computer device provided in an embodiment of this application is shown. Detailed Implementation

[0065] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.

[0066] This embodiment provides a game data processing method, applied to a game client, such as... Figure 1 As shown, the method includes:

[0067] Step 101: Based on the received game battle instructions, send game battle data to the game server, so that the game server can calculate the battle performance data corresponding to the game battle data, and send command data packets to the game client according to the battle performance data.

[0068] The technical solution of this application embodiment can be applied to a game client (hereinafter referred to as the client) for processing game data. Unlike the traditional method of processing game data and displaying game effects on the client, the game client of this application embodiment acts as an execution unit and does not participate in the calculation of game battle data. Instead, it sends the game battle data to the game server to utilize the processing capabilities of the game server to process the game data and return the corresponding processing results. The game client then uses the returned processing results to display game effects.

[0069] Specifically, in this step, players input game combat commands through the client. The client encapsulates the received commands into game combat data and sends it to the game server. The encapsulation process may include data format conversion according to the protocol between the player and the game server, adding message headers, and other operations. The game server receives the encapsulated game combat data from the game client, decapsulates it, and then uses the decapsulated data to perform calculations to obtain combat performance data. For example, if the game combat data is "Release area-of-effect skill A," the game server calculates the corresponding combat performance data, encapsulates it into a command data packet, and returns it to the game client.

[0070] Step 102: Receive the command data packet and parse the command data packet to obtain at least one combat performance command.

[0071] The game client extracts combat performance data, such as actions, effects, and sound effects, into combinable commands, also known as combat performance commands. In this step, the game client receives command data packets sent by the game server and parses them to obtain the combat performance commands encapsulated by the game server. Each command data packet contains at least one combat performance command, which instructs the game client to perform a corresponding combat action. These actions can be presented through graphics, images, music, etc., such as instructing the game client to display the character's actions when unleashing a multi-target attack (A) skill A on the screen, or to play the sound of the character unleashing A multi-target attack skill A using a sound card. Different combat performance commands can be executed sequentially or in parallel; for example, displaying the character's actions when unleashing A multi-target attack skill A can be done while simultaneously playing the sound of the same skill.

[0072] Step 103: Obtain the execution method corresponding to the combat performance command, and execute the combat performance command according to the execution method.

[0073] In this step, the game client executes combat performance commands to achieve the corresponding combat actions. Specifically, each combat performance command has a corresponding execution method. Combat performance commands and their corresponding execution methods can be stored in the game client through database tables or key-value pairs. After determining a combat performance command, the game client searches for the execution method corresponding to each command and runs that method to achieve the purpose of executing the command. The execution method can include one or more execution functions. For example, to display the action of a game character releasing a group attack skill A on the screen, the execution method for that combat performance command could include four execution functions: holding a sword with both hands, jumping, spinning, and landing. When running this method, these four execution functions are executed sequentially.

[0074] The technical solution of this embodiment, based on the user-inputted game combat commands, sends game combat data to the game server. The game server calculates the combat performance corresponding to the game combat commands and generates a corresponding command data packet, which is returned to the game client. The game client executes the combat performance commands in the command data packet to display the combat performance effects. The client in this application, as the execution unit, does not need to perform combat calculations, reducing client computational overhead, lowering client performance requirements, and avoiding situations where inconsistencies between the client and server state machine calculation results necessitate state corrections, which could lead to incorrect game visuals for the player, thus improving the player's gaming experience. Furthermore, unlike existing methods that directly calculate game combat commands on the game client, display combat performance effects based on the calculation results, and periodically verify the calculation results with the game server, this embodiment utilizes the game server to perform the specific calculation process. If a logical state problem occurs, only the game server needs to be checked. This solves the problem of existing methods requiring troubleshooting of both the client and server state machines when verifying inconsistencies between the client and server states, which is difficult and costly for client-side problem repair. This reduces the difficulty of state machine problem troubleshooting, improves troubleshooting efficiency, and enhances game stability and correctness.

[0075] Furthermore, as a refinement and extension of the specific implementation methods of the above embodiments, and to fully illustrate the specific implementation process of this embodiment, another game data processing method is provided, such as... Figure 2 As shown, the method includes:

[0076] Step 201: Based on the received game battle command, generate a first command number corresponding to the game battle command, and send game battle data to the game server based on the game battle command and the first command number; wherein, the game server verifies whether there is game battle data packet loss based on the first command number carried in the game battle data and the second command number corresponding to the received historical game battle data, if game battle data packet loss is verified, sends a request to the game client to retrieve the packet loss data carrying the second command number, and if no battle data packet loss is verified, calculates the battle performance data corresponding to the game battle data, and sends a command data packet to the game client based on the battle performance data.

[0077] Step 202: When the packet loss data acquisition request is received, the packet loss game battle data is sent to the game server based on the second instruction number carried in the packet loss data acquisition request.

[0078] In this embodiment, during the process of the game client sending game battle data to the game server, there is a possibility of packet loss due to network anomalies or other reasons. Based on this, the game client packages the first instruction number used for verification into the game battle data and sends it to the game server together. The game server verifies whether packet loss has occurred based on the first instruction number. If no packet loss occurs, it directly calculates the battle performance data corresponding to the game battle data and generates the corresponding command data packet, the method of which is the same as in the previous embodiment. If packet loss occurs, it re-requests to obtain the lost data packet.

[0079] Specifically, the game client generates a first command number corresponding to each game combat command based on the order in which the user inputs the commands. For example, if the user first inputs a "step forward" command and then a "turn left" command, the command number corresponding to the "step forward" command is 001, and the command number corresponding to the "turn left" command is 002. After generating the first command number, the game client encapsulates the game combat commands and their corresponding first command numbers into game combat data and sends it to the game server. The game server searches for the second command number in the historical game combat data it has received and verifies whether there has been packet loss based on whether the first and second command numbers are consecutive. For example, if the historical game combat data received by the game server contains a second command number of 001, while the combat data sent by the game client contains a first command number of 003, since numbers 001 and 003 are not consecutive, it can be determined that there has been packet loss, and the game combat data corresponding to the command number 002 has been lost.

[0080] Based on this, the game server re-requests the lost data. Specifically, the game server sends a lost data retrieval request carrying a second command number to the game client. The game client parses the request to obtain the second command number, determines the lost command number based on the second command number, and searches locally for the game combat command corresponding to the lost command number. The game combat data corresponding to the found game combat command, along with the lost command number, are packaged together and encapsulated into lost data packets. This encapsulated lost data packets are then sent to the game server to complete the resend operation of the lost data packets. For example, if the lost data retrieval request sent by the game server to the game client carries a second command number with the number 001, the game client, based on the previously sent first command number 003 and the received second command number 001, determines that command number 002 is lost. At this point, the game client can search for the game combat command corresponding to command number 002 locally. Based on the found game combat command and command number 002, it can encapsulate the lost packet game combat data and send the encapsulated lost packet game combat data to the game server. In addition, the game client can also search for command number 002 and all command numbers sorted after 002 locally, and encapsulate each found command number and its corresponding game combat command into lost packet game combat data and send it to the game server.

[0081] In this embodiment, the game client packages the command number into the game combat data and verifies the command number on the game server to check for packet loss. If packet loss occurs, the lost game combat data is re-requested based on the command number. This effectively avoids the game combat commands entered by the player from being ineffective due to abnormal data transmission, ensuring the stability of the entire game operation and improving the game experience.

[0082] Optionally, in this embodiment, the command data packet carries a first command code, which can be used to verify whether there is packet loss in the command data packet sent by the game server to the game client; specifically, the verification method includes:

[0083] Step 203: Receive the command data packet and verify whether there is command data packet loss based on the first command code and the second command code corresponding to the received historical command data packets.

[0084] Step 204: Is there any command data packet loss? If no, proceed to step 205; if yes, proceed to step 206.

[0085] Step 205: Parse the command data packet to obtain at least one combat performance command, and then proceed to step 210.

[0086] Step 206: Send a packet loss command acquisition request carrying the second command code to the game server, so that the game server sends a packet loss command data packet carrying the third command code to the game client based on the second command code; and determine whether to parse the packet loss command data packet based on the third command code corresponding to the received packet loss command data packet and the second command code.

[0087] In this embodiment, during the process of the game server sending command data packets to the game client, there is a possibility of packet loss due to network anomalies or other reasons. Based on this, the game server packages the first command code used for verification into the command data packet and sends it to the game client together. The game client verifies whether packet loss has occurred based on the first command code. If no packet loss occurs, the game client directly parses the command data packet to obtain the combat performance command and then executes the combat performance command according to the corresponding execution method. If packet loss occurs, the game client re-requests to obtain the lost command data packet.

[0088] Specifically, the game server generates a first command code corresponding to each command data packet based on the order in which they are sent. For example, if the game server first sends a command data packet to control the game character to move forward, and then sends a command data packet to control the game character to turn left, the command code corresponding to the forward command data packet is 101, preceding the command code 002 corresponding to the left turn command data packet. After generating the first command code, the game server encapsulates at least one combat performance command and the first command code into a command data packet and sends it to the game client. The game client searches for the second command code in the received historical command data packets and verifies whether there has been packet loss based on whether the first and second command codes are consecutive. For example, if the historical command data packets received by the game client contain a second command code numbered 101, and the command data packet sent by the game server at this time contains a first command code numbered 103, since numbers 101 and 103 are not consecutive, it can be determined that there has been packet loss, and the command data packet corresponding to the command code numbered 102 has been lost.

[0089] Based on this, the game client re-requests the lost command data packet. Specifically, the game client sends a lost command retrieval request carrying the second command code to the game server. The game server parses the request to obtain the second command code, determines the lost command code based on the second command code, and searches locally on the game server for the command data packet corresponding to the lost command code. The found command data packet and the lost command code are then packaged together to form a lost command data packet, which is sent to the game client to complete the retransmission of the lost command data. For example, if the lost command retrieval request sent by the game client to the game server carries the second command code numbered 101, the game server, based on the previously sent first command code numbered 003 and the received second command code numbered 101, determines that the command code numbered 102 is lost. Therefore, the game server searches locally for the command data packet corresponding to command code 102, packages the found command data packet and the command code numbered 002 together to form a lost command data packet, and sends the packaged lost command data packet to the game client.

[0090] In this embodiment, the game server packages the command code into a command data packet and verifies the command code on the game client to check for packet loss. If packet loss occurs, the lost command data packet is re-requested based on the command code. This effectively avoids the game combat commands entered by the player from being ineffective due to abnormal data transmission, ensuring the stability of the entire game operation and improving the game experience.

[0091] In this embodiment of the application, the game server can adopt different data retransmission methods according to the number of lost command data packets. Optionally, the game server sends lost command data packets carrying a third command code to the game client based on the second command code, including:

[0092] The game server determines at least one target command data packet that is lost based on the second command encoding. When the number of target command data packets is less than a preset first number, the target command data packets are sent one by one as the lost data packets. When the number of target command data packets is greater than or equal to the preset first number, the server calculates combat result performance data corresponding to multiple target command data packets, generates the third command encoding corresponding to the combat result performance data based on the second command encoding, and sends the lost command data packets to the game client according to the third command encoding and the combat result performance data.

[0093] In this embodiment, if the number of lost command data packets is small, specifically less than a preset first number, the game server directly sends each of the lost command data packets as a target command data packet to the game client. The game client can parse the target command data packets and implement corresponding combat actions based on the parsed combat performance commands. For example, if there are two target command data packets, the game server sends these two target command data packets to the game client sequentially. The first target command data packet controls the game character to move forward one step, and the second target command data packet controls the game character to move forward two steps. The game client can then parse these two target command data packets and control the game character to sequentially perform the actions of moving forward one step and moving forward two steps.

[0094] If too many command data packets are lost, sending a large number of target command data packets to the game client by the game server may cause data transmission or data parsing congestion. Furthermore, executing multiple combat performance commands in a short period can also cause game screen jumps. Therefore, the game server directly determines the combat result performance data generated by the superposition of multiple target command data packets, generates a third command code corresponding to this combat result performance data, encapsulates the lost command data packets based on the third command code and the combat result performance data, and sends them to the game client. Among the multiple target command data packets, for displacement-type combat performance commands, the displacement result can be directly calculated. Since actions, effects, and sound effects are all time-stream resources, the result at a specified time point can be calculated for these types of combat performance commands based on time.

[0095] For example, there are 20 target command data packets, each controlling the game character to move forward one step. Due to the large number of target command data packets, the combat result data generated by the superposition of these 20 target command data packets is directly determined, specifically controlling the game character to move forward 20 steps. A third command code corresponding to controlling the game character to move forward 20 steps is generated, and based on this combat result data of controlling the game character to move forward 20 steps and the third command code, a packet loss command data packet is encapsulated and sent to the game client. After receiving the packet loss command data packet, the game client parses the packet loss command data packet to obtain the combat result data, and can then display the corresponding combat result, that is, directly controlling the game character to move forward 20 steps.

[0096] The preset first quantity can be set based on historical experience or the game client's configuration information. For example, if the game client has a higher chip version number and more memory, a slightly larger preset first quantity can be set, and vice versa.

[0097] In this embodiment, the game server adopts different data retransmission methods based on the number of lost command data packets. When there are too many target command data packets, the game server directly sends the combat result performance data generated by the superposition of multiple target command data packets to the game client. As a result, the game client does not need to execute the combat performance commands in the target command data packets one by one, avoiding lag or skipping and improving the smoothness of the game.

[0098] In this embodiment of the application, a cache pool is provided to cache the command data packets and the lost command data packets sent by the server. Optionally, it further includes: placing the received command data packets and the lost command data packets into the cache pool as command data packets to be executed; if the number of command data packets to be executed in the cache pool is less than a preset second number, then the command data packets to be executed are retrieved one by one in the order they were placed into the cache pool, and the retrieved command data packets to be executed are parsed to obtain at least one combat performance command; if the number of command data packets to be executed in the cache pool is equal to the preset second number, then the preset third number of command packets to be executed that are ranked first in the cache pool are retrieved as commands to be synchronized, the combat performance result to be synchronized corresponding to the command to be synchronized is determined, and the combat performance result to be synchronized is displayed.

[0099] In this embodiment, the game client sets up a cache pool and places received command data packets and lost command data packets as pending command data packets into the cache pool, where they await execution. The specific execution method can be determined based on the number of pending command data packets in the cache pool.

[0100] If the number of command data packets to be executed is small, specifically less than the preset second number, the game client retrieves and parses the command data packets one by one in a first-in, first-out (FIFO) order, and then executes the combat performance commands within each data packet. For example, if there are two command data packets to be executed, the first target command data packet controls the game character to move forward one step, and the second target command data packet controls the game character to move forward two steps, the game client can retrieve and parse these two target command data packets sequentially, controlling the game character to perform the actions of moving forward one step and moving forward two steps in turn.

[0101] If the number of command data packets to be executed is too large, the game client executing multiple combat performance commands in a short period of time will cause the game screen to jump. Therefore, the game client extracts the top three preset command packets in a first-in-first-out (FIFO) order as synchronization commands, directly determining and displaying the synchronization result of the combined combat performance of multiple commands. For example, if there are 50 command packets to be executed, the first 20 are extracted in FIFO order as synchronization commands. Each synchronization command controls the game character to move forward one step, directly determining the synchronization result of these 20 commands, specifically controlling the game character to move 20 steps. The game client no longer controls the game character to move forward step by step, but directly displays the synchronization result, that is, directly controls the game character to move forward 20 steps.

[0102] Specifically, a second preset quantity and a third preset quantity can be set in the game client. If the second preset quantity is set to be equal to the capacity of the cache pool, a forced threshold can be set to avoid the cache pool from becoming full or even overflowing. When the number of command data packets to be executed in the cache pool reaches the forced threshold, a forced synchronization behavior is triggered, forcibly extracting the first preset third preset quantity of commands to be executed from the cache pool to avoid user perception.

[0103] In this embodiment, the game client sets up a cache pool and adopts different execution methods according to the number of commands to be executed in the cache pool. When there are too many commands to be executed, multiple commands to be executed are directly extracted and the combat performance results generated by their superposition are displayed. Thus, the game client does not need to execute the commands to be executed one by one, avoiding lag or skipping, and improving the smoothness of the game.

[0104] Step 207: Obtain the execution method corresponding to the combat performance command, and execute the combat performance command according to the execution method.

[0105] In this embodiment of the application, the client obtains the execution method corresponding to the combat performance command based on the command mapping table. Optionally, in step 207, obtaining the execution method corresponding to the combat performance command includes:

[0106] Step 207-1: Obtain the execution method corresponding to the combat performance command from the first command mapping table, wherein the first command mapping table is dynamically updated based on the periodic fetching by the game client or the new version of the command mapping table issued by the game server; or, based on the command mapping table identifier indicated by the command data packet, query the second command mapping table corresponding to the command mapping table identifier, and obtain the execution method corresponding to the combat performance command from the second command mapping table.

[0107] In this embodiment, the game client locally stores a command mapping table, which stores different combat performance commands and their corresponding execution methods. When executing a combat performance command, the client can look up the execution method corresponding to the combat performance command according to the command mapping table, and execute the combat performance command according to the execution method.

[0108] The game client can store a first command mapping table locally. The game client periodically pulls new versions from the game server, or the game server periodically pushes new versions to the game client. The game client dynamically updates the first command mapping table based on the new version to prevent the first command mapping table on the client's local machine from being cracked or tampered with.

[0109] In addition, the game client can store multiple different command mapping tables locally. Before the game server sends a command data packet to the game client, it packages the command mapping table identifier into the command data packet. Thus, the game client can look up the second command mapping table corresponding to the identifier in multiple different command mapping tables based on the command mapping table identifier in the command data packet, and obtain the execution method from the second command mapping table.

[0110] In this application embodiment, various game combat systems are provided to achieve combat performance. Optionally, in step 207, the combat performance command is executed according to the execution method, including:

[0111] Step 207-2: In the preset game battle system, call the target battle system corresponding to the battle performance command, and execute the battle performance command through the target battle system according to the execution method. The game battle system includes at least one of the character system, animation system, special effects system, sound effects system, and scene system.

[0112] In this embodiment, multiple different game combat systems are provided, each with different target objects, such as characters or scenes. Each combat performance command corresponds to one or more target combat systems, and the superposition of multiple target combat systems achieves the final combat performance. In a specific embodiment, such as... Figure 3As shown, the game server calculates the battle result using its local battle state machine, encapsulates the result into a command data packet according to the agreed battle protocol, and sends it to the game client. The game client parses the command data packet according to the agreed battle protocol to obtain battle performance commands (as shown in the attached diagram: Generate Command 1, Generate Command 2, ..., Generate Command N). Combat performance command 1 corresponds to the character system, animation system, and sound effects system. The character system implements the action of the game character when using skill A, and the animation and sound effects systems respectively implement the animation and sound of the game character. Combat performance command 2 corresponds to the special effects system and sound effects system, implementing the special effects and sound when skill A is triggered. Combat performance command N corresponds to the sound effects system and scene system, implementing scene transitions through the scene system and simultaneously changing the background sound through the sound effects system. Each battle performance system calls one or more corresponding target battle systems, and executes the battle performance command through the called target battle system according to the corresponding execution method. Multiple battle performance commands are superimposed to obtain the final presentation result. Specifically, the rendering system can render the character, animation, special effects, and scene, and the audio system can output the sound effects.

[0113] This embodiment verifies the data transmission process using command numbers and instruction codes, and then retransmits lost data in the event of packet loss to ensure accurate execution of game combat commands. Furthermore, based on the number of target command data packets or commands to be executed, it determines whether to merge multiple commands for execution, directly displaying the result of the combined commands. This avoids screen skipping or game lag caused by executing multiple commands in a short period, improving game smoothness and stability. In addition, since the game client's logic interfaces are all exposed in the form of commands, the interfaces are clearer and easier to update and maintain.

[0114] Furthermore, as Figure 1 To specifically implement the method, this application provides a game data processing device, such as... Figure 4 As shown, the device includes a transmitting module, a receiving module, and an execution module.

[0115] The sending module is used to send game battle data to the game server based on the received game battle instructions, so that the game server can calculate the battle performance data corresponding to the game battle data, and send command data packets to the game client based on the battle performance data;

[0116] A receiving module is used to receive the command data packet and parse the command data packet to obtain at least one combat performance command;

[0117] An execution module is used to obtain the execution method corresponding to the combat performance command and execute the combat performance command according to the execution method.

[0118] In specific application scenarios, optionally, the command data packet carries a first command encoding; the receiving module is used to:

[0119] Based on the first command code and the second command code corresponding to the received historical command data packets, verify whether there is any command data packet loss;

[0120] When there is no command packet loss, the command packet is parsed to obtain at least one combat performance command;

[0121] When command packet loss occurs, a request to retrieve the lost command carrying the second command encoding is sent to the game server, so that the game server sends a lost command data packet carrying the third command encoding to the game client based on the second command encoding; and,

[0122] Based on the third command code and the second command code corresponding to the received packet loss command data packet, determine whether to parse the packet loss command data packet.

[0123] In specific application scenarios, optionally, the game server determines at least one lost target command data packet based on the second command encoding, and when the number of the target command data packets is less than a preset first number, sends the target command data packets one by one as the lost data packets; and...

[0124] When the number of target command data packets is greater than or equal to a preset first number, calculate the combat result performance data corresponding to multiple target command data packets, generate the third command code corresponding to the combat result performance data based on the second command code, and send the packet loss command data packet to the game client according to the third command code and the combat result performance data.

[0125] In specific application scenarios, the device may optionally further include a cache module, used for:

[0126] The received command data packet and the lost command data packet are placed into the cache pool as command data packets to be executed;

[0127] Accordingly, the receiving module is used for:

[0128] If the number of command data packets to be executed in the cache pool is less than the preset second number, the command data packets to be executed are retrieved one by one in the order in which they were put into the cache pool, and the retrieved command data packets to be executed are parsed to obtain at least one combat performance command.

[0129] If the number of command data packets to be executed in the cache pool is equal to the preset second number, then the preset third number of commands to be executed that are ranked first in the cache pool are taken as commands to be synchronized, the combat performance result to be synchronized corresponding to the command to be synchronized is determined, and the combat performance result to be synchronized is displayed.

[0130] In specific application scenarios, optionally, the sending module is used for:

[0131] A first instruction number corresponding to the game battle instruction is generated, and game battle data is sent to the game server based on the game battle instruction and the first instruction number; wherein, the game server verifies whether there is game battle data packet loss based on the first instruction number carried in the game battle data and the second instruction number corresponding to the received historical game battle data, and if game battle data packet loss is verified, it sends a request to the game client to retrieve the packet loss data carrying the second instruction number, and if no battle data packet loss is verified, it calculates the battle performance data corresponding to the game battle data;

[0132] Accordingly, the sending module is also used for:

[0133] When the packet loss data acquisition request is received, the game server is sent packet loss game battle data based on the second instruction number carried in the packet loss data acquisition request.

[0134] In specific application scenarios, optionally, the execution module is used for:

[0135] The execution method corresponding to the combat performance command is obtained from the first command mapping table, wherein the first command mapping table is dynamically updated based on a new version of the command mapping table periodically retrieved by the game client or issued by the game server; or...

[0136] Based on the command mapping table identifier indicated by the command data packet, query the second command mapping table corresponding to the command mapping table identifier, and obtain the execution method corresponding to the combat performance command from the second command mapping table.

[0137] In specific application scenarios, optionally, the execution module is used for:

[0138] In a preset game combat system, the target combat system corresponding to the combat performance command is invoked, and the combat performance command is executed through the target combat system according to the execution method. The game combat system includes at least one of a character system, an animation system, a special effects system, a sound effects system, and a scene system.

[0139] It should be noted that other corresponding descriptions of the functional units involved in the game data processing device provided in this application embodiment can be found by referring to... Figures 1 to 3 The corresponding descriptions in the method will not be repeated here.

[0140] This application also provides a computer device, which may specifically be a personal computer, a server, a network device, etc. Figure 5 As shown, the computer device includes a bus, a processor, memory, and a communication interface, and may also include an input / output interface and a display device. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores location information. The network interface allows communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps in the various method embodiments.

[0141] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0142] In one embodiment, a computer-readable storage medium is provided, which may be non-volatile or volatile, having stored thereon a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0143] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0144] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0145] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0146] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0147] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A game data processing method, characterized in that, Applied to a game client, the method includes: Based on the received game battle instructions, game battle data is sent to the game server to calculate the battle performance data corresponding to the game battle data through the game server, and a command data packet is sent to the game client based on the battle performance data, wherein the command data packet carries a first command code; Receiving the command data packet and parsing the command data packet to obtain at least one combat performance command includes: verifying whether there is command data packet loss based on the first command code and the second command code corresponding to the received historical command data packets; when there is no command data packet loss, parsing the command data packet to obtain at least one combat performance command; when there is command data packet loss, sending a request to the game server to obtain the lost command carrying the second command code, so that the game server sends a lost command data packet carrying a third command code to the game client based on the second command code; and determining whether to parse the lost command data packet based on the third command code corresponding to the received lost command data packet and the second command code. Obtain the execution method corresponding to the combat performance command, and execute the combat performance command according to the execution method; The process of the game server sending a lost command data packet carrying a third command code to the game client based on the second command code includes: the game server determining at least one lost target command data packet based on the second command code; sending the target command data packets one by one as lost data packets when the number of target command data packets is less than a preset first number; and calculating combat result performance data corresponding to multiple target command data packets when the number of target command data packets is greater than or equal to the preset first number, generating the third command code corresponding to the combat result performance data based on the second command code, and sending the lost command data packet to the game client according to the third command code and the combat result performance data.

2. The method according to claim 1, characterized in that, The method further includes: The received command data packet and the lost command data packet are placed into the cache pool as command data packets to be executed; Accordingly, parsing the command data packet to obtain at least one combat performance command includes: If the number of command data packets to be executed in the cache pool is less than the preset second number, the command data packets to be executed are retrieved one by one in the order in which they were put into the cache pool, and the retrieved command data packets to be executed are parsed to obtain at least one combat performance command. If the number of command data packets to be executed in the cache pool is equal to the preset second number, then the preset third number of commands to be executed that are ranked first in the cache pool are taken as commands to be synchronized, the combat performance result to be synchronized corresponding to the command to be synchronized is determined, and the combat performance result to be synchronized is displayed.

3. The method according to claim 1, characterized in that, The step of sending game battle data to the game server based on the received game battle commands includes: A first instruction number corresponding to the game battle instruction is generated, and game battle data is sent to the game server based on the game battle instruction and the first instruction number; wherein, the game server verifies whether there is game battle data packet loss based on the first instruction number carried in the game battle data and the second instruction number corresponding to the received historical game battle data, and if game battle data packet loss is verified, it sends a request to the game client to retrieve the packet loss data carrying the second instruction number, and if no battle data packet loss is verified, it calculates the battle performance data corresponding to the game battle data; Accordingly, the method further includes: When the packet loss data acquisition request is received, the game server is sent packet loss game battle data based on the second instruction number carried in the packet loss data acquisition request.

4. The method according to any one of claims 1 to 3, characterized in that, The method for obtaining the execution method corresponding to the combat performance command includes: The execution method corresponding to the combat performance command is obtained from the first command mapping table, wherein the first command mapping table is dynamically updated based on a new version of the command mapping table periodically retrieved by the game client or issued by the game server; or... Based on the command mapping table identifier indicated by the command data packet, query the second command mapping table corresponding to the command mapping table identifier, and obtain the execution method corresponding to the combat performance command from the second command mapping table.

5. The method according to any one of claims 1 to 3, characterized in that, The execution of the combat performance command according to the execution method includes: In a preset game combat system, the target combat system corresponding to the combat performance command is invoked, and the combat performance command is executed through the target combat system according to the execution method. The game combat system includes at least one of a character system, an animation system, a special effects system, a sound effects system, and a scene system.

6. A game data processing device, characterized in that, The device includes: The sending module is used to send game battle data to the game server based on the received game battle instructions, so that the game server can calculate the battle performance data corresponding to the game battle data, and send command data packets to the game client based on the battle performance data; A receiving module is used to receive the command data packet and parse the command data packet to obtain at least one combat performance command; An execution module is used to obtain the execution method corresponding to the combat performance command, and execute the combat performance command according to the execution method; The command data packet carries a first command encoding; the receiving module is used for: Based on the first command code and the second command code corresponding to the received historical command data packets, verify whether there is any command data packet loss; When there is no command packet loss, the command packet is parsed to obtain at least one combat performance command; When command packet loss occurs, a request to retrieve the lost command carrying the second command encoding is sent to the game server, so that the game server sends a lost command data packet carrying the third command encoding to the game client based on the second command encoding; and, Based on the third command code and the second command code corresponding to the received packet loss command data packet, determine whether to parse the packet loss command data packet; Specifically, the game server determines at least one target command data packet that is lost based on the second command encoding. When the number of target command data packets is less than a preset first number, the target command data packets are sent one by one as the lost data packets. When the number of target command data packets is greater than or equal to the preset first number, the server calculates combat result performance data corresponding to multiple target command data packets, generates a third command encoding corresponding to the combat result performance data based on the second command encoding, and sends the lost command data packets to the game client based on the third command encoding and the combat result performance data.

7. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 5.

8. A computer device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Data processing method based on frame synchronization, server and client

    CN106559426A