Method, device, storage medium and computer equipment for processing online game anomalies

By calculating the frame rate of the game screen in real time and cacheing status update notification messages, the frame processing logic is executed, which solves the problem of client jam caused by network exceptions and improves game fluency.

CN113350782BActive Publication Date: 2024-11-08NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202110662856.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-15
Publication Date
2024-11-08
Estimated Expiration
2041-06-15

AI Technical Summary

Technical Problem

When the network is abnormal, the client cannot receive the status update information sent by the server in time, resulting in a stuck phenomenon when the network is restored. Especially in scenarios with large computing volume, the client will be stuck almost 100%.

Method used

By calculating the frame rate of the game screen in real time, and cache the status update notification message in the queue when the network is restored, until these logic is executed within each frame duration when the game screen is refreshed. If it is not executed within the current frame duration, Continue to execute within the next frame duration until all logic is executed.

Benefits of technology

Eliminates the phenomenon of client stuck during network recovery, making the game screen smoother, and avoids screen stuttering caused by large amounts of logic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113350782B_ABST
    Figure CN113350782B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a method, device, storage medium and computer equipment for processing network game anomalies. The method includes: calculating the frame rate of the game screen in real time; receiving at least one status update notification message sent by the server when the network begins to recover, and caching the status update notification message in a queue; when refreshing the game screen according to the frame rate of the game screen calculated in real time, executing the logic corresponding to the status update notification message within each frame duration; if the logic corresponding to all the status update notification messages in the queue has not been executed within the current frame duration, then executing the logic corresponding to the remaining status update notification messages in the queue within the next frame duration of the current frame, until the logic corresponding to all the status update notification messages in the queue is executed. The technical solution provided by the embodiments of the present application can eliminate the screen freeze caused by the need to execute more logic within a frame duration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, in particular to the field of electronic games, and specifically to a method, device, storage medium and computer equipment for processing network game anomalies. Background Art

[0002] In order to achieve network synchronization between the server and the client during the game, the server and the client need to exchange necessary information. At present, the network synchronization between the server and the client during the game generally includes frame synchronization and state synchronization. Among them, state synchronization means that data calculation occurs on the server, and the client only receives messages from the server. When the server sends status update information, the client displays and updates the status.

[0003] The above existing game state synchronization generally does not have any problems when the network is normal. When the network is abnormal, the client cannot receive the status update information sent by the server in time and needs to wait for the network to recover. However, when the network begins to recover, the client may get stuck because it needs to re-execute all the logic from the network abnormality to the network recovery. Especially in scenes with excessive computing power (for example, rich special effects), the client will almost 100% get stuck. Summary of the invention

[0004] The embodiments of the present application provide a method, apparatus, storage medium and computer equipment for processing online game anomalies to eliminate the phenomenon of client freezing during network recovery.

[0005] The present application embodiment provides a method for processing an abnormality of an online game, including:

[0006] Calculate the frame rate of the game screen in real time;

[0007] receiving at least one status update notification message sent by the server when the network starts to recover, and caching the status update notification message in a queue;

[0008] When refreshing the game screen according to the frame rate of the game screen calculated in real time, executing the logic corresponding to the status update notification message within each frame duration;

[0009] If the logic corresponding to all the status update notification messages in the queue has not been executed within the current frame duration, the logic corresponding to the remaining status update notification messages in the queue will be executed within the next frame duration of the current frame until the logic corresponding to all the status update notification messages in the queue is executed.

[0010] Optionally, the real-time calculation of the frame rate of the game screen includes: calculating the frame rate of the game screen in real time based on a Kalman filter according to a frame rate setting value and a frame rate prediction value of the game screen.

[0011] Optionally, before calculating the frame rate of the game screen in real time based on the Kalman filter according to the frame rate setting value and the frame rate prediction value of the game screen, the method further includes: iterating the parameters of the Kalman filter according to the frame rate setting value matrix and a preset number of iterations; calculating the likelihood values ​​of the frame rate prediction value covariance matrix and the frame rate setting value covariance matrix according to the frame rate setting value matrix and the frame rate prediction value matrix corresponding to the current frame; judging whether the difference between the likelihood value of the current frame of the game screen and the likelihood value of the previous frame is less than a preset difference threshold; if the difference between the likelihood value of the current frame of the game screen and the likelihood value of the previous frame is less than a preset difference threshold, It is determined that the iteration of the parameters of the Kalman filter is completed; if the difference between the likelihood values ​​of the current frame and the previous frame of the game screen is not less than a preset difference threshold, the frame rate setting value matrix and the frame rate prediction value matrix corresponding to the current frame are updated, and the likelihood values ​​of the updated frame rate setting value matrix and the frame rate prediction value matrix are continued to be calculated until the difference between the likelihood values ​​of the current frame and the previous frame of the game screen is less than the preset difference threshold or the number of iterations reaches the preset iteration threshold, then it is determined that the iteration is completed; the corresponding frame rate prediction value covariance matrix and frame rate setting value covariance matrix after the iteration are completed are determined as the parameters of the Kalman filter.

[0012] Optionally, the receiving of at least one status update notification message sent by the server when the network starts to recover, and caching the status update notification message in a queue, includes: receiving at least one call request sent by the server when the network starts to recover through a remote procedure call interface, and caching the call request in a queue; when refreshing the game screen according to the frame rate of the game screen calculated in real time, executing the logic corresponding to the status update notification message within each frame duration, includes: when refreshing the game screen according to the frame rate of the game screen calculated in real time, executing the logic corresponding to the function within each frame duration by executing the function called by the call request.

[0013] Optionally, caching the call request in a queue includes: if the at least one call request includes n call requests, judging whether there is execution redundancy when the n logics are executed based on the association between the n logics corresponding to the n call requests, where n is a natural number greater than or equal to 2; if there is execution redundancy, abandoning the caching of the call request corresponding to the logic with execution redundancy.

[0014] Optionally, when the game screen is refreshed according to the frame rate of the game screen calculated in real time, the logic corresponding to the function is executed within each frame duration by executing the function called by the call request, including: making a margin adjustment to the frame rate of the game screen calculated in real time to obtain an adjusted frame rate of the game screen, wherein the adjusted frame rate is less than the frame rate of the game screen calculated in real time; calculating the duration of each frame after the frame rate is adjusted according to the adjusted frame rate of the game screen; when the game screen is refreshed according to the adjusted frame rate of the game screen, executing the logic corresponding to the function within each frame duration after the frame rate is adjusted.

