Virtual scene processing method and device, storage medium, equipment and program product

By determining the adjacency lock information of the target block in the virtual scene and generating matching linear geographic elements, the continuity problem at the block boundary is solved, achieving natural connection and enhanced realism of the virtual scene.

CN121911091APending Publication Date: 2026-04-24GUANGZHOU BOGUAN TELECOMM TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU BOGUAN TELECOMM TECH LTD
Filing Date
2026-01-30
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

In existing technologies, linear geographic elements at the boundaries of blocks in virtual scenes often suffer from problems such as interruption, misalignment, and abrupt width changes, which affect the realism of the virtual scene and the user experience.

Method used

By determining the target boundary of the target block and its corresponding adjacency lock information, linear geographic elements that match the adjacency lock information are generated, ensuring that linear geographic elements between different blocks are naturally connected at the boundary.

Benefits of technology

It effectively avoids interruptions, misalignments, and abrupt width changes at block boundaries, enhancing the realism of virtual scenes and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121911091A_ABST
    Figure CN121911091A_ABST
Patent Text Reader

Abstract

The invention discloses a virtual scene processing method, a virtual scene processing device, a computer readable storage medium, electronic equipment and a computer program product, and the method comprises the steps: responding to a block generation instruction, determining a target boundary in contact with a to-be-generated target block, and determining target adjacent lock information corresponding to the target boundary, and generating a first linear geographic element intersecting with the target boundary in the target block based on the target adjacency lock information. Therefore, the linear geographic elements in the to-be-generated blocks intersected with the same boundary and the linear geographic elements in the generated blocks have the same element attribute, so that when the linear geographic elements in the two blocks are connected at the same position of the same boundary to form the cross-block linear geographic elements, the linear geographic elements in the two blocks are not connected to the same position of the same boundary to form the cross-block linear geographic elements. The cross-block linear geographic elements can present a natural connection state at the boundary, so that the situations of interruption, dislocation, width abrupt change and the like are avoided, and the sense of reality of a virtual scene and user experience are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of game technology, specifically to a method for processing virtual scenes, a device for processing virtual scenes, a computer-readable storage medium, an electronic device, and a computer program product. Background Technology

[0002] In related technologies, the construction of virtual scenes such as video game worlds, metaverses, and digital twin cities typically involves dividing the entire world map into several fixed-size tiles, and generating each tile independently or semi-independently at runtime. However, while this method ensures the rationality and naturalness of elements within a tile, linear geographical elements such as roads and rivers that cross tiles may experience interruptions, misalignments, or abrupt changes in width, thus compromising the realism of the virtual scene and affecting the user experience. Summary of the Invention

[0003] This application provides a method for processing virtual scenes, a device for processing virtual scenes, a computer-readable storage medium, an electronic device, and a computer program product. By using adjacency lock information corresponding to the boundary, continuous geographic elements intersecting the boundary can be generated based on the element attributes indicated by the adjacency lock information. This ensures that the element attributes of continuous geographic elements intersecting the same boundary in different blocks are the same, thereby avoiding interruption, misalignment, and abrupt width changes of linear geographic elements across blocks at the boundary.

[0004] On one hand, embodiments of this application provide a method for processing a virtual scene, wherein the virtual scene is composed of multiple blocks, and the method includes: In response to the block generation command, determine the target boundary that is in contact with the target block to be generated; Determine target adjacency lock information corresponding to the target boundary, wherein the target adjacency lock information is used to indicate the element attributes of target linear geographic elements that intersect the target boundary in the block that is in contact with the target boundary; Based on the target adjacency lock information, a first linear geographic element that intersects with the target boundary in the target block is generated, wherein the element attributes of the first linear geographic element match the target adjacency lock information.

[0005] On the other hand, embodiments of this application provide a processing apparatus for a virtual scene, wherein the virtual scene is composed of multiple blocks, and the processing apparatus includes: The response module is used to determine the target boundary that is in contact with the target block to be generated in response to the block generation command. The information determination module is used to determine the target adjacency lock information corresponding to the target boundary, wherein the target adjacency lock information is used to indicate the element attributes of the target linear geographic elements that intersect the target boundary in the block that is in contact with the target boundary; The generation module is used to generate a first linear geographic element in the target block that intersects with the target boundary based on the target adjacency lock information, wherein the element attributes of the first linear geographic element match the target adjacency lock information.

[0006] On the other hand, embodiments of this application provide a computer-readable storage medium storing a computer program adapted for loading by a processor to execute the virtual scene processing method as described in any of the above embodiments.

[0007] On the other hand, embodiments of this application provide an electronic device, which includes a processor and a memory. The memory stores a computer program, and the processor executes the virtual scene processing method as described in any of the above embodiments by calling the computer program stored in the memory.

[0008] On the other hand, embodiments of this application provide a computer program product, including computer instructions, which, when executed by a processor, implement the virtual scene processing method as described in any of the above embodiments.

[0009] The virtual scene processing method provided in this application embodiment can respond to a block generation command, determine the target boundary that contacts the target block to be generated, determine the target adjacency lock information corresponding to the target boundary, and generate a first linear geographic element in the target block that intersects with the target boundary and whose element attributes match the target adjacency lock information based on the target adjacency lock information. This makes the element attributes of linear geographic elements in the block to be generated that intersects with the same boundary and linear geographic elements in the generated block the same. Therefore, when linear geographic elements in two blocks are connected to the same position on the same boundary to form a cross-block linear geographic element, the cross-block linear geographic element can present a natural connection at the boundary, thereby avoiding interruption, misalignment, abrupt width changes, etc., and ensuring the realism of the virtual scene and the user experience. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is a flowchart illustrating the virtual scene processing method provided in the embodiments of this application.

[0012] Figure 2 This is a flowchart illustrating the virtual scene processing method provided in the embodiments of this application.

[0013] Figure 3 This is a flowchart illustrating the virtual scene processing method provided in the embodiments of this application.

[0014] Figure 4 This is a flowchart illustrating the virtual scene processing method provided in the embodiments of this application.

[0015] Figure 5 This is a schematic diagram of the structure of the virtual scene processing device provided in the embodiments of this application.

[0016] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0018] This application provides a method for processing virtual scenes, a device for processing virtual scenes, a computer-readable storage medium, an electronic device, and a computer program product. Specifically, the method for processing virtual scenes in this application can be executed by an electronic device, which can be a terminal or a server. The terminal can be a smartphone, tablet, laptop, smart TV, wearable smart device, smart vehicle terminal, etc. The terminal can also include a client, which can be a browser client, instant messaging client, or mini-program, etc. The server can be an independent physical server, a server cluster composed of multiple physical servers, or a distributed system. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0019] It should be noted that, in this embodiment, the execution entity of the virtual scene processing method can be a terminal device or a server. The terminal device can be a local terminal device or a client device in a cloud platform. This embodiment does not limit the type of execution entity.

[0020] For example, when the virtual scene processing method runs on a terminal device, the terminal device may include a display screen and a processor. The display screen is used to present a graphical user interface (GUI) and receive instructions generated by the user interacting with the GUI. The processor is used to store applications, generate the GUI, respond to instructions, and control the display of the GUI on the display screen. When the user operates the GUI through the display screen, the GUI can control the local content of the terminal device in response to the received operation instructions. The terminal device can provide the GUI to the user in various ways, such as rendering it on the terminal device's display screen or presenting the GUI through holographic projection.

[0021] For example, when the processing method for the virtual scene runs on a server, this method can be implemented and executed based on a cloud system. The cloud system includes servers and client devices. The application's runtime and the graphical user interface (GUI) presentation are separate. The storage and execution of the virtual scene processing method are completed on the server. The GUI presentation is completed on the client, which is primarily used for data reception, transmission, and GUI presentation. For example, the client can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, PDA, personal digital assistant, or head-mounted display. However, the terminal device performing data processing is the server in the cloud. During this process, the user operates the client to send instructions to the server. The server executes the instructions, encodes and compresses the GUI data, returns it to the client via the network, and finally, the client decodes and outputs the GUI.

[0022] It should be noted that, in this embodiment, the execution entity of the virtual scene processing method can be a terminal device or a server. The terminal device can be a local terminal device or a client device in the aforementioned cloud system. This embodiment does not limit the type of execution entity.

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

[0024] With the increasing demands for scale and complexity in virtual worlds from video games, metaverse applications, digital twin cities, and film special effects, virtual worlds of infinite scale or planetary scale have become an important direction for technological development. To manage virtual worlds of infinite scale or planetary scale with limited computing and storage resources, related technologies have proposed a management method based on spatial partitioning, which divides the entire world map into several fixed-size tiles or dynamically loaded tiles. This tile-based architecture allows the system to load and render only tiles within or around the player's view frustum at runtime, i.e., streaming, thereby enabling support for vast worlds.

[0025] However, this block-based architecture suffers from a critical problem in its implementation: the continuity of block boundaries. Specifically, when content is generated independently or semi-independently in each block, the macroscopic structure spanning these boundaries struggles to align effectively. This is particularly pronounced for key world elements such as linear transportation networks, natural geographical features, and large man-made structures, severely undermining the realism of the virtual world. For example, roads may be interrupted, misaligned, or have incompatible materials at block boundaries, creating "dead-end roads"; rivers may "dry up" or abruptly change direction at boundaries; and structures like city walls may be misaligned at boundaries.

[0026] It is worth noting that this problem arises because traditional programmatic content generation algorithms lack sufficient awareness and effective utilization of the contextual information of adjacent blocks when generating content for a single block. The generation process mainly focuses on the internal logic and aesthetics of the block, neglecting its connections with the external world. When adjacency information needs to be considered, new complexities are often introduced, such as generation order dependencies, data redundancy, and difficulty in parallelization, thereby limiting generation efficiency and the dynamism of the overall world.

