Scene filling method and device for digital twinning and medium

By dividing the geometric areas into sub-regions and filling the targets in each sub-regions, the problem of irregularly shaped areas filling complexity in digital twin scenes is solved, and efficient scene filling is achieved, reducing costs and improving efficiency.

CN119131316AActive Publication Date: 2024-12-13浪潮智慧科技有限公司 +1

Patent Information

Application Number
CN202411114991.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2024-12-13
Estimated Expiration
2044-08-14

AI Technical Summary

Technical Problem

In the process of building digital twin scenarios, traditional methods require separate location positioning and processing for each vegetation entity, resulting in large consumption of human and time resources, increasing complexity and cost.

Method used

By dividing the geometric area into multiple sub-regions and filling the target in each sub-region, the direct filling complexity of irregular shape geometric areas is reduced, and sampling points are generated using uniform sampling algorithm and random sampling method to be generated based on the area area and weights Fill in order to allow or disable overlapping types of fill targets.

Benefits of technology

The digital twin scene filling process is simplified, labor and time costs are reduced, production efficiency is improved, and efficient filling of irregularly shaped areas is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119131316A_ABST
    Figure CN119131316A_ABST
Patent Text Reader

Abstract

The invention discloses a scene filling method and device for digital twinning and a medium, and the method comprises the steps: determining a to-be-filled region in a digital twinning scene, and generating a geometric region based on the to-be-filled region; dividing the geometric region to obtain a plurality of sub-regions; and for each sub-region in the plurality of sub-regions, filling the filling target in the sub-region until scene filling of all the sub-regions in the geometric region is completed. The geometric region is usually in an irregular shape, so that direct filling of the whole geometric region is difficult to realize, the geometric region is divided into a plurality of sub-regions, the shapes of the sub-regions are relatively simpler, filling is simpler, scene filling of the geometric region can be completed by filling each sub-region, and the scene filling efficiency is improved. Therefore, the labor cost and the time cost are reduced, and the manufacturing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a scene filling method, device and medium for digital twins. Background Art

[0002] In the process of constructing digital twin scenes, although the production of some objects (such as vegetation, water, animals, small buildings, etc.) does not require high technical requirements, the challenge lies in the large-scale construction.

[0003] In traditional solutions, each vegetation entity is usually positioned and processed individually. However, this will consume a lot of manpower and time resources, and increase the complexity and cost of the production process. Summary of the invention

[0004] In order to solve the above problems, this application proposes a scene filling method for digital twins, including:

[0005] Determine an area to be filled in the digital twin scene, and generate a geometric area based on the area to be filled;

[0006] Dividing the geometric region into a plurality of sub-regions;

[0007] For each of the multiple sub-regions, fill the filling target in the sub-region until all sub-regions in the geometric region complete scene filling.

[0008] In one example, the geometric area is divided into multiple sub-areas, specifically including:

[0009] For the geometric region, determining a plurality of vertices contained therein;

[0010] Based on a preset sub-region vertex composition rule, selecting adapted part of the vertices in sequence from the plurality of vertices to form a single sub-region;

[0011] In the geometric region, after deleting the constructed sub-regions, the construction of the sub-regions is repeated until the remaining geometric region can only constitute a single sub-region, thereby completing the division of the sub-regions.

[0012] In one example, based on a preset sub-region vertex composition rule, selecting adapted partial vertices in sequence from the multiple vertices to form a single sub-region specifically includes:

[0013] Determine that the preset sub-region is a triangular region;

[0014] Selecting an initial vertex from the multiple vertices, and selecting two vertices near the initial vertex along a preset direction; wherein the preset direction includes: selecting two vertices continuously in a clockwise direction, selecting two vertices continuously in a counterclockwise direction, or selecting one vertex in both the clockwise direction and the counterclockwise direction;

[0015] A single triangular area is constructed according to the initial vertex and the two selected vertices as a sub-area.

[0016] In an example, for each of the multiple sub-regions, filling the filling target in the sub-region specifically includes:

[0017] Determine the sub-region as the triangular region;

[0018] Completing the triangular area to obtain a parallelogram area;

[0019] Based on a uniform sampling algorithm, a plurality of sampling points are generated in the parallelogram region, and the sampling points in the complement region are added to the triangular region;

[0020] Filling objects are filled in the sub-region according to the sampling points in the triangular region.

[0021] In one example, the triangular region is completed to obtain a parallelogram region, specifically including:

[0022] Select any side in the triangular area, use the midpoint of the side as the center point of centrosymmetry, copy the triangular area, complete the triangular area in a centrosymmetric form, and obtain a parallelogram area;

[0023] The sampling points in the completion area are added to the triangular area, specifically including:

[0024] According to the center point selected in the triangular area, the complement area of ​​the parallelogram area is rotated around the center point until the complement area overlaps with the triangular area, and then the sampling points of the complement area are added to the triangular area accordingly.

