Home decoration layout method and device, electronic equipment and storage medium

By generating candidate home decoration layout schemes and constructing a furniture-obstacle relationship matrix, and using gradient descent optimizers and diffusion models, the complex constraints of apartment design and furniture arrangement in existing technologies are solved, realizing the automation and personalization of furniture arrangement and generating multiple high-quality candidate schemes.

CN121525129APending Publication Date: 2026-02-13SHENZHEN TIANHUA ARCHITECTURAL DESIGN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511663634.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

Existing technologies struggle to handle complex constraints in apartment layout and furniture arrangement, fail to generate multiple high-quality candidate solutions, lack automated and personalized solutions, and result in designs that are neither practical nor reasonable.

Method used

By acquiring apartment layout information and furniture list, candidate home decoration layout schemes are generated, a furniture-obstacle relationship matrix is ​​constructed, a continuous and differentiable penalty term is built, a gradient descent optimizer is used to update furniture position and orientation, and graph neural network and diffusion model are combined to improve the diversity of solution space and generate multiple layout schemes that meet the constraints.

Benefits of technology

It improves the accuracy and diversity of furniture layout, can generate multiple high-quality candidate solutions that meet complex constraints within a limited time, supports personalized user preferences, and realizes the automation and intelligence of furniture arrangement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121525129A_ABST
    Figure CN121525129A_ABST
Patent Text Reader

Abstract

The invention discloses a home decoration layout method and device, electronic equipment and a storage medium, and relates to the technical field of deep learning, and the method comprises the steps: generating at least one target candidate home decoration layout scheme based on the house type information and a furniture list of a to-be-laid room; constructing a furniture and obstacle relation matrix based on the target candidate home decoration layout scheme; constructing a continuous and derivable penalty term based on the distance in the furniture and obstacle relation matrix; constructing a first target energy function based on the penalty term; inputting a target candidate position and a target candidate orientation of each piece of furniture in the target candidate home decoration layout scheme as optimization variables into a gradient descent optimizer, and in each iterative optimization, calculating a gradient of a first target energy function relative to each optimization variable, and updating the position parameter and the orientation parameter of the furniture through a gradient descent optimizer by using the gradient, and outputting at least one target home decoration layout scheme when determining that the current iteration meets a preset iteration stop condition. Therefore, the layout accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of deep learning technology, and in particular to a home decoration layout method, device, electronic device and storage medium. Background Technology

[0002] With the rapid development of the housing industrialization and real estate market, the rationality of apartment floor plan design and interior furniture arrangement has become a crucial factor affecting living quality and market competitiveness. Traditional design methods mainly rely on the designer's experience and manual operation, gradually drawing and adjusting on CAD (Computer-Aided Design) software platforms. While this method is flexible, it is inefficient when facing large-scale apartment design, rapid drawing production, and personalized needs, and it is difficult to ensure the uniformity and scientific nature of the design results.

[0003] In related technologies, some research attempts to optimize apartment layouts using heuristic algorithms or rule-driven methods. These methods typically iteratively solve for indicators such as space utilization and circulation rationality by setting basic geometric constraints and functional zoning rules. Regarding furniture arrangement, some CAD plugins and 3D modeling software provide furniture libraries and arrangement tools, allowing designers to select furniture models from the library and drag and drop them onto a plane, while simple collision detection avoids overlap. Furthermore, in recent years, academia has also attempted to automatically generate interior layouts based on deep learning and generative adversarial networks, but most of these efforts are limited to small sample datasets or only provide rough layout schemes.

[0004] However, in terms of constraint modeling, most related technologies can only handle simple geometric relationships and basic functional zoning, failing to comprehensively cover complex constraints at multiple levels, such as furniture activity space, door and window opening range, ergonomics, lighting, and ventilation. Therefore, the practicality and rationality of the layout results are insufficient. Secondly, at the optimization algorithm level, heuristic or evolutionary algorithms are prone to getting stuck in local optima, lacking the ability to guarantee global quality, and struggling to generate multiple high-quality candidate solutions within limited computation time, resulting in insufficient solution diversity. Thirdly, regarding the level of intelligence, existing CAD plugins and tools still rely on manual intervention; furniture arrangement often requires designers to adjust each piece individually, failing to truly achieve automation and intelligence. Finally, in terms of personalization and user preferences, existing technologies lack effective mechanisms to collect, model, and incorporate users' aesthetic and functional needs, making it difficult for optimization results to truly meet the personalized requirements of different users. Summary of the Invention

[0005] In view of this, this application provides a home decoration layout method, apparatus, electronic device and storage medium to solve the problems existing in the prior art.

[0006] The objective of this application can be achieved through the following technical solutions: The first aspect of this application is to provide a home decoration layout method, including: Obtain the floor plan information and furniture list of the rooms to be furnished; Based on the apartment layout information and furniture list, at least one target candidate home decoration layout scheme is generated, wherein each target candidate home decoration layout scheme includes the target candidate position and target candidate orientation of the furniture in the room to be arranged in the furniture list; Based on the target candidate home decoration layout scheme, a furniture and obstacle relationship matrix is ​​constructed. The obstacle is a fixed structure in the room to be laid out that cannot be encroached upon. The relationship matrix includes multiple elements, each element representing the distance between the furniture and the obstacle. Construct a continuously differentiable penalty term based on distance; Construct the first objective energy function based on the penalty term; The target candidate position and target candidate orientation of each piece of furniture in the target candidate home decoration layout scheme are input as optimization variables into the gradient descent optimizer. In each iteration of optimization, the gradient of the first objective energy function relative to each optimization variable is calculated. The position parameters and orientation parameters of the furniture are updated by the gradient descent optimizer. When the current iteration meets the preset iteration stopping condition, at least one target home decoration layout scheme is output.

[0007] In one optional embodiment, based on the floor plan and furniture list, at least one target candidate home decoration layout scheme is generated, including: Generate a footprint outline and an active surface outline for each piece of furniture in the furniture list. The footprint outline is the outer polygon of the furniture body, and the active surface outline is obtained by expanding the buffer based on the footprint outline and combining ergonomic rules. Based on the footprint and activity surface outlines of the furniture, generate furniture library information; Based on apartment layout information, furniture library information and preset spatial constraints, the first candidate home decoration layout scheme is generated by the CP-SAT constraint planning solver. The first candidate home decoration layout scheme includes the first candidate position and first candidate orientation of the furniture in the room to be laid out. Based on apartment layout information, furniture library information, and preset spatial constraints, a second candidate home decoration layout scheme is generated through a pre-set diffusion model. The second candidate home decoration layout scheme includes the second candidate positions and second candidate orientations of the furniture in the furniture list in the room to be arranged. At least one target candidate home decoration layout scheme is obtained by sampling from a set of candidate home decoration layout schemes, including a first candidate home decoration layout scheme and a second candidate home decoration layout scheme, using a pre-trained generative flow network model.

