Method, apparatus, electronic device, and computer storage medium for generating map

文档序号:1207247 发布日期:2020-09-04 浏览:12次 中文

阅读说明:本技术 用于生成地图的方法、装置、电子设备和计算机存储介质 (Method, apparatus, electronic device, and computer storage medium for generating map ) 是由 李博 赵林 夏凯 伍骁煜 于 2020-04-30 设计创作,主要内容包括:根据本公开的示例实施例,提供了一种用于生成地图的方法、装置、电子设备和计算机可读存储介质。该方法包括在终端设备处,获取目标对象的属性信息,从预定道路模型集合中选择与目标对象的属性信息相匹配的一个或多个道路模型,以及基于所选择的一个或多个道路模型,生成与目标对象的位置相关联的地图。由此,能够实现地图中的道路模型匹配目标对象的属性信息,从而实现了地图生成的灵活性和多样化。(According to example embodiments of the present disclosure, a method, an apparatus, an electronic device, and a computer-readable storage medium for generating a map are provided. The method includes, at a terminal device, obtaining attribute information of a target object, selecting one or more road models from a predetermined set of road models that match the attribute information of the target object, and generating a map associated with a location of the target object based on the selected one or more road models. Thus, the attribute information of the road model matching target object in the map can be realized, and the flexibility and the diversification of the map generation are realized.)

1. A method for generating a map, comprising:

acquiring attribute information of a target object at a terminal device;

selecting one or more road models from a predetermined set of road models that match the attribute information of the target object; and

generating a map associated with a location of the target object based on the one or more selected road models.

2. The method of claim 1, wherein generating a map associated with the location of the target object comprises:

determining, based on the attribute information of the target object, a number of road instances to be generated based on the one or more selected road models; and

generating a map associated with a location of the target object based on the one or more selected road models and the determined number of road instances.

3. The method of claim 1 or 2, wherein generating a map associated with the location of the target object comprises:

determining an amount of road guidance information based on the attribute information of the target object; and

generating a map associated with a location of the target object based on the one or more selected road models and the determined amount of road guidance information.

4. The method of claim 1 or 2, wherein generating a map associated with the location of the target object comprises:

determining a road instance parameter based on the attribute information of the target object; and

generating a map associated with a location of the target object based on the one or more selected road models and the determined road instance parameters.

5. The method of claim 1, wherein generating a map associated with the location of the target object comprises:

acquiring the equipment attribute of the terminal equipment;

determining a drawing radius based on the device attribute of the terminal device; and

generating the map within a first circle centered on an initial position of the target object and a radius of the drawing radius based on the one or more selected road models.

6. The method of claim 5, further comprising:

updating the map in response to determining that the distance between the current location of the target object and the initial location is greater than or equal to a predetermined distance.

7. The method of claim 6, wherein updating the map comprises:

determining a region which is not overlapped with the first circle in a second circle with the current position as the center of the circle and the drawing radius as the radius; and

randomly extending a current road instance in the map within the determined area, the current road instance being generated based on the one or more selected road models.

8. The method of claim 7, wherein updating the map further comprises:

within the determined area, smoothly extending the current terrain in the map.

9. The method of claim 6, wherein updating the map comprises:

deleting a portion of the map having a distance from the current location that is greater than the rendering radius.

10. The method of claim 6, the predetermined distance comprising half of the rendering radius.

11. The method of claim 1, wherein the road model comprises at least one of a straight model, a curve model, a diving platform model.

12. An apparatus for generating a map, comprising:

an attribute acquisition module configured to acquire attribute information of a target object;

a road model selection module configured to select one or more road models from a predetermined set of road models that match the attribute information of the target object; and

a map generation module configured to generate a map associated with a location of the target object based on the selected one or more road models.

13. The apparatus of claim 12, wherein the map generation module comprises:

a number of road instances determination sub-module configured to determine, based on the attribute information of the target object, a number of road instances to be generated based on the one or more selected road models; and

a map generation sub-module configured to generate a map associated with a location of the target object based on the one or more selected road models and the determined number of road instances.

14. The apparatus of claim 11 or 12, wherein the map generation module comprises:

a guidance information amount determination sub-module configured to determine an amount of guidance information based on the attribute information of the target object; and

a map generation sub-module configured to generate a map associated with a location of the target object based on the one or more selected road models and the determined amount of road guidance information.

15. The apparatus of claim 11 or 12, wherein the map generation module comprises:

a road instance parameter determination sub-module configured to determine a road instance parameter based on the attribute information of the target object; and

a map generation sub-module configured to generate a map associated with a location of the target object based on the selected one or more road models and the determined road instance parameters.

16. The apparatus of claim 12, wherein the map generation module comprises:

the device attribute acquisition submodule is configured to acquire the device attribute of the terminal device;

a drawing radius determination submodule configured to determine a drawing radius based on the device attribute of the terminal device; and

a map generation sub-module configured to generate the map within a first circle having an initial position of the target object as a center and the rendering radius as a radius based on the one or more selected road models.

17. The apparatus of claim 16, further comprising:

a map update module configured to update the map in response to determining that a distance between the current location of the target object and the initial location is greater than or equal to a predetermined distance.

18. The device of claim 17, wherein the map update module comprises:

a region determination submodule configured to determine a region which does not overlap with the first circle within a second circle having the current position as a center and the drawing radius as a radius; and

a road instance extension module configured to randomly extend a current road instance in the map within the determined area, the current road instance being generated based on the one or more selected road models.

19. The apparatus of claim 18, wherein the map update module further comprises:

a terrain extension sub-module configured to smoothly extend a current terrain in the map within the determined area.

20. The device of claim 17, wherein the map update module comprises:

a deletion submodule configured to delete a portion of the map having a distance from the current position that is greater than the rendering radius.

21. The apparatus of claim 17, the predetermined distance comprising half of the rendering radius.

22. The apparatus of claim 12, wherein the road model comprises at least one of a straight model, a curve model, a diving platform model.

23. An electronic device, comprising:

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, the instructions when executed by the at least one processing unit, cause the apparatus to perform the steps of the method of any of claims 1 to 11.

24. A computer-readable storage medium, having stored thereon a computer program which, when executed by a machine, implements the method of any of claims 1-11.

Technical Field

Embodiments of the present disclosure generally relate to the field of information processing, and in particular, to a method, apparatus, electronic device, and computer storage medium for generating a map.

Background

In applications such as virtual race environments, the map is often not changed each time the application is entered. An immutable map may lack interest and challenge for a user after being familiar with a certain map of a virtual racing environment.

Disclosure of Invention

Embodiments of the present disclosure provide a method, an apparatus, an electronic device, and a computer storage medium for generating a map, which can implement a road model in the map to match attribute information of a target object, thereby implementing flexibility and diversification of map generation.

In a first aspect of the disclosure, a method for generating a map is provided. The method comprises the following steps: at a terminal device, attribute information of a target object is acquired, one or more road models matching the attribute information of the target object are selected from a predetermined set of road models, and a map associated with a location of the target object is generated based on the selected one or more road models.

In a second aspect of the disclosure, an apparatus for generating a map is provided. The device includes: the map generation system includes an attribute acquisition module configured to acquire attribute information of a target object, a road model selection module configured to select one or more road models matching the attribute information of the target object from a predetermined set of road models, and a map generation module configured to generate a map associated with a location of the target object based on the selected one or more road models.

In a third aspect of the disclosure, an electronic device is provided. The electronic device comprises at least one processing unit and at least one memory. At least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. The instructions, when executed by the at least one processing unit, cause the electronic device to perform any of the steps of the method described according to the first aspect of the disclosure.

In a fourth aspect of the disclosure, a computer-readable storage medium is provided. The computer readable storage medium has stored thereon a computer program which, when executed by a machine, causes the machine to carry out any of the steps of the method described according to the first aspect of the disclosure.

This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the disclosure, nor is it intended to be used to limit the scope of the disclosure.

Drawings

The foregoing and other objects, features and advantages of the disclosure will be apparent from the following more particular descriptions of exemplary embodiments of the disclosure as illustrated in the accompanying drawings wherein like reference numbers generally represent like parts throughout the exemplary embodiments of the disclosure.

FIG. 1 shows a schematic diagram of an example of an information handling environment 100, according to an embodiment of the present disclosure;

FIG. 2 shows a schematic flow diagram of a method 200 for generating a map according to an embodiment of the present disclosure;

FIG. 3 shows a schematic flow diagram of a method 300 for generating a map, according to an embodiment of the present disclosure;

FIG. 4 shows a schematic flow diagram of a method 400 for updating a map, according to an embodiment of the present disclosure;

FIG. 5 shows a schematic diagram of an updated map 500 according to an embodiment of the present disclosure;

FIG. 6 shows a schematic block diagram of an apparatus 600 for generating a map according to an embodiment of the present disclosure; and

fig. 7 illustrates a schematic block diagram of an example device 700 that may be used to implement embodiments of the present disclosure.

Like or corresponding reference characters designate like or corresponding parts throughout the several views.

Detailed Description

Preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

The term "include" and variations thereof as used herein is meant to be inclusive in an open-ended manner, i.e., "including but not limited to". Unless specifically stated otherwise, the term "or" means "and/or". The term "based on" means "based at least in part on". The terms "one example embodiment" and "one embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first," "second," and the like may refer to different or the same object. Other explicit and implicit definitions are also possible below.

As described above, for current virtual race environment applications, the scene in the map is often unchanged each time the application is entered. An unchanging map may lack interest and challenge for a user after being familiar with a certain map.

To address, at least in part, one or more of the above issues and other potential issues, an example embodiment of the present disclosure proposes a scheme for generating a map. In the scheme, at a terminal device, attribute information of a target object is acquired, one or more road models matching the attribute information of the target object are selected from a predetermined set of road models, and a map associated with a position of the target object is generated based on the selected one or more road models.

In the scheme, the matched road model is selected based on the attribute information of the target object and is used for generating the map associated with the position of the target object, the road model in the map can be matched with the attribute of the target object, and the generated map is not changed, so that the flexibility and the diversity of map generation are realized.

Hereinafter, specific examples of the present scheme will be described in more detail with reference to the accompanying drawings.

FIG. 1 shows a schematic diagram of an example of an information processing environment 100, according to an embodiment of the present disclosure. The information processing environment 100 includes a terminal device 110, road models 120-1 to 120-3 (collectively referred to as road models 120), a target object 130, and a map 140.

Terminal device 110 may generate a map associated with the location of the target object based on the road model. In some embodiments, terminal device 110 may be an electronic device. Terminal device 110 is, for example, but not limited to, a mobile phone, a smart phone, a tablet computer, a personal computer, etc.

The road model 120 may include, but is not limited to, a curve model, a straight road model, a diving platform model, and the like. The curve model may include, for example, U-bends, right-angle bends, obtuse bends, acute bends, S-bends, irregular bends, and the like. In some embodiments, the road model 120 may be stored locally by the terminal device 110. In other embodiments, the road model 120 may be received by the end device 120 from a server.

The target object 130 may include, but is not limited to, a virtual account, a virtual character, a virtual animal, a virtual vehicle, and the like. The target object 130 may have attribute information. Attribute information includes, but is not limited to, level, type, historical data, and the like. For example, in a virtual race environment embodiment, the target object may include a virtual account or a virtual vehicle, and the attribute information of the target object may include a level, a type, and the like of the virtual account or the virtual vehicle. For example, virtual accounts may be classified on a 1-10 scale, or on a paid or non-paid type. For example, virtual vehicles may be classified on a 1-10 scale, or into sports cars, household cars, and the like. In some embodiments, the attribute information of the target object may be stored locally by terminal device 110. In other embodiments, the attribute information of the target object may be received by terminal device 110 from a server.

The terminal device 110 is configured to acquire attribute information of a target object, select one or more road models matching the attribute information of the target object from a predetermined set of road models, and generate a map associated with a location of the target object based on the selected one or more road models.

The actions performed by terminal device 110 will be described in detail below in conjunction with fig. 2.

Fig. 2 shows a flow diagram of a method 200 for generating a map according to an embodiment of the present disclosure. For example, method 200 may be performed by terminal device 110 as shown in fig. 1. It should be understood that method 200 may also include additional blocks not shown and/or may omit blocks shown, as the scope of the present disclosure is not limited in this respect.

At block 202, terminal device 110 obtains attribute information of a target object. The target object may comprise a virtual account or game object controlled by the game player through the terminal device, such as a virtual vehicle, a virtual character, a virtual animal, etc. The attribute information of the target object may include information such as a level, a type, history data, etc. of the target object. The target object may be divided into a plurality of levels, for example, the virtual account or virtual vehicle may be divided into levels of 1 to 10, or new, ordinary, high, etc. The target objects may also be divided into a plurality of types, for example, the virtual account may be divided into a paid account and a free account, the virtual vehicle may be divided into a sports car, a household car, and the like. The historical data may include, for example, but is not limited to, the number of plays of the virtual account, the number of passes of the virtual vehicle, and the like. Acquiring the attribute information of the target object may include the terminal device 110 acquiring the attribute information of the target object stored locally, or may also include the terminal device 110 requesting the server 120 and receiving the attribute information of the target object from the server 120.

In some embodiments, obtaining attribute information of the target object may include the terminal device 110 determining whether the game is started, and obtaining attribute information of the target object if it is determined that the game is started. For example, if it is determined that a user's pressing instruction of a game start key is received, it is determined that the game is started. Also for example, if it is determined that the game application is started, it is determined that the game is started.

At block 204, the terminal device 110 selects one or more road models from a predetermined set of road models that match the attribute information of the target object. Road models may include, but are not limited to, curve models, straight road models, diving tower models, and the like. The curve model may include, for example, U-bends, right-angle bends, obtuse bends, acute bends, S-bends, irregular bends, and the like. For example, one or more curve models that match the attribute information of the target object may be acquired from a predetermined curve model set.

Different attribute information of the target object may be matched with the same or different road models. The attribute information of the target object may be matched with one or more road models. The following description will be made by taking a curve model and three levels of a novice hand, a normal hand and a high hand as examples. The novice grades may for example match right-angled bends, U-bends, acute bends and obtuse bends, the normal grades may for example match right-angled bends, U-bends, acute bends, obtuse bends and irregular bends, and the high grades may for example match right-angled bends, U-bends, acute bends, obtuse bends and combination bends. If the grade of the target object is a novice grade, at least one of a right-angled bend, a U-shaped bend, an acute bend and an obtuse bend is obtained from a preset plurality of bend models, if the grade of the target object is a normal grade, at least one of a right-angled bend, a U-shaped bend, an acute bend, an obtuse bend and an irregular bend is obtained from a preset plurality of bend models, and the like. It should be understood that the level is just one example of the attribute information, and other attribute information may be matched with the road model, such as type, history data, and the like, for example, the type of the virtual account may be divided into a paid account and a free account, the free account may be matched with a right angle bend, a U-shaped bend, an obtuse angle bend, and the paid account may be matched with a right angle bend, a U-shaped bend, an acute angle bend, an obtuse angle bend, an S-shaped bend, and an irregular bend.

In some embodiments, selecting one or more road models from the predetermined set of road models that match the attribute information of the target object may include the terminal device 110 selecting one or more road models from the predetermined set of road models that match the attribute information based on predetermined matching information between the attribute information of the target object and the road model. Taking the curve model and the level of the target object as an example, the predetermined matching information between the level and the curve model may include, but is not limited to, a matching table, as shown in table 1 below:

TABLE 1

Rank of Bend model
New hand Right angle bend, U-shaped bend, acute angle bend, obtuse angle bend
General purpose Right angle bend, U-shaped bend, acute angle bend, obtuse angle bend, irregular bend
High hand Right angle bend, U-shaped bend, acute angle bend, obtuse angle bend, combined bend

At block 206, terminal device 110 generates a map associated with the location of the target object based on the selected one or more road models. For example, the selected one or more road models are stitched to generate a map associated with the location of the target object. The map may include a game map, a simulated map, and the like. Taking the novice level and the curve model as an example, one or more curve models matching the novice level, such as a right angle bend, a U-bend, and an acute angle bend, are selected from a predetermined set of curve models, and then the right angle bend, the U-bend, and the acute angle bend may be stitched through a straight road to generate a racetrack map associated with the location of the target object.

Therefore, the matched road model is selected based on the attribute information of the target object and is used for generating the map associated with the position of the target object, the road model in the map can be matched with the attribute information of the target object, the generated map is not changed, for example, the stronger the attribute of the target object (for example, the higher the level) is, the more complicated the matched road model is, the higher the racing difficulty is, and the flexibility and the diversification of map generation are realized.

In some embodiments, generating the map associated with the location of the target object comprises: the terminal device 110 determines a number of road instances to be generated based on the selected one or more road models based on the attribute information of the target object, and generates a map associated with the location of the target object based on the selected one or more road models and the determined number of road implementations. In some embodiments, determining the number of road instances may include the terminal device 110 determining the number of road instances based on predetermined matching information between the attribute information of the target object and the number of road instances. The predetermined matching information includes, for example, but is not limited to, a matching table.

In some embodiments, the number of road instances may include the total number of road instances. The curve model and the three levels of novice, ordinary and high are used as examples for illustration. For example, the total number of curve instances matching the new hand level is, for example, 7, the total number of curve instances matching the normal level is, for example, 10, and the total number of curve instances matching the high hand level is, for example, 14. Taking a curve as an example, the matching information between the level of the target object and the total number of curve instances can be shown in table 2 below:

TABLE 2

Figure BDA0002477149550000071

If the level of the target object is novice, 7 curve instances are generated based on the selected one or more curve models. The 7 curve instances may include, for example, 1 quarter-turn instance, 2U-turn instances, 3 sharp-turn instances, and 1 obtuse-turn instance, and the 7 curve instances may or may not be stitched together by straight-run instances to generate a map, such as a race track map, associated with the location of the target object. It should be understood that this is merely an example and that other situations are possible, such as 3 quarter-turn instances, 2U-turn instances, 1 acute-turn instance, and 1 obtuse-turn instance, etc. The situation is similar for the normal and high-hand levels and will not be described again. Therefore, the number of the road instances in the map can be matched with the attribute information of the target object, for example, the stronger the attribute of the target object (for example, the higher the level is), the larger the number of the road instances, the higher the racing difficulty is, and the flexibility and the diversification of the map generation are realized.

In other embodiments, the number of road instances may include a number of road instances associated with the road model. The curve model and the three levels of novice, ordinary and high are used as examples for illustration. For example, the number of right-angle bend instances matching the new-hand level is, for example, 1, the number of U-bend instances matching the normal level is, for example, 2, the number of U-bend instances is, for example, 3, the number of right-angle bend instances matching the high-hand level is, for example, 3, and the number of U-bend instances is, for example, 6. Taking curves as an example, the matching information between the level of the target object and the number of each curve instance can be shown in table 3 below:

TABLE 3

Rank of Number of quarter bend examples Number of U-bend examples
New hand 1 1
General purpose 2 3
High hand 3 6

If the level of the target object is new, for example, a matched right-angle bend model and a matched U-shaped bend model are selected, 1 right-angle bend instance and 1U-shaped bend instance are generated based on the selected right-angle bend model and the selected U-shaped bend model, and the two instances are spliced to generate a map. The situation is similar for the normal and high-hand levels and will not be described again. Therefore, the number of the road instances in the map can be matched with the attribute information of the target object, for example, the stronger the attribute of the target object (for example, the higher the level is), the larger the number of the road instances, the higher the racing difficulty is, and the flexibility and the diversification of the map generation are realized.

Alternatively or additionally, in some embodiments, generating the map associated with the location of the target object comprises: the terminal device 110 determines the amount of road guide information based on the attribute information of the target object, and generates a map associated with the position of the target object based on the selected one or more road models and the determined amount of road guide information. In some embodiments, determining the amount of road guidance information may include determining the amount of road guidance information based on predetermined matching information between the attribute information of the target object and the amount of road guidance information.

The three levels of novice, normal and high hands are taken as examples for illustration. For example, the amount of road guide information matching the new-hand level is the full amount of road guide information, the amount of road guide information matching the normal level is the partial amount of road guide information, and the amount of road guide information matching the high-hand level is the no-road guide information. The matching information between the level and the amount of the road guide information may be as shown in the following table 4:

TABLE 4

Rank of Amount of road guidance information
New hand Is totally produced from
General purpose In part
High hand Is free of

The full road guidance information amount includes, for example, guidance information that is presented at all the curve entrances, the partial road guidance information amount includes, for example, guidance information that is presented at partial curve entrances, and the no-road guidance information amount includes, for example, guidance information that is not presented at all the curve entrances. Thus, the road guide information amount in the map can be matched with the attribute information of the target object, for example, the stronger the attribute of the target object (for example, the higher the level is), the smaller the road guide information amount is, the higher the racing difficulty is, and the flexibility and the diversification of the map generation can be realized.

