Map generation method, device, electronic equipment and computer storage medium

By selecting primitives with high matching degree through neighbor coding and spatial correlation coding to fill the target area, and combining the backtracking algorithm to optimize the filling process, the problem of low map generation efficiency is solved, and more efficient and logically consistent map construction is achieved.

CN115294239BActive Publication Date: 2026-06-02BEIJING ZITIAO NETWORK TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2022-08-01
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing technologies have low efficiency in map generation processes, making it difficult to effectively construct complex game scenes with consistent logic.

Method used

By determining the neighbor codes and spatial correlation codes of neighboring regions, and combining them with the codes of candidate map primitives, primitives with high matching degrees are selected to fill the target region. A classification model and backtracking algorithm are used to optimize the filling process.

Benefits of technology

It improves the efficiency and logical consistency of map generation, reduces the time cost of map design, and makes the generated scenarios more logical and usable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115294239B_ABST
    Figure CN115294239B_ABST
Patent Text Reader

Abstract

According to embodiments of this disclosure, a method, apparatus, electronic device, and computer storage medium for map generation are provided. The map generation method described herein includes: determining at least one neighboring region associated with a target region in a map to be generated, wherein the at least one neighboring region has been filled with neighboring map primitives, and the distance from the at least one neighboring region to the target region is less than a predetermined distance; determining a spatial correlation code based on the neighbor codes of the neighboring map primitives; determining a matching degree of candidate map primitives relative to the target region based at least on the spatial correlation code and the respective codes of the candidate map primitives; and, in response to a matching degree indicating that at least one candidate map primitive is available for the target region, selecting a target map primitive for filling the target region from the candidate map primitives based at least on the matching degree. Based on the above, this disclosure enables automatic map filling based on the coding of map primitives, thereby improving the efficiency of map generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The exemplary embodiments disclosed herein generally relate to the field of computers, and in particular to methods, apparatus, electronic devices, and computer-readable storage media for map generation. Background Technology

[0002] With the development of computer technology, various types of interactive applications are emerging. For example, in the gaming field, video games can now provide players with rich game scenes. Generally speaking, game scenes (also known as game maps) can be constructed by filling in basic scene elements. For example, maps / scenes in some classic games are made up of multiple basic two-dimensional elements stacked together. In various electronic interactive scenarios, the automatic generation of maps or virtual scenes is an important task. Summary of the Invention

[0003] In a first aspect of this disclosure, a method for map generation is provided. The method includes: determining at least one neighboring region associated with a target region in a map to be generated, the at least one neighboring region already populated with neighboring map primitives, and the distance from the at least one neighboring region to the target region being less than a predetermined distance; determining a spatial correlation code based on neighbor codes of the neighboring map primitives; determining a matching degree of candidate map primitives relative to the target region based at least on the spatial correlation code and the respective codes of the candidate map primitives; and, in response to a matching degree indicating that at least one candidate map primitive is available for the target region, selecting a target map primitive from the candidate map primitives for populating the target region, at least based on the matching degree.

[0004] In a second aspect of this disclosure, an apparatus for map generation is provided. The apparatus includes: a neighbor determination module configured to determine at least one neighboring region associated with a target region in a map to be generated, the at least one neighboring region being populated with neighboring map primitives, and the distance from the at least one neighboring region to the target region being less than a predetermined distance; an encoding determination module configured to determine a spatial correlation encoding based on neighbor encodings of the neighboring map primitives; a primitive matching module configured to determine a matching degree of candidate map primitives relative to the target region based at least on the spatial correlation encoding and the respective encodings of the candidate map primitives; and a map filling module configured to select a target map primitive for filling the target region from the candidate map primitives, at least based on the matching degree, in response to a matching degree indicating that at least one candidate map primitive is available for the target region.

[0005] In a third aspect of this disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit. When executed by the at least one processing unit, the instructions cause the device to perform the method of the first aspect.

[0006] In a fourth aspect of this disclosure, a computer-readable storage medium is provided. A computer program is stored on the medium, and the computer program is executed by a processor to implement the method of the first aspect.

[0007] It should be understood that the content described in this summary section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0008] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:

[0009] Figure 1 A schematic diagram of an example environment in which several embodiments of the present disclosure can be implemented is shown;

[0010] Figure 2 A flowchart illustrating an example process for map generation according to some embodiments of this disclosure is shown;

[0011] Figure 3 A schematic block diagram of map generation according to some embodiments of the present disclosure is shown;

[0012] Figure 4 A schematic structural block diagram of an apparatus for map generation according to some embodiments of the present disclosure is shown; and

[0013] Figure 5 A block diagram of a computing device capable of implementing several embodiments of the present disclosure is shown. Detailed Implementation

[0014] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0015] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0016] As discussed above, effectively encoding maps / scenes is an important task. Taking game map encoding as an example, most game scenes are composed of combinations of basic game elements. For example, basic game elements such as land, sand, snow, water, and wood can be combined to form complex game maps or game scenes.

[0017] Embodiments of this disclosure propose a scheme for map generation. In this scheme, firstly, at least one neighboring region associated with a target region in the map to be generated can be determined, wherein at least one neighboring region has been filled with neighboring map primitives, and the distance from at least one neighboring region to the target region is less than a predetermined distance.

[0018] Furthermore, spatial correlation codes can be determined based on the neighbor codes of neighboring map primitives, and the matching degree of candidate map primitives relative to the target region can be determined based at least on the spatial correlation codes and the codes of the candidate map primitives themselves.

[0019] Additionally, in response to a matching degree indicating that at least one candidate map primitive is available for the target area, a target map primitive for filling the target area is selected from the candidate map primitives based at least on the matching degree.

[0020] According to this scheme, by taking into account the encoding of map primitives in already filled areas, embodiments of this disclosure can achieve automatic map generation, thereby improving the efficiency of map construction.

[0021] The following describes various example implementations of this solution in further detail with reference to the accompanying drawings. For convenience, the generation of game maps will be used as an example to describe the solution of this disclosure. It should be understood that the embodiments of this disclosure can also be applied to other suitable fields, such as electronic interaction, simulation, or modeling.

[0022] Example Environment

[0023] First see Figure 1 The illustration schematically shows a sample environment 100 in which exemplary implementations according to this disclosure may be implemented. Figure 1 As shown, example environment 100 may include production device 140.

[0024] The generating device 140 can acquire at least one map primitive, such as map primitive 120-1, map primitive 120-2, and map primitive 120-3 (each individually or collectively referred to as map primitive 120). Furthermore, the generating device 140 can also acquire the encodings of map primitive 120, such as encoding 130-1 for map primitive 120-1, encoding 130-2 for map primitive 120-2, and encoding 130-3 for map primitive 120-3. Encodings 130-1 to 130-3 can be collectively referred to as encoding 130. In some embodiments, such encoding 130 can be a vector embedding representation.

[0025] In this disclosure, map primitive 130 is intended to represent the arrangement pattern of map elements within a space of a predetermined size. For example... Figure 1 As shown, the map elements used to constitute map primitive 130 may include, for example, map elements 110-1 to 110-7 (referred to individually or collectively as map element 110). Depending on the shape of the map 150 to be generated, map element 110 may be a graphic element with different dimensions.

[0026] For example, such as Figure 1 As shown, map element 110 can correspond to a two-dimensional area. Alternatively, map element 110 can also correspond to a space of other dimensions, such as a one-dimensional space or a three-dimensional space.

[0027] In some examples, each map element 110 may have a corresponding pattern or texture to represent the corresponding substance in the map scene. For example, in Figure 1 In the example, map element 110-1 may represent rocks in the map scene, map element 110-2 may represent clouds in the map scene, map element 110-3 may represent a beach in the map scene, map element 110-4 may represent seawater in the map scene, map element 110-5 may represent a boat in the map scene, map element 110-6 may represent trees in the map scene, and map element 110-7 may represent the sky in the map scene. It should be understood that the substances represented by the above map elements are merely exemplary and are not intended to constitute a limitation of this disclosure.

[0028] In other examples, such a map element 110 may be used solely to present pattern or texture information, rather than being intended to correspond to a specific substance. Alternatively, a map element 110 may also correspond to a combination of multiple substances or multiple patterns or textures.

[0029] As an example, map element 110 may correspond to a 1*1 area. Map primitive 120 may correspond to an H*W area, where H and W can be any positive integers. In some embodiments, a map primitive 130 may also correspond to only one map element 110, that is, H and W are both 1.

[0030] For example, in Figure 1 In the example, map primitive 120 could be a 2x2 area to indicate the possible layout of map elements within that 2x2 area. As an example, map primitive 120 could indicate a layout of map elements within a 2x2 area as [seawater, seawater] and [beach, beach].

[0031] Furthermore, as will be described in detail below, the generating device 140 can determine the map primitives 120 that can be filled in each area of ​​the map 150 to be generated according to the encoding 130, and finally generate a complete map 150.

[0032] The generated map 150 can be directly deployed for use in games or other interactive scenarios. Alternatively, the generated map 150 can be sent to map designers for modification or detail optimization to obtain a higher quality map. Such automated map generation can effectively reduce the time cost of map design and improve the efficiency of map construction. In some embodiments, the code 130 can be generated by an encoding device based on a training map, so that the code 130 can uniquely represent the corresponding map primitive 120.

[0033] Example map generation process

[0034] Figure 2 A flowchart of a map generation process 200 according to some embodiments of the present disclosure is shown. Process 200 can be generated by... Figure 1 This is achieved using the generation device 140. For ease of discussion, it will be combined with... Figure 1 To describe process 200.

[0035] In box 202, generating device 140 determines at least one neighboring region associated with a target region in the map to be generated, wherein at least one neighboring region has been filled with neighboring map primitives and the distance from at least one neighboring region to the target region is less than a predetermined distance.

[0036] The following will combine Figure 3 This describes the specific process of map generation. Figure 3 A schematic block diagram 300 illustrating map generation according to some embodiments of the present disclosure is shown. Exemplarily, the map to be generated is 320.

[0037] In some embodiments, the map 320 to be generated can initially be a blank map. The generating device 140 can randomly determine a map area and fill the map area with a map primitive of a corresponding size by sampling.

[0038] In some embodiments, the generating device 140 may also select the next area to be filled based on the uncertainty of the area to be filled in the map 320, and fill it sequentially. In some embodiments, the uncertainty may be represented as an entropy function, which may be determined based on the probability that the area to be filled is filled with each candidate map primitive.

[0039] For example, determining the region to be filled can be represented as:

[0040]

[0041] in Let H represent the coordinates of the determined region to be filled, and let H represent the entropy function. Indicates when and The positions are i K and j K That is, the relative position is δ(i) K j K Is it placed properly? and K represents the corresponding map primitive; K is used to represent the scale information of the map primitive; Hist represents the map's filling history, also known as the collapse history. Whenever a new area is filled, its corresponding coordinates can be added to Hist; M represents the map primitive that is filled at the corresponding coordinates. This represents a conditional probability function used to indicate the location where map primitives are filled. The probability of N; k This indicates the number of candidate map primitives.

[0042] In some embodiments, the entropy function H can be expressed as:

[0043]

[0044] Based on this method, the generating device 140 can select the region to be filled each time according to the uncertainty of each region to be filled (e.g., the value of the entropy function). For example, as shown in formula (1), the region to be filled can be the region with the minimum entropy among all regions to be filled.

[0045] Furthermore, the generating device 140 can perform subsequent primitive filling based on the already filled map primitives. Taking region 330-3 as an example of the target region, regions 330-1, 330-2, and 330-4 in the map to be generated 320 have already been filled, for example.

[0046] In some embodiments, the generating device 140 may determine at least one neighboring region associated with the target region 330-3. In some embodiments, the neighboring region may be a region that is spatially directly adjacent to the target region 330-3. For example, for a two-dimensional map, the neighboring region may include four physically adjacent regions: left, top, right, and bottom. Alternatively, the neighboring region may also include regions such as top-left, bottom-left, top-right, and bottom-right.

[0047] In some embodiments, neighboring regions can be determined based on the distance between regions, rather than necessarily being spatially adjacent. For example, the distance between two regions could be the straight-line distance between their center points. In yet other embodiments, neighboring regions can be a predetermined number of regions that are closest to the target region.

[0048] It should be understood that, regardless of the method used to determine the neighboring area, it can be considered as an area that is less than a predetermined distance threshold (static threshold or dynamic threshold) from the target area.

[0049] by Figure 3 As an example, the generating device 140 may associate with the target area 330-3, including neighbor areas 330-1, 330-2 and 330-4, which are filled with corresponding neighbor map primitives.

[0050] Continue to refer to Figure 2 In box 204, the generating device 140 determines spatially relevant encodings based on the neighbor encodings of neighbor map primitives. In some embodiments, using Figure 3 As an example, the generating device 140 may determine the neighbor codes 332, 334 and 338 of the neighbor map primitives based on the target codes determined by the encoding device 130 (or using the encoder trained by the encoding device 130).

[0051] In some embodiments, similar to the encoding process described above, neighbor codes 332, 334, and 338 can also indicate the location information of the corresponding neighbor region. For example, this location information can indicate the location of the neighbor region in the map to be generated, such as the center location of the neighbor region. Additionally or alternatively, this location information can also indicate the relative position of the neighbor region with respect to the target region, for example, it can be represented as the coordinate difference between the center locations of the two regions.

[0052] In some embodiments, neighbor codes 332, 334 and 338 may also indicate first-level information to indicate that the size of the neighbor area is a first size (e.g., 2*2).

[0053] In some embodiments, similar to the encoding process, the generating device 140 may also employ a multi-level generation mechanism. Accordingly, spatially correlated encoding may further include upper-level encoding. Specifically, the generating device 140 may determine an upper-level region of the target region 330-3, wherein the upper-level region covers the target region 330-3 and has a second size, the second size being larger than the first size.

[0054] by Figure 3 As an example, the generating device 140 may first consider only the neighbor codes and use map primitives corresponding to the second size to fill in the obtained map 310. Exemplarily, the second size may correspond to the entire area of ​​map 310, for example, 4*4. In this example, the generating code 210 may determine that the parent area of ​​the target area 330-3 is the entire 4*4 area of ​​map 310.

[0055] Furthermore, the generating device 140 can determine the parent map primitives whose parent areas are filled, and determine the parent code of the parent map primitives. For example, the generating device 140 can use the encoding mechanism determined by the encoding device 130 to determine the parent code 340.

[0056] In some embodiments, similar to the encoding process, in addition to indicating the encoding of the parent map primitives, the parent code 340 may also indicate the location information of the parent region. For example, this location information may indicate the location of the parent region in the map to be generated, such as the center location of the parent region. Additionally or alternatively, this location information may also indicate the relative position of the parent region with respect to the target region, for example, it may be represented as the coordinate difference between the center locations of the two regions. In some embodiments, the parent code 340 may also indicate second-level information to indicate that the size of the neighboring region is a second size (for example, 4*4).

[0057] Furthermore, the generating device 140 can determine the spatially relevant code based on the neighbor code of the neighbor map primitive and the parent code of the parent map primitive. For example, the generating device 140 can determine the spatially relevant code by cascading neighbor codes 332, 334, 338 and parent code 340.

[0058] Continue to refer to Figure 2 In box 206, the generating device 140 determines the matching degree of the candidate map primitives relative to the target area based at least on the spatial correlation coding and the coding of the candidate map primitives.

[0059] Specifically, such as Figure 3 As shown, the generation device 140 can utilize the classification model 342 to process the spatial correlation encoding and the individual encodings (e.g., encoding 336) of the candidate map primitives (e.g., map primitives 322-1, 322-2, and 322-3) to determine the probability, i.e., the matching degree 360, that each candidate map primitive is selected to fill the target region 330-3. In some embodiments, the classification model 342 can be trained using a training map so that it can determine whether the current region is suitable for filling a specific candidate map primitive based on the encoding and spatial encoding of the candidate map primitives.

[0060] In some embodiments, each candidate map primitive can be an arbitrary map primitive with a first size determined based on a training map. Such a training map can include any map used to generate map primitive codes.

[0061] Alternatively, in determining candidate map primitives, the generation device 140 may also consider primitive constraint information. Specifically, the generation device 140 may determine primitive constraint information for at least one neighboring map primitive based on the training map, wherein the primitive constraint information indicates the probability that a particular map primitive is located at a specific relative position of at least one neighboring map primitive.

[0062] For example, the generation device 140 can facilitate the positional relationships between all map primitives in the training map, determining that a map primitive (e.g., a tree) does not exist around another map primitive (e.g., a beach) in the training map. Thus, the generation device 140 can determine primitive constraint information to indicate that the map primitive (tree) cannot be located around the map primitive (beach).

[0063] Furthermore, the generating device 140 can exclude one or more candidate map primitives from all candidate map primitives based on primitive constraint information, thereby determining candidate map primitives for the target area.

[0064] Continue to refer to Figure 2 In box 208, generating device 140 determines whether there are available candidate map primitives based on the matching degree. In response to determining in box 210 that the matching degree indicates that at least one candidate map primitive is available for the target area, process 200 can proceed to box 210, whereby generating device 140 selects the target map primitive from the candidate map primitives to fill the target area, based at least on the matching degree.

[0065] In some embodiments, the generation device 140 may use the classification model 342 to determine the probability that each candidate map primitive is selected to fill the target region 330-3. For example, the generation device 140 may determine the probability that each candidate map primitive is used to fill the target region based on formula (3):

[0066]

[0067] Furthermore, when the generating device 140 determines, based on formula (3), that the probability of at least one candidate map primitive being selected is not 0, the generating device 140 may further select the target map primitive for filling the target area based on the probability.

[0068] Furthermore, the generating device 140 can sample candidate map primitives based on the determined probability to determine the target map primitives, such as map primitive 322-3, for filling the target area 330-3.

[0069] For example, generating device 140 can make Where p represents a vector composed of the probabilities of each candidate map primitive. Furthermore, the generation device 140 can generate the vector from the probability distribution. The target map primitives used to fill the target area 330-3 are determined by sampling.

[0070] In some embodiments, after the target region 330-3 is filled, the generation device 140 can update the collapse history Hist:

[0071]

[0072] Continue to refer to Figure 2 In response to determining in box 208 that the matching degree indicates that none of the candidate map primitives are available for the target area, process 200 can proceed to box 210. In box 210, the generating device 140 can determine at least one previously filled historical area in the map based on the map's area filling order. Further, in box 212, the generating device 140 can refill the at least one historical area.

[0073] In some embodiments, when the generating device 140 determines that the probability of selecting all candidate map primitives is 0, the generating device 140 may employ a wave function collapse algorithm to determine all historical regions that have already been filled based on the collapse history Hist, so that all regions that have already been filled are refilled.

[0074] In some embodiments, the generation device 140 can also reduce the computational cost of refilling by maintaining a backtracking tree. For example, the generation device 140 can maintain a corresponding backtracking tree for each coordinate. This backtracking tree can indicate the area in the map that was refilled when the target area failed to be filled.

[0075] For example, with Figure 3 As an example, the filling order of map 320 is, for example, 330-1, 330-2, 330-4, and 330-3. When it is initially determined that the target area 330-3 cannot be filled, the generating device 140 may first select the previous filled area 330-4 of the target area 330-3 and cause 330-4 to be refilled.

[0076] Accordingly, the generating device 140 can update the backtracking tree of the target region 330-3 so that region 330-4 is added to the backtracking tree. Furthermore, if the generating device 140 determines again that the target region 330-3 still cannot be filled after region 330-4 has been refilled, the generating device 140 can determine from the backtracking tree that region 330-4 was refilled last time, but the problem of not being able to place it still cannot be solved.

[0077] Therefore, the generation device 140 can determine, based on the backtrace tree and the collapse history, the last filled region in the collapse history that is not included in the backtrace tree. For example, in the case of a second failure, the generation device 140 can determine that region 330-2 is the last filled region in the collapse history that is not included in the backtrace tree. Furthermore, the generation device 140 can determine that region 330-2 and all regions in the filling order of region 330-2 need to be refilled.

[0078] Thus, the generating device 140 can determine at least one historical region in the map that was previously filled based on the backtracking tree associated with the target region, and cause the at least one historical region to be refilled.

[0079] Furthermore, each time a target region is determined to be unfillable, the generation device 140 can update the backtrace tree associated with the target region based on at least one historical region determined to be refillable. Additionally, the generation device 140 can update the collapse history accordingly, such that at least one historical region determined to need refilling is removed from the collapse history, and update the collapse history in response to a new filling order.

[0080] In some embodiments, the process can also be described as follows: when sum(p) = 0, in the backtracking tree Tracing back along the reverse order of the collapsed history Hist: Hist(|Hist|), Hist(|Hist|-1), ... until... Let Hist(j0) form The new leaf nodes. Furthermore, the generation device can further enable... Then remove Hist(j0), ..., Hist(|Hist|) from the collapsed history Hist.