[0008] In one optional embodiment, based on apartment layout information, furniture library information, and preset spatial constraints, a first candidate home decoration layout scheme is generated using the CP-SAT constraint programming solver, including: A third candidate home decoration layout scheme is generated based on the apartment type information and furniture library information. The third candidate home decoration layout scheme includes at least one candidate furniture position information, which includes the third candidate position and third candidate orientation of the furniture in the room to be arranged. Using the pose information of candidate furniture as nodes, if there is a potential conflict relationship between any two nodes, an edge is established between the nodes to construct a conflict graph model; Obtain the initial feature vectors of each node in the conflict graph model; The initial feature vectors of each node are updated by a graph neural network to obtain a high-dimensional representation of each node. The high-dimensional representation is used to reflect global constraints and local conflicts. The priority score of each node is output based on the high-dimensional representation of each node using a graph neural network. The priority score is converted into a variable branching and sorting strategy, and passed as a search guide to the CP-SAT constraint programming solver. The CP-SAT constraint programming solver outputs the first candidate home decoration layout scheme that meets the preset spatial constraints.

[0009] In one optional embodiment, based on apartment layout information, furniture library information, and preset spatial constraints, a second candidate home decoration layout scheme is generated through a pre-defined diffusion model, including: The third candidate home decoration layout scheme is represented as an unordered set of candidate pose slots, where each candidate pose slot represents the third candidate position and third candidate orientation of a piece of furniture in the room to be laid out. An ensemble encoder is used to encode the pose slot set to obtain an initial latent representation; A diffusion model is used to perform the forward noise addition process: Gaussian noise is gradually added to the initial latent representation over multiple time steps to obtain a random noise vector; An ensemble encoder is used to encode the apartment layout information and preset spatial constraints to generate a conditional context vector; Using a diffusion model, a reverse denoising process is performed starting from a random noise vector: Select the current time step sequentially from the preset time step sequence; Based on the initial noise latent representation of the current time step, the intermediate furniture layout scheme of the current time step is generated by decoding with an ensemble decoder. Calculate the degree of deviation between the intermediate furniture layout scheme at the current time step and the preset spatial constraints; Generate constraint gradients based on the degree of deviation; Based on the initial noise latent representation and conditional context vector at the current time step, the noise at the current time step is predicted by the denoising network of the diffusion model, and the constraint gradient is added as a correction term to the predicted noise to obtain the corrected noise. The corrected noise is removed from the initial noise latent representation of the current time step to obtain the updated latent representation. The updated latent representation is used as the initial noise latent representation of the next time step. The process of selecting the current time step sequentially from the preset time step sequence continues until all time steps have been iterated. Finally, the target latent representation is output, where the initial noise latent representation of the first time step is a random noise vector. The target latent representation is decoded into a second candidate home decoration layout scheme using a set decoder.

[0010] In an alternative embodiment, before sampling from the set of candidate home decoration layout schemes, including a first candidate home decoration layout scheme and a second candidate home decoration layout scheme, via a generative flow network model, the method further includes: Construct a generative flow network model, which is used to characterize the path probability distribution from the initial state to the terminal state via at least one action; Multiple generated paths from the initial state to the final state are obtained through trajectory sampling; Calculate the overall score of the candidate home decoration layout schemes corresponding to each path; The parameters of the generative flow network model are updated according to the principle of probability flow conservation to obtain a pre-trained generative flow network model. The probability distribution of the target candidate home decoration layout scheme output by the pre-trained generative flow network model is proportional to the comprehensive score. For any non-terminating state, the sum of the probability flows of all paths entering the state is equal to the sum of the probability flows of all possible actions starting from the state.

[0011] In an alternative embodiment, the expression for the first target energy function is:

[0012] in, Used to indicate the penalty for overlapping furniture. This indicates the penalty for furniture entering the door sweeping area. This signifies punishment for furniture blocking the sunlight from the window. Indicates the penalty for misalignment between furniture and the wall; These are adjustable weighting parameters.

[0013] In an optional embodiment, it further includes: Based on the received selection operation, a selected home decoration layout scheme is determined from at least one target home decoration layout scheme, and a preference pair is constructed, wherein the preference pair includes the selected home decoration layout scheme and the unselected home decoration layout scheme in the target home decoration layout scheme, which is used to indicate that the user preference for the selected home decoration layout scheme in the target home decoration layout scheme is higher than the user preference for the unselected home decoration layout scheme. Extract the layout feature vector of each target home decoration layout scheme from at least one target home decoration layout scheme; Based on preference pairs and layout feature vectors, the following training process is performed on the probabilistic preference learning model: Based on the difference between the weight vector and the layout feature vector of the selected home decoration layout scheme and the layout feature vector of the unselected home decoration layout scheme, the probability of the selected home decoration layout scheme being selected relative to the unselected home decoration layout scheme is predicted; based on the selection probability and the true selected label, a cross-entropy loss function is constructed; based on the cross-entropy loss function, the weight vector is optimized by gradient descent and the weight vector is updated to minimize the cross-entropy loss function. Based on the updated weight vector, the weight parameters in the first objective energy function are updated to obtain the second objective energy function; Continue executing the steps of calculating the gradient of the second objective energy function relative to each optimization variable in each iteration optimization, using the gradient to update the position and orientation parameters of the furniture through a gradient descent optimizer, and outputting at least one objective home decoration layout scheme when the current iteration meets the preset iteration stopping condition.

[0014] A second aspect of this application is to provide a home decoration layout device, comprising: The acquisition module is used to obtain the floor plan information and furniture list of the room to be laid out; The generation module is used to generate at least one target candidate home decoration layout scheme based on the apartment type information and the furniture list, wherein each target candidate home decoration layout scheme includes the target candidate positions and target candidate orientations of the furniture in the room to be arranged in the furniture list. The first construction module is used to construct a furniture-obstacle relationship matrix based on the target candidate home decoration layout scheme. The obstacle is a fixed structure in the room to be laid out that cannot be encroached upon. The relationship matrix includes multiple elements, each element representing the distance between the furniture and the obstacle. The second construction module is used to construct continuously differentiable penalty terms based on distance; A building block for constructing the first objective energy function based on the penalty term; The iteration module is used to input the target candidate position and target candidate orientation of each piece of furniture in the target candidate home decoration layout scheme as optimization variables into the gradient descent optimizer. In each iteration optimization, the gradient of the first objective energy function with respect to each optimization variable is calculated. The gradient is used to update the position parameters and orientation parameters of the furniture through the gradient descent optimizer. When it is determined that the current iteration meets the preset iteration stopping condition, at least one target home decoration layout scheme is output.

[0015] A third aspect of this application is to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the method as described in the first aspect.

[0016] A fourth aspect of this application is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the method as described in the first aspect.

[0017] Compared with existing technologies, the home decoration layout method provided in this application generates at least one target candidate home decoration layout scheme based on the apartment layout information and furniture list of the room to be laid out; constructs a furniture-obstacle relationship matrix based on the target candidate home decoration layout scheme; constructs a continuously differentiable penalty term based on the distance in the furniture-obstacle relationship matrix; constructs a first target energy function based on the penalty term; inputs the target candidate position and target candidate orientation of each piece of furniture in the target candidate home decoration layout scheme as optimization variables into a gradient descent optimizer; in each iteration of optimization, the gradient of the first target energy function relative to each optimization variable is calculated, and the position parameters and orientation parameters of the furniture are updated using the gradient through the gradient descent optimizer; when the current iteration meets the preset iteration stopping condition, at least one target home decoration layout scheme is output. This improves the accuracy of the layout. Attached Figure Description

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

