House type drawing editing method, device, medium and program product
By automatically stitching the boundary information of spatial unit components with the floor plan on the mobile device, the problem of inaccurate wall line connection and low interaction efficiency in mobile floor plan editing is solved, realizing efficient floor plan editing and smart home device control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- QINGDAO HAIER TECH
- Filing Date
- 2026-03-06
- Publication Date
- 2026-06-26
AI Technical Summary
In existing technologies, the wall-line-based floor plan editing method suffers from inaccurate wall line connections due to fingers obstructing the view in mobile touch screen scenarios. Furthermore, the touch screen interaction mode is limited by single-finger operation and cannot simulate complex interactions such as mouse movement and right-click, resulting in low editing efficiency and a high risk of errors.
By automatically generating an initial floor plan based on the boundary information of the spatial unit component and the floor plan to be edited when adding spatial unit components, the reliance on precise mouse operation is avoided, adapting to the single-finger operation habits of mobile touch screen users, and spatial stitching is performed based on the boundary information of the spatial unit component and the floor plan to be edited.
It improves the efficiency of floor plan editing, adapts to the operating habits of mobile touch screen users, realizes the automated creation and fine-tuning of complex irregular spaces, and supports the interaction and control of 3D floor plans for smart home devices.
Smart Images

Figure CN122289425A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer-aided design, and in particular to a method, device, medium, and program product for editing floor plans. Background Technology
[0002] In modern home design, real estate development, and home decoration service platforms, floor plan drawing and editing is one of the core functions. Floor plans allow users to intuitively understand the spatial layout of a house, aiding in the development of design schemes, the calculation of renovation budgets, and the display of properties for sale. With the widespread adoption of mobile internet, more and more users prefer to edit floor plans using mobile touchscreen devices (such as smartphones and tablets).
[0003] However, existing wall-line-based floor plan editing methods have significant drawbacks in mobile touchscreen scenarios: touchscreen operation relies on finger touch, and the width of the finger can easily obstruct the view, resulting in inaccurate wall line connections; touchscreen interaction mode is limited to single-finger operation and cannot simulate complex interactions such as mouse movement and right-click, making the traditional wall-line-based editing process (such as dragging wall lines and closing areas) inefficient and error-prone.
[0004] Therefore, there is an urgent need for a floor plan editing method that adapts to the characteristics of mobile touch screen interaction in order to improve the efficiency of floor plan editing. Summary of the Invention
[0005] This application provides a method, device, medium, and program product for editing floor plans, in order to improve the efficiency of floor plan editing.
[0006] In a first aspect, embodiments of this application provide a method for editing floor plans, the floor plan editing interface including: preset spatial unit components, the method including:
[0007] In response to the user's operation of adding the spatial unit component to the floor plan to be edited, an initial floor plan is obtained based on the boundary information of the spatial unit component and the floor plan to be edited;
[0008] Based on the user's adjustments to the initial floor plan, a target floor plan is generated.
[0009] In one possible implementation, obtaining the initial floor plan based on the boundary information of the spatial unit component and the floor plan to be edited includes:
[0010] In response to the spatial unit component being outside the floor plan to be edited, and the distance between the boundary of the spatial unit component and the first wall in the floor plan to be edited being less than or equal to a preset distance threshold, the spatial unit component is spliced to the outside of the first wall based on the boundary information to obtain the initial floor plan.
[0011] In one possible implementation, obtaining the initial floor plan based on the boundary information of the spatial unit component and the floor plan to be edited includes:
[0012] In response to the existence of an overlapping area between the spatial unit component and the floor plan to be edited, the second wall of the floor plan to be edited within the overlapping area is determined based on the boundary information and the floor plan to be edited;
[0013] Based on the second wall and the boundary information, the spatial unit component is divided into multiple sub-spatial unit components;
[0014] Based on the multiple subspace unit components and the floor plan to be edited, the initial floor plan is obtained.
[0015] In one possible implementation, obtaining the initial floor plan based on the plurality of subspace unit components and the floor plan to be edited includes:
[0016] In response to the operation of deleting the target subspace unit component among the plurality of subspace unit components, the third wall of the target subspace unit component is deleted, and the initial floor plan is obtained based on the fourth wall of the plurality of subspace unit components and the floor plan to be edited; the third wall is the wall of the target subspace unit component in the overlapping area.
[0017] In one possible implementation, the adjustment operation includes at least one of the following: deleting the target wall in the initial floor plan, or moving the target wall.
[0018] In one possible implementation, the floor plan to be edited includes at least one initial space, and the name of the initial space in the initial floor plan is the same as the name of the initial space in the floor plan to be edited.
[0019] In one possible implementation, the method is applied to a smart home control application (APP). After generating the target floor plan based on the user's adjustment operations on the initial floor plan, the method further includes:
[0020] Based on the target floor plan and the attribute information of the smart home devices, an interactive 3D floor plan is generated; the 3D floor plan includes the identifiers of the smart home devices.
[0021] Based on the interactive 3D floor plan, smart home devices are controlled.
[0022] Secondly, embodiments of this application provide a floor plan editing device, the floor plan editing interface including: a preset spatial unit component, the device including:
[0023] The acquisition module is used to respond to the user's operation of adding the spatial unit component to the floor plan to be edited, and to obtain the initial floor plan based on the boundary information of the spatial unit component and the floor plan to be edited;
[0024] The generation module is used to generate a target floor plan based on the user's adjustment operations on the initial floor plan.
[0025] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0026] The memory stores computer-executed instructions;
[0027] The processor executes computer execution instructions stored in the memory, causing the processor to perform the method described in any of the first aspects above.
[0028] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in any of the first aspects above.
[0029] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in any of the first aspects above.
[0030] This application provides a method, device, medium, and program product for editing floor plans. By automatically generating an initial floor plan based on the boundary information of spatial unit components and the floor plan to be edited when adding spatial unit components, this application, compared to the traditional method that requires drawing wall lines one by one and connecting them precisely, performs spatial splicing based on the boundary information of spatial unit components and the floor plan to be edited. This avoids the reliance on precise mouse operation, adapts to the single-finger operation habits of mobile touch screen users, and improves the efficiency of floor plan editing. Attached Figure Description
[0031] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0032] Figure 1 A schematic flowchart illustrating a floor plan editing method provided in this application embodiment;
[0033] Figure 2a A schematic diagram of a floor plan to be edited provided in an embodiment of this application;
[0034] Figure 2b A schematic diagram of the first initial floor plan provided in the embodiments of this application;
[0035] Figure 3a A schematic diagram of an overlapping region provided in an embodiment of this application;
[0036] Figure 3b A schematic diagram of a deletion subspace unit component provided in an embodiment of this application;
[0037] Figure 3c A schematic diagram of a third initial floor plan provided in an embodiment of this application;
[0038] Figure 4a This application provides a schematic diagram of deleting a target wall according to an embodiment;
[0039] Figure 4b This is a schematic diagram illustrating another method for deleting a target wall, as provided in an embodiment of this application.
[0040] Figure 4c A schematic diagram of a third initial floor plan provided in an embodiment of this application;
[0041] Figure 5 A flowchart illustrating another floor plan editing method provided in this application embodiment;
[0042] Figure 6 A flowchart illustrating a method for updating apartment layout data provided in an embodiment of this application;
[0043] Figure 7 A flowchart illustrating a sub-region segmentation method provided in an embodiment of this application;
[0044] Figure 8 A schematic diagram illustrating a re-division of space provided in an embodiment of this application;
[0045] Figure 9 This is a schematic diagram of the structure of a floor plan editing device provided in this application;
[0046] Figure 10 This is a schematic diagram of the structure of an electronic device provided in this application.
[0047] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0048] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application.
[0049] In this application, the term "comprising" and its variations can refer to non-limiting inclusion; the term "or" and its variations can refer to "and / or". The terms "first", "second", etc., in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. In this application, "multiple" refers to two or more. "And / or" describes 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 preceding and following related objects have an "or" relationship.
[0050] 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, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0051] In modern home design, real estate development, and home decoration service platforms, the creation and editing of floor plans is one of the core functions. Floor plans allow users to intuitively understand the spatial layout of a house, aiding in the development of design plans, the calculation of renovation budgets, and the display of properties for sale.
[0052] With the popularization of mobile internet, more and more users tend to edit house layouts through mobile touch screen devices (such as smartphones and tablets). For example, interior designers can quickly adjust the spatial layout of clients' houses through mobile devices, or consumers can design their ideal house layouts themselves in decoration apps.
[0053] In existing technologies, the construction of floor plan vector data mainly relies on two methods: one is image recognition technology based on computer vision, which automatically identifies wall lines in floor plan images and generates vector data through algorithms; the other is manual drawing based on a graphical interface, where users draw wall lines one by one and enclose spaces using a mouse or stylus.
[0054] However, existing wall-line-based floor plan editing methods have significant drawbacks in mobile touchscreen scenarios. First, touchscreen operation relies on finger touch, and the width of the finger can easily obstruct the view, leading to inaccurate wall line connections. Touchscreen interaction is limited to single-finger operation, unable to simulate complex interactions such as mouse movement and right-clicking, resulting in inefficient and error-prone traditional wall-line-based editing processes (such as dragging wall lines and closing areas). Furthermore, drawing irregularly shaped spaces (such as curved walls and irregular partitions) requires highly precise interactive operations, further increasing the operational difficulty for mobile users.
[0055] Therefore, this application embodiment can automatically generate an initial floor plan based on the boundary information of the spatial unit component and the floor plan to be edited when adding the spatial unit component. Compared with the traditional method that requires drawing wall lines one by one and connecting them precisely, this application embodiment performs spatial splicing based on the boundary information of the spatial unit component and the floor plan to be edited, avoiding the dependence on precise mouse operation, adapting to the single-finger operation habit of mobile touch screen users, and improving the efficiency of floor plan editing.
[0056] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These 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 of this application will now be described with reference to the accompanying drawings.
[0057] It should be noted that the executing entity of this application can be any electronic device with processing capabilities, such as a user terminal or a server, for example, a smartphone or a tablet computer.
[0058] Figure 1 This is a flowchart illustrating a floor plan editing method provided in an embodiment of this application. The floor plan editing interface includes preset spatial unit components. Optionally, the floor plan editing interface can be a visual presentation area for user interaction, where the user performs various operations to edit the floor plan. The preset spatial unit components can be pre-defined graphic components with specific functions and shapes, used to construct basic elements of the floor plan, such as squares, rectangles, etc.
[0059] like Figure 1 As shown, the method includes:
[0060] S101. In response to the user's operation of adding a spatial unit component to the floor plan to be edited, an initial floor plan is obtained based on the boundary information of the spatial unit component and the floor plan to be edited.
[0061] Optionally, the boundary information of the spatial unit component can be geometric data describing the shape and extent of the spatial unit component, such as the coordinates of each vertex, side length, and angle of the component, used to determine the specific location and space occupied by the component in the floor plan. The floor plan to be edited can be an initial or intermediate state of the floor plan that has not yet been finalized and can be modified. The initial floor plan can be a preliminary floor plan form generated after the user adds the spatial unit component, based on the boundary information of the spatial unit component and the floor plan to be edited, which can serve as the basis for subsequent adjustments.
[0062] Optionally, users can add preset spatial unit components to the floor plan to be edited by performing specific interactive actions on the floor plan editing interface, such as dragging the mouse, clicking to select, or any one or more of these actions.
[0063] Optionally, the electronic device can continuously detect user operation events on the interface, and trigger the corresponding processing logic when it detects that the user performs the operation of adding space unit components to the floor plan to be edited.
[0064] In one implementation, the electronic device can respond to the fact that the spatial unit component is outside the floor plan to be edited, and the distance between the boundary of the spatial unit component and the first wall in the floor plan to be edited is less than or equal to a preset distance threshold, and splice the spatial unit component to the outside of the first wall based on the boundary information to obtain the initial floor plan.
[0065] Optionally, the first wall can be an existing wall in the floor plan to be edited. The preset distance threshold can be a pre-set distance value used to determine whether the distance between the space unit component and the first wall meets the splicing conditions. When the distance between the two is less than or equal to the threshold, the splicing operation can be triggered.
[0066] Optionally, the electronic device can continuously detect the position status of the spatial unit component and its distance relationship with the first wall in the floor plan to be edited. When it is detected that the spatial unit component is outside the floor plan to be edited, and the distance between its boundary and the first wall in the floor plan to be edited is less than or equal to a preset distance threshold, the splicing processing logic will be triggered.
[0067] Optionally, the electronic device can perform a series of calculations and coordinate transformations based on the boundary information of the spatial unit component and the position information of the first wall. For example, it can determine the relative positional relationship between the spatial unit component and the first wall, adjust the coordinates of the spatial unit component to match the outer side of the first wall, so that it is visually and logically connected to the first wall. At the same time, it can update the data structure of the floor plan to be edited, incorporate the spatial unit component into the overall data of the floor plan to be edited, and complete the splicing operation.
[0068] Optionally, after completing the splicing operation of the spatial unit components, the electronic device can re-render the graphic display based on the spliced floor plan data. By organizing and optimizing the spliced floor plan data, a complete and preliminary floor plan form, i.e., the initial floor plan, is generated.
[0069] For example, Figure 2a This is a schematic diagram of a floor plan to be edited, provided as an embodiment of this application. Figure 2a As shown, users can add space unit components to the floor plan to be edited. Figure 2b A schematic diagram of the first initial floor plan provided in the embodiments of this application, such as... Figure 2b As shown, the electronic device can respond to the user's operation of adding a spatial unit component to the floor plan to be edited. When the distance between the boundary of the spatial unit component and the first wall in the floor plan to be edited is less than or equal to a preset distance threshold, the spatial unit component is spliced to the outside of the first wall to obtain the initial floor plan.
[0070] This application embodiment achieves automatic adsorption and splicing of spatial units and existing walls by setting a preset distance threshold. When the distance between the boundary of the spatial unit component and the first wall in the floor plan to be edited is less than or equal to the preset distance threshold, it is directly spliced to the outside of the first wall, avoiding manual alignment operations and reducing the problem of inaccurate wall line connection caused by finger obstruction during mobile touch screen operation.
[0071] When adding spatial unit components to a floor plan to be edited, if there are overlapping areas—that is, areas where the spatial unit components and the floor plan to be edited overlap and share space—this application embodiment can first respond to the existence of overlapping areas between the spatial unit components and the floor plan to be edited, and determine the second wall of the floor plan to be edited within the overlapping area based on boundary information and the floor plan to be edited.
[0072] Optionally, the second wall can be a wall portion located within the overlapping area between the spatial unit component and the floor plan to be edited. The electronic device can determine the second wall through geometric calculations and / or logical judgments. For example, by comparing the boundary coordinates of the spatial unit component with the coordinates of the wall in the floor plan to be edited, the wall portion within the overlapping area can be identified, and its location, length, and other attributes can be determined, thereby identifying the second wall.
[0073] Secondly, based on the information of the second wall and boundary, the spatial unit component is divided into multiple sub-spatial unit components. Furthermore, based on these multiple sub-spatial unit components and the floor plan to be edited, an initial floor plan is obtained.
[0074] Optionally, the multiple sub-space unit components can be several smaller space unit components with independent shapes and functional attributes obtained by dividing the original space unit component according to the second wall.
[0075] Optionally, the electronic device can employ a geometric segmentation algorithm to calculate appropriate dividing lines based on the relative positional relationship between the second wall and the spatial unit components, dividing the original spatial unit components into multiple sub-spatial unit components along these lines. The electronic device can then merge the data of these multiple sub-spatial unit components with the data of the floor plan to be edited, updating the overall data structure of the floor plan. Based on the merged data, the graphic is re-rendered to obtain the initial floor plan.
[0076] In this embodiment of the application, when a spatial unit overlaps with an existing floor plan to be edited, the second wall within the overlapping area is identified, and the spatial unit is split into multiple sub-spatial unit components as a dividing boundary. These components are then recombined into irregularly shaped spaces that fit the existing structure, thus achieving the automated creation of complex irregularly shaped spaces.
[0077] In one implementation, the electronic device can, in response to an operation of deleting a target subspace unit component among multiple subspace unit components, delete the third wall of the target subspace unit component and obtain an initial floor plan based on the fourth walls of the multiple subspace unit components and the floor plan to be edited. The third wall is the wall of the target subspace unit component within the overlapping area.
[0078] Optionally, the target subspace unit component can be a specific subspace unit component selected by the user from multiple subspace unit components for which a deletion operation is to be performed. The fourth wall can be any wall component other than the third wall in the multiple subspace unit components.
[0079] Optionally, users can issue commands such as clicking the delete button or using shortcut keys to delete a target sub-space unit component from multiple sub-space unit components. The electronic device can continuously detect user operation events on the floor plan editing interface, and when it detects that the user has performed the operation of deleting a target sub-space unit component from multiple sub-space unit components, it triggers the deletion processing logic.
[0080] Optionally, the electronic device can locate the data record of the third wall corresponding to the target subspace unit component in the data structure of the floor plan to be edited. Then, by modifying the data structure, the relevant data of the third wall (such as vertex coordinates, wall attributes, etc.) is removed from the dataset, thus deleting the data. From a graphical display perspective, the electronic device can re-render the floor plan based on the updated data structure, and the graphic element corresponding to the third wall will no longer be displayed on the screen, allowing the user to visually perceive the effect of the third wall being deleted.
[0081] For example, Figure 3a A schematic diagram of an overlapping region provided in an embodiment of this application, such as... Figure 3a As shown, the second wall can be represented by dashed lines. Based on the second wall and boundary information, the spatial unit component can be divided into multiple sub-spatial unit components. Figure 3a On this basis, Figure 3b This is a schematic diagram of a deletion subspace unit component provided in an embodiment of this application, as shown below. Figure 3b As shown, users can delete subspace unit components by clicking the delete button. Figure 3c A schematic diagram of the third initial floor plan provided in the embodiments of this application, as shown below. Figure 3c As shown, the initial floor plan is the fourth wall based on multiple subspace unit components, and the floor plan to be edited is used to obtain the initial floor plan.
[0082] In this embodiment, when deleting a target subspace unit component, the third wall located within the overlapping area is removed, while the fourth wall is retained and automatically connected to other subspaces, ensuring the correct topological relationship of the vector data and realizing non-destructive modification during the editing process of irregular spaces.
[0083] S102. Generate the target floor plan based on the user's adjustment of the initial floor plan.
[0084] Optionally, the user's adjustment operation on the initial floor plan can be the user's behavior of modifying the floor plan based on the initial floor plan through interface interaction (such as moving the position of space unit components, changing the size of space unit components, rotating the direction of space unit components, deleting space unit components, etc.).
[0085] Optionally, the electronic device can modify and update the initial floor plan data based on the captured user adjustment operation information. For example, if the operation involves moving the position of a spatial unit component, the coordinate position of that spatial unit component in the floor plan data structure is updated; if the operation involves changing the size of a component, the component's size data is adjusted, and so on. Through these data modifications, the floor plan display is re-rendered, ultimately generating the target floor plan that meets the user's adjustment requirements.
[0086] In one implementation, the adjustment operation includes at least one of the following: deleting the target wall in the initial floor plan, or moving the target wall. Optionally, the user can delete or move the target wall in the initial floor plan by selecting it. Taking deletion as an example, the electronic device can delete all data related to the wall from the data structure, including the wall's geometric information (such as vertex coordinates, length, angle, etc.). Taking movement as an example, the electronic device can first obtain the movement parameters of the target wall, such as the direction of movement (such as horizontal, vertical, or arbitrary angle) and distance, and then update the geometric information of the target wall based on the movement parameters.
[0087] For example, let's take deleting the target wall as an example. Figure 4a This application provides a schematic diagram of deleting a target wall, as shown in the embodiment. Figure 4a As shown, users can delete the selected target wall. Figure 4a On this basis, Figure 4b This is a schematic diagram of another target wall to be deleted according to an embodiment of this application, as shown below. Figure 4b As shown, users can delete the selected target wall. Figure 4a and Figure 4b On this basis, Figure 4c A schematic diagram of the third initial floor plan provided in the embodiments of this application, as shown below. Figure 4c As shown, the initial floor plan was obtained after deleting the target wall.
[0088] This application embodiment enables progressive optimization of the floor plan from its initial state to its target state by supporting wall deletion / moving adjustment operations, thus meeting users' needs for fine-tuning details.
[0089] This application embodiment can automatically generate an initial floor plan based on the boundary information of the spatial unit component and the floor plan to be edited when adding spatial unit components. Compared with the traditional method that requires drawing wall lines one by one and connecting them precisely, this application embodiment performs spatial splicing based on the boundary information of the spatial unit component and the floor plan to be edited, avoiding the dependence on precise mouse operation, adapting to the single-finger operation habit of mobile touch screen users, and improving the efficiency of floor plan editing.
[0090] Based on the above embodiments, the floor plan to be edited in this application includes at least one initial space, and the name of the initial space in the initial floor plan is the same as the name of the initial space in the floor plan to be edited.
[0091] Optionally, the initial space can be a pre-defined area with certain functions and scope in the floor plan to be edited. The name of the initial space can be any of the following: living room, bedroom, kitchen, etc. Each initial space has its own specific name for identification.
[0092] Optionally, the electronic device can match and compare the initial space names in the initial floor plan with the initial space names in the floor plan to be edited. For example, it can iterate through all the initial space names in the initial floor plan and the floor plan to be edited to ensure that the name of each initial space is the same in both floor plans.
[0093] This application embodiment ensures the consistency of space identifiers during the floor plan editing process through an initial space name inheritance mechanism, avoiding the problem of chaotic naming of the entire plan due to local modifications.
[0094] The floor plan editing method provided in this application can be applied to a smart home control application (APP). After generating a target floor plan based on the user's adjustments to the initial floor plan, this application embodiment can further generate an interactive 3D floor plan based on the target floor plan and the attribute information of smart home devices. This 3D floor plan includes the identifiers of the smart home devices. Secondly, electronic devices can control smart home devices based on this interactive 3D floor plan.
[0095] Optionally, the attribute information of smart home devices can be data on the characteristics and functions of smart home devices, including device type (such as smart light bulbs, smart door locks, smart air conditioners, etc.), model, location (specific coordinates in the target floor plan or the room to which it belongs), status (on, off, brightness, temperature, etc.), control method (controlled via APP, voice control, etc.), and other information.
[0096] Optionally, the interactive 3D floor plan can be a floor plan presented in a three-dimensional format, which can display the spatial structure and layout of the house, and can also integrate information from smart home devices. Users can control and manage smart home devices by interacting with the 3D floor plan (such as clicking, touching, swiping, etc.).
[0097] Optionally, the identification of smart home devices can be symbols, icons, or text labels used in the 3D floor plan to distinguish and identify different smart home devices. For example, a light bulb icon can be used to represent a smart light bulb, and a door lock icon can be used to represent a smart door lock, so that users can quickly find and operate the corresponding devices.
[0098] This application embodiment associates the target floor plan with the attribute information of smart home devices. Through the mapping between the 3D floor plan and smart home devices, users can directly trigger control commands for smart home devices by clicking on the device icons in the model. This achieves a deep integration of device control and spatial scene, expanding the application value of floor plan editing.
[0099] For example, Figure 5 A flowchart illustrating another floor plan editing method provided in this application embodiment is shown below. Figure 5 As shown, the method flow may include:
[0100] 1. Start creating the space.
[0101] 2. Mobile space.
[0102] 3. Determine if it is close to the boundary of an existing unit. If not, proceed to step 2; if yes, proceed to step 4.
[0103] 4. Automatically fits to the existing apartment layout boundaries.
[0104] 5. Determine whether to end the movement. If not, proceed to step 6; if yes, proceed to step 10.
[0105] 6. Stacking within existing apartment layouts.
[0106] 7. Display Space Sub-area.
[0107] 8. Delete sub-regions as needed.
[0108] 9. Begin fine-tuning. Move or delete walls.
[0109] 10. Update apartment layout data.
[0110] 11. Complete editing.
[0111] Regarding step 10 above, Figure 6 This is a flowchart illustrating a method for updating apartment layout data provided in an embodiment of this application, as shown below. Figure 6 As shown, the method for updating apartment type data may include:
[0112] 1. For old data, after editing the apartment layout, execute steps 2 and 4 simultaneously.
[0113] 2. Regenerate the broken line segments.
[0114] 3. Re-divide space based on line segments.
[0115] 4. Match new data with old data business information.
[0116] 5. New data is obtained (the identifier (ID) remains stable).
[0117] The principle of sub-region segmentation will be explained in detail below. Figure 7 This is a flowchart illustrating a sub-region segmentation method provided in an embodiment of this application, as shown below. Figure 7 As shown, the sub-region segmentation method may include:
[0118] 1. Preprocessing procedure.
[0119] 2. Delete sub-regions. Delete the lines belonging to the new space in this region, and keep the lines belonging to the existing unit type.
[0120] 3. Regenerate the broken line segments.
[0121] 4. Re-divide space based on line segments. Figure 8 This is a schematic diagram of a re-divided space provided in an embodiment of this application, as shown below. Figure 8 As shown, A, B, and C are all spaces that have been re-divided based on line segments.
[0122] 5. Traverse the partitioned space.
[0123] 6. Analyze the lines that constitute the space. For example... Figure 8 As shown, dashed lines can represent lines belonging to new spaces, while solid lines can represent lines belonging to existing apartment layouts.
[0124] This application proposes a solution for quickly constructing apartment layout data on mobile devices. The key feature is the use of three granularity floor plan editing methods to progressively construct complex floor plan data from simple to complex. Specifically:
[0125] 1. Spatial Granularity Stitching: Quickly stitch together apartment layouts based on spatial dimensions. For example... Figure 2a and Figure 2b As shown.
[0126] 2. Spatial Sub-region Editing: Create irregularly shaped spaces by editing spatial sub-regions. For example... Figure 3a , Figure 3b and Figure 3c As shown.
[0127] 3. Space Wall Editing: Fine-tune details by moving or deleting space walls. For example... Figure 4a , Figure 4b and Figure 4c As shown.
[0128] Under limited interaction methods, existing floor plan editing methods are difficult to provide a good interactive experience. This application embodiment solves this problem well by using a space-based multi-granularity editing method, which can quickly create complex floor plan data even with just one finger.
[0129] The above are the method embodiments provided in this application. The apparatus provided in this application will be described below.
[0130] Figure 9 This is a schematic diagram of the structure of a floor plan editing device provided in this application, such as... Figure 9 As shown, the floor plan editing device 400 provided in this embodiment includes:
[0131] The acquisition module 401 is used to respond to the user's operation of adding spatial unit components to the floor plan to be edited, and to obtain the initial floor plan based on the boundary information of the spatial unit components and the floor plan to be edited.
[0132] The generation module 402 is used to generate the target floor plan based on the user's adjustment operations on the initial floor plan.
[0133] Optionally, the acquisition module 401 is specifically used to respond to the fact that the spatial unit component is outside the floor plan to be edited, and the distance between the boundary of the spatial unit component and the first wall in the floor plan to be edited is less than or equal to a preset distance threshold, and based on the boundary information, splice the spatial unit component to the outside of the first wall to obtain the initial floor plan.
[0134] Optionally, the acquisition module 401 is specifically used to, in response to an overlapping area between the spatial unit component and the floor plan to be edited, determine the second wall of the floor plan to be edited within the overlapping area based on boundary information and the floor plan to be edited. Based on the second wall and boundary information, the spatial unit component is divided into multiple sub-spatial unit components. Based on the multiple sub-spatial unit components and the floor plan to be edited, an initial floor plan is obtained.
[0135] For example, the acquisition module 401 is specifically used to, in response to the operation of deleting a target subspace unit component among multiple subspace unit components, delete the third wall of the target subspace unit component, and obtain an initial floor plan based on the fourth walls of the multiple subspace unit components and the floor plan to be edited. The third wall is the wall of the target subspace unit component within the overlapping area.
[0136] Optionally, the adjustment operation includes at least one of the following: deleting the target wall in the initial floor plan, or moving the target wall.
[0137] Optionally, the floor plan to be edited includes at least one initial space, and the name of the initial space in the initial floor plan is the same as the name of the initial space in the floor plan to be edited.
[0138] Optionally, the floor plan editing device 400 is applied to a smart home control application (APP). After the generation module 402 generates the target floor plan based on the user's adjustment operations on the initial floor plan, the floor plan editing device 400 also includes a processing module 403.
[0139] The processing module 403 generates an interactive 3D floor plan based on the target floor plan and the attribute information of the smart home devices; the 3D floor plan includes the identifiers of the smart home devices. The smart home devices are then controlled based on the interactive 3D floor plan.
[0140] The floor plan editing device provided in this embodiment can execute the methods provided in any of the above method embodiments. The implementation principle and technical effect are similar, and will not be described in detail here.
[0141] Figure 10 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 10As shown, the electronic device 500 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the device 500 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus 504.
[0142] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the above-described method.
[0143] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0144] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0145] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0146] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0147] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0148] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0149] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0150] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0151] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0152] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0153] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0154] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0155] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0156] Finally, it should be noted that other embodiments of this application will readily conceive of by those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes may be made without departing from its scope.
Claims
1. A house type drawing editing method, characterized by, The floor plan editing interface includes: preset spatial unit components, and the method includes: In response to the user's operation of adding the spatial unit component to the floor plan to be edited, an initial floor plan is obtained based on the boundary information of the spatial unit component and the floor plan to be edited; Based on the user's adjustments to the initial floor plan, a target floor plan is generated.
2. The floor plan editing method according to claim 1, characterized in that, The process of obtaining an initial floor plan based on the boundary information of the spatial unit component and the floor plan to be edited includes: In response to the spatial unit component being outside the floor plan to be edited, and the distance between the boundary of the spatial unit component and the first wall in the floor plan to be edited being less than or equal to a preset distance threshold, the spatial unit component is spliced to the outside of the first wall based on the boundary information to obtain the initial floor plan.
3. The floor plan editing method according to claim 1 or 2, characterized in that, The process of obtaining an initial floor plan based on the boundary information of the spatial unit component and the floor plan to be edited includes: In response to the existence of an overlapping area between the spatial unit component and the floor plan to be edited, the second wall of the floor plan to be edited within the overlapping area is determined based on the boundary information and the floor plan to be edited; Based on the second wall and the boundary information, the spatial unit component is divided into multiple sub-spatial unit components; Based on the multiple subspace unit components and the floor plan to be edited, the initial floor plan is obtained.
4. The floor plan editing method according to claim 3, characterized in that, The process of obtaining the initial floor plan based on the plurality of subspace unit components and the floor plan to be edited includes: In response to the operation of deleting the target subspace unit component among the plurality of subspace unit components, the third wall of the target subspace unit component is deleted, and the initial floor plan is obtained based on the fourth wall of the plurality of subspace unit components and the floor plan to be edited; the third wall is the wall of the target subspace unit component in the overlapping area.
5. The method for editing floor plans according to claim 1 or 2, characterized in that, The adjustment operation includes at least one of the following: deleting the target wall in the initial floor plan, or moving the target wall.
6. The method for editing floor plans according to claim 1 or 2, characterized in that, The floor plan to be edited includes at least one initial space, and the name of the initial space in the initial floor plan is the same as the name of the initial space in the floor plan to be edited.
7. The method for editing floor plans according to claim 1 or 2, characterized in that, The method is applied to a smart home control application (APP). After generating the target floor plan based on the user's adjustments to the initial floor plan, the method further includes: Based on the target floor plan and the attribute information of the smart home devices, an interactive 3D floor plan is generated; the 3D floor plan includes the identifiers of the smart home devices. Based on the interactive 3D floor plan, smart home devices are controlled.
8. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7.
10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.