[0027] For the above issues, please refer to Figure 1 , Figure 1 This is a flowchart illustrating a method for processing a virtual scene according to an embodiment of this application. It should be noted that the steps shown may be executed in a logical order different from that shown in the flowchart. In this method, the virtual scene consists of multiple blocks, and the method includes: 110: In response to the block generation command, determine the target boundary that is in contact with the target block to be generated; 120: Determine the target adjacency lock information corresponding to the target boundary, wherein the target adjacency lock information is used to indicate the element attributes of the target linear geographic elements that intersect the target boundary in the block that is in contact with the target boundary; 130: Based on the target adjacency lock information, generate the first linear geographic element in the target block that intersects with the target boundary, wherein the element attributes of the first linear geographic element match the target adjacency lock information.

[0028] Specifically, to avoid problems such as interruption, misalignment, abrupt width changes, material mismatch, or logical conflicts at block boundaries, in the embodiments provided in this application, in response to a block generation instruction, the target boundary in contact with the target block to be generated can be determined, and then the target adjacency lock information corresponding to the target boundary can be determined, thereby determining the element attributes of the target linear geographic elements intersecting with the target boundary in the block in contact with the target boundary. This serves as a constraint condition in the generation process of the first linear geographic element intersecting with the target boundary in the target block. Finally, based on the target adjacency lock information, the first linear geographic element intersecting with the target boundary in the target block and whose element attributes match the target adjacency lock information can be generated.

[0029] In some embodiments, a virtual scene can be understood as a digital space constructed through computer technology, such as video games, metaverse applications, digital twin cities, and film and television special effects. It can be divided into multiple blocks using spatial segmentation technology, thereby supporting streaming loading and dynamic management.

[0030] In some embodiments, a block can be understood as an independent unit formed by spatial division of a virtual scene, and the size of the block is fixed or can be dynamically set.

[0031] In some embodiments, a block generation instruction can be understood as a signal that triggers the generation of a new block.

[0032] In one example, when the view of a controlled virtual character operated by a player moves through the terminal device, causing a new block to enter the view frustum of the controlled virtual character, the electronic device can trigger a block generation command.

[0033] In some embodiments, the target block can be understood as the block that needs to be generated at present.

[0034] In some embodiments, the target boundary can be understood as the edge where the target block contacts the adjacent block, such as the four boundaries of east, south, west and north.

[0035] In some embodiments, target adjacency lock information can be understood as a “semantic and geometric contract” defined on the target boundary, used to describe (or constrain) the element attributes of linear geographic elements that intersect with the target boundary.

[0036] In some embodiments, a target linear geographic element can be understood as a linear geographic element that intersects with the target boundary.

[0037] In some embodiments, the target linear geographic element includes existing linear geographic elements in blocks adjacent to the target block, and also includes linear geographic elements to be generated in the target block.

[0038] In some embodiments, linear geographic elements may include, but are not limited to, roads, rivers, walls, pipelines, etc.

[0039] In some embodiments, the first linear geographic element can be understood as a linear geographic element in the target block that intersects with the target boundary.

[0040] In some embodiments, element attributes can be understood as the core features of linear geographic elements, including geometric attributes such as location, direction of extension, width, height, and slope, as well as semantic attributes such as type, material, priority, and functional parameters, which can be set according to the actual situation.

[0041] In some embodiments, the generation of the first linear geographic element can be performed based on a pre-set tile generator. The tile generator can be responsible for generating various elements (including the first linear geographic element) within one or more tiles, and can be implemented based on algorithms such as WFC (Wave Function Collapse), LSystem (Lindenmayer System), noise algorithms, or machine learning or large language models.

[0042] In some embodiments, there are multiple block generators, and each block generator can perform block generation processing based on block generation tasks distributed by a task scheduler. The task scheduler can receive block generation instructions from clients (such as game clients), generate corresponding block generation tasks according to the instructions, and then distribute the block generation tasks to one or more block generators.

[0043] In some embodiments, the target adjacency lock information includes basic metadata, geometric contract information, semantic contract information, and contextual relationship information. The geometric contract information is used to define the spatial state of the target linear geographic element at the target boundary, the semantic contract information is used to define the non-geometric attributes of the target linear geographic element, and the contextual relationship information is used to define other blocks associated with the block to which the target linear geographic element belongs.

[0044] In one example, the basic metadata includes the lock identifier (lock_id), world seed (world_seed), version number (version), timestamp (timestamp), current status of the lock (status), priority of the lock (priority), and the type of the consecutive elements represented by the lock (element_type).

[0045] The lock identifier can be understood as a globally unique lock identifier, which can be created using algorithms such as Snowflake.

[0046] The world seed is a deterministic seed for the world to which the lock belongs, used to ensure the world can be generated repeatedly.

[0047] The version number can be incremented each time a significant update is made to the lock, in order to support user-generated content (UGC) and the dynamic evolution of the world.

[0048] The timestamp represents the time when the target adjacency lock was created or last updated.

[0049] The current state of a lock includes active, deprecated, and resolved. Active indicates that the lock is a valid generation constraint, deprecated indicates that the lock has been replaced by another lock, and resolved indicates that the lock's conflict has been resolved, such as being merged into an overpass.

[0050] Lock priorities are used for conflict resolution. For example, highways have a priority of 100, while country roads have a priority of 10.

[0051] The type of the linear geographic element represented by the lock can be an enumeration or a string, used to guide the generator in selecting appropriate generation logic and resources.

[0052] In one example, the geometric contract information includes the position vector p and the tangent vector. Normal vector binormal vector Width w, height h, profile.

[0053] The location vector p represents the precise three-dimensional coordinates locked in the world coordinate system, which is the intersection of the center line of the linear geographic element and the boundary of the block.

[0054] Tangent vector Let p be a unit vector representing the direction of extension of the linear geographic element at point p. It must be perpendicular to the block boundary.

[0055] Normal vector It is a unit vector, usually pointing upwards, and the "slope" or "tilt" of the element at point p can be defined.

[0056] binormal vector It is a unit vector. This is used to define the horizontal direction of an element. It's worth noting that... , and These three vectors together form a complete right-handed coordinate system or Frenet frame, which can provide complete spatial attitude information for the docked geometry.

[0057] Width w represents the linear geographic element along point p. Width of direction.

[0058] Height h represents the linear geographic element along point p. The height or depth of a direction, for example, the height of a wall or the depth of a river.

[0059] A profile is an optional, more complex two-dimensional or three-dimensional description used to define the cross-sectional shape of a linear geographic element. For example, a complex road might have a profile definition that includes curbs, sidewalks, and drainage ditches.

[0060] In one example, semantic contract information can be used to describe the non-geometric attributes of linear geographic elements at their boundaries, such as type, material, function, physical properties, etc.

[0061] In one example, the semantic contract information in the adjacency lock information of a road may include: “semantics”:{ "road_class":"primary_highway", “lane_count”:4, "speed_limit_kph":120, “materials”:{ "surface":"mat_asphalt_clean", "markings":"mat_road_lines_double_yellow", "curb":"mat_concrete_weathered" }, "features":["guardrail", "streetlights"], "traffic_flow":"bidirectional" } In another example, the semantic contract information in the adjacency lock information of a river may include: “semantics”:{ "river_class":"major_river", “flow_velocity_mps”:1.5, "flow_direction":"matches_tangent", / / or "opposite_tangent" “water_properties”:{ "clarity": 0.3, / / 0 to 1 "color_tint":[0.2, 0.4, 0.3], / / RGB "material":"mat_river_murky" }, "banks":{ "left_material":"mat_grass_bank", "right_material":"mat_rocky_bank" } } In one example, the context information includes the belonging block ID, the target block ID, the boundary ID, and the parent element ID.

[0062] The block ID can be understood as the ID of the block that created and "owns" this lock, which is also the ID of the block to which the target continuous geographic element belongs.

[0063] The target block ID can be understood as the ID of the adjacent block that the lock points to and that needs to comply with the contract.

[0064] Boundary ID can be understood as an identifier of the target boundary where the lock is located.

[0065] The parent element ID can be understood as the unique ID of the consecutive geographic elements that generated this lock within the block corresponding to the block ID, which is also the ID of the target consecutive geographic elements.

[0066] To more clearly illustrate the embodiments of this application, please refer to the following exemplary description: First, after receiving the block generation instruction, the electronic device determines the target block to be generated, and then determines all target boundaries that the block contacts with adjacent blocks.

[0067] Then, the electronic device can query the adjacency lock information corresponding to the linear geographic elements intersecting the target boundary, which is the target adjacency lock information. It can be understood that the adjacency lock information records the element attributes of the corresponding geographic elements at the target boundary, such as the exit location, direction, width, and material of a road, and the flow speed, direction, and depth of a river.

[0068] Finally, based on the adjacency lock information, a pre-set generation algorithm is invoked to generate the target block and its first linear geographic element. Understandably, during the generation process, the algorithm follows the attribute information indicated by the target adjacency lock information, such as geometric and semantic attributes, to ensure that geographic contiguous elements intersecting the target boundary and belonging to different blocks are aligned in position, direction, and size. Simultaneously, it ensures that the type, material, and functional logic of geographic contiguous elements intersecting the target boundary and belonging to different blocks are consistent, thereby seamlessly connecting the first linear geographic element with the linear geographic elements of adjacent blocks at the target boundary. For example, if the adjacency lock information indicates that the boundary is a four-lane, asphalt highway, the road generated in the target block can be aligned with this highway, i.e., a four-lane, asphalt highway is generated, avoiding abrupt width changes or material differences.