[0019] Figure 1 A schematic flowchart of a home decoration layout method provided in an embodiment of this application; Figure 2 A structural block diagram of a home decoration layout device provided in an embodiment of this application; Figure 3 This is a structural block diagram of an electronic device for implementing a home decoration layout method, provided in an embodiment of this application. Detailed Implementation

[0020] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0021] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0022] It should be understood that in the embodiments of this application, "at least one" means one or more, and "more than one" means two or more. "And / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the related objects before and after it are in an "or" relationship. "Contains A, B and / or C" means containing any one, two, or three of A, B, and C.

[0023] It should be understood that in the embodiments of this application, "B corresponding to A", "B corresponding to A", "A corresponds to B" or "B corresponds to A" means that B is associated with A, and B can be determined based on A. Determining B based on A does not mean that B is determined solely based on A; B can also be determined based on A and / or other information.

[0024] To address the technical problems existing in related technologies, embodiments of this application provide a home decoration layout method, apparatus, electronic device, and storage medium.

[0025] The home decoration layout method provided in this application can be executed by an electronic device, which can be a terminal or a server. The terminal can be a smartphone, tablet, laptop, or other similar device. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. It is understood that this application does not limit the specific entity executing the home decoration layout method.

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

[0027] To address the technical problems existing in related technologies, embodiments of this application provide a home decoration layout method, such as... Figure 1 As shown, Figure 1 This is an example flowchart of a home decoration layout method provided in an embodiment of this application. It should be noted that the steps shown may be executed in a different logical order than that shown in the flowchart. The method may include the following steps S101 to S106.

[0028] Step S101: Obtain the floor plan information and furniture list of the room to be laid out.

[0029] In one optional embodiment, obtaining the floor plan information of the room to be laid out specifically includes the following steps: Obtain the floor plan of the room to be laid out; parse the floor plan, extract the floor plan information, obtain multiple geometric objects, and represent the geometric objects as a set of two-dimensional polygons.

[0030] In one alternative embodiment, the apartment layout information includes at least one of the following: walls, doors and windows, and functional areas.

[0031] In one alternative embodiment, the floor plan is represented in CAD format.

[0032] In one alternative embodiment, the furniture list is used to indicate the furniture to be used in arranging a room. For example, when arranging a bedroom, the furniture list may include windows, wardrobes, bedside tables, and dressing tables.

[0033] In one alternative embodiment, the furniture list can be entered by the user or retrieved from a furniture library. For example, the furniture library includes the functional attributes of a room and a list of furniture corresponding to those attributes.

[0034] Step S102: Based on the apartment layout information and furniture list, generate at least one target candidate home decoration layout scheme.

[0035] In one alternative embodiment, each target candidate home furnishing layout scheme includes target candidate locations and target candidate orientations of furniture from the furniture list in the room to be laid out.

[0036] In one optional embodiment, based on the floor plan and furniture list, at least one target candidate home decoration layout scheme is generated, specifically including the following steps: For each piece of furniture in the furniture list, generate a footprint outline and an activity surface outline. The footprint outline is the outer polygon of the furniture body, and the activity surface outline is obtained by expanding the buffer based on the footprint outline and ergonomic rules. Based on the footprint outline and activity surface outline of the furniture, generate furniture library information. Based on the apartment type information, furniture library information, and preset spatial constraints, generate a first candidate home decoration layout scheme through the CP-SAT (Constraint Programming - Satisfiability) constraint programming solver. The first candidate home decoration layout scheme includes the first candidate position and first candidate orientation of the furniture in the room to be laid out. Based on the apartment type information, furniture library information, and preset spatial constraints, generate a second candidate home decoration layout scheme through a preset diffusion model. The second candidate home decoration layout scheme includes the second candidate position and second candidate orientation of the furniture in the room to be laid out. Sample from the set of candidate home decoration layout schemes including the first and second candidate home decoration layout schemes through a pre-trained generative flow network model to obtain at least one target candidate home decoration layout scheme.

[0037] In one specific embodiment, the footprint profile is used to represent the direct collision relationship between the furniture and other solid objects (walls, columns, other furniture). The movable surface profile extends to provide a buffer zone, such as the clear distance to the side of a bed or the space behind a chair, to ensure ergonomic requirements.

[0038] In one specific embodiment, the furniture library information includes all the positions and orientations of the furniture obtained by satisfying the footprint outline and activity surface outline conditions.

[0039] In one specific embodiment, the preset spatial constraints include at least one of the following constraints: furniture must not overlap, furniture must not enter the door sweeping area, furniture must not block the light strip in front of the window, and furniture must not penetrate fixed structures such as walls. This application does not limit the preset spatial constraints.

[0040] Considering that a medium-sized residential apartment often involves more than twenty pieces of furniture, each with multiple candidate locations, orientations, and model variations, the solution space grows exponentially with the number of variables. Relying solely on traditional Constraint Programming (CP), while capable of fully expressing hard constraints such as "furniture does not overlap" and "door sweep areas must not be encroached upon," leads to a rapid expansion of the search tree depth as the number of variables increases, resulting in a sharp decline in solution efficiency and a high risk of prolonged backtracking or even non-convergence. Therefore, this paper proposes a method combining Graph Neural Networks (GNNs) and Constraint Programming with Satisfiability Problems (CP-SAT) to improve the solution speed and feasibility of large-scale scenarios.

[0041] In one optional embodiment, based on apartment layout information, furniture library information, and preset spatial constraints, a first candidate home decoration layout scheme is generated using the CP-SAT constraint programming solver, specifically including the following steps: Based on the apartment layout information and furniture library information, a third candidate home decoration layout scheme is generated. This third candidate layout scheme includes at least one candidate furniture pose information, which includes the third candidate position and third candidate orientation of the furniture in the room to be arranged. Using the candidate furniture pose information as nodes, if there is a potential conflict between any two nodes, an edge is established between the nodes to construct a conflict graph model. The initial feature vectors of each node in the conflict graph model are obtained. The initial feature vectors of each node are updated using a graph neural network to obtain a high-dimensional representation of each node, which reflects global constraints and local conflicts. The priority score of each node is output based on its high-dimensional representation using the graph neural network. The priority score is converted into a variable branching and sorting strategy and passed as a search guide to the CP-SAT constraint programming solver. The CP-SAT constraint programming solver outputs a first candidate home decoration layout scheme that satisfies the preset spatial constraints.

[0042] In one alternative embodiment, potential conflict relationships include at least one of the following: the space required for the use of furniture overlaps with that of other objects, the furniture's location is within a necessary passageway, and it competes with other furniture for a functional anchor point or physical interface on the same wall. This application does not limit this.

[0043] In one optional embodiment, the initial feature vector includes at least one of the following: furniture geometric information, furniture activity space requirement information, furniture functional attribute information, and relative position information of the furniture in the room to be laid out. This application does not limit this information.

[0044] It should be noted that furniture geometric information describes the physical dimensions of the furniture itself, used for collision testing, calculating space occupancy, and determining whether it can be accessed through the foyer into the room. Furniture activity space requirement information refers to the buffer zone that needs to be reserved around the furniture for human movement, defined based on ergonomic rules, to ensure user comfort, avoid obstructed movement, and support operations such as opening doors / drawers. Furniture functional attribute information indicates the furniture's purpose and its semantic role in space, used to determine the areas where it can be placed (e.g., a bed should be in the bedroom) and its relationship with other furniture (e.g., a TV cabinet should face a sofa). The relative position information of the furniture in the room to be arranged describes the spatial relationship of the furniture relative to reference frames such as walls, doors, windows, and the center of the room, to achieve aesthetic rules such as placing it against walls and aligning it with the central axis, and to avoid obstructing light or passage.

[0045] In an alternative embodiment, the initial feature vector is updated to a high-dimensional representation that reflects local conflicts and global constraints through multi-layer graph convolution or message passing.

[0046] In this embodiment, the priority scores learned by the GNN (Graph Neural Network) enable the CP-SAT constraint programming solver to prioritize expanding more feasible variables during branching, significantly reducing invalid branches and backtracking times, thereby accelerating search convergence.

[0047] In another optional embodiment, when the search process is detected to meet the preset stagnation condition, the LNS (Large Neighborhood Search) mechanism is triggered, at least some furniture variables are selected to be destroyed, the current values ​​of the furniture variables are released, and the solution is re-solved through the CP-SAT constraint programming solver to output the first candidate home decoration layout scheme that meets the preset spatial constraints.

[0048] In one specific embodiment, the preset stagnation condition refers to the determination that the current search has entered a "slow or no progress" state when certain performance index thresholds are met during the optimization / search process. This actively triggers global perturbation mechanisms such as LNS to explore new solution space regions. The preset stagnation condition includes at least one of the following conditions: the target energy function value does not show a strict decrease in several consecutive iterations (or within a time window); the solver fails to generate new feasible solutions per unit time, indicating that the search space is "exhausted" or stuck in a dead end; the position or orientation of most furniture remains unchanged in multiple iterations, indicating that the search tends to "freeze"; there are several "stubborn conflicts" in the system (such as a piece of furniture that can never avoid the door sweeping area) that cannot be resolved for a long time; the search tree expansion speed inside CP-SAT decreases significantly, indicating that the current branching strategy is inefficient; and although the algorithm is still running, the user actively requests "a different style" or "re-exploration," which can be regarded as an external stagnation signal.

[0049] In this embodiment, through this "destruction-repair" iteration, the system can effectively escape local optima and continue to explore feasible solutions in a larger solution space.

[0050] Traditional methods often only output a single solution, or obtain several similar solutions under limited heuristic search, lacking substantial diversity. Users in practical design need to choose from multiple solutions that are functionally reasonable and stylistically diverse, a requirement that current technologies struggle to meet. By leveraging the probabilistic modeling capabilities of a generative diffusion model, the furniture arrangement problem is modeled as a "set generation" problem. This allows for the generation of multiple differentiated initial solutions in the solution space, providing a rich candidate set for subsequent optimization and user selection.

[0051] In another optional embodiment, based on apartment layout information, furniture library information, and preset spatial constraints, a second candidate home decoration layout scheme is generated through a pre-set diffusion model, specifically including the following steps: The third candidate home furnishing layout scheme is represented as an unordered set of candidate pose slots. Each candidate pose slot represents the third candidate position and third candidate orientation of a piece of furniture in the room to be laid out. An ensemble encoder is used to encode the pose slot set to obtain an initial latent representation. A diffusion model is used to perform a forward noise addition process: Gaussian noise is gradually added to the initial latent representation over multiple time steps to obtain a random noise vector. An ensemble encoder is used to encode the apartment layout information and preset spatial constraints to generate a conditional context vector. A diffusion model is used to perform a reverse noise reduction process starting from the random noise vector: the current time step is selected sequentially from a preset time step sequence. Based on the initial noise latent representation of the current time step, an ensemble decoder is used to decode and generate the intermediate furniture layout scheme for the current time step. The intermediate furniture layout scheme for the current time step is calculated. The system determines the degree of deviation between the layout scheme and the preset spatial constraints; generates constraint gradients based on the degree of deviation; predicts the noise of the current time step using a denoising network of a diffusion model based on the initial noise latent representation and conditional context vector of the current time step, and adds the constraint gradient as a correction term to the predicted noise to obtain the corrected noise; removes the corrected noise from the initial noise latent representation of the current time step to obtain an updated latent representation, and uses the updated latent representation as the initial noise latent representation of the next time step, continuing to execute the step of sequentially selecting the current time step from the preset time step sequence until all time steps have been iterated, and outputs the target latent representation, where the initial noise latent representation of the first time step is a random noise vector; and decodes the target latent representation into a second candidate home decoration layout scheme using an ensemble decoder.

[0052] In this embodiment, since the generation process is driven by random sampling, a considerable number of candidate solutions can be generated in a very short time. Through multiple independent samplings, multiple solutions with differences in spatial layout, aesthetic style, and furniture placement logic can be obtained, rather than just slight perturbations to the same solution.

[0053] This embodiment significantly improves the diversity and coverage of generated solutions. Unlike traditional optimization algorithms that search near a single solution, the ensemble diffusion model explores the potential solution space globally, discovering multiple layouts that are stylistically different but equally reasonable. For example, in the same bedroom scenario, the model might output a layout with the bed against the south wall and the wardrobe against the east wall, or it might output a layout with the bed against the west wall and the wardrobe against the north wall. Both are functionally reasonable but provide the user with completely different design styles. These solutions not only meet the basic constraints of the room but also provide a broad candidate space for subsequent fine-tuning and personalized adaptation, avoiding the problem of convergence in the final results.

[0054] In one specific embodiment, each candidate pose slot is used to represent the third candidate position, third candidate orientation, furniture category, and furniture size of a piece of furniture in the room to be laid out, etc., which are not limited in this application.

[0055] In one specific embodiment, the ensemble encoder can be a CNN (Convolutional Neural Network) or a Transformer, etc. The ensemble decoder can be a CNN (Convolutional Neural Network) or a Transformer, etc. This application does not limit this.

[0056] In one specific embodiment, a diffusion model is used to perform the forward noise addition process, which includes adding Gaussian noise to the initial latent representation over T discrete time steps to obtain a random noise vector. This process constitutes a Markov chain, such that the state at any time t depends only on the previous time step, ensuring the reversibility of the latent space transformation.

[0057] In one specific embodiment, the current time step t is selected sequentially from a preset time step sequence t=T,T-1,...,1.

[0058] In one specific embodiment, the degree of deviation is calculated based on the geometric deviation, distance deviation, or angle deviation between the intermediate furniture layout scheme based on the current time step and the preset spatial constraints.

[0059] In one specific embodiment, automatic differentiation is used to compute the constraint gradient of the loss function with respect to the current latent representation.

[0060] While the solutions generated by the above embodiments conform to basic specifications, they often concentrate around a few patterns and lack sufficient diversity. In actual design, users usually want to choose from several functionally equivalent but stylistically different candidates. By introducing GFlowNet (Generative Flow Network) as the core mechanism for diversity sampling, the aim is to fundamentally solve the problem of "high decomposition convergence".

[0061] The fundamental idea behind GFlowNet is to model the solution generation process as a progressively constructed path. Furniture arrangement can be naturally represented as a series of state transitions: the initial state is an empty room, each action corresponds to placing a piece of furniture at a candidate location, and the final state is the complete arrangement. Through this modeling, the entire solution space is represented as a state-action graph. GFlowNet requires probability flow conservation during training, meaning that for any non-terminal state, the probability flow of entering that state is equal to the probability flow of leaving that state. This constraint ensures that the distribution of solutions generated by the entire network converges to the target distribution, which is defined in this application as a distribution "proportional to the solution score." In other words, the higher the overall score of a solution, the greater its probability of being sampled, but all high-scoring solutions will have a chance to be output, rather than being monopolized by a single optimal solution.

[0062] In another alternative embodiment, before sampling from the set of candidate home decoration layout schemes, including the first candidate home decoration layout scheme and the second candidate home decoration layout scheme, by generating a flow network model, the method further includes: A generative flow network model is constructed to represent the probability distribution of paths from the initial state to the terminal state via at least one action. Multiple generative paths from the initial state to the terminal state are obtained through trajectory sampling. The comprehensive score of the candidate home decoration layout schemes corresponding to each path is calculated. The parameters of the generative flow network model are updated according to the probability flow conservation principle to obtain a pre-trained generative flow network model. The probability distribution of the target candidate home decoration layout schemes output by the pre-trained generative flow network model is proportional to the comprehensive score. For any non-terminal state, the sum of the probability flows of all paths entering the state is equal to the sum of the probability flows of all possible actions starting from the state.

[0063] In one specific embodiment, for any generation path τ, its probability distribution P(τ) satisfies P(τ) ∝ R(τ) when it converges, where R(τ) is the scoring function of the target candidate home decoration layout scheme.

[0064] In this embodiment, GFlowNet not only tends to select solutions with higher scores but also maintains a balance between high decomposition across different categories, preventing all samples from concentrating on a single pattern. This results in a solution set that includes solutions with optimal mobility, solutions with outstanding space utilization, and even solutions that are aesthetically symmetrical or innovative. This mechanism provides a truly discriminative set of multiple solutions. In practical applications, users can choose the most suitable result from multiple functionally equivalent but stylistically different layout options based on their preferences, significantly improving the system's usability and user satisfaction.

[0065] Step S103: Based on the target candidate home decoration layout scheme, construct the furniture and obstacle relationship matrix.

[0066] It should be noted that obstacles are fixed structures in the room to be laid out that cannot be encroached upon. The relationship matrix includes multiple elements, each representing the distance between the furniture and the obstacle.

[0067] In one optional embodiment, based on the target candidate home furnishing layout scheme, a furniture-obstacle relationship matrix is ​​constructed using SDF (Signed Distance Field). The distance between furniture and obstacles is the minimum signed distance.

[0068] It should be noted that SDF refers to: for any geometric object A and another object B, a continuous function d(A, B) can be defined to represent the minimum signed distance between A and B. When A is outside B, d ≥ 0, and the value is equal to the minimum separation distance; when A and B overlap, d < 0, and the absolute value is equal to the overlap depth.

[0069] Step S104: Construct a continuously differentiable penalty term based on distance.

[0070] In an alternative embodiment, a smooth approximation function softplus(max(0, -d)) is used to construct the penalty term.

[0071] In one alternative embodiment, the penalty includes at least one of the following: penalty for overlapping furniture, penalty for furniture blocking the light strip in front of a window, penalty for furniture entering the door sweeping area, and penalty for misalignment between furniture and the wall. This application does not limit this.

[0072] In this step, a penalty term is constructed so that the subsequent optimizer can automatically adjust the furniture position according to the gradient direction during the iteration process, gradually eliminating the conflict.

[0073] Step S105: Construct the first objective energy function based on the penalty term.

[0074] In an alternative embodiment, the expression for the first target energy function is:

[0075] in, Used to indicate the penalty for overlapping furniture. This indicates the penalty for furniture entering the door sweeping area. This signifies punishment for furniture blocking the sunlight from the window. Indicates the penalty for misalignment between furniture and the wall; These are adjustable weighting parameters.

[0076] In one specific embodiment, the weight parameters can be initially set manually.

[0077] Step S106: Input the target candidate position and target candidate orientation of each piece of furniture in the target candidate home decoration layout scheme as optimization variables into the gradient descent optimizer. In each iteration of optimization, calculate the gradient of the first objective energy function relative to each optimization variable. Use the gradient to update the position parameters and orientation parameters of the furniture through the gradient descent optimizer. When it is determined that the current iteration meets the preset iteration stopping condition, output at least one target home decoration layout scheme.

[0078] In one specific embodiment, the target candidate position is represented by (x,y), and the target candidate orientation is represented by θ.

[0079] In one specific embodiment, the gradient descent optimizer can be an L-BFGS (Limited-memory Broyden–Fletcher–Goldfarb–Shanno algorithm) optimizer or an Adam (Adaptive Moment Estimation) optimizer, etc., and this application does not limit it.

[0080] In one specific embodiment, the preset iteration stopping condition includes at least one of the following conditions: the loss value has not decreased sufficiently or the number of iterations has reached a preset threshold. This application does not limit this.

[0081] In one specific embodiment, the target candidate location is normalized to the room scale, and the target candidate orientation is encoded using sine-cosine dual encoding to ensure the gradient is balanced across different dimensions.

[0082] In this embodiment, local continuous optimization is performed based on the global solution, allowing solutions that were originally feasible only at the macroscopic level to be adjusted at the millimeter level in detail. Compared with relying on heuristic correction or manual dragging, this method has the advantages of being fully automated, numerically accurate, and having strong consistency in results. Experiments show that in typical bedroom and living room layout scenarios, this embodiment can effectively eliminate more than 95% of minor conflicts, ensuring that the net distance, alignment, and lighting requirements of furniture such as beds, cabinets, tables, and chairs fully meet design specifications, thereby guaranteeing the reliability of the final solution in terms of both comfort and aesthetics.

[0083] The ultimate effectiveness of furniture arrangement depends not only on whether it meets building codes and ergonomics, but more importantly, on whether it aligns with users' functional needs and aesthetic preferences. Existing methods mostly rely on fixed objective functions, such as a weighted sum of indicators like space utilization, circulation rationality, and aesthetic alignment as the scoring standard. However, the weights of these indicators are often pre-set by the system designer, failing to consider the individual differences among users. For example, some users prioritize spacious and convenient passageways, while others value furniture symmetry and aesthetic neatness. Fixed-weight optimization methods cannot dynamically adapt to these preference differences, resulting in outcomes that, even if objectively reasonable, may not be subjectively acceptable to users.

[0084] In another optional embodiment, the home decoration layout method provided in this application further includes: Based on the received selection operation, a selected home decoration layout scheme is determined from at least one target home decoration layout scheme. A preference pair is constructed, where each preference pair includes the selected home decoration layout scheme and the unselected home decoration layout scheme from the target home decoration layout schemes, representing that the user's preference for the selected home decoration layout scheme is higher than that for the unselected home decoration layout scheme. The layout feature vector of each target home decoration layout scheme is extracted. Based on the preference pair and the layout feature vector, the following training process is performed on the probabilistic preference learning model: according to the weight vector and the difference between the layout feature vector of the selected home decoration layout scheme and the layout feature vector of the unselected home decoration layout scheme... The process involves predicting the probability of a selected home decoration layout scheme being chosen relative to unselected schemes; constructing a cross-entropy loss function based on the selection probability and the actual selected labels; optimizing the weight vector using gradient descent based on the cross-entropy loss function to minimize the cross-entropy loss function; updating the weight parameters in the first objective energy function based on the updated weight vector to obtain the second objective energy function; continuing to execute the steps of calculating the gradient of the second objective energy function relative to each optimization variable in each iteration, using the gradient to update the furniture's position and orientation parameters through a gradient descent optimizer, and outputting at least one objective home decoration layout scheme when the current iteration meets the preset iteration stopping condition.

[0085] In one specific embodiment, the selection operation may be triggered by a user via an electronic device.

[0086] In one specific embodiment, the layout feature vector is used to indicate at least one of the following information: space utilization, total circulation length, aesthetic alignment, furniture-boundary distance, and passage width, etc., which are not limited in this application.

[0087] In one specific embodiment, the probabilistic preference learning model can be a logistic regression model, etc., and this application does not limit it.

[0088] In this embodiment, the optimization process of user customization and dynamic evolution is achieved through the synergy of outer layer preference learning and inner layer layout optimization.

[0089] In the inner layout optimization stage, a fixed scoring function is no longer used. Instead, the weight vector w learned from the outer layer is used to update the new objective function. This ensures that the generated solution not only meets basic geometric and functional constraints but also tends to meet the user's personalized needs at the objective function level. For example, when a user shows a preference for "furniture alignment" in multiple interactions, the alignment-related components in the weight vector w will gradually increase, making the newly generated solution emphasize the neat placement of furniture along walls or axes. Conversely, when the user prioritizes smooth traffic flow, the system will automatically increase the weight of passage width and path optimization in the objective function.

[0090] The advantage of this two-layer structure lies in its macroscopic closed-loop optimization: the outer layer learns users' subjective evaluations, the inner layer generates new solutions, and the results are fed back to the users, thus continuously iterating. Compared with single-layer optimization, the two-layer architecture not only ensures the feasibility and refinement of the solution but also gradually approaches the user's ideal solution, achieving a "the more you use it, the better you understand it" effect. During use, preference weights are continuously updated and stored in the user profile, gradually forming a stable personalized model through long-term interaction. The two-layer preference adaptive optimizer enables the furniture arrangement system to have continuous learning and dynamic adaptation capabilities. Firstly, it can automatically distinguish preferences among different user groups, ensuring that each user receives a personalized solution that meets their needs. Secondly, it can gradually adjust the optimization direction as users use the system, achieving the evolution of solution generation. Thirdly, in group application scenarios, it can also form market segmentation profiles by aggregating preference models, providing real estate developers or interior design platforms with customized apartment recommendations for different customer groups.

[0091] In this application, existing systems often rely on discrete Boolean decisions to handle geometric constraints with high precision. These systems cannot provide effective adjustment directions when the solution approaches the boundary, frequently leading to minor conflicts or requiring manual adjustments. This application transforms geometric relationships into continuously differentiable functions and employs numerical optimization methods for millimeter-level adjustments. This fully automates the elimination of minor conflicts between furniture pieces and between furniture and doors / windows, significantly reducing manual intervention and improving the accuracy and consistency of design results.

[0092] Secondly, regarding the efficiency of solving large-scale solution spaces, while traditional constraint programming can express constraints, it often gets stuck in search stagnation or backtracking explosion when the number of variables is large. This application uses a neural-guided constraint programming solver, which utilizes graph neural networks to predict the branch priority of variables, guiding the CP-SAT solver to enter the feasible region more quickly; at the same time, it combines a large neighborhood search mechanism to effectively escape local optima. Experiments show that this method can reduce the convergence time to half or even less than that of the original method in complex three- or four-bedroom scenarios, significantly improving computational efficiency.

[0093] Furthermore, regarding solution diversity and coverage, existing optimization algorithms typically only provide a single solution or multiple highly similar solutions, failing to meet users' demands for diverse choices. This application, through the combination of a set-diffusion layout generator and a generation flow network diversity sampler, can generate and sample multiple significantly different solutions in the global solution space. The generated results are not only reasonable in spatial distribution and functional logic, but also substantially different in style, aesthetics, and circulation arrangement, providing users with truly diverse choices and avoiding the phenomenon of "all solutions converging."

[0094] Furthermore, existing methods typically employ fixed scoring functions, making it difficult to adapt to the preferences of different users, particularly in terms of personalization and adaptability. The proposed two-layer preference adaptive optimizer learns user selection behavior in the outer layer and dynamically updates the objective function weights, while the inner layer re-runs the optimization process. This allows the system to continuously learn and gradually align with user needs. After a certain number of interactions, the system can significantly improve user satisfaction with the generated solutions, truly achieving a personalized optimization effect that "understands better the more it's used."

[0095] In summary, compared with existing technologies, this approach not only overcomes the limitations of traditional methods such as insufficient geometric accuracy, low solution efficiency, limited solution options, and lack of personalization, but also achieves significant results in reducing manual correction costs, increasing calculation speed, expanding the range of design choices, and enhancing user satisfaction. Therefore, this application provides a technologically advanced and highly valuable overall solution in the field of residential floor plan optimization and furniture arrangement.

[0096] Corresponding to the home decoration layout method provided in the embodiments of this application, the embodiments of this application also provide a home decoration layout device, such as... Figure 2 As shown, the home furnishing layout device includes: Module 201 is used to obtain the floor plan information and furniture list of the room to be laid out; The generation module 202 is used to generate at least one target candidate home decoration layout scheme based on the apartment type information and the furniture list, wherein each target candidate home decoration layout scheme includes the target candidate position and target candidate orientation of the furniture in the furniture list in the room to be arranged; The first construction module 203 is used to construct a furniture-obstacle relationship matrix based on the target candidate home decoration layout scheme. The obstacle is a fixed structure in the room to be laid out that cannot be encroached upon. The relationship matrix includes multiple elements, each element representing the distance between the furniture and the obstacle. The second construction module 204 is used to construct a continuously differentiable penalty term based on distance; Module 205 is used to construct the first objective energy function based on the penalty term; The iteration module 206 is used to input the target candidate position and target candidate orientation of each piece of furniture in the target candidate home decoration layout scheme as optimization variables into the gradient descent optimizer. In each iteration optimization, the gradient of the first objective energy function relative to each optimization variable is calculated. The gradient is used to update the position parameters and orientation parameters of the furniture through the gradient descent optimizer. When it is determined that the current iteration meets the preset iteration stopping condition, at least one target home decoration layout scheme is output.