[0081] Based on this approach, the embodiments of this disclosure can solve the problem of filling failure by backtracking and refilling when a target area cannot be filled, thereby improving the efficiency and accuracy of map filling.

[0082] In some embodiments, as discussed above, the generation device 140 can also sequentially generate maps of different scales, incorporating the encoding of higher-level regions into the filling process of lower-scale maps. Furthermore, according to the backtracking algorithm discussed above, the generation device 140 can perform corresponding backtracking only at a certain level, without needing to re-fill the map composed of larger-scale map primitives that have already been filled. Based on this approach, embodiments of this disclosure can further reduce the computational cost of re-filling and achieve multi-stage and multi-scale map generation.

[0083] Furthermore, since each generation stage at each scale can output a separate generation result, low-scale processes are unidirectionally dependent on high-scale generation results, while no high-scale generation process depends on low-scale generation results. Therefore, the implementation of this disclosure extends the conditional probability distribution that depends only on a single high-scale generation result to a conditional probability function that depends on multiple high-scale generation results, without performing cross-scale backtracking and refilling.

[0084] It should be understood that the field values ​​and map primitive sizes in the specific encodings discussed above are merely exemplary and not intended to constitute a limitation of this disclosure. Furthermore, although Figure 3 The number of encoder layers is shown as two layers. It should be understood that embodiments of this disclosure may use only one map primitive size to perform map generation, or three or more map primitive sizes to perform map generation.

[0085] Furthermore, the process of filling the blank areas can be performed iteratively until the map has been completely filled. Based on this approach, embodiments of this disclosure can automatically construct a more logical map based on the encoding of the already filled neighboring map primitives.

[0086] In some embodiments, the generated map 320 can also be used to guide the generation of maps using smaller map primitives. Figure 3 (Not shown). For example, the generating device 140 can also generate a map of new granularity based on 1*1 size map primitives, and take into account the upper-level encoding corresponding to the upper-level regions in maps 310 and 320 during the generation process.

[0087] It should be understood that the superior region can be represented as: That is, all regions covering the target area whose corresponding map primitive size is larger than the size of the current map primitive. Taking a 1x1 target area as an example, in... Figure 3 In the example, its parent region may include a 4*4 parent region and a 2*2 parent region.

[0088] Based on this approach, embodiments of this disclosure can implement a hierarchical automatic map generation process, thereby obtaining more detailed maps.

[0089] In some embodiments, the generated map 320 can be directly deployed for use in games or other interactive scenarios. Alternatively, the generated map 320 can be sent to map designers for modification or detail optimization to obtain a higher quality map. Such automated map generation can effectively reduce the time cost of map design and improve the efficiency of map construction.

[0090] Based on the map generation process described above, the embodiments of this disclosure can take into account the positional correlation of map primitives, thereby constructing a map that is more in line with map logic and improving the usability of the generated map.

[0091] Example devices and equipment

[0092] Embodiments of this disclosure also provide corresponding apparatus for implementing the above methods or processes. Figure 4 A schematic structural block diagram of an apparatus 400 for map generation according to some embodiments of the present disclosure is shown.

[0093] like Figure 4 As shown, the device 400 may include a neighbor determination module 410, configured to determine at least one neighbor region associated with a target region in a map to be generated, wherein the at least one neighbor region has been filled with neighbor map primitives and the distance from the at least one neighbor region to the target region is less than a predetermined distance.

[0094] The apparatus 400 further includes an encoding determination module 420, configured to determine spatial correlation encoding based on neighbor encoding of neighbor map primitives. The apparatus 400 also includes a primitive matching module 430, configured to determine the matching degree of candidate map primitives relative to the target area based at least on the spatial correlation encoding and the individual encodings of the candidate map primitives.

[0095] In addition, the device 400 also includes a map filling module 440, configured to select a target map primitive for filling the target area from the candidate map primitives, at least based on the matching degree, in response to a matching degree indication that at least one candidate map primitive is available for the target area.

[0096] In some embodiments, the apparatus 400 further includes: a constraint determination module configured to determine primitive constraint information for at least one neighboring map primitive based on a training map, the primitive constraint information indicating the probability that a particular map primitive is located at a specific relative position of at least one neighboring map primitive; and a candidate primitive determination module configured to determine candidate map primitives for a target area based on the primitive constraint information.

