Small game delay regulation and control management method and system

Through the combination of differential compression and operational rehearsal models, it solves the problem of mini -game operation delay and screen stutter caused by network delay, realize the high -quality delay control management of the game, and enhance the user experience.

CN119367748AActive Publication Date: 2025-01-28QINGDAO BLUEFIR INTERACTIVE ENTERTAINMENT TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411942316.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-01-28
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

Poor network conditions will lead to delays in operation, stuttering of screens in mini games, and even frequent disconnection and reconnection, reducing the playability and user experience of mini games.

Method used

By obtaining the current network status coefficient, use the time window to perform differential compression and short -term storage of the player's operation data, build and train the operational rehearsal model, predict the player operation in a delay state, and use the complement technology to make smooth corrections to ensure that the game is in the customer in the customer Run continuously on the end.

Benefits of technology

Effectively reduce the impact of network delay on the experience of mini -game, ensure the fluency and playability of the game, and reduce the phenomenon of delayed image stuck or jump after delayed recovery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119367748A_ABST
    Figure CN119367748A_ABST
Patent Text Reader

Abstract

The invention discloses a small game delay regulation and control management method and system, and relates to the field of small game delay management, and the technical scheme is characterized in that the method comprises the following steps: obtaining a network state coefficient of the current time t, carrying out delay judgment, and generating a delay state and a non-delay state; performing differential compression on the operation data of the player by using the time window, and then performing short-term storage to form a temporary data packet; constructing and training an operation rehearsal model, inputting the network state coefficient of the current time t and the temporary data packet into the trained operation rehearsal model in a delay state, and predicting to obtain a rehearsal operation of the player in the future time T1; the rehearsal operation is connected with operation data at the time t + BL, so that the game is continuous on the client; and real-time operation data after delay recovery are collected, rehearsal operation is smoothly corrected by using an interval filling technology according to the real-time operation data, and delay high-quality regulation and control management of the small game is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of mini-game delay management, and more specifically, to a mini-game delay regulation and management method and system. Background Art

[0002] Instant games are lightweight games that usually load and run quickly on mobile devices or web pages. They are designed to provide simple entertainment and players can easily start playing without complicated installation processes.

[0003] Therefore, based on the characteristics of mini-games being lightweight and easy to access, poor network conditions will directly affect data transmission between players and servers, especially in multiplayer online modes, which usually rely on low latency to ensure a smooth gaming experience. If the network connection is unstable, data packets may be lost, delayed, or out of order during transmission, resulting in game operation delays, screen freezes, and even the need for frequent disconnections and reconnections, which reduces the playability of the mini-game and may even cause a loss of traffic and players.

[0004] Therefore, based on the above problems, it is necessary to design delay control management for mini games. Summary of the invention

[0005] In view of the problems existing in the prior art, the purpose of the present invention is to provide a method and system for mini-game delay regulation and management, so as to achieve high-quality delay regulation and management of mini-games.

[0006] To achieve the above purpose, the present invention provides the following technical solution: The mini-game delay control management method comprises: Step S1: Obtain the network state coefficient at the current time t, perform delay judgment, and generate a delay state and a non-delay state; Step S2: Use the time window to perform differential compression on the player's operation data and store it for a short period of time to form a temporary data packet; Step S3: construct and train an operation preview model. Under the delay state, input the network state coefficient and temporary data packet at the current time t into the trained operation preview model to predict the player's preview operation at the future time T1; Step S4: Connecting the preview operation with the operation data at time t+BL, so that the game is continued on the client; Step S5: Collect the real-time operation data after delayed recovery, use the interpolation technology to smoothly correct the preview operation according to the real-time operation data, and arrange it on the client.

[0007] Preferably, the method of obtaining the network status coefficient at the current time t and performing delay judgment includes: Collect the client network's Ping time, jitter frequency, packet loss rate, bandwidth, and transmission flow at the current time t, and calculate the network status coefficient ; Set the state threshold Yz. If WL(t)≤Yz, the network state is judged to be good and in a non-delayed state; if WL(t)>Yz, the network state is judged to be abnormal and in a delayed state. Where WL(t) represents the network status coefficient at the current time t, Ping t Indicates the Ping time at the current time t, Dh t Indicates the jitter frequency at the current time t, Db t represents the packet loss rate at the current time t, Cs t represents the bandwidth at the current time t, Dk t represents the transmission flow at the current time t, e represents the natural base, and α1 and α2 represent the adjustment coefficients.

[0008] Preferably, the method of using a time window to perform differential compression on the player's operation data for short-term storage comprises: Step A1: According to the network status coefficient at the current time t, calculate the time window length as , collect the player's operation data within the time window, and form a temporary data packet at the current time t after differential compression; Step A2: Collect the network status coefficient at time t+BL, calculate the time window length, set the time window length at time t+BL to the expiration cleaning time of TTL, and then make Memcached delete the temporary data packet at the current time t according to the expiration cleaning time; Step A3: Repeat step A2 to store the player's operation data for a short period of time during the entire game process; in, represents the standard window length, and β represents the extension factor.

