Data recording method, device, equipment, medium and product based on virtual scenario

By recording the virtual object status and interactive operation events in the virtual scene to generate the recording file, the problem of out-of-synchronization caused by logical inconsistency in Unreal Engine recording and playback is solved, and the accurate playback and compatibility of the recording file on multiple application versions is achieved.

CN114344918BActive Publication Date: 2025-07-25TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111660327.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-11-02
Filing Date
2021-12-31
Publication Date
2025-07-25
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

In the recording and playback technology of the fourth generation of Unreal Engine, due to inconsistent game logic, the client is out of sync and cannot play back the recorded file correctly.

Method used

By recording the virtual object status and interactive operation events in the virtual scene, the recording files are generated to ensure that the recording files can be accurately played back on different application versions.

Benefits of technology

Improves the compatibility and playback accuracy of recording files between different application versions, and improves the application efficiency of recording files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114344918B_ABST
    Figure CN114344918B_ABST
Patent Text Reader

Abstract

The present application discloses a data recording method, apparatus, device, medium and product based on a virtual scenario, relating to the field of computer technology. The method includes: in response to receiving a recording signal, starting to record the virtual scenario; during the running process of the virtual scenario, recording the object state of a virtual object to obtain state data; in response to receiving an interaction operation event, recording the interaction operation event to obtain operation data; in response to the end of recording, generating a recording file according to the state data and the operation data, where the recording file is used for a target application running on at least one application version to play back the scene picture corresponding to the virtual scenario. By recording the object state of the virtual object and the received interaction operation events to generate a recording file, while ensuring accuracy during playback of the recording file, the compatibility of the recording file in applications between different application versions is improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims the priority of the Chinese patent application with the application number 202111290212.4 and the invention title "Data Recording Method, Device, Equipment, Medium and Product Based on Virtual Scenario" filed on November 2, 2021, the entire content of which is incorporated herein by reference. Technical Field

[0002] This application relates to the field of computer technology, and in particular, to a data recording method, device, equipment, medium and product based on virtual scenario. Background Art

[0003] During the testing process of games, generally, recording and playback use cases are recorded, and the recorded videos are replayed to perform comparative tests on game-related data.

[0004] In the related art, the recording and playback technology for the fourth-generation Unreal Engine (UE4) is generally implemented through the Replay system in UE4. Testers operate the character to generate a.replay file and replay the replay file through the command line. The Replay system in UE4 creates a new DemoNetDriver according to the instruction. When the listening is enabled, all network packets will be recorded and saved in the replay file. When playing back, the current network channel will be closed, and the corresponding recorded file will be loaded, and the game will be driven by the network packets to realize the playback of the game screen.

[0005] However, since the above playback screen is driven by network packets, during the recording and playback process, the game logic must be completely consistent, otherwise there will be a problem that the playback cannot be correctly performed due to client desynchronization. Summary of the Invention

[0006] Embodiments of this application provide a data recording method, device, equipment, medium and product based on virtual scenario, which can improve the compatibility of the recorded file. The technical solution is as follows:

[0007] On the one hand, a data recording method based on virtual scenario is provided, and the method includes:

[0008] In response to receiving a recording signal, start recording the virtual scenario, where the virtual scenario includes virtual objects;

[0009] During the running of the virtual scenario, record the object state of the virtual object to obtain state data, where the state data is used to indicate the change of the virtual object in the coordinate system corresponding to the virtual scenario;

[0010] In response to receiving an interaction operation event, record the interaction operation event to obtain operation data;

[0011] In response to the end of recording, generate a recording file according to the status data and the operation data, where the recording file is used for a target application running on at least one application version to play back the scene image corresponding to the virtual scene, and the target application is used to run the virtual scene.

[0012] On the other hand, a data recording device based on a virtual scene is provided, and the device includes:

[0013] A recording start module, configured to start recording of a virtual scene in response to receiving a recording signal, where the virtual scene includes virtual objects;

[0014] A data recording module, configured to record the object state of the virtual object during the running of the virtual scene to obtain status data, where the status data is used to indicate the change of the virtual object in the coordinate system corresponding to the virtual scene;

[0015] The data recording module is further configured to record the interaction operation event in response to receiving the interaction operation event to obtain operation data;

[0016] A file generation module, configured to generate a recording file according to the status data and the operation data in response to the end of recording, where the recording file is used for a target application running on at least one application version to play back the scene image corresponding to the virtual scene, and the target application is used to run the virtual scene.

[0017] On the other hand, a computer device is provided, where the terminal includes a processor and a memory, and at least one instruction, at least one program segment, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one program segment, the code set or the instruction set is loaded and executed by the processor to implement any one of the data recording methods based on a virtual scene in the embodiments of the present application.

[0018] On the other hand, a computer-readable storage medium is provided, and at least one program code is stored in the computer-readable storage medium, and the program code is loaded and executed by the processor to implement any one of the data recording methods based on a virtual scene in the embodiments of the present application.

[0019] On the other hand, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data recording method based on a virtual scene described in any of the above embodiments.

[0020] The technical solutions provided in this application at least include the following beneficial effects:

[0021] When it is necessary to perform playback recording on a virtual scene, record the object states of virtual objects in the virtual scene and the interaction operation events received by the terminal, so as to generate a recording file that can run on a target application with multiple application versions. That is, by recording the object states of virtual objects and the received interaction operation events to generate a recording file, while ensuring the accuracy of the recording file during playback, the compatibility of the recording file on applications with different application versions is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0023] Figure 1 is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;

[0024] Figure 2 is a flowchart of a data recording method based on a virtual scene provided by an exemplary embodiment of the present application;

[0025] Figure 3 is a flowchart of a data recording method based on a virtual scene provided by another exemplary embodiment of the present application;

[0026] Figure 4 is a flowchart of a recording process provided by an exemplary embodiment of the present application;

[0027] Figure 5 is a flowchart of a data testing method based on a virtual scene provided by an exemplary embodiment of the present application;

[0028] Figure 6 is a flowchart of a playback provided by an exemplary embodiment of the present application;

[0029] Figure 7 is a flowchart of data comparison and error correction provided by an exemplary embodiment of the present application;

[0030] Figure 8 It is a schematic diagram of differential frame data provided by an exemplary embodiment of the present application;

[0031] Figure 9 It is a structural block diagram of a data recording device based on a virtual scene provided by an exemplary embodiment of the present application;

[0032] Figure 10 It is a structural block diagram of a data recording device based on a virtual scene provided by another exemplary embodiment of the present application;

[0033] Figure 11 It is a schematic structural diagram of a server provided by an exemplary embodiment of the present application. Detailed implementation manners

[0034] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.

[0035] First, the implementation environment of the embodiments of the present application will be described. As Figure 1 shown, the implementation environment includes: a terminal 110, a server 120, and a communication network 130.

[0036] The terminal 110 includes various forms of terminal devices such as mobile phones, tablet computers, desktop computers, and portable laptop computers. A target application that provides a virtual scene runs in the terminal 110. The target application can be an independent application program, a web application, or a small program in a host application, which is not limited herein. Optionally, the target application can be any one of applications that can provide a virtual scene, such as a virtual reality application program, a three-dimensional map program, a Third-Personal Shooting Game (TPS), a First-Person Shooting Game (FPS), a Multiplayer Online Battle Arena Games (MOBA), and a multiplayer gunfight survival game.

[0037] The server 120 is used to provide backend support for the above-mentioned target application. Taking the target application as a game application as an example, the server 120 provides backend game logic for the target application. In some embodiments, the target application includes frontend game logic and backend game logic. The frontend game logic is completed by a game client installed in the terminal 110, and the backend game logic is completed by the server 120.

[0038] It should be noted that the above-mentioned server 120 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), as well as big data and artificial intelligence platforms.

[0039] Among them, cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or local area network to achieve data computing, storage, processing, and sharing. Cloud technology is the general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, be used on demand, and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture-based websites, and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark and needs to be transmitted to the background system for logical processing. Data at different levels will be processed separately, and various industry data requires the support of a powerful system background, which can only be achieved through cloud computing.

[0040] In some embodiments, the above-mentioned server 120 can also be implemented as a node in a blockchain system. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithms. Blockchain, in essence, is a decentralized database, a string of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity (anti-counterfeiting) of the information and generate the next block. Blockchain can include the blockchain underlying platform, the platform product service layer, and the application service layer.

[0041] The underlying blockchain platform may include processing modules such as user management, basic services, smart contracts, and operation management. Among them, the user management module is responsible for the identity information management of all blockchain participants, including maintaining the generation of public and private keys (account management), key management, and the maintenance of the correspondence between the real identity of the user and the blockchain address (permission management). And under authorized circumstances, it supervises and audits the transaction situations of certain real identities, and provides rule configuration for risk control (risk control and auditing); the basic service module is deployed on all blockchain node devices to verify the validity of business requests, and after reaching a consensus on valid requests, record them on the storage. For a new business request, the basic service first performs interface adaptation parsing and authentication processing (interface adaptation), then encrypts the business information through a consensus algorithm (consensus management), and after encryption, transmits it to the shared ledger in a complete and consistent manner (network communication), and records and stores it; the smart contract module is responsible for the registration and issuance of contracts, contract triggering, and contract execution. Developers can define contract logic through a certain programming language, publish it to the blockchain (contract registration), and according to the logic of the contract terms, call keys or other events to trigger execution, complete the contract logic, and at the same time provide functions for contract upgrade and cancellation; the operation management module is mainly responsible for the deployment, configuration modification, contract setting, cloud adaptation during the product release process, and the visual output of the real-time state during product operation.

[0042] Schematically, the recording process can be implemented online. That is, after the target application runs on the terminal 110, when the terminal 110 receives a virtual scene creation request, it sends the creation request to the server 120. The server 120 generates a corresponding virtual room according to the creation request and provides corresponding backend logic for the terminal 110. When the terminal 110 receives a recording request, while the application logic of the target application is jointly driven by the terminal 110 and the server 120, the terminal 110 records the object state of the virtual object in the virtual scene and the interaction operation events received by the terminal 110. When the terminal 110 determines that the recording is over, it generates a recording file, and this recording file can be locally saved by the terminal 110 or uploaded to the server 120.

[0043] In some embodiments, when the terminal 110 can complete the application logic offline, the recording process can also be implemented offline, that is, only the terminal 110 completes the application logic of the target application and the recording of the virtual scene.

[0044] Schematically, the terminal 110 and the server 120 are connected through the communication network 130.

[0045] Combined with the above implementation environment, the application scenarios of the data recording method based on virtual scenes provided by this application are schematically described.

[0046] In some embodiments, the data recording method based on virtual scenarios provided in this application can be applied during the application testing process. The target application corresponds to multiple application versions. During the testing process, it is necessary to know the differences between the target applications of different application versions. Therefore, the playback use cases of the target application can be recorded by using the data recording method based on virtual scenarios provided in this application to obtain a recording file, and different playback effects can be obtained by running this recording file on the target applications of different application versions. The test results between versions can be determined based on the above playback effects.

[0047] In some embodiments, the data recording method based on virtual scenarios provided in this application can also be applied to the online playback function of an application. Taking the target application as a game application as an example, the target application provides a playback function, which can be a real-time playback function (such as, death replay), or a delayed playback function (such as, game replay). Taking the realization of death replay as an example, all terminals participating in the game session perform real-time recording of the game session, and upload the recording files obtained by real-time recording to the server at a certain frequency. When the virtual object A in terminal A is killed, the server retrieves the recording file of the virtual object B that killed the virtual object A during the corresponding period, and transfers this recording file to terminal A. Terminal A generates a corresponding playback screen according to the recording file. Taking the realization of game replay as an example, the terminal records the virtual game session, generates a recording file after the virtual game session ends, and uploads the recording file to the server. The server stores this recording file. When the player needs to watch the playback video of this virtual game session again, the server can send the above recording file to the terminal, and the terminal generates a corresponding game replay according to the recording file. And even after the game version is updated, the player can still replay the virtual game sessions of the previous application versions.

[0048] The data recording method based on virtual scenarios provided in this application can also be applied to other application scenarios of application playback, which will not be limited here.

[0049] Please refer to Figure 2 which shows the data recording method based on virtual scenarios shown in an embodiment of this application. In the embodiment of this application, taking this method as an example applied to a terminal as shown in Figure 1 this method includes:

[0050] Step 201, in response to receiving a recording signal, start recording the virtual scenario.

[0051] In some embodiments, the virtual scene described above includes virtual objects. Schematically, the virtual objects are movable objects in the virtual scene. The movable objects can be virtual characters, virtual animals, anime characters, etc. For example, the characters, animals, plants, oil drums, walls, stones, etc. displayed in a three-dimensional virtual scene. Optionally, the virtual objects are three-dimensional solid models created based on animation skeleton technology. Each virtual object has its own shape and volume in the three-dimensional virtual scene and occupies a part of the space in the three-dimensional virtual scene. Optionally, the virtual objects in the virtual scene can be the master virtual objects controlled by the terminal or other virtual objects in the virtual scene, which are not limited herein.

[0052] In some embodiments, the terminal includes a target application for running the virtual scene. The function of completing the recording process of the target application can be implemented by a function module in the target application or by an independent recording application. When the recording process is implemented by an independent recording application, there is data communication between the recording application and the target application.

[0053] In the embodiments of the present application, the case where the recording process is implemented by a function module in the target application is taken as an example for illustration.

[0054] Optionally, the above recording signal can be implemented through a recording control provided in the target application. In one example, the virtual scene interface displayed by the terminal through the target application includes a recording control. When a trigger operation is received on the recording control, it is determined that a recording signal is received. Optionally, when the virtual scene is a scene in a virtual game, the above recording signal can also be determined according to the creation signal of the virtual game. For example, when the terminal receives a virtual game creation operation, it sends a creation request to the server. When the terminal determines that the virtual game is successfully created and successfully enters the virtual game, the recording signal is automatically triggered to record the virtual scene in the virtual game.

[0055] Step 202, during the running of the virtual scene, record the object state of the virtual object to obtain state data.

[0056] The above state data is used to indicate the change situation of the virtual object in the coordinate system corresponding to the virtual scene.

[0057] In some embodiments, the object state of the above virtual object includes at least one of information such as position information, turning information, and posture information. Schematically, the above position information is used to indicate the position of the virtual object in the preset coordinate system corresponding to the virtual scene. In one example, the above position information (Location) is represented by the position coordinates of the virtual object in the world coordinate system of the virtual scene. The above turning information is used to indicate the orientation change of the virtual object in the virtual scene. In one example, the above turning information (Rotation) is represented by the rotation direction of the virtual object in the world coordinate system of the virtual scene. The above posture information is used to indicate the posture of the virtual object in the virtual scene. The above posture includes at least one of a standing posture, a squatting posture, a lying prone posture, a gun-holding posture, etc. Among them, the gun-holding posture is used to indicate the holding state of the virtual prop in the virtual environment.

[0058] Optionally, the above state data is generated through key frames. Among them, the above key frames are data logic frames in the client of the target application, and the object state of the virtual object is included in the key frames. Schematically, during the operation of the virtual scene, key frames are obtained from the running engine of the target application according to the system timing cycle, and state data is generated according to the time sequence of the system timing cycle and the key frames. The above running engine is an engine used to provide functions such as modeling, layout, animation generation, lighting, visual effects, rendering, and synthesis. Optionally, the above running engine includes Unity3D engine, Unreal engine, etc.

[0059] Optionally, the above state information is obtained by recognizing the image frame. Schematically, the terminal obtains the image frame displayed in the current virtual scene interface, recognizes the image frame, and generates state information through the initial image frame and the key frames of the frame change. In one example, an initial image frame is obtained. When the difference between the (i + 1)-th image frame and the i-th image frame exceeds a preset threshold, the (i + 1)-th image frame is output as the key frame for generating state information, and state information is generated through the initial frame, the key frames, and the corresponding timestamps. i is a positive integer. Among them, the difference between the above image frames can be indicated by the different number of pixels in the frame, or can be indicated by the difference in the gray values corresponding to the frame.

[0060] Step 203, in response to receiving an interaction operation event, record the interaction operation event to obtain operation data.

[0061] In some embodiments, the above interaction operation event is an interaction event triggered by the user through an interaction control on the virtual scene interface.

[0062] Schematically, there is a mapping relationship between the interaction control and the interaction event.

[0063] Optionally, an interaction control can correspond to multiple interaction events. Different interaction events corresponding to the same interaction control are triggered by different triggering operations received by the above interaction control. For example, when the attack control in the virtual scene interface receives a click operation, the attack event of the virtual object is triggered. When the attack control receives a long-press operation, the target selection event of the virtual object is triggered; an interaction event can also correspond to multiple interaction controls. For example, an attack control A and an attack control B are respectively displayed in the lower right corner and the upper left corner of the interface in the virtual scene interface. As long as one of the attack controls A and B is triggered, the attack event of the virtual object is triggered.

[0064] In some embodiments, the correspondence between the interaction control and the interaction event is determined by a mapping table pre-stored in the terminal. Illustratively, the above mapping table can come from the server or can be generated by the terminal according to user settings, which is not limited here. Illustratively, after the terminal obtains the mapping table between the interaction control and the interaction event, it is necessary to establish an association relationship between the interaction control and the interaction event on the virtual scene interface. In one example, obtain the target interaction control on the virtual scene interface; obtain the set of interaction events, and the interaction events in the set of interaction events are used to complete the event commands for controlling the virtual object; determine the target interaction event from the set of interaction events; establish an association relationship between the target interaction event and the target interaction control.

[0065] Illustratively, the terminal monitors the target interaction control, and there is a correspondence between the target interaction control and the target interaction event; in response to the target interaction control receiving a trigger signal, obtain the trigger moment corresponding to the trigger signal; generate operation data based on the correspondence between the trigger moment and the target interaction event.

[0066] Step 204, in response to the end of recording, generate a recording file according to the status data and the operation data.

[0067] The above recording file is used for the target application running on at least one application version to play back the scene picture corresponding to the virtual scene.

[0068] Optionally, when the recording control receives a trigger operation again, it is determined that a recording end signal is received, and it is determined that the recording of the virtual scene ends. Optionally, when the virtual scene is a scene in a virtual game, when the virtual game ends, it is determined that the recording of the virtual scene ends.

[0069] Optionally, the terminal locally stores the above recording file. When the terminal receives a playback operation for the above recording file, it reads it and runs the recording file through the target application to display the corresponding playback picture.

[0070] Optionally, the terminal uploads the above recording file to the server, and the server stores it in the database. When the terminal receives a playback operation for the above recording file, it obtains the recording file from the server and runs the recording file through the target application to display the corresponding playback screen.

[0071] Illustratively, when the terminal needs to play back the above recording file, it runs the above recording file through the target application. In one example, the target application parses the recording file to obtain status data and operation data. When the current data logic frame of the target application is consistent with the starting data logic frame in the status data, it starts to play back the status data and plays back the interaction operation events according to the trigger time of the interaction events in the operation data, and displays the corresponding playback screen.

[0072] In summary, the data recording method based on a virtual scene provided by the embodiments of the present application records the object states of virtual objects in the virtual scene and the interaction operation events received by the terminal when it is necessary to play back and record the virtual scene, so as to generate a recording file that can run on a target application with multiple application versions. That is, the recording file is generated by recording the object states of virtual objects and the received interaction operation events. While ensuring accuracy during playback, the compatibility of the recording file on applications with different application versions is improved.

[0073] Please refer to Figure 3 , which shows the data recording method based on a virtual scene shown in an embodiment of the present application. In the embodiment of the present application, the recording process of the recording file is described. The method includes:

[0074] Step 301, display the virtual scene screen.

[0075] Schematically, when the terminal receives an operation to enter a virtual scene, it displays the virtual scene screen through the target application. Optionally, the above virtual scene can be a virtual scene in an independent virtual game, or a real-time virtual scene (such as a game scene in a Massive Multiplayer Online Role-Playing Game (MMORPG)). Optionally, the above virtual scene screen can be a screen displayed from the first-person perspective of the master virtual object, or a screen displayed from the third-person perspective of the master virtual object. Among them, the first-person perspective is the perspective corresponding to the picture that the virtual object can observe in the virtual scene. The picture corresponding to the first-person perspective does not include the master virtual object itself. For example, only the arm of the master virtual object and the virtual item it holds can be seen; the third-person perspective is the perspective of observing the master virtual object through a camera model in the virtual scene. The picture corresponding to the third-person perspective includes the master virtual object itself, and usually the camera model is located behind the master virtual object to observe the virtual object.

[0076] Step 302, in response to receiving a recording signal, perform a response registration operation on the controls in the virtual scene interface through a listener.

[0077] Optionally, the above recording signal can be triggered by a recording control, or can be automatically triggered when the terminal displays the above virtual scene screen.

[0078] In the embodiments of the present application, the above response registration operation is used to instruct the listener to monitor and record the response situation corresponding to the specified interaction control, that is, to register the User Interface (UI) event response. Schematically, the terminal activates the listener, and the listener will monitor and record the trigger operation, trigger time, and interaction event received by the control.

[0079] Step 303, start recording the virtual scene.

[0080] In some embodiments, when recording the virtual scene is started, the recording duration is displayed on the virtual scene interface, and the recording duration is used to indicate the duration of the recorded virtual scene.

[0081] After starting the recording, the terminal will record the object state of the virtual object in the virtual scene, that is, execute Step 304 to Step 305, and monitor and record the interaction operation events, that is, execute Step 306 to Step 308. Among them, Step 304 to Step 305 and Step 306 to Step 308 are executed in parallel.

[0082] Step 304, during the running of the virtual scenario, obtain key frames from the running engine of the target application according to the system timing cycle.

[0083] The above key frames are data logic frames in the client of the target application, and the object states of virtual objects are included in the key frames. The above running engine is an engine for providing functions such as modeling, layout, animation generation, lighting, visual effects, rendering, and synthesis. Optionally, the above running engine includes Unity3D engine, Unreal engine, etc.

[0084] Step 305, generate status data according to the time sequence of the system timing cycle and the key frames.

[0085] In the embodiment of the present application, key frames are obtained through the running engine in the client. The above system timing cycle is a tick cycle, and the tick is a unit of machine timing. Optionally, the above key frames can be all data logic frames within a tick cycle, or the above key frames can be data logic frames extracted with a preset distribution within a tick cycle. For example, there are 100 data logic frames in a tick cycle, and the above key frames are the first data logic frames of every 5 data logic frames.

[0086] Illustratively, the terminal obtains key frames in each tick cycle and generates corresponding status data in chronological order.

[0087] Step 306, monitor the target interaction control.

[0088] In the embodiment of the present application, after the terminal registers a UI event response, it will monitor the registered target interaction controls in the virtual scenario interface.

[0089] In some embodiments, when the virtual scenario interface includes a recording control, the recording control will not be registered as a target interaction control for event response, that is, the trigger operation of the recording control will not be recorded in the operation data.

[0090] Step 307, in response to the target interaction control receiving a trigger signal, obtain the trigger moment corresponding to the trigger signal.

[0091] When it is monitored that the target interaction control receives a trigger signal, the terminal obtains the trigger moment corresponding to the trigger signal. Illustratively, the above trigger moment can be a time stamp relative to the game process of the virtual game, or a time stamp relative to the recording process, which is not limited here.

[0092] Step 308, generate operation data based on the correspondence between the trigger moment and the target interaction event.

[0093] In an embodiment of the present application, the terminal determines a target interaction event corresponding to a target interaction control according to a mapping table between controls and interaction events, and generates operation data based on the target interaction event and the triggering time, that is, an interaction operation event composed of the target interaction event and the triggering time.

[0094] Step 309, in response to the end of recording, generate a recording file according to the status data and the operation data.

[0095] The above-mentioned recording file is used for a target application running on at least one application version to play back the scene picture corresponding to the virtual scene.

[0096] Optionally, when the recording control receives a trigger operation again, it is determined that a recording end signal is received, and it is determined that the recording of the virtual scene ends. Optionally, when the virtual scene is a scene in a virtual game, when the virtual game ends, it is determined that the recording of the virtual scene ends.

[0097] Optionally, the terminal locally stores the above-mentioned recording file. When the terminal receives a playback operation for the above-mentioned recording file, it reads the file and runs the recording file through the target application to display the corresponding playback picture.

[0098] Optionally, the terminal uploads the above-mentioned recording file to the server, and the server stores it in the database. When the terminal receives a playback operation for the above-mentioned recording file, it obtains the recording file from the server, runs the recording file through the target application, and displays the corresponding playback picture.

[0099] Illustratively, when the terminal needs to play back the above-mentioned recording file, it runs the above-mentioned recording file through the target application. In one example, the target application parses the recording file to obtain status data and operation data. When the current data logic frame of the target application is consistent with the starting data logic frame in the status data, the playback of the status data starts, and the interaction operation event is played back according to the triggering time of the interaction event in the operation data, and the corresponding playback picture is displayed.

