Method and device for processing data in game and electronic equipment

By dividing the virtual scene into synchronization areas at different levels and obtaining terrain data with corresponding accuracy, the problem of large amount of synchronization data in multiplayer networked games is solved, and the smoothness and user experience of the game screen are improved.

CN119868940AActive Publication Date: 2025-04-25NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510162203.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-04-25
Estimated Expiration
2045-02-13

AI Technical Summary

Technical Problem

In multiplayer networking games, the terrain of three-dimensional voxel data storing terrain results in large amounts of synchronized data, resulting in lag or delay in game screens, affecting user experience.

Method used

By dividing the virtual scene into multiple synchronization areas at different levels, terrain data with corresponding accuracy is obtained according to the hierarchy of each synchronization area, and rendering the scene terrain in the virtual scene, avoiding the acquisition of full-precision terrain data at each synchronization.

Benefits of technology

It greatly reduces the amount of synchronized data, improves the smoothness of the game screen, and improves the user's gaming experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119868940A_ABST
    Figure CN119868940A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device in a game and electronic device.According to the method, a graphical user interface is provided through a first terminal, and the display content of the graphical user interface comprises at least part of a virtual scene and a first virtual character located in the virtual scene; a first virtual character is a virtual character controlled by a first terminal, and the method comprises the following steps: according to a first position of the first virtual character in a virtual scene, setting the virtual scene within a preset range of the first position as a plurality of first synchronization areas of different levels; according to the hierarchy of each first synchronization region in the plurality of first synchronization regions, obtaining first topographic data corresponding to each first synchronization region, the obtaining precision of the first topographic data being in positive correlation with the hierarchy of the first synchronization region; and rendering the scene terrain in the virtual scene according to the first terrain data corresponding to each first synchronization region. According to the data processing method in the game provided by the embodiment of the invention, the data volume of the synchronous data can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, and electronic device for processing data in a game. Background Art

[0002] As the gaming industry continues to develop, players' demand for dynamic large-scale world scenes continues to increase. Destructible terrain is a technical solution that can effectively provide a sense of scene interaction, allowing players to feel the impact of their behavior on the game world in real time, thereby improving the immersion and realism of the game.

[0003] Currently in games, in order to express the terrain's effects and destructible freedom, three-dimensional voxel data can be used to store the terrain, with each voxel storing the distance from the point to the terrain surface.

[0004] However, the current method of storing terrain through three-dimensional voxel data requires a large amount of data to be synchronized in multiplayer online games, which will cause the game screen to freeze or lag, thereby affecting the user's gaming experience. Summary of the invention

[0005] The present application provides a method, device, and electronic device for processing data in a game, which can reduce the amount of synchronized data, improve the fluency of the game screen, and enhance the user's gaming experience. The specific solution is as follows:

[0006] In a first aspect, an embodiment of the present application provides a method for processing data in a game, wherein a graphical user interface is provided through a first terminal, and the display content of the graphical user interface includes at least part of a virtual scene, and a first virtual character located in the virtual scene, wherein the first virtual character is a virtual character controlled by the first terminal, and the method includes:

[0007] According to a first position of the first virtual character in the virtual scene, the virtual scene within a preset range of the first position is set as a plurality of first synchronization areas at different levels, wherein the first synchronization area is a local area in the virtual scene.

[0008] According to the level of each synchronization area among the plurality of first synchronization areas, terrain data corresponding to each first synchronization area is acquired, and the acquisition accuracy of the terrain data is positively correlated with the level of the first synchronization area.

[0009] The scene terrain is rendered in the virtual scene according to the terrain data corresponding to each of the first synchronization areas.

[0010] In a second aspect, an embodiment of the present application provides a data processing device in a game, the device comprising:

[0011] The determining unit is used to set the virtual scene within a preset range of the first position into a plurality of first synchronization areas of different levels according to a first position of the first virtual character in the virtual scene, wherein the first synchronization area is a local area in the virtual scene.

[0012] The acquisition unit is used to acquire first terrain data corresponding to each of the multiple first synchronization areas according to the level of each synchronization area, and the acquisition accuracy of the first terrain data is positively correlated with the level of the first synchronization area.

[0013] A rendering unit is used to render scene terrain in the virtual scene according to the first terrain data corresponding to each of the first synchronization areas.

[0014] In a third aspect, the present application further provides an electronic device, including:

[0015] Processor; and

[0016] The memory is used to store a data processing program. After the electronic device is powered on and the program is run by the processor, the method described in the first aspect is executed.

[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium storing a data processing program, which is executed by a processor to perform the method described in the first aspect.

[0018] Compared with the prior art, the present application has the following advantages: by dividing the levels of multiple synchronization areas, the terrain data corresponding to each synchronization area is obtained according to the data acquisition accuracy corresponding to the level of each synchronization area, and then the scene terrain is rendered in the virtual scene according to the terrain data corresponding to each synchronization area, thereby avoiding the acquisition of full-precision terrain data in the virtual scene for each synchronization, and greatly reducing the amount of synchronization data.

[0019] The data processing method in the game provided by the embodiment of the present application includes the following steps: according to the first position of the first virtual character in the virtual scene, the virtual scene within the preset range of the first position is set as a plurality of first synchronization areas of different levels, the first synchronization area being a local area in the virtual scene; according to the level of each synchronization area in the plurality of first synchronization areas, the first terrain data corresponding to each first synchronization area is obtained, and the acquisition accuracy of the first terrain data is positively correlated with the level of the first synchronization area; according to the first terrain data corresponding to each first synchronization area, the scene terrain is rendered in the virtual scene. It can be seen that in the present application, the synchronization area is divided into a plurality of synchronization areas corresponding to different levels according to different levels, and the data acquisition accuracy corresponding to the synchronization areas of different levels is different. The terrain data corresponding to each synchronization area is obtained according to the data acquisition accuracy corresponding to the level where each synchronization area is located, and then the scene terrain is rendered in the virtual scene according to the terrain data corresponding to each synchronization area, which can avoid obtaining the full-precision terrain data in the virtual scene every synchronization, thereby greatly reducing the amount of synchronization data. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A flowchart of a data processing method in a game provided in an embodiment of the present application;

[0021] Figure 2 A schematic diagram of multiple first synchronization areas provided in an embodiment of the present application;

[0022] Figure 3 A schematic diagram of the principle of dividing a virtual scene into multiple plots provided in an embodiment of the present application;

[0023] Figure 4 A schematic diagram of a first voxel when the acquisition accuracy of the first terrain data provided in an embodiment of the present application is 1 / 2;

[0024] Figure 5 A schematic diagram of a first voxel when the acquisition accuracy of the first terrain data provided in an embodiment of the present application is 1 / 4;

[0025] Figure 6 A schematic diagram of a surface reconstruction effect of obtaining first terrain data with different accuracies provided in an embodiment of the present application;

[0026] Figure 7 This is a structural block diagram of an example of a data processing device in a game provided by an embodiment of the present application;

[0027] Figure 8 It is a structural block diagram of an example of an electronic device for data processing in a game provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0029] It should be noted that the terms "first", "second", "third", etc. in the claims, description and drawings of the present application are used to distinguish similar objects and are not used to describe a specific order or sequence. The data used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including", "having" and their variants are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] It should be understood that in the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" is merely a way to describe the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "Including A, B and / or C" means including any one, any two, or any three of A, B, and C.

