Virtual scene display method and device, medium, and electronic device
By identifying and matching voxel block information of virtual scenes, a target virtual scene is generated, which solves the problem of incomplete display of virtual scenes in different versions or applications, and achieves efficient virtual scene reproduction and display.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING ZITIAO NETWORK TECH CO LTD
- Filing Date
- 2023-11-29
- Publication Date
- 2026-06-19
AI Technical Summary
In game scenes, due to differences in voxel blocks between different versions or applications, virtual scenes are difficult to display completely.
By acquiring voxel data of the virtual scene, identifying the definition and location information of each original voxel block, using a natural language model to determine the original semantics, and matching the target voxel block with the target semantics of the preset voxel block to generate the target virtual scene.
It improves the accuracy and completeness of virtual scene display across different versions or programs, and enhances the responsiveness and consistency of virtual scene display.
Smart Images

Figure CN117654029B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more specifically, to a method, apparatus, medium, and electronic device for displaying virtual scenes. Background Technology
[0002] In game scenarios, players can build their own virtual scenes, such as game maps and environments, thereby increasing the interactivity of the game. However, in practical applications, when these virtual scenes are opened in different versions, the voxel blocks in different versions may differ, making it difficult for the virtual scene to be displayed completely. Summary of the Invention
[0003] This summary section is provided to briefly introduce the concepts, which will be described in detail in the detailed description section below. This summary section is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0004] Firstly, this disclosure provides a method for displaying a virtual scene, the method comprising:
[0005] In response to a virtual scene display command, the voxel data corresponding to the virtual scene is obtained;
[0006] Identify the voxel block information of each original voxel block in the voxel data, wherein the voxel block information includes the definition information and location information of the original voxel block;
[0007] The original semantics of the original voxel block are determined based on the definition information of the original voxel block;
[0008] Based on the original semantics of the original voxel block and the target semantics of multiple preset voxel blocks, the target voxel block corresponding to each original voxel block is determined from the preset voxel blocks.
[0009] Based on the position information of each original voxel block in the voxel data and the target voxel block corresponding to the original voxel block, a target virtual scene is generated and displayed.
[0010] Secondly, this disclosure provides a virtual scene display device, the device comprising:
[0011] The acquisition module is used to acquire voxel data corresponding to the virtual scene in response to the virtual scene display command;
[0012] The identification module is used to identify the voxel block information of each original voxel block in the voxel data, wherein the voxel block information includes the definition information and location information of the original voxel block;
[0013] The first determining module is used to determine the original semantics of the original voxel block based on the definition information of the original voxel block;
[0014] The second determining module is used to determine the target voxel block corresponding to each original voxel block from the preset voxel blocks based on the original semantics of the original voxel block and the target semantics of multiple preset voxel blocks.
[0015] The processing module is used to generate and display a target virtual scene based on the position information of each original voxel block in the voxel data and the target voxel block corresponding to the original voxel block.
[0016] Thirdly, this disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect.
[0017] Fourthly, this disclosure provides an electronic device, comprising:
[0018] A storage device on which computer programs are stored;
[0019] A processing device for executing the computer program in the storage device to implement the steps of the method described in the first aspect.
[0020] In the above technical solution, voxel data of the virtual scene is acquired. This voxel data includes voxel block information corresponding to multiple original voxel blocks constituting the virtual scene. The voxel block information can characterize the block attributes of the original voxel blocks in the virtual scene, such as positional attributes and semantic attributes. Then, by identifying the voxel block information of each original voxel block and determining the target voxel block matching the original voxel block based on the obtained original semantics and the target semantics of each preset voxel block, the target voxel block is determined more accurately and efficiently. This allows multiple original voxel blocks to be replaced with the matching target voxel blocks, generating a target virtual scene for display. Since the determined target voxel block is a voxel block that semantically matches the original voxel block, the accuracy and completeness of the displayed target virtual scene are improved when the constructed virtual scene is opened in different versions or different programs, realizing the reproduction of the virtual scene. At the same time, this disclosure automatically identifies the voxel block information of the original voxel blocks, enabling the target voxel block to be determined more efficiently based on the original semantics, further improving the response efficiency of the virtual scene display.
[0021] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0022] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale. In the drawings:
[0023] Figure 1 A flowchart of a virtual scene display method provided by an embodiment of this disclosure is shown;
[0024] Figure 2 A flowchart is shown below illustrating another virtual scene display method provided by an embodiment of this disclosure;
[0025] Figure 3 A block diagram of a virtual scene display device provided in an embodiment of this disclosure is shown;
[0026] Figure 4 A schematic diagram of the structure of an electronic device suitable for implementing embodiments of the present disclosure is shown. Detailed Implementation
[0027] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0028] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0029] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0030] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0031] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0032] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0033] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0034] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0035] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0036] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0037] Meanwhile, it is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.
[0038] Figure 1 The diagram shown is a flowchart of a virtual scene display method according to one embodiment of the present disclosure. Figure 1 As shown, the method may include:
[0039] In step 11, in response to the virtual scene display instruction, the voxel data corresponding to the virtual scene is obtained.
[0040] The voxel data of the virtual scene was obtained with authorization.
[0041] In one possible embodiment, the user can select the corresponding virtual scene in the current application and select to open it to trigger a virtual scene display instruction. In response to the virtual scene display instruction, the voxel data corresponding to the virtual scene can be obtained. The voxel data may contain voxel block information of each original voxel block in the virtual scene. The original voxel blocks are used to represent the voxel blocks used when creating the virtual scene.
[0042] In step 12, the voxel block information of each original voxel block in the voxel data is identified, and the voxel block information includes the definition information and location information of the original voxel block.
[0043] The definition information of the original voxel block can include one or more words in natural language, that is, the definition information can be mapped to real objects in the real world. For example, the definition information can include ground, mountains, etc.; the location information can be the coordinate information of the center point of the original voxel block in the spatial coordinate system. The spatial coordinate system can be a three-dimensional coordinate system constructed with a preset origin in the virtual scene.
[0044] In one possible scenario, user A creates a virtual scene S in the first version of the application. Later, user A may have the second version of the application installed on another terminal. When the virtual scene is opened in different versions, the voxel blocks in the different versions may be different, making it difficult for the virtual scene to be displayed completely.
[0045] In another possible scenario, user A creates a virtual scene S in the application. User B, while playing the game, may want to copy user A's virtual scene. However, since different users may have custom voxel blocks when building virtual scenes, directly copying and displaying the virtual scene may make it difficult to display the virtual scene completely.
[0046] In another possible scenario, user A creates a virtual scene S in application P1. During the game, user B may see user A's virtual scene and want to copy it to application P2 for display. However, since the definition of voxel blocks may differ in different applications, directly copying and displaying the virtual scene may result in the virtual scene not being displayed completely.
[0047] Based on this, in order to facilitate the complete and effective display of the virtual scene in the above scenario, in this disclosure, the voxel block information of each original voxel block in the voxel data can be identified first, thereby obtaining the definition information used to represent each original voxel block.
[0048] As an example, the voxel data corresponds to a read type, and the voxel block information for identifying each original voxel block in the voxel data may include:
[0049] For each original voxel block, the voxel block information of the original voxel block is read and identified using the data reading method corresponding to the reading type.
[0050] For example, the voxel data of the virtual scene is generated within the first program. Therefore, the voxel data of the virtual scene is data that matches the first data format of the first program. That is, the data storage format indicated by the first program is the first data format, and the reading type corresponding to the voxel data is the first data format.
[0051] Accordingly, the voxel block information of the original voxel block can be read and identified based on the data reading method corresponding to the reading type, ensuring the accuracy of data reading of the original voxel block, thereby ensuring the accuracy of identification.
[0052] As an example, the voxel block information can also include state information, which can include a description of the original voxel block's state. The state information can be determined according to actual needs, such as color, material, whether it is covered by snow, rain, etc.
[0053] In step 13, the original semantics of the original voxel block are determined based on the definition information of the original voxel block.
[0054] The original semantics of the original voxel block are used to represent the features represented by the original voxel block when building a virtual scene based on the original voxel block. As mentioned above, it can be ground, mountains, etc.
[0055] As an example, the trained natural language model can be used to identify voxel block information and obtain the original semantics corresponding to the original voxel block. This natural language model can be trained based on training methods commonly used in this field, and there are no limitations on this.
[0056] As another example, in game applications, there are usually multiple pre-defined basic definitions for voxel blocks. For example, voxel blocks corresponding to basic types such as mountains, rivers, and plains are set. If a user selects a plain type voxel block when building a scene, the definition information will include the basic definition (such as the plain type). Correspondingly, the basic definition corresponding to the voxel block in the definition information can also be used as its original semantics.
[0057] In step 14, based on the original semantics of the original voxel block and the target semantics of multiple preset voxel blocks, the target voxel block corresponding to each original voxel block is determined from the preset voxel blocks.
[0058] Among them, multiple pre-set voxel blocks are pre-set in the current display environment system, and each of them has a corresponding target semantic. The target semantic is used to represent the mapping between the pre-set voxel block and real objects in the real world.
[0059] In this step, the target voxel block corresponding to each original voxel block can be determined by matching the original semantics with the target semantics, thus realizing the one-to-one mapping transformation of the original voxel blocks in the current display environment.
[0060] In step 15, a target virtual scene is generated and displayed based on the position information of each original voxel block in the voxel data and the target voxel block corresponding to the original voxel block. This target virtual scene represents the virtual scene generated in the current display program based on the voxel data of that virtual scene. The current display program is the application program that executes the virtual scene display instructions accordingly.
[0061] Specifically, for each original voxel block in the virtual scene, it can be mapped and displayed in the current display program using its corresponding target voxel block. Simultaneously, based on the position information of the original voxel block, the position of its corresponding target voxel block can be determined, thus identifying the target virtual scene for display, thereby achieving the reproduction and display of the virtual scene. The scene displayed during the construction of this virtual scene is the original virtual scene. This disclosure effectively ensures consistency between the generated target virtual scene and the original virtual scene through the above method.
[0062] In the above technical solution, voxel data of the virtual scene is acquired. This voxel data includes voxel block information corresponding to multiple original voxel blocks constituting the virtual scene. The voxel block information can characterize the block attributes of the original voxel blocks in the virtual scene, such as positional attributes and semantic attributes. Then, by identifying the voxel block information of each original voxel block and determining the target voxel block matching the original voxel block based on the obtained original semantics and the target semantics of each preset voxel block, the target voxel block is determined more accurately and efficiently. This allows multiple original voxel blocks to be replaced with the matching target voxel blocks, generating a target virtual scene for display. Since the determined target voxel block is a voxel block that semantically matches the original voxel block, the accuracy and completeness of the displayed target virtual scene are improved when the constructed virtual scene is opened in different versions or different programs, realizing the reproduction of the virtual scene. At the same time, this disclosure automatically identifies the voxel block information of the original voxel blocks, enabling the target voxel block to be determined more efficiently based on the original semantics, further improving the response efficiency of the virtual scene display.
[0063] In one possible application scenario, the virtual scene can be generated by a developer or built by a user. If the virtual scene is built by a user, the semantics indicated in the voxel block information of the original voxel block of the virtual scene may include custom semantic content, such as semantics specific to the first program used for scene building or user-defined semantics. This custom semantic content may make it difficult to accurately identify and determine its original semantics during subsequent voxel block information identification. To alleviate the above problems, this disclosure provides the following embodiments.
[0064] As an example, an exemplary implementation of determining the original semantics of the original voxel block based on its definition information may include:
[0065] Identify whether the voxel block information of the original voxel block contains definition prompt information.
[0066] Specifically, if the original voxel block contains custom semantic content, the voxel block information can include definition hints corresponding to that custom semantic content to further explain the mapping between the original voxel block and the real-world object. As an example, these definition hints can be represented by a prompt to indicate the custom semantic content.
[0067] For example, the definition prompt information may correspond to an attribute field in the voxel block information. Then, it can be determined whether the definition prompt information is contained by identifying whether there is corresponding data in the field. If the field contains data, it is considered that the voxel block information contains the definition prompt information, and the data corresponding to the field is the content of the definition prompt information. If the field data is empty, it is considered that the voxel block information does not contain the definition prompt information. In this case, the original semantics can be directly identified based on the definition information.
[0068] If the original voxel block information contains the definition hint information, then the original semantics of the original voxel block is determined based on the definition information of the original voxel block and the definition hint information.
[0069] As an example, the trained natural language model can be used to identify the definition information and the definition prompt information to obtain the original semantics corresponding to the original voxel block. This natural language model can be trained based on training methods commonly used in this field, and there are no limitations on this.
[0070] The definition hints can indicate the semantic content of the custom semantic content of the original voxel block. For example, if the custom semantic content is a virtual character object, the definition hints in the voxel block information of the original voxel block may include: a real scene object that matches the virtual character object, such as a balloon. Therefore, based on this definition hint, it can be determined that the original semantic content can be a balloon, so that a voxel block corresponding to a balloon can be matched from the preset voxel blocks.
[0071] Alternatively, the definition prompt information can also include a description of the virtual character object, such as the color and actions of the virtual character object. For example, if the color is gray, the original semantics can be determined as a gray balloon based on the definition prompt information.
[0072] Therefore, through the above technical solution, for voxel blocks containing custom semantic content, the original semantics can be determined by defining prompt information. Based on the defined prompt information, the original voxel block can be identified more accurately, ensuring the accuracy of the original semantics while providing effective data reference for subsequently determining the target voxel block corresponding to the original voxel block.
[0073] In one possible embodiment, an exemplary implementation of determining the target voxel block corresponding to each original voxel block from the preset voxel blocks based on the original semantics of the original voxel block and the target semantics of multiple preset voxel blocks may include:
[0074] For each original voxel block, the original semantics of the original voxel block are matched with the target semantics to determine the matching degree between the original semantics and the target semantics;
[0075] If there is a target semantic with a matching degree greater than the matching threshold, then the preset voxel block corresponding to the target semantic with the highest matching degree is determined as the target voxel block corresponding to the original voxel block.
[0076] Furthermore, the step of determining the target voxel block corresponding to each original voxel block from the preset voxel blocks based on the original semantics of the original voxel block and the target semantics of multiple preset voxel blocks further includes:
[0077] If there is no target semantic with a matching degree greater than the matching threshold, then the base voxel block in the preset voxel block is determined as the target voxel block corresponding to the original voxel block.
[0078] In implementation, as an example, the matching degree between two texts can be determined based on the similarity between their semantic texts. For each original voxel block, the original semantics of the original voxel block are matched with the target semantics of a predefined voxel block. For example, a predefined voxel block whose target semantics are the same as its original semantics can be identified as the target voxel block that matches the original voxel block. For instance, if both the original and target semantics are "cement floor," then the original and target semantics are the same. Alternatively, if no predefined voxel block has the same original semantics, a predefined voxel block whose target semantics are similar to its original semantics can be identified. For instance, if the original semantics are "cement floor" and the target semantics are "floor," then the predefined voxel block whose target semantics indicate "floor" is identified as the target voxel block that matches the original voxel block.
[0079] As another example, a first semantic feature vector corresponding to the original semantics and a second semantic feature vector corresponding to the target semantics can be determined. Based on the first and second semantic feature vectors, the matching degree between the original semantics and the target semantics can be determined. For example, the cosine similarity between the first and second semantic feature vectors can be determined as the matching degree, so as to determine the target voxel block in the future.
[0080] In implementation, a matching threshold can be set. The matching degree between the target semantics and the original semantics is compared with the matching threshold to determine the target voxel block to match the original voxel block. For example, the matching degree between the target semantics and the original semantics of each preset voxel block is determined. If there is a preset voxel block with a matching degree greater than the matching threshold, the preset voxel block with the highest matching degree is determined as the target voxel block to match the original voxel block. If there is no preset voxel block with a matching degree greater than the matching threshold, and it is determined that there is no target semantics similar to or the same as the original semantics, then the basic voxel block in the preset voxel block is determined as the target voxel block to match the original voxel block. The basic voxel block can be, for example, a preset voxel block with air semantics, or it can be an initialized voxel block without specific semantics, such as a blank voxel block.
[0081] By matching the original semantics of the original voxel block with the target semantics of the preset voxel block, the target voxel block that matches the original voxel block can be determined more accurately. This ensures consistency between the displayed target virtual scene and the constructed original virtual scene, thereby improving the accuracy of the virtual scene reproduction and display.
[0082] In one possible embodiment, an exemplary implementation of determining the target voxel block corresponding to each original voxel block from the preset voxel blocks based on the original semantics of the original voxel block and the target semantics of multiple preset voxel blocks may include:
[0083] Match the original semantics with the target semantics of multiple pre-set voxel blocks;
[0084] If a target semantic that is identical to the original semantic is matched, then the preset voxel block corresponding to the matched target semantic is determined as the target voxel block.
[0085] For each original voxel block, the original semantics of the original voxel block are matched with the target semantics of a preset voxel block. For example, a preset voxel block whose target semantics are the same as its original semantics can be identified as the target voxel block that matches the original voxel block. For example, if both the original semantics and the target semantics are "tree", then the preset voxel block corresponding to the matched target semantics is identified as the target voxel block. That is, the preset voxel block whose target semantics indicate "tree" is identified as the target voxel block that matches the original voxel block.
[0086] If the voxel block information of the original voxel block that matches the preset voxel block contains definition prompt information, the voxel block information of the target voxel block is determined according to the definition prompt information.
[0087] The method for determining whether voxel block information includes defined hint information has been detailed above and will not be repeated here. In this embodiment, if the voxel block information of the original voxel block that matches the preset voxel block contains defined hint information, it indicates that the voxel block information of the original voxel block contains custom semantic content. Continuing with the example above, the defined hint information can include descriptions of trees, such as trees covered with red leaves. This defined hint information can then be added to the voxel block information of the target voxel block so that the leaves can be rendered red based on this defined hint information when rendering the target voxel block. Thus, more comprehensive features can be provided for the rendering of the target voxel block through defined hint information, further improving the consistency between the displayed target virtual scene and the original content of the virtual scene during its construction, and improving the accuracy of virtual scene reproduction.
[0088] In one possible embodiment, an exemplary implementation of determining the target voxel block corresponding to each original voxel block from the preset voxel blocks based on the original semantics of the original voxel block and the target semantics of multiple preset voxel blocks may further include:
[0089] If no target semantics identical to the original semantics are matched, identify whether the voxel block information of the original voxel block contains definition prompt information;
[0090] If the original voxel block information contains the definition hint information, then the definition hint information is matched with the target semantics to determine the matching degree between the definition hint information and the target semantics.
[0091] In this process, the corresponding semantics can be obtained by identifying the definition prompt information, as detailed above. Then, the semantics can be matched with the target semantics to obtain the matching degree between the definition prompt information and the target semantics. The specific implementation method is similar to the method of determining the matching degree between the original semantics and the target semantics described above, and will not be repeated here.
[0092] Based on the matching degree, the target voxel block corresponding to the original voxel block and the voxel block information of the target voxel block are determined.
[0093] If there is a target semantic with a matching degree greater than the matching threshold, the preset voxel block corresponding to the target semantic with the highest matching degree is determined as the target voxel block corresponding to the original voxel block, and the definition prompt information is added to the voxel block information of the target voxel block to realize the feature auxiliary description of the target voxel block.
[0094] In one possible embodiment, the voxel block information further includes orientation information. When generating the target virtual scene based on the position information of each original voxel block in the voxel data and the target voxel block corresponding to that original voxel block, the target voxel block matching the original voxel block can be configured according to the orientation information of the original voxel block to generate the target virtual scene. The orientation information of the target voxel block is consistent with the orientation information of its matching original voxel block. For example, if the virtual scene includes 1000 original voxel blocks, the target voxel block matching each original voxel block can be determined, and then each target voxel block can be configured according to the orientation information indicated by the original voxel block, thus realizing the reproduction and display of the virtual scene and improving the accuracy of the virtual scene reproduction and display.
[0095] In one possible embodiment, after generating and displaying the target virtual scene based on the position information of each original voxel block in the voxel data and the target voxel block corresponding to the original voxel block, the binding method may further include:
[0096] Based on each target voxel block in the target virtual scene, and based on the determined block attribute information of the target voxel block, voxel block information of the target voxel block is generated;
[0097] Based on the voxel block information of multiple target voxel blocks, target voxel data corresponding to the target virtual scene is generated and stored.
[0098] As an example, the block attribute information of the target voxel block is determined based on the voxel block information of the original voxel block corresponding to the target voxel block.
[0099] After generating and displaying the target virtual scene, voxel block information can be determined for each target voxel block. In practice, the block attribute information of the target voxel block can be determined based on the voxel block information of the original voxel block that matches the target voxel block. For example, the voxel block information of the matched original voxel block can be used as the voxel block information of the target voxel block. Alternatively, the orientation information in the voxel block information of the matched original voxel block can be used as the target orientation information of the target voxel block, and then the block attribute information of the target voxel block can be generated based on the target orientation information and target semantics. The block attribute information of the target voxel block is then converted to a second data format to generate the voxel block information of the target voxel block, resulting in voxel block information corresponding to multiple target voxel blocks. The voxel block information of multiple target voxel blocks constitutes the target voxel data of the currently displayed target virtual scene. This target voxel data is stored so that it can be directly loaded when displaying the virtual scene later, enabling the reproduction of the virtual scene.
[0100] The first data format is related to the first program that builds the virtual scene, and the second data format is related to the second program that currently displays the virtual scene. The first and second data formats can be the same or different, and the specific content of the first and second data formats is not specifically limited here. The first and second programs can be the same or different, and this disclosure does not limit this. For example, they can be different programs, different versions of the same program, or the same version of the same program.
[0101] See Figure 2 As shown, an exemplary method for displaying a virtual scene is provided, which includes:
[0102] S201, in response to the virtual scene display command, obtains the voxel data corresponding to the virtual scene.
[0103] The voxel data is data in the first data format, which is the data format required by the first program for building the virtual scene.
[0104] S202, Traverse the three-dimensional space of the virtual scene by region.
[0105] When the spatial area of the reference 3D map is large, the reference 3D map can be divided into multiple areas, and the map can be traversed according to the areas.
[0106] S203, for each region, reads all original voxel blocks within that region.
[0107] S204, perform the identification of the original voxel block.
[0108] S205, determine whether the preset voxel blocks of the current display program contain voxel blocks with the same semantics.
[0109] If yes, then the preset voxel block with the same semantics is determined as the target voxel block corresponding to the original voxel block, and S208 is executed; otherwise, S206 is executed.
[0110] S206, determine whether the preset voxel blocks of the current display program contain voxel blocks with similar semantics.
[0111] If yes, then the preset voxel block with similar semantics is determined as the target voxel block corresponding to the original voxel block, and S208 is executed; otherwise, S207 is executed.
[0112] S207, Fill with air voxel blocks. Here, the air voxel block can be identified as the target voxel block corresponding to the original voxel block, and the voxel block can be replaced.
[0113] S208, perform block replacement. Here, the original voxel block is replaced with the target voxel block.
[0114] S209, save the area map according to the second data format.
[0115] The second data format is the data format required by the program currently displaying the virtual scene. After traversing each area, the generated virtual scene is obtained.
[0116] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0117] Based on the same inventive concept, this disclosure also provides a virtual scene display device, such as... Figure 3 As shown, the device 10 includes:
[0118] The acquisition module 100 is used to acquire voxel data corresponding to the virtual scene in response to the virtual scene display command;
[0119] The identification module 200 is used to identify the voxel block information of each original voxel block in the voxel data, wherein the voxel block information includes the definition information and location information of the original voxel block;
[0120] The first determining module 300 is used to determine the original semantics of the original voxel block based on the definition information of the original voxel block;
[0121] The second determining module 400 is used to determine the target voxel block corresponding to each original voxel block from the preset voxel blocks based on the original semantics of the original voxel block and the target semantics of multiple preset voxel blocks.
[0122] The processing module 500 is used to generate and display a target virtual scene based on the position information of each original voxel block in the voxel data and the target voxel block corresponding to the original voxel block.
[0123] Optionally, the first determining module includes:
[0124] The first identification submodule is used to identify whether the voxel block information of the original voxel block contains definition prompt information;
[0125] The first determining submodule is used to determine the original semantics of the original voxel block based on the definition information of the original voxel block and the definition prompt information if the voxel block information of the original voxel block contains the definition prompt information.
[0126] Optionally, the second determining module includes:
[0127] The second determining submodule is used to match the original semantics of each original voxel block with the target semantics, and determine the matching degree between the original semantics and the target semantics.
[0128] The third determining submodule is used to determine the preset voxel block corresponding to the target voxel block corresponding to the original voxel block if there is a target semantic with a matching degree greater than the matching threshold.
[0129] Optionally, the second determining module further includes:
[0130] The fourth determination submodule is used to determine the basic voxel block in the preset voxel block as the target voxel block corresponding to the original voxel block if there is no target semantic with a matching degree greater than the matching threshold.
[0131] Optionally, the second determining module includes:
[0132] The matching submodule is used to match the original semantics with the target semantics of multiple preset voxel blocks;
[0133] The fifth determining submodule is used to determine the preset voxel block corresponding to the matched target semantic as the target voxel block if a target semantic that is the same as the original semantic is matched.
[0134] The sixth determination submodule is used to determine the voxel block information of the target voxel block based on the definition prompt information if the voxel block information of the original voxel block that matches the preset voxel block contains definition prompt information.
[0135] Optionally, the second determining module further includes:
[0136] The second identification submodule is used to identify whether the voxel block information of the original voxel block contains definition prompt information if no target semantic with the same meaning as the original semantic is matched.
[0137] The seventh determination submodule is used to determine the matching degree between the definition prompt information and the target semantics if the voxel block information of the original voxel block contains the definition prompt information;
[0138] The eighth determination submodule is used to determine the target voxel block corresponding to the original voxel block and the voxel block information of the target voxel block based on the matching degree.
[0139] Optionally, the voxel data corresponds to a read type, and the identification module is used for:
[0140] For each original voxel block, the voxel block information of the original voxel block is read and identified using the data reading method corresponding to the reading type.
[0141] Optionally, the device further includes:
[0142] The generation module is used to generate voxel block information of the target voxel block based on each target voxel block in the target virtual scene and the target voxel block corresponding to the original voxel block in the voxel data, after the processing module generates and displays the target virtual scene based on the target voxel block in the target virtual scene and the determined block attribute information of the target voxel block.
[0143] The storage module is used to generate and store target voxel data corresponding to the target virtual scene based on the voxel block information of multiple target voxel blocks.
[0144] Optionally, the block attribute information of the target voxel block is determined based on the voxel block information of the original voxel block corresponding to the target voxel block.
[0145] The following is for reference. Figure 4 The diagram illustrates a structural schematic of an electronic device (e.g., a terminal device or a server) 600 suitable for implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0146] like Figure 4 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0147] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0148] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.
[0149] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0150] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0151] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0152] The aforementioned computer-readable medium carries one or more programs. When the electronic device executes the aforementioned one or more programs, the electronic device causes the following actions: in response to a virtual scene display instruction, to acquire voxel data corresponding to the virtual scene; to identify voxel block information of each original voxel block in the voxel data, the voxel block information including definition information and location information of the original voxel block; to determine the original semantics of the original voxel block based on the definition information of the original voxel block; to determine a target voxel block corresponding to each of the original voxel blocks from the preset voxel blocks based on the original semantics of the original voxel block and the target semantics of multiple preset voxel blocks; and to generate and display a target virtual scene based on the location information of each original voxel block in the voxel data and the target voxel block corresponding to the original voxel block.
[0153] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can 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 can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0154] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0155] The modules described in the embodiments of this disclosure can be implemented in software or in hardware. The names of the modules do not necessarily limit the module itself; for example, an acquisition module can also be described as "a module that acquires voxel data corresponding to the virtual scene in response to a virtual scene display instruction."
[0156] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0157] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0158] According to one or more embodiments of this disclosure, Example 1 provides a method for displaying a virtual scene, the method comprising:
[0159] In response to a virtual scene display command, the voxel data corresponding to the virtual scene is obtained;
[0160] Identify the voxel block information of each original voxel block in the voxel data, wherein the voxel block information includes the definition information and location information of the original voxel block;
[0161] The original semantics of the original voxel block are determined based on the definition information of the original voxel block;
[0162] Based on the original semantics of the original voxel block and the target semantics of multiple preset voxel blocks, the target voxel block corresponding to each original voxel block is determined from the preset voxel blocks.
[0163] Based on the position information of each original voxel block in the voxel data and the target voxel block corresponding to the original voxel block, a target virtual scene is generated and displayed.
[0164] According to one or more embodiments of this disclosure, Example 2 provides the method of Example 1, wherein determining the original semantics of the original voxel block based on the definition information of the original voxel block includes:
[0165] Identify whether the voxel block information of the original voxel block contains definition prompt information;
[0166] If the original voxel block information contains the definition hint information, then the original semantics of the original voxel block is determined based on the definition information of the original voxel block and the definition hint information.
[0167] According to one or more embodiments of this disclosure, Example 3 provides the method of Example 1, wherein determining the target voxel block corresponding to each of the original voxel blocks from the preset voxel blocks based on the original semantics of the original voxel block and the target semantics of a plurality of preset voxel blocks includes:
[0168] For each original voxel block, the original semantics of the original voxel block are matched with the target semantics to determine the matching degree between the original semantics and the target semantics;
[0169] If there is a target semantic with a matching degree greater than the matching threshold, then the preset voxel block corresponding to the target semantic with the highest matching degree is determined as the target voxel block corresponding to the original voxel block.
[0170] According to one or more embodiments of this disclosure, Example 4 provides the method of Example 3, wherein determining the target voxel block corresponding to each of the original voxel blocks from the preset voxel blocks based on the original semantics of the original voxel block and the target semantics of a plurality of preset voxel blocks further includes:
[0171] If there is no target semantic with a matching degree greater than the matching threshold, then the base voxel block in the preset voxel block is determined as the target voxel block corresponding to the original voxel block.
[0172] According to one or more embodiments of this disclosure, Example 5 provides the method of Example 1, wherein determining the target voxel block corresponding to each of the original voxel blocks from the preset voxel blocks based on the original semantics of the original voxel block and the target semantics of a plurality of preset voxel blocks includes:
[0173] Match the original semantics with the target semantics of multiple pre-set voxel blocks;
[0174] If a target semantic that is the same as the original semantic is matched, then the preset voxel block corresponding to the matched target semantic is determined as the target voxel block;
[0175] If the voxel block information of the original voxel block that matches the preset voxel block contains definition prompt information, the voxel block information of the target voxel block is determined according to the definition prompt information.
[0176] According to one or more embodiments of this disclosure, Example 6 provides the method of Example 5, wherein determining the target voxel block corresponding to each of the original voxel blocks from the preset voxel blocks based on the original semantics of the original voxel block and the target semantics of a plurality of preset voxel blocks further includes:
[0177] If no target semantics identical to the original semantics are matched, identify whether the voxel block information of the original voxel block contains definition prompt information;
[0178] If the original voxel block information contains the definition hint information, then the definition hint information is matched with the target semantics to determine the matching degree between the definition hint information and the target semantics;
[0179] Based on the matching degree, the target voxel block corresponding to the original voxel block and the voxel block information of the target voxel block are determined.
[0180] According to one or more embodiments of this disclosure, Example 7 provides the method of Example 1, wherein the voxel data corresponds to a read type, and the step of identifying voxel block information for each original voxel block in the voxel data includes:
[0181] For each original voxel block, the voxel block information of the original voxel block is read and identified using the data reading method corresponding to the reading type.
[0182] According to one or more embodiments of this disclosure, Example 8 provides a method for any of Examples 1-7, wherein, after generating and displaying a target virtual scene based on the position information of each original voxel block in the voxel data and the target voxel block corresponding to the original voxel block, the method further includes:
[0183] Based on each target voxel block in the target virtual scene, and based on the determined block attribute information of the target voxel block, voxel block information of the target voxel block is generated;
[0184] Based on the voxel block information of multiple target voxel blocks, target voxel data corresponding to the target virtual scene is generated and stored.
[0185] According to one or more embodiments of this disclosure, Example 9 provides the method of Example 8, wherein the determined block attribute information of the target voxel block is determined based on the voxel block information of the original voxel block corresponding to the target voxel block.
[0186] According to one or more embodiments of this disclosure, Example 10 provides a virtual scene display device, the device comprising:
[0187] The acquisition module is used to acquire voxel data corresponding to the virtual scene in response to the virtual scene display command;
[0188] The identification module is used to identify the voxel block information of each original voxel block in the voxel data, wherein the voxel block information includes the definition information and location information of the original voxel block;
[0189] The first determining module is used to determine the original semantics of the original voxel block based on the definition information of the original voxel block;
[0190] The second determining module is used to determine the target voxel block corresponding to each original voxel block from the preset voxel blocks based on the original semantics of the original voxel block and the target semantics of multiple preset voxel blocks.
[0191] The processing module is used to generate and display a target virtual scene based on the position information of each original voxel block in the voxel data and the target voxel block corresponding to the original voxel block.
[0192] According to one or more embodiments of the present disclosure, Example 11 provides a computer-readable medium having a computer program stored thereon that, when executed by a processing device, implements the steps of the method described in any one of Examples 1-9.
[0193] According to one or more embodiments of this disclosure, Example 12 provides an electronic device, including:
[0194] A storage device on which computer programs are stored;
[0195] A processing device for executing the computer program in the storage device to implement the steps of any one of the methods in Examples 1-9.
[0196] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0197] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0198] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative forms of implementing the claims. Regarding the apparatus in the above embodiments, the specific manner in which the various modules perform their operations has been described in detail in the embodiments relating to the method, and will not be elaborated upon here.
Claims
1. A method of presenting a virtual scene, characterized by, The method includes: In response to a virtual scene display command, the voxel data corresponding to the virtual scene is obtained; Identify the voxel block information of each original voxel block in the voxel data, wherein the voxel block information includes the definition information and location information of the original voxel block; The original semantics of the original voxel block are determined based on the definition information of the original voxel block; Based on the original semantics of the original voxel block and the target semantics of multiple preset voxel blocks, the target voxel block corresponding to each original voxel block is determined from the preset voxel blocks. Based on the position information of each original voxel block in the voxel data and the target voxel block corresponding to the original voxel block, a target virtual scene is generated and displayed.
2. The method of claim 1, wherein, Determining the original semantics of the original voxel block based on its definition information includes: Identify whether the voxel block information of the original voxel block contains definition prompt information; If the original voxel block information contains the definition hint information, then the original semantics of the original voxel block is determined based on the definition information of the original voxel block and the definition hint information.
3. The method of claim 1, wherein, The step of determining the target voxel block corresponding to each original voxel block from the preset voxel blocks based on the original semantics of the original voxel block and the target semantics of multiple preset voxel blocks includes: For each original voxel block, the original semantics of the original voxel block are matched with the target semantics to determine the matching degree between the original semantics and the target semantics; If there is a target semantic with a matching degree greater than the matching threshold, then the preset voxel block corresponding to the target semantic with the highest matching degree is determined as the target voxel block corresponding to the original voxel block.
4. The method of claim 3, wherein, The step of determining the target voxel block corresponding to each original voxel block from the preset voxel blocks based on the original semantics of the original voxel block and the target semantics of multiple preset voxel blocks further includes: If there is no target semantic with a matching degree greater than the matching threshold, then the base voxel block in the preset voxel block is determined as the target voxel block corresponding to the original voxel block.
5. The method of claim 1, wherein, The step of determining the target voxel block corresponding to each original voxel block from the preset voxel blocks based on the original semantics of the original voxel block and the target semantics of multiple preset voxel blocks includes: Match the original semantics with the target semantics of multiple pre-set voxel blocks; If a target semantic that is the same as the original semantic is matched, then the preset voxel block corresponding to the matched target semantic is determined as the target voxel block; If the voxel block information of the original voxel block that matches the preset voxel block contains definition prompt information, the voxel block information of the target voxel block is determined according to the definition prompt information.
6. The method according to claim 5, characterized in that, The step of determining the target voxel block corresponding to each original voxel block from the preset voxel blocks based on the original semantics of the original voxel block and the target semantics of multiple preset voxel blocks further includes: If no target semantics identical to the original semantics are matched, identify whether the voxel block information of the original voxel block contains definition prompt information; If the original voxel block information contains the definition hint information, then the definition hint information is matched with the target semantics to determine the matching degree between the definition hint information and the target semantics; Based on the matching degree, the target voxel block corresponding to the original voxel block and the voxel block information of the target voxel block are determined.
7. The method according to claim 1, characterized in that, The voxel data corresponds to a read type, and the voxel block information for identifying each original voxel block in the voxel data includes: For each original voxel block, the voxel block information of the original voxel block is read and identified using the data reading method corresponding to the reading type.
8. The method according to any one of claims 1 to 7, characterized in that, After generating and displaying the target virtual scene based on the position information of each original voxel block in the voxel data and the target voxel block corresponding to the original voxel block, the method further includes: Based on each target voxel block in the target virtual scene, and based on the determined block attribute information of the target voxel block, voxel block information of the target voxel block is generated; Based on the voxel block information of multiple target voxel blocks, target voxel data corresponding to the target virtual scene is generated and stored.
9. The method of claim 8, wherein, The block attribute information of the target voxel block is determined based on the voxel block information of the original voxel block corresponding to the target voxel block.
10. A virtual scene presentation device, characterized by, The device includes: The acquisition module is used to acquire voxel data corresponding to the virtual scene in response to the virtual scene display command; The identification module is used to identify the voxel block information of each original voxel block in the voxel data, wherein the voxel block information includes the definition information and location information of the original voxel block; The first determining module is used to determine the original semantics of the original voxel block based on the definition information of the original voxel block; The second determining module is used to determine the target voxel block corresponding to each original voxel block from the preset voxel blocks based on the original semantics of the original voxel block and the target semantics of multiple preset voxel blocks. The processing module is used to generate and display a target virtual scene based on the position information of each original voxel block in the voxel data and the target voxel block corresponding to the original voxel block.
11. A computer-readable medium having a computer program stored thereon, characterized in that, When executed by the processing device, the program implements the steps of the method according to any one of claims 1-9.
12. An electronic device, comprising: include: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the method according to any one of claims 1-9.