Data processing method and device based on virtual engine, equipment and medium
Patent Information
- Application Number
- CN202311136785.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-01
- Publication Date
- 2025-03-04
AI Technical Summary
Traditional application development programs monitor all objects in the virtual engine through the view layer framework, resulting in excessive memory consumption, resulting in lag or crash in the application development program, and wasting computer hardware resources.
Through the view layer framework in the application development program, actively obtain the target virtual object selected by the developer from the virtual engine, serialize it into the target data object in plain text format, and render it in the data object display area to avoid automatically monitoring all objects in the virtual engine.
It saves the memory consumption of application development programs, improves the fluency and stability of application development programs, and avoids the waste of computer hardware resources.
Smart Images

Figure CN119548813A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method, device, equipment and medium based on a virtual engine. Background Art
[0002] The application development program is a tool that helps developers develop and debug target applications conveniently and efficiently. Developers can edit and preview the target application being developed in the application development program. For example, if a game developer is developing a game application, the game developer can edit and preview the game being developed in the application development program. The application development program can help game developers develop and debug the game being developed conveniently and efficiently.
[0003] In the conventional technology, the data changes of all objects in the virtual engine of the application development program are monitored through the view layer framework in the application development program, and the content displayed in the application development program is updated through the changed objects. However, monitoring all objects in the virtual engine through the view layer framework consumes a lot of memory, which easily causes the application development program to freeze or crash, thereby wasting the computer hardware resources used to support the application development program. Summary of the invention
[0004] Based on this, it is necessary to provide a data processing method, device, equipment and medium based on a virtual engine that can avoid wasting computer hardware resources used to support application development programs in order to address the above technical problems.
[0005] In a first aspect, the present application provides a data processing method based on a virtual engine, the method comprising:
[0006] Displaying a virtual scene screen through a view layer framework in an application development program; the virtual scene screen is a screen of a virtual scene obtained by instantiating resources of a target application by a virtual engine in the application development program, and the virtual scene includes at least one virtual object;
[0007] In response to an object selection operation on the virtual scene picture, collecting, from the virtual engine, a target virtual object selected by the object selection operation in the virtual scene through the view layer framework;
[0008] The target virtual object is serialized through the view layer framework to obtain a target data object; the target data object includes attribute data of at least one attribute item;
[0009] A data object display area associated with the target data object is displayed through the view layer framework, and the property data of the at least one property item is displayed in the data object display area.
[0010] In a second aspect, the present application provides a data processing device based on a virtual engine, the device comprising:
[0011] A virtual engine, used to instantiate the resources of the target application to obtain a virtual scene picture; the virtual scene picture is a picture of a virtual scene obtained by instantiating the resources of the target application, and the virtual scene includes at least one virtual object;
[0012] A view layer framework is used to display a virtual scene picture; in response to an object selection operation on the virtual scene picture, collect a target virtual object selected by the object selection operation in the virtual scene from the virtual engine; serialize the target virtual object to obtain a target data object; the target data object includes attribute data of at least one attribute item; and display a data object display area associated with the target data object, wherein the attribute data of the at least one attribute item is displayed in the data object display area.
[0013] In one embodiment, the view layer framework records the object mapping relationship between data objects and virtual objects; the view layer framework is also used to respond to an update operation on the data object display area, determine the update content for the target data object, determine the target virtual object having the object mapping relationship with the target data object, and instruct the virtual engine to update the target virtual object according to the update content.
[0014] In one embodiment, the view layer framework is also used to respond to an update operation on a target attribute item in the data object display area, obtain the target attribute data indicated by the update operation, and update the attribute data of the target attribute item in the target data object to the target attribute data; determine the target virtual object that has the object mapping relationship with the target data object, and send an update instruction to the virtual engine; the update instruction is used to indicate the target virtual object, the target attribute item and the target attribute data; the virtual engine is also used to determine the target attribute item in the target virtual object in response to the update instruction, and update the attribute data of the target attribute item to the target attribute data.
[0015] In one embodiment, the view layer framework is also used to determine a serialization mapping table; when the object mapping relationship between the target data object and the target virtual object is not recorded in the serialization mapping table, the object mapping relationship between the target data object and the target virtual object is written into the serialization mapping table; when the object mapping relationship between the target data object and the target virtual object is recorded in the serialization mapping table, the step of displaying the data object display area associated with the target data object is executed.
[0016] In one embodiment, the virtual engine is also used to obtain the scene script code corresponding to the virtual scene screen; the scene script code includes the object script code corresponding to the at least one virtual object; through the virtual engine, in response to the script update operation for any of the object script codes, the virtual object corresponding to the object script code is updated.
[0017] In one embodiment, the view layer framework is also used to re-collect the target virtual object from the virtual engine once every preset time interval, and execute the step of serializing the target virtual object to obtain the target data object.
[0018] In one embodiment, the view layer framework includes a conversion component, a data model and a view component; serialization of the target virtual object is performed through the conversion component; the view layer framework is also used to obtain the attribute data of at least one attribute item included in the target data object from the conversion component through the data model when the conversion component serializes the target virtual object into a target data object; through the view component, a data object display area corresponding to the target data object is displayed, and the attribute data of at least one attribute item in the data model is displayed in the data object display area.
[0019] In one embodiment, the view layer framework is also used to display a virtual object node tree; the virtual object node tree includes at least one node, each node represents a virtual object in the virtual scene; in response to the object selection operation on the virtual scene screen, the target virtual object is obtained, in the virtual object node tree, the node representing the target virtual object is selected.
[0020] In one embodiment, the data object display area is displayed in an operation interface provided by the view layer framework, the virtual scene screen is displayed in a screen preview area of the operation interface, the virtual object node tree is displayed in a virtual object operation area of the operation interface, and the screen preview area is located between the data object display area and the virtual object operation area.
[0021] In one embodiment, the view layer framework is also used to determine a selected virtual object in response to a selection operation on a node in the virtual object node tree; associate the selected virtual object with the data object display area, and update the attribute data of at least one attribute item displayed in the data object display area to the attribute data of at least one attribute item of the selected virtual object.
[0022] In one embodiment, the view layer framework is also used to respond to an object selection operation on the virtual scene screen, obtain the screen element selected by the object selection operation from the virtual scene screen, and notify the virtual engine; and collect the target virtual object indicated by the screen element in the virtual scene from the virtual engine.
[0023] In one embodiment, the application development program is a game application development program; the virtual engine is a game engine; the target application is a target game application; the virtual scene screen is a game scene screen; the virtual scene is a game scene; and the virtual object is a game object.
[0024] In a third aspect, the present application provides a computer device including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps in the method embodiments of the present application are implemented.
[0025] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the method embodiments of the present application.
[0026] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the steps in the method embodiments of the present application when the computer program is executed by a processor.
[0027] The above-mentioned data processing method, device, equipment, medium and computer program product based on the virtual engine display a virtual scene screen through the view layer framework in the application development program; the virtual scene screen is a screen of a virtual scene obtained by instantiating the resources of the target application by the virtual engine in the application development program, and the virtual scene includes at least one virtual object. Through the view layer framework, in response to the object selection operation on the virtual scene screen, the target virtual object selected by the object selection operation in the virtual scene is collected from the virtual engine. Through the view layer framework, the target virtual object is serialized to obtain a target data object; the target data object includes attribute data of at least one attribute item. Through the view layer framework, a data object display area associated with the target data object is displayed, and attribute data of at least one attribute item is displayed in the data object display area. Compared with the traditional method of automatically monitoring all objects in the virtual engine through the view layer framework, the present application actively obtains the target virtual object selected by the developer from the virtual engine through the view layer framework, serializes the target virtual object into a target data object in plain text format, and renders and displays the attribute data of the attribute items included in the target data object, thereby avoiding the view layer framework from automatically adding monitoring tasks to objects in the virtual engine, saving the memory consumption of the application development program, and improving the fluency and stability of the application development program, thereby avoiding the waste of computer hardware resources used to support the application development program. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 An application environment diagram of a data processing method based on a virtual engine in one embodiment;
[0029] Figure 2 A flowchart of a data processing method based on a virtual engine in one embodiment;
[0030] Figure 3 A schematic diagram of the basic structure of an application development program in one embodiment;
[0031] Figure 4 A schematic diagram of the principle of a data processing method based on a virtual engine in a conventional technology in an embodiment;
[0032] Figure 5 A schematic diagram of the principle of a data processing method based on a virtual engine in the present application in one embodiment;
[0033] Figure 6 A timing diagram for updating virtual objects in a virtual engine through a view layer framework in one embodiment;
[0034] Figure 7 A schematic diagram of a process of displaying data by a view component according to a data model in an embodiment;
[0035] Figure 8 A schematic diagram of the updating and collecting process of virtual objects in a virtual engine in one embodiment;
[0036] Fig. 9 is an interaction sequence diagram of a virtual engine and a view layer framework in one embodiment;
[0037] Fig.10 A schematic diagram of a virtual object node tree in one embodiment;
[0038] Fig.11 A schematic diagram of an operation interface provided by a view layer framework in one embodiment;
[0039] Fig.12 A flowchart of a data processing method based on a virtual engine in another embodiment;
[0040] Fig.13 is a structural block diagram of a data processing device based on a virtual engine in one embodiment;
[0041] Fig.14 is a structural block diagram of a data processing device based on a virtual engine in another embodiment;
[0042] Fig.15 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0044] The data processing method based on the virtual engine provided in this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can be set up separately and can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other servers. Among them, the terminal 102 can be, but is not limited to, various desktop computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, cloud security, host security and other network security services, CDN, and basic cloud computing services such as big data and artificial intelligence platforms. The terminal 102 and the server 104 can be directly or indirectly connected by wired or wireless communication, and this application is not limited here.
[0045] The terminal 102 can display a virtual scene screen through the view layer framework in the application development program; the virtual scene screen is a screen of a virtual scene obtained by instantiating the resources of the target application by the virtual engine in the application development program, and the virtual scene includes at least one virtual object. The terminal 102 can collect the target virtual object selected by the object selection operation in the virtual scene from the virtual engine through the view layer framework in response to the object selection operation on the virtual scene screen. The terminal 102 can serialize the target virtual object through the view layer framework to obtain the target data object; the target data object includes the attribute data of at least one attribute item. The terminal 102 can display the data object display area associated with the target data object through the view layer framework, and display the attribute data of at least one attribute item in the data object display area.
[0046] It is understood that the target application resources may be stored in the memory of the terminal 102, and the terminal 102 may directly obtain the target application resources from the local memory so that the virtual engine in the application development program instantiates the target application resources. It is understood that the terminal 102 may also obtain the target application resources from the server 104 so that the virtual engine in the application development program instantiates the target application resources. This embodiment does not limit this, and it is understood that Figure 1 The application scenarios are only for illustration and are not limited to this.
[0047] In one embodiment, Figure 2 As shown, a data processing method based on a virtual engine is provided. In this embodiment, the method is applied to Figure 1 The terminal 102 in the example is used as an example to illustrate, and the following steps are included:
[0048] Step 202, displaying a virtual scene screen through a view layer framework in the application development program; the virtual scene screen is a screen of a virtual scene obtained by instantiating resources of a target application by a virtual engine in the application development program, and the virtual scene includes at least one virtual object.
[0049] Among them, the application development program is an application program used to develop a target application. It can be understood that the target application is an application to be developed. The application development program is a tool program that helps application developers to develop and debug target applications conveniently and efficiently. Application developers can edit and preview target applications in the application development program. The application development program includes a virtual engine and a view layer framework. The virtual engine is a software system that is used to create, simulate and operate virtual environments and virtual experiences. The virtual engine provides a set of tools and functions that enable application developers to build virtual scenes and virtual objects. It can be understood that the virtual engine is used to achieve a highly realistic or immersive virtual experience. The view layer framework is a front-end framework for building interactive user interfaces.
[0050] The virtual scene screen is the screen of the virtual scene obtained by instantiating the resources of the target application in the virtual engine of the application development program. The virtual scene includes at least one virtual object. It can be understood that the virtual scene is a virtual scene located in a three-dimensional space. The virtual scene screen is a screen located in a two-dimensional space obtained by observing the virtual scene from any viewpoint. Instantiating the resources of the target application into a virtual scene means organizing and arranging the various resources used in the development process of the target application, such as character models, scene backgrounds, props, sound effects, etc., in the virtual world to present a complete virtual scene.
[0051] Specifically, an application development program may be deployed on the terminal, and the application development program includes a virtual engine and a view layer framework. The terminal may instantiate the resources of the target application to be developed into a virtual scene including at least one virtual object through the virtual engine in the application development program to obtain a virtual scene screen. Furthermore, the terminal may display the virtual scene screen through the view layer framework in the application development program.
[0052] Step 204 : In response to the object selection operation on the virtual scene image, the target virtual object selected by the object selection operation in the virtual scene is collected from the virtual engine through the view layer framework.
[0053] The object selection operation is a trigger operation for selecting a target virtual object from at least one virtual object in the virtual scene. The target virtual object is a virtual object selected by the object selection operation from at least one virtual object in the virtual scene.
[0054] Specifically, the application developer can perform an object selection operation on the displayed virtual scene picture. The terminal can respond to the application developer's object selection operation on the virtual scene picture through the view layer framework, determine the target virtual object selected by the object selection operation from at least one virtual object of the virtual scene by the virtual engine, and collect the target virtual object.
[0055] In one embodiment, the terminal can obtain the object identifier selected by the object selection operation in response to the object selection operation on the virtual scene through the view layer framework, and notify the virtual engine. Furthermore, the terminal can collect the target virtual object indicated by the selected object identifier in the virtual scene from the virtual engine through the view layer framework.
[0056] Step 206: serialize the target virtual object through the view layer framework to obtain a target data object; the target data object includes attribute data of at least one attribute item.
[0057] Among them, the target virtual object is an object in a structured format. It can be understood that based on the target virtual object, all virtual objects in the virtual object tree to which the target virtual object belongs, as well as various attribute items of the virtual objects, can be automatically traversed and automatically monitored. The virtual object tree includes at least one virtual object. However, automatically traversing and monitoring all objects in the virtual engine through the view layer framework requires a lot of memory consumption, which can easily cause the application development program to freeze or crash, thereby resulting in a waste of computer hardware resources used to support the application development program.
[0058] The target data object is an object in a plain text format. The target data object includes attribute data of at least one attribute item. It is understandable that after the target virtual object is serialized into the target data object, automatic traversal and automatic monitoring are not supported. This avoids the view layer framework automatically adding monitoring tasks to objects in the virtual engine, saves the memory consumption of the application development program, improves the fluency and stability of the application development program, and thus avoids the waste of computer hardware resources used to support the application development program.
[0059] Specifically, the terminal can serialize the target virtual object in a structured format into a target data object in a plain text format through the view layer framework. It can be understood that the target data object in a plain text format includes attribute data of at least one attribute item.
[0060] In one embodiment, the plain text format includes the json (data exchange) format. Specifically, the terminal can serialize the target virtual object in the structured format into a target data object in the json format through the view layer framework. The target data object in the json format includes attribute data of at least one attribute item. For example, a target data object, such as "flower", can be represented as follows: {"entity": [{"name":"sunflower","color":"yellow"}]}, it can be understood that the target data object "flower" includes two attribute items "name" and "color", the attribute data of the attribute item "name" is "sunflower", and the attribute data of the attribute item "color" is "yellow".
[0061] Step 208: displaying a data object display area associated with the target data object through the view layer framework, and displaying attribute data of at least one attribute item in the data object display area.
[0062] The data object display area is a visualization area for displaying data objects. It can be understood that a data object includes at least one attribute item of attribute data, and the data object display area can be used to display the at least one attribute item of attribute data included in the data object.
[0063] In one embodiment, the terminal can display the data object display area associated with the target data object through the operation interface provided by the view layer framework, and display the attribute data of at least one attribute item included in the target data object in the data object display area associated with the target data object. The operation interface provided by the view layer framework is a visual interactive interface.
[0064] In the above-mentioned data processing method based on the virtual engine, a virtual scene screen is displayed through a view layer framework in an application development program; the virtual scene screen is a screen of a virtual scene obtained by instantiating resources of a target application by a virtual engine in the application development program, and the virtual scene includes at least one virtual object. Through the view layer framework, in response to an object selection operation on the virtual scene screen, a target virtual object selected by the object selection operation in the virtual scene is collected from the virtual engine. Through the view layer framework, the target virtual object is serialized to obtain a target data object; the target data object includes attribute data of at least one attribute item. Through the view layer framework, a data object display area associated with the target data object is displayed, and attribute data of at least one attribute item is displayed in the data object display area. Compared with the traditional method of automatically monitoring all objects in the virtual engine through the view layer framework, the present application actively obtains the target virtual object selected by the developer from the virtual engine through the view layer framework, serializes the target virtual object into a target data object in plain text format, and renders and displays the attribute data of the attribute items included in the target data object, thereby avoiding the view layer framework from automatically adding monitoring tasks to objects in the virtual engine, saving the memory consumption of the application development program, and improving the fluency and stability of the application development program, thereby avoiding the waste of computer hardware resources used to support the application development program.
[0065] In one embodiment, the view layer framework records the object mapping relationship between the data object and the virtual object; the method also includes: through the view layer framework, in response to an update operation on the data object display area, determining the update content for the target data object, determining the target virtual object having an object mapping relationship with the target data object, and instructing the virtual engine to update the target virtual object according to the update content.
[0066] Specifically, the object mapping relationship between the data object and the virtual object is pre-recorded in the view layer framework. The application developer can perform an update operation in the data object display area. The terminal can determine the update content for the target data object in response to the application developer's update operation on the data object display area through the view layer framework. Furthermore, the terminal can determine the target virtual object that has an object mapping relationship with the target data object based on the object mapping relationship between the data object and the virtual object pre-recorded in the view layer framework, and instruct the virtual engine to update the target virtual object according to the update content.
[0067] In one embodiment, the terminal can determine the update content for the target data object in response to the update operation for the target data object in the data object display area through the view layer framework. It can be understood that the update content for the target data object can specifically include deleting the target data object. The terminal can determine the target virtual object having an object mapping relationship with the target data object through the view layer framework, and send an update instruction for indicating the target virtual object to the virtual engine. The terminal can determine the target virtual object in response to the update instruction through the virtual engine, and delete the target virtual object.
[0068] In one embodiment, Figure 3 As shown, the application development program includes a virtual engine and a view layer framework. The terminal can display a virtual scene screen through the view layer framework in the application development program, wherein the virtual scene screen is a screen of a virtual scene obtained by instantiating the resources of the target application by the virtual engine in the application development program, and the virtual scene includes at least one virtual object. The terminal can collect the target virtual object selected by the object selection operation in the virtual scene from the virtual engine through the view layer framework in response to the object selection operation on the virtual scene screen. The terminal can serialize the target virtual object through the view layer framework to obtain the target data object, wherein the target data object includes the attribute data of at least one attribute item. The terminal can display the data object display area associated with the target data object through the view layer framework, and display the attribute data of at least one attribute item in the data object display area. It can be understood that the application developer can perform an update operation in the data object display area provided by the view layer framework. The terminal can determine the update content for the target data object through the view layer framework in response to the application developer's update operation on the data object display area. Furthermore, the terminal can determine the target virtual object having an object mapping relationship with the target data object according to the object mapping relationship between the data object and the virtual object pre-recorded in the view layer framework, and instruct the virtual engine to update the target virtual object according to the updated content.
[0069] In the above embodiment, in response to the update operation on the data object display area, the update content for the target data object is determined through the view layer framework, the target virtual object having an object mapping relationship with the target data object is determined, and the virtual engine is instructed to update the target virtual object according to the update content. In this way, the update of the target virtual object is directly realized in a visual way, which can improve the update efficiency of the virtual object, thereby avoiding the waste of computer hardware resources used to support the application development program.
[0070] In one embodiment, through the view layer framework, in response to an update operation on a data object display area, the update content for the target data object is determined, the target virtual object having an object mapping relationship with the target data object is determined, and the virtual engine is instructed to update the target virtual object according to the update content, including: through the view layer framework, in response to an update operation on a target attribute item in the data object display area, the target attribute data indicated by the update operation is obtained, and the attribute data of the target attribute item in the target data object is updated to the target attribute data; through the view layer framework, the target virtual object having an object mapping relationship with the target data object is determined, and an update instruction is sent to the virtual engine; the update instruction is used to indicate the target virtual object, the target attribute item and the target attribute data; through the virtual engine, in response to the update instruction, the target attribute item in the target virtual object is determined, and the attribute data of the target attribute item is updated to the target attribute data.
[0071] The target attribute item is the attribute item in the data object display area that is acted upon by the update operation. The target attribute data is the attribute data obtained after the attribute data of the target attribute item is updated.
[0072] Specifically, the application developer can perform an update operation on the target attribute item in the data object display area. The terminal can obtain the target attribute data of the target attribute item indicated by the update operation through the view layer framework in response to the update operation of the application developer on the target attribute item in the data object display area, and update the attribute data of the target attribute item in the target data object to the updated target attribute data. The terminal can determine the target virtual object having an object mapping relationship with the target data object according to the object mapping relationship between the data object and the virtual object pre-recorded in the view layer framework, and send an update instruction to the virtual engine. It can be understood that the update instruction is used to indicate the target virtual object, the target attribute item and the target attribute data. Furthermore, the terminal can determine the target attribute item in the target virtual object indicated by the update instruction through the virtual engine in response to the update instruction, and update the attribute data of the target attribute item to the updated target attribute data in the data object display area.
[0073] In one embodiment, Figure 4As shown, in the conventional technology, the application development program includes a virtual engine and a view layer framework, and the view layer framework includes a data model and a view component. The terminal can pass the root node in the virtual object node tree to the data model through the virtual engine, wherein the virtual object node tree includes at least one node, and each node represents a virtual object in the virtual scene. The data model can traverse each node from the root node, and traverse the attribute items of each node to increase the monitoring of data changes for each node, such as monitoring the addition or deletion of virtual objects, and the update of the attribute data of the attribute items of the virtual objects. When the attribute data of the node or attribute item changes, the data model will automatically notify the view component to automatically update the display content of the operation interface. In addition, the application developer can also perform an update operation for the virtual object in the operation interface, so as to update the virtual object in the virtual engine in a visual way. However, the traditional way of automatically monitoring all objects in the virtual engine through the view layer framework, monitoring all virtual objects in the virtual engine through the view layer framework, and all attributes of the virtual objects, requires a lot of memory consumption, which is easy to cause the application development program to freeze or crash, thereby resulting in a waste of computer hardware resources used to support the application development program.
[0074] In one embodiment, Figure 5 As shown, the application development program includes a virtual engine and a view layer framework, and the view layer framework includes a conversion component, a data model and a view component. The present application is based on a data processing method of a virtual engine, and displays a virtual scene screen through the view component of the view layer framework in the application development program, wherein the virtual scene screen is a screen of a virtual scene obtained by instantiating the resources of a target application by the virtual engine in the application development program, and the virtual scene includes at least one virtual object. Through the data model in the view layer framework, in response to an object selection operation for the virtual scene screen, the target virtual object selected by the object selection operation in the virtual scene is collected from the virtual engine. Through the conversion component in the view layer framework, the target virtual object is serialized to obtain a target data object, wherein the target data object includes attribute data of at least one attribute item. Through the view layer framework, a data object display area associated with the target data object is displayed, and attribute data of at least one attribute item is displayed in the data object display area. Compared with the traditional method of automatically monitoring all objects in the virtual engine through the view layer framework, the present application actively obtains the target virtual object selected by the developer from the virtual engine through the view layer framework, serializes the target virtual object into a target data object in plain text format, and renders and displays the attribute data of the attribute items included in the target data object, thereby avoiding the view layer framework automatically adding monitoring tasks to the virtual objects in the virtual engine and the attributes of the virtual objects, saving the memory consumption of the application development program, and improving the fluency and stability of the application development program, thereby avoiding the waste of computer hardware resources used to support the application development program.
[0075] In one embodiment, Figure 6 As shown, the application development program includes a virtual engine and a view layer framework. The object mapping relationship between the data object and the virtual object is pre-recorded in the view layer framework. The terminal can obtain the target attribute data of the target attribute item indicated by the update operation through the view layer framework in response to the update operation on the target attribute item in the data object display area, and update the attribute data of the target attribute item in the target data object to the updated target attribute data. The terminal can determine the target virtual object having an object mapping relationship with the target data object according to the object mapping relationship between the data object and the virtual object pre-recorded in the view layer framework, and send an update instruction to the virtual engine. Among them, the update instruction is used to indicate the target virtual object, the target attribute item and the target attribute data. Furthermore, the terminal can determine the target attribute item in the target virtual object indicated by the update instruction through the virtual engine in response to the update instruction, and update the attribute data of the target attribute item to the updated target attribute data in the data object display area.
[0076] In the above embodiment, in response to the update operation of the target attribute item in the data object display area, the target attribute data indicated by the update operation is obtained through the view layer framework, and the attribute data of the target attribute item in the target data object is updated to the target attribute data. Then, through the view layer framework, the target virtual object having an object mapping relationship with the target data object is determined, and through the virtual engine, the attribute data of the target attribute item in the target virtual object is updated to the target attribute data. In this way, the update of the attribute data in the target virtual object is directly realized in a visual manner, which can improve the update efficiency of the attribute data in the virtual object, thereby further avoiding the waste of computer hardware resources used to support application development programs.
[0077] In one embodiment, the method also includes: determining a serialization mapping table through a view layer framework; when the object mapping relationship between the target data object and the target virtual object is not recorded in the serialization mapping table, writing the object mapping relationship between the target data object and the target virtual object into the serialization mapping table; when the object mapping relationship between the target data object and the target virtual object is recorded in the serialization mapping table, executing the step of displaying a data object display area associated with the target data object through the view layer framework.
[0078] The serialization mapping table is a table file used to record the object mapping relationship between data objects and virtual objects in the view layer framework.
[0079] Specifically, a serialization mapping table for recording the object mapping relationship between data objects and virtual objects is maintained in the view layer framework. The terminal can obtain the serialization mapping table through the view layer framework. When the object mapping relationship between the target data object and the target virtual object is not recorded in the serialization mapping table, the object mapping relationship between the target data object and the target virtual object is written into the serialization mapping table. When the object mapping relationship between the target data object and the target virtual object is already recorded in the serialization mapping table, the data object display area associated with the target data object is directly displayed through the view layer framework, and the attribute data of at least one attribute item is displayed in the data object display area, without rewriting the object mapping relationship, thereby improving data processing efficiency, thereby further avoiding the waste of computer hardware resources used to support application development programs.
[0080] In one embodiment, Figure 7 As shown, the application development program includes a virtual engine and a view layer framework, and the view layer framework includes a conversion component, a data model and a view component. The terminal can display a virtual scene screen through the view layer framework in the application development program and the view component in the view layer framework, wherein the virtual scene screen is a screen of a virtual scene obtained by instantiating the resources of the target application by the virtual engine in the application development program, and the virtual scene includes at least one virtual object. The application developer can perform an object selection operation on the virtual scene screen, and the terminal can collect the target virtual object selected by the object selection operation in the virtual scene from the virtual engine through the conversion component in the view layer framework in response to the object selection operation of the application developer on the virtual scene screen, and serialize the target virtual object through the conversion component in the view layer framework to obtain the target data object, wherein the target data object includes the attribute data of at least one attribute item. When the object mapping relationship between the target data object and the target virtual object is not recorded in the serialization mapping table maintained in the conversion component, the object mapping relationship between the target data object and the target virtual object is written into the serialization mapping table. When the object mapping relationship between the target data object and the target virtual object has been recorded in the serialization mapping table, the conversion component in the view layer framework can transmit the serialized target data object to the data model in the view layer framework. Furthermore, the terminal can display the data object display area associated with the target data object in the data model through the view component in the view layer framework, and display the attribute data of at least one attribute item in the data object display area.
[0081] In the above embodiment, by maintaining a serialization mapping table in the view layer framework, when the object mapping relationship between the target data object and the target virtual object is not recorded in the serialization mapping table, the object mapping relationship between the target data object and the target virtual object is written into the serialization mapping table to ensure that the corresponding target virtual object is accurately updated in a visual manner in the subsequent use. When the object mapping relationship between the target data object and the target virtual object is recorded in the serialization mapping table, the data object display area associated with the target data object is directly displayed through the view layer framework, and the attribute data of at least one attribute item is displayed in the data object display area, without rewriting the object mapping relationship, thereby improving data processing efficiency, thereby further avoiding the waste of computer hardware resources used to support application development programs.
[0082] In one embodiment, the method also includes: obtaining a scene script code corresponding to the virtual scene screen; the scene script code includes an object script code corresponding to at least one virtual object; through the virtual engine, in response to a script update operation for any object script code, updating the virtual object corresponding to the object script code.
[0083] The scene script code is a script code used to construct a virtual scene, the virtual scene includes at least one virtual object, and the scene script code includes an object script code corresponding to at least one virtual object. The object script code is a script code used to construct a virtual object.
[0084] Specifically, the terminal can obtain the scene script code corresponding to the virtual scene screen. It can be understood that the scene script code can be used to construct a virtual scene including at least one virtual object, and the scene script code includes object script codes corresponding to at least one virtual object. The application developer can perform a script update operation on any object script code, and the terminal can update the virtual object corresponding to the object script code through the virtual engine in response to the script update operation of the application developer on the object script code.
[0085] In the above embodiment, through the virtual engine, in response to a script update operation for any object script code, the virtual object corresponding to the object script code is updated, providing a method of updating the virtual object by updating the script, making the update method of the virtual object richer, thereby further improving the development efficiency of the target application, thereby further avoiding the waste of computer hardware resources used to support the application development program.
[0086] In one embodiment, the method further includes: re-collecting the target virtual object from the virtual engine once at a preset interval through the view layer framework, and executing the step of serializing the target virtual object through the view layer framework to obtain the target data object.
[0087] Specifically, the terminal can display the virtual scene screen through the view layer framework in the application development program. Among them, the virtual scene screen is the screen of the virtual scene obtained by the virtual engine in the application development program instantiating the resources of the target application, and the virtual scene includes at least one virtual object. The terminal can collect the target virtual object selected by the object selection operation in the virtual scene from the virtual engine through the view layer framework in response to the object selection operation on the virtual scene screen, and serialize the target virtual object through the view layer framework to obtain the target data object; the target data object includes the attribute data of at least one attribute item. Then, the terminal can display the data object display area associated with the target data object through the view layer framework, and display the attribute data of at least one attribute item in the data object display area. It can be understood that since the target virtual object in the virtual engine may be updated at any time, the terminal can re-collect the target virtual object from the virtual engine once every preset time interval through the view layer framework, and serialize the re-collected target virtual object through the view layer framework to obtain the target data object. Then, the terminal can display the data object display area associated with the target data object through the view layer framework, and display the attribute data of at least one attribute item in the data object display area. In this way, it can be ensured that the attribute data displayed in the data object display area is the latest attribute data, thereby improving the display accuracy, thereby further avoiding the waste of computer hardware resources used to support application development programs.
[0088] In one embodiment, Figure 8As shown, there are two ways to update virtual objects in the virtual engine. The first update method is that the application developer can perform an update operation in the data object display area. The terminal can determine the update content for the target data object in response to the application developer's update operation on the data object display area through the view layer framework. Furthermore, the terminal can determine the target virtual object that has an object mapping relationship with the target data object based on the object mapping relationship between the data object and the virtual object pre-recorded in the view layer framework, and instruct the virtual engine to update the target virtual object according to the update content. The second update method is that the terminal can obtain the scene script code corresponding to the virtual scene screen. It can be understood that the scene script code can be used to construct a virtual scene including at least one virtual object, and the scene script code includes at least one object script code corresponding to each virtual object. The application developer can perform a script update operation on any object script code, and the terminal can update the virtual object corresponding to the object script code through the virtual engine in response to the application developer's script update operation on the object script code. It can be understood that since the target virtual object in the virtual engine may be updated at any time, the terminal can re-collect the target virtual object from the virtual engine once at a preset interval through the view layer framework, and serialize the re-collected target virtual object through the view layer framework to obtain the target data object. Furthermore, the terminal can display the data object display area associated with the target data object through the view layer framework, and display the attribute data of at least one attribute item in the data object display area. In this way, it can be ensured that the attribute data displayed in the data object display area is the latest attribute data, which improves the display accuracy, thereby further avoiding the waste of computer hardware resources used to support application development programs.
[0089] In the above embodiment, since the target virtual object in the virtual engine may be updated at any time, the target virtual object is re-collected from the virtual engine once at a preset interval through the view layer framework, and the target virtual object is serialized through the view layer framework to obtain the target data object. This can ensure that the attribute data displayed in the data object display area is the latest attribute data, improve the display accuracy, and further avoid the waste of computer hardware resources used to support application development programs.
[0090] In one embodiment, a view layer framework includes a conversion component, a data model and a view component; serialization of a target virtual object is performed through the conversion component; a data object display area associated with a target data object is displayed through the view layer framework, and attribute data of at least one attribute item is displayed in the data object display area, including: when the conversion component serializes the target virtual object into a target data object, attribute data of at least one attribute item included in the target data object is obtained from the conversion component through the data model; a data object display area corresponding to the target data object is displayed through the view component, and attribute data of at least one attribute item in the data model is displayed in the data object display area.
[0091] Specifically, Fig. 9 As shown, the view layer framework includes a conversion component, a data model and a view component. The terminal can display a virtual scene screen through the view component in the view layer framework in the application development program, wherein the virtual scene screen is a screen of a virtual scene obtained by instantiating the resources of the target application by the virtual engine in the application development program, and the virtual scene includes at least one virtual object. The terminal can collect the target virtual object selected by the object selection operation in the virtual scene from the virtual engine through the conversion component in the view layer framework in response to the object selection operation for the virtual scene screen, and serialize the target virtual object through the conversion component in the view layer framework to obtain the target data object, wherein the target data object includes the attribute data of at least one attribute item. When the conversion component serializes the target virtual object into the target data object, the terminal can obtain the attribute data of at least one attribute item included in the target data object from the conversion component in the view layer framework through the data model in the view layer framework, and display the data object display area corresponding to the target data object through the view component in the view layer framework, and display the attribute data of at least one attribute item in the data model in the view layer framework in the data object display area.
[0092] In the above embodiment, when the conversion component serializes the target virtual object into the target data object, the attribute data of at least one attribute item included in the target data object is obtained from the conversion component through the data model, and then the data object display area corresponding to the target data object is displayed through the view component, and the attribute data of at least one attribute item in the data model is displayed in the data object display area. In this way, different processing tasks are completed by different components in the view layer framework, which can improve the accuracy of data processing, thereby further avoiding the waste of computer hardware resources used to support application development programs.
[0093] In one embodiment, the method also includes: displaying a virtual object node tree through a view layer framework; the virtual object node tree includes at least one node, each node representing a virtual object in a virtual scene; in response to obtaining a target virtual object in response to an object selection operation on a virtual scene screen, selecting a node representing the target virtual object in the virtual object node tree through the view layer framework.
[0094] The virtual object node tree is a data structure that organizes data in a hierarchical relationship. The virtual object node tree starts with a root node, and each node can have multiple child nodes to form a hierarchical structure. It can be understood that the virtual object node tree includes at least one node, and each node represents a virtual object in the virtual scene.
[0095] Specifically, the terminal can obtain a virtual object node tree corresponding to the virtual scene. It can be understood that the virtual object node tree includes at least one node, and each node in the virtual object node tree represents a virtual object in the virtual scene. The terminal can display the virtual object node tree through the operation interface provided by the view layer framework. In response to the object selection operation for the virtual scene screen, the terminal can select the node representing the target virtual object in the virtual object node tree through the view layer framework. Among them, the operation interface is a visual interface that supports interaction provided by the view layer framework.
[0096] In one embodiment, when a target virtual object is obtained in response to an object selection operation on a virtual scene screen, the terminal can select a node representing the target virtual object in the virtual object node tree through the view layer framework, and can highlight the selected node in the operation interface provided by the view layer framework.
[0097] In one embodiment, Fig.10 As shown, the virtual object node tree includes 7 nodes, namely node 1, node 2, node 3, node 4, node 5, node 6 and node 7, wherein node 1 is the root node of the virtual object node tree. Each of the 7 nodes in the virtual object node tree represents a virtual object in the virtual scene.
[0098] In the above embodiment, when a target virtual object is obtained in response to an object selection operation on a virtual scene screen, a node representing the target virtual object is selected in the virtual object node tree through the view layer framework, and the specific position of the node of the target virtual object in the virtual object node tree can be more clearly observed, which is more convenient for efficient development of the target application, thereby further avoiding the waste of computer hardware resources used to support application development programs.
[0099] In one embodiment, the data object display area is displayed in the operation interface provided by the view layer framework, the virtual scene screen is displayed in the screen preview area of the operation interface, the virtual object node tree is displayed in the virtual object operation area of the operation interface, and the screen preview area is located between the data object display area and the virtual object operation area.
[0100] The picture preview area is a visualization area in the operation interface provided by the view layer framework for previewing the virtual scene picture. The virtual object operation area is a visualization area in the operation interface provided by the view layer framework for displaying the virtual object node tree.
[0101] Specifically, the view layer framework can provide an operation interface, and the operation interface includes a screen preview area, a virtual object operation area, and a data object display area. The terminal can display a virtual scene screen through the screen preview area in the operation interface, wherein the virtual scene screen is a screen of a virtual scene obtained by instantiating the resources of the target application by the virtual engine in the application development program, and the virtual scene includes at least one virtual object. The terminal can collect the target virtual object selected by the object selection operation in the virtual scene from the virtual engine through the view layer framework in response to the object selection operation for the virtual scene screen, and serialize the target virtual object through the view layer framework to obtain the target data object, wherein the target data object includes the attribute data of at least one attribute item. Furthermore, the terminal can display the data object display area associated with the target data object in the operation interface through the view layer framework, and display the attribute data of at least one attribute item in the data object display area in the operation interface. The terminal can display a virtual object node tree in the virtual object operation area in the operation interface through the view layer framework, wherein the virtual object node tree includes at least one node, and each node represents a virtual object in the virtual scene. In the case where a target virtual object is acquired in response to an object selection operation on the virtual scene screen, the terminal may select a node representing the target virtual object in the virtual object node tree through the view layer framework.
[0102] In one embodiment, the operation interface provided by the view layer framework also includes a resource operation area. Application developers can perform file update operations on resource files displayed in the resource operation area, and the terminal can update the resources of the target application in response to the file update operation on the resource files displayed in the resource operation area.
[0103] In one embodiment, Fig.11As shown, the operation interface provided by the view layer framework includes a picture preview area 1101, a data object display area 1102, a virtual object operation area 1103, and resource operation areas 1104 and 1105. Specifically, the terminal can display the virtual scene picture through the picture preview area 1101 in the operation interface, wherein the virtual scene picture is the picture of the virtual scene obtained by instantiating the resources of the target application by the virtual engine in the application development program, and the virtual scene has two virtual objects, namely the sun 1101a and the ball 1101b. The terminal can collect the target virtual object selected by the object selection operation in the virtual scene from the virtual engine through the view layer framework in response to the object selection operation on the virtual scene picture, such as selecting the sun 1101a or the ball 1101b, and serialize the target virtual object through the view layer framework to obtain the target data object, wherein the target data object includes the attribute data of at least one attribute item. Furthermore, the terminal can display the data object display area 1102 associated with the target data object in the operation interface through the view layer framework, and display the attribute data of at least one attribute item in the data object display area 1102 in the operation interface. The terminal can display the virtual object node tree in the virtual object operation area 1103 in the operation interface through the view layer framework, wherein the virtual object node tree includes two nodes, one of which represents the virtual object of the sun, and the other node represents the virtual object of the ball. In the case where the target virtual object is obtained in response to the object selection operation for the virtual scene screen, the terminal can select the node representing the target virtual object in the virtual object node tree through the view layer framework. The application developer can perform a file update operation on the resource files displayed in the resource operation areas 1104 and 1105, and the terminal can update the resources of the target application in response to the file update operation on the resource files displayed in the resource operation areas 1104 and 1105. It can be understood that after the resources of the target application are updated, the virtual scene screen displayed in the screen preview area 1101 will also be updated accordingly.
[0104] In the above embodiment, by displaying attribute data, virtual scene images and virtual object node trees in different areas of the same operation interface provided by the view layer framework, efficient development of the target application is facilitated, thereby further avoiding the waste of computer hardware resources used to support application development programs.
[0105] In one embodiment, the method also includes: determining the selected virtual object through the view layer framework in response to a selection operation on a node in the virtual object node tree; associating the selected virtual object with the data object display area through the view layer framework, and updating the attribute data of at least one attribute item displayed in the data object display area to the attribute data of at least one attribute item of the selected virtual object.
[0106] Specifically, the terminal can display a virtual scene screen through a screen preview area in the operation interface, wherein the virtual scene screen is a screen of a virtual scene obtained by instantiating the resources of the target application by the virtual engine in the application development program, and the virtual scene includes at least one virtual object. The terminal can collect the target virtual object selected by the object selection operation in the virtual scene from the virtual engine through the view layer framework in response to the object selection operation on the virtual scene screen, and serialize the target virtual object through the view layer framework to obtain the target data object, wherein the target data object includes the attribute data of at least one attribute item. Furthermore, the terminal can display the data object display area associated with the target data object in the operation interface through the view layer framework, and display the attribute data of at least one attribute item in the data object display area in the operation interface. The terminal can display a virtual object node tree in the virtual object operation area in the operation interface through the view layer framework, wherein the virtual object node tree includes at least one node, and each node represents a virtual object in the virtual scene. Furthermore, the terminal can determine the selected virtual object through the view layer framework in response to the selection operation on the node in the virtual object node tree. The terminal may associate the selected virtual object with the data object display area through the view layer framework, and update the attribute data of at least one attribute item displayed in the data object display area to the attribute data of at least one attribute item of the selected virtual object.
[0107] In the above embodiment, the selected virtual object is determined through the view layer framework in response to the selection operation on the node in the virtual object node tree, and the selected virtual object is associated with the data object display area through the view layer framework, and the attribute data of at least one attribute item displayed in the data object display area is updated to the attribute data of at least one attribute item of the selected virtual object. In this way, by operating the nodes in the virtual object node tree, the attribute data displayed in the data object display area is updated, which is more convenient for the efficient development of the target application, thereby further avoiding the waste of computer hardware resources used to support the application development program.
[0108] In one embodiment, in response to an object selection operation on a virtual scene picture, a target virtual object selected by the object selection operation in the virtual scene is collected from a virtual engine through a view layer framework, including: in response to an object selection operation on a virtual scene picture, a picture element selected by the object selection operation is obtained from the virtual scene picture through the view layer framework, and the virtual engine is notified; and a target virtual object indicated by the picture element in the virtual scene is collected from the virtual engine through the view layer framework.
[0109] Among them, the picture element is an element in the virtual scene picture. It can be understood that the virtual scene picture may include at least one picture element.
[0110] Specifically, the application developer can perform an object selection operation on the virtual scene screen, and the terminal can, through the view layer framework, respond to the application developer's object selection operation on the virtual scene screen, obtain the screen element selected by the object selection operation from the virtual scene screen, and notify the virtual engine of the screen element selected by the object selection operation. The terminal can collect the target virtual object indicated by the screen element in the virtual scene from the virtual engine through the view layer framework.
[0111] In the above embodiment, in response to the object selection operation on the virtual scene screen, the screen element selected by the object selection operation is obtained from the virtual scene screen through the view layer framework, and the virtual engine is notified to collect the target virtual object indicated by the screen element in the virtual scene from the virtual engine through the view layer framework. In this way, by first determining the screen element selected by the object selection operation, and then collecting the target virtual object indicated by the screen element in the virtual scene from the virtual engine, the collection accuracy of the target virtual object can be improved, thereby further avoiding the waste of computer hardware resources used to support application development programs.
[0112] In one embodiment, the application development program is a game application development program; the virtual engine is a game engine; the target application is a target game application; the virtual scene screen is a game scene screen; the virtual scene is a game scene; and the virtual object is a game object.
[0113] Among them, the game scene refers to the virtual environment in the game, which is a large virtual space composed of various game resources. The game scene can be an entire game world or a specific scene, such as a forest, city, and desert. The virtual scene includes at least one element such as terrain, buildings, landscape, sky, or climate. Through layout and design, a real or fantasy environment is created to increase the immersion of game players. Game objects refer to the interactive elements in the game, which are player characters, props, and non-player characters in the game scene. Game objects usually have their own properties, behaviors, and animations, and can accept operations from game players, trigger events, or participate in game logic.
[0114] Specifically, the terminal can display the game scene screen through the view layer framework in the game application development program; the game scene screen is the screen of the game scene obtained by instantiating the resources of the target game application by the game engine in the game application development program, and the game scene includes at least one game object. The terminal can collect the target game object selected by the object selection operation in the game scene from the game engine through the view layer framework in response to the object selection operation on the game scene screen. The terminal can serialize the target game object through the view layer framework to obtain the target data object; the target data object includes the attribute data of at least one attribute item. The terminal can display the data object display area associated with the target data object through the view layer framework, and display the attribute data of at least one attribute item in the data object display area.
[0115] In the above embodiment, the target game object selected by the developer is actively obtained from the game engine through the view layer framework, and the target game object is serialized into a target data object in a plain text format, and the attribute data of the attribute items included in the target data object are rendered and displayed, thereby avoiding the view layer framework from automatically adding monitoring tasks to objects in the game engine, saving the memory consumption of the game application development program, and improving the fluency and stability of the game application development program, thereby avoiding the waste of computer hardware resources used to support the game application development program.
[0116] In one embodiment, the application development program is an animation application development program; the virtual engine is an animation engine; the target application is a target animation application; the virtual scene screen is an animation scene screen; the virtual scene is an animation scene; and the virtual object is an animation object.
[0117] Specifically, the terminal can display the animation scene screen through the view layer framework in the animation application development program; the animation scene screen is the screen of the animation scene obtained by the animation engine in the animation application development program instantiating the resources of the target animation application, and the animation scene includes at least one animation object. The terminal can collect the target animation object selected by the object selection operation in the animation scene from the animation engine through the view layer framework in response to the object selection operation on the animation scene screen. The terminal can serialize the target animation object through the view layer framework to obtain the target data object; the target data object includes the attribute data of at least one attribute item. The terminal can display the data object display area associated with the target data object through the view layer framework, and display the attribute data of at least one attribute item in the data object display area.
[0118] In the above embodiment, the target animation object selected by the developer is actively obtained from the animation engine through the view layer framework, and the target animation object is serialized into a target data object in a plain text format, and the attribute data of the attribute items included in the target data object are rendered and displayed, thereby avoiding the view layer framework from automatically adding monitoring tasks to the objects in the animation engine, saving the memory consumption of the animation application development program, and improving the fluency and stability of the animation application development program, thereby avoiding the waste of computer hardware resources used to support the animation application development program.
[0119] like Fig.12 As shown, in one embodiment, a data processing method based on a virtual engine is provided. Figure 1 Taking the terminal 102 in the example as an example, the method specifically includes the following steps:
[0120] Step 1202: Display the virtual scene image in the image preview area of the operation interface provided by the view layer framework in the application development program.
[0121] The virtual scene screen is a screen of a virtual scene obtained by instantiating resources of a target application in a virtual engine in an application development program, and the virtual scene includes at least one virtual object.
[0122] Step 1204 , in response to the object selection operation on the virtual scene picture, the picture element selected by the object selection operation is obtained from the virtual scene picture through the view layer framework, and the virtual engine is notified.
[0123] Step 1206 , collecting the target virtual object indicated by the screen element in the virtual scene from the virtual engine through the view layer framework.
[0124] Step 1208, serialize the target virtual object through the conversion component in the view layer framework to obtain a target data object; the target data object includes attribute data of at least one attribute item.
[0125] Step 1210, determine the serialization mapping table through the conversion component in the view layer framework; when the object mapping relationship between the target data object and the target virtual object is not recorded in the serialization mapping table, write the object mapping relationship between the target data object and the target virtual object into the serialization mapping table.
[0126] Step 1212, when the serialization mapping table records the object mapping relationship between the target data object and the target virtual object, and when the conversion component serializes the target virtual object into the target data object, the attribute data of at least one attribute item included in the target data object is obtained from the conversion component in the view layer framework through the data model in the view layer framework.
[0127] Step 1214, through the view component in the view layer framework, in the operation interface provided by the view layer framework, a data object display area corresponding to the target data object is displayed, and attribute data of at least one attribute item in the data model is displayed in the data object display area.
[0128] Step 1216, through the view layer framework, in response to the update operation on the target attribute item in the data object display area, obtain the target attribute data indicated by the update operation, and update the attribute data of the target attribute item in the target data object to the target attribute data.
[0129] Step 1218: Determine the target virtual object having an object mapping relationship with the target data object through the view layer framework, and send an update instruction to the virtual engine.
[0130] Among them, the update instruction is used to indicate the target virtual object, target attribute item and target attribute data.
[0131] Step 1220: In response to the update instruction, the virtual engine determines the target attribute item in the target virtual object, and updates the attribute data of the target attribute item to the target attribute data.
[0132] Step 1222, obtaining a scene script code corresponding to the virtual scene image; the scene script code includes an object script code corresponding to at least one virtual object.
[0133] Step 1224: In response to a script update operation on any object script code, the virtual engine updates the virtual object corresponding to the object script code.
[0134] Step 1226, through the view layer framework, re-collect the target virtual object from the virtual engine once every preset time interval, and execute the step of serializing the target virtual object through the view layer framework to obtain the target data object.
[0135] Step 1228: Display the virtual object node tree in the virtual object operation area of the operation interface provided by the view layer framework through the view layer framework.
[0136] The virtual object node tree includes at least one node, and each node represents a virtual object in the virtual scene.
[0137] Step 1230 , when a target virtual object is acquired in response to the object selection operation on the virtual scene screen, a node representing the target virtual object is selected in the virtual object node tree through the view layer framework.
[0138] Step 1232: Determine the selected virtual object in response to a selection operation on a node in the virtual object node tree through the view layer framework.
[0139] Step 1234, associate the selected virtual object with the data object display area through the view layer framework, and update the attribute data of at least one attribute item displayed in the data object display area to the attribute data of at least one attribute item of the selected virtual object.
[0140] The present application also provides an application scenario, which applies the above-mentioned data processing method based on a virtual engine. Specifically, the data processing method based on a virtual engine can be applied to a data processing scenario based on a game engine. It can be understood that the application development program in the present application is a game application development program; the virtual engine is a game engine; the target application is a target game application; the virtual scene screen is a game scene screen; the virtual scene is a game scene; and the virtual object is a game object. Specifically, the terminal can display the game scene screen in the screen preview area of the operation interface provided by the view layer framework in the game application development program through the view layer framework. Among them, the game scene screen is a screen of the game scene obtained by instantiating the resources of the target game application by the game engine in the game application development program, and the game scene includes at least one game object. Through the view layer framework, in response to the object selection operation for the game scene screen, the screen element selected by the object selection operation is obtained from the game scene screen, and the game engine is notified. Through the view layer framework, the target game object indicated by the screen element in the game scene is collected from the game engine.
[0141] The terminal can serialize the target game object through the conversion component in the view layer framework to obtain the target data object; the target data object includes attribute data of at least one attribute item. The serialization mapping table is determined through the conversion component in the view layer framework; when the object mapping relationship between the target data object and the target game object is not recorded in the serialization mapping table, the object mapping relationship between the target data object and the target game object is written into the serialization mapping table. When the object mapping relationship between the target data object and the target game object is recorded in the serialization mapping table, and when the conversion component serializes the target game object into the target data object, the attribute data of at least one attribute item included in the target data object is obtained from the conversion component in the view layer framework through the data model in the view layer framework. Through the view component in the view layer framework, the data object display area corresponding to the target data object is displayed in the operation interface provided by the view layer framework, and the attribute data of at least one attribute item in the data model is displayed in the data object display area.
[0142] The terminal can obtain the target attribute data indicated by the update operation in response to the update operation of the target attribute item in the data object display area through the view layer framework, and update the attribute data of the target attribute item in the target data object to the target attribute data. The target game object having an object mapping relationship with the target data object is determined through the view layer framework, and an update instruction is sent to the game engine. Among them, the update instruction is used to indicate the target game object, the target attribute item and the target attribute data. Through the game engine, in response to the update instruction, the target attribute item in the target game object is determined, and the attribute data of the target attribute item is updated to the target attribute data.
[0143] The terminal can obtain the scene script code corresponding to the game scene screen; the scene script code includes at least one object script code corresponding to each game object. Through the game engine, in response to a script update operation for any object script code, the game object corresponding to the object script code is updated.
[0144] The terminal can re-collect the target game object from the game engine once every preset time interval through the view layer framework, and execute the step of serializing the target game object through the view layer framework to obtain the target data object. Through the view layer framework, the game object node tree is displayed in the game object operation area of the operation interface provided by the view layer framework. Among them, the game object node tree includes at least one node, and each node represents a game object in the game scene. In the case where the target game object is obtained in response to the object selection operation on the game scene screen, the node representing the target game object is selected in the game object node tree through the view layer framework. Through the view layer framework, in response to the selection operation on the node in the game object node tree, the selected game object is determined. Through the view layer framework, the selected game object is associated with the data object display area, and the attribute data of at least one attribute item displayed in the data object display area is updated to the attribute data of at least one attribute item of the selected game object.
[0145] It can be understood that the present application actively obtains the target game object selected by the developer from the game engine through the view layer framework, serializes the target game object into a target data object in plain text format, and renders and displays the attribute data of the attribute items included in the target data object, thereby avoiding the view layer framework from automatically adding monitoring tasks to objects in the game engine, saving the memory consumption of the game application development program, and improving the fluency and stability of the game application development program, thereby avoiding the waste of computer hardware resources used to support the game application development program.
[0146] The present application also provides an application scenario, which applies the above-mentioned data processing method based on a virtual engine. Specifically, the data processing method based on a virtual engine can be applied to a data processing scenario based on an animation engine. It can be understood that the application development program is an animation application development program; the virtual engine is an animation engine; the target application is a target animation application; the virtual scene screen is an animation scene screen; the virtual scene is an animation scene; and the virtual object is an animation object. Specifically, the terminal can display the animation scene screen through the view layer framework in the animation application development program, wherein the animation scene screen is a screen of the animation scene obtained by instantiating the resources of the target animation application by the animation engine in the animation application development program, and the animation scene includes at least one animation object. The terminal can collect the target animation object selected by the object selection operation in the animation scene from the animation engine through the view layer framework in response to the object selection operation for the animation scene screen. The target animation object is serialized through the view layer framework to obtain the target data object, wherein the target data object includes the attribute data of at least one attribute item. The terminal can display the data object display area associated with the target data object through the view layer framework, and display the attribute data of at least one attribute item in the data object display area.
[0147] It can be understood that the present application actively obtains the target animation object selected by the developer from the animation engine through the view layer framework, serializes the target animation object into a target data object in plain text format, and renders and displays the attribute data of the attribute items included in the target data object, thereby avoiding the view layer framework from automatically adding monitoring tasks to objects in the animation engine, saving memory consumption of the animation application development program, and improving the fluency and stability of the animation application development program, thereby avoiding the waste of computer hardware resources used to support the animation application development program.
[0148] It should be understood that, although each step in the flow chart of the above-mentioned embodiments is shown in order, these steps are not necessarily performed in order. Unless there is a clear explanation in this article, the execution of these steps does not have strict order restrictions, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the above-mentioned embodiments may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in order, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0149] In one embodiment, Fig.13 As shown, a data processing device 1300 based on a virtual engine is provided, and the device specifically includes:
[0150] The virtual engine 1302 is used to instantiate the resources of the target application to obtain a virtual scene picture; the virtual scene picture is a picture of a virtual scene obtained by instantiating the resources of the target application, and the virtual scene includes at least one virtual object;
[0151] The view layer framework 1304 is used to display the virtual scene picture; in response to the object selection operation on the virtual scene picture, the target virtual object selected by the object selection operation in the virtual scene is collected from the virtual engine 1302; the target virtual object is serialized to obtain the target data object; the target data object includes attribute data of at least one attribute item; and a data object display area associated with the target data object is displayed, and attribute data of at least one attribute item is displayed in the data object display area.
[0152] In one embodiment, the view layer framework 1304 records the object mapping relationship between the data object and the virtual object; the view layer framework 1304 is also used to respond to the update operation on the data object display area, determine the update content for the target data object, determine the target virtual object having an object mapping relationship with the target data object, and instruct the virtual engine 1302 to update the target virtual object according to the update content.
[0153] In one embodiment, the view layer framework 1304 is also used to respond to an update operation on a target attribute item in a data object display area, obtain the target attribute data indicated by the update operation, and update the attribute data of the target attribute item in the target data object to the target attribute data; determine a target virtual object having an object mapping relationship with the target data object, and send an update instruction to the virtual engine 1302; the update instruction is used to indicate the target virtual object, the target attribute item and the target attribute data; the virtual engine 1302 is also used to respond to the update instruction, determine the target attribute item in the target virtual object, and update the attribute data of the target attribute item to the target attribute data.
[0154] In one embodiment, the view layer framework 1304 is also used to determine a serialization mapping table; when the object mapping relationship between the target data object and the target virtual object is not recorded in the serialization mapping table, the object mapping relationship between the target data object and the target virtual object is written into the serialization mapping table; when the object mapping relationship between the target data object and the target virtual object is recorded in the serialization mapping table, the step of displaying the data object display area associated with the target data object is executed.
[0155] In one embodiment, the virtual engine 1302 is also used to obtain the scene script code corresponding to the virtual scene screen; the scene script code includes object script code corresponding to at least one virtual object; through the virtual engine 1302, in response to a script update operation for any object script code, the virtual object corresponding to the object script code is updated.
[0156] In one embodiment, the view layer framework 1304 is also used to re-collect the target virtual object from the virtual engine 1302 at a preset time interval, and execute the step of serializing the target virtual object to obtain the target data object.
[0157] In one embodiment, Fig.14 As shown, the view layer framework 1304 includes a conversion component 1304a, a data model 1304b and a view component 1304c; the serialization of the target virtual object is performed through the conversion component; the view layer framework 1304 is also used to obtain the attribute data of at least one attribute item included in the target data object from the conversion component 1304a through the data model 1304b when the conversion component 1304a serializes the target virtual object into a target data object; through the view component 1304c, the data object display area corresponding to the target data object is displayed, and the attribute data of at least one attribute item in the data model 1304b is displayed in the data object display area.
[0158] In one embodiment, the view layer framework 1304 is also used to display a virtual object node tree; the virtual object node tree includes at least one node, each node representing a virtual object in the virtual scene; when the target virtual object is obtained in response to an object selection operation on the virtual scene screen, the node representing the target virtual object is selected in the virtual object node tree.
[0159] In one embodiment, the data object display area is displayed in the operation interface provided by the view layer framework 1304, the virtual scene screen is displayed in the screen preview area of the operation interface, the virtual object node tree is displayed in the virtual object operation area of the operation interface, and the screen preview area is located between the data object display area and the virtual object operation area.
[0160] In one embodiment, the view layer framework 1304 is also used to determine the selected virtual object in response to a selection operation on a node in the virtual object node tree; associate the selected virtual object with the data object display area, and update the attribute data of at least one attribute item displayed in the data object display area to the attribute data of at least one attribute item of the selected virtual object.
[0161] In one embodiment, the view layer framework 1304 is also used to respond to an object selection operation on the virtual scene screen, obtain the screen element selected by the object selection operation from the virtual scene screen, and notify the virtual engine 1302; and collect the target virtual object indicated by the screen element in the virtual scene from the virtual engine 1302.
[0162] In one embodiment, the application development program is a game application development program; the virtual engine 1302 is a game engine; the target application is a target game application; the virtual scene screen is a game scene screen; the virtual scene is a game scene; and the virtual object is a game object.
[0163] The above-mentioned data processing device based on the virtual engine displays a virtual scene screen through a view layer framework in an application development program; the virtual scene screen is a screen of a virtual scene obtained by instantiating the resources of a target application by a virtual engine in the application development program, and the virtual scene includes at least one virtual object. Through the view layer framework, in response to an object selection operation on the virtual scene screen, the target virtual object selected by the object selection operation in the virtual scene is collected from the virtual engine. Through the view layer framework, the target virtual object is serialized to obtain a target data object; the target data object includes attribute data of at least one attribute item. Through the view layer framework, a data object display area associated with the target data object is displayed, and attribute data of at least one attribute item is displayed in the data object display area. Compared with the traditional method of automatically monitoring all objects in the virtual engine through the view layer framework, the present application actively obtains the target virtual object selected by the developer from the virtual engine through the view layer framework, serializes the target virtual object into a target data object in plain text format, and renders and displays the attribute data of the attribute items included in the target data object, thereby avoiding the view layer framework from automatically adding monitoring tasks to objects in the virtual engine, saving the memory consumption of the application development program, and improving the fluency and stability of the application development program, thereby avoiding the waste of computer hardware resources used to support the application development program.
[0164] Each module in the above-mentioned data processing device based on the virtual engine can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0165] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.15As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a data processing method based on a virtual engine is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.
[0166] Those skilled in the art will understand that Fig.15 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0167] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0168] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0169] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0170] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0171] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0172] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0173] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A data processing method based on a virtual engine, characterized in that: The method comprises: Displaying a virtual scene screen through a view layer framework in an application development program; the virtual scene screen is a screen of a virtual scene obtained by instantiating resources of a target application by a virtual engine in the application development program, and the virtual scene includes at least one virtual object; In response to an object selection operation on the virtual scene picture, collecting, from the virtual engine, a target virtual object selected by the object selection operation in the virtual scene through the view layer framework; The target virtual object is serialized through the view layer framework to obtain a target data object; the target data object includes attribute data of at least one attribute item; A data object display area associated with the target data object is displayed through the view layer framework, and the property data of the at least one property item is displayed in the data object display area.
2. The method according to claim 1, characterized in that The view layer framework records the object mapping relationship between the data object and the virtual object; the method further includes: Through the view layer framework, in response to an update operation on the data object display area, the update content for the target data object is determined, the target virtual object having the object mapping relationship with the target data object is determined, and the virtual engine is instructed to update the target virtual object according to the update content.
3. The method according to claim 2, characterized in that The method of determining, by the view layer framework, in response to an update operation on the data object display area, update content for the target data object, determining the target virtual object having the object mapping relationship with the target data object, and instructing the virtual engine to update the target virtual object according to the update content includes: In response to an update operation on a target attribute item in a display area of the data object, the target attribute data indicated by the update operation is obtained through the view layer framework, and the attribute data of the target attribute item in the target data object is updated to the target attribute data; Determine, through the view layer framework, a target virtual object having the object mapping relationship with the target data object, and send an update instruction to the virtual engine; the update instruction is used to indicate the target virtual object, the target attribute item and the target attribute data; By means of the virtual engine, in response to the update instruction, the target attribute item in the target virtual object is determined, and the attribute data of the target attribute item is updated to the target attribute data.
4. The method according to claim 2, characterized in that: The method further comprises: Determine a serialization mapping table through the view layer framework; When the object mapping relationship between the target data object and the target virtual object is not recorded in the serialization mapping table, writing the object mapping relationship between the target data object and the target virtual object into the serialization mapping table; When the object mapping relationship between the target data object and the target virtual object is recorded in the serialization mapping table, the step of displaying the data object display area associated with the target data object through the view layer framework is performed.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Acquire a scene script code corresponding to the virtual scene screen; the scene script code includes an object script code corresponding to each of the at least one virtual object; Through the virtual engine, in response to a script update operation on any of the object script codes, the virtual object corresponding to the object script code is updated.
6. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Through the view layer framework, the target virtual object is re-collected from the virtual engine once every preset time interval, and the step of serializing the target virtual object through the view layer framework to obtain the target data object is performed.
7. The method according to any one of claims 1 to 4, characterized in that: The view layer framework includes a conversion component, a data model and a view component; the serialization of the target virtual object is performed through the conversion component; The step of displaying a data object display area associated with the target data object through the view layer framework, wherein the attribute data of the at least one attribute item is displayed in the data object display area includes: When the conversion component serializes the target virtual object into a target data object, the attribute data of the at least one attribute item included in the target data object is obtained from the conversion component through the data model; The data object display area corresponding to the target data object is displayed through the view component, and the attribute data of the at least one attribute item in the data model is displayed in the data object display area.
8. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Displaying a virtual object node tree through the view layer framework; the virtual object node tree includes at least one node, each node representing a virtual object in the virtual scene; In the case where the target virtual object is acquired in response to the object selection operation on the virtual scene picture, a node representing the target virtual object is selected in the virtual object node tree through the view layer framework.
9. The method according to claim 8, characterized in that The data object display area is displayed in the operation interface provided by the view layer framework, the virtual scene screen is displayed in the screen preview area of the operation interface, the virtual object node tree is displayed in the virtual object operation area of the operation interface, and the screen preview area is located between the data object display area and the virtual object operation area.
10. The method according to claim 8, characterized in that The method further comprises: Determining, by the view layer framework, a selected virtual object in response to a selection operation on a node in the virtual object node tree; The selected virtual object is associated with the data object display area through the view layer framework, and the attribute data of at least one attribute item displayed in the data object display area is updated to the attribute data of at least one attribute item of the selected virtual object.
11. The method according to any one of claims 1 to 4, characterized in that: The step of collecting, through the view layer framework, a target virtual object selected by the object selection operation on the virtual scene from the virtual engine in response to the object selection operation on the virtual scene includes: In response to an object selection operation on the virtual scene picture, the view layer framework obtains a picture element selected by the object selection operation from the virtual scene picture, and notifies the virtual engine; The target virtual object indicated by the screen element in the virtual scene is collected from the virtual engine through the view layer framework.
12. The method according to any one of claims 1 to 4, characterized in that: The application development program is a game application development program; the virtual engine is a game engine; the target application is a target game application; the virtual scene screen is a game scene screen; the virtual scene is a game scene; and the virtual object is a game object.
13. A data processing device based on a virtual engine, characterized in that: The device comprises: A virtual engine, used to instantiate the resources of the target application to obtain a virtual scene picture; the virtual scene picture is a picture of a virtual scene obtained by instantiating the resources of the target application, and the virtual scene includes at least one virtual object; A view layer framework is used to display a virtual scene picture; in response to an object selection operation on the virtual scene picture, collect a target virtual object selected by the object selection operation in the virtual scene from the virtual engine; serialize the target virtual object to obtain a target data object; the target data object includes attribute data of at least one attribute item; and display a data object display area associated with the target data object, wherein the attribute data of the at least one attribute item is displayed in the data object display area.
14. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 12 are implemented.
15. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.
16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.