A method for assigning a virtual room object drop position

CN122820901APending Publication Date: 2026-09-25HANGZHOU RUZE ELECTRONIC COMMERCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610996435.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-06
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

[0007]本公开实施例的目的在于解决现有仿真分配策略存在排布无序且不可复现,品类聚集能力、扩展搜索能力、资源及时回收能力较差等技术问题,进而提供一种虚拟房间内对象落位分配方法,进而至少在一定程度上克服由于相关技术的限制和缺陷而导致的一个或者多个问题

Benefits of technology

本公开的实施例中,本发明一种虚拟房间内对象落位分配方法基于用户硬件属性、格位对应的唯一标识数据库及格位的在线状态实现差异化精准落位匹配,结合用户入房时序构建公平合理的落位基准,实现同品类硬件用户聚集布局,在无适配硬件场景下依托房间场景中心完成均衡落位,有效降低了重复落位、无效落位和位置跳变风险,提升了用户与场景格位的适配度,保障房间布局规整统一与用户落位公平性;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122820901A_ABST
    Figure CN122820901A_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to virtual scene simulation technology, to solve the problem of poor category aggregation, search, resource recycling and other capabilities of existing allocation strategies, and propose a virtual room object placement allocation method, including configuring a grid pool, obtaining related information of each grid in the grid pool; when an object issues a placement request, it is determined whether the object has an existing valid grid binding relationship; if not, it is determined whether there is an online and placed object with the same attribute category as the current object; if so, the position information of the grid occupied by the earliest object in time sequence is selected as the reference benchmark, and the idle grid is searched as the candidate grid; if not, the center of the scene of the virtual room is selected as the center benchmark, and the idle grid is searched as the candidate grid; a unique occupation constraint is established, a pre-check is performed on the candidate grid before writing, to ensure that the grid and the object have a one-to-one correspondence, and a binding relationship between the current object and the grid is established after successful occupation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of virtual scene simulation layout technology, and in particular to a method for allocating the placement of objects in a virtual room. Background Technology

[0002] In applications such as smart home simulation, robot task planning, virtual reality environment construction, and automated warehouse simulation, it is usually necessary to assign specific grids to various objects (such as virtual users, service robots, sensors, actuators, and other hardware devices) in a virtual room in order to achieve automatic generation and dynamic adjustment of the spatial layout. The quality of this grid allocation method directly affects the operating efficiency of the simulation system, the realism of the scene, and the feasibility of subsequent task scheduling.

[0003] Currently, existing scheduling and allocation methods typically employ the following allocation strategies: ① The random point allocation strategy randomly selects a position from the predefined set of free grids in the system for allocation. This strategy is simple to calculate, but it is easy to overlap with existing objects, resulting in disordered arrangement and unreproducible results. It has poor layout rationality and system stability. ② Sequential linear arrangement strategy, which arranges objects in a simple linear manner according to their entry order. However, this strategy is prone to uneven space utilization, local crowding or wasted space, and cannot adapt the layout according to the functional attributes and interaction requirements of the objects. It cannot reflect the clustering relationship of hardware of the same category, the scene lacks an understandable group structure, and the simulation layout is not reasonable or realistic. ③ The strategy of rearranging all objects as a whole: When the number of members in the scene changes, this strategy rearranges all objects in the room as a whole to achieve an overall visual uniformity or local clustering effect. However, this strategy will cause the position of the user who has entered to change, affecting the user's perception and subsequent interaction positioning. It lacks scalable search capabilities, and the scene's expansion capacity and carrying capacity are limited, making it impossible to continuously allocate positions within a limited grid.

[0004] Meanwhile, the existing grid occupancy relationships are mostly maintained only in the client rendering layer. The server generally does not have a strict unique occupancy verification and resource management mechanism. The overall layout logic is simple and the management mechanism is weak, resulting in problems such as concurrent conflicts and untimely grid release. When an object leaves, the grid resources cannot be recycled in time, leading to resource waste and failure to arrange new objects. The system has poor stability and cannot meet the needs of building intelligent scenes with high precision and high stability.

[0005] Therefore, there is an urgent need to propose a new user allocation method to solve the above-mentioned technical problems and improve the intelligence level and system robustness of virtual scene construction.