[0100] In one example, please refer to Figure 4 , which shows the flowchart of the recording process provided by the embodiment of the present application. The process includes: registering UI event response 401; recording the key frame status of the player 402; listening for UI event response 403; determining whether there is a triggered UI event 404. If so, execute 405. If not, execute 403; recording the UI operation time 405; determining whether to end the recording 406. If so, execute 407. If not, execute 402 and 403; saving the key frame and UI event as a recording file 407.

[0101] In summary, the data recording method based on a virtual scene provided by the embodiments of the present application, when it is necessary to perform playback recording on a virtual scene, records the state data of virtual objects through key frames, records operation data by listening to interaction controls, and generates a recording file that can run on a target application of multiple application versions. That is, a recording file is generated by recording the object state of virtual objects and received interaction operation events. When the recording file is played back, while ensuring accuracy, the compatibility of the recording file in applications between different application versions is improved. At the same time, it is possible to achieve playback of the recording file obtained by recording once on multiple application versions, improving the recording efficiency of the recording file in scenarios such as playback.

[0102] Please refer to Figure 5 , which shows the data testing method based on a virtual scene shown in an embodiment of the present application. In the embodiments of the present application, the application of the recording file in testing is described. The following steps 501 to 504 are executed after steps 201 to 204 or steps 301 to 309. The method includes:

[0103] Step 501, obtain the target application of the first application version and the target application of the second application version.

[0104] The target applications of the above first application version and second application version are different versions of the same application. In some embodiments, there are differences in some application logics between the target applications of different application versions. For example, the target application of the second application version is the application after patch update of the target application of the first application version. Among them, the target application of the second application version has optimized the virtual weapon model. Then, the display effects of the same virtual weapon in the target application of the first application version and in the target application of the second application version are different.

[0105] Step 502, load the recording file on the target application of the first application version for playback to obtain first playback data.

[0106] In some embodiments, some application logics in the recording process of the recording file involve random numbers. For example, the camera parameters in the virtual scene. During the playback process, a random number with a fixed seed is used to replace the random number in the recording process. Among them, the above random number with a fixed seed can be a preset fixed number. When a random number is required, this fixed number is used as the random number for application.

[0107] Schematically, during the playback process, it is necessary to keep the playback frame rate consistent with the recording frame rate. In some embodiments, the above playback frame rate and recording frame rate are the frame rates of logical frames. The terminal obtains the recording frame rate information corresponding to the recording file, and sets the playback frame rate information according to the recording frame rate information. The above playback frame rate information is used to control the frame rate of the playback data generated by the running engine.

[0108] Schematically, during the playback process, it is necessary to determine whether the frame time during recording is the same as that during playback. If they are not the same, alignment is required for playback. That is, in response to the playback frame time being the same as the recording frame time, the virtual scene image is played back based on the status information. In response to the playback frame time reaching the trigger moment corresponding to the target interaction event, the interaction event of the virtual object is played back based on the operation data. In response to the playback being completed, the first playback data is generated.

[0109] In one example, as Figure 6 shown, it shows the playback flow chart provided by an exemplary embodiment of the present application. The process includes: loading the recording file 601; replacing the camera random number with a fixed random number 602; setting the playback frame rate to be the same as the recording frame rate 603; starting playback 604; determining whether the current frame time is the same as the recording frame 605. If so, execute 606; if not, execute 604; playing back the key frames 606; triggering the UI button event 607; determining whether all frames and events have been played back 608. If so, end; if not, execute 604.

[0110] Step 503, load the recording file on the target application of the second application version for playback to obtain the second playback data.

[0111] Schematically, the generation process of the second playback data is the same as that of the first playback data, which will not be elaborated here.

[0112] Step 504, compare the first playback data and the second playback data to generate test data.

[0113] Optionally, after both the first playback data and the second playback data are generated, test data is obtained through the comparison of the first playback data and the second playback data. Optionally, after the first playback data is generated, during the generation process of the second playback data, that is, the first playback data and the second playback data are compared to obtain test data.

[0114] In some embodiments, the first playback data and the second playback data are compared to determine the first playback frame and the second playback frame with differences in the first playback data and the second playback data. The above-mentioned first playback frame comes from the first playback data, and the above-mentioned second playback frame comes from the second playback data. In response to the difference situation between the first playback frame and the second playback frame exceeding the first difference threshold, the first playback frame and the second playback frame are determined as difference frame data. Test data is generated based on the difference frame data. In the embodiments of the present application, when the difference between the first playback frame and the second playback frame exceeds the first difference threshold, the first playback frame and the second playback frame are output as difference frame data.

[0115] Optionally, when the above first playback frame and second playback frame are data logic frames, the difference between the above first playback frame and second playback frame can be determined by comparing the frame data differences, and then the above first difference threshold is the threshold of the amount of difference data; when the above first playback frame and second playback frame are image frame data, the difference between the above first playback frame and second playback frame can be determined by comparing the differences between the frame pixels, and then the above first difference threshold is the threshold of the amount of difference pixels / gray values.

[0116] Since when comparing the playback data between two application versions, if any difference will result in the playback frame being output as a difference frame, there will be a large number of false alarms, but no difference can be found by recording the playback video, that is, the false alarm of test data will be caused by the abnormal single-frame comparison result. Therefore, in some embodiments, when there is difference frame data between single frames, the difference between consecutive multiple frames is compared to determine whether it is determined as difference frame data. Schematically, obtain a target number of first playback frames, and the target number of first playback frames are consecutive playback frames; obtain a target number of second playback frames, and the target number of second playback frames are consecutive playback frames, and the frame times of the target number of first playback frames and the frame times of the target number of second playback frames correspond; in response to the existence of differences between the target number of first playback frames and the target number of second playback frames, determine that the difference situation between the target number of first playback frames and the target number of second playback frames exceeds the first difference threshold; determine the target number of first playback frames and the target number of second playback frames as difference frame data.

[0117] In an example, taking the target number as 4 and the generation of difference frame data being detected simultaneously with the generation of the second playback data as an example, during the generation of the second playback data, the generated playback frame is compared with the playback frame corresponding to the first playback data. If there is a difference between the two, then continuously obtain the subsequent 3 playback frames, that is, compare the 4 playback frames in the first playback data and the second playback data respectively. If there are differences between all the consecutive 4 playback frames, then output them as difference frame data.