[0069] Thus, in this embodiment, in response to the block generation instruction, the target boundary that contacts the target block to be generated can be determined, and the target adjacency lock information corresponding to the target boundary can be determined. Based on the target adjacency lock information, a first linear geographic element in the target block that intersects with the target boundary and whose element attributes match the target adjacency lock information can be generated. This makes the element attributes of linear geographic elements in the block to be generated that intersect with the same boundary and linear geographic elements in the generated block the same. Therefore, when linear geographic elements in two blocks are connected at the same position on the same boundary to form a cross-block linear geographic element, the cross-block linear geographic element can present a natural connection at the boundary, thereby avoiding interruption, misalignment, abrupt width changes, etc., and ensuring the realism of the virtual scene and the user experience.

[0070] Please see Figure 2 In some embodiments provided in this application, step 120 includes: 121: Generate the first adjacency lock information for the first linear geographic element; 122: Detect the second adjacency lock information of the second linear geographic element that intersects with the target boundary, wherein the second linear geographic element is a linear geographic element in other blocks in the virtual scene besides the target block; 123: Determine the first adjacency lock information and / or the second adjacency lock information as the target adjacency lock information.

[0071] Specifically, in order to determine the target adjacency lock information corresponding to the target boundary, thereby providing a basis for the continuous generation of the first linear geographic element across blocks in the target block, in some embodiments provided in this application, the electronic device can generate the first adjacency lock information of the first linear geographic element in the target block, then detect the second adjacency lock information of the second linear geographic element that intersects with the target boundary in other blocks, and finally, based on whether the second adjacency lock information is detected, integrate the first adjacency lock information and / or the second adjacency lock information to determine the target adjacency lock information, thereby achieving comprehensive coverage of internal and external constraints.

[0072] In some embodiments, the first adjacency lock information can be understood as the adjacency lock information corresponding to the first linear geographic element to be generated in the target block, which may include the geometric attributes (such as the intersection with the boundary, the extension direction angle, etc.), semantic attributes (such as type, material, etc.), priority, etc. of the first linear geographic element.

[0073] In some embodiments, the second adjacency lock information can be understood as the adjacency lock information corresponding to the second linear geographic element that intersects with the target boundary in other generated or being generated blocks in the virtual scene, excluding the target block. It is understood that the data structure of the first adjacency lock and the second adjacency lock is consistent; in other words, the second adjacency lock may contain the geometric attributes, semantic attributes, priority, etc., of the second linear geographic element.

[0074] In some embodiments, target adjacency lock information can be understood as adjacency lock information corresponding to the target boundary that is ultimately used to guide the generation of the first linear geographic element, and is integrated from the first adjacency lock information and / or the second adjacency lock information.

[0075] In some embodiments provided in this application, the generation of the first adjacency lock information can also be understood as registering adjacency locks on the target boundary. Similarly, detecting the second adjacency lock information can also be understood as detecting the adjacency locks already registered on the target boundary.

[0076] In some embodiments provided in this application, when an electronic device needs to create a linear geographic element such as a road or river that extends out of the current block for a target block, that is, when it needs to generate the first linear geographic element that intersects with the target boundary, it can trigger the lock registration process.

[0077] In some embodiments, the electronic device can query the existing locks registered on the target boundary, i.e., the second adjacency lock information, through a pre-configured Adjacency LockManager.

[0078] In some embodiments, the adjacency lock manager provides a set of standard APIs (Application Programming Interfaces) for the block generator to register, query, update, and resolve adjacency locks. The manager also encapsulates the interaction logic with the lock database.

[0079] In some embodiments, the lock database can be understood as a database used to store and index all adjacent locks.

[0080] In one example, the adjacency lock registration process for a road that can extend out of the current block may include: First, the block generator determines the exit parameters, that is, it determines the intersection of the road centerline and the boundary B, which is the location vector p. Simultaneously, it determines the road's direction, width, slope, and other information along the location vector p, thereby obtaining all semantic contract information.

[0081] Then, the block generator calculates the geometric contract information, that is, it calculates the position vector p and the tangent vector. Normal vector binormal vector Width w, height h, profile.

[0082] Next, the block generator constructs lock data and assembles the basic metadata, geometric contract information, semantic contract information, and contextual relationship information into a complete adjacency lock data object, thereby obtaining the adjacency lock for the road. In the contextual relationship information, the block ID can be the ID of the current block containing the road, and the target block ID can be the ID of each block that contacts boundary B.

[0083] Finally, the block generator calls the adjacency lock registration API provided by the adjacency lock manager based on the adjacency lock data object to register the adjacency locks for the roads of the current block.

[0084] In one example, the process of detecting / querying adjacency lock information registered on the boundary may include: When the task scheduler sends a new block T to a block generator i,j When a task is generated, or in other words, when the task scheduler assigns a block generator to process a new block T. i,j When generating a block, the block generator first determines the new block T based on the block generation task. i,j The coordinates (i,j) are used to determine the new block T. i,j The IDs of the four boundaries are B. V i,j BV i+1,j B H i,j B H i,j+1 .

[0085] Then, through B V i,j B V i+1,j B H i,j B H i,j+1 Call the query API provided by the adjacency lock manager to initiate a batch query request to query B. V i,j B V i+1,j B H i,j B H i,j+1 Adjacency locks on the device.

[0086] Accordingly, the adjacency lock manager retrieves all adjacency locks (i.e., second adjacency lock information) in the active state corresponding to these four boundary IDs from the lock database, integrates all the retrieved adjacency locks into a list, and returns it to the generator.

[0087] Finally, the generator integrates the received list of adjacency locks into the generation context of the new block Ti,j. Understandably, the generation context of the new block Ti,j contains all the hard requirements from neighboring blocks, that is, the adjacency locks (second adjacency lock information) of the neighboring blocks. For example, the generated context might include: "At the midpoint of the eastern boundary, a 4-lane highway needs to be connected, facing east with a gradient of 5 degrees"; "At the quarter point of the northern boundary, a 10-meter-wide river flowing northeast must be connected."

[0088] Furthermore, it is understandable that this generation context can then be injected into the generator's PCG (Procedural Content Generation) algorithm, enabling the generator to generate new blocks T using the PCG algorithm. i,j When generating linearly contiguous geographic elements, it is necessary to ensure that the generated linearly contiguous geographic elements satisfy all adjacency locks in the generation context.

[0089] Thus, in this embodiment, first adjacency lock information of a first linear geographic element can be generated, and second adjacency lock information of a second linear geographic element intersecting with the target boundary can be detected. The first adjacency lock information and / or the second adjacency lock information can be determined as target adjacency lock information. This allows the target adjacency lock information to be determined based on the first adjacency lock information of the first linear geographic element to be generated within the target block and / or the second adjacency lock information of the second linear geographic element within other blocks, thereby ensuring the guiding or constraining role of the target adjacency lock information in the generation of the first linear geographic element.

[0090] In some embodiments provided in this application, step 123 includes: determining the conflict state between the first adjacency lock information and the second adjacency lock information; when there is no conflict between the first adjacency lock information and the second adjacency lock information, determining both the first adjacency lock information and the second adjacency lock information as target adjacency lock information.

[0091] Specifically, considering that the first linear geographic element of the target block and the second linear geographic element of other blocks may have different or even contradictory constraint requirements on the target boundary, i.e., the first adjacency lock information and the second adjacency lock information may have different or contradictory contents, i.e., conflict. Therefore, if both the first adjacency lock information and the second adjacency lock information are directly used to generate the first linear geographic element, unexpected errors may occur in the generated first linear geographic element due to conflicts.

[0092] Based on this, in some embodiments provided in this application, when the second adjacency lock information is detected, the conflict state between the first adjacency lock information and the second adjacency lock information can be determined; if there is no conflict between the two types of information, it means that the linear geographic elements corresponding to the first adjacency lock information and the second adjacency lock information can be used normally for the connection processing of linear elements at the target boundary, and then the first adjacency lock information and the second adjacency lock information can be jointly determined as the target adjacency lock information.

[0093] In some embodiments, a conflict state can be understood as a state in which the first adjacency lock information and the second adjacency lock information interfere with each other and therefore cannot be satisfied simultaneously.

[0094] In some embodiments, "no conflict" can be understood as the situation where the constraints of the first adjacency lock information on linear geographic elements at the target boundary and the constraints of the second adjacency lock information on linear geographic elements at the target boundary do not interfere with each other.

[0095] In some embodiments, a conflict between the first and second adjacency lock information can be determined by judging the similarities and differences between them. For example, if both the first and second adjacency lock information are used to constrain the geometric attributes of an element of type "road", there is a conflict between them. Conversely, if the first adjacency lock information is used to constrain the geometric attributes of an element of type "road", and the second adjacency lock information is used to constrain the geometric attributes of an element of type "river", there is no conflict between them.

[0096] In addition, it is understood that if there is no conflict between the first adjacency lock information and the second adjacency lock information, then the first linear geographic element corresponding to the first adjacency lock information and the second linear geographic element corresponding to the second adjacency lock information can both be determined as the target linear geographic element in this application embodiment.

[0097] Thus, in this embodiment, the conflict state between the first adjacency lock information and the second adjacency lock information can be determined. When there is no conflict between the first adjacency lock information and the second adjacency lock information, both the first adjacency lock information and the second adjacency lock information are determined as target adjacency lock information. This ensures that when there is no conflict between the first adjacency lock information and the second adjacency lock information, the generation process of the first linear geographic element can be constrained by the first adjacency lock information and the second adjacency lock information, thereby ensuring the robustness of the generation process of the first linear geographic element.