[0009] Preferably, the differential compression method comprises: Operation data includes players’ operation behaviors and game videos; Discretize the game video in the time window into continuous image frames in time order, and divide the image frames into key frames and differential frames; The key frame setting method is as follows: use T_u segmentation points to evenly divide the time window into T_u+1 time periods, extract the start and end points of the time window and the image frames on the segmentation points, and set them as key frames, and then set the image frames other than the key frames as non-key frames; According to the size of the image frame, a blank matrix of the same size is simulated, and the pixel value of each position in the image frame is filled into the corresponding position of the blank matrix, thereby converting each image frame into a two-dimensional pixel matrix; Calculate the difference matrix of the two-dimensional pixel matrix between each non-key frame and the key frame, and calculate the difference matrix between two adjacent difference matrices in ascending time order. Then, in the time period corresponding to the two key frames, simulate the first difference matrix and all the difference matrices into an image frame, and record the image frame at this time as a difference frame; One-Hot encoding is performed on the operation behavior corresponding to each image frame, so that each image frame obtains a One-Hot vector, and the timestamp of the One-Hot vector is corresponded to the key frame and the differential frame and marked; Key frames and differential frames are compressed using entropy coding.

[0010] Preferably, the method for constructing and training an operation preview model comprises: The operation preview model is based on a long short-term memory network, including an input layer, an LSTM layer, a fully connected layer and an output layer. The input of the input layer is set to be a temporary data packet and a network state coefficient, and the output layer includes a time prediction header and a preview operation header. The time prediction header is used to output the predicted time of the preview operation data, and the preview operation header is used to output the preview operation data. The constraints of the operation preview model are set as ; Among them, RE_b is the cutoff threshold, g is the sample index, G is the number of samples, and is the weight coefficient, T_t g is the actual time in the g-th sample, is the predicted time in the g-th sample, Y_t g is the actual operation data in the g-th sample, is the operation data previewed in the g-th sample; A sample set is formed, the sample set includes S_D group samples, each sample includes a historical temporary data packet and network status coefficient, and the actual corresponding time and operation data in the next time period; Use the sample set to train the operation preview model until the constraint conditions are met, and then obtain the trained operation preview model; The network status coefficient and temporary data packet at the current time t are input into the trained operation preview model to obtain the predicted time and operation data, which are then recorded as the player's preview operation at the future time T1.

[0011] Preferably, the method of linking the preview operation with the operation data at the time includes: Extract the game video of the operation data at time t+BL and the game video of the preview operation, which are recorded as the first image and the second image respectively; Calculate the absolute difference of each pixel value on the first image and the second image. If the absolute difference is greater than a judgment threshold, it is determined that the game video of the operation data and the game video of the preview operation are discontinuous and a connection process is performed. If the absolute difference is less than or equal to the judgment threshold, it is determined that the game video of the operation data and the game video of the preview operation are continuous and are used directly. The connection processing method is: add interval images, and on each interval image, the pixel values ​​whose absolute difference is less than or equal to the judgment threshold remain unchanged, and the pixel values ​​whose absolute difference is greater than the judgment threshold are filled with the interval value. The interval value is calculated by the formula ,in, represents the interval value on the rth interval image, xs(min) represents the minimum pixel value in the first image and the second image, Pd_yz represents the judgment threshold, and r represents the number of interval images.

[0012] Preferably, the method of using interpolation technology to smoothly correct the preview operation according to the real-time operation data includes: The timestamp of the real-time operation data and the local timestamp of the client at the end of the preview operation are extracted and recorded as the first time stamp and the second time stamp respectively. The offset between the second time stamp and the benchmark is calculated based on the first time stamp. If the offset is greater than 0 or less than 0, time synchronization correction is performed, otherwise, the time is not corrected; The images corresponding to the first time stamp and the second time stamp are collected and recorded as image TS and image SM. If the time is corrected synchronously, the image TS and the image SM are smoothly interpolated. If the time is not corrected, the timestamp corresponding to the image when the difference with the image TS is the smallest in the preview operation is extracted, and the image after the timestamp is deleted, so that the image when the difference is the smallest is directly connected with the image TS.

[0013] Preferably, the time synchronization correction method includes: If the offset is greater than 0, add Mn timestamps between the first timestamp and the second timestamp, and ,in, represents the time of preview operation, and F_d represents the number of image frames in the preview operation; If the offset is less than 0, then delete Df timestamps between the first time stamp and the second time stamp, collect the local timestamp of the client when the preview operation starts, record it as the third time stamp, and evenly arrange all remaining timestamps in the preview operation between the third time stamp and the first time stamp in chronological order; And Df=Sc SM -CY min , where Sc SMIndicates the second time scale, CY min Indicates the timestamp corresponding to the time when the difference between the image and the image TS in the preview operation is the smallest.