[0031] It should be understood that in the embodiments of the present application, "B corresponding to A", "B corresponding to A", "A corresponds to B", or "B corresponds to A" means that B is associated with A, and B can be determined according to A. Determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.

[0032] With the continuous development of the gaming industry, players' demand for dynamic large-world scenes is increasing. Destructible terrain is a technical solution that can effectively provide a sense of scene interaction, allowing players to feel the impact of their behavior on the game world in real time, thereby improving the immersion and realism of the game. At present, in order to express the terrain effect and destructible freedom in the game, three-dimensional voxel data can be used to store the terrain, and each voxel stores the distance from the point to the terrain surface. However, the current method of storing terrain through three-dimensional voxel data requires a large amount of data to be synchronized in multiplayer online games, which will cause the game screen to freeze or delay, thus affecting the user's gaming experience.

[0033] Currently, terrain in games is generally stored using a heightmap, which is a 2D texture. The position of the pixel on the texture represents its position on the XY plane, and the grayscale value of the pixel represents the height at that point. The limitation of the heightmap is that each XY point has only one height, which makes it impossible to represent caves, limiting the expression effect of the terrain and the degree of freedom of destructibility.

[0034] To solve this problem, 3D voxel data can be used to store terrain. Each voxel stores the distance from the point to the terrain surface, that is, the signed distance field (SDF) data. Based on such voxel data, the triangular mesh of the terrain surface can be extracted through isosurface extraction algorithms (including MarchingCube, Dual Contouring, etc.), and finally used for GPU rendering pipeline drawing. The most intuitive way to synchronize voxels is to record all modified voxel data, and then package and send them. This solution is simple and direct, but when a large amount of voxel data is operated at one time, it will cause a data explosion.

[0035] Based on background technical reasons, in order to reduce the amount of synchronized data, the first embodiment of the present application provides a method for processing data in a game. The method is applied to an electronic device, which may be a desktop computer, a laptop computer, a mobile phone, a tablet computer, etc., or other electronic devices capable of processing data in a game, which is not specifically limited in the embodiments of the present application.

[0036] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0037] Figure 1 This is a flow chart of a data processing method in a game provided by an embodiment of the present application. Figure 1 As shown, the method may include S101-S103.

[0038] S101. According to a first position of a first virtual character in a virtual scene, the virtual scene within a preset range of the first position is set to a plurality of first synchronization areas of different levels, wherein the first synchronization area is a local area in the virtual scene.

[0039] S102. Acquire first terrain data corresponding to each first synchronization area according to the level of each first synchronization area among the multiple first synchronization areas, wherein the acquisition accuracy of the first terrain data is positively correlated with the level of the first synchronization area.

[0040] Exemplarily, a graphical user interface is provided by a first terminal, and the display content of the graphical user interface includes at least part of a virtual scene, and a first virtual character located in the virtual scene, wherein the first virtual character is a virtual character controlled by the first terminal. When the first terminal controls the first virtual character to enter the game or reconnect after disconnection, the preset range of the terrain data in the virtual scene can be determined according to the first position of the first virtual character in the virtual scene, and then the preset range is divided into a plurality of first synchronization areas according to preset values ​​corresponding to different levels. The first synchronization area is a circular area or annular area with the first virtual character as the center and a preset distance as the radius, and the preset distance is used to determine the level of the first synchronization area. The preset distance is negatively correlated with the level of the first synchronization area, that is, the smaller the preset distance, the higher the level of the first synchronization area, and the higher the level of the first synchronization area, the higher the acquisition accuracy of the corresponding first terrain data.

[0041] Figure 2 A schematic diagram of multiple first synchronization areas provided in an embodiment of the present application. Figure 2 As shown, AOI represents the preset range (area of ​​interest, AOI) in the virtual scene, LOD can represent the level of detail (LOD) of the synchronization area, and LOD0, LOD1, and LOD2 respectively represent synchronization areas of different levels. For example, taking the first synchronization area as a circle as an example, the above preset value is the preset radius. The AOI can be determined with the first position of the virtual character in the virtual scene as the center of the circle and the preset radius of 200 meters. The synchronization area corresponding to LOD0 can be determined with the first position as the center of the circle and the preset radius of 100 meters. The synchronization area corresponding to LOD1 can be determined with the first position as the center of the circle and the preset radius of 150 meters. The synchronization area corresponding to LOD2 can be determined with the first position as the center of the circle and the preset radius of 200 meters. The preset distance is negatively correlated with the level of the first synchronization area, then the synchronization area corresponding to LOD0 has the highest level, and the synchronization area corresponding to LOD2 has the lowest level. The acquisition accuracy of the first terrain data is positively correlated with the level of the first synchronization area, then the acquisition accuracy of the first terrain data of the synchronization area corresponding to LOD0 is the highest, and the acquisition accuracy of the first terrain data of the synchronization area corresponding to LOD2 is the lowest.

[0042] S103: Rendering scene terrain in the virtual scene according to the first terrain data corresponding to each first synchronization area.

[0043] For example, the acquisition accuracy of the first terrain data of each synchronization area can be determined according to the level of each first synchronization area in the plurality of first synchronization areas, and then the first terrain data corresponding to each first synchronization area can be acquired according to the acquisition accuracy of the first terrain data of each first synchronization area. Figure 2As shown, if the synchronization area corresponding to LOD0 is acquired with full precision, the synchronization area corresponding to LOD1 is acquired with 1 / 2 precision, and the synchronization area corresponding to LOD2 is acquired with 1 / 4 precision, when acquiring the terrain data of the synchronization area corresponding to LOD0, the full amount of terrain data in the area can be directly acquired, when acquiring the terrain data of the synchronization area corresponding to LOD1, 1 / 2 of the terrain data in the area can be acquired according to the preset rules, and when acquiring the terrain data of the synchronization area corresponding to LOD1, 1 / 4 of the terrain data in the area can be acquired according to the preset rules. The scene terrain is rendered in the virtual scene according to the first terrain data corresponding to each synchronization area acquired.

[0044] For example, Table 1 is a comparison of the effects of the method provided in the embodiment of the present application and the prior art. It can be seen from Table 1 that the method provided in the embodiment of the present application greatly reduces the amount of synchronization data.

[0045] Table 1

[0046]

[0047] In an optional implementation provided by the present embodiment, before the step of determining multiple first synchronization areas of different levels according to the first position of the first virtual character in the virtual scene, the method also includes: dividing the virtual scene into multiple plots according to a preset size; determining multiple first synchronization areas of different levels according to the first position of the first virtual character in the virtual scene includes: determining multiple first synchronization areas of different levels and the plots included in each first synchronization area according to the plot where the first virtual character is located in the virtual scene.

[0048] Exemplarily, the bounding box of the virtual scene can be obtained, and the maximum values ​​of the length, width, height and height of the bounding box can be determined. Then, based on the above maximum values ​​and the preset side length of the plot, the cube corresponding to the virtual scene can be determined; the cube can be evenly divided into units of the preset side length of the plot to obtain multiple plots, and finally, multiple first synchronization areas of different levels and the plots included in each first synchronization area can be determined.

[0049] For example, each plot includes multiple voxels, and the side length of the voxel can be set. For example, a voxel represents a range of 1 meter, and the side length of the voxel is 1 meter; determine the side length of the plot, for example, a plot contains 16*16*16 voxels, then the side length of the plot is L=16 meters; then obtain the bounding box of the virtual scene, determine the maximum value of the length, width, height and height of the bounding box is T, take M=(floor(T / L)+1)*L, that is, let M be an integer multiple of L, and M>T, and construct a cube with M as the side length. The center of the cube is the center of the virtual scene, and the cube contains the entire virtual scene. The cube is evenly divided into L units to obtain N plots corresponding to the virtual scene. Figure 3 A schematic diagram of the principle of dividing a virtual scene into multiple plots provided in an embodiment of the present application. Figure 3 (A) indicates that the virtual scene is divided into multiple plots. Figure 3 (B) Represents the voxel data stored for each plot.

[0050] In an optional implementation provided in this embodiment, the levels of each synchronization area may include at least a first level and a second level. Different levels correspond to different synchronization areas. Each first synchronization area includes a plurality of plots, each plot includes a plurality of voxels, and the first terrain data corresponding to each first synchronization area can be obtained by obtaining the voxel data of each voxel in each plot corresponding to each first synchronization area.

[0051] In some embodiments, the above S102 may include S201 - S202 .

[0052] S201. Acquire voxel data of each of the multiple plots included in the second synchronization area, and form terrain data corresponding to the second synchronization area with the voxel data of each of the multiple plots. The second synchronization area is the synchronization area belonging to the first level among the multiple first synchronization areas.

[0053] S202, obtaining voxel data of the first voxel included in each plot in the third synchronization area, and constituting first terrain data corresponding to the third synchronization area by the voxel data of the first voxel, wherein the third synchronization area is a synchronization area belonging to the second level among the multiple first synchronization areas, and each plot in the third synchronization area includes multiple voxels, and the first voxel is a partial voxel included in each plot in the third synchronization area.

[0054] Exemplarily, the synchronization area of ​​each level may include multiple plots, and each plot includes multiple voxels. For example, each plot may include 8*8*8 voxels, 16*16*16 voxels, 32*32*32 voxels, etc. When the acquisition accuracy of the second synchronization area is 1, the voxel data of all voxels included in each plot in the second synchronization area can be acquired. When the acquisition accuracy of the third synchronization area is 1 / 2, the voxel data of 1 / 2 voxels in each plot included in the third synchronization area can be acquired.

[0055] For example, assuming that the levels of each first synchronization area may include a first level LOD0 and a second level LOD1, the acquisition accuracy of terrain data in the synchronization area of ​​LOD0 is 1, the acquisition accuracy of terrain data in the synchronization area of ​​LOD1 is 1 / 2, and each plot in each synchronization area includes 16*16*16 voxels. Voxel data of 16*16*16 voxels included in each plot in the synchronization area of ​​LOD0 can be acquired, and the voxel data of 16*16*16 voxels included in each plot in the synchronization area of ​​LOD0 constitutes the terrain data corresponding to the synchronization area of ​​LOD0. Each plot in the synchronization area of ​​LOD1 includes 1 / 2 times 16*16*16 voxels. Specifically, for a plot in the synchronization area of ​​LOD1, the voxel in the lower left corner of the plot is used as the coordinate origin, and the coordinates of each voxel in the plot are determined. The voxel corresponding to the coordinate point with an even z coordinate and an even sum of the x coordinate and the y coordinate as the first voxel is taken as the first voxel, and the voxel data of the first voxel is obtained. The voxel data of the first voxel included in each plot constitutes the terrain data corresponding to the synchronization area of ​​LOD1.

[0056] In some embodiments, the above S103 may include S301 - S303 .

[0057] S301. Render a scene terrain within the second synchronization area according to voxel data of each of the multiple plots included in the second synchronization area.

[0058] S302. Calculate the voxel data of the second voxel included in each plot in the third synchronization area according to the voxel data of the first voxel included in each plot in the third synchronization area, where the second voxel is the voxel included in each plot in the third synchronization area except the first voxel.

[0059] S303: Render the scene terrain in the third synchronization area according to the voxel data of each of the first voxels in the third synchronization area and the voxel data of each of the second voxels.

