CN112169340A - Data synchronization verification method, system, computing device and storage medium - Google Patents
Data synchronization verification method, system, computing device and storage medium Download PDFInfo
- Publication number
- CN112169340A CN112169340A CN202010851446.0A CN202010851446A CN112169340A CN 112169340 A CN112169340 A CN 112169340A CN 202010851446 A CN202010851446 A CN 202010851446A CN 112169340 A CN112169340 A CN 112169340A
- Authority
- CN
- China
- Prior art keywords
- frame
- packet
- terminal
- operation result
- identifier
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 238000003860 storage Methods 0.000 title claims abstract description 38
- 238000012795 verification Methods 0.000 title claims description 40
- 239000000872 buffer Substances 0.000 claims abstract description 43
- 230000001360 synchronised effect Effects 0.000 claims abstract description 16
- 238000004891 communication Methods 0.000 claims description 24
- 238000004590 computer program Methods 0.000 claims description 24
- 230000008859 change Effects 0.000 claims description 23
- 238000013524 data verification Methods 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 15
- 238000012545 processing Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 7
- 230000005540 biological transmission Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000003993 interaction Effects 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 230000001934 delay Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000000977 initiatory effect Effects 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 239000008280 blood Substances 0.000 description 1
- 210000004369 blood Anatomy 0.000 description 1
- 230000003139 buffering effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000013502 data validation Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/70—Game security or game management aspects
- A63F13/71—Game security or game management aspects using secure communication between game devices and game servers, e.g. by encrypting game data or authenticating players
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F2300/00—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
- A63F2300/40—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterised by details of platform network
- A63F2300/401—Secure communication, e.g. using encryption or authentication
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F2300/00—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
- A63F2300/50—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
- A63F2300/53—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers details of basic data processing
- A63F2300/532—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers details of basic data processing using secure communication, e.g. by encryption, authentication
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Business, Economics & Management (AREA)
- Computer Security & Cryptography (AREA)
- General Business, Economics & Management (AREA)
- Computer And Data Communications (AREA)
Abstract
The embodiment of the application provides a method, a system, a computing device and a storage medium for synchronous verification of data. In the embodiment of the application, in the preset time, the running frame rate of a client installed on a terminal is greater than that of a server within a preset range, a first frame data packet is received, a first operation instruction is executed, and a first operation result is obtained; storing the corresponding relation between the first operation result and the first frame packet identifier to a corresponding buffer queue; and sending the first operation result to the corresponding terminals through a frame message packet, wherein the frame message packet carries a second frame packet identifier corresponding to the first frame packet identifier. Therefore, after the terminal receives the frame message packet, the second operation instruction and the frame packet identifier corresponding to the operation result before the second operation instruction are returned through the second frame data packet, so that the second operation instruction is verified. Therefore, the operation result can be accurately checked aiming at state synchronization.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, a system, a computing device, and a storage medium for data synchronization verification.
Background
With the rapid development of the internet, users can be provided with many services, such as online instant messaging, online games, online shopping, etc., through the internet. And the service provision needs to be realized by the interaction of the service end and the terminal of the user.
In some interaction modes, the server is required to send data required to be synchronized to the corresponding terminal in a synchronization mode. The state synchronization method can make the data of the terminal and the server have a certain difference, so that the terminal has a stronger delay compared with the server. Certain errors exist when sensitive data are accurately checked for some services with high requirements on synchronous experience, and the user experience is greatly influenced.
Disclosure of Invention
Various aspects of the present application provide a method, a system, a computing device, and a storage medium for synchronous verification of data, so as to perform relatively accurate verification of sensitive data for a service with a high requirement on synchronous experience.
The embodiment of the application provides a data synchronization verification method, which is applied to a server, wherein within a preset time, an operation frame rate of a client installed on a terminal is greater than an operation frame rate of the server within a preset range, and the method comprises the following steps: receiving a first frame data packet, wherein the frame data packet carries a first operation instruction and a first frame packet identifier, executing the first operation instruction, and acquiring a first operation result; storing the corresponding relation between the first operation result and the first frame packet identifier to a corresponding storage queue; and sending the first operation result to a plurality of corresponding terminals through a frame message packet, wherein the frame message packet carries a second frame packet identifier corresponding to the first frame packet identifier, so that after receiving the frame message packet, the terminals return a second operation instruction and a frame packet identifier corresponding to an operation result before the second operation instruction through a second frame data packet, and the second operation instruction is verified.
The embodiment of the present application further provides a data synchronization verification method, which is applied to a terminal, and in a predetermined time, an operation frame rate of the terminal is greater than an operation frame rate of a server within a preset range, where the method includes: receiving a frame message packet, wherein the frame message packet carries an operation result and a frame packet identifier corresponding to the operation result; displaying the operation result and receiving an operation instruction aiming at the operation result; and returning the operation instruction and the frame packet identifier corresponding to the operation result through a frame data packet so as to verify the operation instruction.
An embodiment of the present application further provides a system for synchronizing data, including: the system comprises a server and a terminal, wherein in a preset time, the running frame rate of the terminal is greater than that of the server in a preset range: the server receives a first frame data packet, the frame data packet carries a first operation instruction and a first frame packet identifier, and executes the first operation instruction to obtain a first operation result; storing the corresponding relation between the operation result and the first frame packet identifier to a corresponding storage queue; sending the operation result to a plurality of corresponding terminals through a frame message packet, wherein the frame message packet carries a second frame packet identifier corresponding to the first frame packet identifier; the terminal displays the operation result after receiving the frame message packet and receives a second operation instruction aiming at the operation result; and returning the second operation instruction and the frame packet identifier corresponding to the operation result through a second frame data packet so as to verify the second operation instruction.
The embodiment of the application also provides a computing device, a memory, a processor and a communication component; the memory for storing a computer program; the communication component is used for receiving a first frame data packet, and the frame data packet carries a first operation instruction and a first frame packet identifier; the processor to execute the computer program to: executing a first operation instruction to obtain a first operation result; storing the corresponding relation between the first operation result and the first frame packet identifier to a corresponding storage queue; the communication component is configured to send the first operation result to a plurality of corresponding terminals through a frame message packet, where the frame message packet carries a second frame packet identifier corresponding to the first frame packet identifier, so that after receiving the frame message packet, the terminal returns a second operation instruction and a frame packet identifier corresponding to an operation result of the second operation instruction through a second frame data packet to verify the second operation instruction, and an operation frame rate of a client installed in the terminal is greater than an operation frame rate of a server within a preset range in a preset time.
The embodiment of the application also provides a computing device, a memory, a processor and a communication component; the memory for storing a computer program; the communication component is used for receiving a frame message packet, and the frame message packet carries an operation result and a frame packet identifier corresponding to the operation result; the processor to execute the computer program to: displaying the operation result and receiving an operation instruction aiming at the operation result; and the communication component is used for returning the operation instruction and the frame packet identifier corresponding to the operation result through the frame data packet so as to verify the operation instruction, and the running frame rate of the terminal is greater than that of the server within a preset range in a preset time.
Embodiments of the present application also provide a computer-readable storage medium storing a computer program, which when executed by one or more processors causes the one or more processors to implement the steps of the above-mentioned method.
In the embodiment of the application, in the preset time, the running frame rate of a client installed on a terminal is greater than that of a server within a preset range, the server receives a first frame data packet, the frame data packet carries a first operation instruction and a first frame packet identifier, the first operation instruction is executed, and a first operation result is obtained; storing the corresponding relation between the first operation result and the first frame packet identifier to a corresponding storage queue; and sending the first operation result to the corresponding terminals through a frame message packet, wherein the frame message packet carries a second frame packet identifier corresponding to the first frame packet identifier. Therefore, after the terminal receives the frame message packet, the second operation instruction and the frame packet identifier corresponding to the operation result before the second operation instruction are returned through the second frame data packet, so that the second operation instruction is verified. Such that when the frame packet identification is a second frame packet identification, it can be determined that the second operation instruction is for the first operation result and the verification is passed. Therefore, the operation result can be accurately checked aiming at state synchronization, and the user experience is improved. The problem of verification failure caused by aiming at different operation results is avoided.
Meanwhile, due to the fact that the synchronization efficiency of state synchronization is high, multi-user participation interactive services, such as multi-user participation game services, can be supported.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart illustrating a method for synchronous verification of data according to an exemplary embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating data validation according to an exemplary embodiment of the present application;
FIG. 3 is a flow chart illustrating frame identification conversion according to an exemplary embodiment of the present application;
FIG. 4 is a flow chart illustrating a method for synchronous verification of data according to yet another exemplary embodiment of the present application;
FIG. 5 is a schematic structural diagram of a device for synchronous verification of data according to another exemplary embodiment of the present application;
FIG. 6 is a schematic structural diagram of a device for synchronous verification of data according to another exemplary embodiment of the present application;
FIG. 7 is a schematic block diagram of a computing device provided in an exemplary embodiment of the present application;
fig. 8 is a schematic structural diagram of a computing device according to an exemplary embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Based on the foregoing, for some services with high requirements on synchronization experience, when sensitive data is accurately checked, a certain error occurs in state synchronization, which results in poor user experience.
For example, in a multiplayer network game service, a pre-expression manner of a client installed in a terminal is generally used, that is, the expression data of the client of a current game user (also called a game player) is prior to the player data in a service, such as a server. And the server synchronizes the operation result of the game player to the client terminals of other game players. Then, other game players can see the operation result from their own clients, and will be later than the player data in the server. This also results in 3 states for each player character throughout the game flow: the pre-rendered state of the client of the own game player, the state of the current player of the server, and the states seen by the clients of other game players. These 3 states are unlikely to be fully data consistent due to network delays and processing delays at each end. Under the premise, if a higher operation is required for data synchronization, for example, another game player attacks the current game player at a certain location, since the current game player is pre-expressed, that is, the current game player may leave the location, and the other game player does not know yet, the current game player still attacks the current game player at the certain location, then an operation failure, such as an attack failure, may be caused because the current game player leaves the location. The problem of server authentication failure is caused.
In addition, the logic of the frame synchronization mode in the synchronization mode is not participated by the server, and the server only simply forwards data, so that the checksum arbitration of the data result cannot be achieved. And after the network is disconnected and reconnected, all the operations in the network disconnection period need to be synchronized, which results in long time consumption. Meanwhile, the operation of all participating terminals needs to be synchronized, so that the method is not suitable for large-scale multi-person interactive services, such as online games.
Therefore, the embodiment of the application provides a data synchronization verification method, which can perform relatively accurate verification on sensitive data aiming at services with high synchronization experience requirements.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating a method for synchronous verification of data according to an exemplary embodiment of the present application. The method 100 provided by the embodiment of the present application may be executed by a server, such as a server. In a predetermined time, the operation frame rate of the client installed in the terminal is greater than the operation frame rate of the server within a preset range, and the method 100 includes the following steps:
101: and receiving a first frame data packet, wherein the frame data packet carries a first operation instruction and a first frame packet identifier, executing the first operation instruction, and acquiring a first operation result.
102: and storing the corresponding relation between the first operation result and the first frame packet identifier into a corresponding storage queue.
103: and sending the first operation result to the corresponding terminals through the frame message packet, wherein the frame message packet carries a second frame packet identifier corresponding to the first frame packet identifier, so that after receiving the frame message packet, the terminals return a second operation instruction and the frame packet identifier corresponding to the operation result before the second operation instruction through the second frame data packet, and the second operation instruction is verified.
It should be noted that the operation frame rates of the client and the server in the terminal are different, and may be that the operation frame rate of the client is greater than that of the server.
The following is detailed for the above steps:
101: and receiving a first frame data packet, wherein the frame data packet carries a first operation instruction and a first frame packet identifier, executing the first operation instruction, and acquiring a first operation result.
The frame is an operation frame, may also be referred to as an operation data frame, and is a logical frame of a client installed in the server and the terminal. Data is run based on the logical frame. For example, the server and the client may run 30 data frames in 1 second, each data frame has its own time point, and after the corresponding time point arrives, the server or the client runs the corresponding data frame, which may correspond to some data to be run, such as some operation instructions. The operation instruction may refer to an operation performed by a user on the client, such as moving a game character or the like. The result of the execution is the result of the command, such as moving the game character to position a.
For a terminal, a client, such as APP (application), is installed thereon. The client also has data frames and needs to interact with the server. In order to synchronize data with the server, the data synchronization of the client and the server needs to be coupled through data frames. After the client performs an operation, the operation data, such as an operation instruction, needs to be sent to the server. The client may send the operation data through a frame data packet, and the frame data packet may carry a frame packet identifier (also referred to as a frame identifier) of its own data packet, such as a frame packet number (also referred to as a frame number). For data synchronization with the server.
For example, as described above, as shown in fig. 2, the game user a connects with the game server (i.e., server) through the game APP (i.e., client a) installed in his/her mobile phone to enter the game scene. The game is a large-scale multiplayer game, and multiple players can play game interaction in the same game scene at the same time. After entering a game scene, the game user a can perform a game operation, and the game user a operates the game character a of the game user a. The game user A moves the corresponding game role A to the position through the game APP. The game APP responds to the operation instruction through the mobile phone to obtain an operation result, if step 201 is executed: the game character, i.e., game character a, is moved to the coordinates (0, 1). Meanwhile, under the condition that the operation instruction is executed and only one operation instruction exists in the time period corresponding to the current data frame, the game APP sends the operation instruction to the game server through a frame data packet, and the frame data packet carries the frame packet number of the game APP itself, such as 01. Step 202 is executed: and sending the frame data packet to a server.
After receiving the frame data packet, the game server may first buffer the frame data packet into a preset buffer area, such as a storage queue. To execute or run the frame data packet when waiting for the arrival of the corresponding time point, i.e. the arrival of the corresponding frame. When the corresponding time point arrives, the game server acquires the frame data packet from the storage queue. It should be understood that each time the corresponding time point arrives, the game server will sequentially fetch the corresponding frame data packets from the storage queue to run or execute, thereby modifying the corresponding data in the game, such as the data of the game character. The game server parses the frame data packet, obtains the operation instruction, and obtains an operation result, in step 203: the game character moves to the coordinates (0, 1).
It should be noted that the buffer may be a fixed-length buffer queue, which stores a plurality of frame data packets in a near period of time (e.g. 10 minutes).
For each data frame, if there are multiple operation instructions in the data frame, the multiple operation instructions may be sent, and the client may send the operation instructions simultaneously and obtain an operation result in response to the operation instructions, so as to improve the data synchronization effect.
102: and storing the corresponding relation between the first operation result and the first frame packet identifier into a corresponding storage queue.
For example, according to the foregoing, at the same time, the game server buffers the correspondence between the frame packet number and the execution result, in step 204: the game character corresponding to the buffered frame packet identification 01 (i.e., the frame packet number 01) moves to the coordinates (0, 1). And the data can be buffered into another buffer queue, namely a storage queue.
It should be noted that, other storage forms such as an array may be used besides the storage queue, which is not limited herein, but all storage forms that can store the corresponding relationship may belong to the protection scope of the embodiment of the present application.
103: and sending the first operation result to the corresponding terminals through the frame message packet, wherein the frame message packet carries a second frame packet identifier corresponding to the first frame packet identifier, so that after receiving the frame message packet, the terminals return a second operation instruction and the frame packet identifier corresponding to the operation result before the second operation instruction through the second frame data packet, and the second operation instruction is verified.
Wherein the second frame packet identification is an identification, such as a number, corresponding to the first frame packet identification. The identifier may be the same as or different from the first frame packet identifier, but there is a correspondence. The second frame packet identifier corresponds to the operation instruction, and may also correspond to an execution result corresponding to the operation instruction. The second frame packet identification is determined by the server, and may be the server's current frame identification as the second frame packet identification.
For example, according to the foregoing, after the game server has finished caching, the operation instruction, such as moving the game character (i.e., game character a) to the coordinate (0,1), and sending the frame message packet to other game clients (i.e., other clients B), where the number of the other game clients may be multiple. That is, the frame message packet is sent to each of the other game clients, and the frame message packet also carries a frame packet number, such as 10, corresponding to the operation instruction. If step 205 is executed: and sending the frame message packet. It should be further noted that the frame packet identifier carried by the frame message packet may also be used to indicate the identifier of the frame message packet itself. And the game APP installed on other terminals receives the frame message packet, executes the frame message packet and returns other operation instructions corresponding to the operation result and the frame packet identifier corresponding to the operation result for verification. The specific implementation steps of the other terminals are as follows.
For example, after receiving the frame message packet, the other game APP parses the frame message packet, takes the operation result, and performs interpolation expression after the game character (i.e., game character a) moves to the coordinate (0,1), and displays the operation result on the mobile phone to which the other game APP (i.e., other client) belongs, so that the other game user can see the operation result. The other game APP records the frame packet number 10 of the operation result. The frame packet number may be a corresponding frame packet number of the game character a of the game user a, or may be a frame number.
As shown in fig. 2, after seeing the operation result, the other game user B can execute an operation instruction, such as a game character attacking the coordinates (0,1), if the game character a moves to the coordinates (0, 1). In the time period corresponding to the data frame, the other game APP (i.e. the other client B) responds to the operation instruction through the mobile phone, that is, only one operation instruction exists in the data frame. Step 208 is executed: attack the game character with coordinates (0, 1). Meanwhile, the other game APP sends the operation instruction to the game server through the frame data packet, that is, step 211 is executed: and sending the frame data packet. And besides carrying the operation instruction, the frame data packet also has the frame packet number 10, that is, the received operation result: the game character (i.e., the game character a) moves to the frame packet number 10 corresponding to the coordinate (0, 1). Meanwhile, the frame data packet may also carry its own frame packet number, such as 002, to indicate the identifier of its own frame packet.
In addition, before the game server receives the frame data packet, the frame data packet sent by the game APP of the game user a can be continuously received. For example, game user A continues to move game character A to coordinates (0, 2). In response to the operation command, the game APP (i.e., client a) executes step 206: the game character (i.e., game character a) moves to the coordinates (0, 2), and step 207 is performed: and sending the frame data packet. The transmission process is similar to that described above and will not be described in detail here. After receiving the frame data packet, the game server (i.e., the server) buffers the frame data packet into the buffer queue to wait for execution. During execution, the game server parses the frame data packet, executes the operation command, and obtains the operation result, if the server executes step 209: the game character, i.e., game character a, moves to the coordinates (0, 2). Then, step 210 is performed: the buffered frame packet identifier 02 identifies the movement of the corresponding game character to coordinate (0, 2). The specific implementation has been described above, and will not be described herein.
It should be noted that, at this time, the game character a of the game user a is not at the coordinates (0, 1). The coordinates (0, 2) have been moved to, but other game users have not yet known that the game character a is also being operated at the coordinates (0,1) with respect to the game character a, such as an attack on the game character a at the coordinates (0, 1).
After receiving the frame data packets returned by other terminals, the server needs to verify the frame data packets more accurately in order to determine the operation of the frame data packets more accurately, so as to improve the experience of the user.
Specifically, the method 100 further includes: receiving a second frame data packet returned by at least one terminal, and acquiring a frame packet identifier corresponding to an operation result in the second frame data packet before the second operation instruction; based on the frame packet identifier, performing operation verification on a second operation instruction carried by a second frame data packet; and after the verification is passed, sending a second operation result to the corresponding terminal.
Based on the frame packet identifier, verifying a second operation instruction carried by a second frame data packet, including: if the frame packet identifier is the second frame packet identifier, determining that the second operation instruction is the operation instruction aiming at the first operation result according to the corresponding relation between the second frame packet identifier and the first frame packet identifier and the corresponding relation between the first frame packet identifier and the first operation result, and passing the verification.
For example, according to the foregoing, since the game server performs processing according to the foregoing manner after receiving the frame data packet sent by the other game APP, details thereof are not repeated here. Only the description is as follows: the game server parses the frame data packet, and acquires the frame packet identifier 01 therein, i.e. the frame packet number, i.e. the game server executes step 212: and acquiring a frame packet identifier 01 in the frame data packet. When the operation result corresponding to the identifier is acquired, that is, the game character a moves to the coordinate (0,1), step 213 is executed: the game character corresponding to the frame packet identification 01 is acquired to move to the coordinate (0,1) for verification. The game server is the result of the operation of moving the game character to the coordinate (0,1) due to the operation instruction acquired in the frame data packet. Then the verification may be determined to be passed. If the acquired operation result is that the game character moves to the coordinate (0, 2), the operation instruction in the frame data packet sent by the other game APP received by the game server does not match the acquired operation result, and the authentication cannot be passed. Alternatively, if the game character a does not appear at the coordinates (0,1), the verification is not successful. After the verification is passed, the game server can execute the operation instruction in the frame data packet, such as the game character A with attack coordinates (0,1), and determine the second operation result.
Specifically, after the verification is passed, sending a second operation result to the corresponding terminal includes: executing a second operation instruction according to the first operation result, and determining a second operation result generated by the second operation instruction on the first operation result; and sending the second operation result to the corresponding terminal.
For example, according to the above, the game server executes the above operation instruction, and the attacking game character a moves to the coordinate (0,1), and the attack is successful because it is the game character on the coordinate of the attack. It should be understood that other game users are not allowed to attack the game character a at the attack coordinate (0,1), and the operation command is not directed to the game character a at the attack coordinate (0,1), but is directed to, for example, a wrong position, such as a point attack at the attack coordinate (0, 3). But actually the game character a is shown on coordinates (0,1) on the other game user's handset. At this time, the attack failed even though the verification was passed. Or it may be verified that it is not passed because the operation instruction is for the point of coordinates (0, 3).
When the server verifies that the received frame data packet is passed, the steps set forth above may be repeated. The subsequent operation results can be continuously sent, such as the success of attacking the game role A and 3 points of blood loss of the game role A. The operation results may be returned to other game APPs. The returning mode is also as described above, and will not be described herein.
Alternatively, if other game APP also sends other frame data packets, or the aforementioned game server receives other operation instructions in the frame data packets, such as other game users, for example, game character B of game user B, moving to coordinate (2, 3). The operation result may be continuously transmitted to other game APPs through the frame data packet.
Specifically, the second frame data packet also carries a third frame packet identifier representing the frame data packet of the second frame data packet; wherein, after the verification passes, the method 100 further includes: storing the corresponding relation between the second operation result and the third frame packet identifier; wherein, sending the second operation result to the corresponding terminal includes: and sending a second operation result to the corresponding terminals through a frame message packet, wherein the frame message packet carries a frame packet identifier corresponding to the third frame packet identifier.
Since the foregoing has been set forth in detail herein, it is not repeated here. Only the description is as follows: the game server continues to send frame data packets. Since the game server receives the frame data packet of other game APP to attack the game character a, the frame data packet may have its own frame packet number 002 in addition to the frame packet number 01, and then the game server may continue to determine the corresponding other frame packet numbers based on the number, so as to carry the frame packet in the subsequent frame message packet, or serve as the number of the subsequent frame message packet. This is repeated.
The problem that the server check data cannot be synchronized can be solved through the embodiment of the application, but because the connection of each client network to the server can be different, the frame identifiers or the frame packet identifiers cannot be completely in one-to-one correspondence. Therefore, in order to ensure the verification effect, the correspondence between the client frame packet identifier and the server frame identifier is ensured.
Specifically, the method 100 further includes: receiving a frame starting message packet sent by at least one terminal, and determining a frame packet starting identifier of the frame starting message packet; determining a current frame identifier of a server, and creating a corresponding relation between a frame packet starting identifier and the frame identifier; and determining the frame packet identifier of the terminal to be received according to the corresponding relation between the frame packet starting identifier and the frame identifier. I.e. the second frame packet identification is determined by the first frame packet identification.
Since the frame packet identifiers of the server and the client, or the frame identifiers, are identified in sequence, the identifier correspondence between the client and the server is determined based on the sequence, for example, initially, the client and the server have a difference of 3 frame identifiers, or frame packet identifiers, and then the client transmits a frame packet identifier later, and the server can convert the received frame packet identifier into the frame identifier of the server based on the 3 frame identifiers.
More specifically, according to the corresponding relationship and the frame packet identifier of the sending terminal, the frame identifier corresponding to the server is determined; and determining the frame packet identifier of the terminal to be received according to the corresponding relation and the frame identifier corresponding to the server.
If so, determining a first frame identifier of the first frame packet identifier relative to the phase difference of the service end according to the corresponding relation and the terminal sending the first frame packet identifier; obtaining a second frame identifier based on the first frame identifier and the first frame identifier; according to the corresponding relation and the terminal to which the second frame packet identifier is sent, determining a third frame identifier of the phase difference of the second frame identifier relative to the terminal to which the second frame identifier is sent; and obtaining a second frame packet identifier based on the third frame identifier.
The second frame identifier refers to a frame identifier of the server.
For example, as described above, as shown in fig. 3, the game user a starts the game APP of the mobile phone, i.e., the client a, and the mobile phone starts the game APP in response to the start instruction of the user, and performs a network connection with the game server, i.e., the server. Since the connection with the game server is just started, the game APP determines that the current frame packet identification is 0, i.e., the frame packet number is 0. Then the mobile phone starts the game APP, and the game APP starts, that is, step 301 is executed: the initiating client determines the current frame packet start identity 0. Step 302 is executed: and sending a frame starting message packet. After receiving the message packet, the game server determines its current frame identifier, and if the current frame identifier is determined, step 303 is executed: the current frame identification of the server is recorded 100. The game server continues to receive the frame data packets sent by other game APPs as described above, and executes step 304: the frame data is run. It should be understood that the frame identification of the game server is changed as the game server runs the frame data, i.e., runs the frame data pack. The frame identification of the current game server receiving the frame start message packet is 100. But over time, the frame identification of the game server changes.
Meanwhile, the game server may also continue to receive frame start message packets of other game APPs, in the foregoing specific manner, which is not described herein again. For other game APPs, as shown in fig. 3, the game server, i.e. the server, performs step 306: a frame initiation message packet is received. Then step 307 is executed: the current frame identification of the server is recorded 101. The subsequent game server may receive the frame data packet transmitted by the client that has transmitted the frame start message packet. The specific receiving and processing procedure of the frame data packet is similar to that described above, and will not be described herein again. If the client a of the game APP performs step 308: the game character moves to the coordinates (0,1), and step 309 is performed: and sending a frame data packet, wherein the frame data packet carries an operation instruction, such as a mobile operation instruction. After receiving the frame data packet, the game server converts the frame identifier or the frame packet identifier before processing or before buffering, where the frame packet identifier of the frame data packet may be 10. The game server performs step 310: the frame packet identifier 10 of the frame data packet is converted into a frame identifier 110 of the server, i.e. an initial 100+ 10-110 frame identifier, i.e. a second frame identifier. It should be understood that, since the frame packet start identifier 0, the phase difference identifier 10, i.e., 10-0 ═ 10, i.e., the first frame identifier. The transmission of the frame message packet is then performed in the manner described above. The game server performs step 311: the game character corresponding to the execution frame identification 110 moves to the coordinate (0, 1). Before sending the frame message packet, the game server also converts the frame packet identifier, or frame identifier, based on the other game APPs sent. Based on the foregoing, when the other game APP, i.e. the other client B, has its starting frame packet identifier 110 identifying the corresponding game server. Then the result of the and operation in the frame message packet is: the frame packet identifier when the game character moves to the coordinate (0,1) is 9 or a frame identifier, which may correspond to the second frame packet identifier described above, i.e., 110-. It should be appreciated that since the frame packet start identification is 0, 9-0 ═ 9, and 9 is also the third frame identification, then the game server performs step 312 to convert the frame identification 110 to the frame packet identification 9 of the other client. It should be understood that the corresponding frame packet identification may be different for different other clients, and one way of illustration is chosen here for the sake of example only, and in an actual scenario it should be many. Thereafter, the game server performs step 313: based on the frame packet identification 9, a frame message packet is transmitted. And will not be described in detail herein.
Generally, a client on an intelligent terminal is more ahead of a server by changing a frame rate, that is, within a predetermined time, an operating frame rate of the client installed on the terminal is greater than an operating frame rate of a server within a preset range, so that the server caches 1-2 client frame data packets in a cache to wait for processing. Thereby the performance of the client can be optimized and made smoother under the condition of network fluctuation. However, the buffered frame data packets are not too many, which may cause the server data to be too delayed from the client. Thus, in the case of excessive delay, the frame rate of the client needs to be adjusted to better optimize the performance of the client.
Specifically, the method 100 further includes: and acquiring the buffer quantity of the frame data packets buffered currently, and sending the buffer quantity to the corresponding terminal so that the terminal determines whether to change the running frame rate of the terminal according to the buffer quantity and the target quantity in the preset time.
According to the foregoing, the running frame rate of the client installed in the terminal is greater than the running frame rate of the server within the predetermined time, so as to ensure that the client optimizes the performance of the client under the condition of network fluctuation, and the performance of the client is smoother. Maintaining this smooth appearance may also adjust the frame rate for further optimization.
For example, according to the foregoing, the server determines the buffer amount of the frame data packets of the client terminal for each network-connected terminal, and sends the frame data packets to the corresponding client terminal. After receiving the data packet, the client determines the target number of the buffered frame data packets in the network delay fluctuation state in a period of time, such as 10 seconds. The determination method may be: the delay of a recent period of time, such as a ping (Packet Internet Groper) value every second for 10 seconds, is recorded. And then calculating the standard deviation of the ping value, and calculating the target quantity of the corresponding frame data packet cache according to the standard deviation. And if the target number is more than the current server cache number, the client side carries out frame chasing operation. Such as the client running for a period of time, such as 10s, at a faster frame rate. If the target number is less than the current server cache number, the client performs a frame reduction operation, and the client runs for a period of time, such as 10s, at a lower frame rate. And finally, the target number of the clients is consistent with the cache number. Or the like, or, alternatively,
specifically, the method 100 further includes: acquiring the caching quantity of the currently cached frame data packets; determining the target number of frame data packets of the terminal in a preset time; determining whether to change the running frame rate of the terminal according to the cache number and the target number; and if so, sending a message for changing the running frame rate to the terminal.
Wherein it is determined by the server whether to change the operating frame rate of the terminal itself.
Determining the target number of frame data packets of the terminal within the preset time may include: and receiving the target number sent by the terminal. The manner in which the terminal determines the target number has been described above, and will not be described herein.
After the server determines the target number, it can determine whether the terminal itself makes a change in the running frame rate in the manner described above. And will not be described in detail herein.
The server determines whether to change the running frame rate of the terminal, and the method comprises the following steps: if the cache number is larger than the target number, determining to reduce the self running frame rate of the terminal; if yes, sending a message for changing the running frame rate to the terminal, wherein the message comprises: a message is sent to the terminal that reduces the operating frame rate.
Since the foregoing has been set forth, further description is omitted herein. Only the description is as follows: and after the server determines that the terminal needs to reduce the running frame rate according to the mode, sending a message indicating that the running frame rate is reduced to the terminal. And after receiving the message, the terminal reduces the self running frame rate. Such as a client in the terminal, for a period of time, such as 10s, at a lower frame rate. And finally, the target number of the clients is consistent with the cache number. Since the server determines whether the terminal (i.e. the client in the terminal) needs to change the running frame rate. The server may make the determination periodically until the target number of clients is consistent with the cache number.
In addition, the server determines whether to change the operating frame rate of the terminal itself, including: if the cache number is smaller than the target number, determining to increase the self running frame rate of the terminal; if yes, sending a message for changing the running frame rate to the terminal, wherein the message comprises: a message is sent to the terminal to increase the operating frame rate.
The implementation here is similar to that described above and will not be described in detail.
Based on the similar inventive concept, fig. 4 is a flowchart illustrating a data synchronization verification method according to an exemplary embodiment of the present application. The method 400 provided by the embodiment of the present application may be executed by a terminal, such as a client in a mobile phone. In a predetermined time, the operation frame rate of the terminal is greater than the operation frame rate of the server within a preset range, and the method 400 includes the following steps:
401: and receiving a frame message packet, wherein the frame message packet carries the operation result and a frame packet identifier corresponding to the operation result.
402: and displaying the operation result and receiving an operation instruction aiming at the operation result.
403: and returning the operation instruction and the frame packet identifier corresponding to the operation result through the frame data packet so as to verify the operation instruction.
Since steps 401 and 403 have already been described above, they will not be described in detail here. For illustration only, the operation result of this step 402 is the first operation result described above. The operation instruction refers to a second operation instruction. The frame packet identifier in step 401 may be an identifier of the frame message packet itself, or may be a frame identifier corresponding to the operation result.
In addition, the method 400 further includes: receiving the caching quantity of the currently cached frame data packets of the server; determining the target number of frame data packets in preset time; and determining whether to change the running frame rate of the self according to the buffer amount and the target amount.
Specifically, determining whether to change the running frame rate of the host computer according to the buffer amount and the target amount includes: and if the buffer amount is larger than the target amount, determining to reduce the self running frame rate.
In addition, the method 400 further includes: and if the buffer amount is less than the target amount, determining to increase the self running frame rate.
Since the foregoing has been set forth, further description is omitted herein.
In addition, reference may also be made to various steps in the method 100 described above, where the method 400 is not described in detail.
Based on the similar inventive concept, another exemplary embodiment of the present application provides a schematic diagram of a data synchronization system. The system provided by the embodiment of the application can comprise: a server, such as a server, and a terminal, such as a client of the terminal. And in the preset time, the running frame rate of the terminal is greater than that of the service end in a preset range.
The server receives a first frame data packet, the frame data packet carries a first operation instruction and a first frame packet identifier, executes the first operation instruction, and acquires a first operation result; storing the corresponding relation between the operation result and the first frame packet identifier to a corresponding storage queue; and sending the operation result to the corresponding terminals through the frame message packet, wherein the frame message packet carries a second frame packet identifier corresponding to the first frame packet identifier.
The terminal displays the operation result after receiving the frame message packet and receives a second operation instruction aiming at the operation result; and returning a second operation instruction and a frame packet identifier corresponding to the operation result through the second frame data packet so as to verify the second operation instruction.
And the server determines the caching quantity of the currently cached frame data packets.
The terminal receives the caching quantity of the currently cached frame data packets of the server; determining the target number of frame data packets in preset time; and determining whether to change the running frame rate of the self according to the buffer amount and the target amount.
And the terminal determines to reduce the self running frame rate if the buffer amount is larger than the target amount.
And the terminal determines to increase the running frame rate if the buffer amount is less than the target amount.
Since specific embodiments of the system have been described in detail above, they will not be described in detail here.
In addition, reference may also be made to the above-mentioned steps of the method 100 for details which are not described in the present system.
Fig. 5 is a schematic structural framework diagram of a data synchronization verification apparatus according to an exemplary embodiment of the present application. The apparatus 500 may be applied to a service device, such as a server. And in a preset time, the running frame rate of the client side installed on the terminal is greater than that of the server side in a preset range. The apparatus 500 comprises a receiving module 501, a storage module 502 and a sending module 503; the following detailed description is directed to the functions of the various modules:
the receiving module 501 is configured to receive a first frame data packet, where the frame data packet carries a first operation instruction and a first frame packet identifier, execute the first operation instruction, and obtain a first operation result.
The storage module 502 is configured to store a corresponding relationship between the first operation result and the first frame packet identifier in a corresponding storage queue.
The sending module 503 is configured to send the first operation result to the corresponding multiple terminals through a frame message packet, where the frame message packet carries a second frame packet identifier corresponding to the first frame packet identifier, so that after receiving the frame message packet, the terminals return the second operation instruction and the frame packet identifier corresponding to the operation result before the second operation instruction through the second frame data packet, so as to verify the second operation instruction.
In addition, the receiving module 501 is configured to receive a second frame data packet returned by at least one terminal, and obtain a frame packet identifier corresponding to an operation result in the second frame data packet before the second operation instruction; the apparatus 500 further comprises: the verification module is used for verifying the operation of a second operation instruction carried by the second frame data packet based on the frame packet identifier; a sending module 503, configured to send the second operation result to the corresponding terminal after the verification passes.
Further, a verification module to include: if the frame packet identifier is the second frame packet identifier, determining that the second operation instruction is the operation instruction aiming at the first operation result according to the corresponding relation between the second frame packet identifier and the first frame packet identifier and the corresponding relation between the first frame packet identifier and the first operation result, and passing the verification.
Furthermore, the sending module 503 includes: the first determining unit is used for executing the second operation instruction according to the first operation result and determining a second operation result generated by the second operation instruction on the first operation result; and the sending unit is used for sending the second operation result to the corresponding terminal.
The second frame data packet also carries a third frame packet identifier which represents the frame data packet of the second frame data packet; after the verification is passed, the storage module 502 is further configured to store a corresponding relationship between the second operation result and the third frame packet identifier; and the sending unit is further configured to send the second operation result to the corresponding plurality of terminals through a frame message packet, where the frame message packet carries a frame packet identifier corresponding to the third frame packet identifier.
In addition, the receiving module 501 is further configured to receive a frame start message packet sent by at least one terminal, and determine a frame packet start identifier of the frame start message packet; the apparatus 500 further includes a determining module, configured to determine a current frame identifier of the server, and create a corresponding relationship between a frame packet start identifier and the frame identifier; and determining the frame packet identifier of the terminal to be received according to the corresponding relation between the frame packet starting identifier and the frame identifier.
Specifically, the determining module includes: a second determining unit, configured to determine, according to the correspondence and the frame packet identifier of the sending terminal, a frame identifier corresponding to the server; and determining the frame packet identifier of the terminal to be received according to the corresponding relation and the frame identifier corresponding to the server.
In addition, the apparatus 500 further comprises: and the acquisition module is used for acquiring the buffer amount of the currently buffered frame data packets and sending the buffer amount to the corresponding terminal so that the terminal can determine whether to change the self running frame rate according to the buffer amount and the target amount in the preset time. Or the like, or, alternatively,
the acquisition module is also used for acquiring the caching quantity of the currently cached frame data packets; the determining module is also used for determining the target number of the frame data packets of the terminal in the preset time; determining whether to change the running frame rate of the terminal according to the cache number and the target number; if so, the sending module 503 sends a message for changing the running frame rate to the terminal.
Specifically, the determining module is configured to determine to reduce the running frame rate of the terminal if the number of the buffers is greater than the target number; the sending module 503 is configured to send a message for reducing the running frame rate to the terminal.
Specifically, the determining module is configured to determine to increase the running frame rate of the terminal if the number of the buffers is smaller than the target number; the sending module 503 is configured to send a message for increasing the running frame rate to the terminal.
Fig. 6 is a schematic structural framework diagram of a data synchronization verification apparatus according to an exemplary embodiment of the present application. The apparatus 600 may be applied to a terminal device, such as a client in the terminal device. And in the preset time, the running frame rate of the terminal is greater than that of the service end in a preset range. The apparatus 600 comprises a receiving module 601, a presentation module 602, and a return module 603; the following detailed description is directed to the functions of the various modules:
the receiving module 601 is configured to receive a frame message packet, where the frame message packet carries an operation result and a frame packet identifier corresponding to the operation result.
The display module 602 is configured to display an operation result and receive an operation instruction for the operation result.
And a returning module 603, configured to return the operation instruction and the frame packet identifier corresponding to the operation result through the frame data packet, so as to verify the operation instruction.
In addition, the receiving module 601 is further configured to receive the buffer amount of the currently buffered frame data packets of the server; the apparatus 600 further comprises: the determining module is used for determining the target number of the frame data packets in the preset time; and determining whether to change the running frame rate of the self according to the buffer amount and the target amount.
In addition, the determining module is configured to determine to reduce the running frame rate if the number of the buffers is greater than the target number.
In addition, the determining module is configured to determine to increase the running frame rate if the number of buffers is smaller than the target number.
In addition, for the content that cannot be described in detail in the apparatus 600, reference may also be made to the above-mentioned steps in the apparatus 500.
While the internal functions and structures of the apparatus 500 shown in FIG. 5 are described above, in one possible design, the structures of the apparatus 500 shown in FIG. 5 may be implemented as a computing device, such as a server. And in a preset time, the running frame rate of the client side installed on the terminal is greater than that of the server side in a preset range. As shown in fig. 7, the apparatus 700 is used for data transmission between a first device and a second device, and the apparatus 700 may include: memory 701, processor 702, and communications component 703;
a memory 701 for storing a computer program.
A processor 702 for executing a computer program for:
the communication component 703 is configured to receive a first frame data packet, where the first frame data packet carries a first operation instruction and a first frame packet identifier.
A processor 702 for executing the computer program for: executing a first operation instruction to obtain a first operation result; and storing the corresponding relation between the first operation result and the first frame packet identifier into a corresponding storage queue.
The communication component 703 is configured to send the first operation result to the corresponding multiple terminals through a frame message packet, where the frame message packet carries a second frame packet identifier corresponding to the first frame packet identifier, so that after receiving the frame message packet, the terminals return the second operation instruction and the frame packet identifier corresponding to the operation result of the second operation instruction through the second frame data packet, so as to verify the second operation instruction.
Additionally, communications component 703 is further configured to: and receiving the second frame data packet returned by at least one terminal. The processor 702 is further configured to obtain a frame packet identifier corresponding to an operation result in the second frame data packet before the second operation instruction; based on the frame packet identifier, performing operation verification on a second operation instruction carried by a second frame data packet; when the verification is passed, the communication component 703 is further configured to: and sending the second operation result to the corresponding terminal.
Specifically, the processor 702 is specifically configured to: if the frame packet identifier is the second frame packet identifier, determining that the second operation instruction is the operation instruction aiming at the first operation result according to the corresponding relation between the second frame packet identifier and the first frame packet identifier and the corresponding relation between the first frame packet identifier and the first operation result, and passing the verification.
Specifically, the processor 702 is specifically configured to: executing a second operation instruction according to the first operation result, and determining a second operation result generated by the second operation instruction on the first operation result; a communication component 603 to: and sending the second operation result to the corresponding terminal.
The second frame data packet also carries a third frame packet identifier which represents the frame data packet of the second frame data packet; wherein, after the verification passes, the processor 702 is further configured to: storing the corresponding relation between the second operation result and the third frame packet identifier; the communication component 703 is specifically configured to: and sending the second operation result to the corresponding terminals through a frame message packet, wherein the frame message packet carries a frame packet identifier corresponding to the third frame packet identifier.
Additionally, communications component 703 is further configured to: receiving a frame start message packet sent by at least one terminal, and the processor 702 is specifically configured to: determining a frame packet starting identifier of a frame starting message packet; determining a current frame identifier of a server, and creating a corresponding relation between a frame packet starting identifier and the frame identifier; and determining the frame packet identifier of the terminal to be received according to the corresponding relation between the frame packet starting identifier and the frame identifier.
Specifically, the processor 702 is specifically configured to: determining a frame identifier corresponding to the server according to the corresponding relation and the frame packet identifier of the sending terminal; and determining the frame packet identifier of the terminal to be received according to the corresponding relation and the frame identifier corresponding to the server.
Further, the processor 702 is further configured to: and acquiring the buffer quantity of the frame data packets buffered currently, and sending the buffer quantity to the corresponding terminal so that the terminal determines whether to change the running frame rate of the terminal according to the buffer quantity and the target quantity in the preset time. Or the like, or, alternatively,
further, the processor 702 is further configured to: acquiring the caching quantity of the currently cached frame data packets; determining the target number of frame data packets of the terminal in a preset time; determining whether to change the running frame rate of the terminal according to the cache number and the target number; and if so, sending a message for changing the running frame rate to the terminal.
Specifically, the processor 702 is specifically configured to: if the cache number is larger than the target number, determining to reduce the self running frame rate of the terminal; a message is sent to the terminal that reduces the operating frame rate.
Specifically, the processor 702 is specifically configured to: if the cache number is smaller than the target number, determining to increase the self running frame rate of the terminal; a message is sent to the terminal to increase the operating frame rate.
In addition, embodiments of the present invention provide a computer storage medium, and the computer program, when executed by one or more processors, causes the one or more processors to implement the steps of a method for synchronous verification of data in the method embodiment of fig. 1.
Having described the internal functionality and structure of the apparatus 600 shown in FIG. 6, in one possible design, the structure of the apparatus 600 shown in FIG. 6 may be implemented as a computing device, such as a terminal. And in the preset time, the running frame rate of the terminal is greater than that of the service end in a preset range. As shown in fig. 8, the apparatus 800 is used for data transmission between a first device and a second device, and the apparatus 800 may include: memory 801, processor 802, and communications component 803;
a memory 801 for storing a computer program.
The communication component 803 is configured to receive a frame message packet, where the frame message packet carries an operation result and a frame packet identifier corresponding to the operation result.
A processor 802 for executing the computer program for: and displaying the operation result and receiving an operation instruction aiming at the operation result.
And the communication component 803 is configured to return the operation instruction and the frame packet identifier corresponding to the operation result through the frame data packet, so as to verify the operation instruction.
Further, communications component 803 is further configured to: receiving the caching quantity of the currently cached frame data packets of the server; a processor 802, further configured to: determining the target number of frame data packets in preset time; and determining whether to change the running frame rate of the self according to the buffer amount and the target amount.
Further, the processor 802 is further configured to: and if the buffer amount is larger than the target amount, determining to reduce the self running frame rate.
Further, the processor 802 is further configured to: and if the buffer amount is less than the target amount, determining to increase the self running frame rate.
In addition, for the content that the present apparatus 800 cannot be described in detail, reference may also be made to the respective steps in the apparatus 700 described above.
In addition, embodiments of the present invention provide a computer storage medium, and the computer program, when executed by one or more processors, causes the one or more processors to implement the steps of a synchronization verification method of data in the method embodiment of fig. 4.
In addition, in some of the flows described in the above embodiments and the drawings, a plurality of operations are included in a specific order, but it should be clearly understood that the operations may be executed out of the order presented herein or in parallel, and the sequence numbers of the operations, such as 201, 202, 203, etc., are merely used for distinguishing different operations, and the sequence numbers themselves do not represent any execution order. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course, can also be implemented by a combination of hardware and software. With this understanding in mind, the above-described aspects and portions of the present technology which contribute substantially or in part to the prior art may be embodied in the form of a computer program product, which may be embodied on one or more computer-usable storage media having computer-usable program code embodied therein, including without limitation disk storage, CD-ROM, optical storage, and the like.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable multimedia data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable multimedia data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable multimedia data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable multimedia data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (15)
1. A synchronous verification method of data is applied to a server side, and the running frame rate of a client side installed on a terminal is larger than that of the server side within a preset range in a preset time, and the method comprises the following steps:
receiving a first frame data packet, wherein the frame data packet carries a first operation instruction and a first frame packet identifier, executing the first operation instruction, and acquiring a first operation result;
storing the corresponding relation between the first operation result and the first frame packet identifier to a corresponding buffer queue;
and sending the first operation result to a plurality of corresponding terminals through a frame message packet, wherein the frame message packet carries a second frame packet identifier corresponding to the first frame packet identifier, so that after receiving the frame message packet, the terminals return a second operation instruction and a frame packet identifier corresponding to an operation result before the second operation instruction through a second frame data packet, and the second operation instruction is verified.
2. The method of claim 1, further comprising:
receiving a second frame data packet returned by the at least one terminal, and acquiring a frame packet identifier corresponding to an operation result in the second frame data packet before the second operation instruction;
based on the frame packet identifier, performing operation verification on a second operation instruction carried by the second frame data packet;
and after the verification is passed, sending a second operation result to the corresponding terminal.
3. The method of claim 2, wherein the verifying the second operation instruction carried by the second frame data packet based on the frame packet identifier comprises:
if the frame packet identifier is the second frame packet identifier, determining that the second operation instruction is an operation instruction for the first operation result according to the corresponding relation between the second frame packet identifier and the first frame packet identifier and the corresponding relation between the first frame packet identifier and the first operation result, and passing the verification.
4. The method of claim 1, further comprising:
receiving a frame starting message packet sent by at least one terminal, and determining a frame packet starting identifier of the frame starting message packet;
determining a current frame identifier of a server, and creating a corresponding relation between the frame packet starting identifier and the frame identifier;
and determining the frame packet identifier of the terminal to be received according to the corresponding relation between the frame packet starting identifier and the frame identifier.
5. The method of claim 1, further comprising:
acquiring the buffer amount of a frame data packet currently buffered, and sending the buffer amount to a corresponding terminal, so that the terminal determines whether to change the running frame rate of the terminal according to the buffer amount and the target amount within the preset time; or the like, or, alternatively,
acquiring the caching quantity of the currently cached frame data packets;
determining the target number of frame data packets of the terminal in a preset time;
determining whether to change the running frame rate of the terminal according to the cache number and the target number;
and if so, sending a message for changing the running frame rate to the terminal.
6. The method of claim 5, wherein the determining whether to change the operating frame rate of the terminal itself comprises:
if the cache number is larger than the target number, determining to reduce the self running frame rate of the terminal;
if so, sending a message for changing the running frame rate to the terminal, wherein the message comprises: a message is sent to the terminal that reduces the operating frame rate.
7. The method of claim 5, wherein the determining whether to change the operating frame rate of the terminal itself comprises:
if the cache number is smaller than the target number, determining to increase the running frame rate of the terminal;
if so, sending a message for changing the running frame rate to the terminal, wherein the message comprises: a message is sent to the terminal to increase the operating frame rate.
8. A synchronous verification method of data is applied to a terminal, and the running frame rate of the terminal is greater than that of a service end within a preset range in a preset time, and the method comprises the following steps:
receiving a frame message packet, wherein the frame message packet carries an operation result and a frame packet identifier corresponding to the operation result;
displaying the operation result and receiving an operation instruction aiming at the operation result;
and returning the operation instruction and the frame packet identifier corresponding to the operation result through a frame data packet so as to verify the operation instruction.
9. The method of claim 8, further comprising:
receiving the caching quantity of the currently cached frame data packets of the server;
determining the target number of frame data packets in preset time;
and determining whether to change the running frame rate of the self according to the buffer amount and the target amount.
10. The method of claim 8, wherein determining whether to change the running frame rate of the mobile device according to the buffer amount and the target amount comprises:
and if the buffer amount is larger than the target amount, determining to reduce the self running frame rate.
11. The method of claim 8, further comprising:
and if the buffer amount is less than the target amount, determining to increase the self running frame rate.
12. A system for synchronizing data, comprising: the system comprises a server and a terminal, wherein in a preset time, the running frame rate of the terminal is greater than that of the server in a preset range:
the server receives a first frame data packet, the frame data packet carries a first operation instruction and a first frame packet identifier, and executes the first operation instruction to obtain a first operation result;
storing the corresponding relation between the operation result and the first frame packet identifier to a corresponding storage queue;
sending the operation result to a plurality of corresponding terminals through a frame message packet, wherein the frame message packet carries a second frame packet identifier corresponding to the first frame packet identifier;
the terminal displays the operation result after receiving the frame message packet and receives a second operation instruction aiming at the operation result;
and returning the second operation instruction and the frame packet identifier corresponding to the operation result through a second frame data packet so as to verify the second operation instruction.
13. A computing device, characterized by a memory, a processor, and a communications component;
the memory for storing a computer program;
the communication component is used for receiving a first frame data packet, and the frame data packet carries a first operation instruction and a first frame packet identifier;
the processor to execute the computer program to: executing a first operation instruction to obtain a first operation result;
storing the corresponding relation between the first operation result and the first frame packet identifier to a corresponding storage queue;
the communication component is configured to send the first operation result to a plurality of corresponding terminals through a frame message packet, where the frame message packet carries a second frame packet identifier corresponding to the first frame packet identifier, so that after receiving the frame message packet, the terminal returns a second operation instruction and a frame packet identifier corresponding to an operation result of the second operation instruction through a second frame data packet to verify the second operation instruction, and an operation frame rate of a client installed in the terminal is greater than an operation frame rate of a server within a preset range in a preset time.
14. A computing device, characterized by a memory, a processor, and a communications component;
the memory for storing a computer program;
the communication component is used for receiving a frame message packet, and the frame message packet carries an operation result and a frame packet identifier corresponding to the operation result;
the processor to execute the computer program to:
displaying the operation result and receiving an operation instruction aiming at the operation result;
and the communication component is used for returning the operation instruction and the frame packet identifier corresponding to the operation result through the frame data packet so as to verify the operation instruction, and the running frame rate of the terminal is greater than that of the server within a preset range in a preset time.
15. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by one or more processors, causes the one or more processors to perform the steps of the method of any one of claims 1-11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010851446.0A CN112169340A (en) | 2020-08-21 | 2020-08-21 | Data synchronization verification method, system, computing device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010851446.0A CN112169340A (en) | 2020-08-21 | 2020-08-21 | Data synchronization verification method, system, computing device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112169340A true CN112169340A (en) | 2021-01-05 |
Family
ID=73924273
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010851446.0A Pending CN112169340A (en) | 2020-08-21 | 2020-08-21 | Data synchronization verification method, system, computing device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112169340A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113144620A (en) * | 2021-05-20 | 2021-07-23 | 北京字节跳动网络技术有限公司 | Detection method, device, platform, readable medium and equipment for frame synchronization game |
CN115025495A (en) * | 2022-06-02 | 2022-09-09 | 北京新唐思创教育科技有限公司 | Role model synchronization method and device, electronic equipment and storage medium |
CN117046103A (en) * | 2023-07-18 | 2023-11-14 | 广州三七极梦网络技术有限公司 | Game fight processing method, device, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107431832A (en) * | 2015-03-13 | 2017-12-01 | 美国莱迪思半导体公司 | The synchronization of the ciphering process of striding equipment is maintained by sending frame number |
CN107485857A (en) * | 2017-07-24 | 2017-12-19 | 湖南搜云网络科技股份有限公司 | On the processing method of online game equipment identification code, central server and storage medium |
CN109040208A (en) * | 2018-07-18 | 2018-12-18 | 广州多益网络股份有限公司 | Method of data synchronization, server, system and medium based on multi-client interaction |
CN109766361A (en) * | 2018-12-19 | 2019-05-17 | 中国平安人寿保险股份有限公司 | Data cached read method, device, computer equipment and storage medium |
CN110166519A (en) * | 2018-11-20 | 2019-08-23 | 腾讯数码(天津)有限公司 | A kind of method and relevant apparatus of synchronizing information |
-
2020
- 2020-08-21 CN CN202010851446.0A patent/CN112169340A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107431832A (en) * | 2015-03-13 | 2017-12-01 | 美国莱迪思半导体公司 | The synchronization of the ciphering process of striding equipment is maintained by sending frame number |
CN107485857A (en) * | 2017-07-24 | 2017-12-19 | 湖南搜云网络科技股份有限公司 | On the processing method of online game equipment identification code, central server and storage medium |
CN109040208A (en) * | 2018-07-18 | 2018-12-18 | 广州多益网络股份有限公司 | Method of data synchronization, server, system and medium based on multi-client interaction |
CN110166519A (en) * | 2018-11-20 | 2019-08-23 | 腾讯数码(天津)有限公司 | A kind of method and relevant apparatus of synchronizing information |
CN109766361A (en) * | 2018-12-19 | 2019-05-17 | 中国平安人寿保险股份有限公司 | Data cached read method, device, computer equipment and storage medium |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113144620A (en) * | 2021-05-20 | 2021-07-23 | 北京字节跳动网络技术有限公司 | Detection method, device, platform, readable medium and equipment for frame synchronization game |
CN115025495A (en) * | 2022-06-02 | 2022-09-09 | 北京新唐思创教育科技有限公司 | Role model synchronization method and device, electronic equipment and storage medium |
CN117046103A (en) * | 2023-07-18 | 2023-11-14 | 广州三七极梦网络技术有限公司 | Game fight processing method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112169340A (en) | Data synchronization verification method, system, computing device and storage medium | |
Shea et al. | Cloud gaming: architecture and performance | |
US11826643B2 (en) | Reducing latency in cloud gaming applications by overlapping reception and decoding of video frames and their display | |
CN113518247B (en) | Video playing method, related equipment and computer readable storage medium | |
EP3807766B1 (en) | Shadow tracking of real-time interactive simulations for complex system analysis | |
CN108877804B (en) | Voice service method, system, electronic device and storage medium | |
CN108310766B (en) | Data processing method and device, storage medium, processor and terminal | |
CN102594876B (en) | The mixing accelerating system of game real time data and more new data | |
US11563992B2 (en) | Video playback quality detection method and apparatus | |
CN109246004B (en) | Network data acceleration method, client, router and server | |
JP2022550440A (en) | Superposition of encoding and transmission at the server | |
CN114339444A (en) | Method, device and equipment for adjusting playing time of video frame and storage medium | |
CN111773661B (en) | System, method and device for team formation game based on live broadcast interface | |
CN112386906B (en) | Media resource playing method and device, storage medium and electronic equipment | |
CN115643441A (en) | Video playing method, device, equipment, readable storage medium and program product | |
CN113489786B (en) | Reconnection method and retransmission method for weak network of long connection network | |
CN112843673B (en) | Intelligent networking hand-trip equipment | |
CN112152975B (en) | Audio data processing method and device | |
CN107017978B (en) | Information synchronization method and device between terminal devices | |
CN113014961A (en) | Video pushing and transmitting method, visual angle synchronizing method and device and storage medium | |
US20240024767A1 (en) | Selective game logic processing by a game server | |
WO2024131383A1 (en) | Data processing method and related apparatus | |
CN111556515A (en) | 3D image rendering instruction transmission method and system for mobile phone game | |
CN116546072A (en) | Virtual reality scene position synchronization method and device | |
CN116236773A (en) | Multi-user on-screen online method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |