Spatial layout virtual scene generation method and device
Through the combination of large language model and component library, space layout results are generated and adjusted, which solves the problems of high threshold and low efficiency of traditional space design, realizes the space design needs of non-professionals, and provides flexible virtual scene generation and adjustment capabilities. .
Patent Information
- Application Number
- CN202411116667.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-10-29
AI Technical Summary
The traditional space design process relies on professional knowledge and experience, has high threshold and low efficiency, and is difficult to meet the space design needs of non-professionals.
The spatial layout results are generated by calling a large language model, and the edited results are used to retrieve the component library, synthesize virtual scenes, and provide an editable interface for users to adjust layout details.
It lowers the threshold of space design, enables non-professionals to design space easily and efficiently, realizes fine control and adjustment of virtual scenes, and is suitable for a variety of application scenarios.
Smart Images

Figure CN118864663A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence and computer vision technology, and in particular to a method and device for generating a virtual scene of a spatial layout. Background Art
[0002] Space design refers to creating a space environment that meets people's needs and usage habits through in-depth research on the size, shape, function, aesthetics and other aspects of the space. In the traditional way, the space design process relies on the professional knowledge and experience of the designer, and it takes a lot of time to generate a virtual scene of the space layout. It can be seen that the design threshold is high and the efficiency is low. Summary of the invention
[0003] In view of this, the present application provides a method and device for generating a virtual scene of a space layout, so as to lower the threshold of space design and enable non-professionals to perform space design easily and efficiently.
[0004] This application provides the following solutions:
[0005] According to a first aspect, a method for generating a virtual scene of a spatial layout is provided, the method comprising:
[0006] Acquire a user's space design requirement text, where the space design requirement text at least includes attribute information of a target space;
[0007] Using the space design requirement text to call a large language model, obtaining a space layout result generated by the large language model based on the space design requirement, the space layout result including information of a target component laid out in the target space, the target component information including description information, size information, and position information of the target component;
[0008] Providing the spatial layout result to the user;
[0009] Get the spatial layout result after user editing;
[0010] In response to a search instruction, searching a component library using the edited spatial layout result to obtain a component model corresponding to the target component;
[0011] The virtual scene of the target space is synthesized by using the position information of the target component and the corresponding component model.
[0012] According to an implementable method in an embodiment of the present application, the attribute information of the target space includes at least one of the size, shape, type and style of the target space.
[0013] According to an implementable method in an embodiment of the present application, providing the spatial layout result to the user includes:
[0014] A page for displaying the spatial layout result is generated and sent, and editable components are used on the page to display part or all of the target component information in the spatial layout result.
[0015] According to an implementable method in an embodiment of the present application, the user's editing of the spatial layout result includes at least one of the following:
[0016] Modify the description information;
[0017] Modify the size information;
[0018] modifying the location information;
[0019] Set the size weight information of the target component;
[0020] Set the ranking information of the target component;
[0021] Sets the texture information of the target component.
[0022] According to an achievable method in an embodiment of the present application, searching a component library using the edited spatial layout result includes:
[0023] Obtaining a feature representation corresponding to the description information of the target component, and obtaining a feature representation corresponding to each component model in the component library;
[0024] The component models are sorted based on the first similarity between the feature representation corresponding to the description information of the target component and the feature representation corresponding to each component model, and the component model corresponding to the target component is determined according to the sorting result.
[0025] According to an implementable method in an embodiment of the present application, determining the component model corresponding to the target component based on a first similarity between a feature representation corresponding to the description information of the target component and feature representations corresponding to each component model includes:
[0026] Acquire a second similarity between a feature representation of the size information of the target component and a feature representation of the size information of each component model in the component library;
[0027] Using the size weight information of the target component, weighting the first similarity and the second similarity to obtain a third similarity between the target component and each component model;
[0028] The component models are sorted based on the third similarity, and the component model corresponding to the target component is determined according to the sorting result.
[0029] According to an achievable method in an embodiment of the present application, if the edited spatial layout result includes texture information of a target component, after acquiring a component model corresponding to the target component, the method further includes:
[0030] The texture generation model is called by using the texture information of the target component, and a component model is obtained after the texture generation model regenerates the texture for the component model corresponding to the target component.
[0031] According to an achievable method in an embodiment of the present application, if the edited spatial layout result includes ranking information of the target component, determining the component model corresponding to the target component according to the ranking result includes:
[0032] The component model corresponding to the ranking information of the target component in the sorting result is used as the component model corresponding to the target component.
[0033] According to an achievable method in an embodiment of the present application, the target space is a residential space, a commercial space, an office space, an industrial space, an entertainment space or a public space;
[0034] The components include furniture, electrical appliances, infrastructure, decorative items, production equipment or entertainment equipment.
[0035] According to a second aspect, a method for generating a virtual scene of a spatial layout is provided, which is executed by a cloud server, and the method comprises:
[0036] Acquire a user's space design requirement text from a user device, where the space design requirement text at least includes attribute information of a target space;
[0037] Using the space design requirement text to call a large language model, obtaining a space layout result generated by the large language model based on the space design requirement, the space planning result including information of a target component laid out in the target space, the target component information including at least description information, size information and position information of the target component;
[0038] Sending the spatial layout result to the user equipment;
[0039] Acquire the spatial layout result edited by the user from the user device;
[0040] In response to the search instruction, searching the component library using the edited spatial layout result to obtain a component model corresponding to the target component;
[0041] Synthesizing a virtual scene of the target space by using the position information of the target component and the corresponding component model;
[0042] The virtual scene is sent to the user device, so that the user device can present the virtual scene in the form of a two-dimensional image, a three-dimensional image, virtual reality VR or augmented reality AR.
[0043] According to a third aspect, a device for generating a virtual scene of a spatial layout is provided, the device comprising:
[0044] A requirement acquisition unit is configured to acquire a user's space design requirement text, wherein the space design requirement text at least includes attribute information of a target space;
[0045] a space planning unit configured to call a large language model using the space design requirement text, and obtain a space layout result generated by the large language model based on the space design requirement, wherein the space planning result includes information of a target component laid out in the target space, and the information of the target component includes at least description information, size information, and position information of the target component;
[0046] A result providing unit, configured to provide the spatial layout result to the user;
[0047] An editing processing unit, configured to obtain a spatial layout result after editing by a user;
[0048] A component retrieval unit is configured to, in response to a retrieval instruction, retrieve a component library using the edited spatial layout result to obtain a component model corresponding to the target component;
[0049] The scene synthesis unit is configured to synthesize the virtual scene of the target space by using the position information of the target component and the corresponding component model.
[0050] According to a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in any one of the first and second aspects are implemented.
[0051] According to a fifth aspect, there is provided an electronic device, comprising:
[0052] one or more processors; and
[0053] A memory associated with the one or more processors, the memory being used to store program instructions, wherein when the program instructions are read and executed by the one or more processors, the steps of the method described in any one of the first and second aspects are executed.
[0054] According to a sixth aspect, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the steps of the method described in any one of the first and second aspects above.
[0055] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0056] 1) This application can generate a spatial layout result for the target space based on the user's spatial design requirement text by calling a large language model, and use the spatial layout result to retrieve the component library to obtain the component model corresponding to the target component, and then synthesize the virtual scene of the target space. It can be seen that the user only needs to input the spatial design requirement text to obtain the virtual scene of the target space, without the need for professional knowledge and experience, which lowers the threshold of spatial design and enables non-professionals to easily and efficiently perform spatial design.
[0057] 2) In this application, the spatial layout result generated by calling the large language model can be provided to the user for editing, and the component library is retrieved based on the spatial layout result edited by the user, and then the virtual scene of the target space is synthesized using the retrieved component model. In other words, the spatial layout result can be modified according to user needs, so that the virtual scene finally generated can be more finely controlled and adjusted.
[0058] 3) In the present application, the user can input at least one of the size, shape, type and style of the target space as the space design requirement, so as to flexibly design a virtual scene for the target space with specific requirements.
[0059] 4) In this application, the spatial layout results can be presented in the form of editable components on the page. Users can use the editable components to conveniently and quickly edit the spatial layout results according to their own needs, thereby achieving refined control and adjustment of the virtual scene.
[0060] 5) In this application, the user can modify the description information, size information or position information of the spatial layout results, and can also set the size weight information, ranking information and texture information of the target component, so as to fine-tune and adjust the virtual scene from multiple dimensions, so that the virtual scene can better meet the user's needs in details.
[0061] 6) In the present application, when searching for a component model for a target component, the search may be performed not only based on semantic similarity, but also based on size similarity, so that the retrieved component model can match the target component in both semantics and size.
[0062] 7) In the present application, the texture of the retrieved component model can be regenerated according to the texture information set by the user for the target component, thereby realizing a flexible texture filling function, and further realizing refined control and adjustment of the virtual scene, so that the final generated scene model is more in line with the user's aesthetics.
[0063] 8) In this application, by setting the ranking information of the target component in the spatial layout results, the user can flexibly select the component model of a specific ranking during the retrieval process, and further refine the adjustment of the component model in the virtual scene.
[0064] 9) The method provided in this application can be widely used in space design in various application scenarios such as residential space, commercial space, office space, industrial space, entertainment space or public space, so as to meet the refined design needs of users in different application scenarios.
[0065] Of course, any product implementing the present application does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0067] Figure 1 is a system architecture diagram applicable to the embodiments of the present application;
[0068] Figure 2 A flow chart of a method for generating a virtual scene of a spatial layout provided in an embodiment of the present application;
[0069] Figure 3 A schematic diagram of an interactive interface provided in an embodiment of the present application;
[0070] Figure 4 Another schematic diagram of an interactive interface provided in an embodiment of the present application;
[0071] Figure 5 Another schematic diagram of an interactive interface provided in an embodiment of the present application;
[0072] Figure 6 A schematic block diagram of a virtual scene generation device for a spatial layout provided in an embodiment of the present application;
[0073] Figure 7 A schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0074] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0075] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0076] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0077] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0078] At present, there are some technologies that can automatically generate virtual scenes after users input space design requirements text, but the virtual scenes generated in this way are difficult to control precisely. If the user is not satisfied with the virtual scene, he needs to re-adjust the input space design requirements text, and it will take many repetitions to find the appropriate requirements text, but the generated virtual scene may not be satisfactory, with low efficiency and poor accuracy.
[0079] In view of this, the present application provides a new idea. In order to facilitate the understanding of the present application, the system architecture on which the present application is based is first described. Figure 1 An exemplary system architecture to which the embodiments of the present application can be applied is shown. Figure 1 As shown in , the system architecture may include: user equipment and a virtual scene generating device located at the server end.
[0080] User devices may include, but are not limited to, smart mobile terminals, smart home devices, wearable devices, PCs (Personal Computers), etc. Smart mobile devices may include mobile phones, tablet computers, laptops, PDAs (Personal Digital Assistants), Internet cars, etc. Smart home devices may include smart TVs, smart refrigerators, etc. Wearable devices may include smart watches, smart glasses, virtual reality devices, augmented reality devices, mixed reality devices (i.e., devices that can support virtual reality and augmented reality), etc.
[0081] The virtual scene generation device can use the method provided in the embodiment of the present application to generate a virtual scene of the target space according to the space design requirement text.
[0082] The virtual scene generation device can be set up as an independent server, or in a server group, or in a cloud server. A cloud server, also known as a cloud computing server or cloud host, is a host product in the cloud computing service system to solve the problems of difficult management and weak service scalability in traditional physical hosts and virtual private servers (VPS). Figure 1 In addition to the shown architecture, the design interface generating device can also be set in a computer terminal with strong computing power.
[0083] As one of the achievable methods, the user can input the space design requirement text through the user device, and the user device sends the space design requirement text to the virtual scene generation device on the server side. The virtual scene generation device generates a virtual scene of the target space according to the space design requirement text, returns the virtual scene to the user device through the network, and the user device renders it and displays it to the user.
[0084] As another achievable method, the virtual scene generation device can also be an application software located in a computer terminal, or can also be a plug-in or software development kit (SDK) and other functional units set in the application software. For example, it can be a plug-in set in a computer graphics application software (such as Blender, etc.), after the user enters the space design requirement text in the computer graphics application software, the computer graphics application software can call the virtual scene generation device to generate a virtual scene of the target space, and display it on the interface provided by the computer graphics application software.
[0085] Among them, when the virtual scene generation device generates the virtual scene of the target space, it involves calling the large language model and querying the component library. For details, please refer to the description in the subsequent embodiments.
[0086] It should be understood that Figure 1 The number of user devices, virtual scene generation devices, large language models, and component libraries in the embodiment is only illustrative. According to implementation requirements, there may be any number of user devices, virtual scene generation devices, large language models, and component libraries.
[0087] Figure 2 A flowchart of a method for generating a virtual scene of a spatial layout provided in an embodiment of the present application. The method can be performed by Figure 1 The virtual scene generation device in the system shown in FIG. Figure 2 As shown in , the method may include the following steps:
[0088] Step 201: Acquire a user's space design requirement text, where the space design requirement text at least includes attribute information of a target space.
[0089] Step 203: Use the space design requirement text to call the large language model to obtain the space layout result generated by the large language model based on the space design requirement, where the space layout result includes information of the target component laid out in the target space, and the target component information includes at least description information, size information and position information of the target component.
[0090] Step 205: Provide the spatial layout result to the user.
[0091] Step 207: Obtain the spatial layout result edited by the user.
[0092] Step 209: In response to the search instruction, the component library is searched using the edited spatial layout result to obtain a component model corresponding to the target component.
[0093] Step 211: Synthesize a virtual scene of the target space using the location information of the target component and the corresponding component model.
[0094] From the above process, it can be seen that this application can generate a spatial layout result for the target space based on the user's spatial design requirement text by calling a large language model, and use the spatial layout result to retrieve the component library to obtain the component model corresponding to the target component, and then synthesize the virtual scene of the target space. It can be seen that the user only needs to enter the spatial design requirement text to obtain the virtual scene of the target space, without the need for professional knowledge and experience, which lowers the threshold of spatial design and enables non-professionals to easily and efficiently perform spatial design.
[0095] In addition, the spatial layout results generated by calling the large language model can be provided to the user for editing. Based on the spatial layout results edited by the user, the component library is retrieved, and then the virtual scene of the target space is synthesized using the retrieved component model. In other words, the spatial layout results can be modified according to user needs, so that the virtual scene generated can be more finely controlled and adjusted.
[0096] The following is a detailed description of each step in the above process and the effects that can be further produced in conjunction with the embodiments. It should be noted that the limitations such as "first" and "second" involved in the present disclosure do not have limitations in terms of size, order, and quantity, and are only used to distinguish them in name. For example, "first similarity", "second similarity" and "third similarity" are used to distinguish three similarities in name.
[0097] First, the above step 201, namely "obtaining the user's space design requirement text", is described in detail in conjunction with the embodiment.
[0098] In this step, an interactive interface may be provided to the user, and the user may input the space design requirements in the form of text or voice, etc. If the input is voice, the voice may be converted into the space design requirement text through voice recognition.
[0099] The above-mentioned space design requirement text includes at least the attribute information of the target space. In the embodiment of the present application, the target space is the space that the user wants to design, which may include but is not limited to: residential space, commercial space, office space, industrial space, entertainment space, public space, etc. Among them, residential space can be such as a living room, bedroom, study, etc. Commercial space can be such as a supermarket, bookstore, store, etc. Office space can be such as an office, conference room, pantry, etc. Industrial space can be such as a workshop, storage room, etc. Entertainment space can be such as a KTV box, bar, etc. Public space can be such as a library, park, museum, etc.
[0100] The attribute information of the target space may include, but is not limited to, description information, size information, shape information, etc. of the target space. Among them, the description information may be information such as the name and type of the target space. The size information may be represented by length, width, height, etc. The shape information may be, for example, rectangle, square, circle, etc. In some cases, the shape information may also be reflected by the size information. For example, a size of 500×500 is generally considered to be a square, and a size of 500×800 is generally considered to be a rectangle. In addition, it should be noted that the size of the target space may be expressed in two dimensions or in three dimensions. For example, 500×500×2500 means that the length, width, and height are 500, 500, and 2500, respectively.
[0101] In addition to the attribute information of the target space, the space design requirement text may also include some rule information, information about specific target components (for example, it needs to contain a specific type of component, or it needs to contain a specific number of a certain type of component, etc.), information about specific locations (for example, it needs to set up a certain type of component in a specific location), design style information, and design purpose information (for example, designing for a certain type of person, designing for a special need, etc.). Here are some examples of space design requirement texts:
[0102] Example 1: "For a bedroom with a size of 500x500 and an origin at (0.0,0.0,0.0), generate a list of appropriate bedroom items at the correct locations. Make sure items do not overlap or go outside the region boundaries."
[0103] Example 2: "Bedroom, size 500×500, origin at (0.0,0.0,0.0), generate a proper list of bedroom items in the correct locations, including two nightstands."
[0104] Example 3: "Bedroom, size 500×500, origin at (0.0,0.0,0.0), generate a proper list of bedroom items in the correct location, including a table, and there is a floor lamp to the right of the table."
[0105] Example 4: "Bedroom, size 500×500, origin at (0.0,0.0,0.0), generate a list of appropriate bedroom items in the correct location, please design a Mediterranean style bedroom."
[0106] Example 5: "Bedroom, size 500×500, origin at (0.0,0.0,0.0), generate a list of appropriate bedroom items in the correct locations, please design a bedroom with assisted living facilities for a 70-year-old wife."
[0107] The user can input the space design requirement text through the text input box on the interactive page, or through other components such as the dialog box on the interactive page. In addition, the space design requirement text can be in the form of natural language text as described in the above example, or in other forms, such as inputting structured space design requirement information through some options.
[0108] The above step 203, i.e., "using the space design requirement text to call the large language model to obtain the space layout result generated by the large language model based on the space design requirement" is described in detail below in conjunction with the embodiments.
[0109] With the continuous development of large language models, large language models have powerful natural language understanding and the ability to perform corresponding tasks according to requirements. In the embodiment of the present application, a prompt instruction (Prompt) can be constructed according to the spatial design requirement text, and the interface provided by the large language model is called to pass the prompt instruction to the large language model, and the large language model performs spatial layout for the target space according to the prompt instruction, thereby generating a spatial layout result.
[0110] Among them, a large language model (LLM) refers to a deep learning model trained with a large amount of text data, which can generate natural language text or understand the meaning of language text. It is characterized by large scale and huge number of parameters (usually reaching more than 10 billion levels), and is usually based on a deep learning architecture such as the Transformer architecture. The difference between a large language model and an ordinary pre-trained language model lies in the parameter scale. When the parameter scale exceeds a certain level, the model achieves significant performance improvement and exhibits capabilities that do not exist in small models, such as in-context learning capabilities, which can learn complex patterns in language and perform a wide range of tasks, including text summarization, translation, sentiment analysis, multi-round dialogue, etc. Therefore, in order to distinguish it from traditional pre-trained language models, such models with a parameter scale exceeding a certain level are called large language models. In general, a language model with a parameter scale of more than 10 billion based on a deep learning architecture can be called a large language model. Common large language models include: GTP-3 (Generative Pre-trained Transformer 3), T5 (Text-to-Text Transfer Transformer), GTP-4, PaLM (a large language model proposed by Google), LLaMA (Large Language Model Meta AI, a large language model released by Meta AI), etc.
[0111] In the embodiment of the present application, the spatial layout result generated by the large language model mainly includes the information of the target components laid out in the target space, that is, which components are laid out in the target space, these components are called target components, and relevant information of the target components, such as description information, size information and position information. The description information may be the name, category, style, etc. of the target component. The size information may be represented by information such as length, width and height. The position information may be represented by coordinates in a specific coordinate system, such as coordinates (x, y, z) in a three-dimensional coordinate system with a certain point in the target space as the origin. In addition, the relevant information of the target component may also include other information, such as texture information, material information, and the like.
[0112] The components involved in the embodiments of the present application may include, but are not limited to, furniture, electrical appliances, infrastructure, decorative items, production equipment, entertainment facilities, etc. The type of target components contained in the designed spatial layout result is usually corresponding to the type of the target space. For example, the corresponding target components for residential space, office space, etc. may be furniture, electrical appliances, decorative items, etc. The corresponding target components for industrial space may be production equipment, furniture, electrical appliances, etc. The corresponding target components for entertainment space may be entertainment facilities, furniture, etc.
[0113] The following describes in detail step 205, namely "providing the spatial layout result to the user", and step 207, namely "obtaining the spatial layout result edited by the user", in conjunction with the embodiments.
[0114] The spatial layout result can be returned to the user terminal in a variety of forms such as a list or JSON format, and displayed to the user by the user terminal. As one of the achievable methods, a page for displaying the spatial layout result can be generated and sent, and an editable component is used on the page to display part or all of the spatial layout result.
[0115] Assuming that the large language model performs spatial layout for the bedroom, the output target components in the target spatial layout include bed, bedside table, wardrobe, and TV. Figure 3 The interactive page shown returns the spatial layout results in the form of an editable text box, including the description information, size, size weight, position, texture, ranking and other information of the component. The size weight can be empty or the default value can be used. The meaning of ranking refers to the component model with which ranking position is selected as the component model corresponding to the target component when selecting the component model later. Some of the information can be set to empty, for example, the texture information can be empty, which means that it is not restricted by the texture information when retrieving the component model later. For another example, the size weight can be empty, which means that the size information matching is not considered when retrieving the component model later. For another example, the ranking information of the target component can be empty, which means that the first component model is selected by default when retrieving the component model later.
[0116] If the user is satisfied with the spatial layout result, he can trigger Figure 3 The "Confirm" button shown in the figure sends the search instruction to the server. If the user is not satisfied with the spatial layout result, the user can edit the information in the spatial layout result, which may include but is not limited to at least one of the following:
[0117] Modify description information, modify size information, modify position information, set size weight information of target component, set ranking information of target component, and set texture information of target component.
[0118] For example, if the user is not satisfied with the bed, he can edit it to "soft princess bed". If he is not satisfied with its texture, he can change it to "beige linen". If he is not satisfied with the texture of the bedside table, he can change it to "white birch". If he is not satisfied with the size of the wardrobe, he can change its size to "1.8×0.6×2.3m". If he is not satisfied with the texture of the wardrobe, he can change it to "gray background with black lines". Figure 4 As shown in . The position, size weight, ranking, etc. can also be modified. The role of size weight and ranking will be involved and detailed in subsequent embodiments.
[0119] The texture information involved in the embodiments of the present application may include at least one of color, material, fabric, pattern, etc. Taking a bed as an example, its texture information may be beige linen, gray fabric, birch, black, stainless steel, white cotton, brown leather, oak frame, white background with blue ripples, etc.
[0120] After editing is complete, the user can trigger actions such as Figure 4 The "Confirm" button shown in sends a retrieval instruction to the server.
[0121] It should be noted that, for the information of the target component in the spatial layout result, part of it can also be selected and returned to the user for editing. For example, only the description information, size and position information are returned to the user for editing, and the other parts cannot be edited. Another example is that only the description information and size information are returned to the user for editing, and the other parts cannot be edited, and so on.
[0122] The above step 209, namely "in response to the search instruction, searching the component library using the edited spatial layout result to obtain the component model corresponding to the target component" is described below in conjunction with the embodiments.
[0123] The component library contains various component models that can be laid out in the target space, such as furniture models, electrical appliance models, decoration models, etc.
[0124] When searching the component library using the edited spatial layout results, the purpose is to match the component models corresponding to each target component. As one of the feasible ways, retrieval can be performed based on semantics, mainly using the description information of the target component for retrieval. For example, the description information of the target component can be feature extracted using a text feature extraction model such as the CLIP (Contrastive Language-Image Pre-training) model to obtain a feature representation corresponding to the description information of the target component. Feature extraction is performed in advance for each component model in the component library using a three-dimensional feature extraction model such as the OpenShape network to obtain a feature representation corresponding to each component model. Then, the similarity between the feature representation corresponding to the description information of the target component and the feature representation corresponding to each component model is obtained, which is referred to as the first similarity in the embodiment of the present application.
[0125] The use of three-dimensional feature extraction models such as the OpenShape network to extract features from component models can fully understand the shape of the three-dimensional model. On the one hand, it can better match the target component semantically, and on the other hand, it does not need to rely on the label of the component model. Therefore, it can be widely used in unlabeled component libraries.
[0126] The component models may be sorted based on the first similarity, and the component model corresponding to the target component may be determined based on the sorting result. For example, the component model ranked first in corresponding to the first similarity may be used as the component model corresponding to the target component. The component model corresponding to the target component may also be determined based on the ranking information set by the user for the target component in the spatial layout result and the sorting result based on the first similarity, and the component model corresponding to the ranking information set by the user for the target component in the sorting result may be used as the target component corresponding to the target component. For example, if the ranking information set by the user for a target component in the spatial layout result is 2, the component model ranked second in corresponding to the first similarity may be used as the component model corresponding to the target component.
[0127] As another feasible method, retrieval can be performed based on both semantics and size. When searching based on size, the similarity between the feature representation of the size information of the target component and the feature representation of the size information of each component model in the component library can be obtained, which is referred to as the second similarity in the embodiment of the present application. Then, the first similarity and the second similarity are weighted using the size weight information of the target component to obtain the third similarity between the target component and the component model. Then, the component models are sorted based on the third similarity, and the component model corresponding to the target component is determined based on the sorting result.
[0128] Among them, considering that the model can be scaled proportionally, the feature representation of the size information can be achieved by abstracting the length, width and height into three-dimensional vectors and then standardizing them. In this way, the greater the similarity between the two standardized vectors, the closer the size ratio of the two is.
[0129] If the user sets a size weight for the target component when editing the spatial layout result, the size weight set by the user can be used to weight the first similarity and the second similarity. If the user does not set a size weight for the target component, the default size weight can be used. The size weight set by the user for the target component reflects the importance the user places on the size.
[0130] When determining the component model corresponding to the target component based on the ranking result of the third similarity, for example, the component model ranked first in the corresponding third similarity can be used as the component model corresponding to the target component. The component model corresponding to the target component can also be determined based on the ranking information set by the user for the target component in the spatial layout result and the ranking result based on the third similarity. For example, if the ranking information set by the user for a certain target component in the spatial layout result is 2, the component model ranked second in the corresponding third similarity can be used as the component model corresponding to the target component.
[0131] After retrieving the component models corresponding to each target component, if the component models are all solid color models without texture, the texture information set by the user for the target component in the spatial layout result can be used to call a texture generation model such as SyncMVD to obtain the component model obtained after the texture generation model regenerates the texture for the component model corresponding to the target component. In other words, the texture information set by the user is used to refill the texture of the component model. If the component model corresponding to the target component is a model containing texture, if its texture is inconsistent with the texture information set by the user for the target component, the texture of the component model can be refilled with the texture using the texture information set by the user.
[0132] The following describes in detail step 211, ie, "synthesizing a virtual scene of a target space by using the location information of the target component and the corresponding component model" in conjunction with the embodiments.
[0133] After obtaining the component model corresponding to each target component, you can call a three-dimensional model editing tool such as Trimesh to synthesize the component model and the room model, where the component model is placed at the position corresponding to the position information of the target component to synthesize it with the room model to obtain a virtual scene of the target space.
[0134] The virtual scene of the target space can be sent to the user device, so that the user device can render and display the virtual scene in the form of a two-dimensional image, a three-dimensional image, VR (Virtual Reality), AR (Augmented Reality), etc. The rendering process can also be executed on the server side and the rendering result can be provided to the user device for display.
[0135] like Figure 5 As shown in , the rendering result of the virtual scene of the target space can be displayed in the designated area on the interactive page for the user to view. If the user is not satisfied with the virtual scene, the user can continue to edit the information of each target component in the space layout result, and perform the above steps 207 to 211 again to re-synthesize the virtual scene and display the rendering result on the interactive interface.
[0136] In addition to providing the user with the rendering result of the virtual scene on the interactive page, the virtual scene can also be provided to the user in a variety of formats (such as GLB format) in response to a request from the user terminal for the user to download and save.
[0137] If the virtual scene generation device is a plug-in or SDK or other functional unit provided in the computer graphics application software, then the virtual scene generation device is Figure 3 to Figure 5 The spatial layout results shown in and the rendered virtual scene of the target space can be displayed in different areas of the UI interface provided by the computer graphics application software, wherein the style and layout of the spatial layout results on the UI interface can be flexibly set, and this application does not impose any restrictions on this.
[0138] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0139] According to an embodiment of another aspect, a device for generating a virtual scene of a spatial layout is provided. Figure 6 A schematic block diagram of a virtual scene generation device provided in an embodiment of the present application, such as Figure 6 As shown, the device 600 may include: a demand acquisition unit 601, a space planning unit 602, a result providing unit 603, an editing processing unit 604, a component retrieval unit 605 and a scene synthesis unit 606, and may further include a texture filling unit 607. The main functions of each component unit are as follows:
[0140] The requirement acquisition unit 601 is configured to acquire a user's space design requirement text, where the space design requirement text at least includes attribute information of a target space.
[0141] The attribute information of the target space includes at least one of the size, shape, type and style of the target space.
[0142] The space planning unit 602 is configured to call the large language model using the space design requirement text to obtain the space layout result generated by the large language model based on the space design requirement. The space planning result includes information about the target components laid out in the target space. The information about the target components includes at least description information, size information and location information of the target components.
[0143] The result providing unit 603 is configured to provide the user with the spatial layout result.
[0144] The editing processing unit 604 is configured to obtain the spatial layout result after the user edits.
[0145] The component retrieval unit 605 is configured to respond to the retrieval instruction, retrieve the component library using the edited spatial layout result, and obtain the component model corresponding to the target component.
[0146] The scene synthesis unit 606 is configured to synthesize a virtual scene of the target space using the location information of the target component and the corresponding component model.
[0147] As one of the achievable ways, the result providing unit 603 may be specifically configured to: generate and send a page for displaying the spatial layout result, and use editable components on the page to display the spatial layout result.
[0148] As one of the achievable methods, the user's editing of the spatial layout result may include at least one of the following:
[0149] Modify the description information;
[0150] Modify size information;
[0151] Modify location information;
[0152] Set the size weight information of the target component;
[0153] Set the ranking information of the target component;
[0154] Sets the texture information of the target component.
[0155] Based on this, the component retrieval unit 605 can be specifically configured to obtain the feature representation corresponding to the description information of the target component, and obtain the feature representation corresponding to each component model in the component library; sort each component model based on the first similarity between the feature representation corresponding to the description information of the target component and the feature representation corresponding to each component model, and determine the component model corresponding to the target component based on the sorting result.
[0156] As one of the more preferred implementation methods, when the component retrieval unit 605 determines the component model corresponding to the target component based on the first similarity between the feature representation corresponding to the description information of the target component and the feature representation corresponding to each component model, it can be configured to: obtain the second similarity between the feature representation of the size information of the target component and the feature representation of the size information of each component model in the component library; use the size weight information of the target component to weight the first similarity and the second similarity to obtain the third similarity between the target component and each component model; sort the component models based on the third similarity, and determine the component model corresponding to the target component according to the sorting result.
[0157] If the edited spatial layout result includes texture information of the target component, then after the component retrieval unit 605 obtains the component model corresponding to the target component, the texture filling unit 607 can call the texture generation model using the texture information of the target component, obtain the component model obtained by regenerating the texture of the component model corresponding to the target component by the texture generation model, and provide the component model with the regenerated texture to the scene synthesis unit 606.
[0158] If the edited spatial layout result includes ranking information of the target component, the component retrieval unit 605 may use the component model corresponding to the ranking information of the target component in the ranking result as the component model corresponding to the target component when determining the component model corresponding to the target component according to the ranking result.
[0159] As some of the usage scenarios, the target space may be a residential space, a commercial space, an office space, an industrial space, an entertainment space, or a public space, etc. The components may include furniture, electrical appliances, infrastructure, decorative items, production equipment, or entertainment equipment, etc.
[0160] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the unit described as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0161] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0162] In addition, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of any one of the methods in the aforementioned method embodiments are implemented.
[0163] And an electronic device, comprising:
[0164] one or more processors; and
[0165] A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of the method described in any one of the aforementioned method embodiments.
[0166] The present application also provides a computer program product, including a computer program, which implements the steps of any one of the methods in the aforementioned method embodiments when executed by a processor.
[0167] in, Figure 7The architecture of the electronic device is shown as an example, which may include a processor 710, a video display adapter 711, a disk drive 712, an input / output interface 713, a network interface 714, and a memory 720. The processor 710, the video display adapter 711, the disk drive 712, the input / output interface 713, the network interface 714, and the memory 720 may be communicatively connected via a communication bus 730.
[0168] Among them, the processor 710 can be implemented by a general-purpose CPU, a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., to execute relevant programs to implement the technical solutions provided in this application.
[0169] The memory 720 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 720 can store an operating system 721 for controlling the operation of the electronic device 700, and a basic input and output system (BIOS) 722 for controlling the low-level operation of the electronic device 700. In addition, a web browser 723, a data storage management system 724, and a virtual scene generation device 725, etc. can also be stored. The above-mentioned virtual scene generation device 725 can be an application program that specifically implements the operations of the aforementioned steps in the embodiment of the present application. In short, when the technical solution provided by the present application is implemented by software or firmware, the relevant program code is stored in the memory 720 and is called and executed by the processor 710.
[0170] The input / output interface 713 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0171] The network interface 714 is used to connect to a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0172] The bus 730 comprises a pathway for transmitting information between the various components of the device (eg, the processor 710, the video display adapter 711, the disk drive 712, the input / output interface 713, the network interface 714, and the memory 720).
[0173] It should be noted that, although the above device only shows a processor 710, a video display adapter 711, a disk drive 712, an input / output interface 713, a network interface 714, a memory 720, a bus 730, etc., in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include components necessary for implementing the solution of the present application, and does not necessarily include all the components shown in the figure.
[0174] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a computer program product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0175] The technical solution provided by the present application is described in detail above. The principle and implementation method of the present application are described in detail using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present application.
Claims
1. A method for generating a virtual scene of a spatial layout, characterized in that: The method comprises: Acquire a user's space design requirement text, where the space design requirement text at least includes attribute information of a target space; Using the space design requirement text to call a large language model, obtaining a space layout result generated by the large language model based on the space design requirement, the space layout result including information of a target component laid out in the target space, the target component information including description information, size information, and position information of the target component; Providing the spatial layout result to the user; Get the spatial layout result after user editing; In response to a search instruction, searching a component library using the edited spatial layout result to obtain a component model corresponding to the target component; The virtual scene of the target space is synthesized by using the position information of the target component and the corresponding component model.
2. The method according to claim 1, characterized in that The attribute information of the target space includes at least one of size, shape, type and style of the target space.
3. The method according to claim 1, characterized in that Providing the spatial layout result to the user includes: A page for displaying the spatial layout result is generated and sent, and editable components are used on the page to display part or all of the target component information in the spatial layout result.
4. The method according to claim 1, characterized in that: The user's editing of the spatial layout result includes at least one of the following: Modify the description information; Modify the size information; modifying the location information; Set the size weight information of the target component; Set the ranking information of the target component; Sets the texture information of the target component.
5. The method according to claim 4, characterized in that Retrieving the component library using the edited spatial layout result includes: Obtaining a feature representation corresponding to the description information of the target component, and obtaining a feature representation corresponding to each component model in the component library; The component models are sorted based on the first similarity between the feature representation corresponding to the description information of the target component and the feature representation corresponding to each component model, and the component model corresponding to the target component is determined according to the sorting result.
6. The method according to claim 5, characterized in that Determining the component model corresponding to the target component based on a first similarity between a feature representation corresponding to the description information of the target component and feature representations corresponding to each component model includes: Acquire a second similarity between a feature representation of the size information of the target component and a feature representation of the size information of each component model in the component library; Using the size weight information of the target component, weighting the first similarity and the second similarity to obtain a third similarity between the target component and each component model; The component models are sorted based on the third similarity, and the component model corresponding to the target component is determined according to the sorting result.
7. The method according to claim 4, characterized in that If the edited spatial layout result includes texture information of the target component, after obtaining the component model corresponding to the target component, the method further includes: The texture generation model is called by using the texture information of the target component, and a component model is obtained after the texture generation model regenerates the texture for the component model corresponding to the target component.
8. The method according to claim 5 or 6, characterized in that: If the edited spatial layout result includes ranking information of the target component, then determining the component model corresponding to the target component according to the ranking result includes: The component model corresponding to the ranking information of the target component in the sorting result is used as the component model corresponding to the target component.
9. The method according to any one of claims 1 to 7, characterized in that The target space is a residential space, a commercial space, an office space, an industrial space, an entertainment space or a public space; The components include furniture, electrical appliances, infrastructure, decorative items, production equipment or entertainment equipment.
10. A method for generating a virtual scene of a spatial layout, executed by a cloud server, characterized in that: The method comprises: Acquire a user's space design requirement text from a user device, where the space design requirement text at least includes attribute information of a target space; Using the space design requirement text to call a large language model, obtaining a space layout result generated by the large language model based on the space design requirement, the space planning result including information of a target component laid out in the target space, the target component information including at least description information, size information and position information of the target component; Sending the spatial layout result to the user equipment; Acquire the spatial layout result edited by the user from the user device; In response to a search instruction, searching a component library using the edited spatial layout result to obtain a component model corresponding to the target component; Synthesizing a virtual scene of the target space by using the position information of the target component and the corresponding component model; The virtual scene is sent to the user device, so that the user device can present the virtual scene in the form of a two-dimensional image, a three-dimensional image, virtual reality VR or augmented reality AR.
11. A device for generating a virtual scene of a spatial layout, characterized in that: The device comprises: A requirement acquisition unit is configured to acquire a user's space design requirement text, wherein the space design requirement text at least includes attribute information of a target space; a space planning unit configured to call a large language model using the space design requirement text, and obtain a space layout result generated by the large language model based on the space design requirement, wherein the space planning result includes information of a target component laid out in the target space, and the information of the target component includes at least description information, size information, and position information of the target component; A result providing unit, configured to provide the spatial layout result to the user; An editing processing unit, configured to obtain a spatial layout result after editing by a user; A component retrieval unit is configured to, in response to a retrieval instruction, retrieve a component library using the edited spatial layout result to obtain a component model corresponding to the target component; The scene synthesis unit is configured to synthesize the virtual scene of the target space by using the position information of the target component and the corresponding component model.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
13. An electronic device, characterized in that: include: one or more processors; as well as A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of the method described in any one of claims 1 to 10.
14. 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 10 are implemented.
Citation Information
Cited By
Building space layout three-dimensional model generation method and device
CN119251411A
Building space design three-dimensional model generation method and device
CN119251413A
A method and device for generating a three-dimensional model of architectural space design
CN119251413B
Virtual scene generation method and device and electronic equipment
CN119810380A
Virtual scene generation methods, devices and electronic equipment
CN119810380B
