Method and electronic device for providing information on spatial structure
By performing block division and feature vector generation related to shape characteristics of the target space structure, the problems of inaccurate house information processing and high algorithm complexity in the prior art are solved, and the complexity of algorithms is reduced and application effects are improved on the basis of retaining the original shape characteristics.
Patent Information
- Application Number
- CN202210453997.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-27
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2042-04-27
AI Technical Summary
When the existing technology uses algorithm models such as neural networks to weight the floor profile diagram by pixel, it may lead to blurred original contour geometric information, inaccurate floor information, and difficult algorithms and low execution efficiency.
By block division of the target spatial structure, a set of feature vectors is generated, and inputted into the target algorithm model, weighted in blocks, and output target information. The block division is based on the shape characteristics of the target spatial structure, such as the position of corner points, ensuring that the original shape characteristics are retained in subsequent algorithm processing.
In subsequent algorithm processing, this method retains the original shape characteristics of the target spatial structure, reduces the complexity of the algorithm, avoids over-computing, and improves the application effect.
Smart Images

Figure CN115017571B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of digital home improvement technology, and in particular to a method and electronic equipment for providing information on spatial structures. Background Art
[0002] Digital home improvement platforms can improve the overall experience of ordinary users in the decoration consumption process. Since the shapes of users' real house types are ever-changing, the current home improvement plans of ordinary users are heavily dependent on the communication, interaction and manual operation of merchants or designers: in the product information service system, it is necessary to repeatedly confirm whether the size, color, and style of the furniture are suitable for their own house type, etc. However, the actual effect of the product may not be intuitive, and it is difficult for merchants to efficiently recommend personalized products and plans in the face of a large number of user house types; on the design side, users need to communicate and modify plans with designers repeatedly, and users who want to compare a variety of decoration plans often require higher costs. These inefficient links have greatly increased the link cost, reduced the user experience, and also restricted the development of home improvement service platforms in the direction of digitalization and scale.
[0003] In order to create a personalized home improvement experience for each user, the platform needs to provide users with some personalized applications to achieve personalized content recommendation, generation, search and other functions. Extensive personalized content depends on the representation and understanding of apartment structure data. However, real apartment types are usually composed of multiple room outlines and their door and window connections. The complexity of the shape of the apartment outline makes it difficult to understand.
[0004] In the prior art, the data-driven apartment type expression method usually directly rasterizes the apartment type outline and converts it into an image, and sets different pixel values inside and outside the outline, for example, the pixels outside the outline are uniformly set to white, the pixels inside the outline are uniformly set to black, etc. The image obtained by this conversion is used as an expression of the specific apartment type structure, and is used as input information for various algorithms in specific applications for learning, training, prediction, and judgment.
[0005] However, when using specific neural network and other algorithm models to perform pixel-by-pixel weighted processing on such images to extract high-dimensional features, the original contour geometry information may be blurred in high dimensions, and the house type information is no longer accurate, thus weakening the effect of subsequent applications. In addition, there are other problems such as high algorithm difficulty. Summary of the invention
[0006] The present application provides a method and electronic device for providing information on spatial structures, which can simplify the algorithm processing process in subsequent specific applications by expressing the target spatial structure more appropriately. At the same time, the original shape characteristics of the target spatial structure can be retained during the algorithm processing process, thereby improving the effect of the algorithm processing.
[0007] This application provides the following solutions:
[0008] A method for providing information on a spatial structure, comprising:
[0009] In response to an operation request for acquiring target information of a target space structure, the target space structure is divided into a plurality of target blocks, wherein the division of the target blocks is related to the shape characteristics of the target space structure;
[0010] Generate corresponding feature vectors for the multiple target blocks respectively, and form a feature vector set by combining the feature vectors generated for the multiple target blocks;
[0011] The target spatial structure is expressed using the feature vector set and input into a target algorithm model so that the target algorithm model performs weighted processing based on the target block to output the target information.
[0012] Wherein, dividing the target space structure into a plurality of target blocks comprises:
[0013] Based on the shape characteristics of the target spatial structure, the target spatial structure is divided into a plurality of primary blocks;
[0014] According to the accuracy requirement when acquiring the target information, the primary block is divided into a plurality of secondary blocks, so that the secondary blocks are used as the target blocks.
[0015] Wherein, based on the shape characteristics of the target space structure, the target space structure is divided into a plurality of primary blocks, including:
[0016] Cutting lines are extended toward the opposite wall at a plurality of corner points in the outline diagram of the target spatial structure, respectively, so as to divide the target spatial structure into a plurality of primary blocks according to the cutting lines.
[0017] Wherein, based on the shape characteristics of the target space structure, the target space structure is divided into a plurality of primary blocks, including:
[0018] Converting the contour map of the target spatial structure into a digital image expressed by pixels;
[0019] For each pixel point in the digitized image, respectively calculate the distance from the nearest wall line in the up, down, left, and right directions, and add them up to obtain a depth value corresponding to the pixel point;
[0020] The adjacent pixels with the same depth value are divided into the same first-level block.
[0021] Wherein, dividing the target space structure into a plurality of target blocks comprises:
[0022] If the target space structure includes a plurality of subspace structures, the plurality of target blocks are determined according to the regions where the plurality of subspace structures are respectively located.
[0023] The step of respectively generating corresponding feature vectors for the plurality of target blocks includes:
[0024] Acquire a contour image of the target spatial structure, convert it into a digitized image expressed by pixels, and generate a feature map corresponding to the target spatial structure by extracting features from the digitized image, wherein the feature map has the same or similar shape and size as the digitized image;
[0025] The position information corresponding to the plurality of target blocks in the digitized image is determined, and the block feature vectors respectively corresponding to the plurality of target blocks are acquired according to the position information and the feature map.
[0026] Wherein, obtaining the block feature vectors corresponding to the plurality of target blocks respectively according to the position information and the feature map includes:
[0027] From corresponding positions in the feature map, corresponding block feature maps are respectively cut out for the multiple target blocks;
[0028] By performing pooling processing on the block feature maps corresponding to the multiple target blocks respectively, block feature vectors corresponding to the target blocks are obtained.
[0029] Wherein, after performing pooling processing on the block feature maps corresponding to the multiple target blocks respectively, the method further includes:
[0030] The block feature vectors corresponding to the multiple target blocks are processed by using the shared parameters of the neural network model to obtain the feature vector set.
[0031] Wherein, the target information includes: furniture layout suggestion information about the target space structure;
[0032] The target algorithm model is used to:
[0033] Performing multi-attribute classification on the plurality of target blocks respectively, so as to assign furniture layout-related attributes to the plurality of target blocks respectively;
[0034] Multiple adjacent target blocks with the same attributes are merged, and furniture layout suggestion information about the target space structure is output.
[0035] Among them, it also includes:
[0036] Determine position information of the plurality of target blocks in the contour map of the target spatial structure, where the position information is described using a length measurement unit;
[0037] The outputting furniture layout suggestion information about the target space structure includes:
[0038] According to the merging status of the target blocks and the position information described in the length measurement unit, furniture layout suggestion information described in the length measurement unit is generated.
[0039] Wherein, the target information includes: spatial structure search result information based on the target spatial structure;
[0040] The method further comprises:
[0041] Generating a global feature vector about the target spatial structure according to the feature vector set;
[0042] Generate a global feature vector corresponding to each spatial structure according to the feature vector sets corresponding to the plurality of spatial structures in the database;
[0043] The target algorithm model is used to:
[0044] According to the distance between the global feature vector of the target spatial structure and the global feature vector corresponding to each spatial structure in the database, the similarity between the target spatial structure and each spatial structure in the database is determined, and a search result is given.
[0045] Wherein, the target information includes: suggestion information on the internal room division scheme of the target space structure;
[0046] The target algorithm model includes a fully connected network with shared weights, which is used to:
[0047] Taking the feature vector set as input information, predicting the room types to which the multiple target blocks respectively belong, and obtaining feature vectors of the room information to which the multiple target blocks belong;
[0048] By calculating the distance between the feature vectors of the room information to which the multiple target blocks belong, predicting whether the target blocks belong to the same room, and merging the multiple target blocks predicted to belong to the same room;
[0049] According to the room type prediction results corresponding to each target block in the same room, the room type corresponding to the same room is determined, and suggestion information about the internal room division scheme of the target space structure is generated.
[0050] Wherein, when expressing the target spatial structure, the method further includes:
[0051] Acquire a contour image of the target spatial structure, convert it into a digital image expressed by pixels, and generate a mask image of a wall of the target spatial structure according to the digital image;
[0052] The mask image and the digitized image are merged into a multi-channel image so as to divide the target block and generate the feature vector based on the multi-channel image, and in the process of predicting and merging the attributes of the target block through the target algorithm model, the interior wall image information is added to the target space structure.
[0053] Among them, it also includes:
[0054] Determine position information of the plurality of target blocks in the contour map of the target spatial structure, where the position information is described using a length measurement unit;
[0055] The generating suggestion information about the internal room division scheme of the target space structure includes:
[0056] According to the merging status of the target blocks and the position information described in the length measurement unit, suggestion information of the internal room division scheme described in the length measurement unit is generated.
[0057] A device for providing information on a spatial structure, comprising:
[0058] A block division unit, configured to divide the target space structure into a plurality of target blocks in response to an operation request for obtaining target information from the target space structure, wherein the division of the target blocks is related to the shape characteristics of the target space structure;
[0059] A block feature generating unit, used to generate corresponding feature vectors for the multiple target blocks respectively, and form a feature vector set by combining the corresponding feature vectors generated for the multiple target blocks;
[0060] An algorithm processing unit is used to express the target spatial structure using the feature vector set and input it into a target algorithm model so that the target algorithm model performs weighted processing based on the target block to output the target information.
[0061] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of any of the methods described above.
[0062] An electronic device, comprising:
[0063] one or more processors; and
[0064] A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of any of the methods described above.
[0065] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0066] Through the embodiment of the present application, when the user needs to obtain certain relevant information based on the target space structure (for example, furniture layout recommendation, similar apartment type, apartment type transformation suggestion, etc.), the target space structure can be first divided into multiple target blocks, and the division of such target blocks is related to the shape characteristics of the target space structure (for example, the position of the corner point in the target space structure, etc.), and then, by encoding the target blocks, the feature vectors of each target block are obtained. In this way, the target space structure can be expressed by a set of feature vectors of multiple target blocks. Then, it is input into the target algorithm model, so that the target algorithm model can perform weighted processing in units of the target blocks to output the target information. It can be seen that in this scheme, since the shape characteristics of the target space structure are fully considered when performing block division, the original shape characteristics of the target space structure can be retained more in the process of weighted calculation of the subsequent algorithm. The shape of the apartment structure can usually provide some prior information for many tasks, such as the placement of furniture, room division, etc., which are usually aligned with the bend of the outer contour to achieve aesthetic alignment, symmetry and other effects. Moreover, since the specific algorithm model only needs to perform weighted calculations in blocks, the complexity of the algorithm is reduced and excessive calculations are avoided.
[0067] Of course, any product implementing the present application does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0069] Figure 1 It is a schematic diagram of the system architecture provided by the embodiment of the present application;
[0070] Figure 2 is a flow chart of the method provided in the embodiment of the present application;
[0071] Figure 3-1 , 3-2It is a schematic diagram related to block division provided in an embodiment of the present application;
[0072] Figure 4 It is a schematic diagram of the implementation process of expressing the spatial structure provided in the embodiment of the present application;
[0073] Figure 5 is a schematic diagram of the spatial structure in the apartment type retrieval application provided in the embodiment of the present application;
[0074] Figure 6 It is a schematic diagram of the processing process in the apartment transformation application provided in the embodiment of the present application;
[0075] Figure 7 is a schematic diagram of a device provided in an embodiment of the present application;
[0076] Figure 8 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0077] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0078] First of all, it should be noted that in the digital home improvement platform, the personalized applications provided to users can mainly include: recommendation of similar decoration plans, generation of home improvement layout plans, search for similar apartment types, and realization of apartment type transformation, etc. These applications are important issues that need to be solved to realize the intelligentization of home improvement links. However, in the process of realizing these applications, the digital expression of apartment structure is involved.
[0079] The reason why the house structure needs to be digitally expressed is that in real life, objects and parameters that humans can understand are usually used to describe the house structure. For example, there is a wall in a house, whose starting point is at the origin (0, 0) and the end point is (0, 3), and so on. The outline of the house can be drawn based on these description information. However, in the outline of this house, the specific coordinate information is usually expressed in length measurement units commonly used in real life (for example, meters). This information is usually not directly recognized by the algorithm model. Therefore, this outline needs to be digitized before it can be used as the input of the algorithm model in the specific application for calculation and give the required results.
[0080] In the prior art, one approach is to represent the apartment structure as a graph structure by manually defining it, that is, to represent the apartment structure as a set of multiple nodes and multiple edges, and to use manually designed features to represent node features and connection relationships. However, this kind of manually designed features places high demands on feature extraction in subsequent algorithm models, and will limit the ability to express apartment information.
[0081] Another way is to convert the outline of the house structure (usually expressed in meters) into a digital image expressed in pixels by rasterization and other processing, as described in the background technology section. This digital image can also correspond to a set of multiple pixels, each pixel corresponding to its own coordinates and pixel value information. For example, assuming that the resolution of the digital image is 800×600, a digital image can correspond to an 800×600 matrix, and the value of each element in the matrix corresponds to the pixel value of each pixel, for example, it can usually be a color value, etc. Among them, in order to make the house structure more prominent, it is usually possible to make the outside of the house all white, the inside all black, and so on.
[0082] However, if the digital image obtained after the above rasterization process is directly used to express the specific apartment structure, the shape and other information of the original apartment structure may be blurred in the process of feature extraction in the algorithm model in the subsequent specific application. Among them, the specific application can refer to the aforementioned furniture layout, apartment search, apartment transformation, etc. Different applications may need to use different algorithm models to process the input apartment structure expression information, but the similarity is that the algorithm models used in different applications are usually some neural network models with multiple convolutional layers, and the number of convolutional layers in the neural network is usually relatively large (because the neural network can only have strong learning ability and better understand the global information when the level is deep enough). When using the above neural network model for calculation, a digital image is input into a multi-layer convolutional network, and each layer performs matrix multiplication weighting on the previous input, and the obtained output continues to be weighted in the next layer to obtain a new output, and so on, and finally a high-dimensional feature is obtained. For example, each pixel may correspond to a 256-dimensional high-dimensional feature vector, and so on. In this process, at a relatively shallow level, the outline of the apartment structure looks relatively clear. However, since the algorithm performs weighted output on the local area, when it reaches a deeper level, the shape and other information in the original apartment structure become blurred in the output high-dimensional features, especially for some smaller corners, which may become less obvious in the high-dimensional features.
[0083] In addition, in the process of rasterizing the contour map, the main thing is to convert the contour map expressed in meters into a digital image in pixels, that is, to determine how many pixels are needed to draw "one meter" in the contour map on the digital image, and so on, so as to draw each wall section in the apartment on the digital image. However, in real life, when described in meters, it is a continuous unit, but when drawn on a digital image, it becomes a discrete point and is affected by the resolution. When the algorithm model in the specific application processes the above digital image, it also performs weighted processing pixel by pixel, and obtains the output information such as the classification result corresponding to each pixel, that is, the output result of the algorithm model is also in pixels. In order to facilitate user understanding, it needs to be converted back to the expression in meters. However, there may be "burrs" in the output results in pixels. For example, a section of wall should be a straight line, but the existence of "burrs" may make this section of wall curved or discontinuous, etc. Therefore, in the process of converting back to the map expressed in meters, the "burrs" need to be optimized. In addition, in the process of converting the expression in meters to the expression in pixels, and then converting the expression in pixels back to the expression in meters, it is easy to make mistakes or cause information loss, etc.
[0084] Furthermore, since the specific housing structure is expressed in pixels, the algorithm model in the subsequent specific application can only perform weighted calculation processing in pixels, which makes the algorithm very difficult and the execution efficiency is relatively low. In addition, in the related applications involved in the embodiments of the present application, it may not be necessary to classify and judge in pixels, so as to waste computing resources. For example, in the application of furniture layout, the main purpose is to determine which furniture is suitable for placement, the placement position and direction of the furniture for a specific room specified by the user (for example, the living room in a certain housing type, etc.). In this process, an error of about 0.5m (or other values) is usually allowed in terms of placement position. However, if the digitized image after rasterization is directly used as the input of the algorithm model, the algorithm model needs to output the furniture category, direction, size, position and other information that should be placed for each pixel therein. Then, according to the output results corresponding to each pixel and the adjacency relationship, the output results are merged to determine which furniture should be placed in which position. However, in actual applications, there are no strict requirements for the precise position of a piece of furniture. A small amount of position or size deviation itself exists within the range of the optimal solution. Therefore, this pixel-by-pixel expression of the apartment type will cause excessive calculation in subsequent algorithms.
[0085] For example, in an application such as apartment renovation, if the rasterized digitized image is used directly as the input of the algorithm model, it is necessary to first retrieve the room layout of similar apartments based on the apartment type, then generate the room based on the room layout, and then use another model to optimize the result. Finally, after tedious post-processing, the result is converted from the image to a vector format. In another method, it is necessary to first use a model to predict wall pixels, and then use two models to predict the location of other rooms such as the living room and dining room one by one, and another model is needed to determine whether to continue adding rooms. Finally, tedious post-processing is also required to convert the result into a vector format.
[0086] In applications related to apartment search, the entire apartment needs to be represented as a graph structure, with each room represented as a node and the connections between different rooms represented as edges. The nodes and edges are represented using manually designed shape and connection relationship features, such as room size, relative position, etc. Then, the graph matching algorithm is used to train and match apartment types. However, due to the limitations of manually designed features, the apartment type information represented is usually incomplete.
[0087] Based on the above situation, in the embodiment of the present application, a scheme for expressing the apartment structure based on block features is proposed. In this scheme, for any apartment structure, it can be cut into regular blocks according to the contour shape of the apartment structure, and the feature vector of each block can be extracted using a neural network, and the apartment structure can be expressed based on the feature vector set composed of the feature vectors of these blocks. Then, applications such as apartment retrieval, furniture layout and apartment transformation can be realized in a more direct and easy way. In this way, since the contour shape information of the apartment structure is taken into account when dividing the blocks, the shape features of the original apartment structure (for example, the position of the corner point, etc.) can be retained more in the process of extracting high-dimensional features in subsequent applications, and the shape of the apartment structure can usually provide some prior information for many tasks, such as the placement of furniture, room division, etc., and it is usually aligned with the bend of the outer contour to achieve aesthetic alignment, symmetry and other effects. In addition, since the specific algorithm model only needs to perform weighted calculation in units of blocks, the complexity of the algorithm is reduced, and excessive calculation is also avoided. In addition, since this is a universal form of expression, it can enable all housing-related applications including the above-mentioned applications.
[0088] From the perspective of system architecture, Figure 1As shown, the embodiment of the present application can provide users with a variety of personalized application modules in the process of providing home improvement services to consumer users through the application of the digital home improvement platform, including the furniture layout, apartment search, apartment transformation, etc. mentioned above. In the process of providing specific services to users, these personalized application modules can use the scheme provided in the embodiment of the present application to divide the apartment structure specified by the user into multiple blocks, and generate corresponding feature vectors for each block, digitally express the apartment structure through these feature vectors, and then input them into the specific algorithm model, perform weighted calculation in units of blocks, and output the results. Among them, the application of the digital home improvement platform can be divided into a client and a server. The user can specify a specific apartment through the client and initiate a specific request (for example, a consumer user can select a room in a certain apartment in the client, initiate a furniture layout request, etc.), and then the server performs block segmentation, feature vector generation, and subsequent specific algorithm model calculation and other processing, and returns the result to the client for display.
[0089] The specific implementation scheme provided in the embodiments of the present application is described in detail below.
[0090] First, the embodiment of the present application provides a method for providing information on spatial structure from the perspective of the application server of the aforementioned digital home improvement platform, see Figure 2 , the method may include:
[0091] S201: In response to an operation request for acquiring target information of a target space structure, the target space structure is divided into a plurality of target blocks, wherein the division of the target blocks is related to shape characteristics of the target space structure.
[0092] Among them, the target space structure can specifically be the structure of a certain apartment, or the structure of a specific room (e.g., living room, etc.) in the apartment, etc. Among them, in different application scenarios, the specific target space structure can be different, for example, if the user needs to obtain recommended information about furniture layout, that is, if the user wants to know what kind of furniture can be placed in what position in a specific space, what the orientation is, etc. For this case, the target space structure described in the embodiment of the present application specifically refers to the room structure of a specific room in the apartment. At this time, a specific room in a certain apartment can be selected, and then a specific algorithm can make recommendations on furniture layout based on the room structure. In specific implementation, the overall structure of a specific apartment can be displayed to the user in the user interface (the apartment structure can be uploaded by the user in advance, or provided by the system to the user for selection, etc.), and the user can select a specific room in the apartment, and issue a request for furniture layout of the room, etc.
[0093] Alternatively, if the user needs to search for apartment types, that is, search for other apartment types with the same or similar structures as the apartment type specified by the user, in order to refer to the decoration plans in other apartment types, etc. At this time, it is usually based on a given apartment type containing multiple room outlines, and a similarity search is performed in a large database to achieve, for example, decoration plan recommendations, user apartment type searches, etc. For this case, the target spatial structure described in the embodiment of the present application may refer to an apartment type structure containing multiple room outlines. In specific implementation, applications specifically related to apartment type search can provide users with an entry for initiating operations such as similar apartment type search for a certain apartment type structure, and the user initiates a request to search for a specified apartment type.
[0094] Alternatively, if the user needs to remodel the apartment, the outer contour of the apartment is usually given (that is, the corresponding contours of the walls of the specific rooms in the apartment are removed, and only the outer contour of the apartment is retained). Other additional information (for example, the location of the entrance door or the room type requirements, etc.) can also be included. Then, the algorithm gives the room division method and room type. In this case, the target space structure described in the embodiment of the present application can specifically refer to the apartment structure with the inner room contours removed and only the outermost contour retained, etc.
[0095] No matter what type of target space is, in the initial state, the contour map of the target space structure can usually be obtained. The contour map can usually express the shape of the target space structure. For example, the contour map can usually be composed of a series of points, which are expressed by the two-dimensional coordinates of these points. For example, two points are located at (0, 0) and (3, 3), etc. In the contour map, the unit of the specific coordinate value is usually a length unit (for example, meter) commonly used to express the structure of the house type in real life. In other words, the contour map is based on the actual size of the target space, giving an outline, which includes a series of points expressed by coordinates (x, y), which are connected into an outline, and each two points represent a wall). However, in order for the subsequent algorithm model to be able to recognize the structure of the specific target space, it is necessary to convert the above contour map into a form that the algorithm model can recognize to express the target space structure.
[0096] Specifically, in an embodiment of the present application, in order to perform the above expression, the target space structure can first be divided into multiple target blocks. In specific implementation, there can be a variety of ways to divide the target blocks, but all of them can be divided based on the shape characteristics of the target space structure. Among them, the shape characteristics of the target space structure can specifically include the position of the corner point, whether there are inclined walls, arc walls, and so on. Of course, since inclined walls, arc walls, etc. are uncommon situations, they are mainly divided according to the position of the corner point, where the angle formed at the corner point is usually 90 degrees.
[0097] Specifically, in one method, the target space structure can be divided into multiple first-level blocks based on the shape characteristics of the target space structure, and then, according to the accuracy requirements when obtaining the target information, the first-level blocks can be divided into multiple second-level blocks, so that the second-level blocks can be used as the target blocks.
[0098] Specifically, when performing the division of the above-mentioned primary blocks and secondary blocks, the division can be performed directly based on the contour map of the target space structure, or the contour map can be rasterized to obtain a digital image expressed by pixels, and then the division is performed. Of course, in a preferred embodiment, the division can be performed based on both the contour map and the digital image, so that when the processing results are output in a specific application later, the information expressed by the length measurement unit can be directly expressed according to the contour-based division results.
[0099] Among them, since the outer contour of the target space structure is a polygon composed of multiple wall lines, when it is generally applied within a house, for example, the layout of furniture will consider the size of the space in front, behind, left and right of the furniture. The size of this space is measured by the distance between the relative walls, that is, the depth. The greater the depth, the wider the space, and vice versa. Therefore, in the case of block division based on the digital image expressed by pixels, the depth of any point in the house can be calculated first. That is, first, for each point in the digital image corresponding to the target space structure, calculate its distance from the nearest wall line in the four directions of up, down, left, right (east, west, south, and north), and add them up as the depth value of the current position.
[0100] Due to the different bends of the wall, the depth value of each point inside the apartment is different (that is, the different depths of different points are usually caused by the existence of some corners in the apartment). The points with the same nearest wall in the four directions have the same depth value, and the points with different nearest walls have different depth values. For example, suppose a target space structure is Figure 3-1 As shown in (A), after the depth calculation is completed, the classification of the depth value is as follows Figure 3-1 (B) As shown in Figure 2, the internal space is divided into several primary blocks, such as Figure 3-1 (C) shows that the points in the same first-level block have the same depth, and the depths of different first-level blocks are different. The shape of the first-level block is not limited to a rectangle, but can be a general shape. For example, when there is a slanted wall or a curved wall, the area surrounded by the slanted wall or the curved wall can be regarded as a first-level block, and so on.
[0101] In order to further enhance the flexibility of the apartment type representation, each first-level block can be evenly divided into multiple small blocks, such as Figure 3-1As shown in (D), this small block can be called a secondary block. The division of the secondary blocks is performed in different primary blocks, that is, the number and size of the secondary blocks divided in different primary blocks may be different, which is related to the size of the primary block and the accuracy requirements of the specific application.
[0102] In specific implementation, a strategy can be adopted that considers the minimum width threshold of the cell while dividing into m secondary blocks, that is, each primary block is preferentially cut into n grids. If the length and width of the grid are less than the minimum width threshold at this time, the number of cuts is reduced until the length and width meet the threshold requirements respectively. Among them, the minimum width threshold can be determined according to the requirements for accuracy in actual applications. For example, when performing furniture layout, the error may be required to be within 0.5 meters. When performing apartment renovation, the error may be required to be within 0.2 meters. At this time, in the application of furniture layout, the minimum width threshold may be greater than that of apartment renovation. In other words, when performing apartment renovation, it may be necessary to divide it into smaller secondary blocks to meet the positioning accuracy requirements, and so on. Among them, the segmentation effects under several different width thresholds can be as follows: Figure 3-2 As shown, (A) is the state after only the first-level blocks are divided, (B) corresponds to the situation that each first-level block is divided into a maximum of 4*2 second-level blocks, and the minimum width threshold of a single second-level block is 1m; (C) corresponds to the situation that each first-level block is divided into a maximum of 4*4 second-level blocks, and the minimum width threshold of a single second-level block is 0.5m, and so on.
[0103] In addition, if the block division is based on the contour map, since the contour map will include the coordinates of multiple points, these points are usually the corner points in the specific spatial structure. Therefore, a cutting line can be extended to the opposite wall from the position of these corner points. Through these cutting lines, the contour map of the target spatial structure is divided into multiple blocks. Afterwards, each primary block can also be evenly cut into multiple secondary blocks.
[0104] Furthermore, in the specific implementation, the target space structure specified by the user may include multiple subspace structures. For example, in the application of apartment type search, the user may input an apartment type that contains multiple room outlines. In other words, the target space structure naturally contains some contour lines for dividing different rooms, and these contour lines are usually related to shape features such as the position of corner points in the room. In addition, in this application, only similarity comparisons need to be made between different apartment types, and the requirements for accuracy will be lower. Therefore, in this case, the multiple target blocks can also be directly determined according to the areas where the multiple subspace structures are respectively located. In other words, each room in a large apartment type can be directly determined as the corresponding target block in the embodiment of the present application.
[0105] S202: Generate corresponding feature vectors for the multiple target blocks respectively, and form a feature vector set by combining the feature vectors generated for the multiple target blocks.
[0106] After the target space structure is divided into a plurality of target blocks, feature vectors can be generated for these target blocks respectively, so as to be used for subsequent algorithm model calculation in specific applications. Specifically, there can be multiple methods for generating feature vectors for target blocks. For example, in one implementation, the contour map of the target space structure can be first obtained and converted into a digital image expressed by pixels, and then, the digital image is firstly subjected to feature extraction using a model such as a neural network to generate a feature map corresponding to the target space structure. Wherein, the feature map has the same or similar shape and size as the digital image. For example, assuming that a certain digital image includes M*N pixels, in which each pixel is expressed by a color value, and in the feature map corresponding to the image, M*N pixels can also be included, but each pixel is no longer expressed by a color value, but by a multi-dimensional feature vector. Of course, in practical applications, the size of the feature map may also be different from the size of the input image, but in a preferred manner, in order to meet the requirements of subsequent block feature clipping, the feature map can be made to have the same or similar shape and size as the digital image.
[0107] After obtaining the feature map corresponding to the entire digitized image, the position information corresponding to the multiple target blocks in the digitized image can be determined, and the block feature vectors corresponding to the multiple target blocks can be obtained according to the position information and the feature map. For example, in a specific implementation, the corresponding block feature maps can be firstly cut out for the multiple target blocks from the corresponding positions in the feature map, and then the block feature vectors corresponding to the target blocks can be obtained by performing pooling processing on the block feature maps corresponding to the multiple target blocks.
[0108] In other words, assuming that the feature map corresponding to the entire digitized image is an M*N matrix, each element in the matrix corresponds to a pixel point, and the element value is a multi-dimensional feature vector. Assuming that the position of a certain target block in the digitized image is: the upper left corner (0, 0), the lower right corner (m1, n1), then the feature vectors corresponding to each pixel point in the area can be intercepted to obtain an m1*n1 matrix, which is the block feature map of the target block.
[0109] That is to say, the block feature map of each target block includes multiple multi-dimensional feature vectors. However, since the size of each target block may be different, the size of each block feature map is also different. In order to facilitate the calculation in the subsequent algorithm, these block feature maps can also be pooled. During the pooling operation, each layer of features in the feature dimension can be averaged or max pooled, so that a multi-dimensional feature vector can be used to express a target block. For example, assuming that X target blocks are obtained during block segmentation, after passing through the block pooling network, X C-dimensional block feature vectors can be obtained, that is, each target block has C-dimensional features.
[0110] In addition, after obtaining the feature vector corresponding to each target block, the block feature vectors corresponding to the multiple target blocks can be processed by the shared parameters of the neural network model to obtain the feature vector set. That is, the block features obtained in the previous step can be further feature encoded using a neural network module, and the network module processes each target block using the shared parameters to obtain the final feature vector set of X blocks.
[0111] That is to say, in a specific implementation mode, the process of expressing the target space structure can be as follows: Figure 4 As shown, it can be divided into two parts: block cutting and block feature coding. When performing block cutting, multiple first-level blocks can be cut out first according to the shape features such as the position of the corner point in the target spatial structure, and then multiple second-level blocks can be cut out in each first-level block according to the accuracy requirements of the position information in the specific application. When performing feature coding for such a second-level block, rasterization processing can be first performed based on the contour map of the target spatial structure to obtain a digital image based on pixel expression, and then the digital image is encoded as a whole through the encoding and decoding network to obtain the overall feature map. Afterwards, according to the position of each second-level block in the image, the feature map corresponding to each second-level block is cut out from the feature map. At this time, the feature map of the second-level block is an m*n*C feature map, where m and n represent the number of pixels contained in a second-level block, and C is the dimension of the feature vector corresponding to each pixel, for example, it can be 256. Afterwards, the feature map of each second-level block is pooled through the pooling network, so that each second-level block can be expressed by a C-dimensional feature vector. Then, the feature vectors corresponding to each secondary block may be processed through a shared parameter network to generate a feature vector set for expressing the target spatial structure.
[0112] certainly, Figure 4The above is only an introduction to the implementation method in a specific case in the embodiment of the present application. In other cases, different processing may be used. For example, in the application of apartment search, each room in the apartment is directly used as a specific target block, and then the block features are obtained by encoding, etc.
[0113] S203: Utilize the feature vector set to express the target spatial structure and input it into the target algorithm model, so that the target algorithm model performs weighted processing based on the target block as a unit to output the target information.
[0114] After obtaining the feature vector corresponding to each target block, in subsequent applications, these target blocks and their feature vectors will be used to express the entire target space structure. Under different tasks (tasks in specific applications), these target blocks and their features will be used by algorithms or classifiers for classification or comparison, etc.
[0115] In the embodiments of the present application, for various different tasks, when the feature vectors corresponding to multiple target blocks are used to express the target space structure, specific task implementation methods provide solutions. The implementation methods for various different applications are introduced below.
[0116] 1. Regarding furniture layout, that is, the target information about the current target space structure that the user needs to obtain may include: furniture layout recommendation information about the target space structure. At this time, in an embodiment of the present application, the algorithm model in the specific application can first perform multi-attribute classification on the multiple target blocks respectively, so as to assign furniture layout-related attributes to the multiple target blocks respectively, and then merge multiple target blocks with the same attributes and adjacent to each other, and output furniture layout recommendation information about the target space structure.
[0117] Specifically, the obtained target block and its feature vector can first be input into the neural network module for processing. For example, a multi-layer fully connected network can be used to perform multi-attribute classification on each target block, including furniture category, furniture orientation, etc. That is, each target block in the target space structure can be given the relevant attributes of the furniture layout. By reasonably controlling the division strategy of the target block, the granularity of the target block division can be sufficient to meet the requirements of the furniture layout for position accuracy. When training the above fully connected network, each target block can be marked as the attribute of all furniture within the block range weighted according to the occupied area; when predicting, the attribute of each block is output through the network, and then according to the adjacency relationship between the target blocks, the areas with the same attribute and connected are merged to obtain the final furniture layout. For example, the attribute corresponding to a block is: suitable for placing a sofa, and the attribute corresponding to another block is also suitable for placing a sofa. There is no other block nearby that corresponds to the sofa attribute. Then, the two blocks can be merged together to form an area, and the area can be determined as an area suitable for placing a sofa, and so on. Compared with the prior art, since the methods of the prior art need to predict the attributes of each pixel, while the embodiments of the present application only need to predict the attributes of each target block, the solution space of the problem is greatly reduced. In addition, since the shape characteristics such as the corner point position of the target space structure are fully considered when dividing the blocks, the output furniture layout is guaranteed to be more regular and the result is easier to vectorize.
[0118] It should be noted that, in the above-mentioned process of calculation by the algorithm, the result is expressed in pixels, and when the result is returned to the user, it needs to be converted into length units, for example, a sofa is suitable for placement from a certain pixel to a certain pixel, and so on. In the embodiment of the present application, since the target blocks can also be divided based on the contour map of the target space structure, it is only necessary to determine the position information of multiple target blocks in the contour map of the target space structure, and the position information is described in length units. Afterwards, after the specific algorithm determines the merging method of the target blocks, furniture layout suggestion information described in length units can be generated based on the merging situation of the target blocks and the position information described in length units. For example, the position from the 0th meter to the 3rd meter of a certain wall is suitable for placement of a certain sofa, and so on.
[0119] It should be noted that in the embodiment of the present application, since the weighted calculation is performed in units of blocks, the output result of the algorithm is also in units of blocks. Therefore, there is no "burr" phenomenon caused by pixel-by-pixel output, and the image does not need to be optimized. When converting back to an expression in meters, it can also be directly converted according to the position of the corresponding block in the contour map, and no error will be introduced in the conversion process.
[0120] 2. Regarding "house type search", that is, the target information about the current target spatial structure that the user needs to obtain may include: spatial structure search result information based on the target spatial structure. For example, given a query house type, similar house types are retrieved from the house type database and the similarity ranking is given, such as Figure 5 In addition, from Figure 5 It can also be seen that the target space structure in the apartment search scenario is usually a whole house apartment containing multiple room outlines. The specific target space structure includes not only the outer outline, but also the outlines of each internal subspace. At this time, each room area can be directly regarded as the target block in the embodiment of the present application, and then the target space structure can be represented as a set of feature vectors corresponding to multiple target blocks according to the aforementioned block encoding method.
[0121] However, since the number and order of rooms may be different in different apartment types and have no corresponding relationship, in order to ensure that the target space structure characteristics can still be obtained consistently when the order and number of the above feature vector sets change, a symmetric function can also be used to calculate a global feature vector from the feature vectors corresponding to multiple target blocks. Without loss of generality, the maximum value function or the average value function can be used to calculate the result of all feature values in N dimensions to obtain the global feature vector, and since the maximum value or the average value function is irrelevant to the order of the N values, the final result is also consistent.
[0122] In addition, for multiple spatial structures in the database, the corresponding feature vector sets can also be generated according to the schemes provided in the embodiments of the present application, and the global feature vectors corresponding to each spatial structure can be generated using a symmetric function. Afterwards, the similarity between the target spatial structure and each spatial structure in the database can be determined based on the distance between the global feature vector of the target spatial structure and the global feature vector corresponding to each spatial structure in the database, and the search results can be given.
[0123] Specifically, when training a specific algorithm model, the distance between feature vectors of similar housing types can be shortened, and the distance between feature vectors of dissimilar housing types can be extended. The distance between vectors here can be represented by Euclidean distance, cosine distance, or Hamming distance. Specifically, when performing housing type retrieval, a global feature vector is output for each spatial structure, and the distance between the global feature vectors of all spatial structures in the database and the global feature vector of the retrieved spatial structure is calculated to represent their similarity, and sorting is performed accordingly.
[0124] 3. Regarding "transformation", that is, the target information about the current target space structure that the user needs to obtain may include: recommended information about the internal room division scheme of the target space structure. At this time, it is required to give the outer contour of the whole house, and other additional information (such as the location of the entrance door or the room type requirements) may also be included. The algorithm gives the room division method, room type and other information. In specific implementation, the embodiment of the present application can use a fully connected network with shared weights for calculation. For example, a set of feature vectors of multiple target blocks can be used as input information to obtain feature vectors of the room information to which the multiple target blocks belong, and then, by calculating the distance between the feature vectors of the room information to which the multiple target blocks belong, it is predicted whether each target block belongs to the same room; and then, by merging the multiple target blocks predicted to belong to the same room, recommended information about the internal room division scheme of the target space structure is generated.
[0125] In addition, if room type information is also required, the target algorithm model can also be used to predict the room types to which the multiple target blocks belong respectively, using the feature vector set as input information. In this way, after merging multiple target blocks into one room according to the feature vectors of the aforementioned room information, the room type corresponding to the same room can also be determined according to the prediction results of the room types corresponding to the target blocks in the same room.
[0126] In other words, a fully connected network with shared weights can be used to output the feature vector of each target block as two sets of results. One set of results predicts the room type of each block, and the other set of results outputs the feature vector representing the room information to which each block belongs. The similarity matrix is obtained by calculating the distance between the two vectors. During training, the distance between blocks in the same room is shortened, and the distance between blocks in different rooms is extended. During prediction, according to the preset threshold, when the distance between two blocks is less than the threshold, they are judged as the same room. All blocks belonging to the same room are merged to get the predicted room; the determination of the room type can be based on the voting of the predicted types of all blocks in the current room, and the type with the largest number is the type of the current room.
[0127] In an optional manner, when expressing the target space structure, after converting the outline of the target space structure into a digital image expressed by pixels, a mask image of the wall of the target space structure can be generated according to the digital image. Then, the mask image and the digital image are merged into a multi-channel image so as to divide the target block and generate the feature vector based on the multi-channel image. In this way, after completing the merging of the target blocks to obtain multiple rooms, the interior wall image information can be added to the target space structure, and then a specific room can be generated. For example, the specific processing process can be as follows: Figure 6 shown.
[0128] In addition, similar to the application of furniture layout, in the application of apartment transformation, the information that is finally fed back to the user usually needs to be expressed in meters. That is, it involves converting from pixel expression to expression in meters. In the embodiment of the present application, since the target block division based on the contour map can be realized, and there is a corresponding relationship with the blocks divided based on the pixel map, it is also possible to determine the position information of the multiple target blocks in the contour map of the target space structure, and the position information is described in length units; in this way, when generating the recommended information about the internal room division scheme of the target space structure, the recommended information of the internal room division scheme described in length units can be generated based on the merging of the target blocks and the position information described in length units.
[0129] In summary, through the embodiment of the present application, when the user needs to obtain certain relevant information based on the target space structure (for example, furniture layout recommendation, similar apartment type, apartment type transformation suggestion, etc.), the target space structure can be first divided into multiple target blocks, and the division of such target blocks is related to the shape characteristics of the target space structure (for example, the position of the corner point in the target space structure, etc.), and then, by encoding the target blocks, the feature vectors of each target block are obtained. In this way, the target space structure can be expressed by a set of feature vectors of multiple target blocks. Then, it is input into the target algorithm model, so that the target algorithm model can perform weighted processing in units of the target blocks to output the target information. It can be seen that in this scheme, since the shape characteristics of the target space structure are fully considered when performing block division, the original shape characteristics of the target space structure can be retained more in the process of weighted calculation of the subsequent algorithm. The shape of the apartment structure can usually provide some prior information for many tasks, such as the placement of furniture, room division, etc., which are usually aligned with the bend of the outer contour to achieve aesthetic alignment, symmetry and other effects. Moreover, since the specific algorithm model only needs to perform weighted calculations in blocks, the complexity of the algorithm is reduced and excessive calculations are avoided.
[0130] It should be noted that the embodiments of the present application may involve the use of user data. In actual applications, user-specific personal data can be used in the scheme described herein within the scope permitted by applicable laws and regulations, subject to the requirements of applicable laws and regulations of the country where the user is located (for example, with the user's explicit consent, effective notification to the user, etc.).
[0131] Corresponding to the above method embodiment, the present application embodiment also provides an information providing device for spatial structure, see Figure 7, the device may include:
[0132] The block division unit 701 is used to divide the target space structure into a plurality of target blocks in response to an operation request for obtaining target information from the target space structure, wherein the division of the target blocks is related to the shape characteristics of the target space structure;
[0133] A block feature generating unit 702, configured to generate corresponding feature vectors for the plurality of target blocks respectively, and form a feature vector set from the feature vectors generated for the plurality of target blocks;
[0134] The algorithm processing unit 703 is used to express the target spatial structure using the feature vector set and input it into the target algorithm model so that the target algorithm model performs weighted processing based on the target block to output the target information.
[0135] In one implementation, the block division unit may specifically include:
[0136] A primary block division subunit, configured to divide the target spatial structure into a plurality of primary blocks based on the shape characteristics of the target spatial structure;
[0137] The secondary block division subunit is used to divide the primary block into multiple secondary blocks according to the accuracy requirement when acquiring the target information, so as to use the secondary blocks as the target blocks.
[0138] Specifically, the first-level block division subunit can be used for:
[0139] Cutting lines are extended toward the opposite wall at a plurality of corner points in the outline diagram of the target spatial structure, respectively, so as to divide the target spatial structure into a plurality of primary blocks according to the cutting lines.
[0140] Alternatively, the first-level block division subunit may specifically include:
[0141] An image generation subunit, used for converting the contour image of the target spatial structure into a digital image expressed by pixels;
[0142] A depth value generating subunit is used to calculate, for each pixel point in the digitized image, the distance from the nearest wall line in the up, down, left, and right directions, and add them up to obtain a depth value corresponding to the pixel point;
[0143] The merging sub-unit is used to divide adjacent pixels with the same depth value into the same primary block.
[0144] In another case, the block division unit may be specifically used for:
[0145] If the target space structure includes a plurality of subspace structures, the plurality of target blocks are determined according to the regions where the plurality of subspace structures are respectively located.
[0146] In a specific implementation, the block feature generation unit may specifically include:
[0147] An overall feature map generating subunit is used to obtain a contour map of the target spatial structure, convert it into a digitized image expressed by pixels, and generate a feature map corresponding to the target spatial structure by extracting features from the digitized image, wherein the feature map has the same or similar shape and size as the digitized image;
[0148] The block feature generation subunit is used to determine the position information corresponding to the multiple target blocks in the digitized image, and obtain the block feature vectors corresponding to the multiple target blocks respectively according to the position information and the feature map.
[0149] Specifically, the block feature generation subunit may include:
[0150] A feature map cropping subunit, used to crop corresponding block feature maps for the multiple target blocks from corresponding positions in the feature map;
[0151] The pooling processing subunit is used to obtain block feature vectors corresponding to the target blocks respectively by performing pooling processing on the block feature maps corresponding to the multiple target blocks.
[0152] Additionally, it may include:
[0153] A shared parameter processing unit is used to process the block feature vectors corresponding to the multiple target blocks through the shared parameters of the neural network model after respectively performing pooling processing on the block feature maps corresponding to the multiple target blocks to obtain the feature vector set.
[0154] In a specific application, the target information includes: furniture layout recommendation information about the target space structure; at this time, the target algorithm model is used to: perform multi-attribute classification on the multiple target blocks respectively, so as to assign furniture layout-related attributes to the multiple target blocks respectively; merge multiple target blocks with the same attributes and adjacent to each other, and output furniture layout recommendation information about the target space structure.
[0155] In this case, the device may also include:
[0156] A block position information determining unit, configured to determine position information of the plurality of target blocks in the contour map of the target space structure, wherein the position information is described in a length measurement unit;
[0157] The unit conversion unit is used to generate furniture layout suggestion information described in length measurement units according to the merging status of the target blocks and the position information described in length measurement units.
[0158] In another application, the target information includes: spatial structure search result information based on the target spatial structure;
[0159] At this time, the device may further include:
[0160] A global feature vector generating unit, configured to generate a global feature vector about the target spatial structure according to the feature vector set; and to generate a global feature vector corresponding to each spatial structure according to the feature vector sets respectively corresponding to a plurality of spatial structures in a database;
[0161] Accordingly, the target algorithm model is used to:
[0162] According to the distance between the global feature vector of the target spatial structure and the global feature vector corresponding to each spatial structure in the database, the similarity between the target spatial structure and each spatial structure in the database is determined, and a search result is given.
[0163] In yet another application, the target information includes: suggested information on an internal room division scheme of the target space structure;
[0164] At this time, the target algorithm model includes a fully connected network with shared weights, which is used to:
[0165] Taking the feature vector set as input information, obtaining feature vectors of room information to which the multiple target blocks belong;
[0166] By calculating the distance between the feature vectors of the room information to which the multiple target blocks belong, predicting whether the target blocks belong to the same room;
[0167] By merging a plurality of target blocks predicted to belong to the same room, suggestion information about an internal room partitioning scheme of the target spatial structure is generated.
[0168] In a preferred manner, the target algorithm model can also be used for:
[0169] Taking the feature vector set as input information, predicting the room types to which the multiple target blocks respectively belong;
[0170] After merging the multiple target blocks into one room, the room type corresponding to the same room is determined according to the room type prediction results corresponding to the target blocks in the same room.
[0171] Wherein, when expressing the target spatial structure, the device further includes:
[0172] A mask image generating unit, configured to obtain a contour image of the target spatial structure, convert the contour image into a digital image expressed by pixels, and generate a mask image of a wall of the target spatial structure according to the digital image;
[0173] An image merging unit is used to merge the mask image and the digitized image into a multi-channel image, so as to divide the target block and generate the feature vector based on the multi-channel image, and add interior wall image information to the target space structure during the property prediction and merging of the target block through the target algorithm model.
[0174] In this application, the housing transformation result can also be converted into meters for expression. Therefore, the device can also include:
[0175] A block position determination unit, configured to determine position information of the plurality of target blocks in the contour map of the target space structure, wherein the position information is described in a length measurement unit;
[0176] At this time, when the specific algorithm model generates the recommended information about the internal room division scheme of the target space structure, it can generate the recommended information about the internal room division scheme described in length units based on the merging status of the target blocks and the position information described in length units.
[0177] In addition, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of any one of the methods in the aforementioned method embodiments are implemented.
[0178] And an electronic device, comprising:
[0179] one or more processors; and
[0180] A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of the method described in any one of the aforementioned method embodiments.
[0181] in, Figure 8The architecture of the electronic device is shown exemplarily, and may specifically include a processor 810, a video display adapter 811, a disk drive 812, an input / output interface 813, a network interface 814, and a memory 820. The processor 810, the video display adapter 811, the disk drive 812, the input / output interface 813, the network interface 814, and the memory 820 may be communicatively connected via a communication bus 830.
[0182] Among them, the processor 810 can be implemented by a general-purpose CPU (Central Processing Unit, processor), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solution provided in this application.
[0183] The memory 820 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 820 can store an operating system 821 for controlling the operation of the electronic device 800, and a basic input and output system (BIOS) for controlling the low-level operation of the electronic device 800. In addition, a web browser 823, a data storage management system 824, and a spatial structure information processing system 825, etc. can also be stored. The above-mentioned spatial structure information processing system 825 can be an application program that specifically implements the operations of the aforementioned steps in the embodiment of the present application. In short, when the technical solution provided in the present application is implemented by software or firmware, the relevant program code is stored in the memory 820 and is called and executed by the processor 810.
[0184] The input / output interface 813 is used to connect the input / output module to realize information input and output. The input / output module can be configured as a component in the device (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0185] The network interface 814 is used to connect to a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0186] The bus 830 comprises a pathway for transmitting information between the various components of the device (eg, the processor 810, the video display adapter 811, the disk drive 812, the input / output interface 813, the network interface 814, and the memory 820).
[0187] It should be noted that, although the above device only shows a processor 810, a video display adapter 811, a disk drive 812, an input / output interface 813, a network interface 814, a memory 820, a bus 830, etc., in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include components necessary for implementing the solution of the present application, and does not necessarily include all the components shown in the figure.
[0188] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0189] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0190] The above is a detailed introduction to the information providing method and electronic device for spatial structure provided by the present application. The principles and implementation methods of the present application are described in detail using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present application.
Claims
1. A method for providing information on spatial structure, characterized in that: include: In response to an operation request for acquiring target information of a target space structure, the target space structure is divided into a plurality of target blocks, wherein when dividing the target blocks, cutting lines are respectively extended to an opposite wall at a plurality of corner points in a contour map of the target space structure, so as to divide the target blocks according to the cutting lines; Generate corresponding feature vectors for the multiple target blocks respectively, and form a feature vector set by combining the feature vectors generated for the multiple target blocks; The target spatial structure is expressed using the feature vector set and input into a target algorithm model so that the target algorithm model performs weighted processing based on the target block to output the target information.
2. The method according to claim 1, characterized in that The step of dividing the target space structure into a plurality of target blocks comprises: If the target space structure includes a plurality of subspace structures, the plurality of target blocks are determined according to the regions where the plurality of subspace structures are respectively located.
3. The method according to claim 1, characterized in that Generating corresponding feature vectors for the plurality of target blocks respectively includes: Acquire a contour image of the target spatial structure, convert it into a digitized image expressed by pixels, and generate a feature map corresponding to the target spatial structure by extracting features from the digitized image, wherein the feature map has the same or similar shape and size as the digitized image; The position information corresponding to the plurality of target blocks in the digitized image is determined, and the block feature vectors respectively corresponding to the plurality of target blocks are acquired according to the position information and the feature map.
4. The method according to any one of claims 1 to 3, characterized in that: The target information includes: furniture layout suggestion information about the target space structure; The target algorithm model is used to: Performing multi-attribute classification on the plurality of target blocks respectively, so as to assign furniture layout-related attributes to the plurality of target blocks respectively; Multiple adjacent target blocks with the same attributes are merged, and furniture layout suggestion information about the target space structure is output.
5. The method according to claim 4, characterized in that Also includes: Determine position information of the plurality of target blocks in the contour map of the target spatial structure, where the position information is described using a length measurement unit; The outputting furniture layout suggestion information about the target space structure includes: According to the merging status of the target blocks and the position information described in the length measurement unit, furniture layout suggestion information described in the length measurement unit is generated.
6. The method according to any one of claims 1 to 3, characterized in that: The target information includes: spatial structure search result information based on the target spatial structure; The method further comprises: Generating a global feature vector about the target spatial structure according to the feature vector set; Generate a global feature vector corresponding to each spatial structure according to the feature vector sets corresponding to the plurality of spatial structures in the database; The target algorithm model is used to: According to the distance between the global feature vector of the target spatial structure and the global feature vector corresponding to each spatial structure in the database, the similarity between the target spatial structure and each spatial structure in the database is determined, and a search result is given.
7. The method according to any one of claims 1 to 3, characterized in that: The target information includes: suggestion information on an internal room division scheme of the target space structure; The target algorithm model includes a fully connected network with shared weights, which is used to: Taking the feature vector set as input information, predicting the room types to which the multiple target blocks respectively belong, and obtaining feature vectors of the room information to which the multiple target blocks belong; By calculating the distance between the feature vectors of the room information to which the multiple target blocks belong, predicting whether the target blocks belong to the same room, and merging the multiple target blocks predicted to belong to the same room; According to the room type prediction results corresponding to each target block in the same room, the room type corresponding to the same room is determined, and suggestion information about the internal room division scheme of the target space structure is generated.
8. The method according to claim 7, characterized in that When expressing the target spatial structure, the method further includes: Acquire a contour image of the target spatial structure, convert it into a digital image expressed by pixels, and generate a mask image of a wall of the target spatial structure according to the digital image; The mask image and the digitized image are merged into a multi-channel image so as to divide the target block and generate the feature vector based on the multi-channel image, and in the process of predicting and merging the attributes of the target block through the target algorithm model, the interior wall image information is added to the target space structure.
9. The method according to claim 7, characterized in that: Also includes: Determine position information of the plurality of target blocks in the contour map of the target spatial structure, where the position information is described using a length measurement unit; The generating suggestion information about the internal room division scheme of the target space structure includes: According to the merging status of the target blocks and the position information described in the length measurement unit, suggestion information of the internal room division scheme described in the length measurement unit is generated.
10. A method for providing information on spatial structure, characterized in that: include: In response to an operation request for acquiring target information for a target space structure, the target space structure is divided into a plurality of target blocks, wherein when dividing the target blocks, the target space structure is divided into a plurality of primary blocks and a plurality of secondary blocks, and the secondary blocks are determined as the target blocks; when dividing the primary blocks, the contour map of the target space structure is converted into a digital image expressed by pixels, and for each pixel point in the digital image, the distance from the nearest wall line in the up, down, left, and right directions is calculated and added to obtain a depth value corresponding to the pixel point, and the adjacent pixels with the same depth value are divided into the same primary block; Generate corresponding feature vectors for the multiple target blocks respectively, and form a feature vector set by combining the feature vectors generated for the multiple target blocks; The target spatial structure is expressed using the feature vector set and input into a target algorithm model so that the target algorithm model performs weighted processing based on the target block to output the target information.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 10 are implemented.
12. An electronic device, characterized in that: include: one or more processors; as well as A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of the method described in any one of claims 1 to 10.
Citation Information
Patent Citations
An automatic region matching algorithm and system based on house type geometrical characteristics
CN109933840A
Image processing method and apparatus, computer-readable medium and electronic device
WO2020224405A1