[0060] Exemplarily, after the voxel data of each block in the multiple blocks included in the second synchronization area is obtained, the scene terrain in the second synchronization area can be rendered and displayed according to the voxel data of each block in the multiple blocks included in the second synchronization area. Then the voxel data of the first voxel of each block in the third synchronization area is obtained, and the voxel data of the second voxel can be obtained by interpolating the voxel data of the first voxel, that is, according to the voxel data of the first voxel, the voxel data of the second voxel is calculated using an interpolation algorithm, wherein the interpolation algorithm may include an average value algorithm. Specifically, for a certain second voxel, a preset number of first voxels around the second voxel are determined, and the average value of the voxel data of the preset number of first voxels around each second voxel is calculated to obtain the voxel data of the second voxel. Similarly, the voxel data of all second voxels of each block in the third synchronization area can be calculated. According to the voxel data of the first voxel of each block in the third synchronization area and the voxel data of the second voxel of each block in the third synchronization area, the scene terrain in the third synchronization area can be rendered.

[0061] For example, Figure 4 A schematic diagram of the first voxel when the acquisition accuracy of the first terrain data provided in the embodiment of the present application is 1 / 2. Assuming that the acquisition accuracy of the first terrain data corresponding to the synchronization area M is 1 / 2, and each plot in the synchronization area M includes 6*6*6 voxels, for a certain plot in the synchronization area M, the voxel in the lower left corner of the plot is used as the coordinate origin, and the coordinates of each voxel in the plot are determined. The voxel corresponding to the coordinate point with an even z coordinate and an even sum of the x coordinate and the y coordinate is taken as the first voxel, and the remaining voxels are the second voxels. Figure 4 As shown, the blue voxel represents the first voxel included in the plot, and the gray voxel represents the second voxel included in the plot. Each gray voxel can be interpolated from the 6 blue voxels around it, that is, each gray voxel can be obtained by accumulating and averaging the voxel data of the 6 blue voxels around it. If there are less than 6 blue voxels around the gray voxel at the boundary, the actual number of blue voxels will be averaged. Similarly, the voxel data of the second voxel of each plot included in the synchronization area M can be calculated.

[0062] Figure 5 A schematic diagram of a first voxel when the acquisition accuracy of the first terrain data provided in the embodiment of the present application is 1 / 4. Figure 5 As shown, the blue voxel represents the first voxel included in the plot, and the gray voxel represents the second voxel included in the plot. Each gray voxel can be interpolated from the 6 blue voxels around it, that is, each gray voxel can be obtained by accumulating the voxel data of the 6 blue voxels around it and taking the average. If there are less than 6 blue voxels around the gray voxel at the boundary, the average will be taken according to the actual number of blue voxels.

[0063] For example, assuming that the acquisition accuracy of the first terrain data corresponding to the synchronization area N is 1 / 4, and each plot in the synchronization area N includes 6*6*6 voxels, the voxel data of 1 / 4 of the voxels in each plot included in the synchronization area N can be obtained. Specifically, for a certain plot in the synchronization area N, the voxel in the lower left corner of the plot is used as the coordinate origin to determine the coordinates of each voxel in the plot, and the voxels corresponding to the coordinate points where the x-coordinate, y-coordinate and z-coordinate are all even numbers, and the voxels corresponding to the coordinate points where the x-coordinate, y-coordinate and z-coordinate are all odd numbers are taken as the first voxels, and the remaining voxels are the second voxels. The voxel data of the first voxel is obtained, and each second voxel can be obtained by accumulating and averaging the voxel data of the 6 first voxels around it.

[0064] It can be seen from the above interpolation algorithm that the synchronization strategy based on level of detail (LOD) provided in the embodiment of the present application is essentially a synchronization with lossy compression. Figure 6 This is a schematic diagram of the surface reconstruction effect of obtaining first terrain data with different accuracies provided in an embodiment of the present application. Figure 6 As shown in the figure, the effect of terrain data rendered with 1 / 2 precision and the effect of terrain data rendered with 1 / 4 precision are somewhat different from the original effect. However, considering that the terrain also has LOD at the rendering level, that is, objects in the distance are drawn with a lower number of faces, and objects near are drawn with a higher number of faces. Therefore, if the rendering is added synchronously, it is actually a nearly lossless effect.

[0065] In an optional implementation provided in this embodiment, the initial terrain data in the virtual scene stored in the server and the terminal are the same. When data synchronization is performed, part of the terrain data of the virtual scene may not change. For example, a cave in the virtual scene is not destroyed between two synchronizations, and the terrain data of the cave remains unchanged.

[0066] In some embodiments, rendering the scene terrain in the virtual scene according to the first terrain data corresponding to each of the first synchronization areas may include: obtaining initial terrain data of the virtual scene; comparing the first terrain data corresponding to each of the first synchronization areas with the initial terrain data, and replacing the terrain data in the first terrain data corresponding to each of the first synchronization areas that is identical to the initial terrain data with preset parameters to obtain second terrain data corresponding to each of the first synchronization areas; rendering the scene terrain in the virtual scene according to the second terrain data corresponding to each of the first synchronization areas.

[0067] Exemplarily, after obtaining the first terrain data corresponding to each first synchronization area, the first terrain data corresponding to each first synchronization area can be compressed, and the compressed first terrain data corresponding to each first synchronization area can be sent to the terminal, and the terminal receives and decompresses the compressed first terrain data corresponding to each first synchronization area, and then renders the scene terrain in the virtual scene. Because the initial terrain data stored in the server and the terminal are consistent, after obtaining the first terrain data corresponding to each first synchronization area, the data in the first terrain data corresponding to each first synchronization area that is the same as the initial terrain data can be replaced with a preset parameter to obtain the second terrain data corresponding to each first synchronization area, and the second terrain data is compressed and sent to the terminal. After receiving the data, the terminal identifies a certain terrain data as a preset parameter, and obtains the correct terrain data corresponding to each preset parameter from the initial terrain data.

[0068] For example, when the SDF value of a voxel is the same as the SDF value of the voxel in the initial terrain data during data synchronization, the SDF value of the voxel can be replaced with a preset parameter, that is, the SDF value of the voxel can be replaced with a fixed special value to reduce the entropy of the data. For example, in the terrain data corresponding to each first synchronization area, the voxel values ​​of the voxels included in each plot range from -128 to 127. -128 can be used as a preset parameter. When the server collects data, it will judge each voxel, and when the SDF value of the voxel is the same as the SDF value of the voxel in the initial terrain, the SDF value of the voxel will be replaced with -128. After the terminal receives the data, it recognizes that the value of a voxel is -128, and takes the correct SDF value of the voxel from the initial terrain data.

[0069] This embodiment obtains the initial terrain data of the virtual scene; compares the first terrain data corresponding to each first synchronization area with the initial terrain data, and replaces the terrain data in the first terrain data corresponding to each first synchronization area that is the same as that in the initial terrain data with preset parameters to obtain the second terrain data corresponding to each first synchronization area; renders the scene terrain in the virtual scene according to the second terrain data corresponding to each first synchronization area. The same data in the terrain data corresponding to each first synchronization area can be increased, because the more the same data in the data packet, the higher the compression rate of the data packet, so this embodiment can improve the data compression rate and reduce the size of the data packet.

[0070] In an optional implementation manner provided by this embodiment, the first virtual character may move according to the movement control instruction of the first terminal, and the movement of the first virtual character may cause the first synchronization area to change.

[0071] In some embodiments, the above method may further include S401-S404.

[0072] S401: In response to a movement control instruction acting on the first virtual character, control the first virtual character to move to a second position in the virtual scene.

[0073] S402: Determine the plurality of fourth synchronization areas at different levels according to the second position of the virtual character in the virtual scene.

[0074] S403, acquiring third terrain data corresponding to each fourth synchronization area according to the level of each fourth synchronization area among the plurality of fourth synchronization areas, wherein the acquisition accuracy of the second terrain data is related to the level of the fourth synchronization area;

[0075] S404: Render scene terrain in the virtual scene according to the third terrain data corresponding to each fourth synchronization area.

[0076] Exemplarily, when the position of the first virtual character changes, resulting in a change in the synchronization area, the second position of the first virtual character can be determined first, and the multiple fourth synchronization areas of different levels can be determined according to the second position of the first virtual character in the virtual scene and the second position of the virtual character in the virtual scene. According to the level of each fourth synchronization area, the third terrain data corresponding to each fourth synchronization area is obtained. Specifically, it is determined that there is an overlapping area between the fourth synchronization area and the first synchronization area, and the level to which the overlapping area belongs in the first synchronization area and the level to which the overlapping area belongs in the fourth synchronization area are compared; if the level to which the overlapping area belongs in the first synchronization area is higher than or equal to the level to which the overlapping area belongs in the fourth synchronization area, the first terrain data corresponding to the overlapping area is used as the third terrain data corresponding to the overlapping area; if the level to which the overlapping area belongs in the first synchronization area is lower than the level to which the overlapping area belongs in the fourth synchronization area, the voxel data of the third voxel of each plot in the overlapping area is obtained, and the voxel data of the third voxel is the voxel data that was not obtained when obtaining the first terrain data corresponding to each plot in the overlapping area. Finally, the scene terrain is rendered in the virtual scene according to the third terrain data corresponding to each fourth synchronization area.

[0077] For example, when the scene terrain is rendered in the virtual scene according to the first terrain data corresponding to each first synchronization area, a data tag and an identifier (ID) of the virtual character are stored in the plot object of each plot corresponding to each first synchronization area, and the data tag is used to indicate which level the plot belongs to when obtaining the first terrain data. Taking the example that the levels of each fourth synchronization area include LOD0, LOD1 and LOD2 respectively, when the fourth synchronization area has an overlapping area with the first synchronization area, for a certain plot in the overlapping area, the data acquisition accuracy corresponding to LOD0 is 1, the data acquisition accuracy corresponding to LOD1 is 1 / 2, and the data acquisition accuracy corresponding to LOD2 is 1 / 4. When the data tag indicates that the plot belongs to LOD0 in the first synchronization area, it is not necessary to obtain the third terrain data corresponding to the plot, and the first terrain data corresponding to the plot can be used as the third terrain data; when the data tag indicates that the plot belongs to LOD1 in the first synchronization area, and the plot belongs to LOD0 in the fourth synchronization area, the remaining 1 / 2 data of the plot is obtained, and the third terrain data corresponding to the plot includes the first terrain data corresponding to the plot and the remaining 1 / 2 data obtained above; when the data tag indicates that the plot belongs to LOD1 in the first synchronization area, and the plot belongs to LOD0 in the fourth synchronization area D1 or LOD2, the first terrain data corresponding to the plot can be used as the third terrain data; when the data tag indicates that the plot belongs to LOD2 in the first synchronization area and the plot belongs to LOD0 in the fourth synchronization area, the remaining 3 / 4 data of the plot is obtained, and the third terrain data corresponding to the plot includes the first terrain data corresponding to the plot and the remaining 3 / 4 data obtained above; when the data tag indicates that the plot belongs to LOD2 in the first synchronization area and the plot belongs to LOD1 in the fourth synchronization area, 1 / 4 of the remaining data of the plot is obtained, and the third terrain data corresponding to the plot includes the first terrain data corresponding to the plot and 2 / 4 of the remaining data obtained above, so that the third terrain data corresponding to the plot is 1 / 2 of the full data of the plot; when the data tag indicates that the plot belongs to LOD2 in the first synchronization area and the plot belongs to LOD2 in the fourth synchronization area, the first terrain data corresponding to the plot can be used as the third terrain data. When there is no overlapping area between the fourth synchronization area and the first synchronization area, the terrain data of the plot can be obtained according to the level of the plot in the fourth synchronization area as the third terrain data of the plot.

[0078] In this embodiment, when there is an overlapping area between the fourth synchronization area and the first synchronization area, the third terrain data is obtained according to the layers to which the overlapping area belongs in the first synchronization area and the fourth synchronization area respectively, so as to avoid repeated acquisition of terrain data, further reduce the amount of synchronization data, and improve the efficiency of data synchronization.

[0079] In an optional implementation provided by this embodiment, the virtual scene may include a second virtual character, and the second virtual character may be controlled by the second terminal.

[0080] In some embodiments, the method further includes S501-S503.

[0081] S501, in response to a second virtual character executing a behavior of changing a local scene terrain in the virtual scene, acquiring terrain change data of the local scene terrain and behavior data of the second virtual character;

[0082] S502: in response to detecting that the amount of terrain change data of the local scene terrain is greater than or equal to the amount of behavior data of the second virtual character, rendering the scene terrain in the virtual scene according to the behavior data of the second virtual character;

[0083] S503: In response to detecting that the data volume of the terrain change data of the local scene terrain is smaller than the data volume of the behavior data of the second virtual character, render the scene terrain in the virtual scene according to the terrain change data of the local scene terrain.

[0084] Exemplarily, when the virtual character is online and the synchronization areas have not changed, if the second virtual character performs a change behavior on the local scene terrain in the virtual scene, the terrain change data of the local scene terrain and the behavior data of the second virtual character can be obtained. For example, the second virtual character uses a skill to cut down a tree in the virtual scene, and the terrain data corresponding to the tree cut down by the second virtual character in the virtual scene can be obtained, as well as the operation data generated by the second virtual character in the process of cutting down the tree, such as deleting certain data, changing the data of a certain plot of land, etc. After obtaining the terrain change data of the above-mentioned scene terrain and the behavior data of the second virtual character, the data volume of the above-mentioned terrain change data and the behavior data of the second virtual character can be detected respectively, and the data volume of the above-mentioned terrain change data and the behavior data of the second virtual character can be compared, and the data corresponding to the data type with a smaller data volume can be selected, and the scene terrain can be rendered in the virtual scene according to the data corresponding to the data type with a smaller data volume. For example, when it is detected that the data volume of the terrain change data of the local scene terrain is 35 bytes and the data volume of the behavior data of the second virtual character is 40 bytes, the scene terrain is rendered in the virtual scene according to the terrain change data of the local scene terrain; when it is detected that the data volume of the terrain change data of the local scene terrain is 64 bytes and the data volume of the behavior data of the second virtual character is 40 bytes, the scene terrain is rendered in the virtual scene according to the behavior data of the second virtual character. When the data volumes of the terrain change data and the behavior data of the second virtual character are equal, the terrain change data can be obtained and the scene terrain can be rendered in the virtual scene according to the terrain change data, or the behavior data of the second virtual character can be obtained and the scene terrain can be rendered in the virtual scene according to the behavior data of the second virtual character.

[0085] For example, the above data can be of different types, such as spherical operations or cubic operations. Spherical operations will include a center (3 floats) and a radius (1 float), for a total of (3+1)*4=16 bytes. Cubic operations will include a center (3 floats), length, width, and height (3 floats), and rotation (expressed in quaternions, 4 floats), for a total of (3+3+4)*4=40 bytes. Each of the modified voxel data is an Index (uint32) and a modified value int8, which is 5 bytes. If a cubic operation is used, when the number of modified voxels is less than 8, the amount of data is less than 40 bytes, and the voxel data can be sent directly.

[0086] Optionally, when the virtual character goes offline, the data of the user ID corresponding to the virtual character in all terrain plots on the server will be cleared.

[0087] The above is a specific implementation of a model training example. In the specific implementation, the model training can also be performed in other feasible ways, and the embodiments of the present application are not limited thereto.

[0088] Corresponding to the data processing method in the game provided by the embodiment of the present application, the embodiment of the present application also provides a data processing device in the game, such as Figure 7 As shown, the data processing device 700 in the game includes:

[0089] The determining unit 701 is used to set the virtual scene within a preset range of the first position into a plurality of first synchronization areas of different levels according to a first position of the first virtual character in the virtual scene, wherein the first synchronization area is a local area in the virtual scene.

[0090] The acquisition unit 702 is used to acquire first terrain data corresponding to each first synchronization area according to the level of each first synchronization area among the multiple first synchronization areas, and the acquisition accuracy of the first terrain data is positively correlated with the level of the first synchronization area.

[0091] The rendering unit 703 is configured to render scene terrain in the virtual scene according to the first terrain data corresponding to each of the first synchronization areas.

[0092] Optionally, the determination unit 701 is specifically used to divide the virtual scene into multiple plots according to a preset size; according to the plot where the first virtual character is located in the virtual scene, the virtual scene within a preset range of the first position is set as multiple first synchronization areas of different levels, and the plots included in each first synchronization area are determined.

[0093] Optionally, the first synchronization area is a circular area or an annular area with the first virtual character as the center and a preset distance as the radius, and the preset distance is used to determine the level of the first synchronization area.

[0094] Optionally, the preset distance is negatively correlated with the level of the first synchronization area.

[0095] Optionally, the levels include at least a first level and a second level, and the acquisition unit 702 is specifically configured to

[0096] Acquire voxel data of each of the multiple plots included in the second synchronization area, and form first terrain data corresponding to the second synchronization area with the voxel data of each of the multiple plots, and the second synchronization area is the synchronization area belonging to the first level among the multiple first synchronization areas; acquire voxel data of the first voxel included in each plot in the third synchronization area, and form first terrain data corresponding to the third synchronization area with the voxel data of the first voxel, and the third synchronization area is the synchronization area belonging to the second level among the multiple first synchronization areas, and each plot in the third synchronization area includes multiple voxels, and the first voxel is a part of the voxels included in each plot in the third synchronization area.

[0097] Optionally, the rendering unit 703 is specifically used to render the scene terrain within the second synchronization area based on the voxel data of each of the multiple plots included in the second synchronization area; calculate the voxel data of the second voxel included in each plot in the third synchronization area based on the voxel data of the first voxel included in each plot in the third synchronization area, the second voxel being the voxel included in each plot in the third synchronization area except the first voxel; render the scene terrain within the third synchronization area based on the voxel data of each of the first voxels in the third synchronization area and the voxel data of each of the second voxels.

[0098] Optionally, the rendering unit 703 is specifically configured to calculate the voxel data of the second voxel included in each plot in the third synchronization area by an interpolation algorithm according to the voxel data of the first voxel included in each plot in the third synchronization area.

[0099] Optionally, the rendering unit 703 is specifically used to obtain initial terrain data of the virtual scene; compare the first terrain data corresponding to each of the first synchronization areas with the initial terrain data, and replace the terrain data in the first terrain data corresponding to each of the first synchronization areas that is identical to the initial terrain data with preset parameters to obtain second terrain data corresponding to each of the first synchronization areas; and render the scene terrain in the virtual scene according to the second terrain data corresponding to each of the first synchronization areas.

[0100] Alternatively, if Figure 7 As shown, the data processing device 700 in the game further includes: a processing unit 704.

[0101] The processing unit 704 is used to respond to the movement control instruction acting on the first virtual character, control the first virtual character to move to the second position in the virtual scene; determine multiple fourth synchronization areas of different levels according to the second position of the first virtual character in the virtual scene; obtain third terrain data corresponding to each fourth synchronization area according to the level of each fourth synchronization area among the multiple fourth synchronization areas, and the acquisition accuracy of the second terrain data is related to the level of the fourth synchronization area; the rendering unit 703 is also used to render the scene terrain in the virtual scene according to the third terrain data corresponding to each fourth synchronization area.

[0102] Optionally, the acquisition unit 702 is specifically used to determine whether there is an overlapping area between the fourth synchronization area and the first synchronization area, and compare the level of the overlapping area in the first synchronization area and the level of the overlapping area in the fourth synchronization area; if the level of the overlapping area in the first synchronization area is higher than or equal to the level of the overlapping area in the fourth synchronization area, the first terrain data corresponding to the overlapping area is used as the third terrain data corresponding to the overlapping area; if the level of the overlapping area in the first synchronization area is lower than the level of the overlapping area in the fourth synchronization area, the voxel data of the third voxel of each plot in the overlapping area is acquired, and the voxel data of the third voxel is the voxel data that was not acquired when acquiring the first terrain data corresponding to each plot in the overlapping area.

[0103] Optionally, the processing unit 704 is further used to obtain terrain change data of the local scene terrain and behavior data of the second virtual character in response to the second virtual character performing a change behavior on the local scene terrain in the virtual scene; in response to detecting that the data amount of the terrain change data of the local scene terrain is greater than or equal to the data amount of the behavior data of the second virtual character, render the scene terrain in the virtual scene according to the behavior data of the second virtual character; in response to detecting that the data amount of the terrain change data of the local scene terrain is less than the data amount of the behavior data of the second virtual character, render the scene terrain in the virtual scene according to the terrain change data of the local scene terrain.

[0104] Corresponding to the data processing method in the game provided in the embodiment of the present application, the embodiment of the present application also provides an electronic device for data processing in the game.

[0105] like Figure 8 , which is a structural block diagram of an example of an electronic device for data processing in a game provided in an embodiment of the present application.

[0106] In this embodiment, an optional hardware structure of the electronic device 800 can be as follows: Figure 8As shown, it includes: at least one processor 801, at least one memory 802 and at least one communication bus 805; the memory 802 contains a program 803 and data 804.

[0107] The bus 805 may be a communication device for transmitting data between components inside the electronic device 800, such as an internal bus (e.g., a CPU-memory bus, where the processor is a central processing unit, CPU for short), an external bus (e.g., a universal serial bus port, a peripheral component interconnect express port), etc.

[0108] In addition, the electronic device also includes: at least one network interface 806, at least one peripheral interface 807. The network interface 806 provides wired or wireless communication related to an external network 808 (for example, the Internet, an intranet, a local area network, a mobile communication network, etc.); in some embodiments, the network interface 806 may include any number of network interface controllers (NICs), radio frequency (RF) modules, repeaters, transceivers, modems, routers, gateways, any combination of wired network adapters, wireless network adapters, Bluetooth adapters, infrared adapters, near field communication (NFC) adapters, cellular network chips, etc.

[0109] The peripheral interface 807 is used to connect to the peripheral device, and the peripheral device can be the peripheral device 1 ( Figure 8 809 in), peripheral 2 ( Figure 8 810) and peripheral 3 ( Figure 8 811 in the figure). Peripherals are peripheral devices, which may include but are not limited to cursor control devices (such as mice, touch pads or touch screens), keyboards, displays (such as cathode ray tube displays, liquid crystal displays). Displays or light emitting diode displays, video input devices (such as cameras or communication interfaces coupled to video files), etc.

[0110] The processor 801 may be a CPU, or an application specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0111] The memory 802 may include a high-speed RAM (full name: Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.

[0112] The processor 801 calls the program and data stored in the memory 802 to perform the following steps:

[0113] According to a first position of the first virtual character in the virtual scene, the virtual scene within a preset range of the first position is set as a plurality of first synchronization areas at different levels, wherein the first synchronization area is a local area in the virtual scene;

[0114] According to the level of each of the plurality of first synchronization areas, first terrain data corresponding to each of the first synchronization areas is acquired, wherein the acquisition accuracy of the first terrain data is positively correlated with the level of the first synchronization area;

[0115] Rendering scene terrain in the virtual scene according to the first terrain data corresponding to each of the first synchronization areas.

[0116] Corresponding to the data processing method in the game provided in the embodiment of the present application, the embodiment of the present application further provides a computer-readable storage medium storing a program of the data processing method in the game, the program is executed by a processor to perform the following steps:

[0117] According to a first position of the first virtual character in the virtual scene, the virtual scene within a preset range of the first position is set as a plurality of first synchronization areas at different levels, wherein the first synchronization area is a local area in the virtual scene;

[0118] According to the level of each of the plurality of first synchronization areas, first terrain data corresponding to each of the first synchronization areas is acquired, wherein the acquisition accuracy of the first terrain data is positively correlated with the level of the first synchronization area;

[0119] Rendering scene terrain in the virtual scene according to the first terrain data corresponding to each of the first synchronization areas.

[0120] It should be noted that for the detailed description of the device, electronic device and computer-readable storage medium provided in the embodiments of the present application, reference can be made to the relevant description of the data processing method in the game provided in the embodiments of the present application, which will not be repeated here.

[0121] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

[0122] In a typical configuration, a node device in a blockchain includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0123] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0124] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), random access memory (RAM) of other attributes, read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage media or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.

[0125] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0126] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

Claims

1. A data processing method in a game, characterized in that: Providing a graphical user interface through a first terminal, wherein display content of the graphical user interface includes at least a portion of a virtual scene and a first virtual character located in the virtual scene, wherein the first virtual character is a virtual character controlled by the first terminal, and the method includes: According to a first position of the first virtual character in the virtual scene, the virtual scene within a preset range of the first position is set as a plurality of first synchronization areas at different levels, wherein the first synchronization area is a local area in the virtual scene; According to the level of each of the plurality of first synchronization areas, first terrain data corresponding to each of the first synchronization areas is acquired, wherein the acquisition accuracy of the first terrain data is positively correlated with the level of the first synchronization area; Rendering scene terrain in the virtual scene according to the first terrain data corresponding to each of the first synchronization areas.

2. The method according to claim 1, characterized in that Before the step of setting the virtual scene within a preset range of the first position as a plurality of first synchronization areas at different levels according to the first position of the first virtual character in the virtual scene, the method further includes: Dividing the virtual scene into a plurality of plots according to preset sizes; The step of setting the virtual scene within a preset range of the first position into a plurality of first synchronization areas at different levels according to the first position of the first virtual character in the virtual scene includes: According to the plot where the first virtual character is located in the virtual scene, the virtual scene within a preset range of the plot is set as a plurality of first synchronization areas at different levels, and the plots included in each of the first synchronization areas are determined.

