Room layout updating method, device, electronic device and storage medium
By updating the room layout based on common wall and point matching strategies in house design, the problems of information loss and incorrect matching in existing technologies are solved, and efficient and accurate room information retention and design efficiency are achieved.
Patent Information
- Application Number
- CN202411746726.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-11-29
AI Technical Summary
Existing technologies cannot effectively retain room information in house design, resulting in inefficient design and prone to errors, especially when dealing with complex situations where information is lost or mismatched.
By obtaining the spatial object set of the new space, matching it with the initial room based on the common wall matching strategy, determining the spatial object group and retaining the attributes of the initial room, setting the room attributes for the new space that was not successfully matched or using the common point matching strategy for further matching.
It achieves efficient retention of original room information, reduces design workload, improves matching accuracy and design efficiency, is suitable for various wall operations, and enhances the degree of automation and user experience.
Smart Images

Figure CN119670207B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of decoration design, and in particular to a room layout updating method, device, electronic device and storage medium. Background Art
[0002] In house design scenarios, it is common to modify room layouts based on architectural design and interior decoration software. For example, software can be used to manipulate walls, changing them by adding, deleting, or moving them, thereby modifying the room layout.
[0003] In the prior art, after the wall is processed and the wall changes, the room information is updated with the following defects:
[0004] 1. The original room information cannot be effectively retained and the room properties need to be re-entered or set.
[0005] 2. Insufficient ability to handle complex situations, which can easily lead to information loss or mismatching.
[0006] Due to the above problems in dealing with walls, the house design efficiency is low and design errors are prone to occur, which in turn affects the design effect. Summary of the Invention
[0007] In view of the above problems, embodiments of the present application provide a room layout updating method, device, electronic device, and storage medium that overcome the above problems or at least partially solve the above problems.
[0008] In a first aspect, an embodiment of the present application provides a room layout updating method, comprising:
[0009] In response to the wall update operation on the original house space, a space object set including N new spaces is obtained;
[0010] Based on the common wall matching strategy, the N new spaces in the space object set are matched with the M initial rooms corresponding to the original house space to determine a space object group. The space object group includes a new space and an initial room that are successfully matched and have the largest number of common walls, where M and N are both integers greater than or equal to 1.
[0011] Determine the new space in the space object group as a new room and retain the room attributes of the corresponding initial room;
[0012] In response to the existence of a new space that has not been successfully matched, the new space is determined to be a new room and room attributes are set, or the new space is matched with the remaining initial rooms based on a common point matching strategy, and the room attributes corresponding to the new space are determined based on the matching situation.
[0013] In a second aspect, an embodiment of the present application provides a room layout updating device, comprising:
[0014] An update acquisition module, configured to acquire a set of space objects including N new spaces in response to a wall update operation on the original house space;
[0015] a matching determination module, configured to match the N new spaces in the spatial object set with the M initial rooms corresponding to the original housing space based on a common wall matching strategy, and determine a spatial object group, wherein the spatial object group includes a successfully matched new space and an initial room having the largest number of common walls, where M and N are both integers greater than or equal to 1;
[0016] a determination and retention module, configured to determine that the new space in the space object group is a new room and retain the room attributes of the corresponding initial room;
[0017] The first processing module is used to, in response to the existence of a new space that has not been successfully matched, determine that the new space is a new room and set room attributes, or, based on a common point matching strategy, match the new space with the remaining initial rooms, and determine the room attributes corresponding to the new space based on the matching situation.
[0018] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the room layout updating method as described in the first aspect above.
[0019] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the room layout updating method described in the first aspect above are implemented.
[0020] The technical solution of the embodiment of the present application obtains N new spaces in response to the wall update operation of the original house space, matches the N new spaces with the M initial rooms corresponding to the original house space based on the common wall matching strategy, determines at least one space object group, determines the new space in the space object group as a new room and retains the room attributes of the matched initial room, thereby retaining the original information in the original house space and reducing the design workload; in the case where there is a new space that is not successfully matched after the common wall matching, the room attributes corresponding to the new space are set or the matching is continued based on the common point matching strategy, which can adapt to complex situations, improve matching accuracy, and retain room information efficiently and accurately.
[0021] Moreover, the solution provided in this application is highly flexible, applicable to various types of wall operations, and can accurately reflect spatial changes; at the same time, it has a high degree of automation, reducing the need for manual adjustments, and improving design efficiency and user design experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A schematic diagram showing a room layout updating method provided in an embodiment of the present application;
[0023] Figure 2 A schematic diagram showing matching of a new space with an initial room after a wall is moved according to an embodiment of the present application;
[0024] Figure 3 A schematic diagram illustrating determining a second object group after a wall moves according to an embodiment of the present application;
[0025] Figure 4 This example shows how to set room attributes for a new space. Figure 1 ;
[0026] Figure 5 This example shows how to set room attributes for a new space. Figure 2 ;
[0027] Figure 6 A schematic diagram showing how to retain the room attributes of an initial room and reset the room attributes for a new space, provided by an embodiment of the present application;
[0028] Figure 7 It represents an example of forming a vacuum space provided by an embodiment of the present application;
[0029] Figure 8 A schematic diagram showing a room layout updating device provided in an embodiment of the present application;
[0030] Figure 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0032] It should be understood that references throughout this specification to "one embodiment" or "an embodiment" mean that a particular feature, structure, or characteristic associated with the embodiment is included in at least one embodiment of the present application. Therefore, the appearance of "in one embodiment" or "in an embodiment" throughout this specification does not necessarily refer to the same embodiment. Furthermore, these particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. The term "a plurality" in the embodiments of the present application may include two or more.
[0033] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0034] The embodiment of the present application provides a room layout update method, such as Figure 1 Said method comprises the following steps:
[0035] Step 101: In response to a wall update operation on an original house space, a space object set including N new spaces is obtained, where N is an integer greater than or equal to 1.
[0036] In a house design scenario, each wall in the original house space corresponds to a wall identifier, such as a wall ID (Identity Document), which is used to distinguish different walls. When a wall in the original house space needs to be modified, a spatial object set consisting of N new spaces corresponding to the updated wall is obtained in response to an update operation on the original house space.
[0037] Wall update operations can include adding a new wall, deleting a wall, or moving a wall. The spatial object set determined based on the wall update operation includes one or more new spaces. For example, if the wall update operation involves deleting a wall, a spatial object set including one new space is determined in response to the wall deletion operation. Alternatively, if the wall update operation involves adding a new wall, a spatial object set including multiple new spaces is determined in response to the wall addition operation.
[0038] Step 102: Based on the common wall matching strategy, match the N new spaces in the space object set with the M initial rooms corresponding to the original house space to determine a space object group. The space object group includes a new space and an initial room that have successfully matched and have the largest number of common walls, where M is an integer greater than or equal to 1.
[0039] After determining the spatial object set based on the wall update operation, the N new spaces in the spatial object set are wall-matched with the M initial rooms corresponding to the original house space based on the common wall matching strategy to determine one or more spatial object groups based on the wall matching situation.
[0040] The number of initial rooms corresponding to the original house space is greater than or equal to 1. Since the wall update operation can be adding a wall, deleting a wall, or moving a wall, the value of M can be greater than or equal to N, or less than N.
[0041] When matching N new spaces with M initial rooms, the N new spaces are traversed. For each new space, the initial room with the greatest number of shared walls is searched among the M initial rooms. Once the initial room with the greatest number of shared walls is found, the new space is determined to be successfully matched with the found initial room, and the corresponding spatial object group is determined. For any spatial object group, it includes a successfully matched new space with the greatest number of shared walls and an initial room. That is, the spatial object group is associated with a new space from the spatial object set and an initial room from the original house.
[0042] Step 103: Determine that the new space in the space object group is a new room and retain the room attributes of the corresponding initial room.
[0043] After determining one or more spatial object groups based on the common wall matching strategy, for each spatial object group, the new space in the spatial object group is determined to have the same room attributes as the corresponding initial room. In other words, when a wall update occurs, there's no need to set room attributes for the new space in the spatial object group. The room attributes corresponding to the initial room in the spatial object group are retained, preserving the original room information in the original house.
[0044] The room attributes in this embodiment include the room name. In the case of a wall update, after the spatial object set is spatially matched with the original house space based on the common wall matching strategy to determine the spatial object group, there is no need to name the new space in the spatial object group. The new space is determined to be a new room, and the room name of the corresponding initial room is retained, so that the new room can continue to use the room name of the initial room, thereby retaining the original room information and reducing repeated input work.
[0045] As an example, a wall update operation is a wall move operation, such as Figure 2As shown, the original house space corresponds to two initial rooms, namely initial room A1 and initial room B1. Initial room A1 is the master bedroom, and initial room B1 is the study. In response to the wall move operation, a spatial object set is determined to include two new spaces, namely new space A2 and new space B2. Since new space A2 shares the most walls with initial room A1, and new space B2 shares the most walls with initial room B1, the room names of initial room A1 and initial room B1 are retained, and the name of the new room corresponding to new space A2 is determined to be master bedroom, and the name of the new room corresponding to new space B2 is determined to be study.
[0046] It should be noted that, due to different layout structures of different housing spaces, after the walls of the housing space are updated and the new space is matched with the original room based on a common wall matching strategy, a one-to-one match between the new space and the original room may be achieved, or there may be remaining new spaces that have not been successfully matched. In the case of a one-to-one match between the new space and the original room, although the wall update causes a change in the housing layout, the one-to-one match between the updated new space and the original old room (the original room) can maximize the retention of the original room information. In the case of remaining new spaces that have not been successfully matched, continue to step 104.
[0047] Step 104: In response to the existence of a new space that has not been successfully matched, determine the new space as a new room and set room attributes, or match the new space with the remaining initial rooms based on a common point matching strategy, and determine the room attributes corresponding to the new space based on the matching situation.
[0048] If unmatched new spaces still exist after common wall matching, different approaches can be used to handle these spaces based on the actual situation. Specifically, in response to unmatched new spaces, the new spaces can be directly set as new rooms with updated layouts, and room attributes can be set for the new rooms. Alternatively, in response to unmatched new spaces, the unmatched new spaces can be matched with the remaining initial rooms using a common point matching strategy, and the room attributes corresponding to the new spaces can be determined based on the point matching results.
[0049] After completing the common wall matching, for the special case where there are new spaces that have not been successfully matched, further matching is performed based on the point matching strategy. This can improve matching accuracy while adapting to complex situations and can efficiently and accurately retain room information.
[0050] The above-mentioned implementation scheme of the present application obtains N new spaces in response to the wall update operation of the original house space, matches the N new spaces with the M initial rooms corresponding to the original house space based on the common wall matching strategy, determines at least one space object group, determines the new space in the space object group as a new room and retains the room attributes of the matched initial room, thereby retaining the original information in the original house space and reducing the design workload; in the case where there is a new space that is not successfully matched after the common wall matching, the room attributes corresponding to the new space are set or the matching is continued based on the common point matching strategy, which can adapt to complex situations, improve matching accuracy, and retain room information efficiently and accurately.
[0051] Moreover, the solution provided in this application is highly flexible, applicable to various types of wall operations, and can accurately reflect spatial changes; at the same time, it has a high degree of automation, reducing the need for manual adjustments, and improving design efficiency and user design experience.
[0052] The following describes the process of determining the spatial object group. Optionally, based on the common wall matching strategy, the N new spaces in the spatial object set are matched with the M initial rooms corresponding to the original house space to determine the spatial object group, including the following steps:
[0053] Match the N new spaces with the M initial rooms to determine the first object group whose wall numbers and wall identities completely match;
[0054] Based on the matching principle of having the largest number of common walls, the remaining new spaces in the spatial object set and the remaining initial rooms corresponding to the original house space are matched again to determine the second object group;
[0055] The space object group includes a first object group and a second object group, and the matching new space and the initial room in the second object group have at least one common wall.
[0056] When matching the N new spaces in the spatial object set with the M initial rooms corresponding to the original house space, first, based on the complete matching strategy, a first object group is determined, which includes a new space and an initial room, and the number of walls and wall identifiers corresponding to the new space and the initial room are exactly the same. Specifically, for each of the N new spaces, a search is performed to determine whether there is an initial room with the same number of walls and completely compatible wall identifiers as the current new space. If the initial room is found, the current new space and the found initial room are determined to be completely matched, and then the first object group is determined. That is, for the new space and the initial room included in the first object group, the two are completely compatible in terms of the number of walls and wall identifiers, and the number of walls they share is the number of walls corresponding to the new space or the initial room.
[0057] After determining one or more first object groups based on the complete matching strategy, the remaining new spaces in the spatial object set and the remaining initial rooms corresponding to the original house spaces are further matched based on the matching principle of having the largest number of shared walls to determine a second object group consisting of a new space and an initial room, with at least one shared wall between the new space and the initial room. For a new space and an initial room in the second object group, the number of shared walls between the two spaces is greater than the number of shared walls between the new space and the remaining initial rooms combined.
[0058] In this embodiment, the first object group and the second object group both belong to the space object group, that is, the space object group includes the first object group in which the new space completely matches the initial room, and the second object group in which the new space and the initial room have at least one common wall.
[0059] The following describes the process of determining the second object group through an example. Figure 3 As shown, the original house space corresponds to two initial rooms, namely the initial room C1 and the initial room D1. The initial room C1 is a cloakroom, and the initial room D1 is a master bedroom. In response to the wall movement operation (the wall movement operation at this time causes the wall size to change), a space object set including two new spaces is determined, and the space object set includes the new space C2 and the new space D2. For the new space C2, the number of common walls it has with the initial room C1 is 4, and the number of common walls it has with the initial room D1 is 1; for the new space D2, the number of common walls it has with the initial room D1 is 4, and the number of common walls it has with the initial room C1 is 1; therefore, the new space C2 has the largest number of common walls with the initial room C1, and the new space D2 has the largest number of common walls with the initial room D1. The new space C2 and the initial room C1 constitute a second object group, and the new space D2 and the initial room D1 constitute a second object group. Since the second object group belongs to the space object group, the room names of the initial room C1 and the initial room D1 are retained, and the name of the new room corresponding to the new space C2 is determined to be the cloakroom, and the name of the new room corresponding to the new space D2 is determined to be the master bedroom.
[0060] The method of determining the second object group by re-matching the remaining new spaces in the spatial object set with the remaining initial rooms corresponding to the original house space based on the matching principle of having the largest number of common walls includes:
[0061] Sort the remaining new spaces in the space object set by the number of walls from most to least;
[0062] The remaining new spaces in the space object set are traversed in sorted order, and the initial rooms corresponding to the original house spaces are searched for the initial rooms that have the largest number of common walls with the new spaces to construct a second object group.
[0063] After determining one or more first object groups based on the complete matching strategy, the remaining new spaces in the spatial object set are sorted from most to least according to the number of walls. For the sorted new spaces, they are traversed one by one in the sorting order to find the initial room with the largest number of common walls with the current new space among the remaining initial rooms corresponding to the original house space for each remaining new space. Then, the current new space and the found initial rooms are used to construct a second object group, so as to match the remaining new spaces in the spatial object set and the remaining initial rooms corresponding to the original house space according to the matching principle of having the largest number of common walls, and construct one or more second object groups. This is to achieve the goal of determining the second object group through continuous wall matching operations after determining the first object group based on the complete matching strategy, and to retain the original room information as much as possible.
[0064] In the above implementation scheme, the new space is first matched with the initial room based on the complete matching strategy to determine a first object group including the new space and the initial room that are fully adapted in terms of the number of walls and the wall identification. Then, the remaining new spaces and the remaining initial rooms are further matched based on the matching principle of having the largest number of common walls to determine a second object group including the new space and the initial room corresponding to at least one common wall. This is done to retain the original room information as much as possible through continuous wall matching operations and reduce repeated input work.
[0065] In an optional embodiment of the present application, the method further includes: after determining the space object group based on the common wall matching strategy, in response to the existence of a new space that has not been successfully matched, identifying the number of walls corresponding to the new space that has not been successfully matched;
[0066] When the number of walls corresponding to the unmatched new space is greater than 3, the new space is determined to be a new room and room attributes are set;
[0067] When the number of walls corresponding to the unmatched new space is 3, in response to the absence of unmatched initial rooms, the new space is determined to be a new room and the room attributes are set, or, in response to the presence of unmatched initial rooms, the new space and the remaining initial rooms are matched based on the common point matching strategy.
[0068] After determining the first object group and the second object group based on the common wall matching strategy, detect whether there are new spaces in the space object set that have not been successfully matched. If there are new spaces that have not been successfully matched, identify the number of walls corresponding to the new space. When the number of walls corresponding to the new space is greater than 3, determine that the new space is a new room and set its corresponding room attributes. It should be noted that if the number of walls corresponding to the new spaces that have not been successfully matched is greater than 3, for the remaining initial rooms, the initial rooms will be deleted after the matching is completed. For example, Figure 4As shown, before the wall update, initial rooms 1 and 2 were not in contact. After moving the wall of initial room 1 (which also caused the entire room 1 to move), new spaces A, B, and C were formed. New space B and initial room 2 share a wall, and new space A and initial room 1 share a wall. Therefore, two second object groups can be formed: new space A forms new room A, retaining the room attributes of initial room 1, and new space B forms new room B, retaining the room attributes of initial room 2. As for new space C, which corresponds to four walls, it is directly determined as new room C and its room attributes are set.
[0069] When the number of walls corresponding to the new space is equal to 3, continue to detect whether there is an unmatched initial room. In response to the absence of an unmatched initial room, determine that the new space is a new room and set its room properties. In response to the existence of an unmatched initial room, continue to match the remaining new spaces and the remaining initial rooms based on the common point matching strategy.
[0070] The following example describes the process of determining the new space as a new room and setting room properties when the remaining new space corresponds to 3 walls and there is no unmatched initial room. Figure 5 As shown, before a wall update (e.g., adding a new wall) is performed, the corresponding objects are initial rooms 1 and 2. After the wall is added, the corresponding objects are new spaces 1, 2, and 3. New space 1 completely matches initial room 1, and a first object group can be constructed. New space 2 and initial room 2 share a wall, and a second object group can be constructed. The room attributes (room name) corresponding to new space 1 are the room attributes of initial room 1, and the room attributes (room name) corresponding to new space 2 are the room attributes of initial room 2. New space 3 corresponds to three walls, and since there is no unmatched initial room, new space 3 is determined to be a new room and its corresponding room attributes are set.
[0071] In the process of matching the new space with the remaining initial rooms based on the common point matching strategy and determining the room attributes corresponding to the new space based on the matching results, the following steps are included:
[0072] For the initial room that was not successfully matched, searching for a new space that has common points with the initial room in the new spaces that were not successfully matched;
[0073] In response to finding a new space having a common location with the initial room, it is determined that the initial room and the found new space are matched successfully, the found new space is determined to be a new room and the room attributes of the corresponding initial room are retained.
[0074] If the number of walls corresponding to the unmatched new space is three and there is an unmatched initial room, a common point matching strategy is used to match the unmatched new space with the initial room. The specific matching process is as follows: For the unmatched initial room, a new space that shares common points with the current initial room is searched in the unmatched new space.
[0075] In response to finding a new space that has common points with the initial room (determining that the current initial room contains points that constitute the new space), it is determined that the current initial room and the found new space are successfully matched based on the points. At this time, the found new space is determined as a new room and the room attributes of the corresponding initial room are retained, so as to retain the room attributes of the initial room after the point matching is successful.
[0076] The number of new spaces found that share a common location with the initial room is at least one. In response to finding one new space that shares a common location with the initial room, the room attributes of the corresponding initial room are retained for the new space. In response to finding at least two new spaces that share a common location with the initial room, the room attributes of the corresponding initial room are retained for one of the at least two new spaces, and room attributes are set for the remaining at least one new space.
[0077] If there is only one new space found that shares common points with the original room, the original room's room attributes are retained and then directly assigned to the new space, allowing the new space to retain the original room's information. If there are at least two new spaces found that share common points with the original room, the original room's room attributes are retained for any one of the at least two new spaces, and the room attributes of the remaining at least one new space are reset.
[0078] As an example, Figure 6 As shown, before the wall is updated (e.g., moved), it corresponds to the initial room 1 and the initial room 2. After the wall is moved, it corresponds to the new space A, the new space B, and the new space C. New space A and the initial room 1 share a wall, so a second object group can be constructed. New spaces B and C both share points in common with the initial room 2 (such as the circled positions in the figure). Therefore, for any new space, such as new space B, the room attributes of the initial room 2 can be retained, while the room attributes of the other new space (new space C) can be reset.
[0079] In the above implementation scheme, after determining the space object group based on the common wall matching strategy, for the new space that has not been successfully matched, the corresponding number of walls is identified, and the room attributes are reset according to the corresponding number of walls. Alternatively, based on the number of walls and the existence of the initial room that has not been successfully matched, the room attributes are retained in an appropriate manner to improve the matching accuracy while handling complex situations.
[0080] In another embodiment of the present application, after receiving the wall update operation of the original house space, it also includes: detecting whether the walls of the pre-marked vacuum space have changed; in response to the wall changes of the vacuum space, determining that the vacuum space is a new room and setting the room attributes.
[0081] When dividing a room in the editor, there is a component called concave and convex wall, which causes the generation of vacuum space. When processing, the backend sends the point data and room data (excluding vacuum space) to the frontend, and the frontend traverses the points to form spaces one by one. Since the vacuum space is also a closed figure, it will also be recognized as a space, such as Figure 7 As shown in the figure, the three locations indicated are all vacuum spaces. If vacuum spaces are not handled, they will be left behind when matching rooms to rooms, effectively creating a new room, which is incorrect. Therefore, when the backend data is first loaded, after all normal rooms have been successfully matched, the remaining space is marked as vacuum space and stored in the rooms collection (which stores information for all rooms on a floor).
[0082] When matching a new room with an old room after a wall change, the marked vacuum room is prioritized. The system then determines whether the walls of the vacuum room have changed. If not, the vacuum room is removed from both the new room data and the old room data before further matching. If the walls of the vacuum room have changed, the vacuum room is removed from the rooms collection, identified as a new room, and the room properties are set before further matching.
[0083] By accurately identifying and processing vacuum space, the accuracy of space utilization analysis can be improved. After introducing the concept and processing mechanism of vacuum space, the integrity and accuracy of space analysis can be further improved.
[0084] The above is the overall implementation plan of the room layout update method provided in the embodiment of the present application. It is based on the proposed multi-level and multi-dimensional room information matching algorithm, combined with complete matching, maximum number of common wall matching and common point matching, to retain the original room information to the greatest extent possible, so as to efficiently retain room information and reduce repeated input work, and can handle complex situations and improve matching accuracy; by accurately identifying and processing vacuum spaces, the accuracy of space utilization analysis can be improved, and after introducing the concept and processing mechanism of vacuum spaces, the integrity and accuracy of space analysis can be further improved.
[0085] The solution provided in this application is highly flexible, applicable to various types of wall operations, and can accurately reflect spatial changes. At the same time, it has a high degree of automation, reducing the need for manual adjustments and improving design efficiency and user design experience.
[0086] The embodiment of the present application provides a room layout updating device, such as Figure 8 As shown, including:
[0087] An update acquisition module 801 is configured to acquire a set of space objects including N new spaces in response to a wall update operation on an original house space;
[0088] Matching determination module 802 is configured to match the N new spaces in the spatial object set with the M initial rooms corresponding to the original house space based on a common wall matching strategy, and determine a spatial object group, wherein the spatial object group includes a successfully matched new space and an initial room having the largest number of common walls, where M and N are both integers greater than or equal to 1;
[0089] a determination and retention module 803, configured to determine that the new space in the space object group is a new room and retain the room attributes of the corresponding initial room;
[0090] The first processing module 804 is used to, in response to the existence of a new space that has not been successfully matched, determine that the new space is a new room and set room attributes, or, based on a common point matching strategy, match the new space with the remaining initial rooms and determine the room attributes corresponding to the new space based on the matching situation.
[0091] Optionally, the matching determination module includes:
[0092] A first matching determination submodule is configured to match the N new spaces with the M initial rooms to determine a first object group having completely matching wall numbers and wall identifiers;
[0093] a second matching determination submodule, configured to rematch the remaining new spaces in the spatial object set and the remaining initial rooms corresponding to the original house space based on a matching principle of having the largest number of common walls, to determine a second object group;
[0094] The space object group includes the first object group and the second object group, and the matching new space and the initial room in the second object group have at least one common wall.
[0095] Optionally, the second matching determination submodule includes:
[0096] a sorting unit, configured to sort the remaining new spaces in the space object set according to the number of walls from large to small;
[0097] The processing unit is used to traverse the remaining new spaces in the space object set in sorted order, search for the initial room with the largest number of common walls with the new space among the remaining initial rooms corresponding to the original house space, and construct the second object group.
[0098] Optionally, the device further comprises:
[0099] an identification module configured to, after determining the spatial object group based on the common wall matching strategy, identify the number of walls corresponding to the unmatched new space in response to the existence of the unmatched new space;
[0100] a determination and setting module, configured to determine that the new space is a new room and set room attributes when the number of walls corresponding to the unmatched new space is greater than 3;
[0101] The second processing module is used to, when the number of walls corresponding to the unmatched new space is 3, in response to the absence of unmatched initial rooms, determine that the new space is a new room and set room attributes, or, in response to the presence of unmatched initial rooms, match the new space with the remaining initial rooms based on a common point matching strategy.
[0102] Optionally, the first processing module includes:
[0103] A search submodule is used to search for a new space that has a common point with the initial room among the new spaces that have not been successfully matched;
[0104] The determination and retention submodule is used to determine that the initial room and the found new space are successfully matched in response to finding a new space having a common point with the initial room, determine that the found new space is a new room and retain the room attributes of the corresponding initial room.
[0105] Optionally, the determination and retention submodule is further configured to:
[0106] In response to finding a new space having a common location with the initial room, retaining the room attributes of the corresponding initial room for the found new space;
[0107] In response to finding at least two new spaces having a common location with the initial room, the room attributes of the corresponding initial room are retained for one of the at least two new spaces, and the room attributes are set for the remaining at least one new space.
[0108] Optionally, after receiving the wall update operation for the original house space, the device further includes:
[0109] A detection module is used to detect whether the wall of the pre-marked vacuum space has changed;
[0110] The determination and setting module is configured to determine that the vacuum space is a new room and set room attributes in response to a change in a wall of the vacuum space.
[0111] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0112] An embodiment of the present application also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned room layout updating method embodiment are implemented, and the same technical effects can be achieved. To avoid repetition, they will not be described here.
[0113] For example, Figure 9 FIG. 1 shows a schematic diagram of the physical structure of an electronic device. Figure 9 As shown, the electronic device may include: a processor 910, a communication interface 920, a memory 930, and a communication bus 940. The processor 910, the communication interface 920, and the memory 930 communicate with each other via the communication bus 940. The processor 910 may call logic instructions in the memory 930. The processor 910 is used to execute the various processes of the room layout updating method according to the embodiment of the present application, which will not be elaborated on here.
[0114] In addition, the logic instructions in the above-mentioned memory 930 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.
[0115] The present application also provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program implements the various processes of the above-described room layout update method embodiment and achieves the same technical effects. To avoid repetition, the details are not described here. The computer-readable storage medium may be, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0116] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0117] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0118] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
[0119] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0120] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0121] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0122] The units described as separate components may or may not be physically separate, and 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0123] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0124] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
[0125] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A room layout updating method, characterized in that: include: In response to the wall update operation on the original house space, a space object set including N new spaces is obtained; Based on the common wall matching strategy, the N new spaces in the space object set are matched with the M initial rooms corresponding to the original house space to determine a space object group. The space object group includes a new space and an initial room that are successfully matched and have the largest number of common walls, where M and N are both integers greater than or equal to 1. Determine the new space in the space object group as a new room and retain the room attributes of the corresponding initial room; In response to the existence of a new space that has not been successfully matched, determining the new space as a new room and setting room attributes, or matching the new space with the remaining initial rooms based on a common point matching strategy, and determining the room attributes corresponding to the new space based on the matching results; Among them, the common wall matching strategy includes: performing spatial matching based on the exact same number of walls and wall identifiers, and continuing spatial matching based on having the largest number of common walls; the common point matching strategy is performing spatial matching based on having common points.
2. The method according to claim 1, characterized in that The method of matching the N new spaces in the spatial object set with the M initial rooms corresponding to the original house space based on the common wall matching strategy to determine the spatial object group includes: Matching the N new spaces with the M initial rooms to determine a first object group having completely matching wall numbers and wall identifiers; Based on the matching principle of having the largest number of common walls, the remaining new spaces in the spatial object set are matched again with the remaining initial rooms corresponding to the original house space to determine a second object group; The space object group includes the first object group and the second object group, and the matching new space and the initial room in the second object group have at least one common wall.
3. The method according to claim 2, characterized in that The method of re-matching the remaining new spaces in the spatial object set and the remaining initial rooms corresponding to the original house space based on the matching principle of having the largest number of common walls to determine the second object group includes: Sort the remaining new spaces in the space object set according to the number of walls from large to small; The remaining new spaces in the space object set are traversed in sorted order, and the initial rooms corresponding to the original house spaces are searched for the initial rooms that have the largest number of common walls with the new spaces to construct the second object group.
4. The method according to claim 1, wherein Also includes: After determining the space object group based on the common wall matching strategy, in response to the existence of a new space that has not been successfully matched, identifying the number of walls corresponding to the new space that has not been successfully matched; When the number of walls corresponding to the unmatched new space is greater than 3, the new space is determined to be a new room and room attributes are set; When the number of walls corresponding to the unmatched new space is 3, in response to the absence of unmatched initial rooms, the new space is determined to be a new room and the room attributes are set, or, in response to the presence of unmatched initial rooms, the new space and the remaining initial rooms are matched based on the common point matching strategy.
5. The method according to claim 4, characterized in that The matching of the new space with the remaining initial rooms based on the common point matching strategy and determining the room attributes corresponding to the new space based on the matching results include: For the initial room that was not successfully matched, searching for a new space that has common points with the initial room in the new spaces that were not successfully matched; In response to finding a new space having a common location with the initial room, it is determined that the initial room and the found new space are matched successfully, the found new space is determined to be a new room and the room attributes of the corresponding initial room are retained.
6. The method according to claim 5, characterized in that in, In response to finding a new space having a common location with the initial room, retaining the room attributes of the corresponding initial room for the found new space; In response to finding at least two new spaces having a common location with the initial room, the room attributes of the corresponding initial room are retained for one of the at least two new spaces, and the room attributes are set for the remaining at least one new space.
7. The method according to claim 1, characterized in that After receiving the wall update operation for the original house space, the method further includes: Detect whether the wall of the pre-marked vacuum space has changed; In response to a change in a wall of the vacuum space, the vacuum space is determined to be a new room and room attributes are set.
8. A room layout updating device, characterized in that: include: An update acquisition module, configured to acquire a set of space objects including N new spaces in response to a wall update operation on the original house space; a matching determination module, configured to match the N new spaces in the spatial object set with the M initial rooms corresponding to the original housing space based on a common wall matching strategy, and determine a spatial object group, wherein the spatial object group includes a successfully matched new space and an initial room having the largest number of common walls, where M and N are both integers greater than or equal to 1; a determination and retention module, configured to determine that the new space in the space object group is a new room and retain the room attributes of the corresponding initial room; A first processing module is configured to, in response to the presence of a new space that has not been successfully matched, determine that the new space is a new room and set room attributes, or, based on a common point matching strategy, match the new space with the remaining initial rooms and determine the room attributes corresponding to the new space based on the matching results; Among them, the common wall matching strategy includes: performing spatial matching based on the exact same number of walls and wall identifiers, and continuing spatial matching based on having the largest number of common walls; the common point matching strategy is performing spatial matching based on having common points.
9. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the room layout updating method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the room layout updating method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Combined indoor layout method and system based on house type data driving
CN111091618A
Indoor decoration layout method and device, electronic equipment and readable storage medium
CN114417485A