Terrain editing method and device, electronic equipment, computer readable storage medium and computer program product

By dividing the terrain into layers and patching it, the problem of low terrain editing efficiency was solved, enabling simultaneous editing by multiple users and flexible editing, thus improving development efficiency.

CN122156339APending Publication Date: 2026-06-05SHENZHEN TENCENT NETWORK INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN TENCENT NETWORK INFORMATION TECH CO LTD
Filing Date
2024-11-27
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies for terrain editing are inefficient, especially when multiple developers need to edit the same area block, requiring sequential processing, which leads to inflexibility and low efficiency.

Method used

By dividing the terrain to be edited into different levels, and then dividing them into independent terrain patches, multiple developers can edit on different patches simultaneously. By using patch priority and level priority for fusion, the flexibility and efficiency of terrain editing can be improved.

Benefits of technology

It improves the flexibility and efficiency of terrain editing, enabling developers to edit different terrain patches independently and multiple people to edit the same terrain level simultaneously, reducing editing interference and the need for coordination and communication, and improving overall output efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156339A_ABST
    Figure CN122156339A_ABST
Patent Text Reader

Abstract

The application provides a terrain editing method and device, electronic equipment, computer program product and computer readable storage medium. The method comprises: performing hierarchical division on a terrain to be edited to obtain at least two terrain levels of the terrain to be edited, different terrain levels representing different types of terrain data; for each terrain level, determining a terrain patch of the terrain level, and performing terrain editing on the terrain patch based on the terrain data represented by the terrain level to obtain patch data of the terrain patch; in response to completion of terrain editing of the terrain patch of each terrain level, merging the patch data of the terrain patch of each terrain level based on at least one of patch priority of the terrain patch and level priority of the terrain level where the terrain patch is located to obtain a target terrain. Through the application, the flexibility of terrain editing can be improved, thereby improving the efficiency of terrain editing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to topographic mapping technology, and more particularly to a topographic editing method, apparatus, electronic device, computer-readable storage medium, and computer program product. Background Technology

[0002] In game development and computer graphics, terrain generation is a crucial step. Common terrain editing solutions involve dividing the terrain map into multiple regions, assigning these regions to different developers for independent work, and then stitching them together to form a complete terrain. However, these solutions use fixed regions, lacking flexibility. When multiple developers need to edit the same region, sequential processing is required, leading to inefficient terrain editing. Summary of the Invention

[0003] This application provides a terrain editing method, apparatus, electronic device, computer-readable storage medium, and computer program product, which can improve the flexibility of terrain editing and thus enhance terrain editing efficiency.

[0004] The technical solution of this application embodiment is implemented as follows:

[0005] This application provides a terrain editing method, the method comprising:

[0006] The terrain to be edited is divided into layers to obtain at least two terrain layers, with different terrain layers representing different types of terrain data. For each terrain layer, a terrain patch is determined, and the terrain patch is edited based on the terrain data represented by the terrain layer to obtain patch data for the terrain patch. In response to the completion of terrain editing for the terrain patch at each terrain layer, the patch data of the terrain patch at each terrain layer is fused based on at least one of the patch priority of the terrain patch and the layer priority of the terrain layer where the terrain patch is located to obtain the target terrain.

[0007] This application provides a terrain editing device, including:

[0008] The partitioning module is used to partition the terrain to be edited into at least two terrain levels, where different terrain levels represent different types of terrain data.

[0009] The editing module is used to determine the terrain patch for each terrain level, and to perform terrain editing on the terrain patch based on the terrain data represented by the terrain level to obtain the patch data of the terrain patch.

[0010] The fusion module is used to respond to the completion of terrain editing of the terrain patch at each terrain level, and to fuse the patch data of the terrain patch at each terrain level based on at least one of the patch priority of the terrain patch and the level priority of the terrain level where the terrain patch is located, to obtain the target terrain.

[0011] In the above scheme, the partitioning module is also used to extract terrain features from the terrain to be edited to obtain the terrain features of the terrain to be edited; based on the editing requirements of the terrain to be edited and the terrain features, the terrain to be edited is partitioned into levels to obtain at least two terrain levels of the terrain to be edited; wherein, the at least two terrain levels include at least one of the following: a basic terrain level for representing the basic terrain data of the terrain to be edited, and an environmental terrain level for representing the environmental terrain data of the terrain to be edited.

[0012] In the above scheme, the editing module is also used to perform terrain editing of basic terrain data on the terrain patch of the basic terrain level; and to perform terrain editing of environmental terrain data on the terrain patch of the environmental terrain level.

[0013] In the above scheme, the editing module is further configured to perform patch detection for each terrain level to obtain patch detection results for each terrain level; if the patch detection results indicate that no patch has been created for the terrain level, create a terrain patch for the terrain level; if the patch detection results indicate that a patch has been created for the terrain level, detect the editable area of ​​the created patch to obtain a region detection result; if the region detection results indicate that the editable area of ​​the created patch includes the target editing area, use the created patch as the terrain patch for the terrain level and load the created patch.

[0014] In the above scheme, the editing module is also used to determine the target editing area with editing permission in the terrain patch for the terrain level; and to perform terrain editing on the target editing area in the terrain patch based on the terrain data represented by the terrain level.

[0015] In the above scheme, the editing module is also used to create a permission control layer corresponding to the terrain patch, and draw a target control area in the permission control layer; align the permission control layer with the terrain patch, and merge the aligned permission control layer with the terrain patch; and take the area in the terrain patch that is aligned with the target control area as the target editing area with editing permission.

[0016] In the above scheme, the editing module is further configured to set the numerical attribute of the first pixel in the permission control layer to a target value to obtain a target control area indicated by the target value; or, set the grayscale attribute of the second pixel in the permission control layer to a target grayscale value to obtain a target control area with transparency corresponding to the target grayscale value; or, set the color attribute of the third pixel in the permission control layer to a target color to obtain a target control area with the target color.

[0017] In the above scheme, the fusion module is further configured to, in response to the fact that the number of terrain patches for each terrain level is at least two, fuse the patch data of the at least two terrain patches for each terrain level based on the patch priority of each terrain patch at the terrain level to obtain patch fused data for the terrain level; and fuse the patch fused data of each terrain level based on the level priority of each terrain level to obtain the target terrain.

[0018] In the above scheme, the fusion module is further configured to detect at least two terrain patches of the terrain level to obtain the editing area of ​​each terrain patch; based on the editing area of ​​each terrain patch, select at least two target terrain patches with duplicate editing areas from the at least two terrain patches; determine the first terrain patch with the highest patch priority among the at least two target terrain patches, the second terrain patch other than the first terrain patch among the target terrain patches, and the third terrain patch other than the target terrain patch among the at least two terrain patches; and fuse the patch data of the first terrain patch, the patch data of the second terrain patch other than the duplicate editing area, and the patch data of the third terrain patch to obtain the patch fusion data of the terrain level.

[0019] In the above scheme, the fusion module is also used to perform regional alignment on the patch fusion data of each terrain level; and to merge the patch fusion data after regional alignment according to the hierarchical priority of each terrain level from low to high to obtain the target terrain.

[0020] In the above scheme, the terrain editing device further includes a modification module, which is used to determine the target terrain level to be modified in response to a modification request for a specified area in the target terrain; load the created terrain patch in response to the existence of an existing terrain patch corresponding to the specified area in the target terrain level; and perform the modification operation requested by the modification request on the existing terrain patch.

[0021] This application provides an electronic device, the electronic device comprising:

[0022] Memory is used to store executable instructions or computer programs.

[0023] The processor, when executing computer-executable instructions or computer programs stored in the memory, implements the terrain editing method provided in the embodiments of this application.

[0024] This application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the terrain editing method provided in this application when executed by a processor.

[0025] This application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, they implement the terrain editing method provided in this application.

[0026] The embodiments of this application have the following beneficial effects: Through the above embodiments, when editing terrain to be edited, the terrain to be edited can first be divided into layers to obtain multiple terrain layers. For each terrain layer, a terrain patch corresponding to the terrain layer is determined. Then, editing operations are performed on the terrain data corresponding to the terrain layer on the terrain patch to obtain the patch data of the terrain patch. After all terrain patches have been edited, the patch data of each terrain patch at each terrain layer is merged according to at least one of the patch priority of the terrain patch and the layer priority of the terrain layer in which the terrain patch is located, to obtain the target terrain. In this way, the terrain patch is an editing unit independent of the terrain to be edited, and different terrain patches are used for different terrain layers. This allows developers to independently edit terrain on different terrain patches without interference. For terrain data of the same terrain layer, multiple people can simultaneously edit terrain on different terrain patches, improving the flexibility of terrain editing and thus improving the efficiency of terrain editing. Attached Figure Description

[0027] Figure 1 This is a schematic diagram of the architecture of the terrain editing system provided in the embodiments of this application;

[0028] Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;

[0029] Figure 3A This is a first flowchart illustrating the terrain editing method provided in this application embodiment;

[0030] Figure 3B This is a flowchart illustrating the target terrain generation method provided in an embodiment of this application;

[0031] Figure 4This is a schematic diagram of the terrain hierarchy provided in the embodiments of this application;

[0032] Figure 5 This is a schematic diagram of the target editing area provided in the embodiments of this application;

[0033] Figure 6 This is a second flowchart illustrating the terrain editing method provided in the embodiments of this application;

[0034] Figure 7 A flowchart illustrating the hierarchical division method provided in this application embodiment;

[0035] Figure 8 This is a schematic diagram of the terrain editing process provided in an embodiment of this application.

[0036] It should be noted that the terms "first" and "second" mentioned above are only used to distinguish between different options and do not represent the degree of superiority or inferiority of the options or their priority in the implementation process. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0038] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0039] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0040] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0041] Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the embodiments of this application is for descriptive purposes only and is not intended to limit the scope of this application.

[0042] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.

[0043] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0044] 1) Topographic data is a digital representation of the Earth's surface morphology. It can include information such as elevation, geomorphic features, and land cover. Topographic data typically includes the following aspects: elevation data, which is the core of topographic data and represents the height information of various points on the Earth's surface; geomorphic feature data, which can include natural landforms such as mountains, rivers, lakes, and plains, as well as topographic features formed by human activities, such as buildings and roads; and land cover data, which refers to different types of land cover, such as vegetation, water bodies, buildings, and roads.

[0045] 2) Topographic hierarchy is a concept describing the organization and representation of topographic data. It typically refers to a method of managing topographic data in layers according to different characteristics and uses. The division of topographic hierarchy may vary in different application scenarios. Topographic hierarchy can be divided in any of the following ways: Data source hierarchy, which can be divided into satellite remote sensing data layer, aerial photography data layer, ground survey data layer, etc., depending on the data source; Abstraction hierarchy, which can be divided into raw data layer (e.g., raw satellite imagery), preprocessed data layer (e.g., orthorectified imagery), and analytical data layer (e.g., extracted topographic features), depending on the different uses or types of data, which can be divided into basic topographic layer, planning data layer, environmental topographic layer, disaster management data layer, etc.; Visualization hierarchy, which can be divided into visible and invisible layers according to the data display requirements. The visible layer can be further divided into multiple sub-layers based on importance and level of detail, such as the road layer being subdivided into main road layer, secondary road layer, etc.

[0046] 3) A terrain patch can be a copy of the terrain to be edited or a copy of a selected area. It is an editing unit independent of the terrain to be edited. A terrain patch contains all the terrain information of the terrain to be edited, including basic terrain, vegetation, rivers, etc. That is to say, the terrain patch has as many terrain levels as the terrain to be edited, but the effective terrain levels in the terrain patch are different for different terrain patches. Developers can edit the terrain on the terrain patch according to the effective terrain levels, and finally merge the edited patch data into the terrain to be edited.

[0047] A terrain patch is an independent copy of the original terrain (such as the terrain to be edited), meaning that any modifications to the terrain patch will not affect the original terrain. This ensures the integrity of the original terrain data and allows developers to freely edit terrain patches without worrying about damaging the original terrain. Terrain patches can be used for various editing operations, such as adding new terrain features, adjusting height, or modifying textures. After editing, the terrain patch can be placed back into the original terrain or combined with other terrain patches to create more complex terrain structures. Once the terrain patch is edited, developers can choose to merge it back into the original terrain. During merging, the patch data can be integrated into the original terrain based on the patch's location and size, or the original terrain data can be replaced. The advantage of using terrain patches is that it can improve the flexibility and efficiency of terrain editing, especially in large or highly complex terrain projects. Developers can use terrain patches to quickly copy and modify terrain areas, thereby accelerating the development process and improving terrain editing efficiency.

[0048] In game development and computer graphics, terrain generation is a crucial step. Common terrain editing solutions involve dividing the terrain map into multiple regions, assigning these regions to different developers for independent work, and then stitching them together to form a complete terrain. However, these solutions use fixed regions, lacking flexibility and allowing no overlap. When multiple developers need to edit the same terrain area, they must queue, leading to inefficient terrain editing. Furthermore, since each developer is responsible for a different region, transitions between adjacent regions become problematic, requiring coordination and corrections by a single person, further reducing overall terrain output efficiency.

[0049] This application provides a terrain editing method, apparatus, electronic device, computer-readable storage medium, and computer program product, which can improve the flexibility of terrain editing and thus enhance terrain editing efficiency.

[0050] See Figure 1 , Figure 1This is a schematic diagram of the architecture of the terrain editing system 100 provided in the embodiments of this application. In order to support a terrain editing application, the terminal (terminal 400-1 and terminal 400-2 are shown as examples) connects to the server 200 through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.

[0051] Terminals (e.g., terminals 400-1 and 400-2) receive terrain editing instructions for the terrain to be edited and send terrain editing requests to server 200. In response to the terrain editing request, server 200 divides the terrain to be edited into at least two terrain levels, each representing a different type of terrain data. Server 200 can synchronize the terrain levels to the terminals (e.g., terminals 400-1 and 400-2). For each terrain level, the terminals (e.g., terminals 400-1 and 400-2) determine terrain patches for that level and edit the patches based on the terrain data represented by the level, obtaining patch data for the terrain patches. Upon completion of terrain editing for each terrain level, server 200 merges the patch data for each terrain level based on at least one of the patch priority and the level priority of the terrain level where the patch is located, obtaining the target terrain, and synchronizes the target terrain to the terminals (e.g., terminals 400-1 and 400-2).

[0052] In some embodiments, the terminal (e.g., terminal 400-1 and terminal 400-2) can be implemented as various types of terminals such as laptops, tablets, desktop computers, set-top boxes, smartphones, smart speakers, smartwatches, smart TVs, and in-vehicle terminals, or it can be implemented as a server.

[0053] In some embodiments, server 200 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. Terminals and servers can be connected directly or indirectly via wired or wireless communication, which is not limited in this embodiment.

[0054] See Figure 2 , Figure 2 This is a schematic diagram of the structure of the electronic device 400 provided in the embodiments of this application. Figure 2The illustrated electronic device 400 includes at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in the electronic device 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to implement communication between these components. In addition to a data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2 The general labeled all buses as Bus System 440.

[0055] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0056] User interface 430 includes one or more output devices 43I that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0057] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices physically located away from the processor 410.

[0058] The memory 450 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 450 described in this application embodiment is intended to include any suitable type of memory.

[0059] In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0060] Operating system 45I includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, and driver layer, for implementing various basic business functions and handling hardware-based tasks.

[0061] The network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: Bluetooth, WiFi, and Universal Serial Bus (USB), etc.

[0062] Presentation module 453 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 (e.g., a display screen, a speaker, etc.) associated with user interface 430;

[0063] The input processing module 454 is used to detect and translate one or more user inputs or interactions from one or more input devices 432.

[0064] In some embodiments, the terrain editing apparatus provided in this application can be implemented in software. Figure 2 A terrain editing device 455 stored in memory 450 is shown. This device can be software in the form of programs and plugins, and includes the following software modules: a partitioning module 4551, an editing module 4552, and a merging module 4553. These modules are logically connected and can therefore be arbitrarily combined or further split according to their implemented functions. The functions of each module will be described below.

[0065] In other embodiments, the terrain editing device provided in this application can be implemented in hardware. As an example, the terrain editing device provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the terrain editing method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0066] The terrain editing method provided in the embodiments of this application will now be described in conjunction with the accompanying drawings. As mentioned above, the electronic device 400 that implements the terrain editing method of the embodiments of this application can be a terminal (e.g., terminal 400-1 and terminal 400-2), a server 200, or a combination of both. Therefore, the executing entity of each step will not be described again below.

[0067] The terrain editing method of this application embodiment will be described using terminals (e.g., terminal 400-1 and terminal 400-2) as examples of the executing entities. See also... Figure 3A , Figure 3A This is a first flowchart illustrating the terrain editing method provided in this application embodiment, which will be combined with... Figure 3A The steps shown are explained.

[0068] In step 101, the terrain to be edited is divided into layers to obtain at least two terrain layers, with different terrain layers representing different types of terrain data.

[0069] Here, terrain data typically refers to digital information describing surface features and space, encompassing both surface and man-made features, such as terrain data for rivers, roads, and buildings. River terrain data primarily describes the geographical location, flow direction, width, and depth of the river within the map containing the terrain to be edited, as well as the surrounding landform features. Road terrain data mainly involves the road network layout, width, class (e.g., highways, urban roads, rural paths), pavement material, and the slope and curvature of the road. Building terrain data mainly involves information such as the geographical location, building structure, floor area, and height of buildings. Specifically, different types of terrain data can be identified through any of the following aspects: location information, which indicates the exact location of each terrain feature (such as rivers, roads, and houses) on the map of the terrain to be edited; shape and size, which provides the geometry and size of terrain features, such as the direction and width of rivers, the direction and number of lanes of roads, and the outline and area of ​​houses; attribute information, which also includes various attribute information, such as the flow rate of rivers, the type of roads (expressways, arterial roads, etc.), and the architectural style and use of houses; spatial relationships, which describe the spatial relationships between different terrain features, such as the intersection of rivers and roads, and the relative position of houses and roads; and time and dynamic changes, which may also include a time dimension, reflecting the changes of terrain features over time, such as river diversions, road widenings, or new house constructions.

[0070] The terrain to be edited usually refers to terrain data that needs to be modified, adjusted or optimized. It is the foundation and core of terrain editing tasks. The terrain to be edited can be any area on the terrain map, and it can contain basic terrain data such as elevation, slope, and aspect.

[0071] Topographic hierarchy is used to describe the organization of topographic data. It can be understood as a way to manage topographic data in layers according to different characteristics or uses. The division of topographic hierarchy will be different in different scenarios of the topographic data to be edited. Here, multiple topographic hierarchy can be divided according to the functional hierarchy of the topographic data to be edited. For example: elevation hierarchy representing the natural undulation of the topographic surface; hydrological hierarchy representing water bodies such as rivers, lakes, and reservoirs; vegetation hierarchy representing vegetation types such as forests, grasslands, and crops; road hierarchy representing the network layout, direction, and attribute information of various roads (such as highways, national highways, and urban roads); building hierarchy representing the outline, height, and use of houses, buildings, and other man-made structures; administrative boundary hierarchy representing administrative division boundaries; and topographic feature hierarchy representing information such as ridges, valleys, and topographic profiles.

[0072] In practice, the most basic terrain can be generated first for the terrain to be edited, and then the generated terrain content can be stored in layers to obtain multiple terrain levels. Different terrain levels are used to represent different types of terrain data.

[0073] In some embodiments, step 101 can be implemented in the following manner: extracting terrain features of the terrain to be edited to obtain terrain features of the terrain to be edited; dividing the terrain to be edited into layers based on the editing requirements and terrain features of the terrain to be edited to obtain at least two terrain layers of the terrain to be edited; wherein, the at least two terrain layers include at least one of the following: a basic terrain layer for characterizing basic terrain data of the terrain to be edited, and an environmental terrain layer for characterizing environmental terrain data of the terrain to be edited.

[0074] In practice, terrain feature extraction of the terrain to be edited involves analyzing the original data of the terrain to be edited, identifying and extracting various natural and artificial features of the land surface. These features may include: elevation features, representing the height data of various points on the land surface; slope and aspect features, representing the degree and direction of the land surface's inclination; water flow network features, the distribution of water bodies such as rivers and lakes; vegetation features, the distribution of vegetation such as forests and grasslands; and building and other man-made structure features, the distribution and features of houses, roads, bridges, etc.

[0075] In practice, a terrain layering editor can be pre-trained to automatically divide the terrain to be edited into layers. Specifically, the process of layer division can include: acquiring the terrain features of the terrain to be edited and the editing requirements constructed for the terrain; analyzing the terrain features and editing requirements; dividing the terrain data into different layers; fusing the relevant information of the same terrain layer in the terrain features and editing requirements to ensure the consistency and accuracy of the information of the same terrain layer; and assigning specific attributes and features to each divided terrain layer so that the terrain layer represents the corresponding type of terrain data.

[0076] Here, editing requirements are usually based on the specific application and scenario requirements of the terrain to be edited. For example, according to actual application requirements, terrain information such as rivers, roads, and buildings need to be added to the terrain to be edited.

[0077] In practice, the at least two terrain levels obtained by dividing the terrain to be edited into layers can include the following two common terrain levels: for example, the basic terrain level used to characterize the basic terrain data of the terrain to be edited and the environmental terrain level used to characterize the environmental terrain data of the terrain to be edited.

[0078] The basic terrain level can include basic information about the terrain to be edited, such as altitude, slope, and aspect. A digital elevation model (DEM) can be used to represent the elevation information in the basic terrain information, and a digital surface model (DSM) can be used to represent the surface morphology information.

[0079] In practice, when editing terrain, environmental terrain data such as land cover, vegetation distribution, and landform classification are typically added on top of the basic terrain data represented by the base terrain level. Therefore, terrain levels can also include environmental terrain levels, which are usually used to provide information about the surface environment for specific editing and analysis purposes. Environmental terrain levels can include multiple more detailed levels, such as a vegetation level to represent vegetation-related data, a soil level to represent surface soil-related data, a hydrological level to represent surface water-related data, and a building level to represent building land-related data.

[0080] In practice, in addition to the basic terrain level and the environmental terrain level, a terrain analysis level can also be defined. The terrain analysis level can integrate multiple data sources and models, including more complex terrain analysis results, such as flood simulation, soil erosion prediction, and landscape pattern analysis, to characterize the impact of terrain on human activities and natural processes and to be used for in-depth analysis in specific fields.

[0081] Understandably, different terrain levels correspond to different types of terrain data, and these different types of terrain data have different display priorities. For example, river features need to be displayed on top of surface soil or other terrain features (such as buildings and roads) to maintain the visual logic of the map and its correspondence with the real world. Therefore, for the multiple terrain levels, a level priority can be set for each terrain level based on the type of terrain data corresponding to that level. The level priority is used to indicate the display priority of the terrain data in each terrain level when overlaying different terrain levels.

[0082] As an example, see Figure 4 , Figure 4 This is a schematic diagram of the terrain hierarchy provided in this application embodiment. After obtaining the terrain to be edited, the terrain can be divided from a conventional single-layer terrain into multiple terrain layers according to terrain features and editing requirements. Each terrain layer is independent of each other and can be edited and stored separately. Furthermore, during the terrain editing process for each terrain layer, the effect of each terrain layer after editing can be previewed in real time. To facilitate collaboration among developers when editing terrain, a general hierarchy (i.e., the basic terrain hierarchy) can be defined first. Then, the hierarchy can be further divided from bottom to top, with each layer progressively higher. For example, seven terrain layers can be defined from bottom to top. These seven layers could include: a base layer (the lowest layer, containing the initial terrain data for the terrain to be edited, used to provide the initial display of the engine terrain); a mixed base layer, providing patches for the mixed base layer and data resulting from mixing the base layer's patches with the base layer; a derived data layer, representing terrain data resulting from terrain erosion based on the mixed base layer's terrain data, and may also include terrain material data; a road layer, representing road terrain data for editing and storing roads; a river layer, representing river terrain data for editing and storing rivers; a vegetation layer, representing vegetation data for editing and storing vegetation; and an effects layer, representing the combined effect of terrain data from all terrain layers below the effects layer, which is the effect layer used in actual display. Among them, the base layer and the mixed base layer belong to the above-mentioned basic terrain level, the derived data layer, the road layer, the vegetation layer, and the river layer belong to the above-mentioned environmental terrain level, and the effect layer can be understood as the terrain analysis level.

[0083] By employing the above method, when editing terrain, hierarchical division of the terrain to be edited organizes the complex terrain information within the editing requirements into a logically clear hierarchical structure, facilitating understanding and editing by developers. Furthermore, this hierarchical division process is flexible and customizable; in different application scenarios, hierarchical division can be tailored to actual editing needs, setting specific terrain levels to be displayed or hidden, and customizing the types of terrain data corresponding to different terrain levels. Moreover, hierarchical division of the terrain to be edited, through layered management, allows developers to more precisely control the editing scope and content, reducing editing errors and data redundancy. It also enables rapid location of relevant terrain data in subsequent terrain analysis and decision-making, improving work efficiency.

[0084] See also Figure 3A The following explanation follows step 101 above.

[0085] In step 102, for each terrain level, terrain patches for the terrain level are determined, and terrain editing is performed on the terrain patches based on the terrain data represented by the terrain level to obtain the patch data of the terrain patches.

[0086] In this embodiment, a terrain patch can be a copy of the terrain to be edited or a copy of a selected area. It is an editing unit independent of the terrain to be edited. The terrain patch contains all the terrain information of the terrain to be edited, including basic terrain, vegetation, rivers, etc. That is, the terrain patch has as many terrain levels as the terrain to be edited, but the effective terrain levels in the terrain patch are different for different terrain patches. Developers can edit the terrain on the terrain patch for the effective terrain levels, and finally merge the edited patch data into the terrain to be edited.

[0087] Understandably, since terrain patches are copies of the terrain to be edited, developers can edit terrain on these patches independently of the original terrain. This allows for greater freedom in the editing process, enabling them to independently handle specific terrain or areas. This allows developers to focus on their individual terrain patches and ultimately integrate their work by merging patch data. When managing terrain patches, because they are copies of the terrain to be edited, independent patch versions can be set for each patch.

[0088] In practice, to enable developers to perform terrain editing independently without interference, terrain editing tasks can be divided based on terrain layers and regions. Terrain patches are created according to the corresponding terrain layer in each developer's task. This allows developers to edit the terrain patches based on the terrain data represented by the corresponding terrain layer, resulting in patch data. Here, patch data refers to the terrain data edited (e.g., added, modified) by the developer at the corresponding terrain layer during terrain editing.

[0089] In practice, there can be one or more terrain patches corresponding to each terrain level. When each terrain patch is created, the corresponding terrain level can be set to active status according to the developer's editing task, while other terrain levels are set to inactive. That is, the developer can only edit the terrain level that is active in the terrain patch. For example, if the river layer in the terrain patch is active, then only the river data of the terrain patch can be edited.

[0090] In some embodiments, the step 102 of "determining the terrain patch for each terrain level" can be implemented as follows: performing patch detection for each terrain level to obtain patch detection results for each terrain level; if the patch detection results indicate that no patch has been created for the terrain level, creating a terrain patch for the terrain level; if the patch detection results indicate that a patch has been created for the terrain level, detecting the editable area of ​​the created patch to obtain a region detection result; if the region detection results indicate that the editable area of ​​the created patch includes the target editing area, using the created patch as the terrain patch for the terrain level and loading the created patch.

[0091] In practice, when creating terrain patches for each terrain level, a patch check can be performed on the terrain level first to obtain the patch check results. These results can then be used to determine whether a patch has already been created for that terrain level. Patch check methods can include: traversing all created terrain patches, checking which terrain levels are active within each patch, and if a terrain patch for a specific terrain level exists, then it can be determined that a patch has been created for that terrain level.

[0092] In practice, if the patch detection results indicate that no patch has been created for a certain terrain level (e.g., the river level), a new terrain patch is created for that terrain level (e.g., the river level). The created terrain patch only sets the corresponding terrain level to be active.

[0093] As an example, if the patch detection result for the river layer indicates that there is no corresponding terrain patch for the river layer, then a new terrain patch is created for the river layer, and the river layer in this terrain patch is set to be active, while other terrain layers are set to be inactive.

[0094] In practice, if the patch detection result indicates that a patch has already been created for a certain terrain level (such as the river layer), the editable area of ​​the created patch is then detected to obtain the area detection result. Based on the area detection result, it is determined whether the created patch includes the target editing area indicated by the editing task. If the area detection result indicates its existence, the created patch whose editable area includes the target editing area can be directly loaded. If the area detection result indicates that no created patch whose editable area includes the target editing area exists, the terrain patch still needs to be recreated for that terrain level (such as the river layer). Furthermore, the recreated terrain patch not only sets that terrain level (such as the river layer) to be active, but also sets the target editing area to be editable. Here, the target editing area is the geographical region in the terrain to be edited, determined by the developer's editing task.

[0095] As an example, see Figure 5 , Figure 5 This is a schematic diagram of the target editing area provided in an embodiment of this application. Since current terrain editing tasks typically involve a large area of ​​terrain to be edited, it needs to be divided into multiple geographical regions. Multiple developers need to collaboratively complete the editing task by editing terrain at different terrain levels within different geographical regions. Therefore, different developers' editing tasks correspond to different terrain levels within different geographical regions of the terrain to be edited. Thus, when creating terrain patches for different developers' editing tasks, it is also necessary to consider whether the editable area of ​​an existing patch can include the target editing area indicated in the editing task. If the region detection result indicates that there is no existing patch with an editable area that includes the target editing area, then the terrain patch needs to be recreated for the corresponding terrain level, and the target editing area in the recreated terrain patch should be set as the editable area. For example, Figure 5 Figure (a) shows the terrain to be edited, within which the target editing area 510 is defined. Figure 5 Figure (b) shows a terrain patch created for terrain layer A of the terrain to be edited. The terrain patch sets terrain layer A to be active and sets the target editing area 520, which corresponds to the target editing area 510, as an editable area, while all other areas except the target editing area 520 are uneditable.

[0096] Since terrain patches are copies of the terrain to be edited, their file size is relatively large. By using the above method, before creating a terrain patch, patch detection and editable area detection are performed on each terrain level to determine whether a new terrain patch needs to be created. This can reduce the occurrence of problems such as slow loading, lag, or insufficient storage space caused by creating too many terrain patches, ensure the amount of system resources available during terrain editing, and improve the smoothness of terrain editing.

[0097] In some embodiments, the "terrain editing of terrain patches based on terrain data represented by terrain levels" in step 102 can be implemented in the following ways: for terrain patches at the basic terrain level, perform terrain editing of basic terrain data on the terrain patches at the basic terrain level; for terrain patches at the environmental terrain level, perform terrain editing of environmental terrain data on the terrain patches at the environmental terrain level.

[0098] In practice, since different terrain patches are created for different terrain levels, and each patch is created with only its corresponding terrain level set to active, when editing a terrain patch, one must first determine the active terrain level for that patch, and then edit the terrain based on the type of terrain data corresponding to that active terrain level. Different terrain levels correspond to different types of terrain data; therefore, the type of terrain data to be edited for terrain patches at different terrain levels will also differ.

[0099] In practice, for terrain patches at the basic terrain level, basic terrain data can be edited on the terrain patch itself. This basic terrain data can be the initial terrain data included in the terrain to be edited, such as altitude, slope, and aspect. For terrain patches at the environmental terrain level, environmental terrain data can be edited on the terrain patch itself. This environmental terrain data can include rivers, buildings, roads, etc.

[0100] Understandably, the basic terrain level and the environmental terrain level can be further subdivided into more detailed levels. For example, the environmental terrain level can include multiple levels such as river level, building level, and road level. The specific subdivision can be determined according to actual needs.

[0101] As an example, terrain editing of river data can be performed on the terrain patch corresponding to the river layer.

[0102] By drawing terrain data corresponding to different terrain levels within terrain patches, developers can focus on specific types of terrain data during terrain editing, reducing unnecessary editing operations and improving efficiency. Furthermore, since terrain patch editing is confined to its corresponding terrain level, the risk of developers mistakenly modifying other types of terrain data is reduced, ensuring accuracy. Simultaneously, dividing terrain into levels ensures consistency in type and attributes of patch data within the same level, reducing data conflicts. Moreover, after editing the terrain to be edited, if modifications are needed, only the affected terrain level patches need updating, without requiring a complete re-editing of the entire terrain, simplifying maintenance and updates.

[0103] In some embodiments, the "editing of terrain patches based on terrain data represented by terrain levels" in step 102 can also be implemented in the following way: for terrain patches at terrain levels, determine the target editing area with editing permissions in the terrain patch; and perform terrain editing on the target editing area in the terrain patch based on the terrain data represented by the terrain levels.

[0104] In practice, terrain patches have two types of editability permissions: one is an effective state set for the terrain layer, and the other is an editable state set for the target editing area. Therefore, the editable scope of a terrain patch is the effective terrain layer within the target editing area.

[0105] In practice, for terrain patches at the basic terrain level, terrain editing of the basic terrain data can be performed in the target editing area of ​​the terrain patch based on the basic terrain data represented by the basic terrain level; for terrain patches at the environmental terrain level, terrain editing of the environmental terrain data can be performed in the target editing area of ​​the terrain patch based on the environmental terrain data represented by the environmental terrain level.

[0106] As an example, see Figure 5 , Figure 5 Figure (b) shows a terrain patch created for terrain layer A. This patch sets terrain layer A to be active and sets the target editing area 520, corresponding to the target editing area 510, as an editable area, while all other areas are non-editable. Assuming terrain layer A is a river layer and the corresponding terrain data type is river data, then for... Figure 5 The terrain patch shown in Figure (b) allows for terrain editing of river data in the river layer of the target editing area 520.

[0107] It is understandable that, since different terrain patches can be set with different target editing areas, multiple terrain patches can be created for the same terrain level. Different terrain patches can be set with different target editing areas, and the sum of the target editing areas of all terrain patches at the same terrain level can cover the entire area of ​​the terrain to be edited.

[0108] By employing the methods described above, when processing large terrains to be edited, the hierarchical and regional divisions make it easier for developers to understand the editing task and perform terrain editing operations. Different developers can maintain and manage the terrain layer data corresponding to their respective target editing areas, making collaborative editing more organized and reducing the error rate. Furthermore, creating multiple terrain patches for the same terrain layer allows different developers to edit terrain data at the same level simultaneously, improving the efficiency of collaborative terrain editing. In summary, using hierarchical and regional divisions for terrain editing effectively improves the management and analysis efficiency of terrain data while ensuring its accuracy and consistency, making it suitable for various complex terrain editing and planning tasks.

[0109] In some embodiments, the above-mentioned "determining the target editing area with editing permission in the terrain patch for the terrain layer" can be implemented in the following way: creating a permission control layer corresponding to the terrain patch and drawing the target control area in the permission control layer; aligning the permission control layer with the terrain patch and merging the aligned permission control layer with the terrain patch; taking the area in the terrain patch that is aligned with the target control area as the target editing area with editing permission.

[0110] In practice, the permission control layer is a special layer used to control the editable areas on a terrain patch. The permission control layer can define which areas on the terrain patch are editable and which are not.

[0111] As an example, the access control layer can be a mask layer. The mask layer itself does not contain actual data content, but rather defines a visible or editable area. Specifically, the editable area can be set using masking techniques.

[0112] In practice, the corresponding access control layer created for the terrain patch typically has the same terrain spatial reference as the terrain patch, meaning the access control layer and the terrain patch can have the same resolution and geographic coordinates. Then, drawing tools can be used to draw the target control area corresponding to the terrain to be edited within the access control layer. The target control area can be of any shape, depending on the developer's editing task and the editing requirements of the terrain to be edited. Finally, based on the terrain spatial references of the access control layer and the terrain patch, their positions are aligned to ensure alignment in geographic coordinates and resolution. The aligned access control layer and terrain patch are then merged. After merging, the area in the terrain patch aligned with the target control area is the target editing area with editing permissions.

[0113] As an example, when merging a permission control layer with a terrain patch, a bitwise AND operation can be used, specifically performing a bitwise AND calculation based on pixel values. This way, the portion of the terrain patch corresponding to the target control area (i.e., the target editing area) can be visible, while other areas are hidden. The visible target editing area is editable.

[0114] In some embodiments, the above-mentioned "drawing the target control area in the permission control layer" can be implemented in the following ways: setting the numerical attribute of the first pixel in the permission control layer to the target value to obtain the target control area indicated by the target value; or setting the grayscale attribute of the second pixel in the permission control layer to the target grayscale value to obtain the target control area with the transparency corresponding to the target grayscale value; or setting the color attribute of the third pixel in the permission control layer to the target color to obtain the target control area with the target color.

[0115] In practice, the access control layer can be a binary layer with two numerical attributes. The target control area is set by setting the numerical attribute of the first pixel.

[0116] As an example, when the numerical attribute of the first pixel is the target value (e.g., 1), the first pixel can be determined to be an editable pixel (i.e., a visible pixel), while when the numerical attribute of the first pixel is any other value (e.g., 0), the first pixel can be determined to be a non-editable pixel (i.e., an invisible pixel). After drawing the area of ​​the target control region on the permission control layer based on the drawing tool, the numerical attribute of the first pixel within the area of ​​the target control region can be set to the target value (1), and the numerical attributes of other pixels outside the area of ​​the target control region can be set to other values ​​(0), thus obtaining the target control region indicated by the target value (1).

[0117] In practice, the access control layer can be a grayscale image. The target control area is set by controlling the grayscale value of the second pixel in the access control layer. Different grayscale values ​​represent different transparency or weight of the pixels. The pixels corresponding to the target grayscale value are editable pixels (i.e., visible pixels).

[0118] As an example, when the grayscale value of the second pixel is the target grayscale value (e.g., 255), the second pixel is determined to be completely transparent, that is, the second pixel is an editable pixel (i.e., a visible pixel); when the grayscale value of the second pixel is any other grayscale value (e.g., 0), the second pixel is determined to be opaque, that is, the second pixel is a non-editable pixel (i.e., an invisible pixel). After drawing the area of ​​the target control region on the permission control layer using the drawing tool, the grayscale value of the second pixel within the area of ​​the target control region can be set to the target grayscale value (255), and the grayscale values ​​of other pixels outside the area of ​​the target control region can be set to other grayscale values ​​(0), thus obtaining a completely transparent target control region corresponding to the target grayscale value (255).

[0119] In practice, the access control layer can also be a binary image. The target control area is set by controlling the color attribute of the third pixel in the access control layer, using two colors to represent the visibility of the third pixel. For example, white or other high-value colors can be used to represent a visible pixel, and black or other low-value colors can be used to represent an invisible pixel.

[0120] As an example, when the color attribute of the third pixel is the target color (e.g., white), the third pixel is determined to be an editable pixel (i.e., a visible pixel); when the color attribute of the third pixel is another color (e.g., black), the third pixel is determined to be a non-editable pixel (i.e., an invisible pixel). After drawing the area of ​​the target control region on the permission control layer using drawing tools, the color attribute of the third pixel within the area of ​​the target control region can be set to the target color (white), and the color attributes of other pixels outside the area of ​​the target control region can be set to other colors (black), thus obtaining a target control region with the target color (white).

[0121] It should be noted that the first pixel, the second pixel, and the third pixel all represent pixels within the target control area. They are only used here to distinguish pixels when the permission control layer is of different types of layers (such as binary layers, binary images, and grayscale images).

[0122] It's understandable that the permission control layer is a control layer for the terrain patch. The permission control layer doesn't contain specific terrain data, but rather information about which pixels are visible. In practical applications, the relationship between the permission control layer and the terrain patch can be summarized as follows: the permission control layer defines the editable "location" or "range" of the terrain patch, while the terrain patch provides the "content" or "data" needed for terrain editing.

[0123] By employing the above method, the permission control layer can be created and its target control area modified according to actual needs, providing flexibility in setting the editable area of ​​terrain patches. Developers can flexibly set the target editing area in the terrain patch by customizing the target control area within the permission control layer. Furthermore, the permission control layer allows for precise control over the editable area of ​​the terrain patch. By restricting the editable area, developers can prevent them from modifying or editing areas that should not be edited, reducing errors and uncertainties in terrain editing and ensuring the accuracy of terrain data. Moreover, the permission control layer allows developers to more intuitively identify the target editing area on the terrain patch. In collaborative terrain editing tasks, it helps developers clearly understand the target editing area indicated by their editing task, reducing editing conflicts and repetitive work, and also enhancing the visualization of the terrain patch.

[0124] See also Figure 3A The following explanation follows step 102 above.

[0125] In step 103, in response to the completion of terrain editing for terrain patches at each terrain level, the patch data of terrain patches at each terrain level are fused based on at least one of the patch priority of the terrain patch and the level priority of the terrain level where the terrain patch is located, to obtain the target terrain.

[0126] In some embodiments, see Figure 3B The step 103, "based on at least one of the patch priority of the terrain patch and the hierarchical priority of the terrain level where the terrain patch is located, the patch data of the terrain patch at each terrain level are fused to obtain the target terrain", can be achieved through steps 1031 to 1032.

[0127] In step 1031, in response to the fact that there are at least two terrain patches for each terrain level, the patch data of at least two terrain patches are fused based on the patch priority of each terrain patch at each terrain level to obtain patch fused data for the terrain level.

[0128] In practice, multiple terrain patches can be created for each terrain level, and different terrain patches can be set with different editing areas. That is, different terrain patches can have different target editing areas. However, the target editing areas of terrain patches corresponding to the same terrain level may involve overlapping editing areas. Therefore, when merging patch data of multiple terrain patches at the same terrain level, the patch priority of the terrain patches can be used to determine which terrain patch's patch data to use for overlapping editing areas.

[0129] As an example, if multiple developers are simultaneously performing terrain editing tasks for terrain level A, terrain patches for each developer at terrain level A can be created, each with its own target editing area. Since developers have varying levels of experience and job titles, patch priorities can be set based on the specific developer; for example, developers with more experience and higher job titles will have higher patch priorities. Thus, when merging patch data from multiple terrain patches at terrain level A after developers have completed their editing, if there are overlapping target editing areas, the patch data from the highest-priority terrain patch with overlapping areas will be used. In other words, for overlapping editing areas, the patch data edited by the developer with the most experience and highest job title will be selected.

[0130] It should be noted that the priority of terrain patches can be set based on the actual situation. For example, it can be set by the developers themselves, or it can be set according to certain setting rules. There are no specific restrictions here.

[0131] In some embodiments, step 1031 can be implemented as follows: detecting at least two terrain patches at the terrain level to obtain the editing areas of each terrain patch; based on the editing areas of each terrain patch, selecting at least two target terrain patches with duplicate editing areas from the at least two terrain patches; determining the first terrain patch with the highest patch priority among the at least two target terrain patches, the second terrain patch other than the first terrain patch among the target terrain patches, and the third terrain patch other than the target terrain patch among the at least two terrain patches; fusing the patch data of the first terrain patch, the patch data of the second terrain patch excluding the duplicate editing areas, and the patch data of the third terrain patch to obtain patch fusion data at the terrain level.

[0132] In practice, if there are at least two terrain patches corresponding to the same terrain level, the editing areas of all terrain patches at that level can be detected to obtain the editing areas (i.e., target editing areas) of each terrain patch. Since each terrain patch and the terrain to be edited have the same terrain spatial reference (e.g., coordinate system), the extent of the editing areas of the terrain patches in the common terrain spatial reference can be used to detect whether there are duplicate editing areas between the editing areas of each terrain patch. Based on the detection results, at least two target terrain patches with duplicate editing areas can be selected from at least two terrain patches.

[0133] As an example, if five terrain patches are created for the river layer during terrain editing, and different developers edit the river data for each patch, the target editing area for each patch can be set by the developers themselves. After all terrain patches for the terrain to be edited have completed their editing, the target terrain needs to be generated by merging at least a portion of the patch data from all the terrain patches. When merging the patch data for the five terrain patches of the river layer, if terrain patch A and terrain patch B have overlapping editing areas, then for the overlapping editing areas, the patch data of which terrain patch should be used should be determined based on the patch priority of terrain patch A and terrain patch B respectively.