[0098] In some embodiments provided in this application, the first adjacency lock information includes the first priority of the first linear geographic element, and the second adjacency lock information includes the second priority of the second linear geographic element. Step 123 further includes: when there is a conflict between the first adjacency lock information and the second adjacency lock information, and the second priority is different from the first priority, the adjacency lock information with the higher priority is determined as the target adjacency lock information.

[0099] Specifically, considering the conflict between the first adjacency lock information and the second adjacency lock information, in order to ensure the robustness of the subsequent generation of the first linear geographic element, in some embodiments provided in this application, when the first adjacency lock information and the second adjacency lock information conflict and the first priority and the second priority are different, the lower priority adjacency lock information can be deleted by priority comparison, so as to determine the remaining higher priority adjacency lock information as the target adjacency lock information, so as to provide a unique constraint basis for the generation of the first linear geographic element.

[0100] In some embodiments, priority can be understood as a parameter included in the first adjacency lock information that identifies the importance of the first linear geographic element. The higher the value, the higher the priority of the element in the virtual scene, and the more priority the adjacency lock information corresponding to the element needs to be considered.

[0101] For example, the priority of a linear geographic element such as a highway can be 100, and the priority of a linear geographic element such as a country road can be 10. Therefore, when there is a conflict between the adjacency lock information of the highway and the adjacency lock information of the country road, the adjacency lock information of the country road can be deleted, and the adjacency lock information of the highway can be used as the target adjacency lock information to generate the first linear geographic element.

[0102] It is understood that, in the event of a conflict between the first adjacency lock information and the second adjacency lock information, the linear geographic element corresponding to the adjacency lock information with higher priority can be the target linear geographic element in this embodiment of the application.

[0103] In some embodiments, when the first priority is higher than the second priority, that is, when the newly generated / registered first adjacency lock information (i.e., the new lock) has a higher priority than the already generated / registered second adjacency lock information (i.e., the old lock), the second linear geographic element corresponding to the second adjacency lock information will be adjusted or regenerated based on the first adjacency lock information, thereby achieving the coverage of the first adjacency lock information (i.e., the new lock) over the second adjacency lock information (i.e., the old lock).

[0104] As an example, taking the two linear geographic elements, highway and country road, as mentioned above, the highway is the first linear geographic element to be generated, and the country road is a linear geographic element already generated outside the target block. When there is a conflict between the adjacency lock information of the highway and the adjacency lock information of the country road, and the highway has a higher priority than the country road, the adjacency lock information of the country road is deleted. At the same time, the electronic device adjusts the already generated country road based on the adjacency lock information of the highway, or deletes the already generated country road, and generates a linear geographic element that satisfies the adjacency lock information of the highway based on the original position of the country road. That is, the country road is replaced by the highway, realizing the coverage of the country road by the highway, and the coverage of the adjacency lock information of the highway by the adjacency lock information of the country road.

[0105] In some embodiments, the block generator in the electronic device, based on the encapsulated adjacency lock data object, calls the adjacency lock registration API provided by the adjacency lock manager to register and obtain the first adjacency lock information. If the second priority is higher than the first priority, that is, the priority of the generated / registered second adjacency lock information (i.e., the old lock) is higher than the newly generated / registered first adjacency lock information (i.e., the new lock), the adjacency lock manager will send a registration failure response to the block generator. The block generator can take preset fallback measures, such as terminating the generation of the first linear geographic element, or adjusting the first adjacency lock information of the first linear geographic element, in order to try to make the first adjacency lock information not conflict with the second adjacency lock information.

[0106] Furthermore, if the adjacency lock manager determines that the adjacency lock data object has been successfully registered, it can write the adjacency lock data object as the first successfully registered adjacency lock information to the lock database. Simultaneously, it associates the successfully registered first adjacency lock information with the target boundary ID, and then sends a registration success response and the lock identifier of the first adjacency lock information back to the block generator. After receiving the registration success response and the lock identifier of the first adjacency lock information from the adjacency lock manager, the block generator can then proceed with the normal generation of the first linear geographic element.

[0107] Thus, in this embodiment of the application, when there is a conflict between the first adjacency lock information and the second adjacency lock information, and the second priority is different from the first priority, the adjacency lock information with higher priority is determined as the target adjacency lock information. This can ensure that the adjacency lock information of high-priority linear geographic elements can be used preferentially through priority comparison, while reducing the interference of the adjacency lock information of low-priority linear geographic elements on the generation of the first linear geographic element.

[0108] Please see Figure 3 In some embodiments provided in this application, the first adjacency lock information includes the first priority and the first element type of the first linear geographic element, and the second adjacency lock information includes the second priority and the second element type of the second linear geographic element. Step 123 includes: 1231: In the event of a conflict between the first adjacency lock information and the second adjacency lock information, if the second priority is different from the first priority, a target adjacency lock adjustment rule matching the first priority, the first element type, the second priority, and the second element type is determined from the preset rule base. The preset rule base includes multiple priorities, multiple element types, multiple adjacency lock adjustment rules, and includes the matching relationship between two different priorities and one adjacency lock adjustment rule. 1232: Adjust the first and second adjacent lock information according to the target adjacent lock adjustment rules; 1233: Use both the adjusted first adjacency lock information and the adjusted second adjacency lock information as the target adjacency lock information.

[0109] Specifically, considering that resolving conflicts by deleting low-priority adjacency lock information might negatively impact linear geographic elements already generated in other blocks when there are multiple second adjacency locks, or when the priority of the first adjacency lock is higher than that of multiple second adjacency locks, directly deleting these multiple second adjacency locks could have adverse effects. Therefore, in some embodiments provided in this application, when first and second adjacency lock information conflict and have different priorities, a corresponding target adjacency lock adjustment rule is matched from a preset rule base based on the first priority, first element type, second priority, and second element type. The two types of adjacency lock information are then adjusted accordingly, and both adjusted versions are ultimately used as target adjacency lock information, achieving intelligent conflict elimination.

[0110] In some embodiments, the default rule base is a predefined junction rule book, which defines how elements of different types and priorities intersect.

[0111] To more clearly illustrate the virtual scene processing method provided in the embodiments of this application, please refer to the following exemplary description: Assuming the element type of the first linear geographic element corresponding to the first adjacency lock information L1 is primary_highway and the priority of the first linear geographic element corresponding to the first adjacency lock information L1 is 100, and the element type of the second linear geographic element corresponding to the second adjacency lock information L2 is secondary_road and the priority of the second linear geographic element corresponding to the second adjacency lock information L2 is 50, then when a conflict is found between the first adjacency lock information L1 and the second adjacency lock information L2, the rule R in the connection rule base that corresponds to secondary_road, priority=100, secondary_road, and priority=50 can be queried.

[0112] Then, based on the queried rule R, the adjacency lock manager can calculate all the new entrances and exits required for a standard T-junction or ramp according to the geometric and semantic information of L1 and L2. Then, it performs an atomic operation, such as first updating the status of L1 and L2 to resolved or deprecated, and then generating a series of new adjacency locks from the template, such as locks L3 / L4 for highway road continuation (i.e., the adjusted first adjacency lock information) and lock L5 for ramp merging (i.e., the adjusted second adjacency lock information), and registers these new adjacency locks in the lock database.

[0113] Finally, the block generator no longer generates linear geographic elements in the target block based on L1 and L2, but instead performs the generation process of linear geographic elements in the target block based on the locks L3 / L4 for highway road continuation and the lock L5 for ramp merging.

[0114] Additionally, it is understandable that if L2 is adjusted to L5, the second linear geographic element corresponding to L2 can have its element attributes adjusted based on L5, thereby ensuring the matching of the generated linear geographic element with the corresponding adjacency lock information.

[0115] Thus, in this embodiment, if there is a conflict between the first adjacency lock information and the second adjacency lock information, and if the second priority is different from the first priority, a target adjacency lock adjustment rule matching the first priority, the first element type, the second priority, and the second element type is determined from the preset rule base. The first adjacency lock information and the second adjacency lock information are adjusted according to the target adjacency lock adjustment rule, and both the adjusted first adjacency lock information and the adjusted second adjacency lock information are used as target adjacency lock information, thereby realizing the collaborative processing of the first adjacency lock information and the second adjacency lock information in the generation of the first linear geographic element.

[0116] Furthermore, it is understood that after adjusting the first adjacency lock information and the second adjacency lock information based on the target adjacency lock adjustment rules, the first linear geographic element corresponding to the adjusted first adjacency lock information and the second geographic element corresponding to the adjusted second adjacency lock information can both be the target linear geographic element in the embodiments of this application.

[0117] In some embodiments provided in this application, the first adjacency lock information includes the first intersection point of the first linear geographic element and the target boundary, and the second adjacency lock information includes the second intersection point of the second linear geographic element and the target boundary. The step of determining the conflict state between the first adjacency lock information and the second adjacency lock information includes: determining that there is a conflict between the first adjacency lock information and the second adjacency lock information when the first intersection point is within a preset distance of the second intersection point; and determining that there is no conflict between the first adjacency lock information and the second adjacency lock information when the first intersection point is outside the preset distance of the second intersection point.

[0118] Specifically, in order to accurately determine whether there is a conflict between the first adjacency lock information and the second adjacency lock information, in some embodiments provided in this application, the first intersection point (the intersection point of the first linear geographic element and the target boundary) in the first adjacency lock information and the second intersection point (the intersection point of the second linear geographic element and the target boundary) in the second adjacency lock information can be used to determine whether the first intersection point is within the preset distance of the second intersection point. If so, it is determined that there is a conflict between the two; if not, it is determined that there is no conflict.