[0015] Optionally, when the game screen is refreshed according to the frame rate of the game screen calculated in real time, before executing the logic corresponding to the status update notification message within each frame duration, it also includes: if the at least one status update notification message cached in the queue includes n status update notification messages, then based on the association between the n logics corresponding to the n status update notification messages, it is determined whether there is execution redundancy when the n logics are executed, where n is a natural number greater than or equal to 2; if there is execution redundancy, deleting the status update notification message corresponding to the logic with execution redundancy from the queue.

[0016] Optionally, caching the status update notification message in a queue includes: caching the status update notification message in at least two queues; determining a priority processing queue from the timestamps of the at least two queues based on the timestamps of the at least two queues, and marking other queues as suspended queues, and the timestamps of the queues are updated in real time based on the timestamps of the status update notification messages in the queues.

[0017] Optionally, caching the status update notification message in a queue includes: constructing an inner circular queue based on an array and an outer circular queue based on a linked list; setting a management pointer of the outer circular queue; and caching the status update notification message in the inner circular queue based on the array according to the management pointer of the outer circular queue.

[0018] The embodiment of the present application also provides a device for processing anomalies in online games, including:

[0019] A calculation module, used to calculate the frame rate of the game screen in real time;

[0020] A cache module, used to receive at least one status update notification message sent by the server when the network starts to recover, and cache the status update notification message in a queue;

[0021] A first execution module, configured to execute logic corresponding to the status update notification message within each frame duration when refreshing the game screen according to the frame rate of the game screen calculated in real time;

[0022] The second execution module is used to execute the logic corresponding to the remaining status update notification messages in the queue within the next frame duration of the current frame if the logic corresponding to all the status update notification messages in the queue has not been executed within the current frame duration, until the logic corresponding to all the status update notification messages in the queue is executed.

[0023] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for a processor to load and execute the steps in the method for processing online game anomalies as described in any of the above embodiments.

[0024] An embodiment of the present application also provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps in the method for processing online game anomalies as described in any of the above embodiments by calling the computer program stored in the memory.

[0025] From the technical solution provided in the above-mentioned embodiment of the present application, it can be seen that, on the one hand, since the frame rate of the game screen is calculated in real time, it is possible to make the game screen smooth; on the other hand, when the game screen is refreshed according to the frame rate of the game screen adjusted in real time, when the logic corresponding to all the status update notification messages is not executed within the current frame duration, the logic corresponding to the remaining status update notification messages is executed within the next frame duration of the current frame, that is, the logic corresponding to all the status update notification messages in the queue is not forcibly executed within the duration of one frame, but when the logic corresponding to the status update notification messages is more, frame processing is performed, thereby also being able to eliminate screen freezes caused by the need to execute more logic within one frame duration. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0027] Figure 1 A system diagram of an apparatus for processing online game anomalies provided in an embodiment of the present application.

[0028] Figure 2 A flowchart of a method for processing online game anomalies provided in an embodiment of the present application.

[0029] Figure 3 A schematic diagram of adjusting the frame rate of a game screen calculated in real time according to an embodiment of the present application.

[0030] Figure 4 A schematic diagram of the logic corresponding to all status update notification messages in the frame execution queue provided in an embodiment of the present application.

[0031] Figure 5 A schematic diagram of the structure of an apparatus for processing online game anomalies provided in an embodiment of the present application.

[0032] Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0034] The embodiment of the present application provides a method, device, storage medium and computer equipment for processing network game anomalies. Specifically, the method for processing network game anomalies in the embodiment of the present application can be performed by a computer device, wherein the computer device can be a terminal or a server. The terminal can be a terminal device such as a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA), etc. The terminal can also include a client, which can be a game application client, a browser client carrying a game program, or an instant messaging client, etc. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and basic cloud computing services such as big data and artificial intelligence platforms.

[0035] For example, when the method for processing an abnormality of an online game is run on a terminal, the terminal device stores a game application and is used to present a virtual scene in the game screen. The terminal device is used to interact with the user through a graphical user interface, for example, by downloading and installing a game application through the terminal device and running it. The terminal device may provide the graphical user interface to the user in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal device, or the graphical user interface may be presented through a holographic projection. For example, the terminal device may include a touch display screen and a processor, the touch display screen is used to present a graphical user interface and receive an operation instruction generated by a user acting on the graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, respond to an operation instruction, and control the display of the graphical user interface on the touch display screen.

[0036] For example, when the method for handling network game anomalies is run on a server, it can be a cloud game. Cloud gaming refers to a gaming method based on cloud computing. In the operation mode of cloud gaming, the operating subject of the game application and the subject of the game screen presentation are separated, and the storage and operation of the method for handling network game anomalies are completed on the cloud gaming server. The game screen presentation is completed on the client of the cloud gaming. The cloud gaming client is mainly used for receiving and sending game data and presenting the game screen. For example, the cloud gaming client can be a display device with data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a handheld computer, a personal digital assistant, etc., but the terminal device for processing game data is a cloud gaming server in the cloud. When playing the game, the user operates the cloud gaming client to send an operation instruction to the cloud gaming server. The cloud gaming server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the cloud gaming client through the network. Finally, the cloud gaming client decodes and outputs the game screen.

[0037] See also Figure 1 , Figure 1A system diagram of a device for processing abnormal network games provided by an embodiment of the present application. The system may include at least one terminal 1000, at least one server 2000, at least one database 3000, and a network 4000. The terminal 1000 held by the user can be connected to the servers of different games through the network 4000. The terminal 1000 is any device with computing hardware that can support and execute software products corresponding to the game. In addition, the terminal 1000 has one or more multi-touch screens for sensing and obtaining the input of the user through the touch or sliding operation performed at multiple points of one or more touch-controlled display screens. In addition, when the system includes multiple terminals 1000, multiple servers 2000, and multiple networks 4000, different terminals 1000 can be connected to each other through different networks 4000 and different servers 2000. The network 4000 can be a wireless network or a wired network, such as a wireless network for a wireless local area network (WLAN), a local area network (LAN), a cellular network, a 2G network, a 3G network, a 4G network, a 5G network, etc. In addition, different terminals 1000 can also use their own Bluetooth network or hotspot network to connect to other terminals or to servers, etc. For example, multiple users can be online through different terminals 1000 and connected and synchronized with each other through appropriate networks to support multi-player games. In addition, the system may include multiple databases 3000, which are coupled to different servers 2000, and information related to the game environment can be continuously stored in the databases 3000 when different users are online playing multi-player games.