[0014] Preferably, the method for smoothly interpolating the image TS and the image SM comprises: Set each of the added Mn timestamps to correspond to an image; Extract each image in the preview operation and arrange them in chronological order. For each image, separate the pixel value on each pixel point and arrange the pixel value on each pixel point in chronological order to form a pixel data set. For each pixel data set, a curve is used for fitting, and the independent variable of the curve is set to the timestamp, and the dependent variable is set to the pixel value; Submit Mn timestamps to the curve corresponding to each pixel data set in turn to obtain the pixel value corresponding to each timestamp; Collect all pixel values ​​on the curve at each timestamp, construct Mn initial images, and fill the pixel values ​​at the same timestamp into the blank image to form the image at the timestamp; The images at Mn timestamps are respectively filled between the image TS and the image SM for smooth interpolation.

[0015] A mini-game delay control and management system, comprising: Network judgment module: obtains the network status coefficient at the current time t and makes delay judgment; Data collection and processing module: collects players' operation data, and uses time windows for differential compression, forming temporary data packets after short-term storage; Model prediction module: Build and train the operation preview model. Under the delay state, input the network state coefficient and temporary data packet at the current time t into the trained operation preview model to predict the player's preview operation in the future. Delay control management module: connects the preview operation with the operation data at time t+BL, collects the real-time operation data after delay recovery, uses interpolation technology to smoothly correct the preview operation according to the real-time operation data, and deploys it on the client.

[0016] Compared with the prior art, the present invention has the following beneficial effects: Based on the real-time fluctuation of the network status coefficient, the time window length is dynamically adjusted, so that the system can flexibly respond to different network environments and ensure the efficiency of data collection and processing. It avoids over-reliance on real-time data when the network delay is high, and makes predictions within a longer time window, which improves the intelligence of data processing.

[0017] Differential compression technology significantly reduces the storage and transmission burden of redundant data by storing only the differences between adjacent frames instead of the complete data of each frame, and reduces the delay caused by the large amount of data transmitted when the network is unstable. Especially in a high-latency environment, important operation data can be transmitted quickly.

[0018] The LSTM-based operation preview model can predict the player's operation behavior under delayed conditions, allowing the client to run smoothly during network delays and avoid operation freezes caused by delays. The client can continue to render the game screen through preview data during network delays, greatly improving the smoothness of the user experience.

[0019] By comparing the image frames of the preview operation and the actual operation at the pixel level, the continuity of the operation data is determined, and a smooth transition is performed through the interpolation algorithm to ensure that there is no obvious jump in the picture. The pixel-level image difference calculation and interpolation technology are used to ensure the smooth transition of the image connection and reduce the phenomenon of image freeze or sudden jump after delayed recovery. The effective processing of the difference image allows the game screen to remain smooth when the network status switches, improving the user's visual experience.

[0020] The smooth correction mechanism after delay recovery eliminates the inconsistency between operation and picture. The time synchronization correction technology adjusts the timestamp to ensure the time alignment between the preview data and the actual data, thereby reducing the discontinuity or frame skipping caused by time misalignment. The use of interpolation technology ensures a smooth transition between the preview operation and the actual operation after delay recovery, avoiding the sense of disconnection caused by asynchronous operation. The synchronous correction of timestamps and the interpolation of inter-frame data further optimize the smooth transition after delay recovery, improving the consistency and fluency of the gaming experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A structural diagram of a mini-game delay control management system is proposed for the present invention; Figure 2 It is a schematic diagram of the method applied to the mini-game delay control management system in the present invention. DETAILED DESCRIPTION

[0022] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.

[0023] Embodiment 1 Reference Figure 1 and Figure 2 , Example 1 further illustrates a mini-game delay control and management system proposed by the present invention.

[0024] Mini games are lightweight games that can usually be loaded and run quickly on mobile devices or web pages. They are designed to provide simple entertainment, and players can easily start the game without complicated installation processes. The characteristics of mini games include easy access (most mini games can be run directly in the browser, or downloaded through the app store as a smaller application to play), small size (due to the relatively small file size of mini games, they download quickly and take up less storage space), and casual entertainment (mini games are mainly for users seeking short-term leisure and entertainment, suitable for playing in fragmented time such as waiting and resting).

[0025] In short, mini games are very diverse, covering almost all categories of games, from puzzles to action adventures, from role-playing games to strategy battles. And with the development of technology, the quality of mini games is also constantly improving. With the rise of platforms such as WeChat Mini Programs and Alipay Mini Programs, mini games have also become one of the most popular content on these platforms.

[0026] Therefore, based on the characteristics of mini-games being lightweight and easy to access, poor network conditions will directly affect data transmission between players and servers, especially in multiplayer online modes, which usually rely on low latency to ensure a smooth gaming experience. If the network connection is unstable, data packets may be lost, delayed, or out of order during transmission, resulting in game operation delays, screen freezes (due to poor network conditions, the game screen may suddenly freeze, freeze, or skip frames quickly, seriously affecting the gaming experience), and even the need to frequently disconnect and reconnect, which reduces the playability of the mini-game and may even cause a loss of traffic and players.

[0027] In the case of delays in mini-games, we first predict the player's operations on the client and present an estimated result. The estimated result is then generated and compressed in advance. When a delay occurs, we use compressed estimated result interpolation or tween animation and other technologies to smoothly transition to the next state to avoid sudden screen jumps or freezes. We also dynamically adjust the game frame rate based on network conditions and device performance. When the delay is restored and the server returns the actual result, if there is a difference from the prediction, we correct the difference.

