Virtual object layout method and device, medium, electronic equipment and program product
By receiving spatial description information of the target space and determining the virtual object and its spatial relationship based on the layout model, the problems of virtual object layout discontinuity and dependence on training data are solved, and personalized, diversified and accurate layout generation is achieved.
Patent Information
- Application Number
- CN202411836518.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-03-21
AI Technical Summary
When generating virtual object layouts, the existing technology has the problem of virtual objects being discontinuous at different angles, and deep learning-based methods require a large amount of training data, which heavily relies on data quality.
By receiving spatial description information of the target space, determining the layout virtual objects and their spatial relationships based on the layout model, generating layout information to ensure that the location information of the virtual object meets its spatial relationship and avoiding overlap or suspended placement.
It realizes user-defined layout, improves the personalization and diversity of layout, ensures the accuracy and continuity of layout information, and reduces dependence on training data.
Smart Images

Figure CN119668763A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a virtual object layout method, device, medium, electronic device and program product. Background Art
[0002] Spatial layout design can provide users with more intuitive and rich display design effects. With the development of computer technology, layout generation can be performed through computer technology to quickly provide users with more diverse designs. In related technologies, spatial layout generation can be performed based on 3D Gaussian or deep learning reconstruction technology. Reconstruction through 3D Gaussian requires high virtual object resources and is time-consuming, and due to the limited viewing angle of the input virtual object image, the reconstructed spatial layout may be discontinuous at other angles. The reconstruction technology based on deep learning requires the collection of existing layout designs in advance and training based on the layout designs. The layout design generated in this scenario is heavily dependent on the quality of the training data. Summary of the invention
[0003] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0004] In a first aspect, the present disclosure provides a virtual object layout method, the method comprising: receiving a first text, where the first text is used to represent spatial description information of a target space; Determining, based on the first text and the object information of the candidate virtual objects corresponding to the target space, a layout virtual object for laying out the target space and a spatial relationship between each of the layout virtual objects based on a layout model; Layout information corresponding to the target space is generated according to the object information of the layout virtual objects and the spatial relationship of the layout virtual objects, wherein the layout information includes position information of each of the layout virtual objects.
[0005] In a second aspect, the present disclosure provides a virtual object layout device, the device comprising: A receiving module, configured to receive a first text, wherein the first text is used to represent the spatial description information of the target space; A first determination module, configured to determine, based on the first text and object information of the candidate virtual objects corresponding to the target space, a layout virtual object for laying out the target space and a spatial relationship between each of the layout virtual objects based on a layout model; A generating module is used to generate layout information corresponding to the target space according to the object information of the layout virtual objects and the spatial relationship of the layout virtual objects, wherein the layout information includes the position information of each of the layout virtual objects.
[0006] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when the computer program is executed by a processing device.
[0007] In a fourth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.
[0008] In a fifth aspect, the present disclosure provides a computer program product, including a computer program, which implements the steps of the method described in the first aspect when executed by a processor.
[0009] In the above technical solution, the user can be supported to input the spatial description information of the target space, so that the user can customize the layout of the target space, improve the scope of application of the method described in the present disclosure, and improve the personalization and diversity of the virtual object layout. In addition, in the technical solution, when generating the layout of the target space, the layout virtual objects and the spatial relationship of the layout virtual objects are determined based on the spatial description information and the candidate virtual objects, and then the position information of the layout virtual objects is determined based on the spatial relationship. Then, the position information of the layout virtual objects satisfies its spatial relationship, thereby avoiding the overlap or suspended placement of different layout virtual objects, ensuring the continuity between different layout virtual objects, and improving the accuracy and availability of the generated layout information.
[0010] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 is a flowchart of a virtual object layout method provided according to an embodiment of the present disclosure.
[0012] Figure 2A flowchart is provided according to an embodiment of the present disclosure for determining, based on a layout model, layout virtual objects for laying out the target space and the spatial relationship between each of the layout virtual objects according to the first text and object information of candidate virtual objects corresponding to the target space.
[0013] Figure 3 The present invention is a block diagram of a virtual object layout device provided according to an embodiment of the present disclosure.
[0014] Figure 4 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0015] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0016] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0017] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0018] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0019] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0020] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0021] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0022] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0023] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0024] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0025] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0026] Figure 1 As shown, it is a flowchart of a virtual object layout method provided according to an embodiment of the present disclosure, as shown Figure 1 As shown, the method may include: In step 11, a first text is received, where the first text is used to represent space description information of a target space.
[0027] The first text may be a text input by the user to describe the characteristics of the target space. For example, the space description information may include the layout characteristics of the target space. For example, the user may customize the layout based on his / her needs. The first text may include the virtual objects that need to appear in the target space customized by the user and the user's requirements for the location of the virtual objects. For another example, the space description information may include the style characteristics of the target space. For example, the user may describe the style of the target space based on his / her needs, such as a European-style living room.
[0028] In step 12, according to the first text and the object information of the candidate virtual objects corresponding to the target space, the layout virtual objects for layout of the target space and the spatial relationship between each layout virtual object are determined based on the layout model.
[0029] In some embodiments, each virtual object used for layout may be analyzed and feature extracted in advance to generate object information of the virtual object to obtain a virtual object set, achieve a unified description of multiple virtual objects, and improve the management efficiency and configuration efficiency of the virtual objects to be laid out.
[0030] As an example, the candidate virtual objects corresponding to the target space may be various virtual objects in a virtual object set, wherein the virtual objects in the virtual object set may include furniture, office supplies, daily necessities, etc., which may be pre-configured based on actual application scenarios.
[0031] As an example, the layout model can be implemented based on a large language model LLM (Large Language Model). For example, a prompt text can be constructed based on the first text and the object information of the candidate virtual objects, so that the layout model performs data processing and analysis to determine the layout virtual objects among the candidate virtual objects, and determine the spatial relationship of the layout virtual objects, thereby determining the object relationship topology in the target space.
[0032] In step 13, layout information corresponding to the target space is generated according to the object information of the layout virtual objects and the spatial relationship of the layout virtual objects, wherein the layout information includes the position information of each of the layout virtual objects, and the position information may be the coordinates of the layout virtual objects in the target space.
[0033] Among them, in step 12, the layout virtual objects to be laid out in the target space and their spatial relationships can be determined. Then, in this step, the layout virtual objects can be laid out in the target space based on the spatial relationship and the spatial area range of the target space to determine the coordinates of each layout virtual object in the target space, so as to render the layout virtual objects and obtain the layout of the target space.
[0034] Therefore, in the above technical solution, it is possible to support users to input spatial description information of the target space, so that users can customize the layout of the target space, improve the scope of application of the method described in the present disclosure, and improve the personalization and diversity of the virtual object layout. In addition, in the technical solution, when generating the layout of the target space, the layout virtual objects and the spatial relationship of the layout virtual objects are determined based on the spatial description information and the candidate virtual objects, and then the position information of the layout virtual objects is determined based on the spatial relationship. Then, the position information of the layout virtual objects satisfies their spatial relationship, thereby avoiding the overlap or suspended placement of different layout virtual objects, ensuring the continuity between different layout virtual objects, and improving the accuracy and availability of the generated layout information.
[0035] In some embodiments, the candidate virtual objects corresponding to the target space are determined by: The candidate virtual object is determined based on matching the first text with object information of multiple virtual objects in a preset virtual object set.
[0036] For example, a preliminary screening of virtual objects may be performed from a virtual object set based on a layout requirement input by a user, so as to screen out virtual objects that can meet the customization requirements of the user from the virtual object set as candidate virtual objects.
[0037] Therefore, in the present disclosure, virtual objects in a virtual object set are preliminarily screened based on text to obtain a candidate virtual object set, thereby effectively reducing the number of virtual objects that need to be analyzed when the layout model generates spatial relationships, thereby reducing the length of the context input into the layout model, and while reducing the token overhead required for the layout model, it can avoid the illusion problem introduced by the excessively long context in the LLM model, further improving the efficiency and accuracy of spatial relationship generation of layout virtual objects, and enhancing the user experience.
[0038] In some embodiments, the object information of the virtual objects of the virtual object set includes a location type, and the location type is used to indicate the layout position of the virtual object, that is, the position where the virtual object needs to be placed. Virtual objects of the same location type constitute a virtual object subset of the location type, wherein the location type can be set based on actual usage requirements. For example, the value of the location type may include a ground type, a wall type, a top type, and a support type, wherein the ground type is used to indicate that the virtual object needs to be placed on the ground, such as a table; the wall type is used to indicate that the virtual object needs to be placed on the wall, such as a hanging painting; the top type is used to indicate that the virtual object needs to be placed in the top area of the space, such as a chandelier; the support type is used to indicate that the virtual object needs to be placed on other virtual objects, and other virtual objects implement support for the virtual object, such as a computer, which is placed on a table, and the table serves as a supporting virtual object for the computer. Thus, the virtual objects in the virtual object set can be divided based on the location type to construct multiple virtual object subsets. For example, virtual object subset A1 includes various virtual objects of ground type, virtual object subset A2 includes various virtual objects of wall type, virtual object subset A3 includes various virtual objects of top type, and virtual object subset A4 includes various virtual objects of support type. Then, corresponding virtual objects can be obtained for each position type.
[0039] Accordingly, the determining the candidate virtual object based on matching the first text with object information of multiple virtual objects in a preset virtual object set may include: For each of the location types, matching is performed based on the first text and object information of virtual objects in a subset of virtual objects of the location type, and the matched virtual objects are used as matching virtual objects of the location type, wherein the candidate virtual objects include matching virtual objects of each of the location types.
[0040] In some embodiments, the first text may be feature encoded to obtain a feature vector of the first text, and the object information of the virtual object may be feature encoded to obtain a feature vector of the virtual object. As an example, in order to improve the efficiency of matching candidate virtual objects, the feature vectors of each virtual object may be stored in a database, and then the feature vector of the virtual object may be directly obtained from the database for matching when matching, without the need to repeatedly encode the object information of the virtual object, thereby improving the efficiency of matching. Further, similarity calculation may be performed based on the feature vector of the first text and the feature vector of each virtual object to obtain the similarity between the first text and each virtual object. As an example, a virtual object whose similarity exceeds a preset similarity threshold may be used as a matched virtual object. As another example, the virtual objects whose similarity is sorted in descending order may be used as the matched virtual objects.
[0041] In some embodiments, keywords may be extracted from the first text, and then the keywords may be matched with object information of the virtual object, and the virtual object whose object information contains the keywords may be used as the matched virtual object.
[0042] After determining the matching virtual objects of each position type, the union of the matching virtual objects of each position type can be used as the candidate virtual object. Thus, through the above technical solution, the virtual objects in the virtual object set can be divided and managed based on the position type, thereby effectively reducing the complexity of virtual object management in the virtual object set, improving the screening efficiency of candidate virtual objects, and ensuring the comprehensiveness of candidate virtual objects to a certain extent. The position type of the candidate virtual object can also provide data support for the subsequent generation of layout information.
[0043] In some embodiments, the object information of the plurality of virtual objects in the preset virtual object set is determined by: A virtual object image of each of the virtual objects is acquired.
[0044] The virtual object image of the virtual object may be an image configured by a manager or a user, or a virtual object image obtained from a configured image source.
[0045] Afterwards, feature extraction is performed on the virtual object image to obtain a structured feature representation of the virtual object, wherein the structured feature representation includes preset features and feature values of the features, and the features include a position type for representing a layout position of the virtual object.
[0046] As an example, the virtual object image can be extracted based on the common image processing method in the art, or the feature extraction of the virtual object image can be performed based on the visual understanding technology in the art, and the present disclosure does not limit this. Among them, the features of the virtual object to be extracted can be pre-set, such as the location type location, color color, style style, name title, suitable space for layout, size size, shape shape, category category, etc. The feature can be set based on the actual application scenario, and the present disclosure does not limit this. In this step, the feature extraction of the virtual object image can be performed to obtain the feature value of the virtual object under the above features.
[0047] According to the structured feature representation, object information of the virtual object is determined.
[0048] As an example, the structured feature representation of the virtual object can be directly used as the object information of the virtual object to achieve unified management of the object information of the virtual object. As another example, in order to further improve the accuracy and effectiveness of the object information, the structured feature representation can be verified, and the structured feature representation after verification can be used as the object information of the virtual object.
[0049] As an example, the structured feature representation of the virtual object and the virtual object image can be output and displayed together, so that the verification personnel can determine whether the structured feature representation is accurate. If it is accurate, it can be confirmed and used as the object information of the virtual object. If it is inaccurate, the feature value can be modified, and the modified structured feature representation can be used as the object information of the virtual object.
[0050] Therefore, through the above technical scheme, a unified and standard expression of object information of different virtual objects can be achieved through structured feature representation, which is convenient for unified management and addition of virtual objects in the virtual object set, and for rapid screening of virtual objects in the virtual object set, thereby improving the screening efficiency and accuracy of candidate virtual objects.
[0051] In some embodiments, the layout model includes a first model and a second model, and an exemplary implementation method of determining the layout virtual objects for laying out the target space and the spatial relationship of each of the layout virtual objects based on the layout model according to the first text and the object information of the candidate virtual objects corresponding to the target space is as follows: Figure 2 As shown, this step may include: In step 21, the first text and first information of the candidate virtual object are input into the first model to determine the layout virtual object for layout of the target space, wherein the first information is part or all of the object information.
[0052] Among them, the first model can be an LLM model, which is used to design the candidate virtual objects as a whole based on the first text, and further select the layout virtual objects that need to be designed from the candidate virtual objects. As an example, the first information can be all of the object information, and the first text and the object information of the candidate virtual objects can be input into the first model. As another example, the first information can be part of the object information, and the first information can be configured from the object information based on the actual application scenario. If the first model is used to select the layout virtual object, the first information can be the name information of the candidate virtual object, and the key information of the candidate virtual object can be included in the name information to provide data reference for the first model. If the candidate virtual object is a sofa, its object information can include location type, size information and name information, etc. If the name information is "beige three-person wooden sofa", the first text and the complete object information can be input into the first model, or the first text and the name information can be input into the first model so that the first model determines the layout virtual object.
[0053] As an example, a prompt text may be constructed based on the first text and the first information of the candidate virtual objects to be input into the first model so that the first model performs analysis based on the user's needs to select from the candidate virtual objects.
[0054] As an example, in this step, the candidate virtual objects of each position type can be selected separately. For example, for each position type, the first text and the first information of the candidate virtual objects of the position type can be input into the first model to determine the layout virtual objects of the position type. For example, the candidate virtual objects of the ground type are selected through the first model, and the layout virtual objects of the ground type are determined to be tables and sofas. The candidate virtual objects of the wall type are selected through the first model, and the layout virtual objects of the wall type are determined to be hanging paintings. The candidate virtual objects of the top type are selected through the first model, and the layout virtual objects of the top type are determined to be chandeliers. The candidate virtual objects of the support type are selected through the first model, and the layout virtual objects of the support type are determined to be desk lamps placed on the table.
[0055] In step 22, the first text and the second information of the layout virtual object are input into the second model to obtain the spatial relationship of each of the layout virtual objects, wherein the second information is part or all of the object information, and the spatial relationship includes the global spatial relationship of the layout virtual object in the target space, or the spatial relationship includes the global spatial relationship of the layout virtual object in the target space, and the relative spatial relationship between the layout virtual object and other layout virtual objects.
[0056] Among them, the second model can be implemented based on the LLM model, which is used to further determine the spatial relationship topology of the layout virtual objects. As an example, the second information can be all of the object information, and the object information of the first text and the layout virtual object can be input into the second model. As another example, the first information can be part of the object information, and the first information can be configured from the object information based on the actual application scenario. The second model is used to determine the spatial relationship of the layout virtual objects. In this process, it is necessary to pay attention to the size information of each layout virtual object. The second information can be the size information of the candidate virtual object to provide data reference for the second model.
[0057] As an example, optional spatial relationships can be pre-set. For example, a spatial relationship can include a global spatial relationship global, which can include a sub-type relationship. For example, a sub-type relationship can be edge edge, which is used to indicate that the virtual object is arranged at the edge of the space close to the wall. The sub-type relationship can also be middle middle, which is used to indicate that the virtual object is arranged near the center of the space, and the sub-type relationship can also be other other, which is used to indicate that the virtual object can be arranged at any position in the space. For another example, a spatial relationship can also include a relative spatial relationship, which is used to indicate the relationship between different virtual objects. For example, it can include a position relationship position, which can further include a sub-type relationship. For example, the sub-type relationship can be left of, virtual object W1, indicating that the current virtual object is arranged on the left side of virtual object W1, and the sub-type relationship can be right of, virtual object W1, indicating that the current virtual object is arranged on the right side of virtual object W1. Among them, the above-mentioned spatial relationship and sub-type relationship are exemplary descriptions, which can be set based on actual applications and are not limited to the present disclosure.
[0058] Therefore, the layout virtual objects can be determined through the first model, and the spatial relationship of the layout virtual objects can be further determined through the second model, which can not only realize the rapid determination of the layout virtual objects, but also reduce the amount of data processed by the second model, thereby improving the generation efficiency and accuracy of spatial relationships.
[0059] As an example, the object information of each of the layout virtual objects includes a position type, and the position type is used to indicate the layout position of the layout virtual object; Accordingly, inputting the first text and the second information of the layout virtual object into the second model to obtain the spatial relationship of each of the layout virtual objects may include: Determine layout virtual objects of the same position type as the layout virtual objects, where the position type is a ground type and / or a wall type.
[0060] Taking the ground type as an example, in this step, layout virtual objects of the ground type may be obtained from the determined layout virtual objects based on the object information of the layout virtual objects, such as the sofa and table in the above example.
[0061] Afterwards, the first text and the second information of the layout virtual object of the same location type are input into the second model, so that the second model determines the spatial relationship of the layout virtual object of the location type from the spatial relationship associated with the location type.
[0062] For example, a prompt text can be constructed based on the second information of the layout virtual object of the first text and the ground type to input the second model, and the format of the output data of the second model can be constrained in the prompt text. Among them, the spatial relationship associated with the ground type can be pre-set, and can be set based on the analysis of the actual application scenario. For example, the ground type can include global spatial relations, distance relations, position relations, alignment relations, and orientation relations, etc., and each relationship can further include sub-type relations. For example, the orientation relationship can include facing relations face to and same-direction relations face same as, etc., which are not limited in this disclosure. For another example, the spatial relationship associated with the wall type can also be pre-set, such as the relationship limitation of the height above the ground, such as the clock is at a higher position from the ground; or it can be the relationship limitation of the height above the ground and the specific wall, such as hanging a painting above the dining table against the wall and closer to the ground.
[0063] The spatial relationship associated with the ground type and the spatial relationship associated with the wall type can be stored based on the spatial relationship library lib. Taking the ground type as an example, when the second model performs data analysis based on the input first text and the second information of the layout virtual object of the ground type, the spatial relationship associated with the ground type in the spatial relationship library can be combined for selection, thereby determining the spatial relationship of the layout virtual object of each ground type.
[0064] For example, the determined spatial relationship is expressed as follows: {Sofa 1: type: global; constraint: edge; Table 1: type: position; constraint: in front of; target: sofa 1; type: rotation; constraint: face to; target: sofa 1; } The above spatial relationship may indicate that sofa 1 is placed at the edge of the target space, and table 1 is placed in front of sofa 1 and faces sofa 1 .
[0065] Therefore, through the above technical scheme, the spatial relationship of the layout virtual objects of the ground type and the wall type can be determined through the second model. On the one hand, it is convenient for the subsequent determination of the coordinates of the layout position. On the other hand, the placement of the layout virtual objects can be realized based on the spatial relationship to avoid overlapping placement between different layout virtual objects, thereby ensuring the accuracy of the generated layout information.
[0066] As an example, after determining the layout virtual object, the spatial relationship can be directly generated based on the second model and the object information of the layout virtual object. As another example, before the step of inputting the first text and the second information of the layout virtual object into the second model to obtain the spatial relationship of each of the layout virtual objects, the method may also include: The layout virtual object is output.
[0067] The image of the layout virtual object may be output for display to the user, or the name of the layout virtual object may be output for display to the user.
[0068] In response to receiving a second text input by a user for the layout virtual object, a new layout virtual object is determined based on the second text.
[0069] Among them, if the user believes that the displayed layout virtual object meets his customization needs, a confirmation message can be input to determine the layout virtual object for subsequent layout. If the user believes that the displayed layout virtual object does not meet his customization needs, a second text can be input to add descriptive information for layout. If the user wants to add another computer to the desktop, a description of the computer can be added to the second text. In response to receiving the second text, the updated virtual object can be determined based on the second text and the object information of multiple virtual objects in the preset virtual object set. Among them, the determination method of the updated virtual object is the same as the determination method of the candidate virtual object described above, which will not be repeated here. Further, the second text and the first information of the updated virtual object can be input into the first model so that the first model selects the layout virtual object again and outputs the layout virtual object. After the user confirms, the output layout virtual object is used as the new layout virtual object.
[0070] Therefore, through the above technical solution, interaction with users can be achieved during the layout generation process to improve users' interest in participation. At the same time, layout virtual objects that meet user needs can also be determined, providing effective data support for improving the matching degree between the final generated layout information and user needs, and to a certain extent avoiding the waste of computing resources caused by layout based on layout products that do not meet user needs.
[0071] In some embodiments, the object information of each of the layout virtual objects includes a position type, and the position type is used to indicate a layout position of the layout virtual object.
[0072] Accordingly, generating layout information corresponding to the target space according to the object information of the layout virtual objects and the spatial relationship of the layout virtual objects may include: For a first virtual object whose position type is a ground type in the layout virtual objects, taking the spatial relationship of the first virtual object as a constraint condition, and solving in the spatial coordinates of the target space based on the priority order of the spatial relationship of the first virtual object and the object information of the first virtual object, to obtain candidate layout information of the first virtual object, wherein each of the candidate layout information includes the position information of the first virtual object; Based on the weight information of the spatial relationship, the layout information of the first virtual object is determined from the candidate layout information.
[0073] Among them, the priority order of the spatial relationship of the first virtual object can be the output order of the spatial relationship of the first virtual object, such as the example described above, "Sofa 1: type: global; constraint: edge;", "Table 1: type: position; constraint: in front of; target: Sofa 1;", "Table 1: type: rotation; constraint: face to; target: Sofa 1;", the priorities are successively reduced. In this embodiment, the above spatial relationship can be used as a constraint condition, and the priority order of the spatial relationship can be used as the constraint priority, so as to combine the spatial coordinates of the target space and the object information of the layout virtual object to solve, and determine the coordinates of each layout virtual object when the layout virtual object is placed in the target space. Among them, it can be solved by the Constraint-Based Layout algorithm, or it can be solved by the DFS (Depth-First-Search) algorithm. The above algorithm is a general algorithm in the field, and the present disclosure will not repeat it here. Moreover, in the above-mentioned solution process, since the first virtual objects are all ground-type virtual objects, the value of their Y-axis is determined, and only the coordinates of the X-axis and Z-axis need to be solved, which can further reduce the complexity of the solution. Among them, the Y-axis is used to represent the height axis of the target space, the X-axis is used to represent the left-right axis in the horizontal plane of the target space, and the Z-axis is used to represent the front-back axis in the horizontal plane of the target space. The X-axis and the Z-axis are perpendicular to each other. The left-right direction and the front-back direction can be specified based on the actual application scenario to determine the coordinate system and coordinate origin of the target space.
[0074] As an example, the weight information of each spatial relationship can be set based on the actual application scenario. Accordingly, for each candidate layout information, the sum of the weight information of the spatial relationships satisfied in the candidate layout information can be used as the layout score of the candidate layout information. For example, the candidate layout information with the highest score can be used as the layout information of the first virtual object, or the top M candidate layout information after sorting the layout scores from high to low can be used as the layout information of the first virtual object, so as to provide users with a variety of layout recommendations.
[0075] In some embodiments, generating layout information corresponding to the target space according to the object information of the layout virtual objects and the spatial relationship of the layout virtual objects may further include: If there is a second virtual object whose position type is a support type in the layout virtual objects, the position information of the second virtual object is determined based on the coordinates of the supporting virtual object in the spatial relationship of the second virtual object and the object information of the supporting virtual object and the second virtual object respectively, wherein the spatial relationship of the second virtual object includes the relative position information between the second virtual object and the supporting virtual object, and the supporting virtual object is one of the first virtual object or the second virtual object.
[0076] Among them, when determining the second virtual object of the support type, the supporting virtual object corresponding to the second virtual object is also synchronously determined. For example, in the above example, the table lamp is set on the table. By determining the layout information of the first virtual object, the coordinates of the table can be determined. Then, the coordinates of the table lamp can be determined based on the coordinates of the table and the table lamp and the object information of the table. If the table lamp is set on the table, the Y-axis coordinate corresponding to the table lamp can be determined based on the height information in the size of the table, and the X-axis and Z-axis coordinates of the table lamp are within the X-axis and Z-axis coordinates corresponding to the size of the table.
[0077] If further, the table lamp is used as a supporting virtual object and a pendant is provided on the table lamp, after the coordinates of the table lamp are determined, the coordinates of the pendant can be further determined based on the same method as described above.
[0078] Therefore, the coordinates of the second virtual object of the support type can be quickly determined in the above manner, which improves the efficiency of determining the layout information and avoids the situation where the virtual objects are suspended or overlapped, thereby ensuring the accuracy and effectiveness of the generated layout information.
[0079] In some embodiments, if there is a third virtual object whose position type is a wall type in the layout virtual objects, the position information of the third virtual object is determined based on the spatial coordinates of the target space and the spatial relationship and object information of the third virtual object.
[0080] The spatial relationship of the third virtual object can be limited by the height from the ground, such as the clock being at a higher position from the ground; or it can be limited by the height from the ground and a specific wall, such as a painting hanging above the dining table against the wall and closer to the ground.
[0081] For the third virtual object of the wall type, its X-axis and Z-axis coordinates must be in the coordinates corresponding to the wall, and the X-axis and Z-axis coordinates of the wall can be determined based on the coordinates of the target space. Then, the X-axis and Z-axis coordinates of the third virtual object can be determined based on the spatial information of the third virtual object, and then the Y-axis coordinate can be determined in combination with the coordinates of the target space and the object information. This can further simplify the calculation complexity of the layout information and improve the accuracy of the layout information.
[0082] In some embodiments, if there is a fourth virtual object of top type in the layout virtual objects, the position information of the fourth virtual object is determined based on the spatial coordinates of the target space and the object information of the fourth virtual object.
[0083] Among them, if the fourth virtual object of the top type is set at the top of the target space, the coordinates of its top surface can be determined based on the spatial coordinates of the target space, and then the coordinates of the fourth virtual object can be determined based on the object information of the fourth virtual object and the positional relationship of the top surface. For example, the center position of the fourth virtual object on the top surface can be pre-set, and the X-axis and Z-axis coordinates of the center position can be determined based on the spatial coordinates of the target space, and then the Y-axis coordinate can be determined in combination with the object information of the fourth virtual object, thereby realizing the rapid determination of the position information of the virtual object and reducing the amount of data calculation required in the layout generation process.
[0084] In some embodiments, before the step of generating layout information corresponding to the target space according to the object information of the layout virtual objects and the spatial relationship of the layout virtual objects, the method may further include: Output the spatial relationship of each of the layout virtual objects. The spatial relationship of the layout virtual objects can be output for confirmation by the user. As an example, the objects and relationship types in the relative position relationship in the spatial relationship can be displayed in a drop-down menu, such as table 1: type: position; constraint: in front of; target: sofa 1, where in front of and sofa 1 can be displayed in a drop-down menu so that the user can select other spatial relationship settings based on their needs.
[0085] In response to receiving an editing operation of the user on the spatial relationship, the edited spatial relationship is used as a new spatial relationship of the layout virtual object.
[0086] For example, the user can click in front of to display all subtype relationships under the selectable position. If the user can select behind of, a new spatial relationship can be generated, namely, table 1: type: position; constraint: behind of; target: sofa 1.
[0087] Therefore, through the above technical solution, interaction with users can be achieved during the layout generation process to increase users' interest in participation. At the same time, it can also be determined that the spatial relationship between layout virtual objects meets user needs, providing effective data support for improving the matching degree between the final generated layout information and user needs.
[0088] In some embodiments, there are multiple layout information corresponding to the target space; accordingly, the method may further include: Output a layout preview image corresponding to each of the layout information.
[0089] The layout preview image can be obtained by performing image rendering based on the position information and object information of the layout virtual object in each layout information, and output and displayed to the user so that the user can confirm which layout meets his needs.
[0090] In response to receiving a user's selection operation, the layout information corresponding to the layout preview image indicated by the selection operation is used as the target layout information. The user can select the layout preview image by entering the number of the layout preview image, or by clicking the corresponding layout preview image. If the user selects the first layout preview image, the layout information corresponding to the layout preview image can be used as the target layout information for finally generating the layout of the target space.
[0091] Furthermore, rendering is performed based on the target layout information to obtain a layout corresponding to the target space.
[0092] The rendering may be performed using a common rendering technique in the art, which is not limited in the present disclosure.
[0093] Therefore, through the above technical solution, a variety of selectable layouts can be provided to users, and displayed through layout preview images, thereby improving users' intuitive perception of different layouts, further improving the matching degree between the layout corresponding to the target space and user needs, and enhancing the user experience.
[0094] Based on the same inventive concept, the present disclosure also provides a virtual object layout device, such as Figure 3 As shown, the device 10 comprises: A receiving module 100 is used to receive a first text, where the first text is used to represent the spatial description information of the target space; A first determination module 200 is used to determine, based on the first text and the object information of the candidate virtual objects corresponding to the target space, the layout virtual objects for layout of the target space and the spatial relationship between each of the layout virtual objects based on the layout model; The generating module 300 is used to generate layout information corresponding to the target space according to the object information of the layout virtual objects and the spatial relationship of the layout virtual objects, wherein the layout information includes the position information of each of the layout virtual objects.
[0095] Optionally, the layout model includes a first model and a second model, and the first determining module includes: A first processing submodule, configured to input the first text and first information of the candidate virtual object into the first model, and determine a layout virtual object for layout of the target space, wherein the first information is part or all of the object information; A second processing submodule is used to input the first text and second information of the layout virtual object into the second model to obtain the spatial relationship of each of the layout virtual objects, wherein the second information is part or all of the object information, and the spatial relationship includes the global spatial relationship of the layout virtual object in the target space, or the spatial relationship includes the global spatial relationship of the layout virtual object in the target space, and the relative spatial relationship between the layout virtual object and other layout virtual objects.
[0096] Optionally, the object information of each of the layout virtual objects includes a position type, and the position type is used to indicate a layout position of the layout virtual object; The second processing submodule includes: A first determining submodule is used to determine layout virtual objects of the same position type among the layout virtual objects, where the position type is a ground type and / or a wall type; The third processing submodule is used to input the first text and the second information of the layout virtual object of the same location type into the second model, so that the second model determines the spatial relationship of the layout virtual object of the location type from the spatial relationship associated with the location type.
[0097] Optionally, the device further comprises: A first output module, configured to output the layout virtual object before the second processing submodule inputs the first text and the second information of the layout virtual object into the second model to obtain the spatial relationship of each of the layout virtual objects; The second determining module is configured to determine a new layout virtual object based on the second text in response to receiving a second text input by a user for the layout virtual object.
[0098] Optionally, the object information of each of the layout virtual objects includes a position type, and the position type is used to indicate a layout position of the layout virtual object; The generation module comprises: a fourth processing submodule, for obtaining candidate layout information of a first virtual object whose position type is a ground type in the layout virtual objects, taking the spatial relationship of the first virtual object as a constraint condition, and solving in the spatial coordinates of the target space based on the priority order of the spatial relationship of the first virtual object and the object information of the first virtual object, wherein each of the candidate layout information includes the position information of the first virtual object; The second determining submodule is configured to determine the layout information of the first virtual object from the candidate layout information based on the weight information of the spatial relationship.
[0099] Optionally, the generating module further includes: a third determination submodule, configured to determine, if there is a second virtual object of a support type position type in the layout virtual objects, the position information of the second virtual object based on the coordinates of the supporting virtual object in the spatial relationship of the second virtual object and the object information of the supporting virtual object and the second virtual object respectively, wherein the spatial relationship of the second virtual object includes the relative position information between the second virtual object and the supporting virtual object, and the supporting virtual object is one of the first virtual object or the second virtual object; a fourth determination submodule, configured to determine, if a third virtual object of a wall type exists in the layout virtual objects, the position information of the third virtual object based on the spatial coordinates of the target space and the spatial relationship and object information of the third virtual object; The fifth determining submodule is configured to determine the position information of the fourth virtual object based on the spatial coordinates of the target space and the object information of the fourth virtual object if there is a fourth virtual object of the top type in the layout virtual objects.
[0100] Optionally, the device further comprises: A second output module, configured to output the spatial relationship of each of the layout virtual objects before the generation module generates the layout information corresponding to the target space according to the object information of the layout virtual objects and the spatial relationship of the layout virtual objects; The third determining module is configured to, in response to receiving an editing operation of the user on the spatial relationship, use the edited spatial relationship as a new spatial relationship of the layout virtual object.
[0101] Optionally, the candidate virtual object corresponding to the target space is determined by a fourth determination module, and the fourth determination module is used to: The candidate virtual object is determined based on matching the first text with object information of multiple virtual objects in a preset virtual object set.
[0102] Optionally, the object information of the virtual objects in the virtual object set includes a position type, and the position type is used to indicate a layout position of the virtual object, and virtual objects of the same position type constitute a virtual object subset of the position type; The fourth determination module comprises: The fifth processing submodule is used to match, for each of the location types, object information of virtual objects in the virtual object subset of the location type based on the first text and the location type, and use the matched virtual objects as matching virtual objects of the location type, wherein the candidate virtual objects include matching virtual objects of each of the location types.
[0103] Optionally, the object information of the plurality of virtual objects in the preset virtual object set is determined in the following manner: Acquire a virtual object image of each of the virtual objects; Performing feature extraction on the virtual object image to obtain a structured feature representation of the virtual object, wherein the structured feature representation includes preset features and feature values of the features, and the features include a position type for representing a layout position of the virtual object; According to the structured feature representation, object information of the virtual object is determined.
[0104] Optionally, there are multiple layout information corresponding to the target space; The device also includes: A third output module, used to output a layout preview image corresponding to each of the layout information; a fifth determining module, configured to, in response to receiving a selection operation of the user, use layout information corresponding to the layout preview image indicated by the selection operation as target layout information; A rendering module is used to perform rendering based on the target layout information to obtain a layout corresponding to the target space.
[0105] Reference below Figure 4 , which shows a schematic diagram of the structure of an electronic device (such as a terminal device or a server) 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0106] like Figure 4As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0107] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0108] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0109] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0110] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0111] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0112] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: receives a first text, where the first text is used to represent the spatial description information of the target space; determines, based on the layout model, the layout virtual objects for laying out the target space and the spatial relationship of each of the layout virtual objects according to the first text and the object information of the candidate virtual objects corresponding to the target space; generates layout information corresponding to the target space according to the object information of the layout virtual objects and the spatial relationship of the layout virtual objects, wherein the layout information includes the position information of each of the layout virtual objects.
[0113] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0114] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0115] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a module does not limit the module itself in some cases. For example, a receiving module may also be described as a "module for receiving a first text".
[0116] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0117] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0118] According to one or more embodiments of the present disclosure, Example 1 provides a virtual object layout method, wherein the method includes: receiving a first text, where the first text is used to represent spatial description information of a target space; Determining, based on the first text and the object information of the candidate virtual objects corresponding to the target space, a layout virtual object for laying out the target space and a spatial relationship between each of the layout virtual objects based on a layout model; Layout information corresponding to the target space is generated according to the object information of the layout virtual objects and the spatial relationship of the layout virtual objects, wherein the layout information includes position information of each of the layout virtual objects.
[0119] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein the layout model includes a first model and a second model, and the step of determining, based on the layout model, the layout virtual objects for laying out the target space and the spatial relationship between each of the layout virtual objects according to the first text and the object information of the candidate virtual objects corresponding to the target space, includes: Inputting the first text and first information of the candidate virtual object into the first model to determine a layout virtual object for layout of the target space, wherein the first information is part or all of the object information; The first text and second information of the layout virtual object are input into the second model to obtain the spatial relationship of each of the layout virtual objects, wherein the second information is part or all of the object information, and the spatial relationship includes the global spatial relationship of the layout virtual object in the target space, or the spatial relationship includes the global spatial relationship of the layout virtual object in the target space, and the relative spatial relationship between the layout virtual object and other layout virtual objects.
[0120] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 2, wherein the object information of each of the layout virtual objects includes a position type, and the position type is used to indicate the layout position of the layout virtual object; The step of inputting the first text and the second information of the layout virtual object into the second model to obtain the spatial relationship of each of the layout virtual objects includes: Determine layout virtual objects of the same position type among the layout virtual objects, where the position type is a ground type and / or a wall type; The first text and second information of the layout virtual objects of the same location type are input into the second model, so that the second model determines the spatial relationship of the layout virtual objects of the location type from the spatial relationship associated with the location type.
[0121] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 2, wherein, before the step of inputting the first text and the second information of the layout virtual object into the second model to obtain the spatial relationship of each of the layout virtual objects, the method further includes: Outputting the layout virtual object; In response to receiving a second text input by a user for the layout virtual object, a new layout virtual object is determined based on the second text.
[0122] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 1, wherein the object information of each of the layout virtual objects includes a position type, and the position type is used to indicate the layout position of the layout virtual object; The generating, according to the object information of the layout virtual objects and the spatial relationship of the layout virtual objects, layout information corresponding to the target space includes: For a first virtual object whose position type is a ground type in the layout virtual objects, taking the spatial relationship of the first virtual object as a constraint condition, and solving in the spatial coordinates of the target space based on the priority order of the spatial relationship of the first virtual object and the object information of the first virtual object, to obtain candidate layout information of the first virtual object, wherein each of the candidate layout information includes the position information of the first virtual object; Based on the weight information of the spatial relationship, the layout information of the first virtual object is determined from the candidate layout information.
[0123] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 5, wherein the generating, according to the object information of the layout virtual objects and the spatial relationship of the layout virtual objects, the layout information corresponding to the target space further includes: If there is a second virtual object of a support type position type in the layout virtual objects, based on the coordinates of the supporting virtual object in the spatial relationship of the second virtual object and the object information of the supporting virtual object and the second virtual object respectively, determining the position information of the second virtual object, wherein the spatial relationship of the second virtual object includes relative position information between the second virtual object and the supporting virtual object, and the supporting virtual object is one of the first virtual object or the second virtual object; If there is a third virtual object whose position type is a wall type in the layout virtual objects, determining the position information of the third virtual object based on the spatial coordinates of the target space and the spatial relationship and object information of the third virtual object; If there is a fourth virtual object of the top type in the layout virtual objects, the position information of the fourth virtual object is determined based on the spatial coordinates of the target space and the object information of the fourth virtual object.
[0124] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 1, wherein, before the step of generating layout information corresponding to the target space according to the object information of the layout virtual objects and the spatial relationship of the layout virtual objects, the method further includes: Outputting the spatial relationship of each of the layout virtual objects; In response to receiving an editing operation of the user on the spatial relationship, the edited spatial relationship is used as a new spatial relationship of the layout virtual object.
[0125] According to one or more embodiments of the present disclosure, Example 8 provides the method of Example 1, wherein the candidate virtual object corresponding to the target space is determined in the following manner: The candidate virtual object is determined based on matching the first text with object information of multiple virtual objects in a preset virtual object set.
[0126] According to one or more embodiments of the present disclosure, Example 9 provides the method of Example 8, wherein the object information of the virtual objects of the virtual object set includes a position type, the position type is used to indicate the layout position of the virtual object, and virtual objects of the same position type constitute a virtual object subset of the position type; The determining the candidate virtual object based on matching the first text with object information of a plurality of virtual objects in a preset virtual object set includes: For each of the location types, matching is performed based on the first text and object information of virtual objects in a subset of virtual objects of the location type, and the matched virtual objects are used as matching virtual objects of the location type, wherein the candidate virtual objects include matching virtual objects of each of the location types.
[0127] According to one or more embodiments of the present disclosure, Example 10 provides the method of Example 8, wherein the object information of the plurality of virtual objects in the preset virtual object set is determined in the following manner: Acquire a virtual object image of each of the virtual objects; Performing feature extraction on the virtual object image to obtain a structured feature representation of the virtual object, wherein the structured feature representation includes preset features and feature values of the features, and the features include a position type for representing a layout position of the virtual object; According to the structured feature representation, object information of the virtual object is determined.
[0128] According to one or more embodiments of the present disclosure, Example 11 provides the method of Example 1, wherein there are multiple pieces of layout information corresponding to the target space; The method further comprises: Outputting a layout preview image corresponding to each of the layout information; In response to receiving a selection operation from the user, taking layout information corresponding to the layout preview image indicated by the selection operation as target layout information; Rendering is performed based on the target layout information to obtain a layout corresponding to the target space.
[0129] According to one or more embodiments of the present disclosure, Example 12 provides a virtual object layout device, the device comprising: A receiving module, configured to receive a first text, wherein the first text is used to represent the spatial description information of the target space; A first determination module, configured to determine, based on the first text and object information of the candidate virtual objects corresponding to the target space, a layout virtual object for laying out the target space and a spatial relationship between each of the layout virtual objects based on a layout model; A generating module is used to generate layout information corresponding to the target space according to the object information of the layout virtual objects and the spatial relationship of the layout virtual objects, wherein the layout information includes the position information of each of the layout virtual objects.
[0130] According to one or more embodiments of the present disclosure, Example 13 provides a computer-readable medium having a computer program stored thereon, which implements the steps of any of the methods described in Examples 1-11 when executed by a processing device.
[0131] According to one or more embodiments of the present disclosure, Example 14 provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method described in any one of Examples 1-11.
[0132] According to one or more embodiments of the present disclosure, Example 15 provides a computer program product, including a computer program, which implements the steps of any one of the methods of Examples 1-11 when executed by a processor.
[0133] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0134] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0135] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Claims
1. A virtual object layout method, characterized in that: The method comprises: receiving a first text, where the first text is used to represent spatial description information of a target space; Determining, based on the first text and the object information of the candidate virtual objects corresponding to the target space, a layout virtual object for laying out the target space and a spatial relationship between each of the layout virtual objects based on a layout model; Layout information corresponding to the target space is generated according to the object information of the layout virtual objects and the spatial relationship of the layout virtual objects, wherein the layout information includes position information of each of the layout virtual objects.
2. The method according to claim 1, characterized in that: The layout model includes a first model and a second model, and the step of determining, based on the first text and the object information of the candidate virtual objects corresponding to the target space, layout virtual objects for layout of the target space and the spatial relationship between each of the layout virtual objects based on the layout model includes: Inputting the first text and first information of the candidate virtual object into the first model to determine a layout virtual object for layout of the target space, wherein the first information is part or all of the object information; The first text and second information of the layout virtual object are input into the second model to obtain the spatial relationship of each of the layout virtual objects, wherein the second information is part or all of the object information, and the spatial relationship includes the global spatial relationship of the layout virtual object in the target space, or the spatial relationship includes the global spatial relationship of the layout virtual object in the target space, and the relative spatial relationship between the layout virtual object and other layout virtual objects.
3. The method according to claim 2, characterized in that The object information of each of the layout virtual objects includes a position type, and the position type is used to indicate the layout position of the layout virtual object; The step of inputting the first text and the second information of the layout virtual object into the second model to obtain the spatial relationship of each of the layout virtual objects includes: Determine layout virtual objects of the same position type among the layout virtual objects, where the position type is a ground type and / or a wall type; The first text and second information of the layout virtual objects of the same location type are input into the second model, so that the second model determines the spatial relationship of the layout virtual objects of the location type from the spatial relationship associated with the location type.
4. The method according to claim 2, characterized in that: Before the step of inputting the first text and the second information of the layout virtual objects into the second model to obtain the spatial relationship of each of the layout virtual objects, the method further includes: Outputting the layout virtual object; In response to receiving a second text input by a user for the layout virtual object, a new layout virtual object is determined based on the second text.
5. The method according to claim 1, characterized in that The object information of each of the layout virtual objects includes a position type, and the position type is used to indicate the layout position of the layout virtual object; The generating, according to the object information of the layout virtual objects and the spatial relationship of the layout virtual objects, layout information corresponding to the target space includes: For a first virtual object whose position type is a ground type in the layout virtual objects, taking the spatial relationship of the first virtual object as a constraint condition, and solving in the spatial coordinates of the target space based on the priority order of the spatial relationship of the first virtual object and the object information of the first virtual object, to obtain candidate layout information of the first virtual object, wherein each of the candidate layout information includes the position information of the first virtual object; Based on the weight information of the spatial relationship, the layout information of the first virtual object is determined from the candidate layout information.
6. The method according to claim 5, characterized in that The generating the layout information corresponding to the target space according to the object information of the layout virtual objects and the spatial relationship of the layout virtual objects also includes: If there is a second virtual object of a support type position type in the layout virtual objects, based on the coordinates of the supporting virtual object in the spatial relationship of the second virtual object and the object information of the supporting virtual object and the second virtual object respectively, determining the position information of the second virtual object, wherein the spatial relationship of the second virtual object includes relative position information between the second virtual object and the supporting virtual object, and the supporting virtual object is one of the first virtual object or the second virtual object; If there is a third virtual object whose position type is a wall type in the layout virtual objects, determining the position information of the third virtual object based on the spatial coordinates of the target space and the spatial relationship and object information of the third virtual object; If there is a fourth virtual object of the top type in the layout virtual objects, the position information of the fourth virtual object is determined based on the spatial coordinates of the target space and the object information of the fourth virtual object.
7. The method according to claim 1, characterized in that Before the step of generating layout information corresponding to the target space according to the object information of the layout virtual objects and the spatial relationship of the layout virtual objects, the method further includes: Outputting the spatial relationship of each of the layout virtual objects; In response to receiving an editing operation of the user on the spatial relationship, the edited spatial relationship is used as a new spatial relationship of the layout virtual object.
8. The method according to claim 1, characterized in that: The candidate virtual objects corresponding to the target space are determined in the following manner: The candidate virtual object is determined based on matching the first text with object information of multiple virtual objects in a preset virtual object set.
9. The method according to claim 8, characterized in that The object information of the virtual objects in the virtual object set includes a position type, where the position type is used to indicate the layout position of the virtual object, and virtual objects of the same position type constitute a virtual object subset of the position type; The determining the candidate virtual object based on matching the first text with object information of a plurality of virtual objects in a preset virtual object set includes: For each of the location types, matching is performed based on the first text and object information of virtual objects in a subset of virtual objects of the location type, and the matched virtual objects are used as matching virtual objects of the location type, wherein the candidate virtual objects include matching virtual objects of each of the location types.
10. The method according to claim 8, characterized in that The object information of the plurality of virtual objects in the preset virtual object set is determined in the following manner: Acquire a virtual object image of each of the virtual objects; Performing feature extraction on the virtual object image to obtain a structured feature representation of the virtual object, wherein the structured feature representation includes preset features and feature values of the features, and the features include a position type for representing a layout position of the virtual object; According to the structured feature representation, object information of the virtual object is determined.
11. The method according to claim 1, characterized in that There are multiple layout information corresponding to the target space; The method further comprises: Outputting a layout preview image corresponding to each of the layout information; In response to receiving a selection operation from the user, taking layout information corresponding to the layout preview image indicated by the selection operation as target layout information; Rendering is performed based on the target layout information to obtain a layout corresponding to the target space.
12. A virtual object layout device, characterized in that: The device comprises: A receiving module, used for receiving a first text, where the first text is used for representing the spatial description information of the target space; A first determination module, configured to determine, based on the first text and object information of the candidate virtual objects corresponding to the target space, a layout virtual object for laying out the target space and a spatial relationship between each of the layout virtual objects based on a layout model; A generating module is used to generate layout information corresponding to the target space according to the object information of the layout virtual objects and the spatial relationship of the layout virtual objects, wherein the layout information includes the position information of each of the layout virtual objects.
13. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 11 are implemented.
14. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 11.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
Citation Information
Cited By
Object completion method and device, equipment, storage medium and program product
CN120632324A
Object completion method, apparatus, device, storage medium and program product
CN120632324B