Game replay method, game replay device, storage medium, and apparatus
By storing recorded data on a video server during gameplay and utilizing fault handling logic to manage requests, the issue of game replay system termination in weak network environments was resolved, enabling stable recording and playback and improving the player's gaming experience.
Patent Information
- Application Number
- CN202210946422.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-08
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2042-08-08
AI Technical Summary
Existing game clients cannot provide stable recording and playback functions under weak network conditions, resulting in the termination of the playback system and the inability to correctly record and replay the game process.
During the game, the recorded data is stored in the recording server. Through the fault handling logic, a recording data request is sent to the recording server, the recorded data returned by the recording server is obtained, and the game process is replayed. This includes canceling the request when the request waiting time is too long, extending the retry time interval, monitoring the cache status and other strategies to avoid system crashes.
It achieves correct recording and playback of game processes in weak network environments, improves players' gaming skills, avoids system termination and crashes, and improves system stability.
Smart Images

Figure CN115300901B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a game replay method, a game replay device, a computer-readable storage medium, and an electronic device. Background Art
[0002] With the development of terminal devices and the gaming industry, a large number of games with different themes have emerged to meet the needs of players. In some games, the system provides a game replay function, allowing players to record and replay the game process during the game, so that players can review the game process and improve their game level.
[0003] However, while players are playing, they may experience weak network conditions, such as latency and packet loss. The replay systems in existing game clients perform poorly on weak networks and cannot provide stable recording and playback functions. A weak network condition can cause the replay system to terminate, making it impossible to record or replay the game.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the Invention
[0005] The present disclosure aims to provide a game replay method and device, a computer-readable storage medium, and an electronic device, which can solve the problem of playback system termination in weak network conditions.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by practice of the present disclosure.
[0007] According to a first aspect of the present disclosure, a game replay method is provided, characterized in that the method includes: recording a game process during game play to obtain recorded data, and storing the recorded data on a video recording server; in response to a video playback instruction, sending a recorded data request to the video recording server according to a fault handling logic, so that the video recording server returns the recorded data; obtaining the recorded data returned by the video recording server, and replaying the game process according to the recorded data.
[0008] Optionally, in response to a video playback instruction, a recording data request is sent to the video server according to the fault handling logic so that the video server returns the recording data, including: obtaining the request waiting time of the recording data request; when the request waiting time is greater than a first preset time interval, canceling the recording data request.
[0009] Optionally, when the request waiting time is greater than the preset time interval, after canceling the recording data request, the method further includes: sending a recording data request to the recording server after waiting for a second preset time interval; wherein the value of the second preset time interval is the first time interval; when the request waiting time for the recording data request is greater than the first preset time interval, sending the recording data request to the recording server after waiting for the second preset interval; counting the number of times the recording data request is sent; when the number of times the recording data request is sent is greater than a preset threshold, updating the value of the second preset time interval to the second time interval; wherein the second time interval is greater than the first time interval.
[0010] Optionally, when the request waiting time is greater than the first preset time interval, after canceling the recording data request, the method also includes: sending a recording data request to the recording server after waiting for a second preset time interval; when the request waiting time for the recording data request is greater than the first preset time interval, sending a recording data request to the recording server after waiting for the second preset interval until receiving an error response information corresponding to the recording data; and stopping sending the recording data request to the recording server.
[0011] Optionally, obtain the recorded data returned by the video recording server and replay the game process according to the recorded data, including: monitoring the storage status of the recorded data in the cache corresponding to the terminal device; when the recorded data is stored in the cache corresponding to the terminal device, replay the game process according to the recorded data.
[0012] Optionally, in response to the video jump task creation operation, the jump time point corresponding to the video jump task is obtained; the first recording sub-data returned by the video server is obtained, and the first game sub-process is replayed according to the first recording sub-data; wherein the first recording sub-data includes the first timestamp snapshot data and the first recorded game data corresponding to the first timestamp snapshot data, the first recording sub-data is the recording sub-data closest to the jump time point before the jump time point, and the first recording sub-data is determined according to the first snapshot time point corresponding to the first timestamp snapshot data and the jump time point; the second recording sub-data returned by the video server is obtained, and the second game sub-process is replayed according to the second recording sub-data; wherein the second recording sub-data includes the second timestamp snapshot data and the second recorded game data corresponding to the second timestamp snapshot data, the second recording sub-data is the recording sub-data closest to the jump time point after the jump time point, and the second recording sub-data is determined according to the second snapshot time point corresponding to the second timestamp snapshot data and the jump time point.
[0013] Optionally, the recording data includes third recording sub-data and fourth recording sub-data, the third recording sub-data corresponds to the third game sub-process, and the fourth recording sub-data corresponds to the fourth game sub-process. Obtaining the recording data returned by the recording server and replaying the game process according to the recording data includes: obtaining the third recording sub-data returned by the recording server, and replaying the third game sub-process according to the third recording sub-data; in response to the recording jump task creation operation, obtaining the first time of creating the recording jump task; wherein the recording jump task is used to replay the fourth game sub-process; sending a recording data request for the fourth recording sub-data to the recording server, and monitoring the time difference between the current time and the first time; when the time difference is less than the third preset time interval, replaying the fourth game sub-process according to the fourth recording sub-data; when the time difference is greater than the third preset time interval, resetting the playback state before responding to the recording jump task creation operation.
[0014] Optionally, the video playback instruction corresponds to a playback time point, and a recording data request is sent to the video server according to the fault handling logic, including: when there is timestamp snapshot data at the playback time point, obtaining the timestamp snapshot data, and obtaining the recorded game data corresponding to the timestamp snapshot data.
[0015] According to a second aspect of the present disclosure, a game replay device is provided, characterized in that the device includes: a recording data acquisition module, which is used to record the game process during the game to obtain recording data, and store the recording data on a video recording server; a playback instruction response module, which is used to respond to the video playback instruction and send a recording data request to the video recording server according to the fault processing logic, so that the video recording server returns the recording data; and a game process replay module, which is used to obtain the recording data returned by the video recording server and replay the game process according to the recording data.
[0016] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the game replay method of the first aspect of the above embodiment is implemented.
[0017] According to a fourth aspect of the present disclosure, there is provided an electronic device, including:
[0018] one or more processors; and
[0019] The memory is used to store one or more programs. When the one or more programs are executed by one or more processors, the one or more processors implement the game replay method of the first aspect of the above embodiment.
[0020] The technical solutions provided by the embodiments of the present disclosure may have the following beneficial effects:
[0021] In a game replay method provided by one embodiment of the present disclosure, the game process can be recorded during the game to obtain recorded data, and the recorded data can be stored on a recording server. In response to a recording playback instruction, a recording data request is sent to the recording server according to fault handling logic, so that the recording server returns the recorded data. The recorded data returned by the recording server is obtained, and the game process is replayed based on the recorded data. The solution of the present disclosure can solve the problems encountered by the replay system, preventing the replay system from terminating or crashing after encountering problems, thereby correctly recording and playing the game process, thereby ensuring the playback of the game process, and thus improving the player's gaming level.
[0022] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort. In the drawings:
[0024] Figure 1 A flowchart schematically illustrates a game replay method in an exemplary embodiment of the present disclosure;
[0025] Figure 2 A flowchart schematically illustrates a method of canceling a recording data request when the request waiting time is greater than a first preset time interval in an exemplary embodiment of the present disclosure;
[0026] Figure 3 A flowchart schematically illustrates determining whether to send a recording data request based on a request waiting time and a first preset time interval in an exemplary embodiment of the present disclosure;
[0027] Figure 4 A flowchart schematically illustrates updating the value of the second preset time interval to the second time interval when the number of times the recording data request is sent is greater than a preset threshold in an exemplary embodiment of the present disclosure;
[0028] Figure 5 A flowchart schematically illustrates an exemplary embodiment of the present disclosure in which, when the request waiting time for a recording data request is greater than a first preset time interval, a recording data request is sent to a video recording server after waiting for a second preset time interval until an error response information corresponding to the recording data is received;
[0029] Figure 6A flowchart schematically illustrates a process of replaying a game according to recorded data when the buffer corresponding to the terminal device stores recorded data in an exemplary embodiment of the present disclosure;
[0030] Figure 7 Schematically illustrating a flow chart of a second game sub-process for playing back the second recorded sub-data in an exemplary embodiment of the present disclosure;
[0031] Figure 8 A flowchart schematically illustrates resetting a playback state before a video jump task creation operation in response to a video jump task creation operation when a time interval between a first time and a second time is greater than a third preset time interval in an exemplary embodiment of the present disclosure;
[0032] Figure 9 Another flowchart schematically illustrates resetting the playback state before the video jump task creation operation in response to the time interval between the first time and the second time is greater than a third preset time interval in an exemplary embodiment of the present disclosure;
[0033] Figure 10 A schematic diagram schematically illustrates the composition of a game replay device in an exemplary embodiment of the present disclosure;
[0034] Figure 11 The structure diagram of a computer system suitable for implementing the electronic device of the exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0035] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete and the concepts of the example embodiments will be fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In addition, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or that other methods, components, devices, steps, etc. may be employed. In other cases, well-known structures, methods, devices, implementations, materials, or operations are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0036] The blocks shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. Specifically, these functional entities may be implemented in software, or in one or more software-hardened modules, or in different networks and / or processor devices and / or microcontroller devices.
[0037] With the development of terminal devices and the gaming industry, a large number of games with different themes have emerged to meet the needs of players. In some games, the system provides a game replay function, allowing players to record and replay the game process during the game, so that players can review the game process and improve their game level.
[0038] However, while players are playing, they may experience weak network conditions, such as latency and packet loss. The replay systems in existing game clients perform poorly on weak networks and cannot provide stable recording and playback functions. A weak network condition can cause the replay system to terminate, making it impossible to record or replay the game.
[0039] In an exemplary embodiment of the present disclosure, the game process can be recorded during the game to obtain recorded data, the recorded data can be stored in a recording server, and in response to a recording playback instruction, a recording data request can be sent to the recording server according to the fault handling logic, so that the recording server returns the recorded data, the recorded data returned by the recording server can be obtained, and the game process can be replayed based on the recorded data. Figure 1 FIG. 1 shows a flow chart of a game replay method in this exemplary embodiment, which may include the following steps:
[0040] Step S110: Recording the game process to obtain recorded data during the game, and storing the recorded data in a video recording server;
[0041] Step S120: In response to the video playback instruction, a recording data request is sent to the video server according to the fault processing logic, so that the video server returns the recording data;
[0042] Step S130: Obtain the recorded data returned by the video recording server, and replay the game process according to the recorded data.
[0043] In a game replay method provided by one embodiment of the present disclosure, the game process can be recorded during the game to obtain recorded data, the recorded data can be stored on a recording server, and in response to a recording playback instruction, a recording data request can be sent to the recording server according to fault handling logic, so that the recording server returns the recorded data. The recorded data returned by the recording server is obtained, and the game process is replayed based on the recorded data. The solution of the present disclosure can solve the problems encountered by the replay system, preventing the replay system from terminating or crashing after encountering problems, thereby correctly recording and playing the game process, thereby ensuring the playback of the game process, and thus improving the player's gaming level.
[0044] In an exemplary embodiment of the present disclosure, the solution of the present disclosure may be applied to an Unreal Engine recording system. In the Unreal Engine recording system, a recording data request or recording data may be transmitted via an HTTP (HyperText Transfer Protocol) data stream.
[0045] In an exemplary embodiment of the present disclosure, the games in the solution of the present disclosure may include various types of games, such as TPS (third-person shooter), FPS (first-person shooter), RPG (role-playing game), ACT (action game), SLG (strategy game), FTG (fighting game), SPG (sports competitive game), RCG (racing game), AVG (adventure game), etc. As long as the scenario involves game instruction conversion, the game replay solution of the present disclosure can be applied. It should be noted that the present disclosure does not specifically limit the type of game.
[0046] Next, we will combine Figure 1 The following describes steps S110 to S130 of the game replay method in this exemplary embodiment in more detail.
[0047] Step S110, recording the game process during the game to obtain recording data, and storing the recording data in a video recording server;
[0048] In an example embodiment of the present disclosure, the game process can be recorded during the game to obtain recorded data. Specifically, the game process refers to the state after the game application is launched and the player enters the game game, game competition, game plot, etc. For example, in a racing game, players can match other players in the game lobby and compete. After successful matching, the cars controlled by multiple players enter the competition scene, and the players control their cars to compete. The state at this time is the state of the game process.
[0049] In an example embodiment of the present disclosure, the game process can be recorded to obtain recording data during the game process. Specifically, the recording data can include a full data snapshot in the game, which can be used to indicate the related information of a plurality of virtual units in the game scene, and the game scene can be restored through the full data snapshot to achieve the purpose of recording the game process.
[0050] It should be noted that the present disclosure does not specially limit the way of recording the game process and the specific form of the recording data.
[0051] In an example embodiment of the present disclosure, after obtaining the recording data through the above steps, the recording data can be stored in a video server. Specifically, the video server refers to a server for collecting recording data, which can include a video server cluster. The recording data obtained by recording the game process during the game process can be stored in the video server.
[0052] It should be noted that the present disclosure does not specially limit the specific type of the video server.
[0053] In an example embodiment of the present disclosure, the recording data obtained by recording the game process is Chunk data, and when the game process is played back according to the recording data, the Chunk data needs to be decoded into a StreamBuffer (stream buffer) to play back the game process according to the recording data.
[0054] Step S120, in response to the video playback instruction, sending a recording data request to the video server according to the fault processing logic, so that the video server returns the recording data;
[0055] In an example embodiment of the present disclosure, after storing the recording data in the video server through the above steps, a recording data request can be sent to the video server in response to a video playback instruction, so that the video server returns the recording data. Specifically, the recording data obtained by recording the game process can be requested from the video server during the game process or after the game ends, for playing back the game process corresponding to the recording data.
[0056] The video playback instruction can be used to play back the game process corresponding to the recording data. Specifically, the video playback instruction can be triggered automatically by the system. For example, when the game virtual object controlled by the player is attacked, the video playback instruction can be triggered automatically by the system to play back the game process in which the game virtual object is attacked; or when the game virtual object controlled by the player completes a fixed combo, the video playback instruction can be triggered automatically by the system to play back the game process in which the game virtual object performs the fixed combo.
[0057] Alternatively, the video playback instruction can be triggered by a video playback operation. For example, the video playback operation can include a key operation, a touch operation, voice control, etc. The recording data request can be sent to the video server through the video playback instruction. It should be noted that the form of the video playback operation is not specially limited in the present disclosure.
[0058] It should be noted that the present disclosure does not specially limit the triggering mode of the video playback instruction.
[0059] In an example embodiment of the present disclosure, the recording data request can be sent to the video server according to the fault handling logic, so that the video server returns the recording data. Specifically, due to the existence of weak network problems, the recording function or the playback function may fail, for example, when the game process needs to be played back, the recording data request needs to be sent to the video server, however, in the weak network state, the recording data request cannot be responded in time, resulting in frequent sending of recording data requests to the video server, at this time, the system may be terminated, affecting the user's experience. Therefore, the video playback instruction can be processed according to the fault handling logic and the current fault state. For example, the recording data request can be cancelled and reserved first, and the current network state is monitored, when the network is not in the weak network state, the recording data request is processed, and the recording data is sent to the terminal device.
[0060] It should be noted that the present disclosure does not specially limit the specific content of the fault handling logic.
[0061] In step S130, the recording data returned by the video server is obtained, and the game process is played back according to the recording data.
[0062] In an example embodiment of the present disclosure, after the recording data request is sent to the video server through the above steps, the recording data can be returned to the terminal device by the video server, at this time, the recording data can be obtained, and the game process can be played back according to the recording data. Specifically, after the terminal device obtains the recording data, the game process can be played back according to the recording data. For example, the recording data can include a full data snapshot in the game, which can be used to indicate the related information of a plurality of virtual units in the game scene, and the game scene can be restored and the game process can be played back through the full data snapshot.
[0063] It should be noted that the present disclosure does not specially limit the specific way of playing back the game process according to the recording data.
[0064] In an example embodiment of the present disclosure, a request waiting time of the recording data request can be acquired, and when the request waiting time is less than a first preset time interval, the recording data request can be sent to the video server, and when the request waiting time is greater than the first preset time interval, the recording data request can be cancelled. Referring to Figure 2 As shown in the figure, when the request waiting time is greater than the first preset time interval, the recording data request can be cancelled, which can include the following steps S210-S220:
[0065] Step S210, acquiring a request waiting time of the recording data request;
[0066] In an example embodiment of the present disclosure, after the recording data request is sent to the video server through the above steps, the request waiting time of the recording data request can be acquired. Specifically, the request waiting time can include a waiting time after the recording data request is sent and before the video server responds, or the request waiting time can include a time before the video server receives the recording data request and returns the recording data to the terminal device after the recording data request is sent.
[0067] It should be noted that the present disclosure does not make special limitations on the specific way of acquiring the request waiting time of the recording data request.
[0068] Step S220, when the request waiting time is greater than the first preset time interval, the recording data request is cancelled.
[0069] In an example embodiment of the present disclosure, after the request waiting time of the recording data request is obtained through the above steps, the request waiting time of the recording data request can be compared with the first preset time interval. When the request waiting time is greater than the first preset time interval, it can be indicated that the current network state is poor. Therefore, when the request waiting time is less than the first preset time interval, the recording data request can be sent to the video server to make the video server return the recording data, and when the request waiting time is greater than the first preset time interval, the recording data request can be cancelled.
[0070] Further, when the request waiting time is greater than the first preset time interval, the recording data request can be cancelled, and the recording data request can be saved and retransmitted after an interval time period.
[0071] In an example embodiment of the present disclosure, a data layer HTTPStreamer can be constructed for the playback system to process the playback data. As shown in the figure, Figure 3As shown, whether to send the recording data request is determined according to the request waiting time and the first preset time interval. The game playback process can be controlled through the data layer. In the game loop, whether the request waiting time is greater than the first preset time interval is determined. When the request waiting time is greater than the first preset time interval, the recording data request is cancelled, the recording data request is saved, and the recording data request is sent to the video server again after waiting for a second preset time interval. When the request waiting time is less than the first preset time interval, the recording data request is sent to the video server
[0072] Through steps S210-S220, the request waiting time of the recording data request can be obtained. When the request waiting time is less than the first preset time interval, the recording data request is sent to the video server. When the request waiting time is greater than the first preset time interval, the recording data request is cancelled. Through the embodiment of the present disclosure, the request waiting time of the recording data request can be determined. When the request waiting time of the recording data request is long, the recording data request is cancelled, system termination or crash is avoided, and the stability of the system is improved.
[0073] In an example embodiment of the present disclosure, the recording data request can be sent to the video server after waiting for a second preset time interval. When the request waiting time of the recording data request is greater than the first preset time interval, the recording data request is sent to the video server after waiting for a second preset time interval. The number of times of sending the recording data request is counted. When the number of times of sending the recording data request is greater than a preset threshold, the value of the second preset time interval is updated to a second time interval. Referring to Figure 4 As shown, when the number of times of sending the recording data request is greater than the preset threshold, the value of the second preset time interval is updated to the second time interval, which can include steps S410-S440:
[0074] Step S410, the recording data request is sent to the video server after waiting for a second preset time interval; wherein the value of the second preset time interval is the first time interval;
[0075] In an example embodiment of the present disclosure, after the recording data request is cancelled through the above steps, the recording data request can be sent to the video server after waiting for a second preset time interval. The value of the second preset time interval is the first time interval. Specifically, since the request waiting time is greater than the first preset time interval, it can be indicated that the current network state is poor. Therefore, the recording data request needs to be cancelled, and the recording data request is sent to the video server again after waiting for a second preset time interval, so that the video server returns the recording data.
[0076] Step S420, when the request waiting time of the recording data request is greater than the first preset time interval, the recording data request is sent to the video server after waiting for a second preset time interval;
[0077] Step S430, counting the number of times the recording data request is sent;
[0078] In an example embodiment of the present disclosure, after sending a recording data request to the video recording server again after waiting for the second preset time interval, the request waiting time of this recording data request can be compared with the first preset time interval. When the request waiting time of the recording data request is greater than the first preset time interval, the recording data request is sent to the video recording server after waiting for the second preset interval time again. The above process is repeated, and the request waiting time after sending the recording data request is always greater than the second preset time interval. At this time, the number of times the recording data request is sent can be counted.
[0079] Step S440: When the number of times the recording data request is sent is greater than the preset threshold, the value of the second preset time interval is updated to the second time interval.
[0080] In an exemplary embodiment of the present disclosure, after obtaining the number of times a recording data request has been sent through the above steps, the value of the second preset time interval can be updated to a second time interval when the number of times a recording data request has been sent is greater than a preset threshold. The second time interval is greater than the first time interval. Specifically, when the number of times a recording data request has been sent is greater than the preset threshold, it indicates that the recording data request has been sent multiple times and no recording data has been returned. In this case, the value of the second preset time interval can be updated to a second time interval that is larger (relative to the first time interval).
[0081] For example, the first time interval is 4s, the number of times the recording data request is sent is 11 times, the preset threshold is 10 times, and the number of times the recording data request is sent is greater than the preset threshold. At this time, the value of the second preset time interval can be updated to 10s.
[0082] It should be noted that the present disclosure does not impose any special limitation on the specific values of the first time interval, the second time interval, and the preset threshold.
[0083] Through the above steps S410 to S440, a recording data request can be sent to the recording server after waiting for the second preset time interval. When the request waiting time for the recording data request is greater than the first preset time interval, the recording data request is sent to the recording server after waiting for the second preset time interval. The number of times the recording data request is sent is counted. When the number of times the recording data request is sent exceeds a preset threshold, the value of the second preset time interval is updated to the second time interval. Through the embodiments of the present disclosure, the retry time can be extended to avoid frequent sending of recording data requests to the recording server, which may cause the system to terminate or crash.
[0084] In an example embodiment of the present disclosure, the recording data request can be sent to the video server after waiting for a second preset time interval. When the request waiting time of the recording data request is greater than the first preset time interval, the recording data request can be sent to the video server after waiting for a second preset time interval until the error response information corresponding to the recording data is received, and the sending of the recording data request to the video server can be stopped. Referring to Figure 5 As shown in the figure, when the request waiting time of the recording data request is greater than the first preset time interval, the recording data request can be sent to the video server after waiting for a second preset time interval until the error response information corresponding to the recording data is received, which can include the following steps S510-S530:
[0085] In step S510, the recording data request can be sent to the video server after waiting for a second preset time interval.
[0086] In step S520, when the request waiting time of the recording data request is greater than the first preset time interval, the recording data request can be sent to the video server after waiting for a second preset time interval until the error response information corresponding to the recording data is received.
[0087] In step S530, the sending of the recording data request to the video server can be stopped.
[0088] In an example embodiment of the present disclosure, after the recording data request is cancelled through the above steps, the recording data request can be sent to the video server after waiting for a second preset time interval. After the recording data request is sent to the video server again after waiting for the second preset time interval, the request waiting time of the current recording data request can be compared with the first preset time interval. When the request waiting time of the recording data request is greater than the first preset time interval, the recording data request can be sent to the video server again after waiting for a second preset time interval. The above process can be repeated, and the request waiting time after the recording data request is sent can always be greater than the second preset time interval until the error response information corresponding to the recording data is received. Specifically, the error response information corresponding to the recording data can include a recording data stream error code, which can indicate that the recording data to be requested currently has an error. At this time, the sending of the recording data request to the video server can be stopped.
[0089] It should be noted that the present disclosure does not specially limit the specific value of the second preset time interval and the specific form of the error response information corresponding to the recording data.
[0090] Through the above steps S510 to S530, a recording data request can be sent to the recording server after waiting for the second preset time interval. If the request waiting time for the recording data request is greater than the first preset time interval, the recording data request can be sent to the recording server after waiting for the second preset time interval until an error response information corresponding to the recording data is received, and then the recording data request is stopped from being sent to the recording server. Through the embodiments of the present disclosure, when an error occurs in the recording data, the recording data request can be stopped, thereby avoiding system termination or crash caused by frequent transmission of recording data requests, thereby improving system stability.
[0091] In an example embodiment of the present disclosure, a recording data request can be sent to a video recording server after waiting for a second preset time interval. When the request waiting time for the recording data request is greater than the first preset time interval, a recording data request can be sent to the video recording server after waiting for the second preset interval. The number of times the recording data request is sent is counted. When the number of times the recording data request is sent is greater than a preset threshold, sending the recording data request to the video recording server is stopped.
[0092] In an exemplary embodiment of the present disclosure, the storage status of the recorded data in the buffer corresponding to the terminal device can be monitored, and when the buffer corresponding to the terminal device stores the recorded data, the game process can be replayed according to the recorded data. Figure 6 As shown, when the buffer corresponding to the terminal device stores recorded data, replaying the game process according to the recorded data may include the following steps S610 to S620:
[0093] Step S610, monitoring the storage status of the recorded data in the buffer corresponding to the terminal device;
[0094] Step S620: When the buffer corresponding to the terminal device stores the recorded data, the game process is replayed according to the recorded data.
[0095] In an exemplary embodiment of the present disclosure, the storage status of recorded data in the cache corresponding to the terminal device can be monitored. Specifically, after sending the recorded data to the recording server through the above steps, the storage status of the recorded data in the cache corresponding to the terminal device can be detected. Only when the recorded data is stored in the cache corresponding to the terminal device, can the game process be replayed based on the recorded data. The presence of recorded data in the cache corresponding to the terminal device indicates that the recording server has returned the recorded data to the terminal device, and therefore there is no need to send a recording data request to the recording server.
[0096] Through the above steps S610 to S620, the storage status of the recorded data in the buffer corresponding to the terminal device can be monitored. When the buffer corresponding to the terminal device stores recorded data, the game process can be replayed based on the recorded data. Through the embodiments of the present disclosure, when recorded data is stored in the buffer of the terminal device, no recording data request is sent, and playback can be performed directly based on the recorded data. This avoids the terminal device frequently sending recording data requests to the recording server, which may cause the system to terminate or crash, thereby improving system stability.
[0097] In an exemplary embodiment of the present disclosure, in response to a video jump task creation operation, the jump time point corresponding to the video jump task is obtained, the first recorded sub-data returned by the video server is obtained, the first game sub-process is played back according to the first recorded sub-data, the second recorded sub-data returned by the video server is obtained, and the second game sub-process is played back according to the second recorded sub-data. Figure 7 As shown, replaying the second game sub-process according to the second recorded sub-data may include the following steps S710 to S730:
[0098] Step S710: In response to the video jump task creation operation, obtaining the jump time point corresponding to the video jump task;
[0099] In an exemplary embodiment of the present disclosure, after receiving a video playback instruction, a video jump task creation operation may be received to obtain a jump time point corresponding to the video jump task. Specifically, a video jump task refers to replaying the game process from a specified time. For example, if the recorded data is game recording data from 0s to 70s, which is used to indicate the game process from 0s to 70s, the video jump task may indicate replaying the game process from 30s. A video jump task can be established through a video jump task creation operation.
[0100] The video jump task creation operation may include key operation, touch operation, voice control, etc. It should be noted that the present disclosure does not impose any special limitation on the form of the video jump task creation operation.
[0101] For example, you can create a video jump task by sliding the progress bar.
[0102] In an exemplary embodiment of the present disclosure, after receiving a video jump task creation operation, a jump time point corresponding to the video jump task can be obtained. Specifically, the jump time point corresponding to the video jump task can be used to indicate the time from which the game process needs to be replayed.
[0103] It should be noted that the present disclosure does not impose any special limitation on the specific method of obtaining the jump time point corresponding to the video jump task.
[0104] Step S720: Obtain the first recorded sub-data returned by the video recording server, and replay the first game sub-process according to the first recorded sub-data;
[0105] In an exemplary embodiment of the present disclosure, the first recorded sub-data returned by the video recording server can be obtained through the above steps, and the first game sub-process can be replayed based on the first recorded sub-data. The first recorded sub-data includes the first timestamp snapshot data and the first recorded game data corresponding to the first timestamp snapshot data. The first recorded sub-data is the recorded sub-data closest to the jump time point before the jump time point, and the first recorded sub-data is determined based on the first snapshot time point and the jump time point corresponding to the first timestamp snapshot data. Specifically, after obtaining the jump time corresponding to the video jump task, a recording data request for the first recorded sub-data can be sent to the video recording server to cause the video recording server to return the first recorded sub-data.
[0106] Specifically, the recording server includes multiple recording sub-data, and the recording sub-data includes timestamp snapshot data and recorded game data corresponding to the timestamp snapshot data. For example, the timestamp snapshot data may include checkpoint data (full recording data snapshot), and the recorded game data corresponding to the timestamp snapshot data may include chunk data (recording / playback data). It should be noted that the present disclosure does not specifically limit the specific types of timestamp snapshot data and recorded game data corresponding to the timestamp snapshot data.
[0107] In an exemplary embodiment of the present disclosure, the first recording sub-data can be determined by the jump time point corresponding to the video jump task. Specifically, the timestamp snapshot data included in the recording sub-data corresponds to the snapshot time point, and the first recording data can be determined by the jump time point and the snapshot time points corresponding to the multiple recording sub-data, wherein the first recording sub-data is the recording sub-data closest to the jump time point before the jump time point, that is, the jump time point can be compared with the snapshot time points corresponding to the multiple recording sub-data, and when the snapshot time point corresponding to the recording sub-data is closest to the jump time point and the snapshot time point is before the jump time point, the recording sub-data corresponding to the snapshot time point can be determined as the first recording sub-data.
[0108] In an exemplary embodiment of the present disclosure, after the first recorded sub-data is acquired through the above steps, the first game sub-process may be replayed according to the first recorded sub-data.
[0109] Step S730: Obtain the second recorded sub-data returned by the video recording server, and replay the second game sub-process according to the second recorded sub-data.
[0110] In an example embodiment of the present disclosure, after obtaining the first recorded sub-data returned by the video recording server through the above steps, when replaying the first game sub-process according to the first recorded sub-data, a recorded data request for the second recorded sub-data can be sent to the server. Specifically, the second recorded sub-data refers to the recorded data required to play the second game sub-process after the first game sub-process is played back. That is, when replaying the first game sub-process according to the first recorded sub-data, the second recorded sub-data required for playing the second game sub-process can be obtained. The second recorded sub-data includes the second timestamp snapshot data and the second recorded game data corresponding to the second timestamp snapshot data. The second recorded sub-data is the recorded sub-data after the jump time point and closest to the jump time point. The second recorded sub-data is determined based on the second snapshot time point corresponding to the second timestamp snapshot data and the jump time point.
[0111] In an exemplary embodiment of the present disclosure, the second recording sub-data can be determined by the jump time point corresponding to the video jump task. Specifically, the timestamp snapshot data included in the recording sub-data corresponds to the snapshot time point, and the second recording data can be determined by the jump time point and the snapshot time points corresponding to the multiple recording sub-data, wherein the second recording sub-data is the recording sub-data closest to the jump time point after the jump time point, that is, the jump time point can be compared with the snapshot time points corresponding to the multiple recording sub-data, and when the snapshot time point corresponding to the recording sub-data is closest to the jump time point and the snapshot time point is after the jump time point, the recording sub-data corresponding to the snapshot time point can be determined as the second recording sub-data.
[0112] In an exemplary embodiment of the present disclosure, after receiving the video jump task creation operation, the cached second recording sub-data may be decompressed, and the second game sub-process may be replayed based on the decompressed second recording sub-data.
[0113] When there is timestamp snapshot data at the playback time point, the timestamp snapshot data is obtained, and the recorded game data corresponding to the timestamp snapshot data is obtained.
[0114] Through the above steps S710 to S730, in response to the video jump task creation operation, the jump time point corresponding to the video jump task can be obtained, the first recording sub-data returned by the video server can be obtained, the first game sub-process can be played back according to the first recording sub-data, the second recording sub-data returned by the video server can be obtained, and the second game sub-process can be played back according to the second recording sub-data.
[0115] In an exemplary embodiment of the present disclosure, the third recording sub-data returned by the recording server can be obtained, the third game sub-process can be replayed according to the third recording sub-data, the first time of creating the recording jump task can be obtained in response to the recording jump task creation operation, a recording data request for the fourth recording sub-data can be sent to the recording server, the time difference between the current time and the first time can be monitored, and when the time difference is less than the third preset time interval, the fourth game sub-process can be replayed according to the fourth recording sub-data, and when the time difference is greater than the third preset time interval, the playback state before responding to the recording jump task creation operation can be reset. Figure 8 As shown, when the time interval between the first time and the second time is greater than the third preset time interval, resetting the playback state before the video jump task creation operation in response to the video jump task creation operation may include the following steps S810 to S850:
[0116] Step S810, obtaining the third recorded sub-data returned by the video recording server, and replaying the third game sub-process according to the third recorded sub-data;
[0117] In an exemplary embodiment of the present disclosure, third recorded sub-data returned by a recording server can be obtained, and a third game sub-process can be replayed based on the third recorded sub-data. Specifically, the recording server may include multiple recorded sub-data. A recording data request for the third recorded sub-data can be sent to the recording server, and the recording server returns the third recorded sub-data to a terminal device. The terminal device then replays the third game sub-process based on the third recorded sub-data.
[0118] Step S820: In response to the video jump task creation operation, obtaining a first time of creating the video jump task; wherein the video jump task is used to replay the fourth game sub-process;
[0119] In an exemplary embodiment of the present disclosure, when the third game sub-process is replayed through the above steps, a video jump task creation operation can be received to obtain the first time of creating the video jump task. The video jump task is used to replay the fourth game sub-process. Specifically, the video jump task creation operation can be used to create a video jump task, and the video jump task refers to replaying the game process from a specified time. For example, the recording data is game recording data from 0s to 60s, which is used to indicate the game process from 0s to 60s. The video jump task can indicate replaying the game process from 30s. The video jump task can be established through the video jump task creation operation.
[0120] The video jump task creation operation may include key operation, touch operation, voice control, etc. It should be noted that the present disclosure does not impose any special limitation on the form of the video jump task creation operation.
[0121] For example, you can create a video jump task by sliding the progress bar.
[0122] In an exemplary embodiment of the present disclosure, after receiving a video jump task creation operation, the first time of creating the video jump task can be obtained. Specifically, the first time of creating the video jump task can be used to indicate the time when the video jump task was created.
[0123] Step S830, sending a recording data request for the fourth recording sub-data to the video server, and monitoring the time difference between the current time and the first time;
[0124] Step S840: When the time difference is less than the third preset time interval, replay the fourth game sub-process according to the fourth recorded sub-data;
[0125] Step S850: When the time difference is greater than a third preset time interval, resetting the playback state before responding to the video jump task creation operation.
[0126] In an exemplary embodiment of the present disclosure, after obtaining the first time for creating a video jump task through the above steps, a recording data request for the fourth recording sub-data can be sent to the video server for replaying the fourth game sub-process corresponding to the fourth recording sub-data. At this time, the time difference between the current time and the first time can be used. When the time difference is greater than a third preset time interval, it indicates that the current network state is not good and is not suitable for video playback jump. When the time difference is less than the third preset time interval, it indicates that the current network state is good and video playback jump can be performed. Therefore, when the time difference is less than the third preset time interval, the fourth game sub-process can be replayed according to the fourth recording sub-data. When the time difference is greater than the third preset time interval, the playback state before the video jump task creation operation can be reset.
[0127] In an exemplary embodiment of the present disclosure, a logic layer DemoNetDriver can be constructed for the playback system, and the game playback process of this embodiment can be processed through this logic layer. Figure 9 As shown, the game playback process can be controlled by the logic layer. Within the game loop, it is determined whether the time difference between the current time and the first time is less than the third preset time interval. When the time difference between the current time and the first time is less than the third preset time interval, the fourth game sub-process is played back according to the fourth recording sub-data. When the time difference between the current time and the first time is greater than the third preset time interval, the playback state before the video jump task creation operation is reset.
[0128] By the steps S810-S850, the third recording sub-data returned by the recording server can be acquired, the third game sub-process is played back according to the third recording sub-data, the first time of creating the recording jump task is acquired in response to the recording jump task creation operation, the recording data request for the fourth recording sub-data is sent to the recording server, the time difference between the current time and the first time is monitored, the fourth game sub-process is played back according to the fourth recording sub-data when the time difference is less than the third preset time interval, and the playback state before the recording jump task creation operation is reset when the time difference is greater than the third preset time interval. Through the embodiment of the present disclosure, the acquisition time of the fourth recording sub-data can be monitored, and when the acquisition time is long, the recording jump task is no longer performed, and the reset is performed, so that the system returns to the state before the jump task is executed, the system termination or crash is avoided, and the stability of the system is improved.
[0129] In an example embodiment of the present disclosure, the game process can be recorded to obtain recording data during the game process, the recording data is stored in a recording server, and the recording data request is sent to the recording server according to the fault processing logic in response to the recording playback instruction, so that the recording data is returned by the recording server. The game process is played back according to the recording data.
[0130] In an example embodiment of the present disclosure, the game process can be recorded to obtain recording data during the game process, the recording data is stored in a recording server, and the recording data request is sent to the recording server according to the fault processing logic in response to the recording playback instruction, so that the recording data is returned by the recording server. The game process is played back according to the recording data. The scheme of the present disclosure can solve the problems encountered by the playback system, avoid the termination or crash of the playback system after encountering problems, so that the game process can be correctly recorded and played back, thereby ensuring the game process playback and improving the game level of the player.
[0131] It should be noted that the above-described figures are only schematic illustrations of the processes included in the method according to the example embodiments of the present disclosure, and are not for limiting purposes. It is easy to understand that the processes shown in the above-described figures do not indicate or limit the time sequence of the processes. In addition, it is also easy to understand that these processes can be executed synchronously or asynchronously, for example, in multiple modules.
[0132] In addition, in the example embodiments of the present disclosure, a game playback device is also provided. Referring to Figure 10 As shown in the figure, a game playback device 1000 includes a recording data acquisition module 1010, a playback instruction response module 1020, and a game process playback module 1030.
[0133] The recording data acquisition module is configured to record a game process to obtain recording data during the game process, and store the recording data in a video server.
[0134] In an example embodiment of the present disclosure, based on the foregoing scheme, in response to the video playback instruction, the recording data request is sent to the video server according to the fault processing logic, so that the video server returns the recording data, and the device further comprises: a request waiting time acquisition unit configured to acquire a request waiting time of the recording data request; and a first request waiting time comparison unit configured to cancel the recording data request when the request waiting time is greater than a first preset time interval.
[0135] In an example embodiment of the present disclosure, based on the foregoing scheme, after the recording data request is cancelled when the request waiting time is greater than the preset time interval, the device further comprises: a first preset time interval waiting unit configured to send the recording data request to the video server after waiting for a second preset time interval; wherein the value of the second preset time interval is the first time interval; a first re-sending unit configured to send the recording data request to the video server after waiting for the second preset interval time when the request waiting time of the recording data request is greater than the first preset time interval; a sending frequency statistical unit configured to count the sending frequency of the recording data request; and a sending frequency comparison unit configured to update the value of the second preset time interval to a second time interval when the sending frequency of the recording data request is greater than a preset threshold; wherein the second time interval is greater than the first time interval.
[0136] In an example embodiment of the present disclosure, based on the foregoing scheme, after the recording data request is cancelled when the request waiting time is greater than the first preset time interval, the device further comprises: a second preset time interval waiting unit configured to send the recording data request to the video server after waiting for a second preset time interval; a second re-sending unit configured to send the recording data request to the video server after waiting for the second preset interval time when the request waiting time of the recording data request is greater than the first preset time interval, until an error response information corresponding to the recording data is received; and a stopping sending unit configured to stop sending the recording data request to the video server.
[0137] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the recorded data returned by the video recording server is obtained, and the game process is replayed according to the recorded data. The device also includes: a first storage status monitoring unit, which is used to monitor the storage status of the recorded data in the cache corresponding to the terminal device; and a storage determination unit, which is used to replay the game process according to the recorded data when the recorded data is stored in the cache corresponding to the terminal device.
[0138] In an exemplary embodiment of the present disclosure, based on the above-mentioned scheme, the recording data returned by the video recording server is obtained, and the game process is replayed according to the recording data. The device also includes: a first creation operation response unit, which is used to respond to the video jump task creation operation and obtain the jump time point corresponding to the video jump task; a first game sub-process playback unit, which is used to obtain the first recorded sub-data returned by the video recording server and replay the first game sub-process according to the first recorded sub-data; wherein the first recorded sub-data includes the first timestamp snapshot data and the first recorded game data corresponding to the first timestamp snapshot data, and the first recorded sub-data is the time before the jump time point and the time before the jump time point. The recorded sub-data closest to the time point is determined based on the first snapshot time point and the jump time point corresponding to the first timestamp snapshot data; the second game sub-process playback unit is used to obtain the second recorded sub-data returned by the video recording server, and play back the second game sub-process based on the second recorded sub-data; wherein, the second recorded sub-data includes the second timestamp snapshot data and the second recorded game data corresponding to the second timestamp snapshot data, the second recorded sub-data is the recorded sub-data after the jump time point and closest to the jump time point, and the second recorded sub-data is determined based on the second snapshot time point and the jump time point corresponding to the second timestamp snapshot data.
[0139] In an exemplary embodiment of the present disclosure, based on the aforementioned solution, the recorded data includes third recorded sub-data and fourth recorded sub-data, the third recorded sub-data corresponding to the third game sub-process, and the fourth recorded sub-data corresponding to the fourth game sub-process, the recorded data returned by the video recording server is obtained, and the game process is replayed according to the recorded data. The apparatus further includes: a third recorded sub-data obtaining unit, configured to obtain the third recorded sub-data returned by the video recording server, and replay the third game sub-process according to the third recorded sub-data; a second creation operation response unit, configured to obtain a first time for creating a video jump task in response to a video jump task creation operation, wherein the video jump task is used to replay the fourth game sub-process; a second recorded data request sending unit, configured to send a recorded data request for the fourth recorded sub-data to the video recording server, including a time difference between the current time and the first time; a fourth game sub-process replay unit, configured to replay the fourth game sub-process according to the fourth recorded sub-data when the time difference is less than a third preset time interval; and a playback state resetting unit, configured to reset the playback state before responding to the video jump task creation operation when the time difference is greater than the third preset time interval.
[0140] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the video playback instruction corresponds to a playback time point, and a recording data request is sent to the video server according to the fault handling logic. The device also includes: a timestamp snapshot data acquisition unit, which is used to obtain the timestamp snapshot data when there is timestamp snapshot data at the playback time point, and obtain the recorded game data corresponding to the timestamp snapshot data.
[0141] Since the various functional modules of the game replay device in the example embodiment of the present disclosure correspond to the steps of the example embodiment of the game replay method described above, for details not disclosed in the embodiment of the device of the present disclosure, please refer to the embodiment of the game replay method described above in the present disclosure.
[0142] It should be noted that although several modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.
[0143] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above-mentioned game replay method is also provided.
[0144] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods, or program products. Therefore, various aspects of the present disclosure may be implemented in the following forms: a complete hardware embodiment, a complete software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects, which may be collectively referred to herein as a "circuit," "module," or "system."
[0145] Refer to the following Figure 11 1100 according to this embodiment of the present disclosure is described. Figure 11 The electronic device 1100 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0146] like Figure 11 As shown, electronic device 1100 is implemented as a general-purpose computing device. Components of electronic device 1100 may include, but are not limited to, the aforementioned at least one processing unit 1110, the aforementioned at least one storage unit 1120, a bus 1130 connecting various system components (including storage unit 1120 and processing unit 1110), and a display unit 1140.
[0147] The storage unit stores program codes, which can be executed by the processing unit 1110, so that the processing unit 1110 performs the steps described in the above “Exemplary Method” section according to various exemplary embodiments of the present disclosure. For example, the processing unit 1110 can perform the steps shown in FIG. 1, such as Figure 1 Step S110: recording a game process to obtain recording data during game playing, and storing the recording data in a recording server; Step S120: in response to a recording playback instruction, sending a recording data request to the recording server according to a fault processing logic, so that the recording server returns the recording data; and Step S130: obtaining the recording data returned by the recording server, and playing back the game process according to the recording data.
[0148] In an exemplary embodiment of the present disclosure, based on the foregoing scheme, in response to a recording playback instruction, the recording server returns the recording data according to a fault processing logic, including: obtaining a request waiting time of the recording data request; and canceling the recording data request when the request waiting time is greater than a first preset time interval.
[0149] In an exemplary embodiment of the present disclosure, based on the foregoing scheme, after the recording data request is canceled when the request waiting time is greater than the preset time interval, the method further includes: sending the recording data request to the recording server after waiting for a second preset time interval; wherein the value of the second preset time interval is the first time interval; sending the recording data request to the recording server after waiting for the second preset interval when the request waiting time of the recording data request is greater than the first preset time interval; counting the number of times of sending the recording data request; updating the value of the second preset time interval to a second time interval when the number of times of sending the recording data request is greater than a preset threshold; and wherein the second time interval is greater than the first time interval.
[0150] In an exemplary embodiment of the present disclosure, based on the foregoing scheme, after the recording data request is canceled when the request waiting time is greater than the first preset time interval, the method further includes: sending the recording data request to the recording server after waiting for a second preset time interval; and sending the recording data request to the recording server after waiting for the second preset interval when the request waiting time of the recording data request is greater than the first preset time interval, until an error response information corresponding to the recording data is received; and stopping sending the recording data request to the recording server.
[0151] In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the recording data returned by the recording server is obtained, and the game process is played back according to the recording data, including: monitoring the storage state of the recording data in the cache corresponding to the terminal device; and playing back the game process according to the recording data when the terminal device corresponding cache stores the recording data.
[0152] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, in response to the video jump task creation operation, the jump time point corresponding to the video jump task is obtained; the first recording sub-data returned by the video server is obtained, and the first game sub-process is replayed according to the first recording sub-data; wherein the first recording sub-data includes first timestamp snapshot data and first recorded game data corresponding to the first timestamp snapshot data, the first recording sub-data is the recording sub-data closest to the jump time point before the jump time point, and the first recording sub-data is determined according to the first snapshot time point corresponding to the first timestamp snapshot data and the jump time point; the second recording sub-data returned by the video server is obtained, and the second game sub-process is replayed according to the second recording sub-data; wherein the second recording sub-data includes second timestamp snapshot data and second recorded game data corresponding to the second timestamp snapshot data, the second recording sub-data is the recording sub-data closest to the jump time point after the jump time point, and the second recording sub-data is determined according to the second snapshot time point corresponding to the second timestamp snapshot data and the jump time point.
[0153] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the recorded data includes third recorded sub-data and fourth recorded sub-data, the third recorded sub-data corresponds to the third game sub-process, and the fourth recorded sub-data corresponds to the fourth game sub-process, the recorded data returned by the video recording server is obtained, and the game process is replayed according to the recorded data, including: obtaining the third recorded sub-data returned by the video recording server, and replaying the third game sub-process according to the third recorded sub-data; in response to the video jump task creation operation, obtaining the first time of creating the video jump task; wherein the video jump task is used to replay the fourth game sub-process; sending a recording data request for the fourth recorded sub-data to the video recording server, and monitoring the time difference between the current time and the first time; when the time difference is less than the third preset time interval, replaying the fourth game sub-process according to the fourth recorded sub-data; when the time difference is greater than the third preset time interval, resetting the playback state before responding to the video jump task creation operation.
[0154] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, a video playback instruction corresponds to a playback time point, and a recording data request is sent to the video server according to the fault handling logic, including: when there is timestamp snapshot data at the playback time point, obtaining the timestamp snapshot data, and obtaining the recorded game data corresponding to the timestamp snapshot data.
[0155] An electronic device provided by one embodiment of the present disclosure can record the game process during gameplay to obtain recorded data, store the recorded data on a recording server, and, in response to a video playback instruction, send a recorded data request to the recording server based on fault handling logic, so that the recording server returns the recorded data. The electronic device then retrieves the recorded data returned by the recording server and replays the game process based on the recorded data. The disclosed solution can resolve issues encountered by the playback system, preventing the playback system from terminating or crashing after encountering problems, thereby accurately recording and playing the game process, thereby ensuring the playback of the game process and improving the player's gaming skills.
[0156] The storage unit 1120 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 1121 and / or a cache memory unit 1122 , and may further include a read-only memory unit (ROM) 1123 .
[0157] The storage unit 1120 may also include a program / utility 1124 having a set (at least one) of program modules 1125, such program modules 1125 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0158] The bus 1130 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0159] Electronic device 1100 can also communicate with one or more external devices 1170 (e.g., a keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with electronic device 1100, and / or any device that enables electronic device 1100 to communicate with one or more other computing devices (e.g., a router, modem, etc.). Such communication can occur via input / output (I / O) interface 1150. Furthermore, electronic device 1100 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via network adapter 1160. As shown, network adapter 1160 communicates with other modules of electronic device 1100 via bus 1130. It should be understood that, although not shown, other hardware and / or software modules can be used in conjunction with electronic device 1100, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0160] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
[0161] In exemplary embodiments of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above-described methods of this specification is stored. In some possible embodiments, various aspects of the present disclosure may also be implemented in the form of a program product, which includes program code. When the program product is executed on a terminal device, the program code is used to cause the terminal device to execute the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present disclosure. For example, the following solutions may be implemented:
[0162] In an exemplary embodiment of the present disclosure, the game process is recorded during the game to obtain recorded data, and the recorded data is stored in a video recording server; in response to a video playback instruction, a recorded data request is sent to the video recording server according to the fault handling logic, so that the video recording server returns the recorded data; the recorded data returned by the video recording server is obtained, and the game process is replayed according to the recorded data.
[0163] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, in response to a video playback instruction, a recording data request is sent to the video server according to the fault handling logic so that the video server returns the recording data, including: obtaining the request waiting time of the recording data request; when the request waiting time is greater than a first preset time interval, canceling the recording data request.
[0164] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, when the request waiting time is greater than the preset time interval, after canceling the recording data request, the method further includes: sending a recording data request to the recording server after waiting for a second preset time interval; wherein the value of the second preset time interval is the first time interval; when the request waiting time of the recording data request is greater than the first preset time interval, sending the recording data request to the recording server after waiting for the second preset interval time; counting the number of times the recording data request is sent; when the number of times the recording data request is sent is greater than a preset threshold, updating the value of the second preset time interval to the second time interval; wherein the second time interval is greater than the first time interval.
[0165] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, when the request waiting time is greater than the first preset time interval, after canceling the recording data request, the method also includes: sending a recording data request to the recording server after waiting for a second preset time interval; when the request waiting time of the recording data request is greater than the first preset time interval, sending a recording data request to the recording server after waiting for the second preset interval time until an error response information corresponding to the recording data is received; and stopping sending the recording data request to the recording server.
[0166] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the recorded data returned by the video recording server is obtained, and the game process is replayed according to the recorded data, including: monitoring the storage status of the recorded data in the cache corresponding to the terminal device; when the recorded data is stored in the cache corresponding to the terminal device, the game process is replayed according to the recorded data.
[0167] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, in response to a video jump task creation operation, a jump time point corresponding to the video jump task is obtained; the first recording sub-data returned by the video server is obtained, and the first game sub-process is replayed according to the first recording sub-data; wherein the first recording sub-data includes first timestamp snapshot data and first recorded game data corresponding to the first timestamp snapshot data, the first recording sub-data is the recording sub-data closest to the jump time point before the jump time point, and the first recording sub-data is determined according to the first snapshot time point corresponding to the first timestamp snapshot data and the jump time point; the second recording sub-data returned by the video server is obtained, and the second game sub-process is replayed according to the second recording sub-data; wherein the second recording sub-data includes second timestamp snapshot data and second recorded game data corresponding to the second timestamp snapshot data, the second recording sub-data is the recording sub-data closest to the jump time point after the jump time point, and the second recording sub-data is determined according to the second snapshot time point corresponding to the second timestamp snapshot data and the jump time point.
[0168] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the recorded data includes third recorded sub-data and fourth recorded sub-data, the third recorded sub-data corresponds to the third game sub-process, and the fourth recorded sub-data corresponds to the fourth game sub-process, and the obtaining of the recorded data returned by the video recording server and replaying the game process according to the recorded data includes: obtaining the third recorded sub-data returned by the video recording server and replaying the third game sub-process according to the third recorded sub-data; in response to a video jump task creation operation, obtaining a first time for creating a video jump task; wherein the video jump task is used to replay the fourth game sub-process; sending a recorded data request for the fourth recorded sub-data to the video recording server, and monitoring the time difference between the current time and the first time; when the time difference is less than a third preset time interval, replaying the fourth game sub-process according to the fourth recorded sub-data; and when the time difference is greater than the third preset time interval, resetting the playback state before responding to the video jump task creation operation.
[0169] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the video playback instruction corresponds to a playback time point, and the recording data request is sent to the video server according to the fault handling logic, including: when there is timestamp snapshot data at the playback time point, obtaining the timestamp snapshot data, and obtaining the recorded game data corresponding to the timestamp snapshot data.
[0170] One embodiment of the present disclosure provides a medium that can record the game process during gameplay to obtain recorded data, store the recorded data on a video server, and, in response to a video playback instruction, send a recorded data request to the video server based on fault handling logic, so that the video server returns the recorded data. The recorded data returned by the video server is obtained, and the game process is replayed based on the recorded data. The solution of the present disclosure can solve problems encountered by the playback system, preventing the playback system from terminating or crashing after encountering problems, thereby correctly recording and playing the game process, thereby ensuring the playback of the game process and improving the player's gaming level.
[0171] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0172] The program code embodied on the computer readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0173] Program code implementing the operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, and the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider.
[0174] In addition, the above-described flowcharts are merely illustrative of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to limit the present disclosure. It is readily understood that the processes shown in the above-described flowcharts do not indicate or limit the time sequence of the processes. In addition, it is readily understood that the processes can be executed synchronously or asynchronously, for example, in a plurality of modules.
[0175] Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon considering the specification and practice of the disclosed application. The present application is intended to cover any variations, uses or adaptive changes of the present disclosure along with their equivalents, which follow the general principles of the present disclosure and include known or customary practices of the art to which the present disclosure pertains. The specification and examples are to be regarded as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
Claims
1. A game replay method, characterized in that: The method comprises: During the game, the game process is recorded to obtain recording data, and the recording data is stored in a video recording server; In response to the video playback instruction, sending a recording data request to the video server according to the fault processing logic, so that the video server returns the recording data; Obtaining the recorded data returned by the video recording server, and replaying the game process according to the recorded data; The recorded data includes third recorded sub-data and fourth recorded sub-data, the third recorded sub-data corresponds to a third game sub-process, and the fourth recorded sub-data corresponds to a fourth game sub-process. Obtaining the recorded data returned by the video recording server and replaying the game process according to the recorded data includes: Obtaining the third recorded sub-data returned by the video recording server, and replaying the third game sub-process according to the third recorded sub-data; In response to a video jump task creation operation, obtaining a first time of creating the video jump task; wherein the video jump task is used to replay the fourth game sub-process; sending a recording data request for the fourth recording sub-data to the video recording server, and monitoring a time difference between a current time and a first time; When the time difference is less than a third preset time interval, replaying the fourth game sub-process according to the fourth recorded sub-data; When the time difference is greater than a third preset time interval, the playback state before the video jump task creation operation is reset.
2. The method according to claim 1, characterized in that The step of sending a recording data request to the recording server according to the fault handling logic in response to the video playback instruction, so that the recording server returns the recording data, includes: Obtaining a request waiting time for the recording data request; When the request waiting time is greater than a first preset time interval, the recording data request is canceled.
3. The method according to claim 2, characterized in that When the request waiting time is greater than a preset time interval, after canceling the recording data request, the method further includes: After waiting for a second preset time interval, the recording data request is sent to the video recording server; wherein the value of the second preset time interval is the first time interval; When the request waiting time of the recording data request is greater than the first preset time interval, sending the recording data request to the video recording server after waiting for a second preset time interval; Counting the number of times the recording data request is sent; When the number of times the recording data request is sent is greater than a preset threshold, the value of the second preset time interval is updated to a second time interval; wherein the second time interval is greater than the first time interval.
4. The method according to claim 2, characterized in that When the request waiting time is greater than a first preset time interval, after canceling the recording data request, the method further includes: sending the recording data request to the video server after waiting for a second preset time interval; When the request waiting time of the recording data request is greater than the first preset time interval, sending the recording data request to the video server after waiting for a second preset time interval until receiving error response information corresponding to the recording data; Stop sending the recording data request to the video recording server.
5. The method according to claim 1, wherein The step of obtaining the recorded data returned by the video recording server and replaying the game process according to the recorded data includes: Monitoring the storage status of the recorded data in the cache corresponding to the terminal device; When the recorded data is stored in the buffer corresponding to the terminal device, the game process is replayed according to the recorded data.
6. The method according to claim 1, characterized in that The step of obtaining the recorded data returned by the video recording server and replaying the game process according to the recorded data includes: In response to the video jump task creation operation, obtaining a jump time point corresponding to the video jump task; Obtaining first recorded sub-data returned by the video recording server, and replaying the first game sub-process based on the first recorded sub-data; wherein the first recorded sub-data includes first timestamp snapshot data and first recorded game data corresponding to the first timestamp snapshot data, the first recorded sub-data being the recorded sub-data closest to the jump time point before the jump time point, and the first recorded sub-data being determined based on the first snapshot time point corresponding to the first timestamp snapshot data and the jump time point; Obtain the second recorded sub-data returned by the video recording server, and replay the second game sub-process according to the second recorded sub-data; wherein, the second recorded sub-data includes second timestamp snapshot data and second recorded game data corresponding to the second timestamp snapshot data, and the second recorded sub-data is the recorded sub-data closest to the jump time point after the jump time point, and the second recorded sub-data is determined according to the second snapshot time point corresponding to the second timestamp snapshot data and the jump time point.
7. The method according to claim 1, characterized in that The video playback instruction corresponds to a playback time point, and the sending of a recording data request to the video server according to the fault processing logic includes: When there is timestamp snapshot data at the playback time point, the timestamp snapshot data is acquired, and recorded game data corresponding to the timestamp snapshot data is acquired.
8. A game replay device, characterized in that: The device comprises: A recording data acquisition module is used to record the game process during the game to obtain recording data, and store the recording data in the video server; a playback instruction response module, configured to respond to a video playback instruction and send a recording data request to the video server according to a fault processing logic, so that the video server returns the recording data; A game process playback module is used to obtain the recording data returned by the video recording server and play back the game process according to the recording data; The recorded data includes third recorded sub-data and fourth recorded sub-data, the third recorded sub-data corresponds to a third game sub-process, and the fourth recorded sub-data corresponds to a fourth game sub-process. Obtaining the recorded data returned by the video recording server and replaying the game process according to the recorded data includes: Obtaining the third recorded sub-data returned by the video recording server, and replaying the third game sub-process according to the third recorded sub-data; In response to a video jump task creation operation, obtaining a first time of creating the video jump task; wherein the video jump task is used to replay the fourth game sub-process; sending a recording data request for the fourth recording sub-data to the video recording server, and monitoring a time difference between a current time and a first time; When the time difference is less than a third preset time interval, replaying the fourth game sub-process according to the fourth recorded sub-data; When the time difference is greater than a third preset time interval, the playback state before the video jump task creation operation is reset.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device, characterized in that: include: one or more processors; as well as The memory is configured to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Cache replenishment method and device
CN105187754A
Multi-scene playback method and device for game
CN112619130A