[0118] In addition, the terminal device and the network may also affect the comparison result, and situations such as the disorder of the key frame data order may occur, resulting in the failure of the comparison between the playback frames in the first playback data and the playback frames in the second playback data. In some embodiments, for the above situation, based on the multi-frame comparison result, a sliding window scheme can also be adopted, that is, on the basis of the existence of differences in consecutive target numbers of playback frames, a fixed-length window is taken to slide forward and backward for comparison. If the data in the window can be matched, then these target numbers of playback frames are considered as matching frame data.

[0119] Schematically, obtain a sliding window of a target length; based on the sliding window and the second playback frames of a target quantity, obtain the sliding playback frames of the target quantity from the second playback data, and the frame distance between the sliding playback frames of the target quantity and the second playback frames of the target quantity is determined by the sliding window; in response to the difference between the first playback frames of the target quantity and the sliding playback frames of the target quantity exceeding a second difference threshold, determine the first playback frames of the target quantity and the second playback frames of the target quantity as difference frame data; in response to the failure of the difference between the first playback frames of the target quantity and the sliding playback frames of the target quantity to match the second difference threshold, determine the first playback frames of the target quantity and the sliding playback frames of the target quantity as matching frame data.

[0120] Wherein, when the above-mentioned first playback frame and second playback frame are data logic frames, the difference between the above-mentioned first playback frame and second playback frame can be determined by comparing the frame data differences, and then the above-mentioned second difference threshold is the threshold of the difference data volume; when the above-mentioned first playback frame and second playback frame are image frame data, the difference between the above-mentioned first playback frame and second playback frame can be determined by comparing the differences between the frame pixels, and then the above-mentioned second difference threshold is the threshold of the difference pixel quantity / gray value.

[0121] In one example, when it is detected that there are differences in playback frames 4 / 5 / 6 / 7 in the first playback data and playback frames 4 / 5 / 6 / 7 in the second playback data, obtain a sliding window with a length of 3. Based on this sliding window, the playback frame combinations that can be obtained from the second playback data include six groups of playback frame combinations: playback frames 1 / 2 / 3 / 4, playback frames 2 / 3 / 4 / 5, playback frames 3 / 4 / 5 / 6, playback frames 5 / 6 / 7 / 8, playback frames 6 / 7 / 8 / 9, and playback frames 7 / 8 / 9 / 10. If there is a group of playback frame combinations (for example, playback frames 5 / 6 / 7 / 8) in the above six groups of playback frame combinations that match the frame data of playback frames 4 / 5 / 6 / 7 in the first playback data, then determine that playback frames 5 / 6 / 7 / 8 in the second playback data and playback frames 4 / 5 / 6 / 7 in the first playback data match, and no difference frame data will be output.

[0122] As Figure 7 shown, it shows a data comparison and error correction flowchart provided by an exemplary embodiment of the present application. Among them, the difference data between the playback data is identified as an error. This process includes: playback frame comparison 701; determining whether there are 4 consecutive frame errors 702. If so, execute 703. If not, execute 701; move the sliding window forward 703; determining whether there is an error 704. If so, execute 705. If not, execute 707; move the sliding window backward 705; determining whether there is an error 706. If so, execute 708. If not, execute 707; ignore the error 707; record the error 708.

[0123] The data testing method based on a virtual scenario provided by an embodiment of the present application can detect differences between target applications of different application versions through the same recording file. Taking the optimization of a virtual weapon model in a second application version based on a first application version as an example, the terminal can play back the recording file and compare the playback data between different application versions to obtain test data. For example, as Figure 8 shown, the differential frame data 800 includes a first playback frame 810 and a second playback frame 820. As shown by the first version virtual weapon model 811 and the second version virtual weapon model 821 in the figure, it can be known through the test data that the weapon model has been updated.

[0124] In the embodiment of the present application, the testing of the target applications of the first application version and the second application version is used as an example for illustration. At the same time, the number of application versions to be tested can also be more than two, which is not limited here.

[0125] In summary, for the data testing method based on a virtual scenario provided by an embodiment of the present application, after obtaining a recording file through the data recording method based on a virtual scenario provided by the present application, playback data is obtained by playing back the recording file in different application versions, and test data is obtained through the comparison result between the playback data, improving the testing efficiency between different application versions and accurately and quantitatively testing the differences between two versions, and can be used to detect problems that are difficult to discover by the naked eye in manual testing, such as character animations, special effect differences, and virtual weapon ballistic differences in game applications.

[0126] Please refer to Figure 9 , which shows a structural block diagram of a data recording device based on a virtual scenario provided by an exemplary embodiment of the present application. The device includes the following modules:

[0127] A recording start module 910, configured to start recording a virtual scenario in response to receiving a recording signal, where the virtual scenario includes virtual objects;

[0128] A data recording module 920, configured to record the object state of the virtual object during the operation of the virtual scenario to obtain state data, where the state data is used to indicate the change of the virtual object in the coordinate system corresponding to the virtual scenario;

[0129] The data recording module 920 is further configured to record the interaction operation event in response to receiving an interaction operation event to obtain operation data;

[0130] A file generation module 930, configured to generate a recording file according to the status data and the operation data in response to the end of recording. The recording file is used for a target application running on at least one application version to play back the scene picture corresponding to the virtual scene, and the target application is used to run the virtual scene.

[0131] In some alternative embodiments, as Figure 10 shown, the data recording module 920 further includes:

[0132] A monitoring unit 921, configured to monitor a target interaction control, where there is a corresponding relationship between the target interaction control and a target interaction event;

[0133] An acquisition unit 922, configured to acquire a trigger moment corresponding to the trigger signal in response to the target interaction control receiving the trigger signal;

[0134] A first generation unit 923, configured to generate the operation data based on the corresponding relationship between the trigger moment and the target interaction event.

[0135] In some alternative embodiments, the data recording module 920 further includes:

[0136] A registration unit 924, configured to perform a response registration operation on the controls in the virtual scene interface through a listener, and the response registration operation is used to instruct the listener to monitor and record the response situation corresponding to a specified interaction control.

[0137] In some alternative embodiments, the acquisition unit 922 is further configured to acquire key frames from the running engine of the target application according to a system timing period during the running of the virtual scene. The key frames are data logic frames in the target application, and the object states of the virtual objects are included in the key frames;

[0138] The first generation unit 923 is further configured to generate the status data according to the time sequence of the system timing period and the key frames.

[0139] In some alternative embodiments, the apparatus further includes:

[0140] An application acquisition module 940, configured to acquire the target application of the first application version and the target application of the second application version;