[0038] The embodiment of the present application provides a method for processing an abnormality of an online game, which can be executed by a terminal or a server. The embodiment of the present application takes the method for processing an abnormality of an online game executed by a terminal as an example for explanation. Among them, the terminal includes a touch display screen and a processor, and the touch display screen is used to present a graphical user interface and receive an operation instruction generated by a user acting on the graphical user interface. When the user operates the graphical user interface through the touch display screen, the graphical user interface can control the local content of the terminal by responding to the received operation instruction, and can also control the content of the opposite server by responding to the received operation instruction. For example, the operation instruction generated by the user acting on the graphical user interface includes an instruction for starting a game application, and the processor is configured to start the game application after receiving the instruction to start the game application provided by the user. In addition, the processor is configured to render and draw a graphical user interface associated with the game on the touch display screen. The touch display screen is a multi-touch sensitive screen that can sense touch or sliding operations performed simultaneously at multiple points on the screen. The user uses a finger to perform a touch operation on the graphical user interface, and when the graphical user interface detects the touch operation, different virtual objects in the graphical user interface of the game are controlled to perform actions corresponding to the touch operation. For example, the game can be any of the games such as casual games, action games, role-playing games, strategy games, sports games, puzzle games, etc. Among them, the game can include a virtual scene of the game drawn on a graphical user interface. In addition, the virtual scene of the game can include one or more virtual objects controlled by a user (or player), such as a virtual character. In addition, the virtual scene of the game can also include one or more obstacles, such as railings, gullies, walls, etc., to limit the movement of virtual objects, such as limiting the movement of one or more objects to a specific area within the virtual scene. Optionally, the virtual scene of the game also includes one or more elements, such as skills, scores, character health status, energy, etc., to provide help to players, provide virtual services, increase scores related to player performance, etc. In addition, the graphical user interface can also present one or more indicators to provide indication information to the player. For example, the game can include a virtual object controlled by a player and one or more other virtual objects (such as an enemy character). In one embodiment, one or more other virtual objects are controlled by other players of the game. For example, one or more other virtual objects can be controlled by a computer, such as a robot using an artificial intelligence (AI) algorithm, to achieve a man-machine battle mode. For example, a virtual object has various skills or abilities that game players use to achieve their goals. For example, a virtual object has one or more weapons, props, tools, etc. that can be used to eliminate other objects from the game. Such skills or abilities can be activated by a game player using one of a plurality of preset touch operations with the touch display screen of the terminal. The processor can be configured to present a corresponding game screen in response to an operation instruction generated by the user's touch operation.

[0039] See also Figure 2 , which is a flow chart of a method for handling online game anomalies provided in an embodiment of the present application. Figure 2 The technical solution of the present application is described with the first game server as the execution entity, wherein the first game server is a server that runs the first game. Figure 2 The exemplary method mainly includes steps S201 to S204, which are described in detail as follows:

[0040] Step S201, calculating the frame rate of the game screen in real time.

[0041] The frame rate of the game screen can be represented by the number of frames per second (Frames Per Second, FPS) of the game screen. Generally speaking, under the premise of stable frame rate, the higher the frame rate, the smoother the game screen. However, based on many reasons (for example, the processing power of the central processing unit of the terminal device, the degree of tension of the memory, the number of parallel processes, etc.), the frame rate will be in a fluctuating state, that is, the frame rate is sometimes high and sometimes low, and the degree of disparity can be represented by the frame rate variance. Although a higher frame rate will bring the smoothness of the game screen, however, compared with a smaller frame rate, a frame rate with too large a fluctuation range may bring the player a stronger feeling of not smooth game screen. For example, the average frame rate is 50 frames and the variance is 10 frames of the game screen, and the player's feeling is that its smoothness is lower than the average frame rate of 40 frames and the variance is 2 frames of the game screen. Based on the above facts, in the embodiment of the present application, the frame rate of the game screen can be calculated in real time, in order to obtain a frame rate that makes the game screen smoother. As an embodiment of the present application, real-time calculation of the frame rate of the game screen can be: according to the frame rate setting value and frame rate prediction value of the game screen, the frame rate of the game screen is calculated in real time based on the Kalman filter, wherein the frame rate setting value of the game screen is set by the game player according to actual conditions, and the frame rate prediction value, whose initial value is a frame rate specified at initialization, is subsequently predicted by the Kalman filter; the Kalman filter is used to smooth the frame rate of the game screen so that its variance reaches the minimum value or a preset threshold.

[0042] In one embodiment of the present application, the parameters of the Kalman filter may be determined in advance, that is, before the frame rate of the game screen is calculated in real time based on the Kalman filter according to the frame rate setting value and the frame rate prediction value of the game screen, the parameters of the Kalman filter may be determined through the following steps S2011 to S2016:

[0043] Step S2011: iterate the parameters of the Kalman filter according to the frame rate setting value matrix and the preset number of iterations.

[0044] Step S2012: Calculate the likelihood values ​​of the frame rate prediction value covariance matrix and the frame rate setting value covariance matrix according to the frame rate setting value matrix and the frame rate prediction value matrix corresponding to the current frame.

[0045] The likelihood value of the frame rate prediction value covariance matrix and the frame rate setting value covariance matrix is ​​a representation of the similarity between the frame rate prediction value covariance matrix and the frame rate setting value covariance matrix. If the two are not too large, it can also indicate that the frame rate prediction value and the frame rate setting value are both within a reasonable range.

[0046] Step S2013: Determine whether the difference between the likelihood value of the current frame of the game screen and the likelihood value of the previous frame is less than a preset difference threshold.

[0047] Step S2014: If the difference between the likelihood values ​​of the current frame and the previous frame of the game screen is less than a preset difference threshold, it is determined that the iteration of the parameters of the Kalman filter is completed.

[0048] If the difference in likelihood between the current frame and the previous frame of the game screen is less than the preset difference threshold, it means that the parameters of the Kalman filter at this time have reached the optimal level, that is, the variance of the frame rate calculated by the Kalman filter model determined by the parameters is the smallest. Therefore, the iteration of the Kalman filter parameters can be stopped.

[0049] Step S2015: If the difference between the likelihood values ​​of the current frame and the previous frame of the game screen is not less than a preset difference threshold, the frame rate setting value matrix and the frame rate prediction value matrix corresponding to the current frame are updated, and the likelihood values ​​of the updated frame rate setting value matrix and the frame rate prediction value matrix are continued to be calculated until the difference between the likelihood values ​​of the current frame and the previous frame of the game screen is less than the preset difference threshold or the number of iterations reaches the preset iteration threshold, then it is determined that the iteration is completed.

[0050] Step S2016: Determine the corresponding frame rate prediction value covariance matrix and frame rate setting value covariance matrix after the iteration as parameters of the Kalman filter.

[0051] When the parameters of the Kalman filter are determined through the iteration of the above-mentioned steps S2011 to S2013 and the mathematical model of the Kalman filter is obtained, the frame rate of the game screen can be calculated based on the frame rate setting value and the frame rate prediction value of the game screen. The frame rate is also the frame rate at which the variance reaches the minimum or the preset threshold.

[0052] It should be noted that, since the frame rate of the game screen is calculated in real time, step S201 can be executed at any position from step S202 to step S204.

[0053] Step S202: Receive at least one status update notification message sent by the server when the network starts to recover, and cache the status update notification message in a queue.

[0054] In an embodiment of the present application, at least one status update notification message sent by the server is actually a message sent by the server during the period from when the network fails to when the network begins to recover, but cannot be received by the game terminal due to the network failure. When the network begins to recover, these status update notification messages will be transmitted to the game terminal through the restored network. As an embodiment of the present application, receiving at least one status update notification message sent by the server when the network begins to recover, and caching the status update notification message in a queue can be: receiving at least one call request sent by the server when the network begins to recover through a remote procedure call interface, and caching the call request in a queue.

[0055] For online games, the work to be done after the network is restored is to synchronize the status of the server and each client. However, status synchronization does not mean that the logic corresponding to each status update notification message needs to be executed. For example, for status update notification message 1 and status update notification message 2, the logic corresponding to status update notification message 1 is to delete the special effect S that uses a certain resource R, and the logic corresponding to status update notification message 2 is to create the special effect S using the certain resource R. In addition, status update notification message 1 is delivered to the terminal before status update notification message 2, or status update notification message 2 and status update notification message 1 are delivered to the terminal successively with a very short interval time. Since the special effect S is required to be deleted before it is created or is deleted almost immediately after creation, then executing the logic corresponding to status update notification message 1 and status update notification message 2 is considered to be redundant. For example, status update The logic corresponding to notification message 3 is to move character M from the current position to position A, the logic corresponding to status update notification message 4 is to move character M from the current position to position B, and the logic corresponding to status update notification message 5 is to move character M from the current position to position C, that is, the final result is to move character M from the current position to position C. From the perspective of state synchronization, it is only necessary to move character M from the current position to position C to achieve state synchronization of each client. Therefore, although status update notification message 3 and status update notification message 4 are received, it is unnecessary to execute the logic corresponding to status update notification message 3 and status update notification message 4. That is, when status update notification message 3, status update notification message 4 and status update notification message 5 are received, still executing the logic corresponding to status update notification message 3 and status update notification message 4 is considered as execution redundancy. Based on the above facts, after receiving at least one call request sent by the server when the network starts to recover through the remote procedure call interface, caching the call request in the queue can be: if the at least one call request includes n call requests, then according to the association between the n logics corresponding to the n call requests, it is determined whether there is execution redundancy when the n logics are executed; if there is execution redundancy, the cache of the call request corresponding to the logic with execution redundancy is abandoned, wherein n is a natural number greater than or equal to 2, and the logic execution redundancy includes that in view of the association between the logic and other logics, when one or more other logics are executed, the execution of the logic is not necessary from the perspective of state synchronization. Once the cache of the call request corresponding to the logic with execution redundancy is abandoned, it means that the call request will not be taken out from the queue in the future to implement the call request to the function and execute the corresponding logic.

[0056] In the above embodiment, the cache of the call request corresponding to the logic with execution redundancy has been abandoned before the call request is cached in the queue. In another embodiment of the present application, the state update notification message corresponding to the logic with execution redundancy can also be removed after the state update notification message is cached in the queue, that is, if at least one state update notification message cached in the queue includes n state update notification messages, before step S203, it can be determined whether there is execution redundancy when the n logics are executed based on the association between the n logics corresponding to the n state update notification messages. If there is execution redundancy, the state update notification message corresponding to the logic with execution redundancy is deleted from the queue, wherein n is a natural number greater than or equal to 2, and the definition of logic execution redundancy is the same as the definition of logic execution redundancy mentioned in the above embodiment, and will not be repeated.

[0057] Step S203, when refreshing the game screen according to the frame rate of the game screen calculated in real time, the logic corresponding to the status update notification message is executed within each frame duration.

[0058] For the status update notification messages sent by the server but unable to be received by the game terminal due to the network failure during the period from the time when the network fails to the time when the network begins to recover, the processing method of the prior art is that no matter how many status update notification messages there are, the logic corresponding to all status update notification messages is processed immediately after receiving these status update notification messages. Under the premise that the frame length of the game screen is fixed, when there are too many status update notification messages, the result brought about by the above-mentioned existing method is the freeze of the game screen. However, in the embodiment of the present application, the logic corresponding to these status update notification messages is not executed immediately after receiving the status update notification messages, but the status update notification messages are cached in the queue, and then, when the game screen is refreshed according to the frame rate of the game screen calculated in real time, the logic corresponding to the status update notification message is executed within each frame length. In other words, the technical solution of the present application is not to execute the logic corresponding to all status update notification messages immediately after receiving the status update notification messages, but to process them frame by frame after caching.

[0059] In response to receiving at least one status update notification message sent by the server when the network starts to recover, caching the status update notification message in a queue is: receiving at least one call request sent by the server when the network starts to recover through a remote procedure call interface, caching the call request in a queue. In one embodiment of the present application, when refreshing the game screen according to the frame rate of the game screen calculated in real time, executing the logic corresponding to the status update notification message in each frame duration can be: when refreshing the game screen according to the frame rate of the game screen calculated in real time, executing the logic corresponding to the function in each frame duration by executing the function called by the call request. Further, considering that when the game screen is refreshed, it is necessary not only to execute the logic corresponding to the function called by the call request, but also to execute calculation work such as UI redeployment and screen re-rendering, therefore, even if the frame rate of the game screen is calculated in real time according to step S201, in actual scenarios, the game screen cannot be completely refreshed according to the frame rate of the game screen calculated in real time, and the frame rate of the game screen calculated in real time needs to be adjusted, so as to reserve time for executing calculation work such as UI redeployment and screen re-rendering in each frame of the game screen. Based on the above facts, in one embodiment of the present application, when refreshing the game screen according to the frame rate of the game screen calculated in real time, by executing the function called by the call request, the logic corresponding to the function is executed in each frame duration, which can be implemented by steps S2031 to S2033, as described below:

[0060] Step S2031: performing margin adjustment on the frame rate of the game screen obtained by real-time calculation to obtain an adjusted frame rate of the game screen, wherein the adjusted frame rate is less than the frame rate of the game screen obtained by real-time calculation.

[0061] In the embodiment of the present application, the size of the frame rate margin adjustment can be set according to the actual application scenario. In principle, the lower the complexity of the game screen, the greater the frame rate of the game screen calculated in real time, and the smaller the size of the frame rate margin adjustment. For example, assuming that the frame rate of the game screen calculated in real time is 50 frames per second through step S201, the frame rate of the calculated game screen can be reduced by 6% according to the complexity of the game screen, that is, the frame rate of the calculated game screen is multiplied by 94%, and the adjusted frame rate of the game screen is 47 frames per second.

[0062] Step S2032: Calculate the duration of each frame after the frame rate is adjusted according to the adjusted frame rate of the game screen.

[0063] According to the definition of frame rate, the duration of each frame after the frame rate adjustment can be calculated according to the adjusted frame rate of the game screen. For example, in step S2031, when the adjusted frame rate of the game screen is 47 frames per second, the duration of each frame after the frame rate adjustment is 1 / 47≈21.3ms (milliseconds).

[0064] Step S2033: when refreshing the game screen according to the adjusted frame rate of the game screen, executing the logic corresponding to the function within each frame duration after the frame rate is adjusted.

[0065] Since the frame rate is inversely proportional to the frame length, when the adjusted frame rate is less than the frame rate of the game screen calculated in real time, the length of each frame after the frame rate adjustment will become longer, which also means that the system will allocate more CPU computing resources (for example, allocated CPU time) to each frame after the frame rate adjustment. Figure 3 As shown, the oblique shaded portion of the rectangular box is the frame length corresponding to the frame rate of the game screen calculated in real time, and the grid shaded portion represents the duration of each frame after the frame rate is adjusted. The extended portion, i.e., the grid shaded portion, is reserved for calculation work such as UI redeployment and screen re-rendering in each frame. Therefore, when the game screen is refreshed according to the adjusted frame rate of the game screen, the logic corresponding to the function is executed within the duration of each frame after the frame rate is adjusted, and the actual CPU time occupied is still only the oblique shaded portion of the rectangular box.

[0066] Step S204, if the logic corresponding to all the status update notification messages in the queue has not been executed within the current frame duration, the logic corresponding to the remaining status update notification messages in the queue is executed within the next frame duration of the current frame until the logic corresponding to all the status update notification messages in the queue is executed.

[0067] As mentioned above, the existing method causes the game screen to freeze because the logic corresponding to all status update notification messages is processed within one frame. The technical solution of the present application is to cache the status update notification messages and then process them in frames. In other words, if the logic corresponding to all status update notification messages in the queue has not been executed within the current frame after the aforementioned step S203, the logic corresponding to the remaining status update notification messages in the queue will be executed within the next frame of the current frame until the logic corresponding to all status update notification messages in the queue is executed. Figure 4 As shown, assuming that 20 status update notification messages are cached in the queue, and the current frame is a frame with a frame number of 3, only the logic corresponding to 6 of the 20 status update notification messages is executed within the frame duration of frame number 3, then the logic corresponding to the remaining 14 status update notification messages will be executed within the frame duration of frame number 4. If the logic corresponding to the 14 status update notification messages cannot be fully executed within the frame duration of frame number 4, for example, only the logic corresponding to 8 of the 14 status update notification messages can be executed, then the logic corresponding to the remaining 6 status update notification messages will continue to be executed within the frame duration of frame number 5, and so on, until the logic corresponding to the 20 status update notification messages are fully executed.

[0068] When the frame rate of the game screen is high, the duration of each frame may be shorter. In the above embodiment of the present application, in order to quickly capture the status update notification message from the queue when refreshing the game screen later, when caching the status update notification message in the queue, it can be specifically: cache the received status update notification message to at least two queues, then, according to the timestamps of the at least two queues, determine a priority processing queue from the timestamps of the at least two queues, and mark the other queues as suspended queues, wherein the timestamps of the queues are updated in real time according to the timestamps of the status update notification messages in the queues. When the status update notification message is subsequently captured from the priority processing queue, monitor whether there is a suspended queue in the suspended queue whose timestamp is less than the timestamp of the priority processing queue and the preset duration. If there is a suspended queue whose timestamp is less than the timestamp of the priority processing queue and the preset duration, switch the suspended queue to a new priority processing queue, mark the other queues as new suspended queues, and capture the status update notification message from the new priority processing queue. In this way, the status update notification message in the priority processing queue with the earliest timestamp can be dynamically selected, ensuring the timeliness and accuracy of capturing the status update notification message.

[0069] In order to achieve the same purpose as the above embodiment, that is, to be able to quickly capture the status update notification message from the queue when refreshing the game screen later, in another embodiment of the present application, when caching the status update notification message in the queue, it can also be specifically: constructing an inner circular queue based on an array and an outer circular queue based on a linked list, setting a management pointer of the outer circular queue based on the linked list, and caching the status update notification message in the inner circular queue based on the array according to the management pointer of the outer circular queue. As for the method of constructing an inner circular queue based on array implementation and an outer circular queue based on linked list implementation, it can be specifically: establish an inner circular queue based on array, allocate a continuous memory area for each inner circular queue based on array implementation, take the inner circular queue based on array implementation as a node, use linked list to connect each inner circular queue based on array implementation in series to form a circular queue, and obtain an outer circular queue based on linked list implementation, and according to the management pointer of the outer circular queue, cache the status update notification message in the inner circular queue based on array implementation, which can be: establish an inner circular queue based on array implementation according to the set memory area value, point the first pointer and the tail pointer of the outer circular queue based on linked list implementation to the inner circular queue based on array implementation at the same time, and according to the storage space state of the inner circular queue pointed to by the management pointer, store the status update notification message in the memory area of ​​the corresponding inner circular queue. The above embodiment makes full use of the advantages of the two queue methods based on array and linked list, which can not only improve the utilization rate of cache, but also improve the reading efficiency of status update notification message.

[0070] From the above Figure 2It can be seen from the example method of handling online game exceptions that, on the one hand, since the frame rate of the game screen is calculated in real time, it is possible to make the game screen smooth; on the other hand, when the game screen is refreshed according to the frame rate of the game screen adjusted in real time, when the logic corresponding to all status update notification messages is not executed within the duration of the current frame, the logic corresponding to the remaining status update notification messages is executed within the duration of the next frame of the current frame, that is, it is not that the logic corresponding to all status update notification messages in the queue is forcibly executed within the duration of one frame, but when the logic corresponding to the status update notification messages is more, frame processing is performed, therefore, it can also eliminate the screen freeze caused by the need to execute more logic within one frame.

[0071] In order to better implement the method for processing network game anomalies in the embodiment of the present application, the embodiment of the present application also provides a device for processing network game anomalies. Figure 5 , is a schematic diagram of the structure of the device for processing network game anomalies provided in an embodiment of the present application. The device for processing network game anomalies may be a terminal or a functional module / unit therein, Figure 5 The exemplary apparatus may include a computing module 501, a cache module 502, a first execution module 503, and a second execution module 504, wherein:

[0072] The calculation module 501 is used to calculate the frame rate of the game screen in real time;

[0073] The cache module 502 is used to receive at least one status update notification message sent by the server when the network starts to recover, and cache the status update notification message in a queue;

[0074] The first execution module 503 is used to execute the logic corresponding to the status update notification message within each frame duration when refreshing the game screen according to the frame rate of the game screen calculated in real time;

[0075] The second execution module 504 is used to execute the logic corresponding to the remaining status update notification messages in the queue within the next frame duration of the current frame if the logic corresponding to all the status update notification messages in the queue has not been executed within the current frame duration, until the logic corresponding to all the status update notification messages in the queue is executed.

[0076] Optional, above Figure 5 The exemplary calculation module 501 may include a frame rate calculation unit, wherein:

[0077] The frame rate calculation unit calculates the frame rate of the game screen in real time based on the Kalman filter according to the frame rate setting value and the frame rate prediction value of the game screen.

[0078] Optional, the above Figure 5The exemplary device may further include an iteration module, a likelihood value calculation module, a judgment module, a first determination module, an update module, and a second determination module, wherein:

[0079] An iteration module, used for iterating the parameters of the Kalman filter according to a frame rate setting value matrix and a preset number of iterations;

[0080] A likelihood value calculation module, used to calculate the likelihood values ​​of the frame rate prediction value covariance matrix and the frame rate setting value covariance matrix according to the frame rate setting value matrix and the frame rate prediction value matrix corresponding to the current frame;

[0081] A judgment module, used to judge whether the difference between the likelihood value of the current frame of the game screen and the likelihood value of the previous frame is less than a preset difference threshold;

[0082] A first determination module, configured to determine that iteration of the parameters of the Kalman filter is completed if a difference between the likelihood values ​​of a current frame and a previous frame of the game screen is less than a preset difference threshold;

[0083] An updating module, for updating the frame rate setting value matrix and the frame rate prediction value matrix corresponding to the current frame if the difference between the likelihood values ​​of the current frame and the previous frame of the game screen is not less than a preset difference threshold, and continuing to calculate the likelihood values ​​of the updated frame rate setting value matrix and the frame rate prediction value matrix, until the difference between the likelihood values ​​of the frame rate prediction value covariance matrix and the frame rate setting value covariance matrix of the current frame of the game screen and the previous frame is less than a preset difference threshold or the number of iterations reaches a preset iteration threshold, then determining that the iteration is complete;

[0084] The second determination module is used to determine the corresponding frame rate prediction value covariance matrix and frame rate setting value covariance matrix after the iteration is completed as parameters of the Kalman filter.

[0085] Optional, above Figure 5 The exemplary cache module 502 may include a call request cache unit, and the first execution module 503 may include a function execution unit, wherein:

[0086] A call request cache unit, used to receive at least one call request sent by the server when the network starts to recover through a remote procedure call interface, and cache the call request in a queue;

[0087] The function execution unit is used to execute the logic corresponding to the function within each frame duration by executing the function called by the execution call request when refreshing the game screen according to the frame rate of the game screen calculated in real time.

[0088] Optionally, the call request cache unit may include a first judgment unit and a storage selection unit, wherein:

[0089] A first judgment unit is configured to judge whether there is execution redundancy when the n logics are executed, according to associations between the n logics corresponding to the n calling requests, if the at least one calling request includes n calling requests, where n is a natural number greater than or equal to 2;

[0090] The storage selection unit is used to abandon the cache of the call request corresponding to the logic with execution redundancy if there is execution redundancy.

[0091] Optionally, the function execution unit may include a frame rate adjustment unit, a frame length calculation unit and a logic execution unit, wherein:

[0092] A frame rate adjustment unit, used to make a margin adjustment on the frame rate of the game screen calculated in real time to obtain an adjusted frame rate of the game screen, wherein the adjusted frame rate is less than the frame rate of the game screen calculated in real time;

[0093] A frame length calculation unit, used to calculate the length of each frame after the frame rate is adjusted according to the adjusted frame rate of the game screen;

[0094] The logic execution unit is used to execute the logic corresponding to the function called by the call request within each frame duration after the frame rate is adjusted when refreshing the game screen according to the adjusted frame rate of the game screen.

[0095] Optional, the above Figure 5 The exemplary device may further include a second determination module and a deletion module, wherein:

[0096] A second judgment module is used to judge whether there is execution redundancy when the n logics are executed, according to the association between the n logics corresponding to the n status update notification messages, if the at least one status update notification message cached in the queue includes n status update notification messages, where n is a natural number greater than or equal to 2;

[0097] The deletion module is used to delete the logical corresponding state update notification message with redundant execution from the queue if there is redundant execution.

[0098] Optional, above Figure 5 The exemplary cache module 502 may include a first data cache unit and a queue determination unit, wherein:

[0099] A first data cache unit, used to cache the status update notification message into at least two queues;

[0100] The queue determination unit is used to determine a priority processing queue from the timestamps of at least two queues according to the timestamps of at least two queues, and mark other queues as suspended queues, wherein the timestamps of the queues are updated in real time according to the timestamps of the status update notification messages in the queues.

[0101] Optional, above Figure 5 The exemplary cache module 502 may include a queue creation unit, a setting unit, and a second data cache unit, wherein:

[0102] A queue creation unit is used to construct an inner circular queue based on an array and an outer circular queue based on a linked list;

[0103] A setting unit, used to set the management pointer of the outer circular queue;

[0104] The second data cache unit is used to cache the status update notification message in the inner circular queue implemented based on the array according to the management pointer of the outer circular queue.

[0105] All of the above technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described in detail here.

[0106] From the above Figure 5 It can be seen from the example device for processing online game anomalies that, on the one hand, since the frame rate of the game screen is calculated in real time, it is possible to make the game screen smooth; on the other hand, when the game screen is refreshed according to the frame rate of the game screen adjusted in real time, when the logic corresponding to all status update notification messages is not executed within the duration of the current frame, the logic corresponding to the remaining status update notification messages is executed within the duration of the next frame of the current frame, that is, the logic corresponding to all status update notification messages in the queue is not forcibly executed within the duration of one frame, but when the logic corresponding to the status update notification messages is more, frame processing is performed, thereby also being able to eliminate screen freezes caused by the need to execute more logic within one frame.