[0097] Corresponding to the home decoration layout method provided in the embodiments of this application, the embodiments of this application also provide an electronic device for performing the home decoration layout method, such as... Figure 3 As shown, the electronic device includes: a processor 301; and a memory 302 for storing a program for a home decoration layout method. After the device is powered on and the program for the home decoration layout method is run by the processor, the following steps are performed: Obtain the floor plan information and furniture list of the rooms to be furnished; Based on the apartment layout information and furniture list, at least one target candidate home decoration layout scheme is generated, wherein each target candidate home decoration layout scheme includes the target candidate position and target candidate orientation of the furniture in the room to be arranged in the furniture list; Based on the target candidate home decoration layout scheme, a furniture and obstacle relationship matrix is ​​constructed. The obstacle is a fixed structure in the room to be laid out that cannot be encroached upon. The relationship matrix includes multiple elements, each element representing the distance between the furniture and the obstacle. Construct a continuously differentiable penalty term based on distance; Construct the first objective energy function based on the penalty term; The target candidate position and target candidate orientation of each piece of furniture in the target candidate home decoration layout scheme are input as optimization variables into the gradient descent optimizer. In each iteration of optimization, the gradient of the first objective energy function relative to each optimization variable is calculated. The position parameters and orientation parameters of the furniture are updated by the gradient descent optimizer. When the current iteration meets the preset iteration stopping condition, at least one target home decoration layout scheme is output.

[0098] Corresponding to the home decoration layout method provided in the embodiments of this application, the embodiments of this application also provide a computer-readable storage medium storing a program for the home decoration layout method, which is executed by a processor to perform the following steps: Obtain the floor plan information and furniture list of the rooms to be furnished; Based on the apartment layout information and furniture list, at least one target candidate home decoration layout scheme is generated, wherein each target candidate home decoration layout scheme includes the target candidate position and target candidate orientation of the furniture in the room to be arranged in the furniture list; Based on the target candidate home decoration layout scheme, a furniture and obstacle relationship matrix is ​​constructed. The obstacle is a fixed structure in the room to be laid out that cannot be encroached upon. The relationship matrix includes multiple elements, each element representing the distance between the furniture and the obstacle. Construct a continuously differentiable penalty term based on distance; Construct the first objective energy function based on the penalty term; The target candidate position and target candidate orientation of each piece of furniture in the target candidate home decoration layout scheme are input as optimization variables into the gradient descent optimizer. In each iteration of optimization, the gradient of the first objective energy function relative to each optimization variable is calculated. The position parameters and orientation parameters of the furniture are updated by the gradient descent optimizer. When the current iteration meets the preset iteration stopping condition, at least one target home decoration layout scheme is output.

[0099] Corresponding to the home decoration layout method provided in the embodiments of this application, the embodiments of this application also provide a computer program containing instructions, which, when executed by a computer, cause the computer to perform the following steps: Obtain the floor plan information and furniture list of the rooms to be furnished; Based on the apartment layout information and furniture list, at least one target candidate home decoration layout scheme is generated, wherein each target candidate home decoration layout scheme includes the target candidate position and target candidate orientation of the furniture in the room to be arranged in the furniture list; Based on the target candidate home decoration layout scheme, a furniture and obstacle relationship matrix is ​​constructed. The obstacle is a fixed structure in the room to be laid out that cannot be encroached upon. The relationship matrix includes multiple elements, each element representing the distance between the furniture and the obstacle. Construct a continuously differentiable penalty term based on distance; Construct the first objective energy function based on the penalty term; The target candidate position and target candidate orientation of each piece of furniture in the target candidate home decoration layout scheme are input as optimization variables into the gradient descent optimizer. In each iteration of optimization, the gradient of the first objective energy function relative to each optimization variable is calculated. The position parameters and orientation parameters of the furniture are updated by the gradient descent optimizer. When the current iteration meets the preset iteration stopping condition, at least one target home decoration layout scheme is output.

[0100] It should be noted that for a detailed description of the home decoration layout device, electronic device, computer-readable storage medium and computer program provided in the embodiments of this application, please refer to the relevant description of the home decoration layout method embodiments provided in the embodiments of this application, which will not be repeated here.

[0101] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.

[0102] In a typical configuration, an electronic device includes one or more processors (Central Processing Units), input / output interfaces, network interfaces, and memory.

[0103] Memory may include non-persistent storage in computer-readable media, such as random access memory and / or non-volatile memory, like read-only memory or flash memory. Memory is an example of computer-readable media.

[0104] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable operations, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PCM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital video disc (DMCD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.

[0105] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, compact disc read-only memory, optical storage, etc.) containing computer-usable program code.

[0106] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.

Claims

1. A home decoration layout method, characterized in that, include: Obtain the floor plan information and furniture list of the rooms to be furnished; Based on the apartment layout information and furniture list, at least one target candidate home decoration layout scheme is generated, wherein each target candidate home decoration layout scheme includes the target candidate position and target candidate orientation of the furniture in the furniture list in the room to be arranged; Based on the target candidate home decoration layout scheme, a furniture and obstacle relationship matrix is ​​constructed. The obstacle is a fixed structure in the room to be laid out that cannot be encroached upon. The relationship matrix includes multiple elements, each of which represents the distance between the furniture and the obstacle. Construct a continuously differentiable penalty term based on the distance; Construct a first objective energy function based on the penalty term; The target candidate position and target candidate orientation of each piece of furniture in the target candidate home decoration layout scheme are input as optimization variables into the gradient descent optimizer. In each iteration of optimization, the gradient of the first target energy function relative to each optimization variable is calculated. The position parameters and orientation parameters of the furniture are updated by the gradient through the gradient descent optimizer. When it is determined that the current iteration meets the preset iteration stopping condition, at least one target home decoration layout scheme is output.

2. The home decoration layout method according to claim 1, characterized in that, The step of generating at least one target candidate home decoration layout scheme based on the apartment type information and furniture list includes: For each piece of furniture in the furniture list, generate a footprint outline and an active surface outline. The footprint outline is the outer polygon of the furniture body, and the active surface outline is obtained by expanding the buffer based on the footprint outline and combining ergonomic rules. Based on the footprint and activity surface outlines of the furniture, generate furniture library information; Based on the apartment type information, the furniture library information, and preset spatial constraints, a first candidate home decoration layout scheme is generated by the CP-SAT constraint planning solver. The first candidate home decoration layout scheme includes the first candidate position and first candidate orientation of the furniture in the furniture list in the room to be laid out. Based on the apartment layout information, the furniture library information, and the preset spatial constraints, a second candidate home decoration layout scheme is generated through a preset diffusion model. The second candidate home decoration layout scheme includes the second candidate position and the second candidate orientation of the furniture in the furniture list in the room to be arranged. At least one target candidate home decoration layout scheme is obtained by sampling from the set of candidate home decoration layout schemes, including the first candidate home decoration layout scheme and the second candidate home decoration layout scheme, using a pre-trained generative flow network model.