[0134] In practice, after identifying at least two target terrain patches with overlapping edited areas, the patch data to be used can be determined based on patch priority. For overlapping edited areas, the patch data of the terrain patch with the highest priority can be used. Therefore, the highest priority first terrain patch can be identified from the selected at least two target terrain patches, and the other terrain patches in the target terrain patches, excluding the first terrain patch, can be used as the second terrain patches. When merging patch data, the complete patch data of the first terrain patch can be used; while the patch data of each second terrain patch needs to remove the patch data of overlapping edited areas, and the patch data excluding overlapping edited areas should be used for merging. Since there are no overlapping edited areas among the other terrain patches corresponding to the same terrain level, the terrain patches excluding the target terrain patch among all terrain patches corresponding to the same terrain level can be used as the third terrain patch, and the complete patch data of the third terrain patch can be used for data merging. That is, the patch data of the first terrain patch, the patch data of the second terrain patch excluding overlapping edited areas, and the patch data of the third terrain patch are merged to obtain the patch fused data of the corresponding terrain level. It is understandable that patch fusion data consists of complete terrain data that has been edited for the corresponding terrain level.

[0135] As an example, continuing from the previous example, if terrain patch A and terrain patch B have overlapping edited areas among the five terrain patches for the river layer, and terrain patch A has a higher patch priority than terrain patch B, then terrain patch A can be designated as the first terrain patch, terrain patch B as the second terrain patch, and the other three terrain patches (excluding terrain patches A and B) as the third terrain patches. Then, the patch data of terrain patch A, the patch data of terrain patch B excluding the overlapping edited areas, and the patch data of the other three terrain patches are merged to obtain the patch fusion data for the corresponding river layer.

[0136] In step 1032, based on the hierarchical priority of each terrain level, the patch fusion data of each terrain level are fused to obtain the target terrain.

[0137] In some embodiments, step 1032 can be implemented by: performing regional alignment on patch fusion data of each terrain level; and fusing the regionally aligned patch fusion data in order of increasing priority of each terrain level to obtain the target terrain.

[0138] In practice, different terrain levels correspond to different types of terrain data, and these different types of terrain data have different display priorities. For example, river features need to be displayed on top of surface soil or other terrain features (such as buildings and roads) to maintain the visual logic of the map and its correspondence with the real world. Therefore, after obtaining the patch fusion data for each terrain level, the patch fusion data is fused according to the hierarchy priority from low to high to obtain the target terrain.

[0139] As an example, the patch data at each terrain level can be first aligned with the terrain spatial reference of the terrain to be edited to ensure spatial consistency between the merged data and the terrain to be edited, thus guaranteeing the accuracy of the terrain data. Then, the area-aligned patch data is merged in ascending order of terrain level priority to obtain the target terrain.

[0140] It is understandable that patch fusion data with higher priority is displayed on top of patch fusion data with lower priority.

[0141] Through the above embodiments, when editing terrain, the terrain to be edited can first be divided into multiple terrain levels. For each terrain level, a corresponding terrain patch is determined. Then, editing operations are performed on the terrain data corresponding to the terrain level on the terrain patch to obtain patch data. After all terrain patches have been edited, the patch data of each terrain patch at each terrain level is merged according to at least one of the patch priority and the level priority of the terrain patch to obtain the target terrain. In this way, the terrain patch is an independent editing unit of the terrain to be edited, and different terrain patches are used for different terrain levels. This allows developers to independently edit terrain on different terrain patches without interference. Multiple people can also simultaneously edit terrain data of the same terrain level on different terrain patches, improving the flexibility and efficiency of terrain editing.

[0142] In some embodiments, after step 103, the terrain editing method may further modify the target terrain by: in response to a modification request for a specified area in the target terrain, determining the target terrain level to be modified in the modification request; in response to the existence of an existing terrain patch corresponding to the specified area in the target terrain level, loading the existing terrain patch; and performing the modification operation requested in the modification request on the existing terrain patch.

[0143] In actual implementation, after obtaining the target terrain, the terrain data can be modified for a specified area in the target terrain. Since the target terrain in this embodiment has multiple terrain levels, and terrain editing is done based on terrain patches created at each terrain level, and each terrain patch is an editing unit independent of the terrain to be edited or independent of the target terrain, when modifying the terrain data, the target terrain level to be modified and the corresponding terrain patch can be quickly located according to the modification request, and the modification operation can be performed on the existing terrain patch.

[0144] As an example, in response to a modification request for a specified area in the target terrain, the target terrain layer to be modified is determined. For instance, if the modification request requests modification of river data in specified area A of the target terrain, then the target terrain layer can be determined to be the river layer. Subsequently, the editing areas of all terrain patches created for the river layer during terrain editing are checked to determine if any existing terrain patches exist whose editing areas include the specified area. If so, the existing terrain patches are loaded, and the river modification operation is performed on the existing terrain patches.

[0145] As an example, if it is detected that there is no existing terrain patch that includes the specified area, a fourth terrain patch for modifying river data can be recreated for the target terrain level based on the modification request. The river data of the specified area is then re-edited based on the fourth terrain patch and the modification request. The patch priority of the fourth terrain patch is then set to the highest patch priority among all terrain patches in the river layer. The patch data in the fourth terrain patch overwrites the river data of the specified area in the target terrain, thus completing the modification of the target terrain.

[0146] By using the above method, through the division of terrain levels and the independent editing feature of terrain patches, if modifications are needed after the terrain to be edited is completed, only the terrain patches of the affected terrain level can be updated, without having to re-edit the entire terrain, making it easy to maintain and update.

[0147] In a specific embodiment, the terrain editing method based on the embodiment of this application is used as an example to illustrate terrain editing for a game scene. The electronic device 400 that implements the terrain editing method can be a terminal (e.g., terminal 400-1 and terminal 400-2). The execution subject of each step will not be described again below.

[0148] With the development of software and hardware technologies and the evolution of gameplay, in-game terrain maps are becoming increasingly large. Relying on a single developer to create terrain maps is no longer feasible due to the workload; multi-person collaborative editing is essential. Therefore, the terrain editing method described in this application can be used for collaborative editing, ensuring efficient collaboration among different developers without interference. Specifically, each developer delineates a region on the main terrain tile (i.e., the terrain to be edited) using a curve. Based on the delineated region, a terrain patch is generated. The terrain patch includes priorities (e.g., layer priority and patch priority) and the content to be edited (i.e., terrain data, such as terrain, vegetation, rivers, etc.). After terrain editing is completed on the terrain patch, all terrain patches are combined with the main terrain. Based on the delineated region and the priority of the terrain patches, the patch data is merged to generate the final terrain (i.e., the target terrain). This allows multiple people to edit different content simultaneously in the same area.

[0149] Figure 6 This is a schematic diagram of the second process of the terrain editing method provided in the embodiments of this application. See also... Figure 6 The specific terrain editing method can be described as follows:

[0150] S201, create the original terrain.

[0151] Here, the original terrain is the terrain to be edited.

[0152] As an example, the original terrain can be automatically generated using terrain generation tools such as Houdini.

[0153] S202, Terrain Editing.

[0154] As an example, the original terrain can be imported into a terrain editor (such as the UE engine), and the original terrain can be layered (i.e., divided into layers) to obtain multiple layers of the original terrain (i.e., terrain layers). Terrain patches can be created on different layers according to the editing task, and terrain data of the corresponding layer can be edited on the terrain patches, such as editing terrain data such as rivers and vegetation.

[0155] As an example, after the original terrain is layered, a layer priority is set for each layer, and a patch priority is set for the terrain patch when it is created.

[0156] S203, generate the final terrain.

[0157] Here, the final terrain refers to the target terrain mentioned above.

[0158] As an example, after all developers have completed the terrain editing and saving of the terrain patches, the data of all terrain patches corresponding to all terrain levels can be overlaid to generate the final complete terrain map. During the generation process, when overlaying data for terrain patches of the same terrain level, if there are overlapping areas between terrain patches, the data used for the overlapping areas can be determined by the patch priority; that is, the patch data of the terrain level with the highest patch priority is used for the overlapping areas.

[0159] In practice, the layering of the original terrain in step S202 above can be achieved in the following ways.

[0160] See Figure 4 It can break down the original single-layer terrain into multiple independent layers, each of which can be edited and saved separately. Furthermore, during terrain editing, the effect of each layer's editing can be previewed in real time, and the edited effect can also be overlaid with other layers for display.

[0161] As an example, the original terrain can be split using specialized terrain editing software (such as Autodesk Revit, 3ds Max, Maya, etc.); alternatively, a splitting method can be defined based on editing needs, and the terrain editor can be trained based on this method to split the original terrain. Splitting methods include, but are not limited to, the following: first, grid-based splitting, where a regular grid is set on the original terrain, and splitting is performed according to the grid lines; second, terrain feature-based splitting, where natural splitting is performed based on the terrain features of the original terrain, such as ridgelines, valley lines, etc.