[0006] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0007] The purpose of this disclosure is to solve the technical problems of existing simulation allocation strategies, such as disordered and unreproducible arrangement, poor category aggregation ability, poor extended search ability, and poor timely resource recycling ability. It provides a method for object placement allocation in a virtual room, thereby overcoming one or more problems caused by the limitations and defects of related technologies to a certain extent.

[0008] According to a first aspect of the present disclosure, a method for allocating the placement of objects in a virtual room is provided, characterized in that it includes: Configure a grid pool for the virtual room, the grid pool including multiple grids, each grid having location information and occupancy status information; In response to an object's request to enter the virtual room, the system determines whether the object already has a valid grid binding relationship based on the occupancy status information of each grid. When there is no valid grid binding relationship, determine whether there is an online object with the same attribute category as the current object that has been placed in the virtual room; If it exists, the position information of the grid occupied by the earliest time sequence object is selected as the reference benchmark, and an empty grid is searched in the preset surrounding area of ​​the reference benchmark as a candidate grid. If it does not exist, the scene center of the virtual room is selected as the center reference, and an empty grid is searched as a candidate grid within a preset offset range of the center reference. Establish a unique occupancy constraint, perform pre-write verification on the candidate cell to ensure that the same cell is occupied by only one object, the same object holds only one valid cell, and establish a binding relationship between the current object and the cell after successful occupancy.

[0009] Optionally, the response to the object's request to enter the virtual room further includes: When the object already has a valid cell binding relationship, determine whether the valid cell has an abnormal binding relationship; If it does not exist, then the cell will be reused; If it exists, then the cell is deemed invalid, meaning there is no valid cell binding relationship.

[0010] Optionally, determining whether there is an online and already located object with the same attribute category as the current object in the virtual room includes the following steps: Obtain the attribute category of the object, where the attribute category contains hardware type requirement information; Obtain the set of online and occupied objects in the virtual room, and the attribute categories of each online and occupied object; According to the preset category classification rules, the hardware objects in each of the compartments in the room are classified into categories, generating multiple hardware types. The hardware type requirement information of the object is used to match the corresponding hardware type. Determine whether there is an online and located object in the virtual room that has the same attribute category as the current object. The object with the same attribute category is an object with the same hardware type.

[0011] Optionally, if there is an online and already located object with the same attribute category as the current object within the virtual room: The location information of the grid occupied by the earliest object in the time sequence is selected as a reference benchmark, and the free grids searched within the preset surrounding area of ​​the reference benchmark are selected as candidate grids. If no available space is found, the search range is expanded layer by layer from the inside out using the reference benchmark as the center, until an available space is found or it is determined that the space in the virtual room is full.

[0012] Optionally, if there is no online and already located object with the same attribute category as the current object in the virtual room: The scene center of the virtual room is selected as the central reference, and the empty grids found within the preset offset range of the central reference are selected as candidate grids. If no available space is found, the search range is expanded layer by layer from the inside out using the central reference as the center until an available space is found or it is determined that the space in the virtual room is full.

[0013] Optionally, performing pre-write verification on the candidate cell positions includes: Establish a unique occupancy constraint and perform pre-write verification on the current object and candidate cells based on the preset verification content; If any item in the verification content of the current object and the candidate cell fails, the candidate cell is determined to be unusable as a cell for binding the current object, and the valid cell binding relationship of the object is re-evaluated. If the validation of both the current object and the candidate cell passes, then the candidate cell is determined to be a usable cell for binding the current object. The available cells are written to by locking or atomic conditions to ensure that only one object occupies the same cell, and that the same object holds only one valid cell. After successful occupancy, a binding relationship is established between the current object and the cell.

[0014] Optionally, after the successful placement, the method further includes: Output and save the binding relationship between the current object and the cell. The binding relationship between the current object and the cell remains fixed during the room period. When the current object leaves the room or when there is an abnormal binding relationship, the corresponding cell under the current object's binding relationship is automatically released, thereby completing the resource reclamation of the cell.

[0015] Optionally, the concentric gradient retrieval method can be any one of the following: concentric retrieval based on Manhattan distance, concentric circle retrieval based on Euclidean distance, square concentric retrieval based on Chebyshev distance, or customized concentric traversal retrieval based on a custom art placement priority sequence.

[0016] Optionally, the preset offset range of the central reference is within ±5 of the two-dimensional coordinate offset of the central reference.

[0017] According to a second aspect of the present disclosure, a computer program product is provided, including a computer program or instructions, characterized in that, when the computer program or instructions are executed by a processor, they implement the steps of a virtual room object placement method in any of the above embodiments.

[0018] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects: In the embodiments of this disclosure, the object placement allocation method in a virtual room of the present invention achieves differentiated and accurate placement matching based on user hardware attributes, a unique identifier database corresponding to the grid, and the online status of the grid. It constructs a fair and reasonable placement benchmark by combining the user's entry time sequence, realizes the clustering layout of users with the same type of hardware, and completes balanced placement by relying on the center of the room scene in the absence of compatible hardware. This effectively reduces the risks of duplicate placement, invalid placement, and position jump, improves the compatibility between users and scene grids, and ensures the regularity and uniformity of the room layout and the fairness of user placement. At the same time, by expanding the search layer by layer from the inside out through the layered gradient search method, the scope of invalid search is greatly reduced, the system computing overhead is reduced, the efficiency of grid search is significantly improved, the utilization of idle grid resources in the room is maximized, and the overall utilization rate of grids is effectively improved. This invention implements unique occupancy constraints to verify and restrict the use of individual grid spaces before occupancy, ensuring that each grid space corresponds to only one user and each user is bound to only one grid space. This effectively avoids grid space contention, duplicate binding, and resource conflicts in high-concurrency room entry scenarios, significantly improving the stability and security of the allocation process. The grid space allocation method of this invention is highly versatile and scalable, adaptable to different shapes and sizes of rooms and various hardware devices, and has a wide range of applications. It can effectively meet the intelligent and refined grid space allocation needs in various complex room scenarios.

[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0021] Figure 1 A flowchart illustrating an object placement method within a virtual room according to an exemplary embodiment of this disclosure is shown. Figure 2 A schematic diagram of a layer retrieval method for generating Manhattan distance in an exemplary embodiment of this disclosure is shown. Detailed Implementation

[0022] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0023] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0024] This example implementation first provides a method for assigning objects within a virtual room, referencing... Figure 1 As shown, the method may include the following steps: Step S101: Configure a grid pool for the virtual room. The grid pool includes multiple grids, and each grid has location information and occupancy status information. Step S102: In response to the object's request to enter the virtual room, determine whether the object already has a valid grid binding relationship based on the occupancy status information of each grid. Step S103: When there is no valid grid binding relationship, determine whether there is an online object with the same attribute category as the current object that has been placed in the virtual room; Step S104: If it exists, select the position information of the grid occupied by the object with the earliest time sequence as the reference benchmark, and search for empty grids in the preset surrounding area of ​​the reference benchmark as candidate grids. Step S105: If it does not exist, select the scene center of the virtual room as the center reference, and search for empty grids as candidate grids within the preset offset range of the center reference. Step S106: Establish a unique occupancy constraint, perform pre-write verification on candidate cells to ensure that the same cell is occupied by only one object, the same object holds only one valid cell, and establish the binding relationship between the current object and the cell after successful occupancy.

[0025] The above methods achieve two main benefits. First, they enable the clustering and layout of hardware objects of the same type, making the virtual room layout more orderly and enhancing the realism and comprehensibility of the scene. Second, they effectively avoid positional conflicts between objects, ensuring the stability of the system. Third, the application of the layered gradient retrieval method significantly improves the efficiency of grid retrieval, maximizes the utilization of idle grid resources in the room, effectively improves the overall utilization rate of grids, and the comprehensive grid lifecycle management mechanism enables the recycling and reuse of resources, reduces resource waste, and effectively reduces the risk of repeated placement, invalid placement, and positional changes of objects, ensuring the continuity of the room scene order and the usage status of objects.

[0026] Below, we will refer to Figure 1 and Figure 2 The steps of the method described above in this example embodiment will be explained in more detail.

[0027] In step S101, a grid pool is configured for the virtual room. The grid pool includes multiple grids, and each grid has location information and occupancy status information. For example, a virtual room can consist of multiple different rooms, with a grid pool established for each room. The number of grids in the grid pool is determined by the room capacity configuration and scene map configuration, and the number of grids can be consistent with the maximum number of objects that a single room can accommodate. The number of grids in each different room can be determined based on the actual application. In one embodiment, each grid cell includes at least grid cell ID, two-dimensional coordinates, occupancy status, currently occupied object ID, lock version information, update time, etc., and the hardware type of each grid cell is mapped to the hardware category through a hardware normalization table. The grid ID includes the room ID, map version, and serial number. The grid ID can also be labeled using coordinate encoding. The occupancy status includes grid occupancy status information such as idle, pre-occupied, occupied, being released, and disabled. The currently occupied object ID includes object attribute category, object binding information, etc. The update time includes the write time update when any information such as grid status, occupied object, lock version, or release status is changed. It should be understood that, in this embodiment, the object refers to the position object that needs to occupy a grid in the room scene and be rendered, including real user objects, robot objects, and subsequently configurable AI tutor objects, etc., which need to enter the virtual room to occupy a grid. The object is not a separate hardware device, but a room member instance that carries hardware type, object type, session identifier, and room member status.

[0028] By using the location and occupancy information of the grid spaces, real-time management and monitoring can be achieved, greatly improving the system's operational efficiency and enabling rapid response to object placement requests. The flexible configuration of the number and attributes of grid spaces according to the actual needs of different rooms effectively enhances the versatility and adaptability of the method in this embodiment, enabling it to adapt to virtual room scenarios of various sizes and types. The use of a hardware normalization table enables unified management of different hardware types, simplifying subsequent matching and allocation processes and reducing system complexity.

[0029] In step S102, in response to the object's request to enter the virtual room, it is determined whether the object already has a valid grid binding relationship based on the occupancy status information of each grid. Further, optionally, in one embodiment, step S102 may include the following sub-steps: Step S1021: When the object already has a valid grid binding relationship, determine whether there is an abnormal binding relationship for the valid grid based on the currently occupied object ID information; If it does not exist, then the cell will be reused; For example, the existence of a valid grid binding relationship for an object means that there is a valid binding relationship record between the object and a certain grid in the room. After verifying the occupancy relationship, if the binding relationship between the object and the grid is valid within the set period, it is determined that there is no abnormal binding relationship for the valid grid, and the grid can be reused for the object, thereby effectively avoiding duplicate allocation.

[0030] Step S1022: If it exists, then the cell is determined to be invalid, that is, there is no valid cell binding relationship; For example, a valid grid binding exception means that there is a valid binding relationship record between an object and a certain grid in the room. After verifying the occupancy relationship, if the grid occupancy status in the binding relationship record changes, the correction process will be initiated to release the grid binding relationship and reallocate the object. For example, the correction process includes reading the latest binding relationship data between the grid and the object; abnormal binding relationships include any of the following: the object and the grid have a binding relationship but the grid is occupied by another object, the binding relationship has been released but the grid is still showing as occupied, etc. For abnormal binding relationships, the process is to correct them and re-execute the valid grid check or enter the candidate grid allocation.

[0031] Step S102 not only effectively avoids duplicate allocation—when an object already has a valid cell binding relationship and no anomalies, the cell can be directly reused without re-searching and allocation, significantly improving allocation efficiency—it also promptly corrects abnormal binding relationships. When an abnormal binding relationship is detected in a valid cell, the cell is quickly determined to be invalid and re-allocated, ensuring system stability and avoiding resource waste and allocation errors caused by abnormal binding. By first determining whether an object has a valid cell binding relationship, unnecessary search and calculation steps are reduced, lowering the system's computational overhead. Furthermore, it significantly improves the user experience; for objects with valid cell binding relationships, the original cell is reused, ensuring the continuity of the object's usage state and avoiding user confusion caused by position jumps.

[0032] In step S103, when there is no valid grid binding relationship, it is determined whether there is an online object with the same attribute category as the current object that has been placed in the virtual room; Further, optionally, in one embodiment, step S103 may include the following sub-steps: Step S1031: Obtain the attribute category of the object, which contains hardware type requirement information; For example, the attribute categories include object type, carrying hardware type, session identifier and hardware type requirements, etc. The object type, hardware category, grid ID, coordinates, session, entry time, binding time, release time and version number are written into the binding relationship, and the grid is released or corrected when leaving the room, disconnecting and timeout, or abnormal inspection.