Alternatively or additionally, in some embodiments, generating the map associated with the location of the target object comprises: the terminal device 110 determines a road instance parameter based on the attribute information of the target object, and generates a map associated with the position of the target object based on the selected one or more road models and the determined road instance parameter. Example road parameters include, but are not limited to, width, length, inclination, curvature, etc. of the example road. For example, the width of a road instance matching the new hand level is 17-20 meters, the width of a road instance matching the normal level is 14-16 meters, and the width of a road instance matching the high hand level is 12-10 meters. Therefore, the road instance parameters in the map can be matched with the attribute information of the target object, for example, the stronger the attribute of the target object (for example, the higher the level is), the stricter the road instance parameters are, the higher the race difficulty is, and the flexibility and the diversification of the map generation are realized.

Alternatively or additionally, in some embodiments, generating the map associated with the location of the target object comprises: the terminal device 110 acquires a terrain model selected by a user or set by a system from a predetermined set of terrain models, and generates a map associated with the position of the target object based on the acquired terrain model and the selected one or more road models. The set of predetermined terrain models includes, for example, but is not limited to, terrain such as roads, grass, mud, hills, sand, water, bridges, forests, buildings, and snow and ice. Thus, the terrain selected by the user or set by the system and the road model matched with the attribute information of the target object can be combined to generate the map related to the position of the target object, thereby realizing the flexibility and diversification of map generation.

Fig. 3 illustrates a flow diagram of a method 300 for generating a map associated with a location of a target object in accordance with an embodiment of the present disclosure. For example, method 300 may be performed by terminal device 110 as shown in fig. 1. It should be understood that method 300 may also include additional blocks not shown and/or may omit blocks shown, as the scope of the disclosure is not limited in this respect.

At block 302, terminal device 110 obtains device attributes for terminal device 110. Device attributes include, for example, but are not limited to, computing attributes, display attributes, and the like. Computational attributes include, for example, but are not limited to, processor performance, memory size, and the like. Display attributes include, for example, but are not limited to, display size, display resolution, and the like.

At block 304, terminal device 110 determines a rendering radius based on device attributes of terminal device 110. For example, a reference rendering radius may be set based on the reference device attribute, the reference rendering radius may be increased as the rendering radius if it is determined that the device attribute of the terminal device 110 is stronger than the reference device attribute, and the reference rendering radius may be decreased as the rendering radius if it is determined that the terminal device attribute is weaker than the reference device attribute. The amount of radius that is increased or decreased may be based on, for example, the difference between the device attribute of the terminal device and the reference device attribute, or may be a fixed value, for example.

At block 306, the terminal device 110 generates a map based on the selected one or more road models, within a first circle centered on the initial position of the target object and having a radius of the drawing radius.

Therefore, the drawing radius of the map can be determined based on the device attribute of the terminal device, so that the drawing size of the map is adaptive to the terminal device, and the drawing efficiency of the map is improved.

In some embodiments, the method 300 may further include: the terminal device 110 determines whether the distance between the current position of the target object and the initial position is greater than or equal to a predetermined distance, and updates the map if it is determined that the distance between the current position of the target object and the initial position is greater than or equal to the predetermined distance. The predetermined distance includes, but is not limited to, half of the drawing radius. Thus, after the position of the target object moves to the trigger point, the map update is triggered, and the map can be expanded.

Fig. 4 shows a flow diagram of a method 400 for updating a map according to an embodiment of the present disclosure. Method 400 may be performed, for example, by terminal device 110 as shown in fig. 1. It should be understood that method 400 may also include additional blocks not shown and/or may omit blocks shown, as the scope of the disclosure is not limited in this respect.

At block 402, terminal device 110 determines a region within a second circle centered at the current position of the target object and having a radius of the drawing radius that does not overlap the first circle. As shown in fig. 5, the first circle a has an initial position a as a center and a drawing radius as a radius, and the second circle B has a current position as a center and a drawing radius as a radius. The area within the second circle B that does not overlap the first circle a is C.

At block 404, the terminal device 110 randomly extends a current road instance in the map within the determined area, the current road instance being generated based on the selected one or more road models.

Therefore, the current road instance can be randomly prolonged only in the newly added map part, and the map does not need to be updated completely, so that the map updating expansion is realized with higher efficiency.

In some embodiments, updating the map further comprises the terminal device 110 smoothly extending the current terrain in the map within the determined area. Therefore, the existing terrain in the map can be used for extension, and the map updating and extending efficiency is improved.

