A method and device for determining a virtual object static state, a computer device, a medium and a program product
By acquiring the pose data of virtual objects based on the game engine's time during online game replay, the accuracy problem caused by frame time increments is solved, enabling more accurate judgment of static states and calibration timing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2026-02-14
- Publication Date
- 2026-05-19
AI Technical Summary
During online game replay, the accuracy of judging the static state of virtual objects based on frame time increments in existing technologies is low, and it is greatly affected by performance fluctuations, resulting in inaccurate calibration timing.
Using the game engine's time as a benchmark, the pose data of virtual objects at different times is obtained. The difference in pose data is used to determine whether the virtual object is in a stationary state, thus avoiding the errors caused by multiple rounds of processing of frame time increments.
It improves the accuracy and stability of judging the static state of virtual objects, provides more reliable calibration opportunities, and reduces errors caused by performance fluctuations.
Smart Images

Figure CN121695488B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, computer device, medium, and program product for determining the static state of a virtual object. Background Technology
[0002] Online games are games in which multiple players control multiple terminal devices. The gameplay of an online game can be reproduced through recording and playback. The recording and playback method includes a recording process and a playback process. The recording process is used to record the input operations on virtual objects during the game, and the playback process is used to reproduce the corresponding game screen based on the input operations recorded in the recording process.
[0003] Because the control of online games rests on the server side, during online game replays, the position and posture of virtual objects cannot be calibrated when they are moving. Calibration is generally only performed when the virtual objects are stationary. Related technologies typically use the Delta Time increment as a time base to determine whether a virtual object is stationary.
[0004] However, the frame time increment is affected by performance fluctuations, which causes the cumulative value of the frame time increment to have a large error within the same recording process time period, resulting in low accuracy in judging the static state. Summary of the Invention
[0005] To address the aforementioned technical problems, this application provides a method, apparatus, computer device, medium, and program product for determining the static state of a virtual object, thereby improving the accuracy of determining the static state.
[0006] The embodiments of this application disclose the following technical solutions:
[0007] On one hand, embodiments of this application provide a method for determining the static state of a virtual object, the method comprising:
[0008] During the online game replay, the first pose data of the virtual object at the first moment is obtained. The first moment is determined based on the time of the game engine and is the j-th moment used to determine whether the virtual object is in the static instantaneous state after the virtual object is in the static continuous state for the i-th time. The virtual object is in the static continuous state between the start time of the i-th time in the static continuous state and the j-th moment used to determine whether the virtual object is in the static instantaneous state. i is a positive integer and j is a positive integer.
[0009] The second pose data of the virtual object at the second moment is obtained. The second moment is determined based on the time of the game engine and is the (j+1)th moment after the virtual object is in the static continuous state for the i-th time. This moment is used to determine whether the virtual object is in the static instantaneous state.
[0010] If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, then the virtual object is determined to be in the static instantaneous state at the second moment, and the duration of the i-th time in the static continuous state is determined to be the difference between the second moment and the start time of the i-th time in the static continuous state.
[0011] On the other hand, embodiments of this application provide a device for determining the static state of a virtual object, the device comprising: an acquisition unit and a determination unit;
[0012] The acquisition unit is used to acquire the first pose data of a virtual object at a first moment during the online game replay process. The first moment is determined based on the time of the game engine and is the j-th moment used to determine whether the virtual object is in a static instantaneous state after the virtual object is in the i-th static continuous state. The virtual object is in the static continuous state between the start time of the i-th static continuous state and the j-th moment used to determine whether the virtual object is in the static instantaneous state, where i is a positive integer and j is a positive integer.
[0013] The acquisition unit is further configured to acquire the second pose data of the virtual object at a second moment, wherein the second moment is determined based on the time of the game engine and is the (j+1)th moment after the virtual object is in the static continuous state for determining whether the virtual object is in the static instantaneous state;
[0014] The determining unit is configured to determine that the virtual object is in the static instantaneous state at the second moment if the difference between the first pose data and the second pose data is less than or equal to the pose threshold, and to determine the duration of the i-th time in the static continuous state as the difference between the second moment and the start moment of the i-th time in the static continuous state.
[0015] On the other hand, embodiments of this application provide a computer device, the computer device including a processor and a memory:
[0016] The memory is used to store computer programs and to transfer the computer programs to the processor;
[0017] The processor is configured to execute the methods described above according to instructions in the computer program.
[0018] On the other hand, embodiments of this application provide a computer-readable storage medium for storing a computer program for performing the methods described above.
[0019] On the other hand, embodiments of this application provide a computer program product including a computer program, which, when run on a computer device, causes the computer device to perform the methods described above.
[0020] As can be seen from the above technical solution, during the recording and playback of online games, the frame time increment is no longer used as the time reference. Instead, the game engine's time is used as the time reference to obtain the pose data of the virtual object at different moments. This allows for the determination of whether the virtual object is in a static, continuous state based on multiple pose data points. Taking the acquisition of the first pose data of the virtual object at the first moment and the second pose data at the second moment as an example, firstly, the first and second moments are determined based on the game engine's time. Compared to the frame time increment, the game engine's time does not change with performance fluctuations during either the recording or playback process. The error generated during the continuous accumulation of time is also smaller, making the time reference used more stable and accurate.
[0021] Secondly, the first and second moments are two adjacent judgment moments used to determine whether the virtual object is in a static instantaneous state. With a more accurate time reference, the first pose data and second pose data acquired at the first and second moments respectively are also more accurate, improving the accuracy of the judgment. If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, it means that the position and orientation of the virtual object have not changed significantly between the first and second moments. Therefore, it can be determined that the virtual object is in a static instantaneous state at the second moment, and the duration of the virtual object being in a static continuous state is updated to make the static continuous state more accurate.
[0022] Therefore, by using the game engine's time as the time reference and obtaining the pose data of adjacent moments for judging the static instantaneous state, it is possible to more stably and accurately identify whether a virtual object is in a static instantaneous state during online game replay. This reduces the error caused by inconsistent time references due to performance fluctuations, and thus more accurately determines the static duration of the virtual object and its corresponding duration, providing a more reliable basis for the calibration timing during the replay process.
[0023] In addition, the frame time increment usually needs to be processed by a multi-input processor before calibration, so that the frame time increment obtained during calibration is data that has undergone multiple rounds of processing. This further amplifies the error in the time reference caused by the frame time increment. The game engine's time does not need to be processed by the multi-input processor. Using this as a reference can avoid the error caused by multiple rounds of processing, making the judgment of static and continuous states more accurate. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 A schematic diagram of a computer system for a method of determining the static state of a virtual object provided in an embodiment of this application;
[0026] Figure 2 A schematic diagram illustrating an application scenario of a method for determining the static state of a virtual object provided in an embodiment of this application;
[0027] Figure 3 This application provides a timeline diagram illustrating the process before and after a judgment.
[0028] Figure 4 A flowchart illustrating a method for determining the static state of a virtual object, provided in an embodiment of this application;
[0029] Figure 5 A schematic diagram of a test interface provided in an embodiment of this application;
[0030] Figure 6 This application provides a schematic diagram of determining the position of a moment on a time axis.
[0031] Figure 7 A schematic diagram of a core engine file provided in an embodiment of this application;
[0032] Figure 8 A flowchart illustrating a process for handling repeated input operations, provided as an embodiment of this application;
[0033] Figure 9 This is a schematic diagram illustrating an application scenario of a method for determining the static state of a virtual object in a non-paused environment, as provided in an embodiment of this application.
[0034] Figure 10 This is a schematic diagram illustrating an application scenario of a method for determining the static state of a virtual object provided in this application, specifically in a paused situation.
[0035] Figure 11 This is one of the schematic diagrams for displaying playback data provided in the embodiments of this application;
[0036] Figure 12 This is a second schematic diagram illustrating a playback data display provided in an embodiment of this application;
[0037] Figure 13 This is the third schematic diagram of a playback data display provided in an embodiment of this application;
[0038] Figure 14 This is the fourth schematic diagram of a playback data display provided in an embodiment of this application;
[0039] Figure 15 This is the fifth schematic diagram of a playback data display provided in an embodiment of this application;
[0040] Figure 16 This is the sixth schematic diagram of a playback data display provided in an embodiment of this application;
[0041] Figure 17 This is the seventh schematic diagram of a playback data display provided in an embodiment of this application;
[0042] Figure 18 This is the eighth schematic diagram of a playback data display provided in the embodiments of this application;
[0043] Figure 19 A schematic diagram of the structure of a device for determining the static state of a virtual object provided in an embodiment of this application;
[0044] Figure 20 This application provides a schematic diagram of the structure of a server according to an embodiment of the present application.
[0045] Figure 21 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0047] It should be noted that this application may display a prompt interface, pop-up window, or output voice prompts before and during the collection of user data (e.g., first pose data, second pose data, etc.). These prompt interfaces, pop-ups, or voice prompts are used to inform the user that their data is being collected. This ensures that the application only begins the steps for acquiring user data after receiving confirmation from the user regarding the prompt interface or pop-up window; otherwise (i.e., without receiving confirmation from the user), the steps for acquiring user data end, meaning no user data is acquired. In other words, all user data collected in this application is collected with the user's consent and authorization, and the collection, use, and processing of this user data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.
[0048] Because the control of online games resides on the server side, during playback, the terminal device cannot autonomously drive the continuous movement and state updates of virtual objects as it does in single-player games. Instead, it needs to display the movement state of the virtual objects based on the state synchronization results from the server side. Therefore, when calibrating the position and posture of virtual objects during playback, calibration operations cannot usually be performed directly while the virtual objects are in continuous motion. Instead, calibration can only be performed when the virtual objects are stationary to avoid introducing new position offsets or posture errors during the calibration process.
[0049] In related technologies, frame time increments are typically used as a time reference to determine whether a virtual object has reached a static state. However, frame time increments inherently depend on the rendering rhythm of the terminal device's frames and are easily affected by factors such as fluctuations in terminal performance and changes in system load. For example, during the same recording period, when the terminal device is under high load, the frame rate may decrease, and the frame time increment between adjacent frames may increase; conversely, when the load is low, the frame rate may increase, and the frame time increment may decrease accordingly. In these cases, even if the virtual object has remained static for the same duration during the recording process, the accumulated frame time increments under different playback environments may still differ significantly. Consequently, the accuracy of the time reference determined based on the frame time increment is low during playback, leading to inaccurate data on the virtual object at different moments during playback.
[0050] Furthermore, during playback, it is typically necessary to additionally register multiple input processors for the input system to intercept and process player input. The frame time increment used by the input processor during the update process is affected by the input processors already registered during the game startup phase. That is, the frame time increment obtained by a later-registered input processor is often time data that has already been processed once by the previous input processor. In this case, the frame time increment is repeatedly processed and passed through multiple levels of input processing, which further amplifies the error in the time reference. As a result, time judgment based on the frame time increment cannot accurately reflect the actual time progress of the recording process, affecting the accuracy of static state judgment.
[0051] Because multi-input processors typically involve multiple rounds of computation and intermediate state caching, the frame time increment can easily introduce additional latency and numerical bias during processing. This means the frame time increment can no longer accurately reflect the actual time of the virtual object in the game, leading to inaccurate acquisition of pose data at corresponding moments, and consequently, inaccurate determination of stationary states. This, in turn, causes deviations in the timing of calibration decisions. Especially under conditions of frequent inputs, long processing chains, or large fluctuations in system load, the frame time increment after multiple rounds of processing may be numerically amplified or weakened, further exacerbating errors in the time reference.
[0052] Based on this, embodiments of this application propose a method, apparatus, computer device, medium, and program product for determining the static state of a virtual object. By using the game engine's time as a time reference, it obtains pose data from adjacent moments for determining the static instantaneous state, enabling more stable and accurate identification of the static state during online game replay, thus making calibration timing more accurate. Furthermore, the game engine's processing order is after the multi-input processor, eliminating the need for multiple rounds of processing by the game engine and avoiding errors caused by multiple rounds of processing, resulting in more accurate determination of the static state.
[0053] To facilitate understanding of the method for determining the static state of a virtual object provided in the embodiments of this application, the computer system for this method will be described below.
[0054] See Figure 1 This figure is a schematic diagram of a computer system for a method of determining the static state of a virtual object according to an embodiment of this application. The computer system 100 includes multiple devices, such as multiple terminal devices 110 and multiple servers 120, etc. The terminal devices 110 and the servers 120 can communicate with each other through a communication network or other means.
[0055] The communication network uses standard communication technologies and / or protocols, typically the Internet, but can also be any network, including but not limited to Bluetooth, local area network (LAN), metropolitan area network (MAN), wide area network (WAN), mobile, private network, or any combination of virtual private network. In some embodiments, custom or dedicated data communication technologies may be used to replace or supplement the aforementioned data communication technologies.
[0056] The terminal device can be an electronic device such as a smartphone, wearable device, personal computer (PC), intelligent voice interaction device, smart home appliance, vehicle terminal, aircraft, unmanned vending terminal, extended reality (XR) device, etc. XR devices can include virtual reality (VR) devices, augmented reality (AR) devices, and mixed reality (MR) devices. A client application for the target application can be installed and run on the terminal device. This target application can be an application that supports replaying game processes, and can determine whether virtual objects are in a static state based on the game engine's time. Furthermore, this application does not limit the form of the target application, including but not limited to applications (Apps), mini-programs, etc., installed on the terminal device, and can also be in the form of a webpage.
[0057] A server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services such as cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and basic cloud computing services such as big data. The server can be a backend server for the aforementioned target application, providing backend services to the target application's clients, such as acquiring input operations on virtual objects recorded by the terminal device at various times, and sending pose data at specified times to the terminal device used for playback.
[0058] Databases can be integrated onto servers, or hosted in the cloud or on other servers. Simply put, a database can be viewed as an electronic filing cabinet—a place to store electronic files, where users can perform operations such as adding, querying, updating, and deleting data. A "database" is a collection of data stored together in a certain way, shared by multiple users, with minimal redundancy, and independent of application programs. A Database Management System (DBMS) is a computer software system designed to manage databases, generally possessing basic functions such as storage, retrieval, security, and backup. DBMSs can be classified according to the database model they support, such as relational or Extensible Markup Language (XML); or according to the type of computer they support, such as server clusters or mobile phones; or according to the query language used, such as Structured Query Language (SQL) or XML Query Language (XQuery); or according to performance priorities, such as maximum scale or highest operating speed; or other classification methods. Regardless of the classification method used, some DBMSs can cross categories; for example, they can simultaneously support multiple query languages. Databases can be used to store data from the aforementioned servers or terminal devices, such as the pose data of virtual objects at various moments during online game recording.
[0059] To facilitate understanding of the method for determining the static state of a virtual object provided in this application embodiment, the following example uses a second terminal device as the execution subject of the method for determining the static state of a virtual object to illustrate the application scenario of the method for determining the static state of a virtual object.
[0060] See Figure 2 This figure is a schematic diagram illustrating an application scenario of a method for determining the static state of a virtual object according to an embodiment of this application. Figure 2 In this application scenario, a first terminal device 210, a second terminal device 220, a server 230, and a database 240 are included. The first terminal device 210 is used for recording and can be... Figure 1 One of multiple terminal devices, the second terminal device 220 is used for playback, and can be... Figure 1 One of multiple terminal devices, server 230 is used to store and forward recorded data, and can be... Figure 1 One of multiple servers, database 240 is used to store the recorded data. Alternatively, in other embodiments, the recording and playback terminal device may be a single terminal device, etc.
[0061] To facilitate understanding the meaning of each moment, combined with Figure 3 An example is provided. Figure 3 Including judging the timeline before and after, in Figure 3 In this system, the time indicated by the color block is used to identify whether the virtual object is in a static continuous state, and the length of the color block indicates the duration of the static continuous state. The following example illustrates obtaining the first pose data at the first moment and the second pose data at the second moment. The first moment is the fifth moment after the virtual object is in a static continuous state for the second time, used to determine whether the virtual object is in a static instantaneous state. The second moment is the sixth moment after the virtual object is in a static continuous state for the second time, used to determine whether the virtual object is in a static instantaneous state. Both the first and second moments are determined based on the game engine's timing.
[0062] Based on the above scenario, the method for determining the static state of a virtual object provided in this application embodiment will be explained through steps A1-A3.
[0063] In A1, the first terminal device 210 records the online game process and uploads the pose data of the virtual object at various times to the server 230. The server 230 can store the acquired pose data in the database 240.
[0064] In A2, during the online game replay, the second terminal device 220 acquires the first pose data at a first moment and the second pose data at a second moment. The server 230 can retrieve the first pose data and the second pose data from the database 240 and send them to the second terminal device 220.
[0065] In A3, after acquiring the first pose data and the second pose data, the second terminal device 220 performs a judgment. If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, it is determined that the virtual object is in a static instantaneous state at the second moment, and the duration of the second static continuous state is updated, that is, the duration of the second static continuous state is the difference between the second moment and the start time of the second static continuous state. Figure 3 As shown, after determining that the difference between the first pose data and the second pose data satisfies the condition of being in a static instantaneous state, it can be determined that the virtual object is in a static instantaneous state at the second moment, and the second moment is determined as a moment in the second static continuous state, so as to realize the update of the duration of the second static continuous state.
[0066] Therefore, by using the game engine's time as the time reference and obtaining the pose data of adjacent moments for judging the static instantaneous state, it is possible to more stably and accurately identify whether a virtual object is in a static instantaneous state during online game replay. This reduces the error caused by inconsistent time references due to performance fluctuations, and thus more accurately determines the static duration of the virtual object and its corresponding duration, providing a more reliable basis for the calibration timing during the replay process.
[0067] The method for determining the static state of a virtual object provided in this application embodiment can be executed by a terminal device. However, in other embodiments of this application, the server may also have similar functions to the terminal device to execute the method for determining the static state of a virtual object provided in this application embodiment, or the terminal device and the server may jointly execute the method for determining the static state of a virtual object provided in this application embodiment. This embodiment does not limit this to any particular method.
[0068] The following describes in detail a method for determining the static state of a virtual object provided in this application through method embodiments.
[0069] See Figure 4 This figure is a flowchart illustrating a method for determining the static state of a virtual object according to an embodiment of this application. For ease of description, the following embodiment uses a computer device as the execution subject of this method for determining the static state of a virtual object, such as the aforementioned terminal device or server. Figure 4 As shown, the method for determining the static state of the virtual object includes S401-S403:
[0070] S401: During online game replay, acquire the first pose data of the virtual object at the first moment.
[0071] Online games are games in which multiple users control multiple terminal devices. Different users can control different objects through different terminal devices. A virtual object is an object controlled by a user's account on a terminal device. Virtual objects can move, interact, or complete specific tasks in a virtual environment, and their activities and displays all rely on the virtual environment. Taking a game application as an example, a virtual object refers to a game character controlled by a user's account in the game application. Virtual objects can be in the form of a human character, an animal, a cartoon character, or other forms; this application embodiment does not limit this. Virtual objects can be displayed in 3D or 2D form; this application embodiment does not limit this either.
[0072] The recording and playback processes are explained below.
[0073] The recording process is used to capture and save player input operations and state data during game runtime. This typically involves receiving various user input events (such as keyboard, mouse, and touchscreen operations) and storing these events in chronological order in a file or data structure. In this embodiment, the recording process can be used to acquire the input operations and pose data of virtual objects at various moments, where each moment is determined based on the game engine's timing.
[0074] The playback process is used to reproduce previously recorded input operation state data at a certain point after the recording process. It involves reading saved files or data structures and triggering input operations sequentially according to the recording time to simulate the game process. In this embodiment, the playback process can be used to reproduce input operations at various points in time and to determine the static state based on pose data.
[0075] Online game replay is a process of reproducing the game based on recorded data.
[0076] Plugins are optional, modular software packages that extend the core functionality of a game engine. Plugins can contain code (such as C++ code, Blueprints), resources (models, textures, sound effects), tools (editor extensions, custom panels), and combinations thereof. For example, the Unreal Engine Input Replay plugin can record player input (such as input from keyboard, mouse, touch, analog input, gyroscope, etc.) and replay it over time.
[0077] The first moment will be introduced below.
[0078] First, the first moment is determined based on the game engine's time.
[0079] A game engine is a software system used to build and run games. The game engine's time is a unified time base maintained by the game engine, used to represent the progression of time within the game world. As one possible implementation, the game engine's time can be the game time recorded by the game engine; for example, it can be initialized when the game engine starts and continuously incremented according to predetermined time rules during game execution, recording, or playback. As yet another possible implementation, the game engine's time can also be the real time recorded by the game engine, etc., but this application does not specifically limit this.
[0080] It's important to note that the game engine's time is not affected by specific device performance; that is, the game engine's time is independent of the device configuration used for recording or playback. Regardless of which device performs the recording or playback of an online game, the game engine's time exists as an independent standard time, and its value does not change due to differences in device performance, frame rate variations, or system load fluctuations. In other words, the game engine's time is decoupled from the recording and playback devices, providing a consistent and stable time reference for online game playback. Furthermore, the game engine's time is consistent across multiple devices used for online play (such as multiple terminal devices), ensuring a unified time base for recording gameplay on any device.
[0081] In related technologies, frame time increment is used as the time base. The frame time increment represents the time elapsed between two adjacent frames, and its value is affected by the frame rendering rhythm of the terminal device. Because the frame rendering process is easily affected by factors such as processor performance, graphics rendering load, and system scheduling, the frame time increment often varies significantly between different devices or under different operating conditions within the same recording period. Especially in scenarios with large frame rate fluctuations, the frame time increment is prone to deviation during accumulation, making it difficult to accurately reflect the passage of time during recording.
[0082] Furthermore, the multi-input processor (MIP) is the underlying user interface framework in the game engine, responsible for managing the preprocessing and forwarding of input operations. It can intercept and process various input operations, including keyboard, mouse, touch, and gamepad inputs, through a chain of input preprocessors. In online game replay scenarios, frame time increments often need to be processed by the MIP before they can be used for calibration, resulting in the final frame time increment being time data that has undergone multiple rounds of processing, further amplifying errors in the time reference. In contrast, the game engine's time, directly maintained by the game engine and located behind the MIP, is unaffected by the multiple rounds of processing by the MIP, thus avoiding errors introduced by the MIP's internal processing.
[0083] See Figure 5 The figure is a schematic diagram of a test interface provided in an embodiment of this application. The dynamic frame time is used to indicate the cumulative value of the frame time increment, and the dynamic second time is used to indicate the cumulative value of the virtual engine time. It can be found that at the same time, the deviation between the two time bases is large.
[0084] This demonstrates that, compared to frame time increments, game engine timing exhibits greater stability, consistency, and independence.
[0085] The first moment is the j-th moment used to determine whether the virtual object is in a static instantaneous state after the i-th time it is in a static continuous state. The virtual object is in a static continuous state from the start of the i-th time it is in a static continuous state to the j-th moment used to determine whether the virtual object is in a static instantaneous state. i and j are positive integers. It should be noted that although the first moment is described using the j-th moment used to determine whether the virtual object is in a static instantaneous state, after judgment, if it can be determined that the virtual object is in a static instantaneous state at the first moment, the duration of the i-th time the virtual object is in a static continuous state can be extended to the first moment.
[0086] In this embodiment, the motion state of the virtual object is divided into a static state and a non-static state. The static state characterizes a virtual object where its position and orientation have not changed significantly, while the non-static state characterizes a virtual object where its position and orientation have changed significantly.
[0087] Furthermore, the static state includes a static sustained state and a static instantaneous state. The static instantaneous state characterizes a virtual object whose position and posture have not changed significantly at a given judgment moment (i.e., the moment used to determine whether the virtual object is in the static instantaneous state). The static sustained state characterizes a virtual object whose position and posture have not changed significantly at at least two consecutive judgment moments. It should be noted that, for ease of explanation, the virtual object can be assumed to be in the static instantaneous state at the first judgment moment during online game replay. The Xth moment used to determine whether the virtual object is in the static instantaneous state is simply referred to as the Xth judgment moment, where X is a positive integer.
[0088] In this embodiment of the application, the 0th judgment time after the virtual object is in a static continuous state for the ith time can be defined as the start time of the ith time it is in a static continuous state.
[0089] See Figure 6 This figure is a schematic diagram of a judgment moment on a timeline provided by an embodiment of this application. Specifically, taking the first judgment moment of a virtual object during online game replay as an example, this judgment moment can be determined as the start moment of the first continuous static state, that is, the 0th judgment moment after the first continuous static state. Alternatively, taking the virtual object as being in a non-static state after being in a continuous static state for the i-th time as an example, the judgment moment when it is first determined to be in a static instantaneous state after being in a non-static state is determined as the start moment of the (i+1)-th continuous static state, that is, the 0th judgment moment after the (i+1)-th continuous static state.
[0090] Pose data is used to characterize the motion state of a virtual object in virtual space. Pose data can include position data and orientation data. Position data describes the spatial location of the virtual object in the game world coordinate system, such as the coordinate values of the virtual object in a two-dimensional or three-dimensional coordinate system. Orientation data describes the orientation of the virtual object at that spatial location, such as the orientation angle or rotation relationship of the virtual object relative to a coordinate axis. Through pose data, the motion state of a virtual object at a certain moment can be characterized, thereby enabling the determination of whether the virtual object has undergone displacement or orientation change between different judgment moments.
[0091] The first pose data is the pose data of the virtual object at the first moment.
[0092] S402: Obtain the second pose data of the virtual object at the second time step.
[0093] The second moment is determined based on the game engine's time, specifically the (j+1)th moment after the virtual object's i-th continuous static state, used to determine whether the virtual object is in a static instantaneous state. The second pose data is the pose data of the virtual object at the second moment.
[0094] The second moment is an adjacent judgment moment to the first moment. That is, the moment between the first moment and the second moment is not used to determine whether it is in a static instantaneous state. For example, the first moment and the second moment can be adjacent moments, or the moment between the first moment and the second moment can both be in a static instantaneous state.
[0095] S403: If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, then the virtual object is determined to be in a static instantaneous state at the second moment, and the duration of the i-th static continuous state is determined to be the difference between the second moment and the start moment of the i-th static continuous state.
[0096] The pose threshold is used to characterize the maximum allowable pose change in a static instantaneous state. By comparing the first pose data at the first moment and the second pose data at the second moment, it is determined whether the virtual object has undergone significant changes in position or orientation between adjacent judgment moments. If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, it indicates that the position and orientation of the virtual object have not changed significantly between the first moment and the second moment. In this case, it can be determined that the virtual object is in a static instantaneous state at the second moment. The duration of the i-th instance of being in a static continuous state is determined as the difference between the second moment and the start moment of the i-th instance of being in a static continuous state. The second moment is determined as one of at least one consecutive judgment moments in the static continuous state, thereby realizing the update of the static continuous state.
[0097] It should be noted that the embodiments of this application only illustrate the acquisition of the first pose data and the second pose data at the first moment. The first moment and the second moment are not limited to two specific adjacent judgment moments, but can be extended to any two consecutive adjacent judgment moments after the virtual object is in a static continuous state during online game replay. That is to say, during online game replay, multiple judgment moments after the virtual object is in a static continuous state can be determined sequentially based on the game engine's time, and any two adjacent judgment moments can be used as the first moment and the second moment, respectively, to determine whether the virtual object is in a static state.
[0098] In one possible implementation, the start time of the static continuous state can also be updated. In this regard, embodiments of this application also provide S404 (not shown in the figure).
[0099] S404: If the difference between the first pose data and the second pose data is greater than the pose threshold, then the virtual object is determined to be in a non-static state, and the second moment is updated to the start moment of the (i+1)th time in a static continuous state.
[0100] As mentioned above, during online game replay, the change in pose data between adjacent judgment moments is used as the basis for determining whether a virtual object is in a static state. If the difference in pose data between adjacent judgment moments is less than or equal to the pose threshold, it indicates that the virtual object is still in a static state, and thus the duration of the i-th static state can continue to accumulate.
[0101] Correspondingly, if the difference between the first pose data and the second pose data is greater than the pose threshold, it indicates that the virtual object has undergone a significant change in position or orientation at adjacent judgment times, and is no longer in a static instantaneous state at the second time. Therefore, it can be determined that the virtual object is in a non-static state at the second time. Furthermore, since the virtual object is in a non-static state at the second time, the virtual object has not failed to undergo significant changes in position and orientation at least two consecutive judgment times. The virtual object is no longer in a static continuous state, and the i-th instance of being in a static continuous state terminates at the first time. The second time can be updated to the start time of the (i+1)-th instance of being in a static continuous state.
[0102] It should be noted that although the second moment is updated to the start time of the (i+1)th static state, the (i+1)th static state can continue to be updated until the moment of the static instant is determined as the start time of the (i+1)th static state. For example, if it is determined that the virtual object is in a non-static state at the third moment after the second moment, the third moment can be updated to the start time of the (i+1)th static state to achieve continuous updating of the start time.
[0103] Therefore, by updating the start time of the static continuous state when the difference between the pose data of two consecutive judgment times exceeds the pose threshold, the division of the static continuous state is more accurate, thereby improving the accuracy of the static duration calculation. This makes the judgment of the static state more accurate during online game replay and provides a more reliable basis for the calibration timing of the replay process.
[0104] As can be seen from the above technical solution, during the recording and playback of online games, the frame time increment is no longer used as the time reference. Instead, the game engine's time is used as the time reference to obtain the pose data of the virtual object at different moments. This allows for the determination of whether the virtual object is in a static, continuous state based on multiple pose data points. Taking the acquisition of the first pose data of the virtual object at the first moment and the second pose data at the second moment as an example, firstly, the first and second moments are determined based on the game engine's time. Compared to the frame time increment, the game engine's time does not change with performance fluctuations during either the recording or playback process. The error generated during the continuous accumulation of time is also smaller, making the time reference used more stable and accurate.
[0105] Secondly, the first and second moments are two adjacent judgment moments used to determine whether the virtual object is in a static instantaneous state. With a more accurate time reference, the first pose data and second pose data acquired at the first and second moments respectively are also more accurate, improving the accuracy of the judgment. If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, it means that the position and orientation of the virtual object have not changed significantly between the first and second moments. Therefore, it can be determined that the virtual object is in a static instantaneous state at the second moment, and the duration of the virtual object being in a static continuous state is updated to make the static continuous state more accurate.
[0106] Therefore, by using the game engine's time as the time reference and obtaining the pose data of adjacent moments for judging the static instantaneous state, it is possible to more stably and accurately identify whether a virtual object is in a static instantaneous state during online game replay. This reduces the error caused by inconsistent time references due to performance fluctuations, and thus more accurately determines the static duration of the virtual object and its corresponding duration, providing a more reliable basis for the calibration timing during the replay process.
[0107] In addition, the frame time increment usually needs to be processed by a multi-input processor before calibration, so that the frame time increment obtained during calibration is data that has undergone multiple rounds of processing. This further amplifies the error in the time reference caused by the frame time increment. The game engine's time does not need to be processed by the multi-input processor. Using this as a reference can avoid the error caused by multiple rounds of processing, making the judgment of static and continuous states more accurate.
[0108] During online game replays, after a virtual object completes an action, it typically enters a recovery phase. This recovery phase refers to the time it takes for the virtual object to complete the remaining actions after a skill or action is activated. During this time, the virtual object may be in a recovery posture. This period usually doesn't affect the skill's effect, but it does affect the character's next action. Recovery phases can increase action fluidity, prevent certain skills or actions from being used continuously and without restriction, and provide opponents with counter-attack opportunities. During this recovery phase, the virtual object remains in a non-static state from the user's visual perception perspective; that is, the user doesn't subjectively perceive the virtual object as stationary. However, from the perspective of pose data changes, the amplitude of pose changes may have significantly decreased during this recovery phase, and the difference in pose data between adjacent judgment moments may even briefly meet the condition of being less than or equal to a pose threshold. If the judgment of a stationary state is based solely on the pose threshold, it's easy to prematurely misjudge a virtual object as stationary while it's still in the recovery animation phase and hasn't truly stopped, thus affecting the accuracy of stationary state recognition.
[0109] In addition, due to factors such as network synchronization jitter and differences in the accuracy of recorded data, the pose data obtained at certain judgment moments may contain abnormal values, which may lead to momentary misjudgments during the judgment process in a static state.
[0110] Based on this, this application proposes a specific implementation method for determining a static state by combining a duration threshold, as detailed in B1-B2:
[0111] B1: If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, and the difference between the start time of the i-th time in a static continuous state and the second time is greater than the duration threshold, then the virtual object is determined to be in a static instantaneous state at the second time, and the duration of the i-th time in a static continuous state is determined to be the difference between the second time and the start time of the i-th time in a static continuous state.
[0112] The duration threshold is used to characterize the minimum duration required for a state where the change in pose data is less than or equal to the pose threshold during the static state determination process. The duration threshold can be used to distinguish between situations where the pose threshold's corresponding judgment condition is occasionally met within a short period of time and situations where the virtual object truly enters a stable static state.
[0113] If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, it indicates that the change in the position and orientation of the virtual object between adjacent judgment moments is within the allowable range. Based on this, it is further determined whether the difference between the start time of the i-th static continuous state and the second moment is greater than the duration threshold. If this difference is greater than the duration threshold, it indicates that the virtual object has persisted for a certain period in a state with small pose changes, essentially eliminating the influence of the post-ankle phase or outliers. At this point, it is determined that the virtual object is in a static instantaneous state at the second moment, and the duration of the i-th static continuous state is updated to the difference between the second moment and the start time of the i-th static continuous state.
[0114] B2: If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, and the difference between the start time and the second time when the i-th time is in a static continuous state is less than or equal to the duration threshold, then the virtual object is determined to be in a non-static state at the second time, and the duration of the i-th time in a static continuous state is determined to be the difference between the second time and the start time of the i-th time in a static continuous state.
[0115] If the difference is greater than the duration threshold, it means that the virtual object has been in a state with small pose changes for a short time, which is prone to misjudgment. Therefore, it is determined that the object is in a non-static state at the second moment, and the duration is updated. The duration of the i-th static continuous state is the difference between the second moment and the start time of the i-th static continuous state.
[0116] It should be noted that, in the embodiments of this application, even if the virtual object is in a static continuous state, that is, the pose data has not changed significantly at at least two consecutive judgment times, the virtual object cannot be judged as a static instantaneous state at the second time time because the duration is less than or equal to the duration threshold. In order to reduce the probability of misjudgment, it needs to continue to accumulate until the duration is greater than the duration threshold before the virtual object judged at that time time can be judged as a static instantaneous state.
[0117] Furthermore, in this embodiment, determining the second moment as a non-static state is only used to indicate that calibration is not applicable at the second moment. During the time interval between the start of the i-th instance of being in a static continuous state and the second moment, since the time is less than the duration threshold, the static continuous state is not updated. That is, in this embodiment, even if it is determined that the virtual object is in a non-static state at the second moment, the second moment will not be determined as the start of the (i+1)-th instance of being in a static continuous state.
[0118] Therefore, by introducing a duration threshold on top of the pose threshold judgment, we can avoid the virtual object being prematurely judged to be in a static instantaneous state at the moment of the post-anomaly phase or in the case of short-term anomalies, simply because the difference in pose data between adjacent judgment moments is briefly less than or equal to the pose threshold. Only by maintaining stillness for a period of time can it be confirmed as a static instantaneous state, thereby reducing the probability of misjudgment, improving the accuracy of static instantaneous state recognition during online game replay, and providing a more reliable basis for subsequent calibration triggering timing.
[0119] The embodiments of this application do not specifically limit the size of the duration threshold. The duration threshold can be preset, for example, the duration threshold is 0.5 seconds. The duration threshold can also be dynamically determined. The following uses two dynamic determination methods as examples for illustration.
[0120] Method 1, which dynamically determines the duration threshold based on the game's dynamics, is as follows: See C1-C2 for details.
[0121] C1: Obtain the first mapping relationship between the game and the duration threshold.
[0122] The first mapping relationship describes the duration thresholds for different games. In the first mapping relationship, the faster the game pace, the smaller the duration threshold for the game.
[0123] Game rhythm is used to characterize the frequency of changes in the pose data of virtual objects in online games. A faster game rhythm usually means that virtual objects change their position or orientation more frequently.
[0124] In fast-paced online games, setting the duration threshold too high will require a longer wait time to confirm a static instantaneous state, easily causing a lag in static confirmation and affecting the timeliness of distinguishing static continuous states. Therefore, for online games with faster game pace, a smaller duration threshold is usually used to confirm whether a virtual object is in a static instantaneous state more quickly without increasing the probability of false positives.
[0125] In slow-paced online games, where pose data changes infrequently, a small duration threshold can lead to the identification of a static, momentary state within a short time, increasing the likelihood of misjudgment. Therefore, slower-paced online games typically use larger duration thresholds to enhance the filtering ability for short-term fluctuations and reduce the probability of misjudgment.
[0126] For example, the first mapping relationship is a preset correspondence relationship, and each record in the first mapping relationship may include at least an online game identifier and a corresponding duration threshold.
[0127] For example, based on the historical data of each online game, the frequency of pose data changes can be statistically analyzed for different online games, and the first mapping relationship can be generated or updated based on the statistical results.
[0128] C2: Determine the duration threshold based on the first mapping relationship and online games.
[0129] Based on the different rhythms of online games, the corresponding duration thresholds can be determined by mapping through the first mapping relationship.
[0130] Therefore, based on the first mapping relationship between games and duration thresholds, the duration thresholds corresponding to online games with different paces can be determined. For faster-paced games, a smaller duration threshold is used to avoid slow confirmation of static states, while for slower-paced games, a larger duration threshold is used to reduce the probability of misjudgment, thereby improving applicability to more types of online games.
[0131] Method 2, which dynamically determines the duration threshold based on the object, is as follows: See D1-D2 for details.
[0132] D1: Obtain the second mapping relationship between the object and the duration threshold.
[0133] In this embodiment, the object refers to an entity participating in the static state determination in an online game. A virtual object is one of these objects. The second mapping relationship describes the duration thresholds corresponding to different objects.
[0134] Different objects exhibit different characteristics in pose data variation. Specifically, different objects differ in model structure, skill mechanisms, and other aspects, resulting in different pose change characteristics (i.e., the characteristics of pose data variation) under the same judgment conditions.
[0135] For example, due to differences in their skill mechanisms, different objects exhibit varying patterns of pose data change after a skill is triggered. For some objects, pose data continues to undergo subtle changes for a short period after the skill is executed, while for others, pose data stabilizes relatively quickly after the skill ends. This results in differences in the duration of pose data changes at the end of the skill's duration for different objects.
[0136] For example, for objects with continuous skills, their pose data tends to show a gradual decrease in the magnitude of change but a longer duration after the skill ends. Conversely, for objects with more discrete skill performance, their pose data is more likely to converge to a stable state quickly after the skill ends.
[0137] Furthermore, different objects may have different model sizes, number of bone layers, and number of movable parts. Objects with more complex structures often require a longer convergence and stabilization process after an action, resulting in pose data that shows a gradually decreasing but not yet fully stable change over a period of time. In contrast, objects with relatively simple model structures and fewer movable parts typically stabilize their pose data more quickly after an action.
[0138] Therefore, based on the different pose change characteristics of the object, a second mapping relationship between the object and the duration threshold can be obtained, thereby determining the duration threshold adapted to different objects.
[0139] D2: Determine the duration threshold based on the second mapping relationship and the virtual object.
[0140] Based on the virtual object, the corresponding duration threshold can be determined by mapping through the second mapping relationship.
[0141] Therefore, by obtaining the second mapping relationship between the object and the duration threshold, and dynamically determining the duration threshold for the virtual object based on the second mapping relationship, the differences in pose data change characteristics caused by different objects in terms of model structure, skill mechanism, etc. can be fully considered, so that the duration threshold matches the pose change characteristics of the virtual object, and improves the accuracy of static state judgment in multi-object scenarios.
[0142] The pause / replay function allows for temporary suspension of replay at any point during online game replay, preventing further playback. Including the paused replay time in the overall duration of the static state leads to inaccurate duration calculations. Therefore, this application proposes three compensation methods for enabling the pause / replay function, which are described below.
[0143] Compensation method one involves replacing the duration. See E1-E2 for details:
[0144] E1: During online game replay, if the pause replay function is activated during the i-th time when the game is in a static state, then obtain the first activation moment of the pause replay function.
[0145] The first start time is the moment when the pause / replay function is activated, and the first start time is determined based on the game engine's timing.
[0146] When a virtual object is in a static state for the i-th time during an online game replay, and the pause replay function is enabled, obtaining the first activation time of the pause replay function can accurately identify the moment when the online game replay process stops, thus providing a time reference for subsequent compensation of the duration.
[0147] E2: Before the playback function is enabled, the duration of the i-th time in the static continuous state is determined as the difference between the first start time and the start time of the i-th time in the static continuous state.
[0148] The resume playback function is a feature that, when the pause playback function is enabled, triggers a replay of an online game to resume normal playback.
[0149] Before the replay function is enabled, i.e. before the online game replay process resumes, the duration is directly determined as the difference between the first start time and the start time of the i-th static state. This ensures that the duration ends at the first start time and does not change as the pause progresses.
[0150] Therefore, by using the first start point corresponding to the pause when the replay function is enabled as a time breakpoint, and compensating for the duration of the static state using this time breakpoint, the time accumulation process of the static state can be accurately interrupted during the replay pause. This ensures that the time elapsed during the pause is not included in the duration of the static state, avoiding distortion in duration calculation caused by enabling the replay pause function. Furthermore, since the first start point is determined based on the game engine's time, the time breakpoint is also more accurate.
[0151] Compensation method two: The duration will no longer be updated. See F1-F2 for details:
[0152] F1: During online game replay, if the pause replay function is activated during the i-th time the game is in a static state, then obtain the first activation moment of the pause replay function.
[0153] For relevant details, please refer to E1 above, which will not be repeated here.
[0154] F2: Before the replay function is enabled, the duration of the i-th static continuous state will no longer be updated.
[0155] When the pause replay function is enabled but the resume replay function is not enabled, the pose data of the virtual object remains unchanged because the online game replay process does not continue. During the pause, the duration of the static state can be stopped from being updated, so that the duration remains the cumulative result before the pause replay function is enabled.
[0156] Therefore, by stopping the update of the duration of the static state directly after the pause / replay function is enabled and before the resume / replay function is enabled, it is possible to avoid incorrectly including the paused time in the duration, thus preventing the duration from growing unrealistically during the pause. Furthermore, it eliminates the need to repeatedly trigger the duration calculation and update operation, thereby reducing unnecessary computational overhead and improving efficiency. In addition, since the initial start time is determined based on the game engine's time, the point at which the duration is no longer updated is also more accurate.
[0157] Compensation method three involves compensating for the initial moment of maintaining the static state. See G1-G3 for details, where G3 is a specific implementation of S403:
[0158] G1: If the pause playback function is enabled, and the resume playback function is enabled, then obtain the second start time of the resume playback function.
[0159] The second activation time is the moment when the replay function is enabled, and this second activation time is determined based on the game engine's timing.
[0160] G2: Determine the compensation difference between the second start time and the first start time.
[0161] The compensation difference is the difference between the second start time and the first start time, used to quantify the duration of the pause. The compensation difference serves as a correction in the subsequent duration calculation to offset the impact of the pause on the timing of the static duration.
[0162] G3: If the pause playback function is enabled before the second time and then the resume playback function is enabled, the duration of the i-th time in the static continuous state is determined based on the compensation difference, the difference between the second time and the start time of the i-th time in the static continuous state.
[0163] If the pause / playback function is activated before the second time point, and the resume / playback function is activated again after the pause before the second time point, the difference between the second time point and the start time of the i-th static continuous state will no longer be used directly as the duration. Instead, the difference will be corrected by combining the compensation difference to determine the duration of the i-th static continuous state.
[0164] For example, the start time of the i-th time in a static continuous state can be added to the compensation difference to obtain the compensation start time of the i-th time in a static continuous state. The difference between the second time and the compensation start time of the i-th time in a static continuous state can be determined as the duration of the i-th time in a static continuous state.
[0165] For example, the compensation difference can be subtracted from the second time to obtain the compensated second time. The difference between the compensated second time and the time before the start of the i-th static continuous state can be determined as the duration of the i-th static continuous state.
[0166] Therefore, by calculating the compensation difference corresponding to the pause period after the replay function is enabled, and subsequently adjusting the start time or duration, the pause period can be automatically excluded from the duration calculation without changing the duration update frequency. This ensures that the duration of the static continuous state is more consistent with the actual gameplay in online games. Furthermore, since the second start time is determined based on the game engine's time, the compensation difference is also more accurate.
[0167] It should be noted that compensation method one and compensation method two are for the pause period (i.e., the time period after the pause playback function is enabled and before the resume playback function is enabled), while compensation method three is for the period after the resume playback function is enabled. Compensation method three can be used in combination with compensation method one or compensation method two, and this application embodiment does not limit this.
[0168] In one possible implementation, the first moment is the moment corresponding to the j-th frame after the virtual object is in a static state for the i-th time, and the second moment is the moment corresponding to the (j+1)-th frame after the virtual object is in a static state for the i-th time, where j is a positive integer.
[0169] A frame is a unit of visual information generated and displayed sequentially by the game engine according to the refresh rate. The time corresponding to the j-th frame is the time corresponding to the j-th frame obtained by sequentially numbering the frames after the virtual object has been in the i-th static state. The time corresponding to the j-th frame is the time corresponding to the (j+1)-th frame obtained by sequentially numbering the frames after the virtual object has been in the i-th static state.
[0170] In other words, in the embodiments of this application, the first moment and the second moment are determined based on the game engine's frame update mechanism and the game engine's time.
[0171] During online game replays, the logic for determining and handling static states typically needs to be executed on the game engine's main thread. The main thread also handles core tasks such as frame generation, rendering updates, input processing, and replay flow scheduling. If static state checks are continuously executed on the main thread using a constantly triggered method, the main thread will repeatedly perform pose data difference calculations and static state updates at an extremely high frequency. This can easily lead to increased load on the main thread, resulting in performance issues such as frame rate drops, replay stuttering, and main thread blocking, ultimately affecting the replay experience.
[0172] Therefore, by defining the first and second moments as corresponding to adjacent frame times, the process of determining the still state is passively triggered by frame updates. This transforms the active, high-frequency calculation of the still state determination into a passive calculation based on the frame update rhythm. In other words, the still state determination process only performs a calculation once when the game engine generates a new frame, avoiding repeated calculations at any time between frames. This ensures that the calculation process is consistent with the natural frame updates of the main thread, reducing not only the calculation frequency and main thread occupancy but also the risk of main thread blocking. This makes the replay process smoother and more stable, thereby improving the overall performance of online game replays.
[0173] As mentioned above, during online game replay, if a certain judgment moment is determined to be a static instantaneous state, the virtual object at that judgment moment can be calibrated. However, when the virtual object performs certain types of input operations, it is not a suitable time for calibration. Specifically, this type of input operation itself does not cause the virtual object to move, and even between adjacent judgment moments, the change in its pose data may be small. However, if calibration is triggered during the execution of this input operation, it may adversely affect the replay effect.
[0174] For example, when a virtual object performs an aiming operation, the virtual object typically maintains its current position. Calibration at this stage may lead to a mismatch between the calibrated image and the user's subsequent input operations. For instance, calibrating the virtual object's position may cause misalignment in the image within the scope. This introduces a deviation during playback, resulting in abrupt changes in the playback image after subsequent playback, affecting the continuity and consistency of the playback effect. Based on this, this application proposes a specific implementation method for introducing a preset input operation, which will be described below using H1, where H1 is a specific implementation of S403:
[0175] H1: If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, and the input operation acquired at the second moment is determined to be a preset input operation, then the virtual object is determined to be in a static instantaneous state at the second moment, and the duration of the i-th static continuous state is determined to be the difference between the second moment and the start time of the i-th static continuous state.
[0176] The preset input operation is considered to be an operation that can control the movement of virtual objects.
[0177] For example, preset input operations can be forward, backward, left or right movement, jump, dodge, etc., or input operations used to control the orientation or viewpoint of virtual objects, including viewpoint adjustment, direction fine-tuning, camera rotation, etc. Preset input operations can also be continuous input operations such as continuously pressing the direction key, continuously shifting the joystick, or long-pressing the skill key to trigger continuous actions or displacement effects.
[0178] When the difference between the first pose data and the second pose data is less than or equal to the pose threshold, it indicates that the change in the pose data of the virtual object has been relatively small between adjacent judgment moments. From the perspective of pose data alone, the judgment condition corresponding to the static instantaneous state has been met. Further judgment is made as to whether the input operation acquired at the second moment is a preset input operation. If it is determined that the input operation acquired at the second moment is a preset input operation, it means that at that judgment moment, the virtual object is still in a state where it can be controlled by the input operation, that is, the virtual object has not completely escaped the user's motion control. For example, the input operation received by the virtual object at the second moment is a long press of a displacement skill but not released. To make the motion state of the virtual object more accurate, the virtual object can be calibrated at the second moment. Therefore, it can be determined that the virtual object is in a static instantaneous state at the second moment, and the duration of the i-th static continuous state is determined as the difference between the second moment and the start time of the i-th static continuous state.
[0179] Conversely, non-preset input operations can be input operations used for interface interaction, such as opening or closing menus, switching interfaces, confirming prompts, viewing items or settings options, or input operations that do not allow virtual objects to move, such as aiming or opening the inventory. Non-preset input operations usually present a fixed screen or combination of screens, and are not suitable as a suitable time for calibration.
[0180] In other words, if the difference between the first pose data and the second pose data is less than or equal to the pose threshold, and it is determined that the input operation acquired at the second moment is not the preset input operation, it means that even if the pose data of the virtual object changes little, the time period in which the pose data changes little is not suitable as a time for calibration. Therefore, it can be determined that the virtual object is in a non-static state at the second moment, and the second moment is updated to the start time of the (i+1)th time when it is in a static continuous state.
[0181] By setting the virtual object to a non-static state at the second moment, calibration can be avoided at the second moment, thus enabling the input operation at the second moment to be played back normally and improving the playback effect.
[0182] Therefore, by introducing a preset input operation as a further constraint in the process of judging the static instantaneous state, it is possible to further select the calibration timing by considering whether the virtual object is still in a state that can be controlled by the input operation, even when the change in pose data is already small.
[0183] When the input operation acquired in the second moment is a preset input operation, it indicates that the virtual object is still in the motion control phase. By defining the second moment as a static instantaneous state, subsequent calibration can be performed on the second moment. Conversely, when the input operation acquired in the second moment is not a preset input operation, the virtual object will not be defined as a static instantaneous state. This effectively avoids triggering calibration during operation phases unsuitable for calibration, such as aiming or interface interaction. In other words, calibration will not be performed at moments presenting fixed images or image combinations, preventing pressed but not released operations from affecting the timing of calibration triggering and causing unnecessary calibration adjustments. This improves the continuity and consistency of the playback screen, thereby improving the overall playback effect and enhancing the user experience.
[0184] Furthermore, this application proposes a more detailed implementation method, which quantifies and statistically analyzes input operations to determine whether a valid input operation exists, thereby achieving the determination of a static state. This is explained below using I1, where I1 is a specific implementation of S403:
[0185] I1: If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, and the effective input count is zero, then the virtual object is determined to be in a static instantaneous state at the second moment, and the duration of the i-th static continuous state is determined to be the difference between the second moment and the start time of the i-th static continuous state.
[0186] The valid input count is determined based on the input operation and is used to indicate whether there is an unreleased input operation. If the input operation is a press operation, the valid input count is incremented by 1. For example, pressing the right mouse button or a keyboard key will increment the valid input count by 1.
[0187] If the input operation is a release operation, the valid input count is decreased by 1. For example, when the input operation is releasing the right mouse button or releasing a keyboard key, the valid input count is decreased by 1.
[0188] When the valid input count is zero, it indicates that there is no input operation that is pressed and not yet released at the second moment, meaning that the virtual object has completely broken free from the continuous control state of the input operation. In this case, combined with the judgment that the pose data no longer changes significantly, it can be determined that the virtual object is in a static instantaneous state at the second moment, and the duration of the i-th static continuous state is updated.
[0189] Therefore, by maintaining the valid input count based on the press and release types, it is possible to more accurately determine whether a virtual object is still under continuous control of an input operation. When the valid input count is zero, it can be clearly confirmed that there is no still effective input operation, making the determination of the static instantaneous state more accurate and reliable. This reduces the number of times the static state judgment is continuously triggered, deduplicates the player's true and valid operations, improves judgment efficiency, and reduces redundant calculations.
[0190] In one possible implementation, if the difference between the first pose data and the second pose data is less than or equal to the pose threshold and the effective input count is not zero, then the virtual object is determined to be in a non-static state, and the second moment is updated to the start moment of the (i+1)th time in a static continuous state.
[0191] When the valid input count is not zero, it indicates that there is an input operation that is pressed and not released at the second time point, meaning the virtual object is in a state controlled by the input operation. In this case, even if the pose data does not change significantly, it is not suitable to calibrate the virtual object at the second time point to prevent the calibration from affecting the playback effect of the input operation at the second time point. By determining that the virtual object is in a non-static state, the second time point is updated to the start time of the (i+1)th time it is in a static continuous state, so that the virtual object will not be calibrated at the second time point.
[0192] Therefore, in cases where the pose data changes little but there are input operations that are pressed but not released (such as aiming or other long-press operations, the effective input count is 1, and it will not be judged as a static state and will not be executed in the subsequent calibration process), by setting the virtual object at the second moment to a non-static state and continuously updating the start time of the static continuous state, the virtual object will not enter a calibrable static instantaneous state, avoiding misjudgment caused by relying solely on pose data. This makes the division of static continuous state more consistent with the actual control situation of the virtual object, improves the rationality of the calibration timing selection during playback, and thus improves the playback effect.
[0193] In one possible implementation, instead of counting all pressed input operations, only partially pressed input operations can be counted. This is illustrated below using J1-J2, which represent a specific implementation of I1:
[0194] J1: If the input operation type is a press type and the input operation is within the whitelist, then increment the valid input count by 1.
[0195] The whitelist is a set of operations that are considered uncontrollable for moving virtual objects. As mentioned earlier, if a virtual object receives an operation deemed uncontrollable for moving, that time period is not suitable for calibration.
[0196] Specifically, an input operation is only included in the valid input count if it is both a press operation and an operation within the whitelist, thus incrementing the valid input count by 1. This avoids indiscriminately counting all press operations, instead focusing on counting only whitelisted operations, making the valid input count more aligned with actual needs.
[0197] J2: If the input operation is of the release type and the input operation is within the whitelist, then decrease the valid input count by 1.
[0198] Specifically, an input operation is included in the count of valid inputs only when it is both a release operation and an operation within the whitelist, thus reducing the count of valid inputs by 1.
[0199] For example, the whitelist can include multiple pairs of matching operations. For instance, a pair of matching operations could be the pressing and releasing of the same key.
[0200] For example, the operations included in the whitelist can be operations with a time interval that is less than a time interval threshold, and can even occur at adjacent judgment moments.
[0201] For example, different games can correspond to different whitelists. The whitelist can be pre-set for different games, or it can be automatically determined based on the changes in the pose data of virtual objects in the game. For example, for the same button, input operations in which the difference between the pose data before pressing and the pose data after releasing is less than the pose threshold are added to the whitelist.
[0202] Therefore, by introducing a whitelist mechanism into the statistical process of valid input counting, valid input counting does not count all presses and releases, but only those input operations considered unable to control the movement of virtual objects. This allows for a more refined distinction of the scope of influence of input operations. It avoids including a large number of input operations that are irrelevant to calibration or do not affect calibration decisions in the counting range, thus improving the accuracy of identifying valid input operations.
[0203] A long press operation is an input action that has not been released for an extended period of time. If it is a press-type operation, then the core engine file of the game engine can be obtained. The input operation and its operation type are then retrieved from the core engine file.
[0204] The core engine file of a game engine is used by the game engine to define and maintain input operations. The core engine file typically includes unified definitions for various input operations, and the core engine type can be used to record input operations and their types.
[0205] One possible implementation is to obtain the fields of the input operation and the field of the operation type of the input operation from the core engine file, determine the input operation based on the fields of the input operation, and determine the operation type of the input operation based on the field of the operation type of the input operation.
[0206] Therefore, by directly obtaining input operations and their types from the core engine files of the game engine, the existing information in the core engine files (such as using fields like "0" and "W" to identify the input operation type and key name) can be utilized to quickly and easily identify the type of input operation and locate the key, avoiding a complex identification process for input operations. This makes the identification of long-press operations more direct and simpler, thereby improving the efficiency and accuracy of determining the type of input operation.
[0207] Because a long press operation is not released for an extended period of time, it may be identified as multiple press-type input operations during the multiple judgment moments involved in the long press operation. This necessitates multiple statistical processes for counting valid inputs, resulting in a large computational load. Furthermore, if the long press operation is not handled correctly (e.g., repeated counting for multiple judgment moments), the valid input count will not accurately reflect the user's actual input behavior.
[0208] Based on this, the embodiments of this application introduce a repetition type to divide the long press operation into two operation types, which will be described below using K1-K3:
[0209] K1: Retrieves the repetitive type of input operations from the core engine file.
[0210] The repetition type includes repetitive operations and non-repetitive operations. Taking a long press operation as N operations corresponding to N judgment times for the same button as an example, where N is a positive integer, the first to the (N-1)th operations are determined as repetitive operations. That is, multiple identical press operations in a long press operation are determined as a repetitive operation, and release operations that are different from press operations are determined as non-repetitive operations.
[0211] K2: If the input operation is a repetitive operation, then the operation type of the input operation is a long press.
[0212] By defining the input operation type as a long press, the valid input count can be increased by 1.
[0213] Taking a long press operation as an example, which is considered as N operations performed at N corresponding judgment times for the same button, by defining the first to N-1 operations as long press types, only one valid count operation is counted, reducing the number of calculations by N-2. Furthermore, distinguishing whether a long press operation is a repeat operation by identifying its repetition type can filter out duplicate operations and improve the accuracy of valid count statistics.
[0214] K3: If the input operation is a non-repeating operation, then the operation type of the input operation is the release type.
[0215] By defining the operation type of the input operation as the release type, the valid input count can be reduced by 1.
[0216] See Figure 7 This figure is a schematic diagram of data in a core engine file provided in an embodiment of this application. This figure only represents a portion of the data in the core engine file for a long-press operation. Taking the data in the left dashed box as an example, 0 indicates a press type, 1 indicates a release type, and W indicates the pressed key. Taking the data in the right dashed box as an example, 1 indicates a repeated operation on the same key, and 0 indicates a non-repeated operation on the same key. It should be noted that although the first press of the W key is a repeat type of 1, which is considered a non-repeated operation, the input operation that is initially a press type is determined as a press type when determining the operation type.
[0217] See Figure 8 This figure is a schematic diagram of a process for handling repeated input operations according to an embodiment of this application. For different types of input operations, it is first determined whether they belong to the whitelist. If so, it is then determined whether it is a repeated input processing flow. For example, based on the repetition type of the core engine file, input operations that are repeated operations and the first press input operation can be determined as press type, and input operations that are not repeated operations other than the first press can be determined as release type. For press type input operations, the valid input count is incremented by 1, and for release type input operations, the valid input count is decremented by 1.
[0218] Therefore, based on the repetition types provided in the core engine files, long-press operations are divided into two categories: repetitive and non-repetitive operations. Combining these two categories ensures that long-press operations are not counted repeatedly across multiple decision points, only participating in the update of valid input counts at critical decision points (such as the start and end of a long-press operation). This not only avoids the problem of duplicate counting of valid input due to long-press operations but also reduces the computational load during input operation processing, making the valid input count more accurately reflect the user's actual input behavior. A long-press operation of a single key can save multiple calculations, and long-press operations of multiple keys can save even more computational load, further improving the processing efficiency in full-keyboard input scenarios.
[0219] In related technologies, the presence or absence of a virtual object is typically determined using frame time increments. To improve playback quality based on frame time increments, the configuration of the device used for recording is usually greater than or equal to that of the device used for playback. The reasons are as follows: If the device used for recording has a lower configuration, it may experience lost frames and slow processing efficiency, resulting in a larger frame time increment. This leads to inconsistencies between the frame time increments of adjacent frames during playback and the recording process, inaccurate pose data acquired at corresponding moments, inaccurate determination of the still state, and inaccurate calibration timing, resulting in stuttering or even errors during playback.
[0220] This application uses the game engine's time as the time reference to determine whether a virtual object is in a static state. The accuracy of the time reference is not affected by differences in the configuration of the devices used during recording and playback. Therefore, this application does not specifically limit the devices used during playback and recording. Taking the example of an online game's playback process being executed through a first device and its recording process through a second device, the first and second devices can have the same configuration or different configurations. Specifically, the configuration of the first device can be lower than that of the second device, or higher than that of the second device.
[0221] For example, the configuration of a device can be quantified by at least one of the following parameters, including but not limited to: processor computing power parameters (such as processor clock speed, number of cores or instruction processing capability), graphics processing capability parameters (such as graphics processing unit model, video memory capacity or graphics rendering capability), memory parameters (such as memory capacity, memory bandwidth), storage read and write performance parameters, and frame rate stability parameters or load level parameters when the device is running online games.
[0222] Therefore, without affecting the recording and playback effect, the recording device (i.e., the second device) and the playback device (i.e., the first device) can adopt different configurations. For example, the configuration of the first device can be lower than that of the second device, thereby expanding the range of optional configurations for the first and second devices and thus expanding the application scenarios.
[0223] To facilitate a further understanding of the technical solutions provided in the embodiments of this application, the following describes the method for determining the static state of a virtual object as an example, using a terminal device as the execution subject.
[0224] First, the process of implementing one technical implementation of the above method embodiment will be described.
[0225] See Figure 9 The figure is a schematic diagram of the application scenario of a method for determining the static state of a virtual object proposed in this application under a non-pause scenario.
[0226] In this application scenario, the process is encapsulated in a module, and the process is started and closed based on the opening and closing of the module.
[0227] By registering an input handler to the user interface framework and overriding its base class function, the system can capture player input. If the input is a keyboard or mouse press and is included in the whitelist, the valid input count is incremented by 1. If the input is a keyboard or mouse release and is included in the whitelist, the valid input count is decremented by 1.
[0228] A callback function for the registered event is triggered every frame update. This callback function includes three conditions: whether the valid input count is equal to 0, whether the difference between the positions obtained from the pose data and the positions obtained from the previous two frames is less than 0.000001f (a floating-point number), and whether the difference between the rotations obtained from the pose data and the rotations (used to indicate the orientation of the virtual object) obtained from the previous two frames is less than 0.000001f. If all the above conditions are met at time M after the virtual object's i-th time of being in a static state, the duration of the static state, including time M, is further evaluated. If it is greater than 0.5 seconds, the virtual object is determined to be in a static instantaneous state at time M. If any condition is not met, time M is determined as the start time of the static state after the i-th time of being in a static state, and the position and rotation at this time (time M) are updated based on the pose data. The virtual object is then determined to be in a non-static state at time M. M is a positive integer, and time M is determined based on the game engine's timing.
[0229] For relevant details, please refer to the aforementioned S401-S404, B1-B2, H1, I1 and J1-J2, which will not be repeated here.
[0230] See Figure 10 The figure is a schematic diagram of the application scenario of the method for determining the static state of a virtual object proposed in the embodiments of this application under a paused scenario.
[0231] For paused scenarios, specifically those involving enabling pause / playback and resuming playback, a callback function for the pause duration can be registered to determine the initial moment when pause / playback is enabled. By registering a callback function for resuming the paused state, the difference between the current moment and the initial start moment is added to the start time of the static continuous state. In this application scenario, the current moment indicates when the callback function for resuming the paused state is triggered. This achieves dynamic compensation for the duration of a virtual object's static continuous state.
[0232] For relevant details, please refer to the aforementioned compensation method one, compensation method two, and compensation method three, which will not be repeated here.
[0233] To gain a more intuitive understanding of the effect of the method for determining the static state of virtual objects described above, you can view the playback data by connecting to the Ue Input Replay plugin.
[0234] See Figure 11 This figure is one of the schematic diagrams of a playback data display provided in an embodiment of this application.
[0235] For each playback data display diagram, focus on four parameters: valid input count, static state, start time, and timing duration.
[0236] Taking a single key as an example (the numbers can be used to indicate the number of keys pressed), K0 indicates the key released, K1 indicates the key pressed, M0 indicates the key released from the mouse / keyboard, and M1 indicates the key pressed from the mouse. For ease of description, in this embodiment, the duration threshold is 0.5 seconds. That is, when the virtual object's position and rotation remain essentially unchanged for 0.5 seconds, and the valid input count is 0, it is determined that the virtual object is in a static state (the static state in this application scenario corresponds to the aforementioned static instantaneous state, and being in a static state indicates that it can be used for correction). In this case, the static state is displayed as true; otherwise, it is displayed as false.
[0237] See Figure 12 This figure is a second schematic diagram of a playback data display provided in an embodiment of this application.
[0238] When the duration is less than or equal to 0.5 seconds, the static state is displayed as false.
[0239] See Figure 13 This figure is the third schematic diagram of a playback data display provided in an embodiment of this application.
[0240] When the duration is greater than 0.5 seconds, the static state is displayed as false.
[0241] See Figure 14 This figure is the fourth schematic diagram of a playback data display provided in an embodiment of this application.
[0242] If the player presses the right mouse button and does not release it, the valid input count will increase, and the valid input will be displayed as 1 (K0 / M1), meaning that the player has pressed one mouse button and has not released it. At this time, the duration of the static state will not be updated, and the duration will always be displayed as 0.001 seconds.
[0243] See Figure 15 This figure is the fifth schematic diagram of a playback data display provided in an embodiment of this application.
[0244] When the player releases the right mouse button, the valid input count will decrease accordingly, and the valid input count will be displayed as 0 (K0 / M0). At this time, the duration of the static state will be calculated.
[0245] See Figure 16 This figure is the sixth schematic diagram of a playback data display provided in the embodiments of this application.
[0246] If the player presses the W key on the keyboard and does not release it, the player character will move forward, and the valid input count will be displayed as 1 (K1 / M0). In this case, the duration of the stationary state will not be updated, and the duration will always be displayed as 0.001 seconds.
[0247] See Figure 17 This figure is the seventh schematic diagram of a playback data display provided in an embodiment of this application.
[0248] This plugin also supports pause / replay functionality. In this case, the calculation method for the duration of the static state changes to subtracting the start time from the pause time (determined based on the game engine's time), preventing the incorrect accumulation of the static state duration during pauses. Figure 17 As shown, the duration of the pause was consistently displayed as 1.259 seconds.
[0249] See Figure 18 This figure is the eighth schematic diagram of a playback data display provided in an embodiment of this application.
[0250] After a pause, the playback process can be resumed using the resume playback function. At this time, the time difference between the start time and the start time (obtained by subtracting the start time from the start time) will be added to the displayed start time. After compensation, the calculation method for the duration of the static state will revert to its original method: subtracting the start time from the current time. Figure 18 As shown, the duration continues to accumulate starting at 1.259 seconds after the replay function is enabled.
[0251] In response to the method for determining the static state of a virtual object described above, this application also provides a corresponding device for determining the static state of a virtual object, so that the above method for determining the static state of a virtual object can be applied and implemented in practice.
[0252] See Figure 19 The figure is a schematic diagram of a device for determining the static state of a virtual object according to an embodiment of this application. Figure 19 As shown, the device 1900 for determining the static state of the virtual object includes: an acquisition unit 1901 and a determination unit 1902;
[0253] The acquisition unit 1901 is used to acquire the first pose data of a virtual object at a first moment during the online game replay process. The first moment is determined based on the time of the game engine and is the j-th moment used to determine whether the virtual object is in a static instantaneous state after the virtual object is in the i-th static continuous state. The virtual object is in the static continuous state between the start time of the i-th static continuous state and the j-th moment used to determine whether the virtual object is in the static instantaneous state, where i is a positive integer and j is a positive integer.
[0254] The acquisition unit 1901 is further configured to acquire the second pose data of the virtual object at a second moment, wherein the second moment is determined based on the time of the game engine and is the (j+1)th moment after the virtual object is in the static continuous state for the i-th time, used to determine whether the virtual object is in the static instantaneous state.
[0255] The determining unit 1902 is configured to determine that the virtual object is in the static instantaneous state at the second moment if the difference between the first pose data and the second pose data is less than or equal to the pose threshold, and to determine that the duration of the i-th time in the static continuous state is the difference between the second moment and the start moment of the i-th time in the static continuous state.
[0256] As one possible implementation, the device 1900 further includes a non-stationary determination unit for:
[0257] If the difference between the first pose data and the second pose data is greater than the pose threshold, then the virtual object is determined to be in a non-static state, and the second time is updated to the start time of the (i+1)th time in the static continuous state.
[0258] As one possible implementation, if the difference between the first pose data and the second pose data is less than or equal to the pose threshold, then the determining unit 1902 is specifically used for:
[0259] If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, and the difference between the start time of the i-th time in the static continuous state and the second time is greater than the duration threshold, then it is determined that the virtual object is in the static instantaneous state at the second time, and the duration of the i-th time in the static continuous state is determined to be the difference between the second time and the start time of the i-th time in the static continuous state.
[0260] If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, and the difference between the start time of the i-th time in the static continuous state and the second time is less than or equal to the duration threshold, then it is determined that the virtual object is in a non-static state at the second time, and the duration of the i-th time in the static continuous state is determined to be the difference between the second time and the start time of the i-th time in the static continuous state.
[0261] As one possible implementation, the device 1900 further includes a first duration threshold determination unit, used for:
[0262] Obtain a first mapping relationship between games and duration thresholds. The first mapping relationship is used to describe the duration thresholds corresponding to different games. The faster the game pace, the smaller the duration threshold corresponding to the game.
[0263] The duration threshold is determined based on the first mapping relationship and the online game.
[0264] As one possible implementation, the device 1900 further includes a second duration threshold determination unit, used for:
[0265] Obtain a second mapping relationship between objects and duration thresholds, which describes the duration thresholds corresponding to different objects;
[0266] The duration threshold is determined based on the second mapping relationship and the virtual object.
[0267] As one possible implementation, the device 1900 further includes a first compensation unit, used for:
[0268] During the online game replay process, if the pause replay function is activated during the i-th time when the game is in the static continuous state, then the first activation time of the pause replay function is obtained, and the first activation time is determined based on the game engine's time.
[0269] Before the playback function is restored, the duration of the i-th time in the static continuous state is determined as the difference between the first activation time and the start time of the i-th time in the static continuous state.
[0270] As one possible implementation, the device 1900 further includes a second compensation unit for:
[0271] During the online game replay process, if the pause replay function is activated during the i-th time when the game is in the static continuous state, then the first activation time of the pause replay function is obtained, and the first activation time is determined based on the game engine's time.
[0272] Before the playback function is enabled, the duration of the i-th time in the static continuous state will not be updated.
[0273] As one possible implementation, the device 1900 further includes a third compensation unit for:
[0274] After the pause replay function is enabled, if the resume replay function is enabled, then the second start time of the resume replay function is obtained, and the second start time is determined based on the game engine's time.
[0275] Determine the compensation difference between the second start time and the first start time;
[0276] If the pause playback function is activated before the second time point and then the resume playback function is activated again, then determining the duration of the i-th time in the static continuous state as the difference between the second time point and the start time of the i-th time in the static continuous state includes:
[0277] The duration of the i-th instance of being in the static continuous state is determined based on the difference between the compensation difference, the second time, and the start time of the i-th instance of being in the static continuous state.
[0278] As one possible implementation, the first moment is the moment corresponding to the j-th frame after the virtual object is in a static continuous state for the i-th time, and the second moment is the moment corresponding to the (j+1)-th frame after the virtual object is in a static continuous state for the i-th time, where j is a positive integer.
[0279] As one possible implementation, if the difference between the first pose data and the second pose data is less than or equal to the pose threshold, then the determining unit 1902 is specifically used for:
[0280] If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, and the input operation acquired at the second moment is determined to be a preset input operation, then the virtual object is determined to be in the static instantaneous state at the second moment, and the duration of the i-th time in the static continuous state is determined to be the difference between the second moment and the start time of the i-th time in the static continuous state. The preset input operation is considered to be an operation that can control the virtual object to move.
[0281] As one possible implementation, if the difference between the first pose data and the second pose data is less than or equal to the pose threshold, then the determining unit 1902 is specifically used for:
[0282] If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, and the effective input count is zero, then the virtual object is determined to be in the static instantaneous state at the second moment, and the duration of the i-th time in the static continuous state is determined to be the difference between the second moment and the start time of the i-th time in the static continuous state.
[0283] The valid input count is determined based on the input operation. If the operation type of the input operation is a press type, the valid input count is incremented by 1; if the operation type of the input operation is a release type, the valid input count is decremented by 1.
[0284] As one possible implementation, the device 1900 further includes an update unit for:
[0285] If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, and the effective input count is not zero, then the virtual object is determined to be in a non-static state, and the second time is updated to the start time of the (i+1)th time in the static continuous state.
[0286] As one possible implementation, the determining unit 1902 is specifically used for:
[0287] If the input operation is a press operation and the input operation is a whitelisted operation, then the valid input count is incremented by 1. The whitelist includes operations that are considered as not being able to control the movement of the virtual object.
[0288] If the input operation is of the release type and is an operation within the whitelist, then the valid input count is reduced by 1.
[0289] As one possible implementation, if the operation of the press type is a long press operation, then the device 1900 further includes an operation type acquisition unit, used for:
[0290] Obtain the core engine file of the game engine;
[0291] The input operation and its operation type are obtained from the core engine file.
[0292] As one possible implementation, the device 1900 further includes a repetitive operation processing unit for:
[0293] Obtain the repetition type of the input operation from the core engine file;
[0294] If the input operation is a repetitive operation, then the operation type of the input operation belongs to the long press type;
[0295] If the input operation is a non-repeating operation, then the operation type of the input operation is a release type.
[0296] As one possible implementation, if the online game replay process is performed through a first device and the online game recording process is performed through a second device, then the configuration of the first device is lower than that of the second device.
[0297] This application also provides a computer device, which can be a server or a terminal device. The computer device provided in this application will be described below from a hardware implementation perspective. Figure 20 The diagram shown is a structural schematic of the server. Figure 21 The diagram shown is a structural schematic of the terminal device.
[0298] See Figure 20This figure is a schematic diagram of a server structure provided in an embodiment of this application. The server 1400 can vary considerably due to different configurations or performance. It may include one or more processors 1422, such as a central processing unit (CPU), memory 1432, and one or more storage media 1430 (e.g., one or more mass storage devices) for application programs 1442 or data 1444. The memory 1432 and storage media 1430 can be temporary or persistent storage. The program stored in the storage media 1430 may include one or more modules (not shown in the figure), each module may include a series of instruction operations on the server. Furthermore, the processor 1422 may be configured to communicate with the storage media 1430 and execute the series of instruction operations in the storage media 1430 on the server 1400.
[0299] Server 1400 may also include one or more power supplies 1426, one or more wired or wireless network interfaces 1450, one or more input / output interfaces 1458, and / or one or more operating systems 1441, such as Windows Server. TM Mac OS X TM Unix TM Linux TM FreeBSD TM etc.
[0300] The steps performed by the server in the above embodiments can be based on this Figure 20 The server structure shown.
[0301] The processor 1422 is used to perform the following steps:
[0302] During the online game replay, the first pose data of the virtual object at the first moment is obtained. The first moment is determined based on the time of the game engine and is the j-th moment used to determine whether the virtual object is in the static instantaneous state after the virtual object is in the static continuous state for the i-th time. The virtual object is in the static continuous state between the start time of the i-th time in the static continuous state and the j-th moment used to determine whether the virtual object is in the static instantaneous state. i is a positive integer and j is a positive integer.
[0303] The second pose data of the virtual object at the second moment is obtained. The second moment is determined based on the time of the game engine and is the (j+1)th moment after the virtual object is in the static continuous state for the i-th time. This moment is used to determine whether the virtual object is in the static instantaneous state.
[0304] If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, then the virtual object is determined to be in the static instantaneous state at the second moment, and the duration of the i-th time in the static continuous state is determined to be the difference between the second moment and the start time of the i-th time in the static continuous state.
[0305] Optionally, the processor 1422 may also execute method steps of any specific implementation of the method for determining the static state of a virtual object in the embodiments of this application.
[0306] See Figure 21 This figure is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. The description will be based on a smartphone as an example. Figure 21 The diagram shown is a block diagram of a portion of the structure of the smartphone, which includes: a radio frequency (RF) circuit 1510, a memory 1520, an input unit 1530, a display unit 1540, a sensor 1550, an audio circuit 1560, a Wi-Fi module 1570, a processor 1580, and a power supply 1590, among other components. Those skilled in the art will understand that... Figure 21 The smartphone structure shown does not constitute a limitation on smartphones and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0307] The following is combined with Figure 21 A detailed introduction to the various components of a smartphone:
[0308] The RF circuit 1510 can be used to receive and transmit signals during information transmission or calls. In particular, it receives downlink information from the base station and processes it with the processor 1580; in addition, it transmits uplink data to the base station.
[0309] The memory 1520 can be used to store software programs and modules, and the processor 1580 runs the software programs and modules stored in the memory 1520 to realize various functions and data processing of the smartphone.
[0310] The input unit 1530 can be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the smartphone. Specifically, the input unit 1530 may include a touch panel 1531 and other input devices 1532. The touch panel 1531, also known as a touch screen, can collect touch operations from the user on or near it and drive corresponding connected devices according to a pre-set program. In addition to the touch panel 1531, the input unit 1530 may also include other input devices 1532. Specifically, other input devices 1532 may include, but are not limited to, one or more of the following: a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, a joystick, etc.
[0311] The display unit 1540 can be used to display information input by the user or information provided to the user, as well as various menus of a smartphone. The display unit 1540 may include a display panel 1541, which may optionally be configured as a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0312] Smartphones may also include at least one sensor 1550, such as a light sensor, a motion sensor, and other sensors. Other sensors that smartphones may also be equipped with, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be detailed here.
[0313] Audio circuit 1560, speaker 1561, and microphone 1562 provide an audio interface between the user and the smartphone. Audio circuit 1560 converts received audio data into electrical signals and transmits them to speaker 1561, where speaker 1561 converts them into sound signals for output. On the other hand, microphone 1562 converts collected sound signals into electrical signals, which are received by audio circuit 1560, converted into audio data, and then processed by processor 1580 before being transmitted via RF circuit 1510 to, for example, another smartphone, or the audio data can be output to memory 1520 for further processing.
[0314] The processor 1580 is the control center of the smartphone, connecting various parts of the smartphone through various interfaces and lines. It performs various functions and processes data by running or executing software programs and / or modules stored in the memory 1520, and by calling data stored in the memory 1520. Optionally, the processor 1580 may include one or more processing units.
[0315] The smartphone also includes a power supply 1590 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 1580 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.
[0316] Although not shown, smartphones may also include a camera, Bluetooth module, etc., which will not be described in detail here.
[0317] In this embodiment of the application, the memory 1520 included in the smartphone can store computer programs and transmit the computer programs to the processor.
[0318] The processor 1580 included in the smartphone can execute the method for determining the static state of a virtual object provided in the above embodiments according to the instructions in the computer program.
[0319] This application also provides a computer-readable storage medium for storing a computer program for executing the method for determining the static state of a virtual object provided in the above embodiments.
[0320] On the other hand, embodiments of this application provide a computer program product including a computer program, which, when run on a computer device, causes the computer device to perform a method for determining the static state of a virtual object provided in various optional implementations of the above aspects.
[0321] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium can be at least one of the following media: read-only memory (ROM), RAM, magnetic disk or optical disk, and other media that can store computer programs.
[0322] The terms “first,” “second,” “third,” “fourth,” etc., as used in this application (if applicable), are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “corresponding,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0323] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0324] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects detailed in this application.
[0325] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used herein are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items. Depending on the context, the word “if,” as used herein, can be interpreted as “when,” “in response to a determination,” or “when…”.
[0326] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments. The device and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the solution in this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0327] The above description is merely one specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods.
Claims
1. A method for determining the static state of a virtual object, characterized in that, The method includes: During the online game replay, the first pose data of the virtual object at the first moment is obtained. The first moment is determined based on the game engine's time and is the j-th moment used to determine whether the virtual object is in the static instantaneous state after the virtual object is in the static continuous state for the i-th time. The virtual object is in the static continuous state between the start time of the i-th time in the static continuous state and the j-th moment used to determine whether the virtual object is in the static instantaneous state. i is a positive integer and j is a positive integer. The second pose data of the virtual object at the second moment is obtained. The second moment is determined based on the time of the game engine and is the (j+1)th moment after the virtual object is in the static continuous state for the i-th time. This moment is used to determine whether the virtual object is in the static instantaneous state. If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, then the virtual object is determined to be in the static instantaneous state at the second moment, and the duration of the i-th time in the static continuous state is determined to be the difference between the second moment and the start moment of the i-th time in the static continuous state. The pose threshold is used to characterize the maximum pose change allowed in the static instantaneous state. If the difference between the first pose data and the second pose data is greater than the pose threshold, then the virtual object is determined to be in a non-static state, and the second time is updated to the start time of the (i+1)th time it is in the static continuous state.
2. The method according to claim 1, characterized in that, If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, then the virtual object is determined to be in the static instantaneous state at the second moment, and the duration of the i-th instance of being in the static continuous state is determined to be the difference between the second moment and the start moment of the i-th instance of being in the static continuous state, including: If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, and the difference between the start time of the i-th time in the static continuous state and the second time is greater than the duration threshold, then it is determined that the virtual object is in the static instantaneous state at the second time, and the duration of the i-th time in the static continuous state is determined to be the difference between the second time and the start time of the i-th time in the static continuous state. If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, and the difference between the start time of the i-th time in the static continuous state and the second time is less than or equal to the duration threshold, then it is determined that the virtual object is in a non-static state at the second time, and the duration of the i-th time in the static continuous state is determined to be the difference between the second time and the start time of the i-th time in the static continuous state.
3. The method according to claim 2, characterized in that, The method further includes: Obtain a first mapping relationship between games and duration thresholds. The first mapping relationship is used to describe the duration thresholds corresponding to different games. The faster the game pace, the smaller the duration threshold corresponding to the game. The duration threshold is determined based on the first mapping relationship and the online game.
4. The method according to claim 2, characterized in that, The method further includes: Obtain a second mapping relationship between objects and duration thresholds, which describes the duration thresholds corresponding to different objects; The duration threshold is determined based on the second mapping relationship and the virtual object.
5. The method according to claim 1, characterized in that, The method further includes: During the online game replay process, if the pause replay function is activated during the i-th time when the game is in the static continuous state, then the first activation time of the pause replay function is obtained, and the first activation time is determined based on the game engine's time. Before the playback function is restored, the duration of the i-th time in the static continuous state is determined as the difference between the first activation time and the start time of the i-th time in the static continuous state.
6. The method according to claim 1, characterized in that, The method further includes: During the online game replay process, if the pause replay function is activated during the i-th time when the game is in the static continuous state, then the first activation time of the pause replay function is obtained, and the first activation time is determined based on the game engine's time. Before the playback function is enabled, the duration of the i-th time in the static continuous state will not be updated.
7. The method according to claim 5 or 6, characterized in that, The method further includes: After the pause replay function is enabled, if the resume replay function is enabled, then the second start time of the resume replay function is obtained, and the second start time is determined based on the game engine's time. Determine the compensation difference between the second start time and the first start time; If the pause playback function is activated before the second time point and then the resume playback function is activated again, then determining the duration of the i-th time in the static continuous state as the difference between the second time point and the start time of the i-th time in the static continuous state includes: The duration of the i-th instance of being in the static continuous state is determined based on the difference between the compensation difference, the second time, and the start time of the i-th instance of being in the static continuous state.
8. The method according to claim 1, characterized in that, The first moment is the moment corresponding to the j-th frame after the virtual object is in a static state for the i-th time, and the second moment is the moment corresponding to the (j+1)-th frame after the virtual object is in a static state for the i-th time, where j is a positive integer.
9. The method according to claim 1, characterized in that, If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, then the virtual object is determined to be in the static instantaneous state at the second moment, and the duration of the i-th instance of being in the static continuous state is determined to be the difference between the second moment and the start moment of the i-th instance of being in the static continuous state, including: If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, and the input operation acquired at the second moment is determined to be a preset input operation, then the virtual object is determined to be in the static instantaneous state at the second moment, and the duration of the i-th time in the static continuous state is determined to be the difference between the second moment and the start time of the i-th time in the static continuous state. The preset input operation is considered to be an operation that can control the virtual object to move.
10. The method according to claim 1, characterized in that, If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, then the virtual object is determined to be in the static instantaneous state at the second moment, and the duration of the i-th instance of being in the static continuous state is determined to be the difference between the second moment and the start moment of the i-th instance of being in the static continuous state, including: If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, and the effective input count is zero, then the virtual object is determined to be in the static instantaneous state at the second moment, and the duration of the i-th time in the static continuous state is determined to be the difference between the second moment and the start time of the i-th time in the static continuous state. The valid input count is determined based on the input operation. If the operation type of the input operation is a press type, the valid input count is incremented by 1; if the operation type of the input operation is a release type, the valid input count is decremented by 1.
11. The method according to claim 10, characterized in that, The method further includes: If the difference between the first pose data and the second pose data is less than or equal to the pose threshold, and the effective input count is not zero, then the virtual object is determined to be in a non-static state, and the second time is updated to the start time of the (i+1)th time it is in the static continuous state.
12. The method according to claim 10, characterized in that, If the input operation type is a press type, the valid input count is incremented by 1; if the input operation type is a release type, the valid input count is decremented by 1, including: If the input operation is a press operation and the input operation is a whitelisted operation, then the valid input count is incremented by 1. The whitelist includes operations that are considered as not being able to control the movement of the virtual object. If the input operation is of the release type and the input operation is an operation within the whitelist, then the valid input count is reduced by 1.
13. The method according to claim 10, characterized in that, If the operation of the press type is a long press operation, then the method further includes: Obtain the core engine file of the game engine; The input operation and its operation type are obtained from the core engine file.
14. The method according to claim 13, characterized in that, The method further includes: Obtain the repetition type of the input operation from the core engine file; If the input operation is a repetitive operation, then the operation type of the input operation belongs to the long press type; If the input operation is a non-repeating operation, then the operation type of the input operation is a release type.
15. The method according to claim 1, characterized in that, If the online game replay process is performed through a first device and the online game recording process is performed through a second device, then the configuration of the first device is lower than that of the second device.
16. A device for determining the static state of a virtual object, characterized in that, The device includes: an acquisition unit, a determination unit, and a non-stationary determination unit; The acquisition unit is used to acquire the first pose data of the virtual object at the first moment during the online game replay process. The first moment is determined based on the game engine time and is the j-th moment used to determine whether the virtual object is in the static instantaneous state after the virtual object is in the static continuous state for the i-th time. The virtual object is in the static continuous state between the start time of the i-th time in the static continuous state and the j-th moment used to determine whether the virtual object is in the static instantaneous state. i is a positive integer and j is a positive integer. The acquisition unit is further configured to acquire the second pose data of the virtual object at a second moment, wherein the second moment is determined based on the time of the game engine and is the (j+1)th moment after the virtual object is in the static continuous state for determining whether the virtual object is in the static instantaneous state; The determining unit is configured to determine that the virtual object is in the static instantaneous state at the second moment if the difference between the first pose data and the second pose data is less than or equal to the pose threshold, and to determine the duration of the i-th time in the static continuous state as the difference between the second moment and the start moment of the i-th time in the static continuous state, wherein the pose threshold is used to characterize the maximum allowable pose change in the static instantaneous state. The non-stationary determination unit is configured to determine that the virtual object is in a non-stationary state if the difference between the first pose data and the second pose data is greater than the pose threshold, and update the second time to the start time of the (i+1)th time that the object is in the static continuous state.
17. A computer device, characterized in that, The computer device includes a processor and memory: The memory is used to store computer programs and to transfer the computer programs to the processor; The processor is configured to perform the method according to any one of claims 1-15 according to the computer program.
18. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program for performing the method according to any one of claims 1-15.
19. A computer program product comprising a computer program, characterized in that, When it is run on a computer device, it causes the computer device to perform the method described in any one of claims 1-15.