[0033] Step S1032: Obtain the set of online and occupied objects in the virtual room, and the attribute category of each online and occupied object; In one embodiment, objects with abnormal binding records are filtered out by reading the set of online and logged-in objects in the room; For example, an online and occupied object refers to an object that simultaneously meets the following data information requirements without any abnormalities: it has been added to the current room, network, occupied status, and valid grid binding relationship. Step S1033: According to the preset category classification rules, classify the hardware objects in each compartment of the room into categories, map the hardware type of each compartment to the hardware category through the hardware normalization table, generate multiple hardware types, and match the corresponding hardware type according to the hardware type requirement information of the object. Step S1034: Determine whether there is an online and located object in the virtual room that has the same attribute category as the current object. Objects with the same attribute category are objects with the same hardware type.

[0034] In step S103, by classifying hardware objects into categories, the clustering and layout of objects of the same category can be achieved, making the layout of the virtual room more orderly and systematic, improving the realism and comprehensibility of the scene, facilitating quick identification and interaction by users, avoiding blind searching, and greatly improving allocation efficiency; it also ensures the fairness of the placement of new objects, avoiding resource contention and unreasonable allocation; at the same time, it enhances the scalability of the system and can adapt to the placement needs of different types of objects.

[0035] For example, the same attribute category refers to objects with the same hardware type. If the hardware type is different or the category cannot be identified, they are considered to have different hardware types.

[0036] In step S104, if it exists, the position information of the grid occupied by the object with the earliest time sequence is selected as the reference benchmark, and an empty grid is searched in the preset surrounding area of ​​the reference benchmark as a candidate grid. Optionally, in one embodiment, step S104 may include the following sub-steps: Step S1041: If there are multiple objects with the same hardware type in the room, the location information of the grid occupied by the object with the earliest time sequence is selected as the reference benchmark, and the searched free grids in the preset surrounding area of ​​the reference benchmark are selected as candidate grids. For example, selecting the position information of the cell occupied by the earliest object in the time sequence as a reference benchmark can make similar objects stably cluster near the earlier entrants, avoiding the fluctuation of candidate results due to the different nearest objects being calculated each time.

[0037] Step S1042: If no free space is found, the search range is expanded layer by layer from the inside out using the reference benchmark as the center, until a free space is found or it is determined that the space in the virtual room is full.

[0038] For example, the concentric gradient retrieval method uses Manhattan distance to generate concentric circles, but it can also employ any of the following: concentric circle concentric circles generated by Euclidean distance, square concentric circles generated by Chebyshev distance, or customized concentric traversal retrieval based on a custom art placement priority sequence. This concentric gradient retrieval method can continue searching for available cells even when the center or nearest neighbor region is full, improving the utilization rate of limited cells.

[0039] like Figure 2 As shown, the Manhattan distance-generated layer search involves sorting within the same distance circle by directional priority or a stable seed until a cell is successfully occupied or the maximum distance is reached beyond the cell pool boundary. When sorting by directional priority, a pre-defined direction sequence can be used, such as right, left, up, down, upper right, upper left, lower right, and lower left. For candidate cells within the same Manhattan distance, their direction quadrant relative to the current calculation center is first calculated, then sorted by direction sequence, and within the same direction, further sorted by horizontal and vertical offset from the center. To reduce direction offset, a stable seed can be used to rotate the direction sequence within each distance circle. If no free cell is found after exceeding the maximum distance, the search returns without outputting a false success position.

[0040] In step S105, if no such cell exists, the scene center of the virtual room is selected as the center reference, and an empty cell is searched within the preset offset range of the center reference as a candidate cell. Optionally, in one embodiment, step S105 may include the following sub-steps: Step S1051: If there is no online and already positioned object with the same attribute category as the current object in the virtual room: The center of the virtual room scene is selected as the center reference, and the empty grids found within the preset offset range of the center reference are selected as candidate grids. For example, the preset offset range is ±5 of the two-dimensional coordinate offset. This preset offset range can be adjusted to ±N according to the room capacity, map size, or gameplay configuration. Step S1052: If no free space is found, the search range is expanded layer by layer from the inside out using the central reference as the center until a free space is found or it is determined that the space in the virtual room is full.