[0119] In some embodiments, the first intersection point can be understood as the specific spatial point formed by the intersection of the first linear geographic element and the target boundary.

[0120] In some embodiments, the second intersection point can be understood as the specific spatial point formed by the intersection of the second linear geographic element and the target boundary.

[0121] In some examples, the first intersection point can be understood as the position vector p in the first adjacency lock information, and the second intersection point can be understood as the position vector p in the second adjacency lock information.

[0122] In some embodiments, the preset distance can be understood as a pre-configured distance used to determine whether the distance between two intersection points is relatively short.

[0123] In one example, let the first intersection point be P. new The second intersection point is P. L' The block generator, based on the pre-encapsulated adjacency lock data object, calls the adjacency lock registration API provided by the adjacency lock manager. The adjacency lock manager can then determine the appropriate adjacency lock based on the value of P. new Whether there are other locks within the preset distance, as shown in the following formula:

[0124] In the formula, This is a configurable tolerance, which is the preset distance in the embodiments of this application.

[0125] Thus, in this embodiment of the application, if the first intersection point is within a preset distance of the second intersection point, it can be determined that there is a conflict between the first adjacency lock information and the second adjacency lock information; if the first intersection point is outside a preset distance of the second intersection point, it can be determined that there is no conflict between the first adjacency lock information and the second adjacency lock information, thereby achieving conflict detection.

[0126] Please see Figure 4 In some embodiments provided in this application, step 130 includes: 131: Generate the first linear element; 132: Based on the target adjacency lock information, determine the application state of the target adjacency lock information relative to the first linear element; 133: If the target adjacency lock information can be applied to the first linear element, adjust the first linear element according to the target adjacency lock information to obtain the first linear geographic element.

[0127] Specifically, to ensure the robust generation of the first linear geographic element, in some embodiments provided in this application, an unconstrained first linear element can be generated first, and then it can be determined whether the element meets the application conditions of the target adjacency lock information based on the target adjacency lock information. If the application conditions are met, the first linear element is adjusted according to the target adjacency lock information, that is, the target adjacency lock information is applied to the first linear element, thereby obtaining a first linear geographic element that conforms to the target adjacency lock constraint.

[0128] In some embodiments, the first linear element can be understood as a preliminary linear structure generated without considering target adjacency lock information.

[0129] In some embodiments, the first linear element has a basic linear shape, such as a path or direction, but does not set some properties of the linear element itself, such as material, intersection position with the boundary, width, etc.

[0130] In some embodiments, the application state can be used to describe the degree of fit between the target adjacency lock information and the first linear element.

[0131] In some embodiments, the application state includes two cases: applicable and inapplicable. Applicable can be understood as information such as the type, general direction, and location range of the first linear element having no significant conflict with the target adjacency lock information, thus the target adjacency lock information can be applied to the first linear element. Inapplicable can be understood as a situation where the type and other attributes of the first linear element do not meet the requirements of the target adjacency lock information, making it difficult to apply the target adjacency lock information to the first linear element.

[0132] In some embodiments, the block generator can generate an initial path based on the PCG algorithm without boundary constraints, specifically a spline curve, a polyline, etc. When generating the initial path, the generated preliminary path may extend towards the target boundary, and this path is the first linear element. Then, the block generator can determine whether the target adjacency lock information can be applied to the first linear element.

[0133] Thus, in this embodiment of the application, a first linear element can be generated, and the application state of the target adjacency lock information relative to the first linear element can be determined according to the target adjacency lock information. When the target adjacency lock information can be applied to the first linear element, the first linear element can be adjusted according to the target adjacency lock information to obtain the first linear geographic element, thereby ensuring the robust generation of the first linear geographic element.

[0134] In some embodiments provided in this application, the target adjacency lock information includes the first intersection point of the target linear geographic element and the target boundary, the first extension direction angle of the target linear geographic element at the first intersection point, and the first element type of the target linear geographic element. Step 132 then includes: when the target endpoint of the first linear element is within a preset range of the first intersection point, the difference in extension direction angle is less than a preset threshold, and the second element type of the first linear element matches the first element type, determining that the target adjacency lock information can be applied to the first linear element, wherein the target endpoint is the endpoint close to the target boundary, and the difference in extension direction angle is the difference between the second extension direction angle and the first extension direction angle of the first linear element at the target endpoint.

[0135] Specifically, to accurately determine whether target adjacency lock information can be applied to the first linear element, in some embodiments provided in this application, the first intersection point, the first extension direction angle, and the first element type in the target adjacency lock information are used as the judgment criteria. It is determined whether the following three conditions are met: the target endpoint of the first linear element is within a preset range of the first intersection point; the difference in extension direction angle is less than a preset threshold; and the second element type matches the first element type. If so, it is determined that the target adjacency lock information can be applied to the first linear element. Conversely, if not, it is determined that the target adjacency lock information cannot be applied to the first linear element.

[0136] In some embodiments, the first intersection point can be understood as the location where the target linear geographic element indicated by the target adjacency lock information intersects with the target boundary.

[0137] In some embodiments, the first intersection point may be the position vector p in the target adjacency lock information of the target linear geographic continuous element.

[0138] In some embodiments, the first extension direction angle can be understood as the angle value corresponding to the extension direction of the target linear geographic element at the first intersection point.

[0139] In some embodiments, the first extension direction angle may be the tangent vector in the target adjacency lock information of the target linear geographic continuous element. .

[0140] In some embodiments, the first element type can be understood as the attribute classification of the target linear geographic element, such as one of the types of road, river, wall, pipeline, etc.

[0141] In some embodiments, the first element type can be understood as the "type of the continuous elements represented by the lock" in the target adjacency lock information of the target linear geographic element.

[0142] In some embodiments, the target endpoint can be understood as the endpoint of the first linear element that is close to the target boundary.

[0143] In some embodiments, the extension direction angle difference can be understood as the difference between the second extension direction angle of the first linear element at the target endpoint and the first extension direction angle in the target adjacency lock information.

[0144] In some embodiments, the preset range can be understood as a pre-defined position tolerance range, used to determine the spatial proximity between the target endpoint of the first linear element and the first intersection point.

[0145] In some embodiments, the preset threshold can be understood as a pre-set angle tolerance threshold, used to determine whether the deviation between the extension direction of the first linear element and the target linear geographic element is within an acceptable range.

[0146] In some embodiments, the second element type can be understood as the attribute classification of the first linear element itself, such as one of the types of road, river, wall, pipeline, etc.

[0147] To more clearly illustrate the virtual scene processing method in the embodiments of this application, please refer to the following exemplary description: Assume the first linear element is C cand And assume C cand The endpoint (i.e., the target endpoint) is p. cand C cand In p cand The tangent at that point is Then for the path endpoint p cand The block generator may check whether it falls under a certain adjacency lock. L Within the attraction range, as shown in the following formula:

[0148] In the formula, P L For adjacent locks L The position vector, For adjacency lock L The tangent vector. This is the location tolerance (corresponding to the preset range). This is the angle tolerance (corresponding to the preset threshold).

[0149] At the path endpoint p cand If the above formula is not satisfied, the block generator can continue to extend C according to preset logic. cand Or terminate C directly. cand The generation of .

[0150] At the path endpoint p cand If the above formula is satisfied, then C can be checked. cand semantics and adjacency locks L Whether the semantics are compatible. For example, if adjacency locks... LThe element_type is road, and the road_class is primary_highway, which is the same as a C cand The element_type is road, but the road_class is country_road. The block generator can calculate a semantic matching score S based on country_road and primary_highway. semantic And determine S semantic Is it greater than a certain threshold?

[0151] If S semantic If the value is greater than a certain threshold, then the target adjacency lock information can be applied to the first linear element.

[0152] If S semantic If the value is less than or equal to a certain threshold, then the target adjacency lock information cannot be applied to the first linear element.

[0153] Thus, in this embodiment of the application, when the target endpoint of the first linear element is within a preset range of the first intersection point, the angle difference in the extension direction is less than a preset threshold, and the second element type of the first linear element matches the first element type, it can be determined that the target adjacency lock information can be applied to the first linear element, thereby realizing the determination of the application state of the target adjacency lock information relative to the first linear element.

[0154] In some embodiments provided in this application, the target adjacency lock information includes a first intersection point between the target linear geographic element and the target boundary, a first extension direction angle of the target linear geographic element at the first intersection point, and a first element style of the target linear geographic element. Step 133 includes: when the target adjacency lock information can be applied to the first linear element, generating a second linear element to connect the preset position point and the first intersection point based on the first intersection point, the first extension direction angle, and the preset position point of the first linear element, wherein the extension direction angle of the second linear element at the first intersection point matches the first extension direction angle; adjusting the second linear element according to the first element style to obtain the first linear geographic element.

[0155] Specifically, in order to ensure that the element attributes of the generated first linear geographic element can match the target linear geographic element, in some embodiments provided in this application, when the target adjacency lock information can be applied to the first linear element, a transitional second linear element is generated by taking the first intersection point as the geometric endpoint and the first extension direction angle as the directional constraint, combined with the preset position point of the first linear element, and then adjusting the second linear element according to the style of the first element, that is, applying the style of the first element completely to the second linear element, thereby obtaining the first linear geographic element.

[0156] In some embodiments, the first intersection point can be understood as the location where the target linear geographic element indicated by the target adjacency lock information intersects with the target boundary.