[0141] A playback generation module 950, configured to load the recording file on the target application of the first application version for playback to obtain first playback data;

[0142] The playback generation module 950 is further configured to load the recorded file on the target application of the second application version for playback to obtain second playback data;

[0143] A test module 960 is configured to compare the first playback data and the second playback data to generate test data.

[0144] In some alternative embodiments, the playback generation module 950 further includes:

[0145] A data acquisition unit 951 is configured to acquire recording frame rate information corresponding to the recorded file;

[0146] A frame rate matching unit 952 is configured to set playback frame rate information according to the recording frame rate information, and the playback frame rate information is used to control the frame rate of the playback data generated by the running engine;

[0147] A state playback unit 953 is configured to, in response to the playback frame time being the same as the recording frame time, perform playback on the virtual scene picture based on the state information;

[0148] An operation playback unit 954 is configured to, in response to the playback frame time reaching the trigger moment corresponding to the target interaction event, perform playback on the interaction event of the virtual object based on the operation data;

[0149] A playback generation unit 955 is configured to generate the first playback data in response to the completion of playback.

[0150] In some alternative embodiments, the test module 960 further includes:

[0151] A difference comparison unit 961 is configured to compare the first playback data and the second playback data to determine a first playback frame and a second playback frame with differences in the first playback data and the second playback data, where the first playback frame comes from the first playback data and the second playback frame comes from the second playback data;

[0152] A difference determination unit 962 is configured to, in response to the difference between the first playback frame and the second playback frame exceeding a first difference threshold, determine the first playback frame and the second playback frame as difference frame data;

[0153] A second generation unit 963 is configured to generate the test data based on the difference frame data.

[0154] In some alternative embodiments, the difference determination unit 962 is further configured to acquire a target number of first playback frames, and the target number of first playback frames is consecutive playback frames;

[0155] The difference determination unit 962 is further configured to obtain a target number of second playback frames, where the target number of second playback frames are consecutive playback frames, and the frame times of the target number of first playback frames correspond to the frame times of the target number of second playback frames;

[0156] The difference determination unit 962 is further configured to, in response to there being differences between the target number of first playback frames and the target number of second playback frames, determine that the difference situation between the target number of first playback frames and the target number of second playback frames exceeds the first difference threshold;

[0157] The difference determination unit 962 is further configured to determine the target number of first playback frames and the target number of second playback frames as the difference frame data.

[0158] In some alternative embodiments, the difference determination unit 962 is further configured to obtain a sliding window of a target length;

[0159] The difference determination unit 962 is further configured to, based on the sliding window and the target number of second playback frames, obtain a target number of sliding playback frames from the second playback data, where the frame distance between the target number of sliding playback frames and the target number of second playback frames is determined by the sliding window;

[0160] The difference determination unit 962 is further configured to, in response to the difference situation between the target number of first playback frames and the target number of sliding playback frames exceeding a second difference threshold, determine the target number of first playback frames and the target number of second playback frames as the difference frame data.

[0161] In some alternative embodiments, the difference determination unit 962 is further configured to, in response to the difference situation between the target number of first playback frames and the target number of sliding playback frames not matching the second difference threshold, determine the target number of first playback frames and the target number of sliding playback frames as matching frame data.

[0162] In summary, the data recording device based on a virtual scene provided in the embodiments of the present application, when it is necessary to perform playback recording on a virtual scene, records the object states of virtual objects in the virtual scene and the interaction operation events received by the terminal, so as to generate a recording file that can run on a target application of multiple application versions. That is, by recording the object states of virtual objects and the received interaction operation events to generate a recording file, while ensuring the accuracy of the recording file during playback, the compatibility of the recording file on applications between different application versions is improved.

[0163] It should be noted that: the data recording device based on virtual scenarios provided in the above embodiments is only illustrated by dividing the above function modules. In practical applications, the above functions can be allocated to different function modules according to needs, that is, the internal structure of the device is divided into different function modules to complete all or part of the functions described above. In addition, the data recording device based on virtual scenarios provided in the above embodiments and the embodiments of the data recording method based on virtual scenarios belong to the same concept. For the specific implementation process, please refer to the method embodiments and will not be elaborated here.

[0164] Figure 11 FIG. shows a schematic structural diagram of a server provided by an exemplary embodiment of the present application. Specifically, it includes the following structure.

[0165] The server 1100 includes a central processing unit (CPU) 1101, a system memory 1104 including a random access memory (RAM) 1102 and a read-only memory (ROM) 1103, and a system bus 1105 connecting the system memory 1104 and the central processing unit 1101. The server 1100 also includes a mass storage device 1106 for storing an operating system 1113, application programs 1114, and other program modules 1115.

[0166] The mass storage device 1106 is connected to the central processing unit 1101 through a mass storage controller (not shown) connected to the system bus 1105. The mass storage device 1106 and its associated computer-readable medium provide non-volatile storage for the server 1100. That is to say, the mass storage device 1106 can include computer-readable media (not shown) such as a hard disk or a compact disc read-only memory (CD-ROM) drive.

[0167] Without loss of generality, computer-readable media can include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes RAM, ROM, erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other solid-state storage technologies, CD-ROM, digital versatile disc (DVD) or other optical storage, magnetic tape cartridges, magnetic tape, disk storage or other magnetic storage devices. Of course, those skilled in the art will know that computer storage media is not limited to the above several types. The above-mentioned system memory 1104 and mass storage device 1106 can be collectively referred to as memory.

[0168] According to various embodiments of the present application, the server 1100 can also run on a remote computer on the network through a network such as the Internet. That is, the server 1100 can be connected to the network 1112 through the network interface unit 1111 connected to the system bus 1105, or rather, the network interface unit 1111 can also be used to connect to other types of networks or remote computer systems (not shown).

[0169] The above-mentioned memory further includes one or more programs, and one or more programs are stored in the memory and configured to be executed by the CPU.

[0170] Embodiments of the present application also provide a computer device, which includes a processor and a memory. At least one instruction, at least one program, a code set or an instruction set is stored in the memory, and at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor to implement the data recording method of the virtual scene provided by the above-mentioned method embodiments. Optionally, the computer device can be a terminal or a server.

[0171] Embodiments of the present application also provide a computer-readable storage medium, on which at least one instruction, at least one program, a code set or an instruction set is stored, and at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor to implement the data recording method of the virtual scene provided by the above-mentioned method embodiments.