[0041] For example, the layer gradient retrieval method is the same as the retrieval method in step S1042 above.

[0042] In step S106, a unique occupancy constraint is established, and a pre-write validation is performed on the candidate cells to ensure that the same cell is occupied by only one object, and the same object holds only one valid cell. After successful occupancy, a binding relationship is established between the current object and the cell. Optionally, in one embodiment, step S106 may include the following sub-steps: Step S1061: Establish a unique occupancy constraint and perform pre-write verification on the current object and candidate cells according to the preset verification content; For example, the pre-write validation includes the following: room status is available, the object still belongs to the room and has not left the room, the object is not bound to other cells, the candidate cell belongs to the room, the candidate cell's locking relationship is empty, and the update time has not changed. Step S1062: If any item in the verification content of the current object and the candidate cell fails, it is determined that the candidate cell cannot be used as a usable cell for binding the current object, and the valid cell binding relationship of the object is re-evaluated. Step S1063: If the verification content of both the current object and the candidate cell passes, then the candidate cell is determined to be a usable cell for binding the current object; Step S1064: Use locks or atomic conditions to write placeholders to available cells, ensuring that the same cell is occupied by only one object, and that the same object holds only one valid cell. After successful placement, establish the binding relationship between the current object and the cell.

[0043] For example, the unique occupancy constraint can effectively prevent the same object from holding multiple valid slots, so that the relationship between the object and the slot is one-to-one, that is, the same slot is occupied by only one object, and the same object holds only one valid slot.

[0044] For example, by establishing unique occupancy constraints and strict pre-write verification, the problems of grid preemption and duplicate binding in high-concurrency scenarios can be effectively avoided, ensuring the uniqueness and accuracy of grid allocation, ensuring that the same grid is occupied by only one object, and the same object holds only one valid grid, thus eliminating grid resource conflicts and waste at the source and greatly improving the stability and reliability of the system; through the verification mechanism and resource management process, abnormal situations can be detected and handled in a timely manner, ensuring the efficient flow and rational use of grid resources, and improving resource utilization. After step S106, there is a step S107. In step S107, after the occupancy is successful, the binding relationship between the current object and the grid is output and saved. The binding relationship between the current object and the grid remains unchanged during the room period. When the current object leaves the room or when there is an abnormal binding relationship, the corresponding cell under the current object's binding relationship is automatically released, thereby completing the resource reclamation of the cell.

[0045] For example, when the current object leaves the room, ends its activity, times out, or is removed from the room, the corresponding grid under the current object's binding relationship is automatically released. The binding relationship between the object and the grid is checked through periodic inspections. If the binding relationship between the object and the grid is found to be inconsistent, the binding relationship between the object and the grid is automatically released, and the grid binding status is updated.

[0046] By outputting and saving the binding relationship between the current object and its cell, the system can effectively ensure that the object's position remains fixed during its stay in the room, avoiding frequent changes that could affect user experience and interactive positioning, and providing a stable user environment. When the current object leaves the room or when there is an abnormal binding relationship, the system automatically reclaims the cell resources of the object that has left the room or is abnormal, improving resource utilization and avoiding resource waste. Through a timed inspection mechanism, abnormal bindings can be detected and corrected in a timely manner, enhancing system stability, ensuring continuous and reliable system operation, reducing manual maintenance costs, and improving the system's automation level.

[0047] It should be noted that although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that these steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps. Furthermore, it is readily understood that these steps may be executed synchronously or asynchronously, for example, in multiple modules / processes / threads.

[0048] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0049] In some possible implementations, various aspects of the present invention may also be implemented as a computer program product comprising a computer program or instructions which, when run on a terminal device, cause the terminal device to perform the steps described in the above-described section of this specification, namely, a method for allocating object placement in a virtual room, according to various exemplary embodiments of the present invention.

[0050] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the appended claims.

Claims