[0025] In one example, before filling the filling object in the sub-region according to the sampling points in the triangular region, the method further includes:

[0026] Based on the vector cross product, the area of ​​each triangle region is obtained;

[0027] According to the area of ​​the region, a weight is assigned to each triangular region;

[0028] Based on the weight, a triangular area is extracted by random sampling to generate sampling points in the extracted triangular area.

[0029] In one example, filling the sub-region with a filling target according to the sampling points in the triangular region specifically includes:

[0030] Determine the target type of the filling target; the target type includes: an overlap-allowed type and an overlap-forbidden type;

[0031] If the target type of the filling target is a prohibited overlapping type, the density of the sampling points in the triangular area is adjusted according to the radius length of the filling target, and the filling target is added to the adjusted sampling points;

[0032] If the target type of the filling target is a type that allows overlap, the filling target is directly added to the sampling point.

[0033] In one example, the method further includes:

[0034] Based on a user operation, selecting an existing vertex on the boundary of the geometric region, or generating a new vertex on the boundary of the geometric region and selecting the new vertex;

[0035] Drag the selected vertex to adjust the geometric area;

[0036] The adjusted geometric region is re-divided into sub-regions.

[0037] On the other hand, the present application also proposes a scene filling device for digital twins, including:

[0038] at least one processor; and,

[0039] a memory communicatively connected to the at least one processor; wherein,

[0040] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the scene filling method for digital twins as described in the above example.

[0041] On the other hand, the present application also proposes a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured as: the scene filling method for digital twins described in the above example.

[0042] The scene filling method for digital twins proposed in this application can bring the following beneficial effects:

[0043] Since geometric areas are usually irregular in shape, it is difficult to directly fill the entire geometric area. Based on this, it is divided into multiple sub-areas. The shapes of the sub-areas are relatively simpler, so it is easier to fill them. By filling each sub-area, the scene filling of the geometric area can be completed, thereby reducing labor and time costs and improving production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0045] Figure 1 It is a flowchart of a scene filling method for digital twins in an embodiment of the present application;

[0046] Figure 2 A schematic diagram of a geometric region in one situation in an embodiment of the present application;

[0047] Figure 3 This is a schematic diagram of the division of sub-areas in one situation in an embodiment of the present application;

[0048] Figure 4 This is a schematic diagram of generating sampling points in one situation in an embodiment of the present application;

[0049] Figure 5 This is a schematic diagram of adjusting the geometric area in one situation in an embodiment of the present application;

[0050] Figure 6 This is a schematic diagram of a scene filling device for digital twins in an embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0052] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0053] like Figure 1 As shown, the embodiment of the present application provides a scene filling method for digital twins, including:

[0054] S101: Determine an area to be filled in the digital twin scene, and generate a geometric area based on the area to be filled.

[0055] Digital twins use digital models or virtual models to simulate and monitor physical objects, processes or systems in real time. Digital twins achieve dynamic monitoring, analysis and optimization of physical entities through continuous data exchange between physical objects and their virtual models.

[0056] In digital twins, a corresponding virtual model needs to be established, and the virtual model usually includes a simulation process of the actual scene. At this time, the area to be filled is based on the actual scene or user decision.

[0057] Generally speaking, the area to be filled is a 3D area. In this case, projection is performed from the top to obtain an area in the horizontal direction as the geometric area of ​​the area to be filled.

[0058] S102: Divide the geometric area into a plurality of sub-areas.

[0059] The shape of the sub-region is fixed, for example, it can be a triangle, a quadrilateral, a pentagon, etc., and the geometric region is divided into multiple sub-regions, so as to facilitate the scene filling of the area to be filled.

[0060] Specifically, for a geometric region, determine the multiple vertices it contains. Figure 2 As shown, a corresponding plane coordinate system is set for the geometric area to determine the coordinate value of each vertex in the geometric area, and the vertex information is declared based on the coordinate value.

[0061] Different vertex composition rules are set for different types of sub-areas. For example, for a triangular area, the vertex composition rule is any three non-collinear vertices. For a quadrilateral area, the vertex composition rule is any four vertices, and any three of them are not collinear. Of course, if the sub-area is a parallelogram, the line between any two vertices must be parallel to the line between the other two vertices.

[0062] At this time, based on the pre-set sub-region vertex composition rule, appropriate part of the vertices are selected in sequence from the plurality of vertices to form a single sub-region.

[0063] like Figure 3 As shown, the pre-set sub-region is taken as a triangular region as an example for explanation, an initial vertex is selected from multiple vertices (for example, any vertex among all vertices is selected as the initial vertex), and two vertices near the initial vertex are selected along a preset direction.