[0097] In some embodiments, the target area has a first size, and the apparatus 400 further includes: a fifth determining module configured to determine a parent area of ​​the target area, the parent area covering the target area and having a second size, the second size being larger than the first size; a sixth determining module configured to determine the parent map primitives to which the parent area is filled; and a seventh determining module configured to determine a spatial correlation code based on the neighbor codes of the neighbor map primitives and the parent code of the parent map primitives.

[0098] In some embodiments, the neighbor code also indicates first location information of the neighbor area, and the parent code also indicates second location information of the parent area.

[0099] In some embodiments, the first location information is used to indicate: the first location of the neighboring region in the map to be generated, or the first relative location of the neighboring region relative to the target region; or the second location information is used to indicate: the second location of the parent region in the map to be generated, or the second relative location of the parent region relative to the target region.

[0100] In some embodiments, the neighbor code also indicates first-level information associated with the first size, and the parent code also indicates second-level information associated with the second size.

[0101] In some embodiments, the apparatus 400 further includes a region determination module configured to: determine a plurality of regions to be filled in a map to be generated; determine the uncertainty of the plurality of regions to be filled, the uncertainty being determined based on the probability that the regions to be filled are filled with each candidate map primitive; and determine a target region from the plurality of regions to be filled, the uncertainty of the target region being less than a predetermined threshold.

[0102] In some embodiments, the apparatus 400 further includes a refill module configured to: in response to a matching degree indicating that none of the candidate map primitives are available for the target area, determine at least one previously filled historical area in the map based on the map's area filling order; and refill at least one historical area.

[0103] In some embodiments, the refill module is further configured to: determine at least one historical area in the map that was previously filled based on a backtracking tree associated with the target area, the backtracking tree indicating the area in the map that was refilled when the target area previously failed to be filled.

[0104] In some embodiments, the refill module is further configured to update the backtracking tree associated with the target region based on at least one historical region.

[0105] The units included in device 400 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units may be implemented using software and / or firmware, such as machine-executable instructions stored on a storage medium. In addition to or as an alternative to machine-executable instructions, some or all of the units in device 400 may be implemented at least partially by one or more hardware logic components. By way of example and not limitation, exemplary types of hardware logic components that may be used include field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chips (SoCs), complex programmable logic devices (CPLDs), and so on.

[0106] Figure 5 A block diagram of a computing device / server 500 in which one or more embodiments of the present disclosure may be implemented is shown. It should be understood that... Figure 5 The computing device / server 500 shown is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein.

[0107] like Figure 5 As shown, the computing device / server 500 is in the form of a general-purpose computing device. Components of the computing device / server 500 may include, but are not limited to, one or more processors or processing units 510, memory 520, storage devices 530, one or more communication units 540, one or more input devices 560, and one or more output devices 560. The processing unit 510 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 520. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capabilities of the computing device / server 500.

[0108] The computing device / server 500 typically includes multiple computer storage media. Such media can be any available media accessible to the computing device / server 500, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 520 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 530 can be removable or non-removable media and can include machine-readable media, such as flash drives, disks, or any other media capable of storing information and / or data (e.g., training data for training) and accessible within the computing device / server 500.

[0109] The computing device / server 500 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not explicitly stated... Figure 5 As shown, disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks can be provided. In these cases, each drive can be connected to a bus (not shown) via one or more data media interfaces. Memory 520 may include computer program product 525 having one or more program modules configured to perform various methods or actions of various embodiments of this disclosure.

[0110] The communication unit 540 enables communication with other computing devices via a communication medium. Additionally, the functionality of the components of the computing device / server 500 can be implemented as a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the computing device / server 500 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.

[0111] Input device 550 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 560 can be one or more output devices, such as a monitor, speaker, printer, etc. The computing device / server 500 can also communicate as needed with one or more external devices (not shown) via communication unit 540. These external devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with the computing device / server 500, or with any device (e.g., network card, modem, etc.) that enables the computing device / server 500 to communicate with one or more other computing devices. Such communication can be performed via input / output (I / O) interfaces (not shown).

[0112] According to an exemplary implementation of this disclosure, a computer-readable storage medium is provided that stores one or more computer instructions, wherein one or more computer instructions are executed by a processor to implement the methods described above.