[0172] Embodiments of the present application also provide a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data recording method of the virtual scene described in any one of the above embodiments.

[0173] Optionally, the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), solid state drive (SSD, Solid State Drives), or optical disc, etc. Among them, the random access memory may include resistive random access memory (ReRAM, Resistance Random Access Memory) and dynamic random access memory (DRAM, Dynamic Random Access Memory). The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0174] Those of ordinary skill in the art can understand that all or part of the steps for implementing the above embodiments can be completed by hardware, or can be completed by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and the above-mentioned storage medium can be read-only memory, a magnetic disk, or an optical disc, etc.

[0175] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A data recording method based on a virtual scenario, characterized in that, The method includes: In response to receiving a recording signal, start recording a virtual scene, where the virtual scene includes virtual objects; During the running process of the virtual scene, record the object states of the virtual objects to obtain state data, where the state data is used to indicate the changes of the virtual objects in the coordinate system corresponding to the virtual scene; In response to receiving an interaction operation event, record the interaction operation event to obtain operation data; In response to the end of recording, generate a recording file according to the state data and the operation data, where the recording file is used to play back the scene picture corresponding to the virtual scene in a target application running on at least one application version, and the target application is used to run the virtual scene; Obtain the target application of the first application version and the target application of the second application version; Load the recording file on the target application of the first application version for playback to obtain first playback data; load the recording file on the target application of the second application version for playback to obtain second playback data; Compare the first playback data and the second playback data to determine the first playback frame and the second playback frame with differences, where the first playback frame comes from the first playback data and the second playback frame comes from the second playback data; In response to the differences between the continuous target number of first playback frames and the continuous target number of second playback frames all exceeding a first difference threshold, determine the target number of first playback frames and the target number of second playback frames as difference frame data, where the first difference threshold is a difference pixel amount threshold or a gray value threshold; the frame time of the first playback frame corresponds to the frame time of the second playback frame; Generate test data based on the difference frame data.

2. The method according to claim 1, wherein The step of, in response to receiving an interaction operation event, recording the interaction operation event to obtain operation data includes: Monitor a target interaction control, where there is a corresponding relationship between the target interaction control and a target interaction event; In response to the target interaction control receiving a trigger signal, obtain the trigger moment corresponding to the trigger signal; Generate the operation data based on the corresponding relationship between the trigger moment and the target interaction event.

3. The method according to claim 2, wherein Before the step of monitoring a target interaction control, where there is a corresponding relationship between the target interaction control and a target interaction event, further includes: Perform a response registration operation on the controls in the virtual scene interface through a listener, where the response registration operation is used to instruct the listener to monitor and record the response situation corresponding to the specified interaction control.

4. The method according to any one of claims 1 to 3, characterized in that, The step of, during the running process of the virtual scene, recording the object states of the virtual objects to obtain state data includes: During the running process of the virtual scene, obtain key frames from the running engine of the target application according to the system timing cycle, where the key frames are data logic frames in the target application, and the key frames include the object states of the virtual objects; Generate the state data according to the time sequence of the system timing cycle and the key frames.

5. The method according to any one of claims 1 to 3, characterized in that Loading the recorded file on the target application of the first application version for playback to obtain first playback data, including: Obtaining the recording frame rate information corresponding to the recorded file; Setting the playback frame rate information according to the recording frame rate information, where the playback frame rate information is used to control the frame rate of the playback data generated by the running engine; In response to the playback frame time being the same as the recording frame time, playing back the virtual scene image based on the status data; In response to the playback frame time reaching the trigger moment corresponding to the target interaction event, playing back the interaction event of the virtual object based on the operation data; In response to the completion of playback, generating the first playback data.

6. The method according to claim 1, wherein Determining the target number of first playback frames and the target number of second playback frames as the differential frame data, including: Obtaining a sliding window of a target length; Based on the sliding window and the target number of second playback frames, obtaining the target number of sliding playback frames from the second playback data, where the frame distance between the target number of sliding playback frames and the target number of second playback frames is determined by the sliding window; In response to the difference between the target number of first playback frames and the target number of sliding playback frames exceeding a second difference threshold, determining the target number of first playback frames and the target number of second playback frames as the differential frame data.

7. The method according to claim 6, wherein The method further includes: In response to the difference between the target number of first playback frames and the target number of sliding playback frames not matching the second difference threshold, determining the target number of first playback frames and the target number of sliding playback frames as the matching frame data.

8. A data recording device based on a virtual scenario, characterized in that, The device includes: A recording start module, configured to start recording the virtual scene in response to receiving a recording signal, where the virtual scene includes virtual objects; A data recording module, configured to record the object status of the virtual object during the operation of the virtual scene to obtain status data, where the status data is used to indicate the change of the virtual object in the coordinate system corresponding to the virtual scene; The data recording module is further configured to record the interaction operation event in response to receiving an interaction operation event to obtain operation data; A file generation module, configured to generate a recording file according to the status data and the operation data in response to the end of recording. The recording file is used for a target application running on at least one application version to play back the scene images corresponding to the virtual scene, and the target application is used to run the virtual scene; obtain the target application of the first application version and the target application of the second application version; load the recording file on the target application of the first application version for playback to obtain first playback data; load the recording file on the target application of the second application version for playback to obtain second playback data; compare the first playback data and the second playback data to determine the first playback frame and the second playback frame with differences, where the first playback frame comes from the first playback data and the second playback frame comes from the second playback data; in response to the difference situation between the continuous target number of first playback frames and the continuous target number of second playback frames exceeding the first difference threshold, determine the target number of first playback frames and the target number of second playback frames as difference frame data, and the first difference threshold is a difference pixel amount threshold or a gray value threshold; the frame time of the first playback frame corresponds to the frame time of the second playback frame; generate test data based on the difference frame data.

9. A computer device, characterized in that, The computer device includes a processor and a memory, and at least one program is stored in the memory. The at least one program is loaded and executed by the processor to implement the virtual scene-based data recording method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, At least one program code is stored in the computer-readable storage medium. The program code is loaded and executed by the processor to implement the virtual scene-based data recording method according to any one of claims 1 to 7.

11. A computer program product, characterized in that, It includes computer instructions, and when the computer instructions are executed by the processor, the virtual scene-based data recording method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Virtual object control method, device and equipment and storage medium

    CN112245921A

  • Application program testing method and device, equipment and storage medium

    CN112988552A

  • Data processing method and device, computer equipment and storage medium

    CN113018853A