3. The home decoration layout method according to claim 2, characterized in that, The process of generating a first candidate home decoration layout scheme based on the apartment type information, the furniture library information, and preset spatial constraints using the CP-SAT constraint programming solver includes: A third candidate home decoration layout scheme is generated based on the apartment type information and the furniture library information. The third candidate home decoration layout scheme includes at least one candidate furniture position information, which includes the third candidate position and third candidate orientation of the furniture in the furniture list in the room to be arranged. Using the candidate furniture pose information as nodes, if there is a potential conflict relationship between any two nodes, an edge is established between the nodes to construct a conflict graph model; Obtain the initial feature vector of each node in the conflict graph model; The initial feature vectors of each node are updated by a graph neural network to obtain a high-dimensional representation of each node. The high-dimensional representation is used to reflect global constraints and local conflicts. The graph neural network outputs the priority score of each node based on the high-dimensional representation of each node; The priority score is converted into a variable branching and sorting strategy, and passed as a search guide to the CP-SAT constraint programming solver. The CP-SAT constraint programming solver outputs the first candidate home decoration layout scheme that meets the preset spatial constraints.

4. The home decoration layout method according to claim 3, characterized in that, The step of generating a second candidate home decoration layout scheme based on the apartment type information, the furniture library information, and the preset spatial constraints through a pre-set diffusion model includes: The third candidate home decoration layout scheme is represented as an unordered set of candidate pose slots, where each candidate pose slot is used to represent the third candidate position and third candidate orientation of a piece of furniture in the room to be laid out. The pose slot set is encoded using a set encoder to obtain an initial latent representation; A diffusion model is used to perform the forward noise addition process: Gaussian noise is gradually added to the initial latent representation over multiple time steps to obtain a random noise vector; The set encoder is used to encode the apartment type information and the preset spatial constraints to generate a conditional context vector; Using the aforementioned diffusion model, a reverse denoising process is performed starting from the random noise vector: Select the current time step sequentially from the preset time step sequence; Based on the initial noise latent representation of the current time step, an intermediate furniture layout scheme for the current time step is generated by decoding with an ensemble decoder. Calculate the degree of deviation between the intermediate furniture layout scheme at the current time step and the preset spatial constraints; Generate a constraint gradient based on the degree of deviation; Based on the initial noise latent representation at the current time step and the conditional context vector, the noise at the current time step is predicted by the denoising network of the diffusion model, and the constraint gradient is added as a correction term to the predicted noise to obtain the corrected noise. The corrected noise is removed from the initial noise latent representation of the current time step to obtain the updated latent representation. The updated latent representation is used as the initial noise latent representation of the next time step. The step of selecting the current time step sequentially from the preset time step sequence is continued until all time step iterations are completed. The target latent representation is then output, where the initial noise latent representation of the first time step is a random noise vector. The target latent representation is decoded into a second candidate home decoration layout scheme using the set decoder.

5. The home decoration layout method according to claim 2, characterized in that, Before sampling from the set of candidate home decoration layout schemes, including the first candidate home decoration layout scheme and the second candidate home decoration layout scheme, through the generative flow network model, the method further includes: Construct the generative flow network model, which is used to characterize the path probability distribution from the initial state to the terminal state via at least one action; Multiple generated paths from the initial state to the final state are obtained through trajectory sampling; Calculate the overall score of the candidate home decoration layout schemes corresponding to each path; The parameters of the generative flow network model are updated according to the probability flow conservation principle to obtain a pre-trained generative flow network model. The probability distribution of the target candidate home decoration layout scheme output by the pre-trained generative flow network model is proportional to the comprehensive score. For any non-terminating state, the sum of the probability flows of all paths entering the state is equal to the sum of the probability flows of all possible actions starting from the state.

6. The home decoration layout method according to claim 1, characterized in that, The expression for the first target energy function: in, Used to indicate the penalty for overlapping furniture. This indicates the penalty for furniture entering the door sweeping area. This signifies punishment for furniture blocking the sunlight from the window. Indicates the penalty for misalignment between furniture and the wall; These are adjustable weighting parameters.

7. The home decoration layout method according to claim 1, characterized in that, Also includes: Based on the received selection operation, a selected home decoration layout scheme is determined from at least one target home decoration layout scheme, and a preference pair is constructed, wherein the preference pair includes the selected home decoration layout scheme and the unselected home decoration layout scheme in the target home decoration layout scheme, which is used to indicate that the user preference for the selected home decoration layout scheme in the target home decoration layout scheme is higher than the user preference for the unselected home decoration layout scheme. Extract the layout feature vector of each of the target home decoration layout schemes from at least one of the target home decoration layout schemes; Based on the preference pair and the layout feature vector, the following training process is performed on the probabilistic preference learning model: Based on the weight vector and the difference between the layout feature vector of the selected home decoration layout scheme and the layout feature vector of the unselected home decoration layout scheme, the probability of the selected home decoration layout scheme being selected relative to the unselected home decoration layout scheme is predicted; a cross-entropy loss function is constructed based on the selection probability and the true selected label; gradient descent optimization is performed on the weight vector according to the cross-entropy loss function to update the weight vector and minimize the cross-entropy loss function. Based on the updated weight vector, the weight parameters in the first objective energy function are updated to obtain the second objective energy function; Continue executing the steps of calculating the gradient of the second objective energy function relative to each of the optimization variables in each iteration optimization, using the gradient to update the position and orientation parameters of the furniture through the gradient descent optimizer, and outputting at least one objective home decoration layout scheme when the current iteration meets the preset iteration stopping condition.

8. A home decoration layout device, characterized in that, include: The acquisition module is used to obtain the floor plan information and furniture list of the room to be laid out; The generation module is used to generate at least one target candidate home decoration layout scheme based on the apartment information and the furniture list, wherein each target candidate home decoration layout scheme includes the target candidate position and target candidate orientation of the furniture in the furniture list in the room to be arranged; The first construction module is used to construct a furniture-obstacle relationship matrix based on the target candidate home decoration layout scheme. The obstacle is a fixed structure in the room to be laid out that cannot be encroached upon. The relationship matrix includes multiple elements, each of which represents the distance between the furniture and the obstacle. The second construction module is used to construct a continuously differentiable penalty term based on the distance; A construction module is used to construct a first target energy function based on the penalty term; The iteration module is used to input the target candidate position and target candidate orientation of each piece of furniture in the target candidate home decoration layout scheme as optimization variables into the gradient descent optimizer. In each iteration optimization, the gradient of the first target energy function relative to each optimization variable is calculated. The gradient is used to update the position parameters and orientation parameters of the furniture through the gradient descent optimizer. When it is determined that the current iteration meets the preset iteration stopping condition, at least one target home decoration layout scheme is output.

9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the home layout method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the home decoration layout method according to any one of claims 1-7.