[0113] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0114] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0115] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0116] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0117] Various implementations of this disclosure have been described above. The foregoing description is exemplary and not exhaustive, nor is it limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the implementations disclosed herein.

Claims

1. A method for generating a map, comprising: Identify at least one neighboring region associated with a target region in the map to be generated, wherein the at least one neighboring region has been filled with neighboring map primitives and the distance from the at least one neighboring region to the target region is less than a predetermined distance, wherein the map primitives indicate the arrangement pattern of map elements in a space of a predetermined size; Spatial correlation coding is determined based on the neighbor coding of the neighbor map primitives; The matching degree of the candidate map primitives relative to the target region is determined based at least on the spatial correlation coding and the coding of each candidate map primitive; as well as In response to the matching degree indicating that at least one candidate map primitive is available for the target area, a target map primitive for filling the target area is selected from the candidate map primitives based at least on the matching degree. The method further includes: In response to the matching degree indicating that none of the candidate map primitives can be used for the target area, at least one historical area that was previously filled in the map to be generated is determined based on the area filling order of the map to be generated. as well as Refill at least one of the historical regions.

2. The method according to claim 1, further comprising: Based on the training map, primitive constraint information is determined for the at least one neighboring map primitive, the primitive constraint information indicating the probability that a particular map primitive is located at a specific relative position of the at least one neighboring map primitive; as well as Based on the primitive constraint information, candidate map primitives for the target area are determined.

3. The method according to claim 1, wherein the target region has a first size, the method further comprising: Determine a parent region of the target region, the parent region covering the target region and having a second size, the second size being larger than the first size; Determine the parent map primitives to be filled in the parent region; as well as The spatial correlation code is determined based on the neighbor code of the neighbor map primitive and the parent code of the parent map primitive.

4. The method of claim 3, wherein the neighbor code further indicates first location information of the neighbor area, and the parent code further indicates second location information of the parent area.

5. The method according to claim 4, wherein the first location information is used to indicate: a first location of the neighboring region in the map to be generated, or a first relative position of the neighboring region relative to the target region; or the second location information is used to indicate: a second location of the parent region in the map to be generated, or a second relative position of the parent region relative to the target region.

6. The method of claim 3, wherein the neighbor code further indicates first-level information associated with the first size, and the parent code further indicates second-level information associated with the second size.

7. The method according to claim 1, further comprising: Identify multiple areas to be filled in the map to be generated; The uncertainty of the plurality of regions to be filled is determined based on the probability that each candidate map primitive will be filled into the region to be filled. as well as The target region is determined from the plurality of regions to be filled, wherein the uncertainty of the target region is less than a predetermined threshold.

8. The method of claim 1, wherein determining at least one previously filled historical region in the map to be generated comprises: Based on the backtracking tree associated with the target area, at least one historical area in the map to be generated that was previously filled is determined, the backtracking tree indicating the area in the map to be generated that was refilled when the target area previously failed to be filled.

9. The method according to claim 8, further comprising: Based on the at least one historical region, update the backtracking tree associated with the target region.

10. An apparatus for map generation, comprising: The neighbor determination module is configured to determine at least one neighbor region associated with a target region in the map to be generated, the at least one neighbor region being filled with neighbor map primitives, and the distance from the at least one neighbor region to the target region being less than a predetermined distance, the map primitives indicating the arrangement pattern of map elements in a space of a predetermined size. The encoding determination module is configured to determine spatial correlation encoding based on the neighbor encoding of the neighbor map primitives; The primitive matching module is configured to determine the matching degree of the candidate map primitives relative to the target region based at least on the spatial correlation coding and the coding of each candidate map primitive; as well as A map filling module is configured to, in response to the matching degree indicating that at least one candidate map primitive is available for the target area, select a target map primitive for filling the target area from the candidate map primitives, based at least on the matching degree. The apparatus further includes a processing module configured to, in response to the matching degree indicating that none of the candidate map primitives are available for the target area, determine at least one previously filled historical area in the map to be generated based on the area filling order of the map to be generated; and refill the at least one historical area.

11. An electronic device, comprising: At least one processing unit; as well as At least one memory, coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the device to perform the method according to any one of claims 1-9 when executed by the at least one processing unit.

12. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method according to any one of claims 1-9.