[0157] In some embodiments, the first intersection point may be the position vector p in the target adjacency lock information of the target linear geographic continuous element.

[0158] In some embodiments, the first extension direction angle can be understood as the angle value corresponding to the extension direction of the target linear geographic element at the first intersection point.

[0159] In some embodiments, the first intersection point may be the tangent vector in the target adjacency lock information of the target linear geographic continuous element. .

[0160] In some embodiments, the first element style can be understood as a set of visual and attribute styles of the target linear geographic element corresponding to the target adjacency lock information, including but not limited to material (such as road asphalt, river water), size details (such as road lane width, wall thickness), appearance effects (such as river foam texture, guardrail style), etc.

[0161] In some embodiments, the first element style of a target linear geographic element can be understood as semantic contract information in the target adjacency lock information.

[0162] In one example, with the C mentioned above cand For example, the process of generating the second linear element may include: Assume the first linear element C cand A point p at a certain distance from the target boundary start (i.e., the preset position point) is reliable / trustworthy, and the first linear element C cand At point p start The tangent on is Then p can be start As the starting position P0 of the second linear element, k* As the starting point of the second linear element, the tangent T0 will be used to connect P. L As the endpoint P1 of the second linear element, k* The endpoint tangent T1 of the second linear element, k is a scalar controlling the shape of the curve, and the second linear element can be calculated by the following formula:

[0163] In the formula, the value range of S is [0,1].

[0164] Thus, in this embodiment of the application, when the target adjacency lock information can be applied to the first linear element, a second linear element for connecting the preset position point and the first intersection point can be generated based on the first intersection point, the first extension direction angle and the preset position point of the first linear element, and the second linear element can be adjusted according to the style of the first element to obtain the first linear geographic element, thereby realizing the generation of the first linear geographic element.

[0165] In some embodiments provided in this application, the step of adjusting the second linear element according to the first element style to obtain the first linear geographic element includes: adjusting the second linear element according to the first element style to obtain the first linear geographic element when the target attribute parameter of the second linear element meets the preset parameter value condition.

[0166] Specifically, to further ensure the rationality of the first linear geographic element, in some embodiments provided in this application, the target attribute parameters of the second linear element are first extracted, and it is determined whether the parameters meet the preset parameter value conditions; if they meet the conditions, the second linear element is adjusted according to the style of the first element, and the first linear geographic element is finally obtained; if they do not meet the conditions, the style application process is paused or adjusted to avoid unreasonable adaptation.

[0167] In some embodiments, the target attribute parameter can be understood as the attribute index possessed by the second linear element itself.

[0168] In some embodiments, the target attribute parameters are related to the element type of the second linear element. For example, for road elements, the target attribute parameters may include at least one of parameters such as road curvature, slope, and pavement load-bearing capacity. Similarly, for river elements, the target attribute parameters may include at least one of parameters such as river channel slope, water flow channel width, and water depth variation rate. Furthermore, for man-made structural elements such as walls and pipelines, the target attribute parameters may include at least one of parameters such as structural verticality, cross-sectional dimensional tolerance, and material adhesion compatibility.

[0169] In some embodiments, the preset parameter value condition can be understood as a pre-set standard threshold or range used to determine whether the style of the first element can be applied to the second linear element.

[0170] In some embodiments, the preset parameter value conditions are related to the element type of the second linear element. For example, the preset parameter value conditions for a highway might be "road curvature ≤ 0.05 rad / m, slope ≤ 3°, road surface smoothness error ≤ 0.1m". Similarly, the preset parameter value conditions for a river might be "riverbed slope ≥ 2°, water depth change rate ≤ 0.5m / m".

[0171] In one example, the block generator can check whether the maximum curvature of the second linear element (i.e., the target attribute parameter) exceeds a preset allowable range (i.e., a preset parameter value condition), thereby preventing impassable sharp turns in roads and abnormal bends in river channels.

[0172] In some embodiments, the second linear element can be obtained based on the above-mentioned starting positions P0, T0, P1, T1 and k. Then, when the target attribute parameters of the second linear element do not meet the preset parameter value conditions, P0 or k can be adjusted to regenerate the second linear element and determine again whether the preset parameter value conditions are met, or the application of the target adjacency lock information on the second linear element can be directly abandoned.

[0173] Thus, in this embodiment, if the target attribute parameters of the second linear element meet the preset parameter value conditions, the second linear element can be adjusted according to the style of the first element to obtain the first linear geographic element, thereby ensuring the rationality of the finally generated first linear geographic element. In some embodiments provided in this application, the virtual scene processing method further includes: determining the block to be loaded based on the position and / or view direction of the controlled virtual character; if there is block data for the block to be loaded, loading the block to be loaded based on the block data; if there is no block data for the block to be loaded, determining the block to be loaded as the target block to be generated, and triggering a block generation instruction.

[0174] Specifically, in order to accurately determine the range of blocks that need to be loaded and avoid resource waste caused by invalid loading, in some embodiments provided in this application, the electronic device can determine the blocks to be loaded based on the position and / or field of view of the controlled virtual character; if the block already has block data, the loading process is directly executed; if there is no block data, it is determined as the target block to be generated and a block generation instruction is triggered, thereby realizing the on-demand loading of blocks.

[0175] In some embodiments, a controlled virtual character can be understood as a virtual object controlled by a player (or user) in a virtual scene, such as a player character in a game or an inspection agent in a digital twin scene.

[0176] In some embodiments, the block to be loaded can be understood as a block that needs to be included in the current loading range, calculated based on the position and / or view direction of the controlled virtual character, and may include blocks that have been generated but not loaded, or blocks that have not been generated but need to be used.

[0177] In some embodiments, the view frustum of the controlled virtual character can be calculated in real time to determine the blocks to be loaded. Blocks within the view frustum are considered to be loaded, while those outside the view frustum are not.

[0178] In some embodiments, the distance between the controlled virtual character and each block can be calculated in real time, so that blocks located within a certain distance of the controlled virtual character are designated as blocks to be loaded.

[0179] In some embodiments, block data can be understood as the complete data set corresponding to the generated blocks, including structured data such as terrain, linear geographic elements, vegetation, and collision bodies that can be directly used for rendering and interaction.

[0180] Thus, in this embodiment of the application, the block to be loaded can be determined based on the position and / or view direction of the controlled virtual character, and if there is block data for the block to be loaded, the block to be loaded can be loaded based on the block data, and if there is no block data for the block to be loaded, the block to be loaded can be determined as the target block to be generated, and the block generation instruction can be triggered, thereby ensuring the effective triggering of the block generation instruction.

[0181] To more clearly illustrate that the virtual scene is a processing method in the embodiments of this application, please refer to the following exemplary description: Imagine a cyberpunk-style city environment where the system is generating two adjacent blocks in parallel, namely T. 10,20 and T 11,20 Block T 10,20 The generation task includes "a westbound, eight-lane elevated highway needs to pass through the block." Block T_ 11,20 The generation task requires generating a dense street network, in which a four-lane surface main road (Priority=60) will extend from east to west and may intersect with T_ 10,20 Boundary contact.

[0182] T_ 10,20 The block generator precedes T. 11,20 Start working, T_ 10,20 The block generator extends the highway to T_ 11,20 When the common boundary BV11, 20 is reached, a high-priority adjacency lock L_HMY is registered near the midpoint of the boundary. The information in L_HMY can be {priority:100,type:'road',class:'highway',lanes:8,elevation:20.0,...}.

[0183] T_ 11,20The block generator also extends the 4-lane ground main road to the common boundary BV11,20, and attempts to register a lower-priority adjacency lock L_ROAD at a very close location. The information within L_ROAD can be {priority:60,type:'road',class:'primary_road',lanes:4,elevation:0.0,...}. It is understandable that when T_ 11,20 When the generator calls the adjacency lock registration API provided by the adjacency lock manager, the adjacency lock manager will detect a conflict between L_ROAD and the existing L_HMY.

[0184] Furthermore, since L_ROAD's priority is less than L_HMY's priority, L_ROAD's registration request is rejected. Subsequently, the adjacency lock manager or block generator detects that this is a "manageable" conflict, meaning that the element types corresponding to L_ROAD and L_HMY satisfy the preset condition that they are different but compatible.

[0185] Then, after querying the connection rule base and matching a corresponding rule, the adjacency lock manager or block generator designs a reasonable interchange ramp structure. Next, the states of L_HMY and L_ROAD are updated to resolved. Then, a new set of conflict-free locks is registered on BV11 and 20, namely L_HMY_CONTINUE, L_ROAD_CONTINUE, L_ON_RAMP, and L_OFF_RAMP. L_HMY_CONTINUE represents the main road of the highway at T_ 11,20 The continuation of L_HMY_CONTINUE. L_ROAD_CONTINU represents the ground main road within T_ 10,20 The route continues through the highway, potentially going underground or passing under a bridge. L_ROAD_CONTINUE has a priority of 60. L_ON_RAMP represents an entrance passage from a surface road to the highway. L_OFF_RAMP represents an exit passage from the highway back to a surface road.

[0186] Finally, now, both block generators will have L_HMY_CONTINUE, L_ROAD_CONTINUE, L_ON_RAMP, and L_OFF_RAMP available on BV11 and 20, and thus T_ 10,20The generator receives L_ROAD_CONTINUE, L_ON_RAMP, and L_OFF_RAMP as generation constraints for the eastern boundary, and adjusts the internal road network accordingly, generating connections to ground roads, reserving space for passageways, and generating bridge piers. Correspondingly, T_ 11,20 The generator will be constrained by L_HMY_CONTIN UE, L_ON_RAMP, and L_OFF_RAMP as its western boundary. It will generate the continuation of the elevated highway and generate smooth curves that precisely align with the passageway.