[0162] As an example, when splitting the original terrain into layers, some common layers can be defined for the original terrain to facilitate cooperation between different developers. The layers increase from bottom to top, which also represents the transition from the initial terrain data to the final game data. For example, the following seven layers can be defined from bottom to top: Base Layer (the lowest layer), which is the original automatically generated initial terrain data, providing the initial display of the engine's terrain; FinalBase Layer, which represents the effect of the terrain patches below the FinalBase Layer combined with the Base Layer; Generated Layer, which is the terrain data generated after the terrain patch data from the FinalBase Layer is eroded in the terrain generation tool, and also includes the generation of terrain materials; River Layer, used to represent and store river data, for editing and storing river data; Road Layer, used to represent and store road data, for editing and storing road data; Foliage Layer, used to represent and store vegetation data, for editing and storing vegetation data; and FinalGenerated Layer, the final effect layer, which is the result of combining the terrain patches below the FinalBase Layer and the terrain patches from the Generated Data Layer, and the effect displayed in the game is consistent with this layer.

[0163] By dividing the original terrain into layers in the above manner, the terrain details can be displayed more clearly, it is easier to divide the editing tasks of different developers, and when it is necessary to update or modify the terrain data, a certain layer can be processed separately without affecting other layers.

[0164] In practice, the creation of terrain patches in step S202 above can be achieved through the following process.

[0165] See Figure 5 , Figure 5Figure (a) shows the original terrain. A region can be drawn on the original terrain as the target editing region 510. Then, a copy of the data corresponding to the target editing region 510 is generated and used as a terrain patch. Alternatively, a copy of the data corresponding to the original terrain can be generated, and the editable target editing region can be set by drawing a mask layer (e.g., a mask layer) on the copy data.

[0166] Terrain patches are basic units that developers use to edit terrain, independent of the original terrain. All terrain editing by developers is done on terrain patches, and terrain patches are also the carriers for later terrain modifications. All modification data is directly stored on terrain patches. It can be understood that terrain patches contain the real terrain data in the original terrain.

[0167] When creating a terrain patch, you can select the layer corresponding to the terrain patch, and you can also set the editable area on the terrain patch. After creation, you can also freely modify the editable area. In other words, there are two effective areas for terrain patch settings: one is the terrain layer that is set to be effective, and the other is the editable area.

[0168] Terrain patches can store three types of data, which can be customized according to certain rules. These three types of data can include: basic terrain data, which is the original terrain data copied from the original terrain and terrain editing data, including terrain height, texture, roads, etc., which is the main content of terrain editing; effective area, where all areas of the initially created terrain patch are effective (editable) by default. If it is determined that only one or a few areas of the terrain patch need to be edited based on editing needs, the target editing area with editing permissions in the terrain patch can be set by drawing a mask layer (such as a mask layer, i.e., the aforementioned permission control layer). After setting the target editing area, other areas of the terrain patch are not editable. This method can achieve fine division of the terrain patch area; priority data, which can include hierarchical priority and patch priority. Hierarchical priority is used to determine the display priority of terrain patches of different levels, and patch priority is used to determine which terrain patch data to use when different developers edit the same area.

[0169] As an example, when setting patch priorities, an enumeration value (e.g., patch1 to patch99) can be used to set the patch priorities of different terrain patches at the same level. The larger the value in the enumeration value, the higher the patch priority.

[0170] As an example, the types of editable terrain data vary depending on the level of the terrain patch. For instance, for a terrain patch at the Base level, the height map, effective area, and priority in the base terrain data can be edited in the target editing area of ​​the terrain patch; for a terrain patch at the generated level, all base terrain data, effective area, and priority can be modified on the terrain patch.

[0171] By restricting the type of terrain data for terrain patches, the edited data can be contained within the terrain patch at the specified level, reducing the problem of not being able to regenerate procedurally after modifying the original terrain data.

[0172] In practice, Figure 7 A flowchart illustrating the hierarchical division method provided in this application embodiment is shown below. Figure 7 The process of hierarchically dividing the original terrain can include the following steps.

[0173] S301, Terrain generation judgment.

[0174] Determine whether to generate entirely new terrain based on the actual editing needs of the game scene, or to re-edit the terrain based on the existing terrain.

[0175] S302, Import existing data.

[0176] If it is determined that the original terrain needs to be generated based on the existing terrain (i.e., existing data), the existing terrain data can be imported, which can be the terrain data of the developers, so that the developers can continue to edit the original terrain patch.

[0177] S303 generates terrain.

[0178] If S301 determines that new terrain needs to be generated, the new terrain can be imported into the Houdini tool to programmatically generate the corresponding original terrain; if existing data is imported, the existing terrain can be imported into the Houdini tool to programmatically generate the corresponding original terrain.

[0179] S304, Import to editor.

[0180] Import the generated raw terrain into the editor (e.g., UE Engine) according to the editor format.

[0181] S305, terrain stratification.

[0182] The editor divides the original terrain into layers based on a preset layering method and stores the editable data of each layer separately, allowing developers to collaboratively edit each layer through terrain patches.

[0183] In practice, Figure 8 A schematic diagram of the terrain editing process provided in the embodiments of this application is shown below. Figure 8 When developers edit terrain using the terminal they are using, they may include the following procedures.

[0184] S401, check patch status.

[0185] Determine if the current developer has created a terrain patch, such as an edited but incomplete terrain patch.

[0186] S402, loading patch.

[0187] If a terrain patch already exists, it can be loaded so that developers can continue terrain editing.

[0188] S403, generate patch.

[0189] If it is determined that no terrain patch has been created by the current developer, the corresponding level and editing area can be determined according to the actual editing task, and a new terrain patch can be generated based on the corresponding level and editing area.

[0190] S404, Draw the target editing area.

[0191] The target editing area in a terrain patch can be set by drawing an encoding layer (such as a mask layer) for the terrain patch. This step is optional, and developers can set it based on actual needs to reduce editing conflicts with other people.

[0192] S405, Terrain Editing.

[0193] Developers can perform terrain editing on the target editing area of ​​the terrain patch in the terminal according to the actual editing task.

[0194] S406, preview the terrain.

[0195] This step is optional. Developers can preview the effect of terrain patch editing at the current level or the overall terrain effect at any time during the terrain editing process.

[0196] S407, Data storage.

[0197] After completing terrain editing, the patch data edited in the terrain patch can be stored. Data can also be stored at any time during the terrain editing process to avoid the loss of patch data.

[0198] S408, determine whether to generate the final terrain.

[0199] Confirm that all terrain patches corresponding to the original terrain have been fully edited.

[0200] S409, generate the final terrain.

[0201] If all terrain patches have completed terrain editing, the patch data of the terrain patches can be overlaid according to the hierarchical priority and patch priority of each terrain patch to generate the final complete terrain.

[0202] S410, End.

[0203] The process ends if a complete terrain has been generated, or if the developer temporarily ends the current terrain editing before a complete terrain has been generated.

[0204] The following description continues to illustrate the exemplary structure of the terrain editing device 455 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2 As shown, the software modules stored in the terrain editing device 455 in the memory 450 may include:

[0205] The partitioning module 4551 is used to partition the terrain to be edited into at least two terrain levels, with different terrain levels representing different types of terrain data.

[0206] The editing module 4552 is used to determine the terrain patch for each terrain level, and to perform terrain editing on the terrain patch based on the terrain data represented by the terrain level to obtain the patch data of the terrain patch.

[0207] The fusion module 4553 is used to respond to the completion of terrain editing of terrain patches at various terrain levels, and to fuse the patch data of terrain patches at various terrain levels based on at least one of the patch priority of the terrain patch and the level priority of the terrain level where the terrain patch is located, to obtain the target terrain.

[0208] In some embodiments, the partitioning module 4551 is further configured to extract terrain features of the terrain to be edited to obtain terrain features of the terrain to be edited; and to partition the terrain to be edited into at least two terrain levels based on the editing requirements and terrain features of the terrain to be edited, thereby obtaining at least two terrain levels of the terrain to be edited; wherein the at least two terrain levels include at least one of the following: a basic terrain level for characterizing basic terrain data of the terrain to be edited, and an environmental terrain level for characterizing environmental terrain data of the terrain to be edited.

[0209] In some embodiments, the editing module 4552 is further configured to perform terrain editing of basic terrain data on the terrain patch at the basic terrain level; and to perform terrain editing of environmental terrain data on the terrain patch at the environmental terrain level.

[0210] In some embodiments, the editing module 4552 is further configured to perform patch detection for each terrain level to obtain patch detection results for each terrain level; if the patch detection results indicate that no patch has been created for the terrain level, create a terrain patch for the terrain level; if the patch detection results indicate that a patch has been created for the terrain level, detect the editable area of ​​the created patch to obtain a region detection result; if the region detection results indicate that the editable area of ​​the created patch includes the target editing area, use the created patch as a terrain patch for the terrain level and load the created patch.

[0211] In some embodiments, the editing module 4552 is further configured to determine, for the terrain patch of the terrain level, a target editing area with editing permissions in the terrain patch; and to perform terrain editing on the target editing area in the terrain patch based on the terrain data represented by the terrain level.

[0212] In some embodiments, the editing module 4552 is further configured to create a permission control layer corresponding to the terrain patch, and draw a target control area in the permission control layer; align the permission control layer with the terrain patch, and merge the aligned permission control layer with the terrain patch; and use the area in the terrain patch that is aligned with the target control area as the target editing area with editing permissions.