[0064] The preset direction includes: selecting two vertices continuously in a clockwise direction, selecting two vertices continuously in a counterclockwise direction, and selecting one vertex each in a clockwise direction and a counterclockwise direction.

[0065] In this way, a single triangular area can be obtained as a sub-area by using any of the methods, that is, a single triangular area can be constructed as a sub-area based on the initial vertex and the two selected vertices.

[0066] like Figure 3 As shown in the figure, after obtaining a single sub-region, in the geometric region, the constructed sub-region is deleted, and then the construction of the sub-region is repeated for the remaining region, and then the newly constructed sub-region is deleted until the remaining geometric region can only constitute a single sub-region, and the sub-region division is completed. When the sub-region is a triangular region, the last three vertices naturally constitute the last single triangular region. At this time, the complexity of the sub-region division algorithm is O(N), and its complexity increases linearly with the increase of the input scale (N).

[0067] S103: For each sub-region in the multiple sub-regions, fill the filling target in the sub-region until all sub-regions in the geometric region complete scene filling.

[0068] Since geometric areas are usually irregular in shape, it is difficult to directly fill the entire geometric area. Based on this, it is divided into multiple sub-areas. The shapes of the sub-areas are relatively simpler, so it is easier to fill them. By filling each sub-area, the scene filling of the geometric area can be completed, thereby reducing labor and time costs and improving production efficiency.

[0069] Generally speaking, when filling a scene in an area to be filled, some unimportant filling targets (such as vegetation, water areas, etc.) need to be distributed as evenly as possible in the area to be filled. When the sub-area is a triangular area, if the horizontal and vertical coordinates are directly used for uniform sampling, it may lead to uneven density and difficulty in achieving uniform distribution. Therefore, the triangular area is completed to obtain a parallelogram area.

[0070] For example, select any side in the triangular area, use the midpoint of the side as the center point of central symmetry, copy the triangular area, complete the triangular area in the form of central symmetry, and obtain a parallelogram area.

[0071] At this time, based on the uniform sampling algorithm, several sampling points are generated in the parallelogram area, and the sampling points in the completed area are added to the triangular area. Of course, in each triangular area, the uniform sampling algorithm can be performed once or multiple times based on demand to achieve the generation of multiple sampling points.

[0072] Among them, Figure 4 As shown, for a parallelogram, a roughly uniform distribution of sampling points can be achieved based on the uniform sampling algorithm. At this time, according to the center point selected in the triangular area, the completion area of ​​the parallelogram area is rotated around the center point until the completion area overlaps with the triangular area, and the sampling points of the completion area are added to the triangular area accordingly, thereby completing the uniform sampling of the triangular area.

[0073] In one embodiment, before selecting the triangular region, the area of ​​each triangular region can be obtained based on vector cross multiplication, and a weight is assigned to each triangular region according to the area of ​​the region. Generally speaking, the larger the area of ​​the region, the higher the assigned weight, and the two can be in an equal proportional relationship.

[0074] Based on the weight, the triangular area is extracted by random sampling to generate sampling points in the extracted triangular area. At this time, the larger the area of ​​the triangular area, the higher the weight assigned to it, the greater the probability of being selected and the number of times it is selected in multiple rounds of selection, and the greater the number of sampling points generated by the uniform sampling algorithm inside it, which is relatively in line with the number of filling targets required by the area of ​​each triangular area.

[0075] Of course, if a triangular area is extracted multiple times, multiple sampling points can also be generated.

[0076] In one embodiment, when sampling points are obtained and the sub-areas are filled, the filling targets need to be filled in the sub-areas according to the distribution of the sampling points. At this time, the target type of the filling target is determined, where the target type includes: allowed overlap type (such as vegetation, water area), prohibited overlap type (such as animals, small buildings), and whether overlap is allowed refers to whether overlap is allowed in height.

[0077] If the target type of the fill target is the type that prohibits overlapping, sometimes the intervals between some sampling points may be too small due to multiple generation of sampling points, resulting in overlap of the fill targets in the sub-area. Therefore, according to the radius length of the fill target, the density of the sampling points in the triangular area is adjusted so that the distance between each sampling point is at least the radius length of the fill target * 2, and the fill target is added to the adjusted sampling points.

[0078] If the target type of the filling target is the type that allows overlap, you can directly add the filling target to the sampling point, or adjust the density based on needs before filling.

[0079] When filling, one sampling point or multiple sampling points can be used to correspond to one filling target based on demand.

[0080] In one embodiment, after the geometric region is generated, it may happen that the geometric region does not meet the user's requirements. Figure 5 As shown, based on user operations, an existing vertex can be selected on the boundary of the geometric region, or a new vertex can be generated on the boundary of the geometric region and the new vertex can be selected, so that the selected vertex can be dragged to adjust the geometric region.