[0187] To more clearly illustrate that the virtual scene is a processing method in the embodiments of this application, please refer to the following exemplary description: Suppose a large river needs to flow from a high mountain canyon biome to a plain forest biome, block T 50,80 Belonging to high mountains and deep valleys, T 50,80 The PCG algorithm can generate geographic elements characterized by steep terrain, riverbanks consisting mostly of exposed rock, and rapid currents. Block T 50,81 It belongs to the plains forest, T 50,81 The geographic elements generated by the PCG algorithm are characterized by flat terrain, riverbanks consisting mostly of soil and grassland, gentle water flow, and dense vegetation.

[0188] T 50,80 The generator runs first, creating a winding, rapid river within the block. When the river reaches T... 50,81 Common boundary B H 50,81 Register a corresponding adjacency lock L_RIVER.

[0189] In the geometric contract of L_RIVER, the position is {x:50.75,y:81.05,z:150.0}, used for the precise outlet position on the boundary; the tangent is {x:0.1,y:1.0,z:-0.05}, indicating that the water flow direction is downward. The width is 30.0 meters and the depth is 8.0 meters.

[0190] The semantic contract of L_RIVER includes flow_velocity_mps:5.0 to ensure rapid water flow, water_material:"mat_river_rapids" to characterize the water flow as a material that includes foam and rapid flow effects, and banks_material:"mat_canyon_rock" to characterize the rock material.

[0191] When T 50,81 After the block generator starts, query the common boundary B.H 50,81 By using the adjacency lock on T, we obtain L_RIVER. Furthermore, T 50,81 The PCG algorithm is based on L_RIVER. In a plains forest environment, it generates a river, and the starting point of the river must satisfy all the geometric constraints of L_RIVER, such as the geometric contract and semantic contract mentioned above.

[0192] Specifically, during the process of generating rivers in the block generator, the starting point of river generation can be forcibly set at the position of L_RIVER, and the initial tangent of the generated river path is aligned with the tangent of L_RIVER. To ensure the naturalness of the river's direction, based on position, tangent, and Hermit splines, the path generated within the block can smoothly connect with the position of L_RIVER, thereby ensuring the continuity of the river's curvature and avoiding abrupt inflection points at the boundaries. Furthermore, the initial width and depth of the river are defined in L_RIVER as width and depth.

[0193] Subsequently, for the application of semantic contracts, interpolation and other methods can be used to set the flow velocity (mps) at different locations in the river, so that flow velocity (mps) gradually decreases from 5 to a preset value, thereby adapting to flat terrain. Similarly, water material will smoothly transition from mat_river_rapids to T. 50,81 The environment is defined by `mat_rive r_slow_murky` (slow, murky river water material). The `banks_material` will also transition from rock to mud and grass. This transition can be completed within a small area near the boundary, thus enabling the generation of `T` based on `L_RIVER`. 50,81 The middle river.

[0194] To facilitate better implementation of the virtual scene processing method of this application embodiment, this application embodiment also provides a virtual scene processing apparatus. Please refer to... Figure 5 , Figure 5 This is a schematic diagram of the structure of a virtual scene processing device provided in an embodiment of this application. The virtual scene processing device 200 comprises multiple blocks, and includes: Response module 210 is used to determine the target boundary that is in contact with the target block to be generated in response to the block generation instruction; The information determination module 220 is used to determine the target adjacency lock information corresponding to the target boundary, wherein the target adjacency lock information is used to indicate the element attributes of the target linear geographic elements that intersect the target boundary in the block that is in contact with the target boundary; The generation module 230 is used to generate a first linear geographic element in the target block that intersects with the target boundary based on the target adjacency lock information, wherein the element attributes of the first linear geographic element match the target adjacency lock information.

[0195] In some embodiments provided in this application, the information determination module 220 is further configured to generate first adjacency lock information of a first linear geographic element, detect second adjacency lock information of a second linear geographic element intersecting with the target boundary, and determine the first adjacency lock information and / or the second adjacency lock information as target adjacency lock information. The second linear geographic element is a linear geographic element in a block other than the target block in the virtual scene.

[0196] In some embodiments provided in this application, the information determination module 220 is further used to determine the conflict state between the first adjacency lock information and the second adjacency lock information, and when there is no conflict between the first adjacency lock information and the second adjacency lock information, both the first adjacency lock information and the second adjacency lock information are determined as target adjacency lock information.

[0197] In some embodiments provided in this application, the first adjacency lock information includes the first priority of the first linear geographic element, and the second adjacency lock information includes the second priority of the second linear geographic element. Furthermore, the information determination module 220 is also used to determine the adjacency lock information with higher priority as the target adjacency lock information when there is a conflict between the first adjacency lock information and the second adjacency lock information, and the second priority is different from the first priority.

[0198] In some embodiments provided in this application, the first adjacency lock information includes the first priority and the first element type of the first linear geographic element, and the second adjacency lock information includes the second priority and the second element type of the second linear geographic element. Furthermore, the information determination module 220 is further configured to, in the event of a conflict between the first and second adjacency lock information, if the second priority is different from the first priority, determine a target adjacency lock adjustment rule from a preset rule base that matches the first priority, the first element type, the second priority, and the second element type; adjust the first and second adjacency lock information according to the target adjacency lock adjustment rule; and use both the adjusted first and second adjacency lock information as target adjacency lock information. The preset rule base includes multiple priorities, multiple element types, multiple adjacency lock adjustment rules, and includes matching relationships between two different priorities and one adjacency lock adjustment rule.

[0199] In some embodiments provided in this application, the first adjacency lock information includes the first intersection point of the first linear geographic element and the target boundary, and the second adjacency lock information includes the second intersection point of the second linear geographic element and the target boundary. Furthermore, the information determination module 220 is also used to determine that there is a conflict between the first adjacency lock information and the second adjacency lock information when the first intersection point is within a preset distance of the second intersection point, and to determine that there is no conflict between the first adjacency lock information and the second adjacency lock information when the first intersection point is outside the preset distance of the second intersection point.

[0200] In some embodiments provided in this application, the generation module 230 is further configured to generate a first linear element, and determine the application state of the target adjacency lock information relative to the first linear element based on the target adjacency lock information, and adjust the first linear element according to the target adjacency lock information to obtain the first linear geographic element when the target adjacency lock information can be applied to the first linear element.

[0201] In some embodiments provided in this application, the target adjacency lock information includes the first intersection point of the target linear geographic element and the target boundary, the first extension direction angle of the target linear geographic element at the first intersection point, and the first element type of the target linear geographic element. The generation module 230 is further used to determine that the target adjacency lock information can be applied to the first linear element when the target endpoint of the first linear element is within a preset range of the first intersection point, the difference in extension direction angle is less than a preset threshold, and the second element type of the first linear element matches the first element type. Here, the target endpoint is the endpoint close to the target boundary, and the difference in extension direction angle is the difference between the second extension direction angle and the first extension direction angle of the first linear element at the target endpoint.

[0202] In some embodiments provided in this application, the target adjacency lock information includes a first intersection point between the target linear geographic element and the target boundary, a first extension direction angle of the target linear geographic element at the first intersection point, and a first element style of the target linear geographic element. The generation module 230 is further configured to, when the target adjacency lock information can be applied to the first linear element, generate a second linear element to connect the preset position point and the first intersection point based on the first intersection point, the first extension direction angle, and a preset position point of the first linear element, and adjust the second linear element according to the first element style to obtain the first linear geographic element. The extension direction angle of the second linear element at the first intersection point matches the first extension direction angle.

[0203] In some embodiments provided in this application, the generation module 230 is further configured to adjust the second linear element according to the style of the first element to obtain the first linear geographic element when the target attribute parameters of the second linear element meet the preset parameter value conditions.

[0204] In some embodiments provided in this application, the target adjacency lock information includes basic metadata, geometric contract information, semantic contract information, and contextual relationship information. The geometric contract information is used to define the spatial state of the target linear geographic element at the target boundary, the semantic contract information is used to define the non-geometric attributes of the target linear geographic element, and the contextual relationship information is used to define other blocks associated with the block to which the target linear geographic element belongs.

[0205] In some embodiments provided in this application, the processing device 200 further includes a block determination module, a loading module, and an instruction triggering module. The block determination module determines the block to be loaded based on the position and / or view direction of the controlled virtual character. The loading module loads the block to be loaded based on the block data if such data exists. The instruction triggering module determines the block to be loaded as the target block to be generated if no such data exists, and triggers a block generation instruction.

[0206] Each unit in the aforementioned virtual scene processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These units can be embedded in or independent of the processor in the electronic device in hardware form, or stored in the memory of the electronic device in software form, so that the processor can call and execute the operations corresponding to each unit.

[0207] The virtual scene processing device 200 can be integrated into a terminal or server that has storage and a processor and thus computing power, or the virtual scene processing device 200 can be the terminal or server.

[0208] Optionally, this application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0209] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may be a terminal or a server. Figure 6 As shown, the electronic device 300 includes a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 and the memory 302 are electrically connected. Those skilled in the art will understand that the electronic device structure shown in the figures does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0210] The processor 301 is the control center of the electronic device 300. It connects various parts of the electronic device 300 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, it executes various functions of the electronic device 300 and processes data, thereby performing overall processing of the electronic device 300.