Alternatively or additionally, in some embodiments, updating the map further comprises: and deleting the map part of which the distance from the current position is larger than the drawing radius. A portion of the map having a distance from the current location greater than the rendering radius, such as region D in fig. 5, may not affect, for example, a racing or simulation process, but save memory space by deleting the portion of the map corresponding to region D, since it is no longer needed by the target object. Therefore, the map part exceeding the drawing radius can be deleted when updating is triggered, so that the memory space is saved, and the continuous expansion updating of the map is supported.

Fig. 6 shows a schematic block diagram of an apparatus 600 for generating a map according to an embodiment of the present disclosure. As shown in fig. 6, the apparatus 600 includes an attribute obtaining module 601 configured to obtain attribute information of a target object; a road model selection module 602 configured to select one or more road models matching the attribute information of the target object from a predetermined set of road models; and a map generation module 603 configured to generate a map associated with the location of the target object based on the selected one or more road models.

In some embodiments, the map generation module 603 comprises: a road instance number determination sub-module (not shown) configured to determine the number of road instances to be generated based on the selected one or more road models, based on the attribute information of the target object; and a map generation sub-module (not shown) configured to generate a map associated with the location of the target object based on the selected one or more road models and the determined number of road instances.

In some embodiments, the map generation module 603 comprises: a guiding information amount determination sub-module (not shown) configured to determine an amount of guiding information based on the attribute information of the target object; and a map generation sub-module (not shown) configured to generate a map associated with the position of the target object based on the selected one or more road models and the determined amount of road guidance information.

In some embodiments, the map generation module 603 comprises: a road instance parameter determination sub-module (not shown) configured to determine a road instance parameter based on the attribute information of the target object; and a map generation sub-module (not shown) configured to generate a map associated with the location of the target object based on the selected one or more road models and the determined road instance parameters.

In some embodiments, the map generation module 603 comprises: a device attribute acquisition sub-module (not shown) configured to acquire a device attribute of the terminal device; a drawing radius determination submodule (not shown) configured to determine a drawing radius based on the device attribute of the terminal device; and a map generation sub-module (not shown) configured to generate a map within a first circle having the initial position of the target object as a center and a drawing radius as a radius, based on the selected one or more road models.

In some embodiments, the apparatus 600 further comprises: a map update module 604 configured to determine whether a distance between the current position of the target object and the initial position is greater than or equal to a predetermined distance, and update the map if it is determined that the distance between the current position of the target object and the initial position is greater than or equal to the predetermined distance.

In some embodiments, the map update module 604 includes a region determination submodule (not shown) configured to determine a region within a second circle centered at the current position and having a radius drawn as a radius that does not overlap the first circle; and a road instance extension module (not shown) configured to randomly extend a current road instance in the map within the determined area, the current road instance being generated based on the selected one or more road models.

In some embodiments, the map update module 604 further includes a terrain extension sub-module (not shown) configured to smoothly extend the current terrain in the map within the determined area.

In some embodiments, the map update module 604 includes: a deletion submodule (not shown) configured to delete a portion of the map having a distance from the current position larger than the rendering radius.

In some embodiments, the predetermined distance comprises half of the drawing radius.

In some embodiments, the road model comprises at least one of a straight model, a curve model, a diving platform model.

Fig. 7 illustrates a schematic block diagram of an example device 700 that may be used to implement embodiments of the present disclosure. For example, terminal device 110 as shown in FIG. 1 may be implemented by device 700. As shown, device 700 includes a Central Processing Unit (CPU)701 that may perform various appropriate actions and processes in accordance with computer program instructions stored in a Read Only Memory (ROM)702 or computer program instructions loaded from a storage unit 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data required for the operation of the device 700 can also be stored. The CPU701, the ROM 702, and the RAM703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.

Various components in the device 700 are connected to the I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, a microphone, and the like; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.

The various processes and processes described above, such as the method 200-400, may be performed by the processing unit 701. For example, in some embodiments, the method 200-400 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of a computer program may be loaded onto and/or installed onto device 700 via ROM 702 and/or communications unit 709. When the computer program is loaded into RAM703 and executed by CPU701, one or more acts of method 200-400 described above may be performed.

The present disclosure may be methods, apparatus, systems, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for carrying out various aspects of the present disclosure.

The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.

The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.

The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).

Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will 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.

These computer-readable program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.

The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.

The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种资源渲染方法、装置、设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类