[0213] In some embodiments, the editing module 4552 is further configured to set the numerical attribute of the first pixel in the permission control layer to the target value to obtain the target control area indicated by the target value; or, set the grayscale attribute of the second pixel in the permission control layer to the target grayscale value to obtain the target control area with the transparency corresponding to the target grayscale value; or, set the color attribute of the third pixel in the permission control layer to the target color to obtain the target control area with the target color.

[0214] In some embodiments, the fusion module 4553 is further configured to, in response to the number of terrain patches at each terrain level being at least two, fuse the patch data of at least two terrain patches for each terrain level based on the patch priority of each terrain patch at each terrain level to obtain patch fused data of the terrain level; and fuse the patch fused data of each terrain level based on the level priority of each terrain level to obtain the target terrain.

[0215] In some embodiments, the fusion module 4553 is further configured to detect at least two terrain patches at the terrain level to obtain the editing areas of each terrain patch; based on the editing areas of each terrain patch, filter out at least two target terrain patches with duplicate editing areas from the at least two terrain patches; determine the first terrain patch with the highest patch priority among the at least two target terrain patches, the second terrain patch other than the first terrain patch among the target terrain patches, and the third terrain patch other than the target terrain patch among the at least two terrain patches; and fuse the patch data of the first terrain patch, the patch data of the second terrain patch other than the duplicate editing areas, and the patch data of the third terrain patch to obtain patch fusion data at the terrain level.

[0216] In some embodiments, the fusion module 4553 is further configured to perform regional alignment on the patch fusion data of each terrain level; and to fuse the regionally aligned fusion data in order of increasing priority of each terrain level to obtain the target terrain.

[0217] In some embodiments, the terrain editing device 455 further includes a modification module, configured to, in response to a modification request for a specified area in the target terrain, determine the target terrain level to be modified in the modification request; in response to the existence of an existing terrain patch corresponding to the specified area in the target terrain level, load the existing terrain patch; and perform the modification operation requested in the modification request on the existing terrain patch.

[0218] This application provides a computer program product comprising a computer program or computer-executable instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the terrain editing method described above in this application.

[0219] This application provides a computer-readable storage medium storing computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the processor will execute the terrain editing method provided in this application. For example, ... Figure 3A The terrain editing method is shown.

[0220] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0221] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.

[0222] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).

[0223] As an example, computer-executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.

[0224] In summary, through the above embodiments, when editing terrain to be edited, the terrain can first be divided into multiple terrain levels. For each terrain level, a corresponding terrain patch is determined. Then, editing operations are performed on the terrain data corresponding to the terrain level on the terrain patch to obtain patch data for the terrain patch. After all terrain patches have been edited, the patch data of each terrain patch is merged according to the patch priority and the level priority of the terrain level in which the terrain patch is located to obtain the target terrain. In this way, the terrain patch is an independent editing unit of the terrain to be edited, and different terrain patches are used for different terrain levels. This allows developers to independently edit terrain on different terrain patches without interference. Multiple people can also simultaneously edit terrain data of the same terrain level on different terrain patches, improving the flexibility of terrain editing and thus increasing its efficiency.

[0225] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A terrain editing method, characterized in that, The method includes: The terrain to be edited is divided into layers to obtain at least two terrain layers, and different terrain layers represent different types of terrain data; For each terrain level, a terrain patch for that terrain level is determined, and terrain editing is performed on the terrain patch based on the terrain data represented by the terrain level to obtain patch data for the terrain patch. In response to the completion of terrain editing for each terrain patch at each terrain level, the patch data of the terrain patches at each terrain level are fused based on at least one of the patch priority of the terrain patch and the level priority of the terrain level where the terrain patch is located, to obtain the target terrain.

2. The method according to claim 1, characterized in that, The process of dividing the terrain to be edited into layers yields at least two terrain layers, including: The terrain features of the terrain to be edited are extracted. Based on the editing requirements of the terrain to be edited and the terrain features, the terrain to be edited is divided into layers to obtain at least two terrain layers. The at least two terrain levels include at least one of the following: a basic terrain level for characterizing the basic terrain data of the terrain to be edited, and an environmental terrain level for characterizing the environmental terrain data of the terrain to be edited.

3. The method according to claim 2, characterized in that, The terrain editing of the terrain patch based on the terrain data represented by the terrain level includes: For the terrain patch at the basic terrain level, perform terrain editing on the basic terrain data. For terrain patches at the environmental terrain level, terrain editing of environmental terrain data is performed on the terrain patches at the environmental terrain level.

4. The method according to claim 1, characterized in that, The step of determining the terrain patch for each terrain level includes: Patch detection is performed on each of the aforementioned terrain levels to obtain patch detection results for each of the aforementioned terrain levels; If the patch detection result indicates that there is no existing patch for the terrain level, a terrain patch is created for that terrain level. If the patch detection result indicates that a patch has been created at the terrain level, the editable area of ​​the created patch is detected to obtain the area detection result; When the region detection result indicates that the editable region of the created patch includes the target editable region, the created patch is used as the terrain patch of the terrain level, and the created patch is loaded.

5. The method according to claim 1, characterized in that, The terrain editing of the terrain patch based on the terrain data represented by the terrain level includes: For the terrain patch at the aforementioned terrain level, determine the target editing area within the terrain patch that has editing permissions; Based on the terrain data represented by the terrain level, terrain editing is performed on the target editing area in the terrain patch.

6. The method according to claim 5, characterized in that, The step of determining the target editable area with edit permissions in the terrain patch includes: Create a permission control layer corresponding to the terrain patch, and draw the target control area in the permission control layer; The permission control layer and the terrain patch are aligned in position, and the aligned permission control layer and the terrain patch are then merged. The area in the terrain patch that is aligned with the target control area is designated as the target editing area with editing permissions.

7. The method according to claim 6, characterized in that, Drawing the target control area in the access control layer includes: Set the numerical attribute of the first pixel in the permission control layer to the target value to obtain the target control area indicated by the target value; or... Set the grayscale attribute of the second pixel in the permission control layer to the target grayscale value to obtain a target control area with the transparency corresponding to the target grayscale value; or... Set the color attribute of the third pixel in the permission control layer to the target color to obtain the target control area with the target color.

8. The method according to claim 1, characterized in that, The method of fusing patch data for terrain patches at each terrain level based on at least one of the patch priority of the terrain patch and the level priority of the terrain level where the terrain patch is located includes: In response to the fact that there are at least two terrain patches for each terrain level, the patch data of the at least two terrain patches are fused based on the patch priority of each terrain patch for each terrain level to obtain patch fused data for the terrain level. Based on the hierarchical priority of each terrain level, the patch fusion data of each terrain level are fused to obtain the target terrain.

9. The method according to claim 8, characterized in that, The patch data of at least two terrain patches are fused based on the patch priority of each terrain patch at the terrain level to obtain patch fused data at the terrain level, including: At least two terrain patches of the terrain level are detected to obtain the editing area of ​​each terrain patch; Based on the edit area of ​​each terrain patch, at least two target terrain patches with duplicate edit areas are selected from the at least two terrain patches; The first terrain patch with the highest patch priority among the at least two target terrain patches, the second terrain patch other than the first terrain patch among the target terrain patches, and the third terrain patch other than the target terrain patch among the at least two terrain patches; The patch data of the first terrain patch, the patch data of the second terrain patch excluding the repeated editing area, and the patch data of the third terrain patch are fused to obtain the patch fused data of the terrain level.

10. The method according to claim 8, characterized in that, The step of fusing patch fusion data of each terrain level based on the hierarchical priority of each terrain level to obtain the target terrain includes: Region alignment is performed on the patch fusion data of each terrain level; According to the hierarchical priority of each terrain level from low to high, the patch fusion data after region alignment are fused to obtain the target terrain.

11. The method according to claim 1, characterized in that, After obtaining the target terrain, the method further includes: In response to a modification request for a specified area in the target terrain, determine the target terrain level that the modification request requests to be modified; In response to the existence of a created terrain patch corresponding to the specified area in the target terrain layer, the created terrain patch is loaded; Perform the modification operations requested in the modification request on the created terrain patch.

12. A terrain editing device, characterized in that, The device includes: The partitioning module is used to partition the terrain to be edited into at least two terrain levels, where different terrain levels represent different types of terrain data. The editing module is used to determine the terrain patch for each terrain level, and to perform terrain editing on the terrain patch based on the terrain data represented by the terrain level to obtain the patch data of the terrain patch. The fusion module is used to respond to the completion of terrain editing of the terrain patch at each terrain level, and to fuse the patch data of the terrain patch at each terrain level based on at least one of the patch priority of the terrain patch and the level priority of the terrain level where the terrain patch is located, to obtain the target terrain.

13. An electronic device, characterized in that, The electronic device includes: Memory is used to store executable instructions or computer programs. A processor, when executing computer-executable instructions or computer programs stored in the memory, implements the terrain editing method according to any one of claims 1 to 11.

14. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by a processor, the terrain editing method according to any one of claims 1 to 11 is implemented.

15. A computer program product comprising computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by a processor, the terrain editing method according to any one of claims 1 to 11 is implemented.