[0211] In this embodiment, the processor 301 in the electronic device 300 loads the instructions corresponding to the processes of one or more computer programs into the memory 302 according to the following steps, and the processor 301 runs the computer programs stored in the memory 302 to realize various functions: In response to the block generation command, determine the target boundary that is in contact with the target block to be generated; Determine the target adjacency lock information corresponding to the target boundary, wherein the target adjacency lock information is used to indicate the element attributes of the target linear geographic elements that intersect the target boundary in the block that is in contact with the target boundary; Based on the target adjacency lock information, a first linear geographic element that intersects with the target boundary in the target block is generated, wherein the element attributes of the first linear geographic element match the target adjacency lock information.

[0212] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0213] Optional, such as Figure 6 As shown, the electronic device 300 also includes: a display screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the display screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307. Those skilled in the art will understand that... Figure 6 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0214] The display screen 303 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The display screen 303 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program. Optionally, the touch panel may include a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, and transmits the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 301, and can receive and execute commands from the processor 301. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 301 to determine the type of touch event. Subsequently, the processor 301 provides corresponding visual output on the display panel according to the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the display screen 303 to achieve input and output functions. However, in some embodiments, the touch panel and the display screen 303 can be implemented as two independent components to achieve input and output functions. That is, the display screen 303 can also be used as part of the input unit 306 to achieve input functions.

[0215] The radio frequency circuit 304 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other electronic devices, and to transmit and receive signals with network devices or other electronic devices.

[0216] Audio circuitry 305 can be used to provide an audio interface between a user and an electronic device via a speaker and a microphone. Audio circuitry 305 converts received audio data into electrical signals, transmits them to the speaker, and the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 305, converted back into audio data, and then processed by processor 301 before being transmitted via radio frequency circuitry 304 to, for example, another electronic device, or output to memory 302 for further processing. Audio circuitry 305 may also include an earphone jack to facilitate communication between peripheral headphones and electronic devices.

[0217] The input unit 306 can be used to receive input numbers, characters, or object feature information (such as fingerprints, irises, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.

[0218] Power supply 307 is used to supply power to various components of electronic device 300. Optionally, power supply 307 can be logically connected to processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 307 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0219] although Figure 6 As not shown in the diagram, the electronic device 300 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.

[0220] This application also provides a computer-readable storage medium for storing a computer program. This computer-readable storage medium can be applied to a computer device, and the computer program causes the computer device to execute the corresponding processes in the virtual scene processing method described in the embodiments of this application; for brevity, further details are omitted here.

[0221] This application also provides a computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding process in the virtual scene processing method described in the embodiments of this application. For simplicity, further details are omitted here.

[0222] This application also provides a computer program comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding process in the virtual scene processing method of this application. For brevity, further details are omitted here.

[0223] It should be understood that the processor in this application may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0224] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0225] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0226] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

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

[0228] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0229] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0230] In addition, the functional units in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0231] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer or a server) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0232] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for processing virtual scenes, characterized in that, The virtual scene consists of multiple blocks, and the method includes: In response to the block generation command, determine the target boundary that is in contact with the target block to be generated; Determine target adjacency lock information corresponding to the target boundary, wherein the target adjacency lock information is used to indicate the element attributes of target linear geographic elements that intersect the target boundary in the block that is in contact with the target boundary; Based on the target adjacency lock information, a first linear geographic element that intersects with the target boundary in the target block is generated, wherein the element attributes of the first linear geographic element match the target adjacency lock information.

2. The method according to claim 1, characterized in that, The determination of the target adjacency lock information corresponding to the target boundary includes: Generate the first adjacency lock information of the first linear geographic element; Detect the second adjacency lock information of the second linear geographic element that intersects with the target boundary, wherein the second linear geographic element is a linear geographic element in other blocks in the virtual scene besides the target block; The first adjacency lock information and / or the second adjacency lock information are determined as the target adjacency lock information.

3. The method according to claim 2, characterized in that, The step of determining the first adjacency lock information and the second adjacency lock information as the target adjacency lock information includes: Determine the conflict status between the first adjacency lock information and the second adjacency lock information; When there is no conflict between the first adjacency lock information and the second adjacency lock information, both the first adjacency lock information and the second adjacency lock information are determined as the target adjacency lock information.

4. The method according to claim 2, characterized in that, The first adjacency lock information includes a first priority of the first linear geographic element, and the second adjacency lock information includes a second priority of the second linear geographic element. The step of determining the first adjacency lock information and / or the second adjacency lock information as the target adjacency lock information further includes: When the first adjacency lock information conflicts with the second adjacency lock information, and the second priority is different from the first priority, the adjacency lock information with the higher priority is determined as the target adjacency lock information.

5. The method according to claim 2, characterized in that, The first adjacency lock information includes the first priority and the first element type of the first linear geographic element, and the second adjacency lock information includes the second priority and the second element type of the second linear geographic element. Determining the first adjacency lock information and / or the second adjacency lock information as the target adjacency lock information includes: In the event of a conflict between the first adjacency lock information and the second adjacency lock information, if the second priority is different from the first priority, a target adjacency lock adjustment rule matching the first priority, the first element type, the second priority, and the second element type is determined from a preset rule base. The preset rule base includes multiple priorities, multiple element types, multiple adjacency lock adjustment rules, and includes a matching relationship between two different priorities and one adjacency lock adjustment rule. According to the target adjacency lock adjustment rules, the first adjacency lock information and the second adjacency lock information are adjusted; Both the adjusted first adjacency lock information and the adjusted second adjacency lock information are used as the target adjacency lock information.

6. The method according to claim 3, characterized in that, The first adjacency lock information includes the first intersection point of the first linear geographic element and the target boundary, and the second adjacency lock information includes the second intersection point of the second linear geographic element and the target boundary. Determining the conflict state between the first adjacency lock information and the second adjacency lock information includes: If the first intersection point is within a preset distance of the second intersection point, it is determined that there is a conflict between the first adjacency lock information and the second adjacency lock information; If the first intersection point is located at a preset distance from the second intersection point, it is determined that there is no conflict between the first adjacency lock information and the second adjacency lock information.

7. The method according to claim 1, characterized in that, The step of generating a first linear geographic element in the target block that intersects with the target boundary based on the target adjacency lock information includes: Generate the first linear element; Based on the target adjacency lock information, determine the application state of the target adjacency lock information relative to the first linear element; If the target adjacency lock information can be applied to the first linear element, the first linear element is adjusted according to the target adjacency lock information to obtain the first linear geographic element.

8. The method according to claim 7, characterized in that, The target adjacency lock information includes the first intersection point of the target linear geographic element and the target boundary, the first extension direction angle of the target linear geographic element at the first intersection point, and the first element type of the target linear geographic element. Determining the application state of the target adjacency lock information relative to the first linear element based on the target adjacency lock information includes: When the target endpoint of the first linear element is within a preset range of the first intersection point, the angle difference of the extension direction is less than a preset threshold, and the second element type of the first linear element matches the first element type, it is determined that the target adjacency lock information can be applied to the first linear element. Here, the target endpoint is the endpoint close to the target boundary, and the angle difference of the extension direction is the difference between the second extension direction angle and the first extension direction angle of the first linear element at the target endpoint.

9. The method according to claim 7, characterized in that, The target adjacency lock information includes a first intersection point between the target linear geographic element and the target boundary, a first extension direction angle of the target linear geographic element at the first intersection point, and a first element style of the target linear geographic element. The step of adjusting the first linear element according to the target adjacency lock information to obtain the first linear geographic element, when the target adjacency lock information can be applied to the first linear element, includes: When the target adjacency lock information can be applied to the first linear element, a second linear element is generated to connect the preset position point and the first intersection point based on the first intersection point, the first extension direction angle, and the preset position point of the first linear element, wherein the extension direction angle of the second linear element at the first intersection point matches the first extension direction angle. The second linear element is adjusted according to the style of the first element to obtain the first linear geographic element.

10. The method according to claim 9, characterized in that, The step of adjusting the second linear element according to the first element style to obtain the first linear geographic element includes: If the target attribute parameters of the second linear element meet the preset parameter value conditions, the second linear element is adjusted according to the style of the first element to obtain the first linear geographic element.

11. The method according to any one of claims 1-10, characterized in that, The target adjacency lock information includes basic metadata, geometric contract information, semantic contract information, and contextual relationship information. The geometric contract information is used to define the spatial state of the target linear geographic element at the target boundary. The semantic contract information is used to define the non-geometric attributes of the target linear geographic element. The contextual relationship information is used to define other blocks associated with the block to which the target linear geographic element belongs.

12. The method according to any one of claims 1-10, characterized in that, The method further includes: The block to be loaded is determined based on the position and / or view direction of the controlled virtual character; If block data for the block to be loaded exists, load the block to be loaded based on the block data; If no block data exists for the block to be loaded, the block to be loaded is identified as the target block to be generated, and the block generation instruction is triggered.

13. A virtual scene processing device, characterized in that, The virtual scene consists of multiple blocks, and the processing device includes: The response module is used to determine the target boundary that is in contact with the target block to be generated in response to the block generation command. The information determination module is used to determine the target adjacency lock information corresponding to the target boundary, wherein the target adjacency lock information is used to indicate the element attributes of the target linear geographic elements that intersect the target boundary in the block that is in contact with the target boundary; The generation module is used to generate a first linear geographic element in the target block that intersects with the target boundary based on the target adjacency lock information, wherein the element attributes of the first linear geographic element match the target adjacency lock information.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to execute the virtual scene processing method according to any one of claims 1-12.

15. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing a computer program, and the processor executing the virtual scene processing method according to any one of claims 1-12 by calling the computer program stored in the memory.

16. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the virtual scene processing method according to any one of claims 1-12.