3. The method according to claim 2, characterized in that The first synchronization area is a circular area or an annular area with the first virtual character as the center and a preset distance as the radius, and the preset distance is used to determine the level of the first synchronization area.

4. The method according to claim 3, characterized in that The preset distance is negatively correlated with the level of the first synchronization area.

5. The method according to claim 2, characterized in that: The levels include at least a first level and a second level; and acquiring first terrain data corresponding to each of the first synchronization areas according to the level of each synchronization area in the plurality of first synchronization areas includes: Acquire voxel data of each block among the multiple blocks included in the second synchronization area, and form first terrain data corresponding to the second synchronization area by the voxel data of each block among the multiple blocks, wherein the second synchronization area is a synchronization area belonging to the first level among the multiple first synchronization areas; Acquire voxel data of the first voxel included in each plot in the third synchronization area, and form the first terrain data corresponding to the third synchronization area by the voxel data of the first voxel. The third synchronization area is the synchronization area belonging to the second level among the multiple first synchronization areas. Each plot in the third synchronization area includes multiple voxels, and the first voxel is a partial voxel included in each plot in the third synchronization area.

6. The method according to claim 5, characterized in that The rendering of the scene terrain in the virtual scene according to the first terrain data corresponding to each first synchronization area includes: Rendering a scene terrain within the second synchronization area according to voxel data of each of the multiple plots included in the second synchronization area; Calculate the voxel data of the second voxel included in each block in the third synchronization area according to the voxel data of the first voxel included in each block in the third synchronization area, where the second voxel is the voxel included in each block in the third synchronization area except the first voxel; The scene terrain within the third synchronization area is rendered according to the voxel data of each of the first voxels in the third synchronization area and the voxel data of each of the second voxels.

7. The method according to claim 6, wherein the step of calculating the voxel data of the second voxel included in each parcel in the third synchronization area according to the voxel data of the first voxel included in each parcel in the third synchronization area comprises: According to the voxel data of the first voxel included in each block in the third synchronization area, the voxel data of the second voxel included in each block in the third synchronization area is calculated by an interpolation algorithm.

8. The method according to claim 1, characterized in that The rendering of the scene terrain in the virtual scene according to the first terrain data corresponding to each of the first synchronization areas includes: Acquiring initial terrain data of the virtual scene; Comparing the first terrain data corresponding to each of the first synchronization areas with the initial terrain data, and replacing terrain data in the first terrain data corresponding to each of the first synchronization areas that is identical to the initial terrain data with preset parameters, to obtain second terrain data corresponding to each of the first synchronization areas; Rendering scene terrain in the virtual scene according to the second terrain data corresponding to each of the first synchronization areas.

9. The method according to claim 1, characterized in that: The method further comprises: In response to the movement control instruction acting on the first virtual character, controlling the first virtual character to move to a second position in the virtual scene; Determining a plurality of fourth synchronization areas at different levels according to a second position of the first virtual character in the virtual scene; According to the level of each of the plurality of fourth synchronization areas, acquiring third terrain data corresponding to each of the fourth synchronization areas, wherein the acquisition accuracy of the third terrain data is related to the level of the fourth synchronization area; The scene terrain is rendered in the virtual scene according to the third terrain data corresponding to each fourth synchronization area.

10. The method according to claim 9, characterized in that Acquiring third terrain data corresponding to each fourth synchronization area includes: Determine that there is an overlapping area between the fourth synchronization area and the first synchronization area, and compare the level to which the overlapping area belongs in the first synchronization area and the level to which the overlapping area belongs in the fourth synchronization area; If the level to which the overlapping area belongs in the first synchronization area is higher than or equal to the level to which the overlapping area belongs in the fourth synchronization area, the first terrain data corresponding to the overlapping area is used as the third terrain data corresponding to the overlapping area; If the level to which the overlapping area belongs in the first synchronization area is lower than the level to which the overlapping area belongs in the fourth synchronization area, the voxel data of the third voxel of each plot in the overlapping area is obtained, and the voxel data of the third voxel is the voxel data that was not obtained when obtaining the first terrain data corresponding to each plot in the overlapping area.

11. The method according to claim 1, characterized in that: The method further comprises: In response to the second virtual character executing a behavior of changing the local scene terrain in the virtual scene, acquiring terrain change data of the local scene terrain and behavior data of the second virtual character; In response to detecting that the amount of terrain change data of the local scene terrain is greater than or equal to the amount of behavior data of the second virtual character, rendering the scene terrain in the virtual scene according to the behavior data of the second virtual character; In response to detecting that the data volume of the terrain change data of the local scene terrain is smaller than the data volume of the behavior data of the second virtual character, the scene terrain is rendered in the virtual scene according to the terrain change data of the local scene terrain.

12. A data processing device in a game, characterized in that: A graphical user interface is provided through a first terminal, wherein display content of the graphical user interface includes at least a portion of a virtual scene and a first virtual character located in the virtual scene, wherein the first virtual character is a virtual character controlled by the first terminal, and the device includes: a determining unit, configured to set the virtual scene within a preset range of the first position into a plurality of first synchronization areas of different levels according to a first position of the first virtual character in the virtual scene, wherein the first synchronization area is a local area in the virtual scene; An acquiring unit, configured to acquire first terrain data corresponding to each first synchronization area according to the level of each first synchronization area among the plurality of first synchronization areas, wherein the acquisition accuracy of the first terrain data is positively correlated with the level of the first synchronization area; A rendering unit is used to render scene terrain in the virtual scene according to the first terrain data corresponding to each of the first synchronization areas.

13. An electronic device, characterized in that: include: processor; as well as The memory is used to store a data processing program. After the electronic device is powered on and the program is run by the processor, the method according to any one of claims 1 to 11 is executed.

14. A computer-readable storage medium, characterized in that: A data processing program is stored, and the program is run by a processor to execute the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Method and apparatus for processing images

    CN102722901A

  • Synchronization method and device for voxel data

    CN107172136A

  • Method and system for realizing seamless loading of game map

    CN111068310A

  • Game map rendering method and device, electronic equipment and readable storage medium

    CN116889726A

  • Video recording and playback systems and methods

    GB201806301D0