[0081] Of course, if the geometric region has been divided into sub-regions, then after the adjustment, the adjusted geometric region needs to be divided into sub-regions again.

[0082] like Figure 6 As shown, the embodiment of the present application also provides a scene filling device for digital twins, including:

[0083] at least one processor; and,

[0084] a memory communicatively connected to the at least one processor; wherein,

[0085] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the scene filling method for digital twins as described in any of the above embodiments.

[0086] An embodiment of the present application also provides a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to be: a scene filling method for digital twins as described in any of the above embodiments.

[0087] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0088] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.

[0089] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0090] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0091] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0092] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

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

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

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

[0096] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0097] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A scene filling method for digital twins, characterized in that: include: Determine an area to be filled in the digital twin scene, and generate a geometric area based on the area to be filled; Dividing the geometric region into a plurality of sub-regions; For each of the multiple sub-regions, fill the filling target in the sub-region until all sub-regions in the geometric region complete scene filling.

2. The method according to claim 1, characterized in that The geometric region is divided into multiple sub-regions, specifically including: For the geometric region, determining a plurality of vertices contained therein; Based on a preset sub-region vertex composition rule, selecting adapted part of the vertices in sequence from the plurality of vertices to form a single sub-region; In the geometric region, after deleting the constructed sub-regions, the construction of the sub-regions is repeated until the remaining geometric region can only constitute a single sub-region, thereby completing the division of the sub-regions.

3. The method according to claim 2, characterized in that Based on a preset sub-region vertex composition rule, selecting a portion of adapted vertices from the plurality of vertices in sequence to form a single sub-region specifically includes: Determine that the preset sub-region is a triangular region; Selecting an initial vertex from the multiple vertices, and selecting two vertices near the initial vertex along a preset direction; wherein the preset direction includes: selecting two vertices continuously in a clockwise direction, selecting two vertices continuously in a counterclockwise direction, or selecting one vertex in both the clockwise direction and the counterclockwise direction; A single triangular area is constructed according to the initial vertex and the two selected vertices as a sub-area.

4. The method according to claim 3, characterized in that For each sub-region among the multiple sub-regions, filling the filling target in the sub-region specifically includes: Determine the sub-region as the triangular region; Completing the triangular area to obtain a parallelogram area; Based on a uniform sampling algorithm, a plurality of sampling points are generated in the parallelogram region, and the sampling points in the complement region are added to the triangular region; Filling objects are filled in the sub-region according to the sampling points in the triangular region.

5. The method according to claim 4, characterized in that The triangular area is completed to obtain a parallelogram area, which specifically includes: Select any side in the triangular area, use the midpoint of the side as the center point of centrosymmetry, copy the triangular area, complete the triangular area in a centrosymmetric form, and obtain a parallelogram area; The sampling points in the completion area are added to the triangular area, specifically including: According to the center point selected in the triangular area, the complement area of ​​the parallelogram area is rotated around the center point until the complement area overlaps with the triangular area, and then the sampling points of the complement area are added to the triangular area accordingly.

6. The method according to claim 3, characterized in that Before filling the filling object in the sub-region according to the sampling points in the triangular region, the method further includes: Based on the vector cross product, the area of ​​each triangle region is obtained; According to the area of ​​the region, a weight is assigned to each triangular region; Based on the weight, a triangular area is extracted by random sampling to generate sampling points in the extracted triangular area.

7. The method according to claim 4, characterized in that Filling the filling object in the sub-region according to the sampling points in the triangular region specifically includes: Determine the target type of the filling target; the target type includes: an overlap-allowed type and an overlap-forbidden type; If the target type of the filling target is a prohibited overlapping type, the density of the sampling points in the triangular area is adjusted according to the radius length of the filling target, and the filling target is added to the adjusted sampling points; If the target type of the filling target is a type that allows overlap, the filling target is directly added to the sampling point.

8. The method according to claim 1, characterized in that The method further comprises: Based on a user operation, selecting an existing vertex on the boundary of the geometric region, or generating a new vertex on the boundary of the geometric region and selecting the new vertex; Drag the selected vertex to adjust the geometric area; The adjusted geometric region is re-divided into sub-regions.

9. A scene filling device for digital twins, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the scene filling method for digital twins as described in any one of claims 1 to 8.

10. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions are set to: the scene filling method for digital twins as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and device for filling image in graph, equipment and medium

    CN111192192A

  • Thermodynamic diagram generation method and device, computer readable medium and electronic equipment

    CN113398575A

  • Game information processing method and device and storage medium

    CN115888085A

  • Minimum closed area determination method and device, terminal equipment and readable storage medium

    CN116958319A

  • Image cutting method and device of mobile terminal, electronic equipment and storage medium

    CN116974452A

Cited By

  • Filling method and device of three-dimensional component, electronic equipment and medium

    CN120472005A