An intelligent recommendation method and system based on BIM components
Through an intelligent recommendation method based on user historical behavior, using recall layer and ranking layer recommendation models, integrating image and text information, it solves the problem of quickly finding suitable components in the BIM component library, improves the accuracy and efficiency of component recommendation, and enhances Design flexibility.
Patent Information
- Application Number
- CN202410995759.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-07-24
AI Technical Summary
In the BIM component library, as the size of the component library increases, how to quickly and accurately find the components that best suit the project needs has become a problem. The manual search method using keywords alone is time-consuming and inefficient, and it is difficult to fully understand the user's needs. Specific needs and design intentions, and the difficulty of exploring new component options limit design ideas.
Adopt an intelligent recommendation method based on user historical behavior, obtain user logs, extract user historical feature information, build a recall layer and ranking layer recommendation model, use image encoder and Q-Former structure to design the model structure, fuse image and text information, and calculate Click or download probability of the component, and output component candidate sets for initial screening and re-screening.
It improves the accuracy and efficiency of component recommendation, extracts features through user historical information, and outputs a list of components that users may be most interested in, improving the flexibility and efficiency of design.
Smart Images

Figure CN118521840B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of construction engineering information technology, and in particular to an intelligent recommendation method and system based on BIM components. Background Art
[0002] As an emerging information technology, Building Information Modeling (BIM) technology has been widely used in the construction industry. As a database or resource library for storing and managing building component information in BIM software, the BIM component library contains a large amount of building component information and supports registered users to upload, share, browse, search, download and use component resources, which can help engineers and designers efficiently select appropriate components when designing projects. Figure 1 As shown, the components in the library have information such as thumbnails, categories according to resource classification standards, and corresponding component text parameters.
[0003] However, as the size of the component library continues to grow, how to quickly and accurately find the components that best suit the project needs has become a problem. Manual search using keywords alone is time-consuming and inefficient, and it is difficult to fully understand the user's specific needs and design intentions based on search terms alone. For example, users often use certain swing door components (such as "swing door-wooden single leaf 023", "swing door-metal single leaf 001", etc.). When they need to find a suitable swing door component, they need to manually search for the keyword "swing door" and then browse through hundreds of swing door components one by one to find the component they need. Obviously, this method is very time-consuming, labor-intensive and inefficient.
[0004] In addition, the above method tends to limit users to the components they have already come into contact with, making it difficult to explore new component options, thus limiting the design ideas. For example, for users who often use certain swing door components, they can choose similar components such as "embossed door" and "triangular door" for design attempts, but the above manual search method can only output thousands of components by searching the keyword "door" and then browse them one by one to search, otherwise it is difficult to find similar components. Summary of the invention
[0005] Based on the above background, the purpose of the present invention is to provide a BIM component recommendation method and system for intelligent recommendation based on user historical behavior.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present invention provides an intelligent recommendation method based on BIM components, comprising:
[0008] Obtain user logs, extract user historical feature information from the user logs and perform preprocessing;
[0009] Construct a recall layer recommendation model training dataset based on the preprocessed user historical feature information;
[0010] A recall layer recommendation model structure is designed based on an image encoder and a Q-Former structure, and a recall layer recommendation model is obtained by training the recall layer recommendation model training data set. The recall layer recommendation model calculates the click or download probability of each component, and outputs a preliminary screening BIM component candidate set within a first preset ranking based on the click or download probability of each component;
[0011] Based on the pre-processed user historical feature information and the initial screening BIM component candidate set output by the recall layer recommendation model, a training dataset for the ranking layer recommendation model is constructed;
[0012] A sorting layer recommendation model structure is designed based on an image encoder and a Q-Former structure. The sorting layer recommendation model is trained based on a sorting layer recommendation model training data set to obtain a sorting layer recommendation model. The sorting layer recommendation model sorts the initial screening BIM component candidate set output by the recall layer recommendation model, and outputs a re-screening BIM component candidate set within a second preset ranking.
[0013] Furthermore, the user historical characteristic information includes user ID, clicked component ID, click time, downloaded component ID, download time and / or component category.
[0014] Furthermore, the recall layer recommendation model training data set constructed based on the pre-processed user historical feature information includes:
[0015] The user's historical feature information is sorted and counted to obtain the components clicked or downloaded by each user each time, the user's current historical click component set, the historical download component set, and the number of clicks and downloads of similar components;
[0016] For one of the user click or download data, the currently clicked or downloaded component is used as a label, and the user's historical click component set and historical download component set are used as input to construct a training data set. Then, for each user click or download data, a recall layer recommendation model training data set is constructed.
[0017] Furthermore, the construction of the sorting layer recommendation model training data set based on the pre-processed user historical feature information and the initial screening BIM component candidate set output by the recall layer recommendation model includes:
[0018] The user's historical feature information is sorted and counted to obtain the components clicked or downloaded by each user each time, the user's current historical click component set, the historical download component set, and the number of clicks and downloads of similar components;
[0019] For one of the user click or download data, whether the candidate component in the initial screening BIM component candidate set is the user's current click or download component is set as a label corresponding to 1 or -1. The user's historical click component set and historical download component set, the number of clicks and downloads of similar components, and random candidate components are used as input to construct a training data set, and then for each user click or download data, a ranking layer recommendation model training data set is constructed.
[0020] Furthermore, the recall layer recommendation model structure includes:
[0021] The embedding layer is used to extract features from the image and parameter text information of the input component, obtain a feature vector represented by a number, and output a set of historical click component vectors and historical download component vectors corresponding to the user's historical click component set and historical download component set;
[0022] The connection layer is used to perform feature connection and information fusion on the historical click component vectors and historical download component vectors of all components output by the embedding layer;
[0023] The convolution layer is used to perform feature fusion and feature abstraction on the feature vector after feature concatenation, to extract deep semantic information and obtain the user feature vector;
[0024] The output layer adopts a softmax layer structure, which is used to calculate the feature vector output by the convolutional layer and output multi-class classification probabilities.
[0025] Furthermore, the ranking layer recommendation model structure includes:
[0026] The embedding layer is used to extract features from the image and parameter text information of the input component, obtain a feature vector represented by a number, and output a set of historical click component vectors and historical download component vectors corresponding to the user's historical click component set and historical download component set;
[0027] The connection layer is used to perform feature connection and information fusion on the historical click component vectors, historical download component vectors, feature vectors of candidate components, and normalized vectors of the number of clicks and downloads of similar components obtained based on user log statistics of all corresponding components output by the embedding layer;
[0028] The convolution layer is used to perform feature fusion and feature abstraction on the feature vector after feature concatenation, to extract deep semantics and obtain the user feature vector;
[0029] The output layer uses a sigmoid layer structure to calculate the feature vector output by the convolutional layer and output the binary classification probability.
[0030] Furthermore, the embedding layer includes an image encoder and a Q-Former structure, the image encoder includes a converter encoding unit, the converter encoding unit includes a normalization layer, a multi-head self-attention layer, a residual point addition layer, a normalization layer and a multi-layer perceptron layer, which is used to convert the input image data into a vector to capture the feature information of the image; the Q-Former structure includes a self-attention layer, a cross-attention layer and a feedforward layer, which are used to process text information, and interact with the image information output by the image encoder in the cross-attention layer to achieve cross-modal interaction between text and image, and output a set of historical click component vectors and historical download component vectors corresponding to the user's historical click component set and historical download component set.
[0031] Furthermore, the output layer adopts a softmax layer structure, which is used to calculate the feature vector output by the convolution layer and output multi-class classification probabilities, wherein the calculation adopts the softmax function of the softmax layer, and the formula is:
[0032] ;
[0033] in, is the vector logical value of the ith category, Represents the total number of categories.
[0034] Furthermore, the output layer adopts a sigmoid layer structure, which is used to calculate the feature vector output by the convolution layer and output the binary classification probability, wherein the calculation is performed using the sigmoid function in the sigmoid layer, and the formula is:
[0035] ;
[0036] Among them, z represents the input recommendation value of the sigmoid function, and f(z) represents the output probability value.
[0037] In a second aspect, the present invention provides an intelligent recommendation system based on BIM components, comprising:
[0038] Request acquisition module, used to obtain user recommendation request information;
[0039] A user history feature acquisition module, which acquires user history feature information based on user logs, wherein the user history feature information includes user ID, clicked component ID, click time, downloaded component ID, download time and / or component category;
[0040] The recall layer recommendation module calculates the user feature vector based on the acquired user historical feature information, calculates the probability value of each component being clicked or downloaded by the user, sorts them according to the size of the probability value, and outputs the preliminary screening BIM component candidate set within the first preset ranking;
[0041] The sorting layer recommendation module calculates the probability value of each component in the preliminary screening BIM component candidate set being clicked or downloaded by the user based on the acquired user historical features and the preliminary screening BIM component candidate set output by the recall layer recommendation module, sorts them according to the size of the probability value, and outputs the re-screening BIM component candidate set within the second preset ranking.
[0042] The beneficial effects of the present invention are as follows:
[0043] 1) The present invention constructs a recall layer recommendation model and a ranking layer recommendation model based on user historical behavior. The above two deep learning recommendation models extract user features by fusing user historical information and output accurate component interest probability of users with a lightweight structure;
[0044] 2) The present invention constructs a multimodal deep learning recall layer recommendation model and a ranking layer recommendation model that integrate image information and text information. The above two models integrate image features and text features through an image encoder and a unique Q-Former structure, thereby improving the generalization and expression capabilities of the model in cross-modal interaction and improving the accuracy of component recommendation;
[0045] 3) The present invention transforms user historical information into feature vectors through a multimodal deep learning model that integrates image information and text information, and preliminarily screens components through a recall layer recommendation model based on user historical behavior, and finely sorts components through a ranking layer recommendation model, outputting a recommended list of components that the user may be most interested in, thereby further improving the accuracy of component recommendations. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 A sample diagram of components in a BIM component library of a certain enterprise provided in an embodiment of the present invention;
[0048] Figure 2 A schematic diagram of a flow chart of an intelligent recommendation method based on BIM components provided in an embodiment of the present invention;
[0049] Figure 3 A schematic diagram of the process of constructing a recall layer recommendation model provided by an embodiment of the present invention;
[0050] Figure 4 A schematic diagram of the embedding layer structure of the recall layer recommendation model provided in an embodiment of the present invention;
[0051] Figure 5 A schematic diagram of a process for constructing a ranking layer recommendation model provided by an embodiment of the present invention;
[0052] Figure 6 A schematic diagram of an implementation flow of a recommendation system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0053] In order to further understand the present invention, preferred embodiments of the present invention are described below in conjunction with examples. However, it should be understood that these descriptions are only for further illustrating the features and advantages of the present invention, rather than limiting the claims of the present invention.
[0054] Terminology explanation:
[0055] Softmax layer: An output layer in a neural network structure that converts the raw output of the last layer of the neural network into a probability distribution so that the value of each output unit represents the probability of the corresponding category;
[0056] Sigmoid layer: An output layer in a neural network structure, used to map the input real value to between 0 and 1, and is often used to output probability values in binary classification tasks.
[0057] Embodiment 1:
[0058] See also Figure 2 This embodiment provides a BIM component recommendation method for intelligent recommendation based on user historical behavior, which specifically includes:
[0059] S1. Build a recall layer recommendation model.
[0060] The recall layer recommendation model is used to quickly recall a small set of items that users may be interested in from a massive candidate set. In this embodiment, the candidate set is all components in the BIM component library, and the recalled item set is a small set of BIM components that users may be interested in after preliminary screening by the recall layer recommendation model, which is named the preliminary screening BIM component candidate set.
[0061] Constructing a recall layer recommendation model includes designing a deep learning model structure, training and verifying the deep learning model structure through a specific training data set, and the training data set is constructed by obtaining user historical information from user logs. The specific steps for constructing the recall layer recommendation model are as follows:
[0062] S11. Construct a recall layer recommendation model training dataset based on user logs.
[0063] First, extract the required information from the user log data, including user ID, component ID clicked, click time, component ID downloaded, download time, etc. Clean and format the above information. The formatting process refers to standardizing the information extracted from the user log. Information standardization specifically includes: using a library in Python to process the information for standardization, and outputting the results as an Excel table to facilitate subsequent information collation and statistics; cleaning refers to removing erroneous and invalid information in the extracted information.
[0064] Then, the user's click information and download information are sorted and counted. The click information is the component itself corresponding to the clicked component ID and the time of the click; the download information is the component itself corresponding to the downloaded component ID and the time of the download, so as to obtain the component clicked or downloaded by each user each time and the user's current historical click component set and historical download component set.
[0065] Afterwards, for one of the user click or download data, the currently clicked or downloaded component is used as a label, and the user's historical click component set and historical download component set are used as input to construct a training data, and then a training data set is constructed for each user click or download data.
[0066] Finally, the constructed training dataset is divided into training set and test set in a 9:1 ratio, so as to verify and evaluate the recall layer recommendation model during the training process.
[0067] S12, designing a recall layer recommendation model structure, wherein the recall layer recommendation model structure includes an embedding layer for extracting image and parameter text feature vectors, a connection layer for fusing multiple feature vectors, a convolution layer for extracting deep semantic information, and an output layer for obtaining classification probabilities. Figure 3 As shown, the specific implementation steps of the recall layer recommendation model structure designed for this embodiment.
[0068] S121. Design of embedding layer. The embedding layer is used to extract features of the input component information, namely, component images and parameter texts, to obtain digital representations, namely, feature vectors, which can capture essential features of the data.
[0069] The embedding layer of this embodiment includes an image encoder and a Q-Former structure, which can extract component feature vectors from the component's image information and parameter text information at the same time, improving the generalization and expression capabilities of the model in cross-modal interactions. The image encoder is used to convert the input image data into a vector representation that can capture important features and information of the image. The Q-Former structure is used to process text information and is combined with the image encoder to achieve cross-modal interaction between text and images, thereby better understanding and processing multimodal data.
[0070] like Figure 4 As shown, the specific implementation steps of the embedding layer model structure of this embodiment.
[0071] The image encoder adopts the ViT-G / 14 model, which includes an input unit and a converter encoding unit. The image encoder cuts the input image into blocks of 14×14 and performs a flattening operation to obtain a block embedding. At the same time, the category embedding vector representing the category information and the position embedding vector representing the position information are input into the converter encoding unit. The category embedding vector and the position embedding vector are learnable vectors, which are randomly generated as the category information and position information at the beginning. The structure of the converter encoding unit includes a normalization layer, a multi-head self-attention layer, a residual point addition layer, a normalization layer, and a multi-layer perceptron layer. The core is the multi-head self-attention layer, which can consider the relationship between all pixels in the image and capture global dependencies, not just local neighborhoods. After passing through the preset 39 layers of converter encoding units, the output vector is input into the cross attention layer of the Q-Former structure to interact with the text information.
[0072] The Q-Former structure mainly includes a self-attention layer, a cross-attention layer, and a feedforward layer, which aligns image features with text features so that the output feature vector contains the most relevant image and text information. The input parameter text information and a set of parameter random learnable vectors are used to adjust the behavior of the attention mechanism so that the model can better capture the information in the text sequence. The parameter text and a set of learnable vectors first enter the self-attention layer to learn the dependencies between vectors, and then interact with the image vector output by the image encoder through the cross-attention layer to learn the association between different modal data. After that, they enter the feedforward layer together, also known as the fully connected layer, and extract features through linear transformation and activation function, and output a 512-dimensional feature vector containing the most relevant image and text information.
[0073] The embedding layer output of this embodiment is a set of historical click component vectors and a set of historical download component vectors corresponding to the user's historical click component set and historical download component set.
[0074] S122, design of the connection layer. The connection layer is used to perform feature connection and information fusion on the feature vectors of all corresponding components output by the embedding layer.
[0075] The user history click component vector set and the user history download component vector set output by the embedding layer are respectively input into the average pooling layer for mean operation, and then the mean-processed history click component vector and the history download component vector are concatenated to obtain a 1024-dimensional feature vector.
[0076] S123, convolution layer design. The convolution layer is used to perform feature fusion and feature abstraction on the concatenated feature vectors. Specifically, two fully connected layers are used, with 512 and 256 neurons respectively. The output dimension of the fully connected layer is determined by the number of neurons in the layer. Each neuron is connected to all neurons in the previous layer, so the output dimension is the number of neurons in the fully connected layer, that is, a 256-dimensional feature vector is output.
[0077] S124, the design of the output layer. It is mainly a softmax layer structure. The input 256-dimensional feature vector enters the softmax layer. The parameters of the softmax layer are essentially a 256×n-dimensional matrix, where n represents the total number of categories, that is, the total number of components in the component library. The softmax function of the softmax layer outputs the classification probability result, that is, the click or download probability of each component. The probability calculation formula is:
[0078] ;
[0079] in, is the vector logical value of the ith category, Represents the total number of categories.
[0080] S13, train the recall layer recommendation model designed in S12 using the training data set obtained in S11, and optimize the parameters of the recall layer recommendation model. The specific steps are as follows:
[0081] 1) Initialize the recall layer recommendation model to speed up the subsequent training process and improve the performance of the model;
[0082] 2) Inputting the training data set obtained in S11 into the model, the training data set includes a large number of historical click component sets and historical download component sets of different users, and is used to train the recall layer recommendation model to predict the component currently clicked or downloaded by the user;
[0083] 3) Train the model. In the training process of this embodiment, the model will calculate the prediction result and prediction error of each component currently clicked or downloaded by each user through forward propagation, and use the loss function to evaluate the current performance of the model. The gradient of the loss function to the model weight is calculated through the back-propagation algorithm, and the weight of the model is updated through gradient descent to minimize the value of the loss function. In a series of iterative processes, the model continuously learns and adjusts its parameters to more accurately predict the components clicked or downloaded by users.
[0084] In this embodiment, the loss function in the training process adopts the cross entropy loss function, as shown below:
[0085] ;
[0086] in, is the true label value of the ith category. Specifically, when the ith component is the component currently clicked or downloaded by the user is 1, otherwise it is 0; Represents the predicted value of the softmax function for the i-th classification, that is, the corresponding predicted probability of the i-th component.
[0087] Finally, a recall layer recommendation model is trained that can effectively predict components that users may be interested in, laying the foundation for the subsequent ranking layer recommendation model.
[0088] S2. Build a ranking layer recommendation model.
[0089] The ranking layer recommendation model finely sorts the preliminary screening BIM component candidate set that the user may be interested in, which is output by the recall layer recommendation model, and finally forms a recommendation list visible to the user, namely, the re-screened BIM component candidate set.
[0090] The construction of the ranking layer recommendation model involves the design of a deep learning model structure, which is then trained and verified through a specific training data set. In this embodiment, the training data set is constructed based on user historical information obtained from user logs. The specific construction steps of the ranking layer recommendation model in this embodiment are as follows:
[0091] S21. Construct a ranking layer recommendation model training dataset based on user logs.
[0092] First, the required information is extracted from the user log data, including user ID, clicked component ID, click time, downloaded component ID, download time, component category, etc. The above information is cleaned and formatted.
[0093] Then, the user's click information and download information are sorted and counted to obtain the components clicked or downloaded by each user each time, the user's current historical click component set, historical download component set, and the number of clicks and downloads of similar components.
[0094] Afterwards, for one of the user click or download data, the user's historical click component set and historical download component set, the number of clicks and downloads of similar components, and the candidate components in the randomly screened BIM component candidate set are taken as input, and whether the candidate component is the user's current click or download component is set to 1 or -1 as a label, thereby constructing a training data set, and then constructing a training data set for each user click or download data.
[0095] Finally, the constructed training dataset is divided into training set and test set in a 9:1 ratio, so as to verify and evaluate the ranking layer recommendation model during the training process.
[0096] S22, designing a ranking layer recommendation model structure, the ranking layer recommendation model structure includes an embedding layer for extracting image and parameter text feature vectors, a connection layer for fusing multiple feature vectors, a convolution layer for extracting deep semantics, and an output layer for obtaining probabilities. Figure 5 As shown, the specific implementation steps of the ranking layer recommendation model structure designed for this embodiment.
[0097] S221, design of embedding layer. The method used in this embodiment is the same as S121, which can simultaneously extract component feature vectors from component image information and parameter text information, thereby improving the generalization and expression capabilities of the model in cross-modal interaction. Similarly, a set of historical click component vectors and a set of historical download component vectors of the user are output.
[0098] S222, design of the connection layer. Based on the same steps as S122, the feature vector of the candidate component and the normalized vectors n and m of the number of clicks and downloads of the same component obtained based on user log statistics are added to fuse the category information and enhance the model performance. Figure 5 The concatenation operation is performed in order to obtain a 1282-dimensional feature vector, that is, 256 (candidate component vector) + 512 (historical click component vector) + 512 (historical download component vector) + 1 (n) + 1 (m) = 1282 dimensions.
[0099] S223, design of convolution layer. The method adopted in this embodiment is the same as S123, and the concatenated feature vectors are subjected to feature fusion and feature abstraction to output a 256-dimensional feature vector.
[0100] S224, design of the output layer. The 256-dimensional feature vector output by the convolution layer passes through the 256×1 matrix of the sigmoid layer and the sigmoid function to output the binary classification probability, that is, the probability of the user clicking or downloading this component. The sigmoid function in the sigmoid layer limits the output value to between 0 and 1, that is, the probability value. The calculation formula is defined as follows:
[0101] ;
[0102] Among them, z represents the input recommendation value of the sigmoid function, that is, the eigenvalue of the 256×1 matrix output after the sigmoid layer, and f(z) represents the output probability value.
[0103] S23, training the ranking layer recommendation model designed in S22 by using the training data set obtained based on the user logs, and optimizing the ranking layer recommendation model parameters. The specific steps are as follows:
[0104] 1) Initialize the ranking layer recommendation model to accelerate the subsequent model training process and improve the model performance;
[0105] 2) Input the training data set obtained in S21 into the model, wherein the training data set includes a large number of historical click component sets, historical download component sets, and random candidate components, click times and download times of similar components of different users, and is used to train the model to determine whether the candidate component is the component currently clicked or downloaded by the user.
[0106] 3) Train the model. In this embodiment, during training, the model will calculate the prediction results and prediction errors of each component currently clicked or downloaded by each user through forward propagation, and evaluate the current performance of the model through the loss function. Then, the gradient of the loss function to the model weight is calculated through the back-propagation algorithm, and the weight of the model is updated through gradient descent to minimize the value of the loss function. In a series of iterative processes, the model continuously learns and adjusts its parameters to more accurately predict the components clicked or downloaded by the user.
[0107] In this embodiment, the loss function in the training process adopts the binary cross entropy loss function:
[0108] ;
[0109] in, is the number of candidate components, is the true label of the i-th sample (0 or 1). Specifically, when the i-th candidate component is the component currently clicked or downloaded by the user is 1, otherwise it is 0; is the predicted probability of the i-th sample, that is, the corresponding predicted probability of the i-th candidate component.
[0110] S3. Recommendation system implementation process.
[0111] This embodiment is based on the recall layer recommendation model constructed after training in S1 and the ranking layer recommendation model constructed after training in S2. Figure 6 The specific recommended implementation process steps are as follows:
[0112] S31, request process. In this embodiment, the user enters the BIM component library search bar to trigger a recommendation request, the system obtains the user log, obtains the user's historical behavior information based on the user log, and counts the user's current historical click component set and historical download component set, as well as the number of clicks and downloads of each type of component.
[0113] S32, recall process. Based on the user's historical click component set and user's historical download component set obtained in S31, that is, the user's historical features, they are input into the recall layer recommendation model after offline training. The output of the model convolution layer represents the user feature vector. The model output layer calculates the feature vector output by the convolution layer and outputs the binary classification probability, that is, the probability value of each component being clicked or downloaded by the user. Then, based on the probability value, they are sorted from large to small to obtain the top 100 components, that is, Top100, which is the candidate set of components that the user may be most interested in, that is, the initial screening of BIM component candidate set.
[0114] In addition, it should be noted that the method of calculating similarity can also be used to obtain the preliminary screening of BIM component candidate sets. In actual operation, this method can be performed in the database through the similarity retrieval method provided by the database. Specifically: each column vector of the 256×n-dimensional matrix of the softmax layer in the model output layer represents the feature vector of each component in the BIM component library. The similarity between the user feature vector and the component vector in the component library is calculated one by one. In this embodiment, the similarity calculation is based on cosine similarity, and the calculation formula of cosine similarity is defined as follows:
[0115] ;
[0116] in, is the user feature vector, is the component feature vector in the component library, is the vector dimension, the value is 256, and The eigenvectors are , Vector elements.
[0117] Through the above steps, the cosine similarity value between the user feature vector and all the component feature vectors in the component library is obtained. The closer the cosine similarity value is to zero, the higher the similarity between the component required by the user and the components in the component library. Then, based on the similarity, the components are sorted from small to large. In this embodiment, the top 100 components, i.e., Top100, are obtained, which are the candidate set of components that the user may be most interested in, i.e., the initial screening candidate set of BIM components.
[0118] S33, sorting process. The feature vectors of the 100 components initially screened by the recall layer recommendation model obtained based on S32 are input one by one together with the user's historical click component set, the user's historical download component set, and the number of clicks and downloads of similar components obtained based on S31 into the sorting layer recommendation model after offline training, and the probability value of each component in the initially screened BIM component candidate set being clicked or downloaded by the user is output. Then, based on the probability value, the top 10 components, i.e., Top10, are obtained as the system recommendation list that the user may be most interested in, and the BIM component candidate set is re-screened.
[0119] S34, output process. After steps S31, S32, and S33, the intelligent recommendation of BIM components is completed, and a list of top 10 component recommendations is output.
[0120] Embodiment 2:
[0121] The embodiment of the present invention further provides an intelligent recommendation system based on BIM components, comprising:
[0122] Request acquisition module, used to obtain user recommendation request information;
[0123] The user history feature acquisition module acquires the user history information based on the user log, that is, obtains the user's current history click component set and history download component set as well as the number of clicks and downloads of each type of component;
[0124] The recall layer recommendation module calculates the user feature vector based on the acquired user historical features, calculates the probability value of each component being clicked or downloaded by the user, sorts them according to the probability value, and outputs the preliminary screening BIM component candidate set within the first preset ranking;
[0125] The sorting layer recommendation module calculates the probability value of each component in the initial screening BIM component candidate set being clicked or downloaded by the user based on the acquired user historical features and the component candidate set output by the recall layer recommendation module, sorts them according to the probability values, and outputs the re-screened BIM component candidate set within the second preset ranking.
[0126] The above embodiments are only used to help understand the method and core idea of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
[0127] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0128] It should be noted that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps can be implemented in parallel, concurrently or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
Claims
1. An intelligent recommendation method based on BIM components, characterized in that: include, Obtaining user logs, extracting user historical feature information from the user logs and preprocessing the information to form a first user historical feature information set and a second user historical feature information set; Constructing a recall layer recommendation model training data set based on the preprocessed first user historical feature information set; The training data set of the recall layer recommendation model includes the user's historical click component set and historical download component set; Designing a recall layer recommendation model structure, and training the recall layer recommendation model through a recall layer recommendation model training data set to obtain a recall layer recommendation model, wherein the recall layer recommendation model includes an embedding layer designed based on an image encoder and a Q-Former structure, for extracting features from a user's historical click component set and a historical download component set, and outputting a historical click component vector and a historical download component vector; and a connection layer for performing feature connection and information fusion on the historical click component vectors and historical download component vectors of all components output by the embedding layer; A convolution layer for performing feature fusion and feature abstraction on the feature vector output by the connection layer; and an output layer for calculating the click or download probability of each component based on the feature vector output by the convolution layer, and outputting a preliminary screening of the candidate set of BIM components within the first preset ranking; Based on the preprocessed historical feature information set of the second user and the preliminary screening BIM component candidate set output by the recall layer recommendation model, a ranking layer recommendation model training data set is constructed; The training data set of the ranking layer recommendation model includes the user's historical click component set, historical download component set, candidate components, and the number of clicks and downloads of similar components; Designing a ranking layer recommendation model structure, training the ranking layer recommendation model based on a ranking layer recommendation model training data set to obtain a ranking layer recommendation model, wherein the ranking layer recommendation model includes an embedding layer designed based on an image encoder and a Q-Former structure, which is used to extract features from a user's historical click component set and a historical download component set, and output a historical click component vector and a historical download component vector; and a connection layer which is used to perform feature connection and information fusion on the feature vectors of the candidate components, the historical click component vectors and the historical download component vectors of all corresponding components output by the embedding layer, and the normalized vectors of the number of clicks and downloads of the same type of components; A convolution layer for performing feature fusion and feature abstraction on the feature vector output by the connection layer; and an output layer for calculating the feature vector output by the convolution layer to obtain the probability value of each component in the initial screening BIM component candidate set being clicked or downloaded by the user, and outputting the re-screening BIM component candidate set within a second preset ranking.
2. The intelligent recommendation method based on BIM components according to claim 1, characterized in that: The first user historical feature information set includes user ID, clicked component ID, click time, downloaded component ID and download time; The second user history feature information set includes user ID, clicked component ID, click time, downloaded component ID, download time and component category.
3. The intelligent recommendation method based on BIM components according to claim 2, characterized in that: The step of constructing a recall layer recommendation model training data set based on the preprocessed first user historical feature information set includes: The user's historical feature information is sorted and counted to obtain the components clicked or downloaded by each user each time, the user's current historical click component set, the historical download component set, and the number of clicks and downloads of similar components; For one of the user click or download data, the currently clicked or downloaded component is used as a label, and the user's historical click component set and historical download component set are used as input to construct a training data set. Then, for each user click or download data, a recall layer recommendation model training data set is constructed.
4. The intelligent recommendation method based on BIM components according to claim 2, characterized in that: The constructing of the sorting layer recommendation model training data set based on the preprocessed second user historical feature information set and the initial screening BIM component candidate set output by the recall layer recommendation model includes: The user's historical feature information is sorted and counted to obtain the components clicked or downloaded by each user each time, the user's current historical click component set, the historical download component set, and the number of clicks and downloads of similar components; For one of the user click or download data, whether the candidate component in the initial screening BIM component candidate set is the user's current click or download component is set as a label corresponding to 1 or -1. The user's historical click component set and historical download component set, the number of clicks and downloads of similar components, and random candidate components are used as input to construct a training data set, and then for each user click or download data, a ranking layer recommendation model training data set is constructed.
5. The intelligent recommendation method based on BIM components according to claim 1, characterized in that: The embedding layer includes an image encoder and a Q-Former structure. The image encoder includes a converter encoding unit. The converter encoding unit includes a normalization layer, a multi-head self-attention layer, a residual point addition layer, a normalization layer and a multi-layer perceptron layer, which is used to convert the input image data into a vector to capture the feature information of the image; the Q-Former structure includes a self-attention layer, a cross-attention layer and a feedforward layer, which are used to process text information and interact with the image information output by the image encoder in the cross-attention layer to achieve cross-modal interaction between text and image, and output a set of historical click component vectors and historical download component vectors corresponding to the user's historical click component set and historical download component set.
6. The intelligent recommendation method based on BIM components according to claim 1, characterized in that: In the recall layer recommendation model, the output layer adopts a softmax layer structure, which is used to calculate the feature vector output by the convolution layer and output multi-class classification probabilities. The calculation adopts the softmax function of the softmax layer, and the formula is: ; in, is the vector logical value of the ith category, Represents the total number of categories.
7. The intelligent recommendation method based on BIM components according to claim 1, characterized in that: In the ranking layer recommendation model, the output layer adopts a sigmoid layer structure, which is used to calculate the feature vector output by the convolution layer and output the binary classification probability, wherein the calculation is performed using the sigmoid function in the sigmoid layer, and the formula is: ; Where z represents the input recommendation value of the sigmoid function, and f(z) represents the output probability value.
8. An intelligent recommendation system based on BIM components, characterized in that: Used to execute the intelligent recommendation method based on BIM components according to any one of claims 1 to 7, include, Request acquisition module, used to obtain user recommendation request information; A user history feature acquisition module, which acquires user history feature information based on user logs, wherein the user history feature information includes user ID, clicked component ID, click time, downloaded component ID, download time and / or component category; The recall layer recommendation module calculates the user feature vector based on the acquired user historical feature information, calculates the probability value of each component being clicked or downloaded by the user, sorts them according to the size of the probability value, and outputs the preliminary screening BIM component candidate set within the first preset ranking; The sorting layer recommendation module calculates the probability value of each component in the preliminary screening BIM component candidate set being clicked or downloaded by the user based on the acquired user historical features and the preliminary screening BIM component candidate set output by the recall layer recommendation module, sorts them according to the size of the probability value, and outputs the re-screening BIM component candidate set within the second preset ranking.
Citation Information
Patent Citations
Mobile terminal BIM model intelligent caching method based on DeepFM recommendation algorithm
CN110442810A
BIM component recommendation method and device and electronic equipment
CN115048588A