[0028] Network requests and game rendering logic can be separated, and the reception and processing of network data can be performed through separate threads or asynchronous operations to avoid affecting the game frame rate and rendering due to network waiting or delays.

[0029] Step S1: Obtain the network state coefficient at the current time t, perform delay judgment, and generate a delay state and a non-delay state; The method of obtaining the network status coefficient at the current time t and performing delay judgment includes: Collect the client network's Ping time, jitter frequency, packet loss rate, bandwidth, and transmission flow at the current time t, and calculate the network status coefficient ; Set the state threshold Yz. If WL(t)≤Yz, the network state is judged to be good and in a non-delayed state; if WL(t)>Yz, the network state is judged to be abnormal and in a delayed state. The state threshold Yz can be set by analyzing historical data or experience, and the delay state can be used to indicate that the network may experience a jam delay in the next period of time.

[0030] Where WL(t) represents the network status coefficient at the current time t, Ping t Indicates the Ping time at the current time t, Dh t Indicates the jitter frequency at the current time t, Db t represents the packet loss rate at the current time t, Cs t represents the bandwidth at the current time t, Dk t represents the transmission flow at the current time t, e represents the natural base, α1 and α2 represent the adjustment coefficients; Ping time is the time required to send a data packet and receive a returned data packet, that is, the round-trip time (RTT). It is collected using the system's built-in ping command. For example, the delay (in milliseconds) of each ping time is displayed on Linux or macOS.

[0031] Jitter frequency refers to the variation in delay between consecutive packets and can be collected using ping or iperf tools.

[0032] Packet loss rate refers to the percentage of packets lost during network transmission. A high packet loss rate usually indicates poor network quality and can be measured using ping or iperf.

[0033] Bandwidth refers to the amount of data that a network can transmit per unit of time. Although bandwidth is not directly related to latency, bandwidth bottlenecks can lead to high latency, especially in congested conditions. Bandwidth can be measured using the iperf tool.

[0034] Transmission traffic is used to describe the amount of transmitted data. Use tools such as netstat, iftop, or nload to monitor the traffic of the current network interface.

[0035] Step S2: Use the time window to perform differential compression on the player's operation data and store it for a short period of time to form a temporary data packet; Methods for short-term storage of player operation data by differential compression using a time window include: Step A1: According to the network status coefficient at the current time t, calculate the time window length as , collect the player's operation data within the time window, and form a temporary data packet at the current time t after differential compression; Step A2: Collect the network status coefficient at time t+BL, calculate the time window length, set the time window length at time t+BL to the expiration cleaning time of TTL, and then make Memcached delete the temporary data packet at the current time t according to the expiration cleaning time; Step A3: Repeat step A2 to store the player's operation data for a short period of time during the entire game process.

[0036] Generally, the larger the network status coefficient WL(t), the worse the network condition, and the smaller the network status coefficient WL(t), the better the network condition. The worse the network condition, the more likely delay will occur and the longer the delay will be, so a longer time window needs to be collected to have sufficient data for rehearsal.

[0037] in, represents the standard window length, and β represents the extension factor; the standard window length can be set through historical data analysis or experience.

[0038] Inter-frame differential compression achieves compression by reducing redundant information by storing only the differences between adjacent frames instead of the complete data of each frame.

[0039] Differential compression methods include: Operation data includes the player's operating behavior (such as the character's movement direction, attack mode, etc.) and game video (for example, the original rendering video of the game, and the video generated in association with the player's operation or the screen video generated during the player's game).

[0040] Discretize the game video in the time window into continuous image frames in time order, and divide the image frames into key frames and differential frames; The key frame setting method is as follows: use T_u segmentation points to evenly divide the time window into T_u+1 time periods, extract the start and end points of the time window and the image frames on the segmentation points, and set them as key frames, and then set the image frames other than the key frames as non-key frames; The start point and end point of the time window have the following meanings. For example, if the time window is the time period from time point QI to time point Q2, then time point QI is the start point of the time window, and time point Q2 is the end point of the time window.

[0041] According to the size of the image frame, a blank matrix of the same size is simulated, and the pixel value of each position in the image frame is filled into the corresponding position of the blank matrix, thereby converting each image frame into a two-dimensional pixel matrix; For example, the image frame size is , then the size of the blank matrix is ​​also , fill the pixel value of each position in the image frame into the matrix to form a two-dimensional pixel matrix. The pixel value of each position in the image frame is represented by the color value of the pixel point at each position.

[0042] Calculate the difference matrix of the two-dimensional pixel matrix between each non-key frame and the key frame, and calculate the difference matrix between two adjacent difference matrices in ascending time order. Then, in the time period corresponding to the two key frames, simulate the first difference matrix and all the difference matrices into an image frame, and record the image frame at this time as a difference frame; The method of converting the first difference matrix and all difference matrices into an image frame is the same as the method of converting an image frame into a two-dimensional pixel matrix, except that the conversion process is reversed.