[0107] Accordingly, the embodiment of the present application also provides a computer device, which may be a terminal or a server, and the terminal may be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC), a personal digital assistant (PDA), or other terminal devices. Figure 6 As shown, Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 600 includes a processor 601 having one or more processing cores, a memory 602 having one or more computer-readable storage media, and a computer program stored in the memory 602 and executable on the processor. The processor 601 is electrically connected to the memory 602. It will be understood by those skilled in the art that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0108] The processor 601 is the control center of the computer device 600. It uses various interfaces and lines to connect the various parts of the entire computer device 600, executes various functions of the computer device 600 and processes data by running or loading software programs and / or modules stored in the memory 602, and calling data stored in the memory 602, thereby monitoring the computer device 600 as a whole.

[0109] In the embodiment of the present application, the processor 601 in the computer device 600 will load instructions corresponding to the processes of one or more application programs into the memory 602 according to the following steps, and the processor 601 will run the application programs stored in the memory 602 to implement various functions:

[0110] Calculate the frame rate of the game screen in real time; receive at least one status update notification message sent by the server when the network begins to recover, and cache the status update notification message in a queue; when refreshing the game screen according to the frame rate of the game screen calculated in real time, execute the logic corresponding to the status update notification message within each frame duration; if the logic corresponding to all the status update notification messages in the queue has not been executed within the current frame duration, execute the logic corresponding to the remaining status update notification messages in the queue within the next frame duration of the current frame until the logic corresponding to all the status update notification messages in the queue are executed.

[0111] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0112] Optional, such as Figure 6 As shown, the computer device 600 further includes: a touch screen 603, a radio frequency circuit 604, an audio circuit 605, an input unit 606, and a power supply 607. The processor 601 is electrically connected to the touch screen 603, the radio frequency circuit 604, the audio circuit 605, the input unit 606, and the power supply 607, respectively. Those skilled in the art can understand that Figure 6 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0113] The touch display screen 603 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 603 may include a display panel and a touch panel. Among them, the display panel may be used to display information input by the user or information provided to the user and various graphical user interfaces of the computer device, and these graphical user interfaces may be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light emitting diode (OLED, Organic Light-EmittingDiode) and the like. The touch panel may be used to collect the user's touch operation on or near it (such as the user using any suitable object or attachment such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 601, and can receive the command sent by the processor 601 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 601 to determine the type of touch event, and then the processor 601 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 603 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 603 can also be used as a part of the input unit 606 to realize the input function.

[0114] In the embodiment of the present application, the processor 601 executes the game application to generate a graphical user interface on the touch display screen 603. The virtual scene on the graphical user interface includes at least one skill control area, and the skill control area includes at least one skill control. The touch display screen 603 is used to present the graphical user interface and receive operation instructions generated by the user acting on the graphical user interface.

[0115] The radio frequency circuit 604 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other computer device through wireless communication, and to send and receive signals between the network device or other computer device.

[0116] The audio circuit 605 can be used to provide an audio interface between the user and the computer device through a speaker and a microphone. The audio circuit 605 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 605 and converted into audio data, and then the audio data is output to the processor 601 for processing, and then sent to another computer device through the radio frequency circuit 604, or the audio data is output to the memory 602 for further processing. The audio circuit 605 may also include an earplug jack to provide communication between an external headset and the computer device.

[0117] The input unit 606 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0118] The power supply 607 is used to supply power to various components of the computer device 600. Optionally, the power supply 607 can be logically connected to the processor 601 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 607 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0119] although Figure 6 Not shown, the computer device 600 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.

[0120] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0121] From the above, it can be seen that the computer device provided in this embodiment, on the one hand, calculates the frame rate of the game screen in real time, thus making it possible to make the game screen smooth; on the other hand, when the game screen is refreshed according to the frame rate of the game screen adjusted in real time, when the logic corresponding to all status update notification messages is not executed within the duration of the current frame, the logic corresponding to the remaining status update notification messages is executed within the duration of the next frame of the current frame. That is, the logic corresponding to all status update notification messages in the queue is not forcibly executed within the duration of one frame, but when the logic corresponding to the status update notification messages is more, frame processing is performed. Therefore, the screen freeze caused by the need to execute more logic within one frame can also be eliminated.

[0122] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0123] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of computer programs are stored, and the computer program can be loaded by a processor to execute the steps in any one of the methods for handling online game anomalies provided in the embodiments of the present application. For example, the computer program can execute the following steps:

[0124] Calculate the frame rate of the game screen in real time; receive at least one status update notification message sent by the server when the network begins to recover, and cache the status update notification message in a queue; when refreshing the game screen according to the frame rate of the game screen calculated in real time, execute the logic corresponding to the status update notification message within each frame duration; if the logic corresponding to all the status update notification messages in the queue has not been executed within the current frame duration, execute the logic corresponding to the remaining status update notification messages in the queue within the next frame duration of the current frame until the logic corresponding to all the status update notification messages in the queue are executed.

[0125] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0126] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0127] Since the computer program stored in the storage medium can execute the steps in any method for processing online game exceptions provided in the embodiments of the present application, the beneficial effects that can be achieved by any method for processing online game exceptions provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0128] The above is a detailed introduction to a method, device, storage medium and computer equipment for processing online game anomalies provided by the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for handling online game anomalies, characterized in that: include: Iterate the parameters of the Kalman filter according to the frame rate setting value matrix and the preset number of iterations; Calculate the likelihood values ​​of the frame rate prediction value covariance matrix and the frame rate setting value covariance matrix according to the frame rate setting value matrix and the frame rate prediction value matrix corresponding to the current frame; Determine whether a difference between a likelihood value of a current frame of the game screen and a likelihood value of a previous frame is less than a preset difference threshold; If the difference between the likelihood values ​​of the current frame and the previous frame of the game screen is less than a preset difference threshold, it is determined that the iteration of the parameters of the Kalman filter is completed; If the difference between the likelihood values ​​of the current frame and the previous frame of the game screen is not less than a preset difference threshold, then the frame rate setting value matrix and the frame rate prediction value matrix corresponding to the current frame are updated, and the likelihood values ​​of the updated frame rate setting value matrix and the frame rate prediction value matrix are continued to be calculated until the difference between the likelihood values ​​of the current frame and the previous frame of the game screen is less than a preset difference threshold or the number of iterations reaches a preset iteration threshold, then it is determined that the iteration is completed; Determine the corresponding frame rate prediction value covariance matrix and frame rate setting value covariance matrix after the iteration as the parameters of the Kalman filter; Calculating the frame rate of the game screen in real time based on the Kalman filter according to the frame rate setting value and the frame rate prediction value of the game screen; receiving at least one status update notification message sent by the server when the network starts to recover, and caching the status update notification message in a queue; Performing margin adjustment on the frame rate of the game screen obtained by the real-time calculation to obtain an adjusted frame rate of the game screen, wherein the adjusted frame rate is less than the frame rate of the game screen obtained by the real-time calculation; When refreshing the game screen according to the adjusted frame rate, executing the logic corresponding to the status update notification message within each frame duration; If the logic corresponding to all the status update notification messages in the queue has not been executed within the current frame duration, the logic corresponding to the remaining status update notification messages in the queue will be executed within the next frame duration of the current frame until the logic corresponding to all the status update notification messages in the queue is executed.

