Spatial layout map matching method and device and storage medium
By obtaining and matching layout feature parameters in the smart home system and automatically determining the target layout map, the problem of users finding similar layout maps in multiple layout maps is solved, and the efficiency of spatial layout map matching is improved.
Patent Information
- Application Number
- CN202310960002.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-01
- Publication Date
- 2025-02-14
AI Technical Summary
In smart home systems, it takes too long for users to find similar spatial layout diagrams in multiple pre-stored layout diagrams, resulting in inefficient matching of spatial layout diagrams.
By obtaining the first layout feature parameters of the target space input by the user based on the preset image area and matching it with the second layout feature parameters of the pre-stored layout map, the target layout map matching the target space is automatically determined.
This method greatly shortens the time required for target layout diagram determination, improves the efficiency of spatial layout diagram matching, and reduces the burden of users filtering themselves in the gallery.
Smart Images

Figure CN119441521A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart home technology, and in particular to a matching method for a space layout diagram, a matching device for a space layout diagram, and a storage medium. Background Art
[0002] Smart home systems often need to use the spatial layout of the space they are in during operation. In general, a gallery storing multiple layouts is provided in the smart home system, and the layout selected by the user in the gallery is used as the final matching layout. However, there are many layouts in the gallery, and it takes a long time for the user to find a similar layout from the gallery, resulting in poor matching of the current spatial layout. Summary of the invention
[0003] The main purpose of the present invention is to provide a spatial layout diagram matching method, a spatial layout diagram matching device and a storage medium, aiming to improve the spatial layout diagram matching efficiency.
[0004] To achieve the above object, the present invention provides a method for matching a space layout diagram, and the method for matching a space layout diagram comprises the following steps:
[0005] Acquire a first layout feature parameter of a target space input by a user based on a preset image area;
[0006] A target layout diagram matching the target space is determined from a plurality of pre-stored layout diagrams according to the first layout feature parameter and a second layout feature parameter of the pre-stored layout diagram.
[0007] Optionally, the step of obtaining a first layout feature parameter of a target space input by a user based on a preset image area includes:
[0008] Acquire first position information of a region position point selected by a user on the preset image region;
[0009] Obtain a first area type represented by the area location point;
[0010] The first layout feature parameter includes the first location information and the first area type.
[0011] Optionally, the second layout feature parameter includes a second area type and a second location information of a preset area included in the corresponding pre-stored layout diagram, and the step of determining a target layout diagram matching the target space from a plurality of pre-stored layout diagrams according to the first layout feature parameter and the second layout feature parameter of the pre-stored layout diagram includes:
[0012] Determine a first similarity between the target space and the indoor space represented by each of the pre-stored layout diagrams according to the first location information, the first area type, the second location information and the second area type corresponding to the pre-stored layout diagram;
[0013] The target layout graph is determined from the plurality of pre-stored layout graphs according to the plurality of first similarities.
[0014] Optionally, the step of determining a first similarity between the target space and the indoor space represented by each of the pre-stored layout diagrams according to the first position information, the first area type, the second position information and the second area type corresponding to the pre-stored layout diagram comprises:
[0015] Associating the first location information with the second location information according to the second area type and the first area type corresponding to each of the pre-stored layout diagrams;
[0016] Determining a second similarity of a corresponding area type according to the associated first location information and the second location information;
[0017] The corresponding first similarity is determined according to all the second similarities corresponding to each of the pre-stored layout graphs.
[0018] Optionally, the step of determining a second similarity of a corresponding area type according to the associated first location information and the second location information includes:
[0019] Determine the distance between the regional reference point represented by the second position information and the regional position point in a preset coordinate system according to the associated first position information and the second position information;
[0020] The second similarity is determined according to the distance.
[0021] Optionally, the step of determining the second similarity according to the distance includes:
[0022] Obtaining preset size parameters corresponding to the target space;
[0023] The second similarity is determined according to the distance and the preset size parameter.
[0024] Optionally, the step of determining the corresponding first similarity according to all the second similarities corresponding to each of the pre-stored layout graphs includes:
[0025] Determine a corresponding valid area type set according to the second area type and the first area type corresponding to each of the pre-stored layout diagrams;
[0026] The corresponding first similarity is determined according to the sum of all the second similarities corresponding to each of the pre-stored layout diagrams and the number of region types in the valid region type set.
[0027] Optionally, the step of determining a corresponding valid area type set according to the second area type and the first area type corresponding to each of the pre-stored layout diagrams includes:
[0028] Determine an intersection of all the first region types and all the second region types corresponding to the pre-stored layout diagram as a first valid set corresponding to the pre-stored layout diagram;
[0029] Determine a set of all the first area types except the intersection as a second valid set;
[0030] Determine a set of all second region types corresponding to the pre-stored layout diagram except the intersection as a third valid set corresponding to the pre-stored layout diagram;
[0031] The valid area type set of each of the pre-stored layout diagrams includes the corresponding first valid set, the second valid set and the third valid set.
[0032] Optionally, after the step of determining a target layout map matching the target space in the plurality of pre-stored layout maps according to the first layout feature parameter and second layout feature parameters respectively corresponding to the plurality of pre-stored layout maps, the method further includes:
[0033] The recommended information is output according to the target layout diagram.
[0034] In addition, in order to achieve the above-mentioned purpose, the present application also proposes a matching device for a spatial layout diagram, and the matching device for the spatial layout diagram includes: a memory, a processor, and a matching program for the spatial layout diagram stored in the memory and executable on the processor, and when the matching program for the spatial layout diagram is executed by the processor, the steps of the matching method for the spatial layout diagram as described in any one of the above items are implemented.
[0035] In addition, in order to achieve the above-mentioned purpose, the present application also proposes a storage medium, on which a matching program for a spatial layout diagram is stored. When the matching program for a spatial layout diagram is executed by a processor, the steps of the matching method for a spatial layout diagram as described in any of the above items are implemented.
[0036] The present invention proposes a method for matching a spatial layout diagram. The method obtains a first layout feature parameter of a space input based on a preset image area and a second layout feature parameter of a pre-stored layout diagram to determine a target layout diagram matching the target space from multiple pre-stored layout diagrams. Based on this, the user only needs to input the layout features of the target space in the preset image area to automatically match the corresponding target layout diagram. The user does not need to screen multiple pre-stored layout diagrams by himself, which shortens the time required to determine the target layout diagram, thereby effectively improving the efficiency of spatial layout diagram matching. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of the hardware structure involved in the operation of an embodiment of a matching device for a spatial layout diagram of the present invention;
[0038] Figure 2 It is a schematic diagram of a flow chart of an embodiment of a method for matching a spatial layout diagram of the present invention;
[0039] Figure 3 A schematic diagram of a flow chart of another embodiment of a method for matching a spatial layout diagram of the present invention;
[0040] Figure 4 A schematic diagram of a preset image area and a user-input area position point involved in an embodiment of a method for matching a spatial layout diagram of the present invention;
[0041] Figure 5 An example of a pre-stored layout diagram involved in an embodiment of a method for matching a spatial layout diagram of the present invention;
[0042] Figure 6 It is a schematic diagram of the relationship between the user demand area location point and the area location point corresponding to the pre-stored layout map in the embodiment of the spatial layout map matching method of the present invention.
[0043] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0044] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0045] The embodiment of the present invention provides a matching device for a space layout diagram, which is applied to a smart home system, wherein the smart home system includes one or more smart appliances in a target space. In this embodiment, the target space is the whole house. In other embodiments, the target space may also be a combination of preset designated areas or a certain area, such as a room or a living room.
[0046] The matching device of the space layout diagram can be a user terminal (such as a mobile terminal such as a mobile phone or a tablet computer installed with a preset application) or a server of a smart home system or a smart appliance in the smart home system.
[0047] In the embodiment of the present invention, refer to Figure 1 The matching device of the spatial layout diagram includes: a processor 1001, such as a CPU, a memory 1002, and an interaction module 1003. Among them, these components are connected and communicated through a communication bus. The memory 1002 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1002 can also be a storage device independent of the aforementioned processor 1001.
[0048] The interaction module 1003 may be used to interact with the user. The interaction module may display an image and obtain information input by the user based on the displayed image.
[0049] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation of the device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0050] like Figure 1 As shown, the memory 1002 as a computer storage medium may include a matching program for the space layout diagram.
[0051] exist Figure 1 In the device shown, the processor 1001 can be used to call the matching program of the space layout diagram stored in the memory 1002, and execute the relevant step operations of the matching method of the space layout diagram in the following embodiment.
[0052] An embodiment of the present invention further provides a method for matching a space layout diagram, which is applied to the above-mentioned method for matching a space layout diagram.
[0053] Reference Figure 2 , an embodiment of a matching method of a space layout diagram of the present application is proposed. In this embodiment, the matching method of the space layout diagram includes:
[0054] Step S10, obtaining a first layout feature parameter of a target space input by a user based on a preset image area;
[0055] The target space here is specifically the indoor space where the smart home system is located.
[0056] The preset image area is a preset image area for representing the target space. In this embodiment, the preset image area has a fixed size. In this embodiment, the preset image area is a rectangular area. In other embodiments, the preset image area may also be an area of other shapes.
[0057] In the matching mode of the layout diagram, a preset image area can be displayed, and the detection user can draw a pattern (such as points and / or lines, etc.) corresponding to the target space layout in the preset image area through hardware operation or touch screen operation input instructions based on the layout of the target space, analyze the image feature information (such as position and / or shape, etc.) of the pattern drawn by the user, and determine the first layout feature parameter here according to the image feature information. Furthermore, the annotation information input by the user based on the pattern can also be obtained, and the first layout feature parameter here is determined according to the pattern and the corresponding annotation information.
[0058] The first layout characteristic parameters include but are not limited to at least one of the following parameters: position characteristic parameters of the area contained in the target space (such as absolute position parameters and / or relative position parameters relative to other areas, etc.), area type, area characteristic parameters (such as absolute area parameters and / or area characteristic parameters relative to other areas, etc.), etc.
[0059] Step S20: determining a target layout diagram matching the target space from a plurality of pre-stored layout diagrams according to the first layout feature parameter and a second layout feature parameter of the pre-stored layout diagram.
[0060] A plurality of pre-stored layout diagrams are pre-stored in the memory, and different pre-stored layout diagrams represent different indoor space layouts. The second layout characteristic parameters include but are not limited to at least one of the following parameters: position characteristic parameters (such as absolute position parameters and / or relative position parameters relative to other regions, etc.) of the region included in the indoor space layout represented by the pre-stored layout diagram, region type, area characteristic parameters (such as absolute area parameters and / or area characteristic parameters relative to other regions, etc.), image characteristic parameters of the pre-stored layout diagram, etc.
[0061] The number of the determined target layout diagrams may be one or more than one.
[0062] In an implementation of this embodiment, the deviation value between the second layout feature parameter and the first layout feature parameter corresponding to each pre-stored layout diagram is determined to obtain multiple deviation values, and the target layout diagram is determined according to the multiple deviation values.
[0063] In another implementation of this embodiment, the second layout feature parameter may be an image feature parameter of a pre-stored layout diagram, the first layout feature parameter is determined to generate an indoor layout diagram corresponding to the target space, the similarity between the image features of the indoor layout diagram and the image feature parameters of each pre-stored layout diagram is analyzed, multiple similarities are obtained, and the target layout diagram is determined based on the multiple similarities.
[0064] A method for matching a spatial layout diagram is proposed in an embodiment of the present invention. The method obtains a first layout feature parameter of a space input based on a preset image area and a second layout feature parameter of a pre-stored layout diagram to determine a target layout diagram matching the target space from multiple pre-stored layout diagrams. Based on this, the user only needs to input the layout features of the target space in the preset image area to automatically match the corresponding target layout diagram. The user does not need to screen multiple pre-stored layout diagrams by himself, which shortens the time required to determine the target layout diagram, thereby effectively improving the efficiency of spatial layout diagram matching.
[0065] Furthermore, in the above embodiment, after step S20, the method further includes: outputting recommendation information according to the target layout diagram.
[0066] Specifically, the target layout diagram may be displayed for the user to confirm whether it matches the actual layout of the target space. After receiving the confirmation information input by the user, the operation of the smart home system may be controlled according to the target layout diagram.
[0067] Among them, based on the target layout diagram, the target area that the user needs to act on the smart home system in the target space can be obtained, and the electrical appliances in the target area of the smart home system can be controlled to operate with the target control parameters, or, based on the target layout diagram, the area corresponding to the target area type associated with the current operating scene of the smart home system can be identified as the target area, and the target area can be controlled to operate according to the preset scene parameters corresponding to the current operating scene. For example, in the dehumidification mode, the target area selected by the user based on the target layout diagram can be obtained, and the electrical appliances in the target area can be controlled to turn on and operate in a dehumidification mode; for another example, in the sleep mode, the bedroom area can be determined based on the target layout diagram, and the air conditioner in the bedroom area can be controlled to operate with the sleep parameters, and so on.
[0068] In this embodiment, by recommending the target layout diagram to the user, the user does not need to search for the layout diagram of the target space from the gallery, thereby further improving the efficiency of the user in determining the floor plan matching the target space.
[0069] Further, based on the above embodiment, another embodiment of the matching method of the space layout diagram of the present application is proposed. In this embodiment, referring to Figure 3 , the step S10 comprises:
[0070] Step S11, obtaining first position information of a region position point selected by a user on the preset image region;
[0071] The user can select a regional position point that can represent a sub-region in the target space by clicking on the preset image area, and the preset image area can display the corresponding point mark on the preset image area during the user selecting the regional position point. Each regional position point corresponds to a sub-region. The first position information can be specifically determined according to the image position information of the regional position point on the preset image area.
[0072] In this embodiment, the first position information corresponding to all two regional position points selected by the user on the preset image area is obtained. In this embodiment, the number of regional position points is more than one. In other embodiments, the number of regional position points may also be one.
[0073] The regional position points on the preset image area may include regional position points corresponding to all sub-areas in the target space; in addition, the regional position points on the preset image area may include regional position points corresponding to molecular areas inside the target space.
[0074] Step S12, obtaining a first area type represented by the area location point;
[0075] The first layout feature parameter includes the first location information and the first area type.
[0076] When there is more than one area location point, obtain the first area type represented by each area location point.
[0077] The first area type includes a dining room, a living room, a master bedroom, a guest bedroom, a bathroom, etc.
[0078] In this embodiment, the first area type is selected by the user from a plurality of preset area types. In other embodiments, it can also be determined by identifying characteristic parameters (such as shape and / or quantity and / or trajectory, etc.) of a pattern corresponding to the area position point input by the user on the preset image area, and different pattern characteristic parameters correspond to different first area types.
[0079] For example, combined with Figure 4 , the rectangular frame area is the preset image area, the points above are the area location points selected by the user, the points in brackets are the first location information of the area location points, and the text shows the first area type corresponding to the first location information.
[0080] In this embodiment, through the above method, the user can automatically match the target layout map by inputting the regional location points and region types representing the spatial layout of the target space based on the preset image area, which helps to simplify user operations and further improve the efficiency of spatial layout map matching.
[0081] In other embodiments, the region outline drawn by the user of the preset image region and the corresponding region type may also be obtained, and the first layout feature parameter may include the region outline and the region type, and so on.
[0082] Furthermore, in this embodiment, the second layout feature parameter includes the second area type and the second position information of the preset area contained in the corresponding pre-stored layout diagram. The second layout feature parameter includes the second area type and the corresponding second position information of all preset areas contained in the corresponding pre-stored layout diagram. Each preset area may be provided with a reference point representing the position of the area (such as the center point or corner point of the area, etc.), and the image position information of the reference point on the pre-stored layout diagram is obtained to determine the second position information here. The second area type includes a dining room or a living room or a master bedroom or a guest bedroom or a bathroom, etc. For example, Figure 5 It is a pre-stored layout diagram, and each point on it is the center point of the corresponding sub-region. The second region type is displayed in text, and the second position information of the sub-region corresponding to the second region type is in brackets.
[0083] Based on this, refer to Figure 3 , step S20 comprises:
[0084] Step S21, determining a first similarity between the target space and the indoor space represented by each of the pre-stored layout diagrams according to the first location information, the first area type, the second location information and the second area type corresponding to the pre-stored layout diagram;
[0085] Each pre-stored layout graph is analyzed to obtain a first similarity.
[0086] In this embodiment, the first position information and the second position information are information defined based on the same reference system. For example, the first position information and the second position information are both coordinates in a preset coordinate system.
[0087] In one implementation of the present embodiment, the similarities between different areas in the spatial layout corresponding to the pre-stored layout diagram and the spatial layout corresponding to the first layout diagram parameters are analyzed based on all the second position information and the corresponding second area type corresponding to each pre-stored layout diagram, as well as all the first position information and the corresponding first area type, and the corresponding first similarity is determined based on the similarity of all areas.
[0088] In another implementation of this embodiment, a first connection contour map of all corresponding areas can be generated based on all first position information, and a second connection contour map of all corresponding areas can be generated based on all second position information. The similarity between the first connection contour map and the second connection contour map is analyzed to obtain a first sub-similarity. The similarity between all first area types and all second area types is analyzed to obtain a second sub-similarity. The first similarity here is determined based on the first sub-similarity and the second sub-similarity.
[0089] Step S22: determining the target layout diagram from the plurality of pre-stored layout diagrams according to the plurality of first similarities.
[0090] The pre-stored layout diagram corresponding to the first similarity with the largest value among the multiple first similarities is used as the target layout diagram. Alternatively, all pre-stored layout diagrams corresponding to the first similarities greater than a preset threshold among the multiple first similarities are used as the target layout diagram. Alternatively, the multiple first similarities are arranged in order from large to small, and all pre-stored layout diagrams corresponding to the preset first similarities arranged in front are used as the target layout diagram.
[0091] In this embodiment, the similarity between the first spatial layout and the second spatial layout is analyzed in combination with the area location and area type, and the similarities corresponding to all pre-stored layout diagrams are used to determine the target layout diagram that matches the target space, which is beneficial to improving the layout diagram matching efficiency while ensuring that the target layout diagram accurately matches the actual layout of the target space.
[0092] Further, in this embodiment, step S21 includes: associating the first position information with the second position information according to the second area type and the first area type corresponding to each of the pre-stored layout diagrams; determining the second similarity of the corresponding area type according to the associated first position information and the second position information; and determining the corresponding first similarity according to all the second similarities corresponding to each of the pre-stored layout diagrams.
[0093] When the second area type corresponding to the pre-stored layout diagram has a first area type that is consistent with it, the first position information and the second position information corresponding to the same area type are associated, and the associated first position information and the second position information form an associated information group. Each second position information of all the second position information corresponding to each pre-stored layout diagram is compared with each first position information, and all associated information groups corresponding to each pre-stored layout diagram can be obtained. The number of associated information groups corresponding to each pre-stored layout diagram can be 0, 1, or more than 1.
[0094] For example, combined with Figure 4 and Figure 5 , Figure 4 and Figure 5 If they all include a living room, a dining room, and a master bedroom, the first position information corresponding to the living room is associated with the second position information, the first position information corresponding to the dining room is associated with the second position information, and the first position information corresponding to the master bedroom is associated with the second position information.
[0095] The first position information and the second position information in each associated information group are compared or looked up in a table, and the corresponding second similarity is obtained according to the comparison result or the table lookup result. Alternatively, the second similarity is calculated according to the first position information and the second position information according to a preset algorithm.
[0096] One associated information group may correspond to one second similarity. All associated information groups corresponding to each pre-stored layout diagram are determined, and the corresponding second similarity is determined according to each associated information group, so as to obtain all second similarities corresponding to each pre-stored layout diagram.
[0097] The first similarity may be calculated using all the second similarities according to a pre-set algorithm rule, or the second similarity that satisfies a condition (such as a maximum value or a minimum value) among all the second similarities may be used as the first similarity.
[0098] In this embodiment, the area location input by the user is associated with the area location in the pre-stored layout diagram based on the area type, the similarity of the corresponding areas is determined based on the associated area location information, and the similarity between the first spatial layout and each second spatial layout is determined based on all associated area similarities, which is beneficial to improving the accuracy of the similarity representation between the actual spatial layout and the spatial layout represented by the pre-stored layout diagram, so as to further improve the accuracy of spatial layout diagram recognition.
[0099] Furthermore, in this embodiment, the step of determining the second similarity of the corresponding area type based on the associated first position information and the second position information includes: determining the distance between the area reference point represented by the second position information in a preset coordinate system and the area position point based on the associated first position information and the second position information; and determining the second similarity based on the distance.
[0100] In this embodiment, the first position information and the second position information are both coordinates in a preset coordinate system, and the distance here can be directly calculated using the first position information and the second position information. In other embodiments, the first position information and the second position information can also be coordinates in other coordinate systems other than the preset coordinate system, and the first position information and the second position information are converted into coordinates in the preset coordinate system according to a preset conversion relationship, and then the distance here is calculated.
[0101] Different distances correspond to different second similarities. The distance is negatively correlated with the similarity, that is, the greater the distance, the smaller the similarity, and the smaller the distance, the greater the similarity. Specifically, the similarity can be calculated by substituting the distance into a preset formula, or by matching the distance table, or by determining the preset similarity associated with the distance range as the second similarity.
[0102] like Figure 6 As shown, Figure 6 It is a relationship diagram between the regional position points representing each area in the target space in a preset coordinate system and the regional position points of each area in a pre-stored layout diagram, wherein the solid points are the identification points representing each area in the target space, and the hollow points are the identification points corresponding to the center points of each area in the pre-stored layout diagram.
[0103] In this embodiment, determining the second similarity based on distance is conducive to ensuring that the second similarity can accurately reflect the size of the position deviation between the area represented by the second position information in the pre-stored layout diagram and the same type of area in the target space, thereby further improving the accuracy of the target layout diagram obtained based on the second similarity analysis, improving the matching efficiency of the target layout diagram and improving the accuracy of the target layout diagram matching.
[0104] Further, in an embodiment, the step of determining the second similarity according to the distance includes: acquiring a preset size parameter corresponding to the target space; and determining the second similarity according to the distance and the preset size parameter.
[0105] The preset size parameter of the target space here may be the actual space size of the target space itself or the size of a preset image area representing the target space.
[0106] In this embodiment, the preset size parameters include length and width, and the second similarity can be calculated by the following formula:
[0107]
[0108] Among them, S i,j represents the second similarity, x i With y i represents the first position information of region i in the target space required by the user, x i,j With y i,j represents the second position information of the i region in the jth pre-stored layout diagram, The distances M and N represent the length and width of the target space and are used for normalization.
[0109] In this embodiment, the above-mentioned method is helpful to ensure that the size change of the target space required by the user will not cause errors in layout map recognition, thereby effectively improving the efficiency of layout map recognition and improving the accuracy of layout map recognition.
[0110] In other embodiments, the preset size parameter may also include area, diagonal length, perimeter, etc.
[0111] Further, in the present embodiment, the step of determining the corresponding first similarity based on all the second similarities corresponding to each of the pre-stored layout diagrams includes: determining a corresponding valid area type set based on the second area type and the first area type corresponding to each of the pre-stored layout diagrams; and determining the corresponding first similarity based on the sum of all the second similarities corresponding to each of the pre-stored layout diagrams and the number of area types in the valid area type set.
[0112] The area types included in the valid area type set are different from each other. Each pre-stored layout diagram has a corresponding valid area type set.
[0113] In one implementation of the present embodiment, the intersection of all the first area types and all the second area types corresponding to the pre-stored layout diagram is determined as a first valid set corresponding to the pre-stored layout diagram; the set of all the first area types except the intersection is determined as a second valid set; the set of all the second area types corresponding to the pre-stored layout diagram except the intersection is determined as a third valid set corresponding to the pre-stored layout diagram; wherein the valid area type set of each of the pre-stored layout diagrams includes the corresponding first valid set, the second valid set and the third valid set.
[0114] In another implementation of this embodiment, the first valid set may also be used as a valid area type set.
[0115] Determine all associated information groups corresponding to each valid area type set, determine the second similarities corresponding to all associated information groups, determine the sum of all second similarities corresponding to each pre-stored layout diagram to obtain the total similarity of each pre-stored layout diagram, and use the ratio of the total similarity corresponding to each pre-stored layout diagram to the number of area types in the valid area type set corresponding to the pre-stored layout diagram as the first similarity corresponding to the pre-stored layout diagram.
[0116] It should be noted that when an area type in the valid area type set does not have a corresponding associated information group, the non-corresponding second similarity or the corresponding second similarity may be considered to be zero.
[0117] Combination Figure 6 , Figure 6The included area location points are area location points corresponding to a valid area type set corresponding to a preset layout diagram, the second similarity corresponding to the restaurant area in the valid area type set = 1-9.9 / 36.1 = 0.73, the second similarity corresponding to the living room = 1-14.8 / 36.1 = 0.59, the second similarity corresponding to the master bedroom = 1-5 / 36.1 = 0.86, the valid area type set includes a dining room, a living room, a master bedroom and a second bedroom, then the number of valid area type sets is 4, then the corresponding first similarity of the pre-stored layout diagram = (0.73+0.59+0.86) / 4.
[0118] In this embodiment, the corresponding first similarity is determined based on the second similarity corresponding to the valid area type set corresponding to the pre-stored layout map and the number of valid area types, which can avoid the pre-stored layout map and the area types that do not exist in the target space from participating in the matching process, which is conducive to further improving the accuracy of area matching. Among them, the valid area set is determined in the above manner and the first similarity corresponding to the pre-stored layout map is determined based on the similarity and number of the valid area set. The area type selected by the user and all area types included in the pre-stored layout map are used as valid area types to participate in the calculation of the first similarity, which is conducive to further improving the accuracy of the first similarity, thereby further improving the accuracy of layout map matching.
[0119] In other embodiments, the average of all second similarities may be used as the first similarity. Alternatively, different weight values may be set corresponding to different area types, and the correspondence between area types and weight values corresponding to different pre-stored layout diagrams is different. Based on this, the weight value corresponding to each second similarity among all second similarities corresponding to the pre-stored layout diagrams may be determined, and the calculation result obtained by weighted averaging the second similarities corresponding to each pre-stored layout diagram according to the weight value is used as the first similarity.
[0120] In addition, an embodiment of the present invention further proposes a storage medium, on which a matching program for a spatial layout diagram is stored. When the matching program for a spatial layout diagram is executed by a processor, the relevant steps of any embodiment of the matching method for a spatial layout diagram as described above are implemented.
[0121] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0122] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0123] 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 a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, including a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, a matching device for a spatial layout diagram, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0124] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for matching a spatial layout diagram, characterized in that: The matching method of the space layout diagram comprises the following steps: Acquire a first layout feature parameter of a target space input by a user based on a preset image area; A target layout diagram matching the target space is determined from a plurality of pre-stored layout diagrams according to the first layout feature parameter and a second layout feature parameter of the pre-stored layout diagram.
2. The method for matching a spatial layout diagram according to claim 1, characterized in that: The step of obtaining the first layout feature parameter of the target space input by the user based on the preset image area comprises: Acquire first position information of a region position point selected by a user on the preset image region; Obtain a first area type represented by the area location point; The first layout feature parameter includes the first location information and the first area type.
3. The method for matching a spatial layout diagram according to claim 2, wherein: The second layout characteristic parameter includes a second area type and a second location information of a preset area included in the corresponding pre-stored layout diagram, and the step of determining a target layout diagram matching the target space from a plurality of pre-stored layout diagrams according to the first layout characteristic parameter and the second layout characteristic parameter of the pre-stored layout diagram includes: Determine a first similarity between the target space and the indoor space represented by each of the pre-stored layout diagrams according to the first location information, the first area type, the second location information and the second area type corresponding to the pre-stored layout diagram; The target layout graph is determined from the plurality of pre-stored layout graphs according to the plurality of first similarities.
4. The method for matching a spatial layout diagram according to claim 3, characterized in that: The step of determining a first similarity between the target space and the indoor space represented by each of the pre-stored layout diagrams according to the first position information, the first area type, the second position information and the second area type corresponding to the pre-stored layout diagram comprises: Associating the first location information with the second location information according to the second area type and the first area type corresponding to each of the pre-stored layout diagrams; Determining a second similarity of a corresponding area type according to the associated first location information and the second location information; The corresponding first similarity is determined according to all the second similarities corresponding to each of the pre-stored layout graphs.
5. The method for matching a spatial layout diagram according to claim 4, characterized in that: The step of determining the second similarity of the corresponding area type according to the associated first location information and the second location information comprises: Determine the distance between the regional reference point represented by the second position information and the regional position point in a preset coordinate system according to the associated first position information and the second position information; The second similarity is determined according to the distance.
6. The method for matching a spatial layout diagram according to claim 5, characterized in that: The step of determining the second similarity according to the distance comprises: Obtaining preset size parameters corresponding to the target space; The second similarity is determined according to the distance and the preset size parameter.
7. The method for matching a spatial layout diagram according to claim 4, characterized in that: The step of determining the corresponding first similarity according to all the second similarities corresponding to each of the pre-stored layout graphs comprises: Determine a corresponding valid area type set according to the second area type and the first area type corresponding to each of the pre-stored layout diagrams; The corresponding first similarity is determined according to the sum of all the second similarities corresponding to each of the pre-stored layout diagrams and the number of region types in the valid region type set.
8. The method for matching a spatial layout diagram according to claim 7, characterized in that: The step of determining a corresponding valid area type set according to the second area type and the first area type corresponding to each of the pre-stored layout diagrams comprises: Determine an intersection of all the first region types and all the second region types corresponding to the pre-stored layout diagram as a first valid set corresponding to the pre-stored layout diagram; Determine a set of all the first area types except the intersection as a second valid set; Determine a set of all second region types corresponding to the pre-stored layout diagram except the intersection as a third valid set corresponding to the pre-stored layout diagram; The valid area type set of each of the pre-stored layout diagrams includes the corresponding first valid set, the second valid set and the third valid set.
9. The method for matching a spatial layout diagram according to any one of claims 1 to 8, characterized in that: After the step of determining a target layout map matching the target space in the plurality of pre-stored layout maps according to the first layout feature parameter and second layout feature parameters respectively corresponding to the plurality of pre-stored layout maps, the method further includes: The recommended information is output according to the target layout diagram.
10. A spatial layout diagram matching device, characterized in that: The matching device of the spatial layout diagram includes: a memory, a processor, and a matching program of the spatial layout diagram stored in the memory and executable on the processor. When the matching program of the spatial layout diagram is executed by the processor, the steps of the matching method of the spatial layout diagram as described in any one of claims 1 to 9 are implemented.
11. A storage medium, characterized in that: The storage medium stores a matching program for a space layout diagram, and when the matching program for a space layout diagram is executed by a processor, the steps of the matching method for a space layout diagram according to any one of claims 1 to 9 are implemented.