[0043] One-Hot encoding is performed on the operation behavior corresponding to each image frame, so that each image frame obtains a One-Hot vector, and the timestamp of the One-Hot vector is corresponded to the key frame and the differential frame and marked; Use entropy coding (such as Huffman coding, arithmetic coding) to compress key frames and differential frames.

[0044] There are many zero values ​​or repeated values ​​in the difference matrix and the difference matrix, so the quantized difference data can be encoded using lossless compression algorithms such as entropy coding to achieve further compression. Through inter-frame difference compression, only the differences between adjacent frames are stored instead of complete frame data, reducing repeated information.

[0045] Step S3: construct and train an operation preview model. Under the delay state, input the network state coefficient and temporary data packet at the current time t into the trained operation preview model to predict the player's preview operation at the future time T1; Methods for building and training operational rehearsal models include: The operation preview model is based on a long short-term memory network, including an input layer, an LSTM layer, a fully connected layer and an output layer. The input of the input layer is set to be a temporary data packet and a network state coefficient, and the output layer includes a time prediction header and a preview operation header. The time prediction header is used to output the predicted time of the preview operation data, and the preview operation header is used to output the preview operation data. LSTM is a type of recurrent neural network (RNN) that is particularly well suited for processing time series data. Multiple layers of LSTM can be stacked to improve the representational power of the model. The output of the LSTM is usually passed through one or more fully connected layers to map the hidden state of the LSTM to the target prediction (i.e. the player's next move).

[0046] Set the constraints of the operation preview model as ; Among them, RE_b is the cutoff threshold, g is the sample index, G is the number of samples, and is the weight coefficient, T_t g is the actual time in the g-th sample, is the predicted time in the g-th sample, Y_t g is the actual operation data in the g-th sample, is the operation data previewed in the g-th sample; The cutoff threshold can be set based on experimental data analysis or historical data analysis.

[0047] Among them, the weight coefficient and The values ​​of α1, α2, α2, α3, α4, α5, α6, α7, α8, α9, α10, α21, α22, α3, α43, α54, α65, α76, α80, α90, α91, α92, α93, α94, α95, α96, α97, α98, α99, α91, α97, α99, α99, α91, α92, α93, α99, α99, α90, α99, α90, α91, α99, α90 ...0, α99, α9

[0048] The extension coefficient β specifically refers to the unit adjustment length of the time window. If the network status provided by the current network infrastructure is good, then the value of the extension coefficient β can be assigned a smaller value. For example, when the relevant staff believes that the network status is good based on the network status supported by the current device, they should assign it a smaller value, which can be 0.1, 0.5 or 1. The specific value assignment can be set in combination with historical data. Generally speaking, the value range for better situations is between 0 and 1, and the value for worse situations is greater than 1.

[0049] Meaning of adjustment coefficients α1 and α2 and weight coefficients and Similarly, it also means a percentage, specifically it is used to indicate the percentage of jitter frequency and packet loss rate in the network status coefficient, and the value range is between 0 and 1.

[0050] A sample set is formed, the sample set includes S_D group samples, each sample includes a historical temporary data packet and network status coefficient, and the actual corresponding time and operation data in the next time period; The S_D group samples in the sample set are all based on real data in historical time. The actual corresponding time and operation data in the next time period refer to the historical temporary data packets and network status coefficients in the actual corresponding lag delay time in the next time period. The player's operation data is generated by previewing the lag delay time.

[0051] Use the sample set to train the operation preview model until the constraint conditions are met, and then obtain the trained operation preview model; The network status coefficient and temporary data packet at the current time t are input into the trained operation preview model to obtain the predicted time and operation data, which are then recorded as the player's preview operation at the future time T1.

[0052] Step S4: Connecting the preview operation with the operation data at time t+BL, so that the game is continued on the client; Methods for linking preview operations with operational data at the time include: Extract the game video of the operation data at time t+BL and the game video of the preview operation, which are recorded as the first image and the second image respectively; Among them, the game video at a time point is regarded as an image frame, so the next step is to compare the two image frames.

[0053] Calculate the absolute difference between the first and second images for each pixel value, that is, the absolute difference ,in, Indicates the absolute difference between the o-th pixel value xs_o and the p-th pixel value xs_p. If the absolute difference is greater than the judgment threshold, it is determined that the game video of the operation data and the game video of the preview operation are discontinuous and a connection process is performed. If the absolute difference is less than or equal to the judgment threshold, it is determined that the game video of the operation data and the game video of the preview operation are continuous and are used directly. The connection processing method is: add interval images, and on each interval image, the pixel values ​​whose absolute difference is less than or equal to the judgment threshold remain unchanged, and the pixel values ​​whose absolute difference is greater than the judgment threshold are filled with the interval value. The interval value is calculated by the formula ,in, represents the interval value on the rth interval image, xs(min) represents the minimum pixel value in the first image and the second image, Pd_yz represents the judgment threshold, and r represents the number of interval images.

[0054] The judgment threshold can be set based on experimental data analysis or historical data analysis.

[0055] When the network delay is restored, the actual game state returned by the server may be different from the client's prediction. To ensure the consistency of the game state, the client needs to compare the state returned by the server with the local estimated state to detect the difference. For the detected difference, the client needs to make smooth corrections to avoid sudden jumps or freezes in the screen.

[0056] Step S5: collecting the real-time operation data after the delay recovery, using the interpolation technology to smoothly correct the preview operation according to the real-time operation data, and arranging it on the client; Methods for using interpolation technology to smoothly correct preview operations based on real-time operation data include: The timestamp of the real-time operation data and the local timestamp of the client at the end of the preview operation are extracted and recorded as the first time stamp and the second time stamp respectively. The offset between the second time stamp and the benchmark is calculated based on the first time stamp. If the offset is greater than 0 or less than 0, time synchronization correction is performed, otherwise, the time is not corrected; The images corresponding to the first time stamp and the second time stamp are collected and recorded as image TS and image SM. If the time is corrected synchronously, the image TS and the image SM are smoothly interpolated. If the time is not corrected, the timestamp corresponding to the image when the difference with the image TS is the smallest in the preview operation is extracted, and the image after the timestamp is deleted, so that the image when the difference is the smallest is directly connected with the image TS.

[0057] For example, there are 10 images in the preview operation, which are arranged in chronological order. The fifth image has the smallest difference with image TS. In this way, the images after the fifth image are directly deleted, and image TS is arranged as the sixth image directly after the fifth image, thereby smoothly connecting the preview operation with the game video in the real-time operation data.

[0058] Among them, the smallest difference is judged as the smallest change or the smallest offset of the pixel value in the image, and the offset refers to the difference between two data.

[0059] The time synchronization correction methods include: If the offset is greater than 0, add Mn timestamps between the first timestamp and the second timestamp, and ,in, represents the time of preview operation, and F_d represents the number of image frames in the preview operation; If the offset is less than 0, then delete Df timestamps between the first time stamp and the second time stamp, collect the local timestamp of the client when the preview operation starts, record it as the third time stamp, and evenly arrange all remaining timestamps in the preview operation between the third time stamp and the first time stamp in chronological order; And Df=Sc SM -CY min, where Sc SM Indicates the second time scale, CY min Indicates the timestamp corresponding to the time when the difference between the image and the image TS in the preview operation is the smallest.

[0060] For example, if the offset is less than 0, and Df=3, and there are 5 remaining time stamps in the preview operation, excluding the third time stamp, the 5 time stamps are evenly arranged between the third time stamp and the first time stamp in chronological order.

[0061] The method for smoothly interpolating the image TS and the image SM includes: Set each of the added Mn timestamps to correspond to an image; Extract each image in the preview operation and arrange them in chronological order. For each image, separate the pixel value on each pixel point and arrange the pixel value on each pixel point in chronological order to form a pixel data set. For each pixel data set, a curve is used for fitting, and the independent variable of the curve is set to the timestamp, and the dependent variable is set to the pixel value; The specific method of using the curve to fit each pixel data set is, for example, the curve fitted for the third pixel data set is y=a+bx, and the pixel values ​​at Mn timestamps are calculated according to the curve formula.

[0062] Submit Mn timestamps to the curve corresponding to each pixel data set in turn to obtain the pixel value corresponding to each timestamp; Collect all pixel values ​​on the curve at each timestamp, construct Mn initial images, and fill the pixel values ​​at the same timestamp into the blank image to form the image at the timestamp; The initial image is a blank image by default and has the same size as each image in the preview operation. During the pixel value filling process, the pixel value must correspond to the pixel point.

[0063] The images at Mn timestamps are respectively filled between the image TS and the image SM for smooth interpolation.

[0064] When the network latency is high, the client can also reduce the rendering frame rate of the game to reduce the pressure on network bandwidth and computing resources. For example, reduce the game from 60fps to 30fps.

[0065] The game of the present invention uses the UDP protocol for data transmission, and through the QoS technology (Quality of Service), the network data flow can be prioritized to ensure that the real-time data packets of the game can be transmitted first, reducing the impact of delay and packet loss.

[0066] In future optimizations, the client's operation prediction can be enhanced using machine learning technology. By training the model to learn the player's operation habits and behavior patterns, the client can more accurately predict the player's operations in different scenarios and improve the accuracy of the prediction results.

[0067] Embodiment 2 Reference Figure 1 and Figure 2 , Example 2 further illustrates a mini-game delay control and management system proposed by the present invention.

[0068] The mini-game delay control management method comprises the following steps: Step S1: Obtain the network state coefficient at the current time t, perform delay judgment, and generate a delay state and a non-delay state; Step S2: Use the time window to perform differential compression on the player's operation data and store it for a short period of time to form a temporary data packet; Step S3: construct and train an operation preview model. Under the delay state, input the network state coefficient and temporary data packet at the current time t into the trained operation preview model to predict the player's preview operation at the future time T1; Step S4: Connecting the preview operation with the operation data at time t+BL, so that the game is continued on the client; Step S5: Collect the real-time operation data after delayed recovery, use the interpolation technology to smoothly correct the preview operation according to the real-time operation data, and arrange it on the client.

[0069] The mini-game delay control management system is applied to a mini-game delay control management method and includes: Network judgment module: obtains the network status coefficient at the current time t and makes delay judgment; Data collection and processing module: collects players' operation data, and uses time windows for differential compression, forming temporary data packets after short-term storage; Model prediction module: Build and train the operation preview model. Under the delay state, input the network state coefficient and temporary data packet at the current time t into the trained operation preview model to predict the player's preview operation in the future. Delay control management module: connects the preview operation with the operation data at time t+BL, collects the real-time operation data after delay recovery, uses interpolation technology to smoothly correct the preview operation according to the real-time operation data, and arranges it on the client; The modules are connected to each other via wired and / or wireless means.

[0070] In addition, according to the implementation of the present application, the process described in the attached figure of a mini-game delay control management system can be implemented as a computer software program. For example, the present application provides a non-transitory machine-readable storage medium, which stores machine-readable instructions, and the machine-readable instructions can be executed by a processor to execute instructions corresponding to the method steps provided in the present application. Of course, the architecture shown in the attached figure of a mini-game delay control management system is only exemplary. When implementing different devices, adaptive selection or adjustment can be made according to actual needs.

[0071] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.

[0072] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technical users in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A method for delay control and management of mini-games, characterized in that: The mini-game delay control management method includes: Step S1: Obtain the network state coefficient at the current time t, perform delay judgment, and generate a delay state and a non-delay state; Step S2: Use the time window to perform differential compression on the player's operation data and store it for a short period of time to form a temporary data packet; Step S3: construct and train an operation preview model. Under the delay state, input the network state coefficient and temporary data packet at the current time t into the trained operation preview model to predict the player's preview operation at the future time T1; Step S4: Connecting the preview operation with the operation data at time t+BL, so that the game is continued on the client; Step S5: Collect the real-time operation data after delayed recovery, use the interpolation technology to smoothly correct the preview operation according to the real-time operation data, and arrange it on the client.

2. The mini-game delay control management method according to claim 1, characterized in that: The method for obtaining the network status coefficient at the current time t and performing delay judgment includes: Collect the client network's Ping time, jitter frequency, packet loss rate, bandwidth, and transmission flow at the current time t, and calculate the network status coefficient ; Set the state threshold Yz. If WL(t)≤Yz, the network state is judged to be good and in a non-delayed state; if WL(t)>Yz, the network state is judged to be abnormal and in a delayed state. Where WL(t) represents the network status coefficient at the current time t, Ping t Indicates the Ping time at the current time t, Dh t Indicates the jitter frequency at the current time t, Db t represents the packet loss rate at the current time t, Cs t represents the bandwidth at the current time t, Dk t represents the transmission flow at the current time t, e represents the natural base, and α1 and α2 represent the adjustment coefficients.

3. The mini-game delay control management method according to claim 2 is characterized in that: The method of using a time window to perform differential compression on the player's operation data for short-term storage comprises: Step A1: According to the network status coefficient at the current time t, calculate the time window length as , collect the player's operation data within the time window, and form a temporary data packet at the current time t after differential compression; Step A2: Collect the network status coefficient at time t+BL, calculate the time window length, set the time window length at time t+BL to the expiration cleaning time of TTL, and then make Memcached delete the temporary data packet at the current time t according to the expiration cleaning time; Step A3: Repeat step A2 to store the player's operation data for a short period of time during the entire game process; in, represents the standard window length, and β represents the extension factor.

4. The mini-game delay control management method according to claim 3 is characterized in that: The differential compression method comprises: Operation data includes players’ operation behaviors and game videos; Discretize the game video in the time window into continuous image frames in time order, and divide the image frames into key frames and differential frames; The key frame setting method is as follows: use T_u segmentation points to evenly divide the time window into T_u+1 time periods, extract the start and end points of the time window and the image frames on the segmentation points, and set them as key frames, and then set the image frames other than the key frames as non-key frames; According to the size of the image frame, a blank matrix of the same size is simulated, and the pixel value of each position in the image frame is filled into the corresponding position of the blank matrix, thereby converting each image frame into a two-dimensional pixel matrix; Calculate the difference matrix of the two-dimensional pixel matrix between each non-key frame and the key frame, and calculate the difference matrix between two adjacent difference matrices in ascending time order. Then, in the time period corresponding to the two key frames, simulate the first difference matrix and all the difference matrices into an image frame, and record the image frame at this time as a difference frame; One-Hot encoding is performed on the operation behavior corresponding to each image frame, so that each image frame obtains a One-Hot vector, and the timestamp of the One-Hot vector is corresponded to the key frame and the differential frame and marked; Key frames and differential frames are compressed using entropy coding.

5. The mini-game delay control management method according to claim 4 is characterized in that: The method for constructing and training an operation preview model includes: The operation preview model is based on a long short-term memory network, including an input layer, an LSTM layer, a fully connected layer and an output layer. The input of the input layer is set to be a temporary data packet and a network state coefficient, and the output layer includes a time prediction header and a preview operation header. The time prediction header is used to output the predicted time of the preview operation data, and the preview operation header is used to output the preview operation data. The constraints of the operation preview model are set as ; Among them, RE_b is the cutoff threshold, g is the sample index, G is the number of samples, and is the weight coefficient, T_t g is the actual time in the g-th sample, is the predicted time in the g-th sample, Y_t g is the actual operation data in the g-th sample, is the operation data previewed in the g-th sample; A sample set is formed, the sample set includes S_D group samples, each sample includes a historical temporary data packet and network status coefficient, and the actual corresponding time and operation data in the next time period; Use the sample set to train the operation preview model until the constraint conditions are met, and then obtain the trained operation preview model; The network status coefficient and temporary data packet at the current time t are input into the trained operation preview model to obtain the predicted time and operation data, which are then recorded as the player's preview operation at the future time T1.