2. The method for processing anomalies in online games according to claim 1, characterized in that: The receiving at least one status update notification message sent by the server when the network starts to recover, and caching the status update notification message in a queue, comprises: receiving at least one call request sent by the server when the network starts to recover through a remote procedure call interface, and caching the call request in a queue; When the game screen is refreshed according to the frame rate of the game screen calculated in real time, the logic corresponding to the status update notification message is executed within each frame duration, including: when the game screen is refreshed according to the frame rate of the game screen calculated in real time, the logic corresponding to the function is executed within each frame duration by executing the function called by the call request.

3. The method for processing anomalies in online games as claimed in claim 2, characterized in that: The step of caching the call request in a queue includes: If the at least one call request includes n call requests, judging whether there is execution redundancy when the n logics are executed according to associations between the n logics corresponding to the n call requests, where n is a natural number greater than or equal to 2; If there is execution redundancy, the cache of the call request corresponding to the logic with execution redundancy is abandoned.

4. The method for processing anomalies in online games as claimed in claim 2, characterized in that: When refreshing the game screen according to the frame rate of the game screen calculated in real time, executing the function called by the call request and executing the logic corresponding to the function within each frame duration, including: Performing margin adjustment on the frame rate of the game screen obtained by the real-time calculation to obtain an adjusted frame rate of the game screen, wherein the adjusted frame rate is less than the frame rate of the game screen obtained by the real-time calculation; According to the adjusted frame rate of the game screen, the duration of each frame after the frame rate adjustment is calculated; When the game screen is refreshed according to the adjusted frame rate of the game screen, the logic corresponding to the function is executed within each frame duration after the frame rate is adjusted.

5. The method for processing anomalies in online games according to claim 1, characterized in that: When refreshing the game screen according to the frame rate of the game screen calculated in real time, before executing the logic corresponding to the status update notification message in each frame duration, the method further includes: If the at least one status update notification message cached in the queue includes n status update notification messages, judging whether there is execution redundancy when the n logics are executed according to the association between the n logics corresponding to the n status update notification messages, where n is a natural number greater than or equal to 2; If execution redundancy exists, the logical corresponding state update notification message of the execution redundancy existing logic is deleted from the queue.

6. The method for processing anomalies in online games according to claim 1, characterized in that: The step of caching the status update notification message in a queue includes: Buffering the status update notification message in at least two queues; According to the timestamps of the at least two queues, a priority processing queue is determined from the timestamps of the at least two queues, and other queues are marked as suspended queues. The timestamps of the queues are updated in real time according to the timestamps of the status update notification messages in the queues.

7. The method for processing anomalies in online games according to claim 1, characterized in that: The step of caching the status update notification message in a queue includes: Construct an inner circular queue based on an array and an outer circular queue based on a linked list; Setting the management pointer of the outer circular queue; According to the management pointer of the outer circular queue, the status update notification message is cached in the inner circular queue implemented based on the array.

8. A device for processing abnormalities in online games, characterized in that: include: A calculation module is used to iterate the parameters of the Kalman filter according to the frame rate setting value matrix and the preset number of iterations; calculate the likelihood values ​​of the frame rate prediction value covariance matrix and the frame rate setting value covariance matrix according to the frame rate setting value matrix and the frame rate prediction value matrix corresponding to the current frame; determine whether the difference between the likelihood value of the current frame of the game screen and the likelihood value of the previous frame is less than a preset difference threshold; if the difference between the likelihood value of the current frame of the game screen and the previous frame is less than the preset difference threshold, determine that the iteration of the parameters of the Kalman filter is completed; if the If the difference between the likelihood values ​​of the current frame and the previous frame of the game screen is not less than a preset difference threshold, the frame rate setting value matrix and the frame rate prediction value matrix corresponding to the current frame are updated, and the likelihood values ​​of the updated frame rate setting value matrix and the frame rate prediction value matrix are continued to be calculated until the difference between the likelihood values ​​of the current frame and the previous frame of the game screen is less than the preset difference threshold or the number of iterations reaches the preset iteration threshold, then it is determined that the iteration is completed; the corresponding frame rate prediction value covariance matrix and frame rate setting value covariance matrix after the iteration is completed are determined as the parameters of the Kalman filter; Calculating the frame rate of the game screen in real time based on a Kalman filter according to a frame rate setting value and a frame rate prediction value of the game screen; A cache module, used to receive at least one status update notification message sent by the server when the network starts to recover, and cache the status update notification message in a queue; A first execution module is used to perform a margin adjustment on the frame rate of the game screen obtained by the real-time calculation to obtain an adjusted frame rate of the game screen, wherein the adjusted frame rate is less than the frame rate of the game screen obtained by the real-time calculation; when refreshing the game screen according to the adjusted frame rate, executing the logic corresponding to the status update notification message within each frame duration; The second execution module is used to execute the logic corresponding to the remaining status update notification messages in the queue within the next frame duration of the current frame if the logic corresponding to all the status update notification messages in the queue has not been executed within the current frame duration, until the logic corresponding to all the status update notification messages in the queue is executed.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for loading by a processor to execute the steps in the method for processing online game abnormalities as described in any one of claims 1 to 7.

10. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor executes the steps in the method for processing online game anomalies as described in any one of claims 1 to 7 by calling the computer program stored in the memory.

Citation Information

Patent Citations

  • Stutter abnormality analysis method and apparatus thereof

    CN107196794A

  • Game rendering optimization method and terminal

    CN108144298A

  • Method and device for displaying game content, storage medium, processor and terminal

    CN108984293A

  • Display fluency adjusting method and device, electronic equipment and storage medium

    CN111078172A

  • Game data processing method and device, storage medium and electronic equipment

    CN111744177A