1. A method for assigning positions of objects within a virtual room, characterized in that, include: Configure a grid pool for the virtual room, the grid pool including multiple grids, each grid having location information and occupancy status information; In response to an object's request to enter the virtual room, determine whether the object already has a valid grid binding relationship based on the occupancy status information of each grid. When there is no valid grid binding relationship, determine whether there is an online object with the same attribute category as the current object that has been placed in the virtual room; If it exists, the position information of the grid occupied by the earliest time sequence object is selected as the reference benchmark, and an empty grid is searched in the preset surrounding area of ​​the reference benchmark as a candidate grid. If it does not exist, the scene center of the virtual room is selected as the center reference, and an empty grid is searched as a candidate grid within a preset offset range of the center reference. Establish a unique occupancy constraint, perform pre-write verification on the candidate cell to ensure that the same cell is occupied by only one object, the same object holds only one valid cell, and establish a binding relationship between the current object and the cell after successful occupancy.

2. The method for assigning objects within a virtual room according to claim 1, characterized in that, The response to the object's request to enter the virtual room also includes: When the object already has a valid cell binding relationship, determine whether the valid cell has an abnormal binding relationship; If it does not exist, then the cell will be reused; If it exists, then the cell is deemed invalid, meaning there is no valid cell binding relationship.

3. The method for assigning positions of objects in a virtual room according to claim 2, characterized in that: The process of determining whether there is an online and already located object with the same attribute category as the current object in the virtual room includes the following steps: Obtain the attribute category of the object, where the attribute category contains hardware type requirement information; Obtain the set of online and occupied objects in the virtual room, and the attribute categories of each online and occupied object; According to the preset category classification rules, the hardware objects in each of the compartments in the room are classified into categories, generating multiple hardware types. The hardware type requirement information of the object is used to match the corresponding hardware type. Determine whether there is an online and located object in the virtual room that has the same attribute category as the current object. The object with the same attribute category is an object with the same hardware type.

4. The method for assigning positions of objects in a virtual room according to claim 3, characterized in that: If there is an online object with the same attribute category as the current object that has already been placed in the virtual room: The location information of the grid occupied by the earliest object in the time sequence is selected as a reference benchmark, and the free grids searched within the preset surrounding area of ​​the reference benchmark are selected as candidate grids. If no available space is found, the search range is expanded layer by layer from the inside out using the reference benchmark as the center, until an available space is found or it is determined that the space in the virtual room is full.

5. The method for assigning positions of objects in a virtual room according to claim 4, characterized in that: If there is no online and already located object with the same attribute category as the current object in the virtual room: The scene center of the virtual room is selected as the central reference, and the empty grids found within the preset offset range of the central reference are selected as candidate grids. If no available space is found, the search range is expanded layer by layer from the inside out using the central reference as the center until an available space is found or it is determined that the space in the virtual room is full.

6. The method for assigning positions of objects in a virtual room according to claim 5, characterized in that, Performing pre-write verification on the candidate cell positions includes: Establish a unique occupancy constraint and perform pre-write verification on the current object and candidate cells based on the preset verification content; If any item in the verification content of the current object and the candidate cell fails, the candidate cell is determined to be unusable as a cell for binding the current object, and the valid cell binding relationship of the object is re-evaluated. If the validation of both the current object and the candidate cell passes, then the candidate cell is determined to be a usable cell for binding the current object. The available cells are written to by locking or atomic conditions to ensure that only one object occupies the same cell, and that the same object holds only one valid cell. After successful occupancy, a binding relationship is established between the current object and the cell.

7. The method for assigning positions of objects in a virtual room according to claim 6, characterized in that: After successful reservation, the following also applies: Output and save the binding relationship between the current object and the cell. The binding relationship between the current object and the cell remains fixed during the room period. When the current object leaves the room or when there is an abnormal binding relationship, the corresponding cell under the current object's binding relationship is automatically released, thereby completing the resource reclamation of the cell.

8. The method for assigning positions of objects in a virtual room according to claim 7, characterized in that: The aforementioned layer gradient retrieval method can be any one of the following: layer retrieval based on Manhattan distance, concentric circle layer retrieval based on Euclidean distance, square layer retrieval based on Chebyshev distance, or customized layer traversal retrieval based on a custom art placement priority sequence.

9. The method for assigning positions of objects in a virtual room according to claim 8, characterized in that: The preset offset range of the central reference is within ±5 of the two-dimensional coordinate offset of the central reference.

10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the processor, they implement the steps of the method for allocating the placement of objects in a virtual room according to any one of claims 1 to 9.