6. The mini-game delay control management method according to claim 5, characterized in that: The method for linking the preview operation with the operation data at the time includes: Extract the game video of the operation data at time t+BL and the game video of the preview operation, which are recorded as the first image and the second image respectively; Calculate the absolute difference of each pixel value on the first image and the second image. If the absolute difference is greater than a judgment threshold, it is determined that the game video of the operation data and the game video of the preview operation are discontinuous and a connection process is performed. If the absolute difference is less than or equal to the judgment threshold, it is determined that the game video of the operation data and the game video of the preview operation are continuous and are used directly. The connection processing method is: add interval images, and on each interval image, the pixel values ​​whose absolute difference is less than or equal to the judgment threshold remain unchanged, and the pixel values ​​whose absolute difference is greater than the judgment threshold are filled with the interval value. The interval value is calculated by the formula ,in, represents the interval value on the rth interval image, xs(min) represents the minimum pixel value in the first image and the second image, Pd_yz represents the judgment threshold, and r represents the number of interval images.

7. The mini-game delay control management method according to claim 6, characterized in that: The method for smoothly correcting the preview operation using the interpolation technology according to the real-time operation data comprises: The timestamp of the real-time operation data and the local timestamp of the client at the end of the preview operation are extracted and recorded as the first time stamp and the second time stamp respectively. The offset between the second time stamp and the benchmark is calculated based on the first time stamp. If the offset is greater than 0 or less than 0, time synchronization correction is performed, otherwise, the time is not corrected; The images corresponding to the first time stamp and the second time stamp are collected and recorded as image TS and image SM. If the time is corrected synchronously, the image TS and the image SM are smoothly interpolated. If the time is not corrected, the timestamp corresponding to the image when the difference with the image TS is the smallest in the preview operation is extracted, and the image after the timestamp is deleted, so that the image when the difference is the smallest is directly connected with the image TS.

8. The mini-game delay control management method according to claim 7, characterized in that: The time synchronization correction method comprises: If the offset is greater than 0, add Mn timestamps between the first timestamp and the second timestamp, and ,in, represents the time of preview operation, and F_d represents the number of image frames in the preview operation; If the offset is less than 0, then delete Df timestamps between the first time stamp and the second time stamp, collect the local timestamp of the client when the preview operation starts, record it as the third time stamp, and evenly arrange all remaining timestamps in the preview operation between the third time stamp and the first time stamp in chronological order; And Df=Sc SM -CY min , where Sc SM Indicates the second time scale, CY min Indicates the timestamp corresponding to the time when the difference between the image and the image TS in the preview operation is the smallest.

9. The mini-game delay control management method according to claim 8, characterized in that: The method for smoothly interpolating the image TS and the image SM comprises: Set each of the added Mn timestamps to correspond to an image; Extract each image in the preview operation and arrange them in chronological order. For each image, separate the pixel value on each pixel point and arrange the pixel value on each pixel point in chronological order to form a pixel data set. For each pixel data set, a curve is used for fitting, and the independent variable of the curve is set to the timestamp, and the dependent variable is set to the pixel value; Submit Mn timestamps to the curve corresponding to each pixel data set in turn to obtain the pixel value corresponding to each timestamp; Collect all pixel values ​​on the curve at each timestamp, construct Mn initial images, and fill the pixel values ​​at the same timestamp into the blank image to form the image at the timestamp; The images at Mn timestamps are respectively filled between the image TS and the image SM for smooth interpolation.

10. A mini-game delay control and management system, applied to a mini-game delay control and management method according to any one of claims 1 to 9, characterized in that: The mini-game delay control and management system includes: Network judgment module: obtains the network status coefficient at the current time t and makes delay judgment; Data collection and processing module: collects players' operation data, and uses time windows for differential compression, forming temporary data packets after short-term storage; Model prediction module: Build and train the operation preview model. Under the delay state, input the network state coefficient and temporary data packet at the current time t into the trained operation preview model to predict the player's preview operation in the future. Delay control management module: connects the preview operation with the operation data at time t+BL, collects the real-time operation data after delay recovery, uses interpolation technology to smoothly correct the preview operation according to the real-time operation data, and deploys it on the client.

Citation Information

Patent Citations

  • Unsupervised learning techniques for temporal difference models

    CN110073369A

  • Application control method and device and storage medium

    CN113262467A

  • Data sending and receiving method of cloud game and related equipment

    CN113996056A

  • Image prediction method, electronic equipment and storage medium

    CN115463419A

  • Game instruction model training method and device, storage medium and computing equipment

    CN116688506A