Virtual scene data processing method and device, electronic equipment and storage medium
By responding to the display instructions of the first scene area of the virtual scene in a strategy simulation game, the target prefabricated body is determined and rendered using preloaded data, the problem of large game overhead in the prior art is solved, and more efficient game rendering is achieved.
Patent Information
- Application Number
- CN202510013157.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-04-25
AI Technical Summary
In the prior art, in strategy simulation games, in order to render virtual objects on the game sandbox, a large amount of data is required, resulting in a large amount of game overhead.
By responding to the display instructions of the first scene area of the virtual scene, it is determined that the target prefabricated body is located in the area, and the image rendering is directly performed using the feature data about the target prefabricated body in the prefabricated data to reduce the overhead during the game operation.
It effectively reduces the overhead during the game operation and improves the performance and efficiency of the game.
Smart Images

Figure CN119868937A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of game data processing, and more specifically, to a data processing method, device, electronic device and storage medium for a virtual scene. Background Art
[0002] With the rapid development of strategy simulation games (SLG), the game volume of strategy simulation games has gradually increased, especially the number of virtual objects set on the game sandbox has increased significantly. At present, in order to render the virtual objects on the game sandbox, it is usually necessary to traverse the existing data, determine the virtual objects whose coordinates are in the visible area of the user interface in the existing data, and perform image rendering after performing logical processing on the virtual objects in the visible area of the user interface, which makes the game costly. Summary of the invention
[0003] One purpose of the embodiments of the present disclosure is to provide a new technical solution for data processing of a virtual scene.
[0004] According to a first aspect of the present disclosure, a method for processing data of a virtual scene is provided, the method comprising:
[0005] In response to a display instruction of a first scene area of a virtual scene, determining that a target prefab in the virtual scene is located in the first scene area;
[0006] When the preloaded data of the virtual scene reflects that the target preform has set restriction conditions, image rendering is performed on the target preform according to the feature data about the target preform in the preloaded data; wherein the restriction conditions include limiting any object in the virtual scene to have an associated relationship with the target preform.
[0007] In a possible implementation, the method further includes:
[0008] When the preloaded data of the virtual scene reflects that the target preform has an association relationship with the first object in the virtual scene, inputting feature data about the target preform in the preloaded data into a logic processor;
[0009] By means of the logic processor, logic calculation processing is performed on the target preform to obtain a processing result;
[0010] According to the processing result, image rendering is performed on the target prefabricated body.
[0011] In a possible implementation, inputting the feature data about the target preform in the preloaded data into a logic processor includes:
[0012] Determining the position information and unique identifier of the target preform in the preloaded data;
[0013] In the preloaded data, query the attribute table of the target preform through the location information and the unique identifier, and obtain the state description information of the target preform;
[0014] The state description information of the target preform is input into the logic processor.
[0015] In a possible implementation, the method further includes:
[0016] In response to a virtual scene creation instruction, determining each prefabricated object configured in the virtual scene and a configuration type of each prefabricated object;
[0017] Setting a restriction condition for a first preform configuration of a first configuration type among the preforms; wherein the configuration type includes the first configuration type;
[0018] Insert each prefabricated body into a preset tree data structure to obtain preloaded data of the virtual scene.
[0019] In a possible implementation, the method further includes:
[0020] Determining a second preform of the same configuration type among the preforms;
[0021] Determining, in the preloaded data, first preloaded data about the second preform;
[0022] Determining second preloaded data of a set type in the first preloaded data;
[0023] An association relationship is established between the second preloaded data and the set sharing identifier, and the association relationship is stored in the preloaded data of the virtual scene.
[0024] In a possible implementation, inserting each prefabricated object into a preset tree data structure to obtain preloaded data of the virtual scene includes:
[0025] Inserting each of the prefabricated bodies into a corresponding child node in a preset tree data structure in sequence, and obtaining characteristic information of the prefabricated body on the child node;
[0026] The preloaded data of the virtual scene is obtained according to the position information of the child node in the tree data structure and the feature information of the prefabricated object on the child node.
[0027] In a possible implementation, the method further includes:
[0028] When the third preform is inserted into the first child node in the tree data structure, determining whether the number of preforms inserted into the first child node exceeds a set threshold;
[0029] When the number of preforms inserted into the first subnode exceeds a set threshold, splitting the first subnode into a set number of second subnodes;
[0030] Allocate the third preform to the corresponding second child node.
[0031] According to a second aspect of the present disclosure, there is also provided a data processing device for a virtual scene, comprising:
[0032] A response module, configured to respond to a display instruction of a first scene area of a virtual scene and determine that a target prefabricated body in the virtual scene is located in the first scene area;
[0033] A rendering module is used to render an image of the target preform according to feature data about the target preform in the preloaded data when the preloaded data of the virtual scene reflects that the target preform has set restriction conditions; wherein the restriction conditions include restricting any object in the virtual scene from having an associated relationship with the target preform.
[0034] According to a third aspect of the present disclosure, a computer system is also provided, the computer system includes a processor, when the processor executes a program instruction or code, the computer system implements the game scene control method in the first aspect. Exemplarily, the computer system also includes a memory, the memory is used to store the program instruction or code.
[0035] According to a fourth aspect of the present disclosure, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned virtual scene data processing method when running.
[0036] According to a fifth aspect of the present disclosure, there is also provided a computer program product, comprising a game program, wherein when the game program is executed, the computer executes the steps of the above-mentioned virtual scene data processing method.
[0037] According to a sixth aspect of the present disclosure, there is also provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the data processing method of the virtual scene through the computer program.
[0038] One beneficial effect of the embodiment of the present disclosure is that the data processing method of the virtual scene provided by the embodiment of the present disclosure can respond to the display instruction of the first scene area and determine that the target prefabricated body in the virtual scene is located in the first scene area. When it is determined through preloaded data that the target prefabricated body has the set restriction condition, the feature data about the target prefabricated body in the preloaded data is directly used to render the image of the target prefabricated body, which can effectively reduce the overhead during the game operation.
[0039] Features and advantages of the embodiments of the present specification will become apparent from the following detailed description of exemplary embodiments of the present specification with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the specification and, together with the description, serve to explain the principles of the embodiments of the specification.
[0041] Figure 1 A schematic diagram showing the hardware structure of an electronic device that can be used to implement the data processing method for a virtual scene according to an embodiment of the present disclosure;
[0042] Figure 2 A schematic flow chart of a method for processing data of a virtual scene according to some embodiments is shown;
[0043] Figure 3 A schematic diagram showing the structure of a data processing device for a virtual scene according to some embodiments;
[0044] Figure 4 A schematic diagram of the hardware structure of an electronic device according to some embodiments is shown. DETAILED DESCRIPTION
[0045] Various exemplary embodiments of the present specification will now be described in detail with reference to the accompanying drawings.
[0046] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the embodiments of the present specification and its application or uses.
[0047] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0048] It should be noted that all actions of acquiring signals, data or data in the embodiments of the present disclosure are performed in compliance with the corresponding data protection laws and policies of the country where they are located, and with the authorization given by the corresponding device owner.
[0049] The disclosed embodiment provides a new data processing solution for virtual scenes, which allows for determining the prefabricated objects in a scene area of the virtual scene when the scene area needs to be displayed, and for some prefabricated objects that meet the restriction conditions, these prefabricated objects can be directly rendered, effectively reducing the overhead during the game operation process.
[0050] Figure 1 A schematic diagram of the hardware structure of an electronic device that can be used to implement the data processing method for a virtual scene according to an embodiment of the present disclosure is shown.
[0051] The electronic device 1000 is a device capable of running a game, and the game may be a local application installed on the electronic device, or a web game, a light application, or a small program, etc., which is not limited here. The electronic device 1000 may be a mobile phone, a tablet computer, a PC, etc., which is not limited here.
[0052] like Figure 1 As shown, the electronic device 1000 may include a processor 1101, a memory 1102, an interface device 1103, a communication device 1104, an output device 1105, an input device 1106, and the like. Figure 1 The hardware configuration shown is merely illustrative and is in no way intended to limit the present disclosure, its application, or uses.
[0053] The processor 1101 is used to execute a computer program, which can be written in an instruction set of an architecture such as x86, Arm, RISC, MIPS, SSE, etc. The memory 1102 includes, for example, ROM (read-only memory), RAM (random access memory), a non-volatile memory such as a hard disk, etc. The interface device 1103 includes, for example, a USB interface, a network cable interface, a headphone interface, etc. The communication device 1104 is capable of wired or wireless communication, for example, and the communication device 1104 may include at least one short-range communication module, for example, any module for short-range wireless communication based on short-range wireless communication protocols such as Hilink protocol, WiFi (IEEE 802.11 protocol), Mesh, Bluetooth, ZigBee, Thread, Z-Wave, NFC, UWB, LiFi, etc. The communication device 1104 may also include a remote communication module, for example, any module for WLAN, GPRS, 2G / 3G / 4G / 5G remote communication. The output device 1105 may include, for example, a liquid crystal display or a touch display, a speaker, etc. The input device 1106 may include, for example, a touch screen, a keyboard, a microphone, various sensors, etc.
[0054] In this embodiment, the memory 1102 of the electronic device 1000 is used to store a computer program, and the computer program is used to control the processor 1101 to operate so as to execute the data processing method of the virtual scene according to any embodiment of the present disclosure.
[0055] Next, Figure 1 Taking the electronic device 1000 as an example of an implementation subject, various embodiments of the data processing method of the virtual scene are explained.
[0056] <First Embodiment>
[0057] Figure 2 A data processing method for a virtual scene according to some embodiments is shown. The data processing method for a virtual scene may include the following steps S210 and S220:
[0058] Step S210 , in response to a display instruction of a first scene area of a virtual scene, determining that a target prefab in the virtual scene is located in the first scene area.
[0059] In this embodiment, the display instruction can be triggered by the user's operation, for example, the user triggers the display instruction by performing a drag gesture operation on the touch screen of the electronic device, or it can be triggered when the game process reaches a set game node, for example, the game system triggers the display instruction after the user completes a game task.
[0060] In this embodiment, the first scene area of the virtual scene may be the scene area displayed after switching from the previous second scene area on the user interface, or may be the initial scene area of the virtual scene when the user starts the game.
[0061] In this embodiment, the prefabricated object is a virtual object set in the virtual scene before the game is run, and the prefabricated object is, for example, a virtual mountain, a virtual tree, or a virtual character, etc. The prefabricated object can be set at a fixed position in the virtual scene, and the prefabricated object can also move from a set starting position in the virtual scene according to a set moving route.
[0062] In some examples, determining that a target preform in a virtual scene is located in the first scene area may be: determining a time node for displaying the virtual scene; determining a preform located in the first scene area at the time node based on the characteristic data of each preform in the virtual scene, and using it as the target preform. The characteristic data of each preform includes the moving start time, moving start position, moving route and moving speed of the dynamic preform. Determining whether a dynamic preform among the preforms is located in the first scene area at the time node may be: determining that the dynamic preform moves to the first position of the moving route at the time node based on the time difference between the moving start time and the time node and the moving speed; when the first position is within the first scene area, using the dynamic preform as the target preform.
[0063] Step S220, when the preloaded data of the virtual scene reflects that the target prefabricated body has set restriction conditions, image rendering is performed on the target prefabricated body according to the feature data about the target prefabricated body in the preloaded data; wherein the restriction conditions include restricting any object in the virtual scene from having an associated relationship with the target prefabricated body.
[0064] In this embodiment, any object in the virtual scene is, for example, a virtual character, a building, a road, a mountain or other virtual objects.
[0065] In this embodiment, the game client may be configured with preload information, which may include information about game terrain, game elements, player interactive areas, virtual characters, virtual obstacles, virtual pick-up objects, etc.
[0066] In this embodiment, the set restriction conditions correspond to prefabricated bodies that do not require logical processing, and prefabricated bodies that require logical processing and prefabricated bodies that do not require logical processing can be distinguished in the preloaded data. For example, the virtual character A1 is a prefabricated body that requires logical processing, and the virtual animal B1 is a prefabricated body that does not require logical processing. Then, the virtual character A1 configuration identifier T1 can be stored in the preloaded data, and the virtual animal B1 configuration identifier T0 can be stored, so that the game client can directly render the image for the prefabricated body with identifier T0.
[0067] The data processing method for the virtual scene according to the first embodiment of the present invention solves the problem in the prior art that the existing data is traversed, the virtual objects whose coordinates are within the visible area of the user interface are determined in the existing data, and the virtual objects within the visible area of the user interface are logically processed and then image rendered, which makes the game costly. Based on this method, in response to the display instruction of the first scene area, it is determined that the target prefabricated body in the virtual scene is located in the first scene area. When it is determined through the preloaded data that the target prefabricated body has the set restriction conditions, the feature data about the target prefabricated body in the preloaded data is directly used to render the image of the target prefabricated body, which can effectively reduce the cost during the game operation.
[0068] <Second Embodiment>
[0069] In this embodiment, in order to realize image rendering of the preform that needs logic processing, a logic processor is provided, and the logic processor is used to perform logic calculation on the preform that needs logic processing, and then image rendering is performed on the preform after logic processing.
[0070] In these embodiments, relative to the first embodiment, after step S210, the method further includes the following steps S310 to S330:
[0071] Step S310 , when the preloaded data of the virtual scene reflects that the target prefab has an association relationship with the first object in the virtual scene, inputting feature data about the target prefab in the preloaded data into the logic processor.
[0072] In some examples, prefabricated objects that require logical processing and prefabricated objects that do not require logical processing can be distinguished in the preload data. For example, virtual character A1 is a prefabricated object that requires logical processing, and virtual animal B1 is a prefabricated object that does not require logical processing. Then, the virtual character A1 configuration identifier T1 and the virtual animal B1 configuration identifier T0 can be stored in the preload data, so that the game client can input the characteristic data of the prefabricated object with identifier T1 into the logical processor for the prefabricated object with identifier T1.
[0073] Step S320: Performing logic calculation processing on the target preform through a logic processor to obtain a processing result.
[0074] In this embodiment, the logic processor can notify the logic script of the storage location of the preform with identification T1, so that the logic script can automatically perform logical calculation processing on the preform with identification T1, and obtain parameter data representing the lighting effect, texture, shadow, etc. of the preform with identification T1 as the processing result.
[0075] Step S330: performing image rendering on the target prefabricated body according to the processing result.
[0076] In this embodiment, the game client can perform image rendering on the target prefab based on parameter data representing the lighting effect, texture, shadow, etc. of the prefab with identification T1.
[0077] <Third Embodiment>
[0078] In this embodiment, in order to input the state description information of the target preform that requires logical processing into the logic manager for more accurate image rendering of the target preform, the position information and unique identifier of the preform that requires logical processing can be determined, and the attribute table of the preform that requires logical processing can be queried based on the position information and the unique identifier to obtain the state description information of the preform that requires logical processing.
[0079] In these embodiments, relative to the above second embodiment, step S310 may further include the following steps S310 to S330:
[0080] Step S310, determining the location information and unique identifier of the target preform in the preloaded data.
[0081] In this embodiment, the position and unique identification ID of the target preform can be obtained by extracting the preloaded data.
[0082] Step S320, in the preloaded data, query the attribute table of the target preform through the position information and the unique identifier, and obtain the state description information of the target preform.
[0083] In this embodiment, in the preloaded data, the property table attached to the target preform can be queried through the position information and the unique identification ID, and then the complete state description of the target preform, that is, the state description information, can be obtained.
[0084] Step S330: input the state description information of the target preform into the logic processor.
[0085] In this embodiment, the game client can input the status description information of the marker prefab into a higher-level logic processor, which can reduce the consumption of game management resources while ensuring a good visual experience.
[0086] <Fourth Embodiment>
[0087] In this embodiment, in order to improve the efficiency of locating virtual objects, an offline tree data structure is constructed and saved in a file. When reading in real time, the virtual scene is quickly constructed by only reading the file to achieve better practical performance.
[0088] In these embodiments, relative to the first embodiment, before step S210, the method may further include the following steps S410 to S430:
[0089] Step S410 , in response to the instruction to create the virtual scene, determining each prefabricated object configured in the virtual scene and the configuration type of each prefabricated object.
[0090] In this embodiment, each prefabricated object is, for example, a virtual character, a virtual obstacle, a virtual pick-up object, or a virtual mountain, etc. Each prefabricated object has a configuration type, and the configuration type of each prefabricated object can be set manually, which is not limited here.
[0091] Step S420, configuring the set restriction condition for the first preform of the first configuration type among the preforms; wherein the configuration type includes the first configuration type.
[0092] For example, if virtual character A and virtual character B are of the first configuration type, and virtual character C is of the second configuration type, then virtual character A and virtual character B are configured with the restriction condition. For another example, if virtual character A-virtual character C are of the first configuration type, and the virtual mountain is of the second configuration type, then virtual character A-virtual character C are configured with the restriction condition.
[0093] Step S430, inserting each prefabricated body into a preset tree data structure to obtain preloaded data of the virtual scene.
[0094] In this embodiment, the attribute data structure is, for example, a quadtree, an octree, etc., preferably a quadtree.
[0095] In this embodiment, after each prefabricated body is inserted into the preset tree data structure, the tree data structure is saved in a file as preloaded data of the virtual scene. In addition, during real-time reading, the virtual scene is quickly constructed by only reading the file to achieve better practical performance.
[0096] <Fifth Embodiment>
[0097] In this embodiment, in order to further save storage resources of the game client, a sharing identifier is set for the preloaded data of some prefabricated bodies that can share data, so that some duplicate preloaded data can be deleted and retrieved through the sharing identifier.
[0098] In these embodiments, relative to the fourth embodiment, after step S430, the method may further include the following steps S510 to S540:
[0099] Step S510: determining a second preform of the same configuration type among the preforms.
[0100] In this embodiment, the two second prefabricated bodies of the same configuration type are, for example, two virtual characters or a virtual river and a virtual lake that are both game backgrounds.
[0101] Step S520: determining first preloaded data about the second preform in the preloaded data.
[0102] In this embodiment, in the preloaded data, the first preloaded data on the second preform may be determined by features such as the name, serial number or identification of the second preform.
[0103] Step S530: determining second preloaded data of a set type in the first preloaded data.
[0104] In this embodiment, the setting type is, for example, a model file path, a material attribute, etc. That is, in the first preloaded data, second preloaded data of the type of model file path, material attribute, etc. can be screened out.
[0105] Step S540: establish an association relationship between the second preloaded data and the set sharing identifier, and store the association relationship in the preloaded data of the virtual scene.
[0106] In this embodiment, the sharing identifier is, for example, a number, a string, or a text, etc., which is not limited here. The sharing identifier is assigned to the second preloaded data to establish an association relationship with the second preloaded data.
[0107] <Sixth Embodiment>
[0108] In this embodiment, in order to realize the construction of preloaded data of the virtual scene, each prefabricated body can be sequentially inserted into the corresponding child node in the preset tree data structure, and then the characteristic information of the prefabricated body on the child node can be obtained.
[0109] In these embodiments, relative to the fourth embodiment, after step S430, the method may further include the following steps S610 and S620:
[0110] Step S610, inserting each preform into a corresponding child node in a preset tree data structure in sequence, and obtaining feature information of the preform on the child node.
[0111] In this embodiment, the tree data structure can be set with a maximum number of objects that each child node can accommodate. And, according to predefined rules, each prefabricated body is inserted into the tree data structure in sequence. In this process, the specific object ID and its unique attribute value involved in each insertion operation are recorded and used as the feature information of the prefabricated body on the child node.
[0112] Step S620, obtaining preloaded data of the virtual scene according to the position information of the child node in the tree data structure and the feature information of the prefabricated object on the child node.
[0113] In this embodiment, by using a depth-first traversal algorithm, each node in the tree data structure is accessed from top to bottom, and the position information of the child node in the tree data structure and the feature information of the preform on the child node are converted into a form that is easy to transmit and stored. At the same time, appropriate compression technology is used to reduce the volume of the final output data.
[0114] <Seventh Embodiment>
[0115] In this embodiment, in order to insert the preforms into the tree data structure, a subnode in which the number of inserted preforms exceeds a set threshold may be split so that the preforms can be inserted into the split second subnode.
[0116] In these embodiments, relative to the fourth embodiment, after step S430, the method may further include the following steps S710 to S730:
[0117] Step S710, when the third preform is inserted into the first child node in the tree data structure, it is determined whether the number of preforms inserted into the first child node exceeds a set threshold.
[0118] In this embodiment, in the tree data structure, a first child node including the location of the third preform is determined, and the third preform is inserted into the first child node in the tree data structure.
[0119] In this embodiment, the set threshold may be set according to the characteristics of the tree data structure, which is not limited here.
[0120] Step S720: when the number of prefabricated bodies inserted into the first sub-node exceeds a set threshold, the first sub-node is split into a set number of second sub-nodes.
[0121] In this embodiment, when the tree data structure is a quadtree, if the first child node reaches a set threshold, then the first child node can be split into four second child nodes.
[0122] Step S730: Allocate the third preform to the corresponding second child node.
[0123] In some examples, the tree data structure is a quadtree, for example, and when the first child node reaches a set threshold, the first child node is automatically divided into four smaller sub-regions (i.e., 2x2 grids), i.e., four second child nodes. The third prefabricated body in the first node is reallocated to a suitable second child node according to the new boundary conditions, and when the prefabricated bodies in the first child node are properly placed, the construction of the entire quadtree is completed.
[0124] <Device Example>
[0125] Figure 3 FIG. 2 shows a schematic diagram of the structure of a data processing device for a virtual scene according to an embodiment of the present disclosure. Figure 3 As shown, the data processing device 300 of the virtual scene includes a response module 310 and a rendering module 320 .
[0126] The response module 310 is used to respond to the display instruction of the first scene area of the virtual scene and determine that the target prefabricated body in the virtual scene is located in the first scene area;
[0127] The rendering module 320 is used to render an image of the target preform according to feature data about the target preform in the preloaded data when the preloaded data of the virtual scene reflects that the target preform has set restrictions; wherein the restrictions include restricting any object in the virtual scene from having an associated relationship with the target preform.
[0128] In some embodiments, the data processing device 300 of the virtual scene also includes a logic module, which is used to input feature data about the target preform in the preloaded data into the logic processor when the preloaded data of the virtual scene reflects that the target preform has an association relationship with the first object in the virtual scene; perform logical calculation processing on the target preform through the logic processor to obtain a processing result; and perform image rendering on the target preform according to the processing result.
[0129] In some embodiments, the logic module is also used to determine the position information and unique identifier of the target preform in the preloaded data; in the preloaded data, query the attribute table of the target preform through the position information and the unique identifier, and obtain the state description information of the target preform; input the state description information of the target preform into the logic processor.
[0130] In some embodiments, the data processing device 300 of the virtual scene also includes a creation module, which is used to respond to the creation instruction of the virtual scene, determine the prefabricated bodies and the configuration type of each prefabricated body configured in the virtual scene; set restriction conditions for the first prefabricated body of the first configuration type in each prefabricated body; wherein the configuration type includes the first configuration type; and insert each prefabricated body into a preset tree data structure to obtain preloaded data of the virtual scene.
[0131] In some embodiments, the data processing device 300 of the virtual scene also includes a sharing module, which is used to determine a second preform of the same configuration type among the preforms; determine the first preloaded data about the second preform in the preloaded data; determine the second preloaded data of a set type in the first preloaded data; establish an association relationship between the second preloaded data and the set sharing identifier, and store the association relationship in the preloaded data of the virtual scene.
[0132] In some embodiments, the creation module is also used to insert each preform into the corresponding child node in the preset tree data structure in turn to obtain the characteristic information of the preform on the child node; and obtain the preloaded data of the virtual scene based on the position information of the child node in the tree data structure and the characteristic information of the preform on the child node.
[0133] In some embodiments, the data processing device 300 of the virtual scene also includes a splitting module, which is used to determine whether the number of preforms inserted into the first child node exceeds a set threshold when the third preform is inserted into the first child node in the tree data structure; when the number of preforms inserted into the first child node exceeds the set threshold, split the first child node into a set number of second child nodes; and allocate the third preform to the corresponding second child node.
[0134] <Equipment Embodiment>
[0135] Figure 4 FIG. 1 shows a schematic diagram of the hardware structure of an electronic device according to some other embodiments. Figure 4 As shown, the electronic device 400 includes a processor 410 and a memory 420, wherein the memory 420 is used to store a computer program, and the computer program is used to control the processor 410 to operate so as to control the electronic device 400 to execute the data processing method of the virtual scene according to any embodiment of the present disclosure.
[0136] An embodiment of the present disclosure further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the computer program implements the data processing method of the virtual scene according to any embodiment of the present disclosure.
[0137] The disclosed embodiment also provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the data processing method of the virtual scene according to any disclosed embodiment is implemented. The computer program product is, for example, a game client.
[0138] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and equipment embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0139] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0140] The embodiments of the present specification may be devices, methods and / or computer program products. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the embodiments of the present specification.
[0141] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0142] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0143] The computer program instructions for executing the operation of the embodiments of this specification may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or the first code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, executed as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, by utilizing the state data of a computer-readable program instruction to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit may execute a computer-readable program instruction, thereby realizing various aspects of the embodiments of this specification.
[0144] Various aspects of the embodiments of the present specification are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (equipment) and computer program products according to the embodiments of the present specification. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0145] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0146] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0147] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of this specification. In this regard, each box in the flowchart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.
[0148] The embodiments of the present specification have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations are obvious to those of ordinary skill in the art without departing from the scope of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for processing data of a virtual scene, the method comprising: In response to a display instruction of a first scene area of a virtual scene, determining that a target prefab in the virtual scene is located in the first scene area; When the preloaded data of the virtual scene reflects that the target preform has set restriction conditions, image rendering is performed on the target preform according to the feature data about the target preform in the preloaded data; wherein the restriction conditions include limiting any object in the virtual scene to have an associated relationship with the target preform.
2. The method according to claim 1, wherein: The method further comprises: When the preloaded data of the virtual scene reflects that the target preform has an association relationship with the first object in the virtual scene, inputting feature data about the target preform in the preloaded data into a logic processor; By means of the logic processor, logic calculation processing is performed on the target preform to obtain a processing result; According to the processing result, image rendering is performed on the target prefabricated body.
3. The method according to claim 2, wherein: The step of inputting the characteristic data about the target preform in the preloaded data into the logic processor comprises: Determining the position information and unique identifier of the target preform in the preloaded data; In the preloaded data, query the attribute table of the target preform through the location information and the unique identifier, and obtain the state description information of the target preform; The state description information of the target preform is input into the logic processor.
4. The method according to claim 1, wherein: The method further comprises: In response to a virtual scene creation instruction, determining each prefabricated object configured in the virtual scene and a configuration type of each prefabricated object; Setting a restriction condition for a first preform configuration of a first configuration type among the preforms; wherein the configuration type includes the first configuration type; Insert each prefabricated body into a preset tree data structure to obtain preloaded data of the virtual scene.
5. The method according to claim 4, wherein: The method further comprises: Determining a second preform of the same configuration type among the preforms; Determining, in the preloaded data, first preloaded data about the second preform; Determining second preloaded data of a set type in the first preloaded data; An association relationship is established between the second preloaded data and the set sharing identifier, and the association relationship is stored in the preloaded data of the virtual scene.
6. The method according to claim 4, wherein: The inserting of each prefabricated body into a preset tree data structure to obtain preloaded data of the virtual scene includes: Inserting each of the prefabricated bodies into a corresponding child node in a preset tree data structure in sequence, and obtaining characteristic information of the prefabricated body on the child node; The preloaded data of the virtual scene is obtained according to the position information of the child node in the tree data structure and the feature information of the prefabricated object on the child node.
7. The method according to claim 4, wherein: The method further comprises: When the third preform is inserted into the first child node in the tree data structure, determining whether the number of preforms inserted into the first child node exceeds a set threshold; When the number of preforms inserted into the first subnode exceeds a set threshold, splitting the first subnode into a set number of second subnodes; Allocate the third preform to the corresponding second child node.
8. A data processing device for a virtual scene, wherein: include: A response module, configured to respond to a display instruction of a first scene area of a virtual scene and determine that a target prefabricated object in the virtual scene is located in the first scene area; A rendering module is used to render an image of the target preform according to feature data about the target preform in the preloaded data when the preloaded data of the virtual scene reflects that the target preform has set restriction conditions; wherein the restriction conditions include restricting any object in the virtual scene from having an associated relationship with the target preform.
9. An electronic device, wherein: The method comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the method steps according to any one of claims 1 to 7 under the control of the computer program.
10. A computer-readable storage medium, the computer-readable storage medium comprising a stored computer program, wherein: When the computer program is executed, the method steps of any one of claims 1 to 7 are performed.