CN116578915B - Structured house type analysis method and system based on graphic neural network - Google Patents
Structured house type analysis method and system based on graphic neural network Download PDFInfo
- Publication number
- CN116578915B CN116578915B CN202310387140.8A CN202310387140A CN116578915B CN 116578915 B CN116578915 B CN 116578915B CN 202310387140 A CN202310387140 A CN 202310387140A CN 116578915 B CN116578915 B CN 116578915B
- Authority
- CN
- China
- Prior art keywords
- house type
- data
- room
- structured
- node
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000013528 artificial neural network Methods 0.000 title claims abstract description 20
- 238000004458 analytical method Methods 0.000 title claims abstract description 19
- 238000012549 training Methods 0.000 claims abstract description 77
- 238000000034 method Methods 0.000 claims abstract description 40
- 238000004891 communication Methods 0.000 claims abstract description 29
- 238000012360 testing method Methods 0.000 claims abstract description 24
- 238000012545 processing Methods 0.000 claims abstract description 22
- 238000003062 neural network model Methods 0.000 claims abstract description 21
- 238000013145 classification model Methods 0.000 claims abstract description 13
- 238000000547 structure data Methods 0.000 claims abstract description 12
- 230000000007 visual effect Effects 0.000 claims abstract description 11
- 239000013598 vector Substances 0.000 claims description 33
- 230000006870 function Effects 0.000 claims description 27
- 238000010586 diagram Methods 0.000 claims description 21
- 230000002776 aggregation Effects 0.000 claims description 20
- 238000004220 aggregation Methods 0.000 claims description 20
- 238000005070 sampling Methods 0.000 claims description 20
- 238000003860 storage Methods 0.000 claims description 12
- 238000007405 data analysis Methods 0.000 claims description 11
- 239000011159 matrix material Substances 0.000 claims description 10
- 238000005034 decoration Methods 0.000 claims description 6
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 claims description 5
- 238000010606 normalization Methods 0.000 claims description 5
- 238000012216 screening Methods 0.000 claims description 5
- 238000004590 computer program Methods 0.000 description 4
- 239000000463 material Substances 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000006467 substitution reaction Methods 0.000 description 3
- 238000003491 array Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012805 post-processing Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 238000011835 investigation Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000001915 proofreading effect Effects 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/10—Geometric CAD
- G06F30/13—Architectural design, e.g. computer-aided architectural design [CAAD] related to design of buildings, bridges, landscapes, production plants or roads
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/042—Knowledge-based neural networks; Logical representations of neural networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Geometry (AREA)
- Computational Linguistics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- Computing Systems (AREA)
- Computer Hardware Design (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Molecular Biology (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Computational Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Mathematical Analysis (AREA)
- Structural Engineering (AREA)
- Civil Engineering (AREA)
- Architecture (AREA)
- Pure & Applied Mathematics (AREA)
- Mathematical Optimization (AREA)
Abstract
The invention discloses a structured house type analysis method and a structured house type analysis system based on a graph neural network, wherein the method comprises the following steps: acquiring all house type structural information according to a house type database, and carrying out structural processing on the house type structural information to obtain structural house type structural information; building a house type communication bubble chart according to the structured house type structural information, carrying out characteristic engineering, and acquiring characteristic items and category labels of all nodes in the bubble chart as training data; constructing a classification model based on a graph neural network model, inputting training data for training, and storing the optimal model weight; predicting the test house type data according to the optimal model weight, calculating the classification precision, and constructing a target model according to the classification precision; and analyzing the house type information to be analyzed according to the target model, and performing visual display after obtaining the room classification result and the house type structure data. The invention has high efficiency and high accuracy, and can be widely applied to the technical field of computers.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a structured house type analysis method and system based on a graph neural network.
Background
In the real estate industry and the home decoration industry, the historical design scheme of designers often has the condition that the room types are not named, and in addition, a large part of planar house type graphs usually only contain the structural information of houses and lack the room types, but the room types have great significance for subsequent design and analysis, so that the rapid and accurate analysis of the types of the various rooms in the house type graphs has great application value. In the traditional house type diagram analysis task, the data main body is a drawn two-dimensional plane house type diagram, a large amount of manpower and material resources are often required to be input to complete the overall analysis of the house type diagram, and the type and the position of each room are generally determined through data investigation and manual proofreading and reasoning.
Disclosure of Invention
In view of the above, the embodiment of the invention provides a structured house type analysis method and a structured house type analysis system based on a graph neural network, which have high efficiency and high accuracy.
An aspect of the embodiment of the invention provides a structural house type analysis method based on a graph neural network, which comprises the following steps:
Acquiring all house type structural information according to a house type database, and carrying out structural processing on the house type structural information to obtain structural house type structural information;
Building a house type communication bubble chart according to the structured house type structural information, carrying out characteristic engineering, and acquiring characteristic items and category labels of all nodes in the bubble chart as training data;
constructing a classification model based on a graph neural network model, inputting training data for training, and storing the optimal model weight;
predicting the test house type data according to the optimal model weight, calculating the classification precision, and constructing a target model according to the classification precision;
and analyzing the house type information to be analyzed according to the target model, and performing visual display after obtaining the room classification result and the house type structure data.
Optionally, the obtaining all the house type structural information according to the house type database, and performing structural processing on the house type structural information to obtain structural house type structural information includes:
acquiring house type data accumulated by a real estate company and a home decoration company;
Screening house type map data with room type labels, and respectively processing the plane house type map vector data without coordinate information and house type data with coordinate information;
vector data rasterization is carried out on the vector data of the plane house type graph without the coordinate information, and the information of the inner wall body, the outer wall body and the door and window in the house is extracted;
sequentially extracting the types of rooms according to house type data with coordinate information, wherein the rooms comprise wall body line segment coordinates, and the walls comprise door and window line segment coordinates;
Classifying the types of the rooms to be analyzed according to data analysis and statistics;
And integrating the processed house type data in a text form by taking one house type as a unit, and storing the house type data as a structured house type data set.
Optionally, the method further comprises:
And respectively representing each wall, door and window by line segments, storing the coordinates of the line segments of the door and window contained in each wall, extracting the closed polygonal outline of the wall of each room, representing the polygon of each room in the form of two-dimensional point strings, and storing the corresponding relation between the types of the rooms and the polygonal outline and the coordinates of the line segments of the wall contained in each room.
Optionally, classifying the room type to be analyzed according to the data analysis and statistics includes:
According to data analysis and statistics, the types of rooms to be analyzed are classified into 10 types, namely a living room, an auxiliary room, a balcony, a bedroom, a kitchen, a bathroom, a corridor, a multifunctional room, a home garden and a custom room.
Optionally, the building the house type communication bubble chart according to the structured house type structural information and performing feature engineering to obtain feature items and category labels of all nodes in the bubble chart as training data, including:
Acquiring a structured house type data set;
Traversing the structured collection of household data, for each household data in the collection, performing the following processing: taking each room as a node, and marking the node as a corresponding room type; taking the communication relationship among rooms as edges, and limiting the types of the edges to the communication relationship; constructing a house type communication bubble diagram; sequentially calculating 7 data including the area of each room node, the room surrounding frame, the long side of the room, the short side of the room, the circumference of the room, the center coordinates of the room and the door and window ratio of the room as node characteristics; constructing a relation list according to the connection relation in the bubble diagram, and storing the connection node characteristics together as a training sample;
and dividing the household data set obtained after the traversal is finished into training data and test data.
Optionally, building a classification model based on the graph neural network model, inputting training data for training, and storing optimal model weights, including:
Acquiring a set of training data;
Initializing an overall graph structure according to a bubble graph structure, wherein the overall graph structure is marked as G (V, E), V represents an edge set in the graph, E represents a point set in the graph, the characteristic of an input node is marked as { X v }, a kth order weight matrix is initialized, the value of k is marked as W k, a mean value method is selected as an aggregation function, the value is marked as AGG k, a node sampling function in the graph is set as N, and the upper operation limit of aggregation and sampling is set as second order, namely k=2;
Constructing a graph neural network model, wherein the input characteristics of all nodes in the graph are marked as h v 0, firstly, respectively sampling first-order neighbor nodes and second-order neighbor nodes of a node h v 0 by using a sampling function N, respectively marking the first-order neighbor nodes and the second-order neighbor nodes as h v 1、hv 2, then respectively carrying out aggregation and weighting on the second-order neighbor nodes h v 2 and the first-order neighbor nodes h v 1 by using an aggregation function AGG k and a weight matrix W k to obtain a characteristic vector h v k of the node, and finally carrying out two-norm normalization on the obtained node vector;
Classifying the node characteristic vector h v k by the fully connected layer with the dimension of (7, 10);
Reading training data and loading the training data into the model in batches for training, and calculating the loss of the classification result predicted by the model by adopting cross entropy loss;
Using Adam optimizer as model, initial learning rate was 0.004, and using the learning rate decay method of step down, batch size was defined as 32 rooms for a total of 100 rounds of training.
Optionally, the analyzing the house type information to be analyzed according to the target model, and performing visual display after obtaining the room classification result and the house type structure data, includes:
reading the room classification result after post-treatment;
reading house type structure information of test data from the obtained structured house type data set according to the test data index;
Traversing all rooms of the whole house, drawing a two-dimensional structure diagram of the room according to the room index, and marking the room type;
a flat floor plan with room types is shown.
Another aspect of the embodiment of the present invention further provides a structural house type analysis system based on a graph neural network, including:
The first module is used for acquiring all house type structural information according to the house type database, and carrying out structuring treatment on the house type structural information to obtain structured house type structural information;
The second module is used for constructing a house type communication bubble chart according to the structured house type structural information and carrying out characteristic engineering to obtain characteristic items and category labels of all nodes in the bubble chart as training data;
the third module is used for building a classification model based on the graph neural network model, inputting training data for training, and storing the optimal model weight;
the fourth module is used for predicting the test house type data according to the optimal model weight, calculating the classification precision, and further constructing a target model according to the classification precision;
and the fifth module is used for analyzing the house type information to be analyzed according to the target model, and performing visual display after obtaining the house type structure data and the house type classification result.
Another aspect of the embodiment of the invention also provides an electronic device, which includes a processor and a memory;
The memory is used for storing programs;
The processor executes the program to implement the method as described above.
Another aspect of the embodiments of the present invention also provides a computer-readable storage medium storing a program that is executed by a processor to implement a method as described above.
Embodiments of the present invention also disclose a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions may be read from a computer-readable storage medium by a processor of a computer device, and executed by the processor, to cause the computer device to perform the foregoing method.
According to the embodiment of the invention, all house type structural information is obtained according to a house type database, and the house type structural information is subjected to structuring processing to obtain structured house type structural information; building a house type communication bubble chart according to the structured house type structural information, carrying out characteristic engineering, and acquiring characteristic items and category labels of all nodes in the bubble chart as training data; constructing a classification model based on a graph neural network model, inputting training data for training, and storing the optimal model weight; predicting the test house type data according to the optimal model weight, calculating the classification precision, and constructing a target model according to the classification precision; and analyzing the house type information to be analyzed according to the target model, and performing visual display after obtaining the room classification result and the house type structure data. The invention has high efficiency and high accuracy.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of overall steps of a structural house type analysis method based on a graph neural network according to an embodiment of the present invention;
Fig. 2 is a schematic diagram of a method for understanding a structured family pattern based on a neural network according to an embodiment of the present invention.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
Aiming at the problems existing in the prior art, the embodiment of the invention provides a structured house type analysis method based on a graph neural network, which comprises the following steps:
Acquiring all house type structural information according to a house type database, and carrying out structural processing on the house type structural information to obtain structural house type structural information;
Building a house type communication bubble chart according to the structured house type structural information, carrying out characteristic engineering, and acquiring characteristic items and category labels of all nodes in the bubble chart as training data;
constructing a classification model based on a graph neural network model, inputting training data for training, and storing the optimal model weight;
predicting the test house type data according to the optimal model weight, calculating the classification precision, and constructing a target model according to the classification precision;
and analyzing the house type information to be analyzed according to the target model, and performing visual display after obtaining the room classification result and the house type structure data.
Optionally, the obtaining all the house type structural information according to the house type database, and performing structural processing on the house type structural information to obtain structural house type structural information includes:
acquiring house type data accumulated by a real estate company and a home decoration company;
Screening house type map data with room type labels, and respectively processing the plane house type map vector data without coordinate information and house type data with coordinate information;
vector data rasterization is carried out on the vector data of the plane house type graph without the coordinate information, and the information of the inner wall body, the outer wall body and the door and window in the house is extracted;
sequentially extracting the types of rooms according to house type data with coordinate information, wherein the rooms comprise wall body line segment coordinates, and the walls comprise door and window line segment coordinates;
Classifying the types of the rooms to be analyzed according to data analysis and statistics;
And integrating the processed house type data in a text form by taking one house type as a unit, and storing the house type data as a structured house type data set.
Optionally, the method further comprises:
And respectively representing each wall, door and window by line segments, storing the coordinates of the line segments of the door and window contained in each wall, extracting the closed polygonal outline of the wall of each room, representing the polygon of each room in the form of two-dimensional point strings, and storing the corresponding relation between the types of the rooms and the polygonal outline and the coordinates of the line segments of the wall contained in each room.
Optionally, classifying the room type to be analyzed according to the data analysis and statistics includes:
According to data analysis and statistics, the types of rooms to be analyzed are classified into 10 types, namely a living room, an auxiliary room, a balcony, a bedroom, a kitchen, a bathroom, a corridor, a multifunctional room, a home garden and a custom room.
Optionally, the building the house type communication bubble chart according to the structured house type structural information and performing feature engineering to obtain feature items and category labels of all nodes in the bubble chart as training data, including:
Acquiring a structured house type data set;
Traversing the structured collection of household data, for each household data in the collection, performing the following processing: taking each room as a node, and marking the node as a corresponding room type; taking the communication relationship among rooms as edges, and limiting the types of the edges to the communication relationship; constructing a house type communication bubble diagram; sequentially calculating 7 data including the area of each room node, the room surrounding frame, the long side of the room, the short side of the room, the circumference of the room, the center coordinates of the room and the door and window ratio of the room as node characteristics; constructing a relation list according to the connection relation in the bubble diagram, and storing the connection node characteristics together as a training sample;
and dividing the household data set obtained after the traversal is finished into training data and test data.
Optionally, building a classification model based on the graph neural network model, inputting training data for training, and storing optimal model weights, including:
Acquiring a set of training data;
Initializing an overall graph structure according to a bubble graph structure, wherein the overall graph structure is marked as G (V, E), V represents an edge set in the graph, E represents a point set in the graph, the characteristic of an input node is marked as { X v }, a kth order weight matrix is initialized, the value of k is marked as W k, a mean value method is selected as an aggregation function, the value is marked as AGG k, a node sampling function in the graph is set as N, and the upper operation limit of aggregation and sampling is set as second order, namely k=2;
Constructing a graph neural network model, wherein the input characteristics of all nodes in the graph are marked as h v 0, firstly, respectively sampling first-order neighbor nodes and second-order neighbor nodes of a node h v 0 by using a sampling function N, respectively marking the first-order neighbor nodes and the second-order neighbor nodes as h v 1、hv 2, then respectively carrying out aggregation and weighting on the second-order neighbor nodes h v 2 and the first-order neighbor nodes h v 1 by using an aggregation function AGG k and a weight matrix W k to obtain a characteristic vector h v k of the node, and finally carrying out two-norm normalization on the obtained node vector;
Classifying the node characteristic vector h v k by the fully connected layer with the dimension of (7, 10);
Reading training data and loading the training data into the model in batches for training, and calculating the loss of the classification result predicted by the model by adopting cross entropy loss;
Using Adam optimizer as model, initial learning rate was 0.004, and using the learning rate decay method of step down, batch size was defined as 32 rooms for a total of 100 rounds of training.
Optionally, the analyzing the house type information to be analyzed according to the target model, and performing visual display after obtaining the room classification result and the house type structure data, includes:
reading the room classification result after post-treatment;
reading house type structure information of test data from the obtained structured house type data set according to the test data index;
Traversing all rooms of the whole house, drawing a two-dimensional structure diagram of the room according to the room index, and marking the room type;
a flat floor plan with room types is shown.
Another aspect of the embodiment of the present invention further provides a structural house type analysis system based on a graph neural network, including:
The first module is used for acquiring all house type structural information according to the house type database, and carrying out structuring treatment on the house type structural information to obtain structured house type structural information;
The second module is used for constructing a house type communication bubble chart according to the structured house type structural information and carrying out characteristic engineering to obtain characteristic items and category labels of all nodes in the bubble chart as training data;
the third module is used for building a classification model based on the graph neural network model, inputting training data for training, and storing the optimal model weight;
the fourth module is used for predicting the test house type data according to the optimal model weight, calculating the classification precision, and further constructing a target model according to the classification precision;
and the fifth module is used for analyzing the house type information to be analyzed according to the target model, and performing visual display after obtaining the house type structure data and the house type classification result.
Another aspect of the embodiment of the invention also provides an electronic device, which includes a processor and a memory;
The memory is used for storing programs;
The processor executes the program to implement the method as described above.
Another aspect of the embodiments of the present invention also provides a computer-readable storage medium storing a program that is executed by a processor to implement a method as described above.
Embodiments of the present invention also disclose a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions may be read from a computer-readable storage medium by a processor of a computer device, and executed by the processor, to cause the computer device to perform the foregoing method.
The following detailed description of the invention refers to the accompanying drawings, which illustrate the invention:
The invention provides an understanding method and system of structured house type data based on a graph neural network. The system has the advantages that firstly, compared with a two-dimensional house type image, the house type image is described through the structured data, so that the storage space can be saved to a great extent, and the data throughput of the pattern neural network model can be facilitated. And secondly, analyzing the house type by using the graph neural network can implicitly obtain the room communication relation in the house type and abstract out the feature vectors in various rooms and high-dimensional space.
The invention provides a structured house type understanding method and system based on a graph neural network, as shown in fig. 1, the method comprises the following steps:
1. Obtaining all house type structural information according to the house type database, and carrying out structuring treatment on the corresponding structural information;
2. Building a house type communication bubble chart according to the structured house type data and carrying out feature engineering to obtain feature items and category labels of all nodes in the bubble chart as training data;
3. Constructing a model based on the classification of the graph neural network, inputting training data for training, and storing the weight of the optimal model;
4. predicting the test house type data according to the stored model, and calculating the classification precision;
5. and visualizing the room classification result after post-processing and the house type structural data.
The first step, obtaining all house type structural information according to a house type database, and carrying out structuring processing on the corresponding structural information.
A. acquiring house type data accumulated by a real estate company and a home decoration company;
b. Screening house type map data with room type labels, and respectively processing the plane house type map vector data without coordinate information and house type data with coordinate information;
c. Vector data rasterization is carried out on plane house type graph vector data without coordinate information, inner and outer walls and doors and windows in a house type are extracted, each wall, each door and each window are respectively represented by line segments, coordinates of the door and window line segments contained in each wall are stored, closed polygonal outlines of the walls of each room are extracted, polygons of each room are represented in a two-dimensional point string mode, and corresponding relations between the types of the rooms and the polygonal outlines and the coordinates of the wall line segments contained in each room are stored.
D. For house type data with coordinate information, the types of rooms are sequentially extracted, the coordinates of wall line segments contained in the rooms, the coordinates of door and window line segments contained in the walls, and the organization mode is the same.
E. According to data analysis and statistics, the types of rooms to be analyzed are classified into 10 types, namely a living room, an auxiliary room (the main room or the coat room are classified into the types), a balcony, a bedroom, a kitchen, a bathroom (the shower room and the bathroom are classified into the types), a corridor, a multifunctional room, a home garden and a custom room (the rooms with unknown classification are referred to).
F. and integrating the data with one household type as a unit, and storing the processed household type data in a text form as a structured household type data set.
And secondly, building a house type communication bubble chart according to the structured house type data, performing feature engineering, and acquiring feature items and category labels of all nodes in the bubble chart as training data.
A. Acquiring the structured house type data set constructed in the first step;
b. Traversing the structured household data set, and for each household data in the set, performing the following processing:
b1. firstly, each room is taken as a node, and the node is marked as a corresponding room type;
b2. the communication relationship among rooms is taken as an edge, and the edge type is only limited to the communication relationship;
b3. constructing a house type communication bubble diagram;
b4. Sequentially calculating 7 data including the area of each room node, the room surrounding frame, the long side of the room, the short side of the room, the circumference of the room, the center coordinates of the room and the door and window ratio of the room as node characteristics;
b5. Constructing a relation list according to the connection relation in the bubble diagram, and storing the connection node characteristics together as a training sample; c. and dividing the household data set obtained after the traversal is finished into training data and test data.
Third, as shown in fig. 2, a classification model of the graph neural network model is built, training data is input for training, and optimal model weights are stored.
A. acquiring a training data set of the second step;
b. Initializing an overall graph structure according to a bubble graph structure, wherein the overall graph structure is marked as G (V, E), V represents an edge set in the graph, E represents a point set in the graph, the characteristic of an input node is marked as { X v }, a kth order weight matrix is initialized, the value of k is marked as W k, a mean value method is selected as an aggregation function, the value is marked as AGG k, a node sampling function in the graph is set as N, and the upper operation limit of aggregation and sampling is set as second order, namely k=2;
c. The method comprises the steps of constructing a graph neural network model, marking the input characteristics of all nodes in the graph as h v 0, firstly, respectively sampling first-order neighbor nodes and second-order neighbor nodes of a node h v 0 by using a sampling function N, respectively marking the first-order neighbor nodes and the second-order neighbor nodes as h v 1、hv 2, then respectively carrying out aggregation and weighting on the second-order neighbor nodes h v 2 and the first-order neighbor nodes h v 1 by using an aggregation function AGG k and a weight matrix W k to obtain a characteristic vector h v k of the node, and finally carrying out two-norm normalization on the obtained node vector so as to facilitate similarity calculation in space.
D. Classifying the node characteristic vector h v k by the fully connected layer with the dimension of (7, 10);
e. Reading training data of the second step and loading the training data into the model in batches for training, and calculating loss of classification results of model prediction by adopting cross entropy loss;
f. The model adopts an Adam optimizer, the initial learning rate is 0.004, a learning rate attenuation method of step descent is adopted, the batch size is defined as 32 rooms, and the total training is 100 times;
and fourthly, predicting the test house type data according to the stored model, and calculating the classification accuracy.
A. Loading the model saved in the third step;
b. And (3) reading the test data divided in the second step, loading the model, acquiring a classification result, selecting the precision as an index, and respectively carrying out precision calculation according to the 10 categories set in the first step.
And fifthly, visualizing the room classification result after post-processing and the house type structural data.
A. reading the room classification result after post-treatment;
b. reading house type structure information of test data from the structured house type data set obtained in the first step according to the test data index;
c. Traversing all rooms of the whole house, drawing a two-dimensional structure diagram of the room according to the room index, and marking the room type;
d. Finally, a planar floor plan with room types is displayed.
The invention has the following characteristics:
1. the house type graph understanding method based on the graph neural network model is that the model trains the flow;
2. The method for collecting and processing the house type graph data and the structuring method comprise plane house type graph vector data without coordinate information and house type data with coordinate information;
3. A feature vector representation method based on a graph structure of household graph structure data.
In summary, the invention rapidly and accurately analyzes the category information of each room in the house type through the graphic neural network model and assisted by the structured house type data processing, and displays the planar house type graph with the room type labels, thereby helping people and machines to rapidly understand the whole house type. By using the method and the system, the manpower and material resources consumed in the house type understanding of production and living can be greatly saved, and the working efficiency of upstream tasks is improved.
In some alternative embodiments, the functions/acts noted in the block diagrams may occur out of the order noted in the operational illustrations. For example, two blocks shown in succession may in fact be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality/acts involved. Furthermore, the embodiments presented and described in the flowcharts of the present invention are provided by way of example in order to provide a more thorough understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed, and in which sub-operations described as part of a larger operation are performed independently.
Furthermore, while the invention is described in the context of functional modules, it should be appreciated that, unless otherwise indicated, one or more of the described functions and/or features may be integrated in a single physical device and/or software module or one or more functions and/or features may be implemented in separate physical devices or software modules. It will also be appreciated that a detailed discussion of the actual implementation of each module is not necessary to an understanding of the present invention. Rather, the actual implementation of the various functional modules in the apparatus disclosed herein will be apparent to those skilled in the art from consideration of their attributes, functions and internal relationships. Accordingly, one of ordinary skill in the art can implement the invention as set forth in the claims without undue experimentation. It is also to be understood that the specific concepts disclosed are merely illustrative and are not intended to be limiting upon the scope of the invention, which is to be defined in the appended claims and their full scope of equivalents.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that: many changes, modifications, substitutions and variations may be made to the embodiments without departing from the spirit and principles of the invention, the scope of which is defined by the claims and their equivalents.
While the preferred embodiment of the present application has been described in detail, the present application is not limited to the embodiments described above, and those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present application, and these equivalent modifications or substitutions are included in the scope of the present application as defined in the appended claims.
Claims (7)
1. The structured house type analysis method based on the graph neural network is characterized by comprising the following steps of:
Acquiring all house type structural information according to a house type database, and carrying out structural processing on the house type structural information to obtain structural house type structural information;
Building a house type communication bubble chart according to the structured house type structural information, carrying out characteristic engineering, and acquiring characteristic items and category labels of all nodes in the bubble chart as training data;
constructing a classification model based on a graph neural network model, inputting training data for training, and storing the optimal model weight;
predicting the test house type data according to the optimal model weight, calculating the classification precision, and constructing a target model according to the classification precision;
Analyzing the house type information to be analyzed according to the target model, and performing visual display after obtaining a room classification result and house type structure data;
the building of the house type communication bubble diagram according to the structured house type structural information and the feature engineering are carried out, and feature items and category labels of all nodes in the bubble diagram are obtained as training data, and the building comprises the following steps:
Acquiring a structured house type data set;
Traversing the structured collection of household data, for each household data in the collection, performing the following processing: taking each room as a node, and marking the node as a corresponding room type; taking the communication relationship among rooms as edges, and limiting the types of the edges to the communication relationship; constructing a house type communication bubble diagram; sequentially calculating 7 data including the area of each room node, the room surrounding frame, the long side of the room, the short side of the room, the circumference of the room, the center coordinates of the room and the door and window ratio of the room as node characteristics; constructing a relation list according to the connection relation in the bubble diagram, and storing the connection node characteristics together as a training sample;
dividing the household data set obtained after the traversal is finished into training data and test data;
the building of the classification model based on the graph neural network model, the training of the input training data, the saving of the optimal model weight, includes:
Acquiring a set of training data;
Initializing an overall graph structure according to a bubble graph structure, wherein the overall graph structure is marked as G (V, E), V represents an edge set in the graph, E represents a point set in the graph, the characteristic of an input node is marked as { X v }, a kth order weight matrix is initialized, the value of k is marked as W k, a mean value method is selected as an aggregation function, the value is marked as AGG k, a node sampling function in the graph is set as N, and the upper operation limit of aggregation and sampling is set as second order, namely k=2;
Constructing a graph neural network model, wherein the input characteristics of all nodes in the graph are marked as h v 0, firstly, respectively sampling first-order neighbor nodes and second-order neighbor nodes of a node h v 0 by using a sampling function N, respectively marking the first-order neighbor nodes and the second-order neighbor nodes as h v 1、hv 2, then respectively carrying out aggregation and weighting on the second-order neighbor nodes h v 2 and the first-order neighbor nodes h v 1 by using an aggregation function AGG k and a weight matrix W k to obtain a characteristic vector h v k of the node, and finally carrying out two-norm normalization on the obtained node vector;
Classifying the node characteristic vector h v k by the fully connected layer with the dimension of (7, 10);
Reading training data and loading the training data into the model in batches for training, and calculating the loss of the classification result predicted by the model by adopting cross entropy loss;
adopting an Adam optimizer as a model, and training by adopting a learning rate attenuation method of step descent;
the method for obtaining the house type structural information comprises the steps of obtaining all house type structural information according to a house type database, and carrying out structuring processing on the house type structural information to obtain structured house type structural information, wherein the method comprises the following steps:
acquiring house type data accumulated by a real estate company and a home decoration company;
Screening house type map data with room type labels, and respectively processing the plane house type map vector data without coordinate information and house type data with coordinate information;
vector data rasterization is carried out on the vector data of the plane house type graph without the coordinate information, and the information of the inner wall body, the outer wall body and the door and window in the house is extracted;
sequentially extracting the types of rooms according to house type data with coordinate information, wherein the rooms comprise wall body line segment coordinates, and the walls comprise door and window line segment coordinates;
Classifying the types of the rooms to be analyzed according to data analysis and statistics;
And integrating the processed house type data in a text form by taking one house type as a unit, and storing the house type data as a structured house type data set.
2. The structured household pattern analysis method based on the graph neural network according to claim 1, wherein the method further comprises:
And respectively representing each wall, door and window by line segments, storing the coordinates of the line segments of the door and window contained in each wall, extracting the closed polygonal outline of the wall of each room, representing the polygon of each room in the form of two-dimensional point strings, and storing the corresponding relation between the types of the rooms and the polygonal outline and the coordinates of the line segments of the wall contained in each room.
3. The method for structured household pattern analysis based on the graphic neural network according to claim 1, wherein the classifying the room type to be analyzed according to the data analysis and statistics comprises:
According to data analysis and statistics, the types of rooms to be analyzed are classified into 10 types, namely a living room, an auxiliary room, a balcony, a bedroom, a kitchen, a bathroom, a corridor, a multifunctional room, a home garden and a custom room.
4. The method for analyzing the structural house type based on the graphic neural network according to claim 1, wherein the analyzing the house type information to be analyzed according to the target model, and performing visual display after obtaining the room classification result and the house type structure data, comprises the following steps:
reading the room classification result after post-treatment;
Reading house type structure information of test data from the obtained structured house type data set according to the test data index; traversing all rooms of the whole house, drawing a two-dimensional structure diagram of the room according to the room index, and marking the room type;
a flat floor plan with room types is shown.
5. A structured family type parsing system based on a graph neural network, comprising:
The first module is used for acquiring all house type structural information according to the house type database, and carrying out structuring treatment on the house type structural information to obtain structured house type structural information;
The second module is used for constructing a house type communication bubble chart according to the structured house type structural information and carrying out characteristic engineering to obtain characteristic items and category labels of all nodes in the bubble chart as training data;
the third module is used for building a classification model based on the graph neural network model, inputting training data for training, and storing the optimal model weight;
the fourth module is used for predicting the test house type data according to the optimal model weight, calculating the classification precision, and further constructing a target model according to the classification precision;
The fifth module is used for analyzing the house type information to be analyzed according to the target model, and performing visual display after obtaining the house classification result and the house type structure data;
In the second module, the building a house type connected bubble chart according to the structured house type structural information and performing feature engineering to obtain feature items and category labels of all nodes in the bubble chart as training data, including:
Acquiring a structured house type data set;
Traversing the structured collection of household data, for each household data in the collection, performing the following processing: taking each room as a node, and marking the node as a corresponding room type; taking the communication relationship among rooms as edges, and limiting the types of the edges to the communication relationship; constructing a house type communication bubble diagram; sequentially calculating 7 data including the area of each room node, the room surrounding frame, the long side of the room, the short side of the room, the circumference of the room, the center coordinates of the room and the door and window ratio of the room as node characteristics; constructing a relation list according to the connection relation in the bubble diagram, and storing the connection node characteristics together as a training sample;
dividing the household data set obtained after the traversal is finished into training data and test data;
in the third module, the building of the classification model based on the graph neural network model, inputting training data for training, and storing the optimal model weight comprises the following steps:
Acquiring a set of training data;
Initializing an overall graph structure according to a bubble graph structure, wherein the overall graph structure is marked as G (V, E), V represents an edge set in the graph, E represents a point set in the graph, the characteristic of an input node is marked as { X v }, a kth order weight matrix is initialized, the value of k is marked as W k, a mean value method is selected as an aggregation function, the value is marked as AGG k, a node sampling function in the graph is set as N, and the upper operation limit of aggregation and sampling is set as second order, namely k=2;
Constructing a graph neural network model, wherein the input characteristics of all nodes in the graph are marked as h v 0, firstly, respectively sampling first-order neighbor nodes and second-order neighbor nodes of a node h v 0 by using a sampling function N, respectively marking the first-order neighbor nodes and the second-order neighbor nodes as h v 1、hv 2, then respectively carrying out aggregation and weighting on the second-order neighbor nodes h v 2 and the first-order neighbor nodes h v 1 by using an aggregation function AGG k and a weight matrix W k to obtain a characteristic vector h v k of the node, and finally carrying out two-norm normalization on the obtained node vector;
Classifying the node characteristic vector h v k by the fully connected layer with the dimension of (7, 10);
Reading training data and loading the training data into the model in batches for training, and calculating the loss of the classification result predicted by the model by adopting cross entropy loss;
adopting an Adam optimizer as a model, and training by adopting a learning rate attenuation method of step descent;
In the first module, the obtaining all house type structural information according to the house type database, and carrying out structuring processing on the house type structural information to obtain structured house type structural information, including:
acquiring house type data accumulated by a real estate company and a home decoration company;
Screening house type map data with room type labels, and respectively processing the plane house type map vector data without coordinate information and house type data with coordinate information;
vector data rasterization is carried out on the vector data of the plane house type graph without the coordinate information, and the information of the inner wall body, the outer wall body and the door and window in the house is extracted;
sequentially extracting the types of rooms according to house type data with coordinate information, wherein the rooms comprise wall body line segment coordinates, and the walls comprise door and window line segment coordinates;
Classifying the types of the rooms to be analyzed according to data analysis and statistics;
And integrating the processed house type data in a text form by taking one house type as a unit, and storing the house type data as a structured house type data set.
6. An electronic device comprising a processor and a memory;
The memory is used for storing programs;
the processor executing the program implements the method of any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that the storage medium stores a program that is executed by a processor to implement the method of any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310387140.8A CN116578915B (en) | 2023-04-11 | 2023-04-11 | Structured house type analysis method and system based on graphic neural network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310387140.8A CN116578915B (en) | 2023-04-11 | 2023-04-11 | Structured house type analysis method and system based on graphic neural network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116578915A CN116578915A (en) | 2023-08-11 |
CN116578915B true CN116578915B (en) | 2024-06-11 |
Family
ID=87538586
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310387140.8A Active CN116578915B (en) | 2023-04-11 | 2023-04-11 | Structured house type analysis method and system based on graphic neural network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116578915B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117271822B (en) * | 2023-09-26 | 2024-04-09 | 广州极点三维信息科技有限公司 | Layout searching method and system based on multi-modal house type knowledge graph |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108009598A (en) * | 2017-12-27 | 2018-05-08 | 北京诸葛找房信息技术有限公司 | Floor plan recognition methods based on deep learning |
CN110059750A (en) * | 2019-04-17 | 2019-07-26 | 广东三维家信息科技有限公司 | House type shape recognition process, device and equipment |
CN112417539A (en) * | 2020-11-16 | 2021-02-26 | 杭州群核信息技术有限公司 | Method, device and system for designing house type based on language description |
WO2021174125A1 (en) * | 2020-02-28 | 2021-09-02 | Aurora Solar Inc. | Automated three-dimensional building model estimation |
WO2021179838A1 (en) * | 2020-03-10 | 2021-09-16 | 支付宝(杭州)信息技术有限公司 | Prediction method and system based on heterogeneous graph neural network model |
CN114329744A (en) * | 2022-03-03 | 2022-04-12 | 如你所视(北京)科技有限公司 | House type reconstruction method and computer readable storage medium |
CN114547749A (en) * | 2022-03-03 | 2022-05-27 | 如你所视(北京)科技有限公司 | House type prediction method, device and storage medium |
CN115205481A (en) * | 2022-07-18 | 2022-10-18 | 中国人民解放军国防科技大学 | Spectrum map construction method and system based on graph neural network |
-
2023
- 2023-04-11 CN CN202310387140.8A patent/CN116578915B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108009598A (en) * | 2017-12-27 | 2018-05-08 | 北京诸葛找房信息技术有限公司 | Floor plan recognition methods based on deep learning |
CN110059750A (en) * | 2019-04-17 | 2019-07-26 | 广东三维家信息科技有限公司 | House type shape recognition process, device and equipment |
WO2021174125A1 (en) * | 2020-02-28 | 2021-09-02 | Aurora Solar Inc. | Automated three-dimensional building model estimation |
WO2021179838A1 (en) * | 2020-03-10 | 2021-09-16 | 支付宝(杭州)信息技术有限公司 | Prediction method and system based on heterogeneous graph neural network model |
CN112417539A (en) * | 2020-11-16 | 2021-02-26 | 杭州群核信息技术有限公司 | Method, device and system for designing house type based on language description |
CN114329744A (en) * | 2022-03-03 | 2022-04-12 | 如你所视(北京)科技有限公司 | House type reconstruction method and computer readable storage medium |
CN114547749A (en) * | 2022-03-03 | 2022-05-27 | 如你所视(北京)科技有限公司 | House type prediction method, device and storage medium |
CN115205481A (en) * | 2022-07-18 | 2022-10-18 | 中国人民解放军国防科技大学 | Spectrum map construction method and system based on graph neural network |
Non-Patent Citations (2)
Title |
---|
电力通道隐患房屋数字化统计方法研究;余婧峰;刘莹;余银普;;四川电力技术;20161220(06);全文 * |
谭丁武 ; 张坤芳 ; 刘燕 ; 郑一基 ; 鲁鸣鸣 ; .基于门控图注意力神经网络的程序分类.计算机工程与应用.(07),全文. * |
Also Published As
Publication number | Publication date |
---|---|
CN116578915A (en) | 2023-08-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Huang et al. | Architectural drawings recognition and generation through machine learning | |
Chen | A tutorial on kernel density estimation and recent advances | |
CN110348368B (en) | Method, computer readable medium and system for artificial intelligence analysis of house type graph | |
JP2019082978A (en) | Skip architecture neutral network device and method for improved semantic segmentation | |
CN116578915B (en) | Structured house type analysis method and system based on graphic neural network | |
CN111368656A (en) | Video content description method and video content description device | |
CN106485289A (en) | A kind of sorting technique of the grade of magnesite ore and equipment | |
CN115587597B (en) | Sentiment analysis method and device of aspect words based on clause-level relational graph | |
Kidd et al. | Bayesian nonstationary and nonparametric covariance estimation for large spatial data (with discussion) | |
Salazar | On Statistical Pattern Recognition in Independent Component Analysis Mixture Modelling | |
CN117010266A (en) | Paste yield stress prediction method and device based on XGBoost model | |
CN113378178B (en) | Deep learning-based graph self-confidence learning software vulnerability detection method | |
Jin et al. | A weighting method for feature dimension by semisupervised learning with entropy | |
Roman et al. | A semi-automated approach to model architectural elements in scan-to-BIM processes | |
Arbia et al. | Contextual classification in image analysis: an assessment of accuracy of ICM | |
CN111950646A (en) | Hierarchical knowledge model construction method and target identification method for electromagnetic image | |
CN114818849A (en) | Convolution neural network based on big data information and anti-electricity-stealing method based on genetic algorithm | |
Shi et al. | On the complexity of bayesian generalization | |
CN112116449A (en) | Credit evaluation method, device, equipment and storage medium with good model interpretability | |
Lewis et al. | Identification of residential property sub-markets using evolutionary and neural computing techniques | |
CN117390592B (en) | Method and system for constructing characteristic landscape forecast model | |
CN116720517B (en) | Search word component recognition model construction method and search word component recognition method | |
Babovic et al. | Hydroinformatics opening new horizons: union of computational hydraulics and artificial intelligence | |
CN118334352B (en) | Training method, system, medium and equipment for point cloud semantic segmentation model | |
CN113064962B (en) | Environment complaint reporting event similarity analysis method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |