House price prediction method, electronic device, medium and program product
By obtaining and processing the target and reference housing information of the house, and using the attention mechanism to generate candidate price characteristics, the problem that the black box model prediction model in the existing technology cannot guarantee the proportion of price characteristics is solved, and the accuracy of house price prediction is improved.
Patent Information
- Application Number
- CN202411958076.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-05-13
AI Technical Summary
The existing house price prediction method uses a machine learning model with black box model, which cannot guarantee the proportion of price characteristics during prediction, resulting in inaccurate prediction prices.
By obtaining the target housing information of the house to be predicted and the reference housing information of multiple reference housings, vector conversion and mapping are performed, candidate price characteristics are generated using the attention mechanism, and the predicted price is finally determined.
It improves the accuracy of house price prediction, avoids the problem of the proportion of price characteristics in the black box model prediction model, and improves the use of attention mechanism in price prediction.
Smart Images

Figure CN119991226A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a method for predicting house prices, electronic equipment, medium and program product. Background Art
[0002] Predicting house prices can provide a reference for corresponding decisions such as house replacement and house price setting.
[0003] The current house price prediction method usually uses machine learning to learn the house's feature data and historical transaction data to obtain a prediction model, and then uses the learned prediction model to predict the house price. However, this black box prediction model cannot guarantee the proportion of price features in the prediction, resulting in inaccurate predicted house prices. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides a method for predicting house prices, an electronic device, a medium and a program product.
[0005] The present disclosure provides a method for predicting house prices, the method comprising:
[0006] In response to a trigger operation acting on a price prediction control, target house source information of a house to be predicted and reference house source information of a plurality of reference houses are obtained; wherein the reference house source information at least includes a historical transaction price of the reference house;
[0007] Perform vector conversion processing on the target property information and the reference property information respectively to generate a target property vector and each reference property vector;
[0008] Input the target property vector and each reference property vector into the linear transformation layer in the first attention module for vector mapping processing, so as to map the target property vector into a first query matrix, map the vector of non-price features in each reference property vector into a first key matrix, and map the vector of price features in each reference property vector into a first value matrix;
[0009] Inputting the first query matrix, the first key matrix, and the first value matrix into at least one first attention head in the first attention module for attention processing to generate a first candidate price feature; wherein the first candidate price feature represents a candidate price obtained from the historical transaction prices of each reference house based on the similarity between the house to be predicted and the reference house;
[0010] Based on the first candidate price feature, a predicted price of the house to be predicted is generated, and the target house source information and predicted price of the house to be predicted are displayed.
[0011] The embodiment of the present disclosure also provides a device for predicting house prices, the device comprising:
[0012] An acquisition module, for responding to a trigger operation on a price prediction control, to acquire target house source information of a house to be predicted and reference house source information of a plurality of reference houses; wherein the reference house source information at least includes a historical transaction price of the reference house;
[0013] A conversion module, used to perform vector conversion processing on the target house source information and the reference house source information respectively, to generate a target house source vector and each reference house source vector;
[0014] A mapping module, configured to input the target property vector and each reference property vector into the linear transformation layer in the first attention module for vector mapping processing, so as to map the target property vector into a first query matrix, map the vector of non-price features in each reference property vector into a first key matrix, and map the vector of price features in each reference property vector into a first value matrix;
[0015] an attention module, configured to input the first query matrix, the first key matrix, and the first value matrix into at least one first attention head in the first attention module for attention processing, and generate a first candidate price feature; wherein the first candidate price feature represents a candidate price obtained from historical transaction prices of each reference house based on the similarity between the house to be predicted and the reference house;
[0016] The generation module is used to generate a predicted price of the house to be predicted based on the first candidate price feature, and display the target house source information and predicted price of the house to be predicted.
[0017] The present disclosure also provides an electronic device, the electronic device comprising:
[0018] Processor and memory;
[0019] The processor is used to execute the housing price prediction method described in any embodiment of the present disclosure by calling the program or instruction stored in the memory.
[0020] The embodiments of the present disclosure further provide a computer-readable storage medium, wherein the computer-readable storage medium stores a program or an instruction, wherein the program or the instruction enables a computer to execute the method for predicting house prices described in any embodiment of the present disclosure.
[0021] The embodiments of the present disclosure also provide a computer program product, which is used to execute the housing price prediction method described in any embodiment of the present disclosure.
[0022] The prediction method, electronic device, medium and program product of the house price provided by the embodiment of the present disclosure firstly performs vector conversion processing on the target house source information of the house to be predicted and the reference house source information including the historical transaction price of the reference house, generates the target house source vector and each reference house source vector, and inputs the target house source vector and each reference house source vector into the linear transformation layer in the first attention module for vector mapping processing, so as to map the target house source vector into the first query matrix, map the vector of the non-price feature in each reference house source vector into the first key matrix, and map the vector of the price feature in each reference house source vector into the first value matrix. Then, the first query matrix, the first key matrix and the first value matrix are input into at least one first attention head in the first attention module for attention processing, and generate the first candidate price feature. Among them, the first candidate price feature represents the candidate price obtained from the historical transaction price of each reference house based on the similarity between the house to be predicted and the reference house. Finally, based on the first candidate price feature, the predicted price of the house to be predicted is generated, and the target house source information and the predicted price of the house to be predicted are displayed. In this way, on the one hand, the first query matrix, the first key matrix and the first value matrix can be used to extract explicit features of the target house source information and the reference house source information, and then these explicit features are used to generate the first candidate price features based on the similarity between the house to be predicted and the reference house and the historical transaction prices of each reference house, and finally the predicted price of the house to be predicted is determined according to the first candidate price features, avoiding the problem that the price feature cannot be guaranteed to account for the proportion when predicting the price when using the prediction model of the black box mode, and improving the accuracy of predicting the house price. On the other hand, the attention mechanism can also be used to generate the first candidate price features according to the similarity between the house to be predicted and the reference house and the historical transaction prices of each reference house, and finally the predicted price of the house to be predicted is determined according to the first candidate price features, instead of the current use of the attention mechanism to only use the target house source information of the house to be predicted itself for price prediction, which improves the use of the attention mechanism in price prediction and further improves the accuracy of predicting the house price. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0025] Figure 1One of the flow charts of the method for predicting house prices provided in the embodiment of the present disclosure;
[0026] Figure 2 A schematic diagram of the structure of a first attention module provided in an embodiment of the present disclosure;
[0027] Figure 3 A second flow chart of a method for predicting house prices provided in an embodiment of the present disclosure;
[0028] Figure 4 A schematic diagram of the structure of a second attention module provided in an embodiment of the present disclosure;
[0029] Figure 5 The third flowchart of the method for predicting house prices provided by the embodiment of the present disclosure;
[0030] Figure 6 A fourth flowchart of a method for predicting house prices provided in an embodiment of the present disclosure;
[0031] Figure 7 A fifth flow chart of a method for predicting house prices provided in an embodiment of the present disclosure;
[0032] Figure 8 A schematic diagram of the structure of a housing price prediction device provided by an embodiment of the present disclosure;
[0033] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0034] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described in detail below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0035] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0036] House price prediction is an important task in the real estate industry, which involves evaluating the market value of real estate. There are generally two traditional ways to predict house prices. One is to manually predict house prices by comparing the prices of similar properties to the house to be predicted, or to manually estimate house prices based on the rental income of the house to be predicted and the capitalization rate (the rate of return brought by the house) of the house to be predicted. The other is to use machine learning to learn the characteristic data and historical transaction data of the house to obtain a prediction model, and then use the learned prediction model to predict the house price.
[0037] It can be seen that the first prediction method is to manually predict the price, which is overly dependent on the experience of the appraiser, lacks quantitative standards, is highly subjective, and cannot guarantee accuracy and prediction efficiency. The second prediction method is a black box model prediction model, which cannot guarantee the proportion of price features in the prediction, and will also lead to inaccurate predicted house prices.
[0038] In view of the above problems, an embodiment of the present disclosure provides a method for predicting house prices, comprising: responding to a trigger operation acting on a price prediction control, obtaining target house source information of a house to be predicted, and reference house source information of multiple reference houses; wherein the reference house source information at least includes the historical transaction price of the reference house; performing vector conversion processing on the target house source information and the reference house source information respectively to generate a target house source vector and each reference house source vector; inputting the target house source vector and each reference house source vector into a linear transformation layer in a first attention module for vector mapping processing, so as to map the target house source vector into a first query matrix and map each reference house source vector into a linear transformation layer in a first attention module; The vector of non-price features in the house source vector is mapped to the first key matrix, and the vector of price features in each reference house source vector is mapped to the first value matrix; the first query matrix, the first key matrix and the first value matrix are input into at least one first attention head in the first attention module for attention processing to generate a first candidate price feature; wherein the first candidate price feature represents the candidate price obtained from the historical transaction price of each reference house based on the similarity between the house to be predicted and the reference house; based on the first candidate price feature, the predicted price of the house to be predicted is generated, and the target house source information and the predicted price of the house to be predicted are displayed. In this way, on the one hand, the predicted price of the house to be predicted can be automatically predicted by using the attention mechanism according to the target house source information and the reference house source information, avoiding the problem that the method of artificially predicting prices is overly dependent on the experience of the appraiser, lacks quantitative standards, and has great subjectivity, thereby improving the accuracy of the predicted price and ensuring the prediction efficiency. On the other hand, the predicted price of the house to be predicted can be determined based on the display characteristics of the target house information and the reference house information, the similarity between the house to be predicted and the reference house, and the historical transaction prices of each reference house, avoiding the problem of not being able to guarantee the proportion of price features in the prediction when using the black box model prediction model to predict prices, and improving the accuracy of the predicted house price. At the same time, the use of the attention mechanism in price prediction has been improved, and the price prediction is no longer based solely on the target house information of the house to be predicted, further improving the accuracy of the predicted house price.
[0039] The house price prediction method provided by the embodiment of the present disclosure is mainly applicable to reference house source information of known historical transaction prices of reference houses and target house source information of houses to be predicted, so as to determine the prediction scenario of the house price of the houses to be predicted.
[0040] The house price prediction method provided in the embodiments of the present disclosure can be executed by a house price prediction device, which can be implemented by software and / or hardware, and can be integrated into an electronic device with a house price prediction function, such as a mobile phone, a PDA, a tablet computer, a laptop computer or a desktop computer.
[0041] Figure 1is a flow chart of a housing price prediction method provided by an embodiment of the present disclosure. Figure 1 , the house price prediction method specifically includes:
[0042] S110, in response to a trigger operation acting on a price prediction control, obtaining target house source information of a house to be predicted and reference house source information of a plurality of reference houses.
[0043] The target house source information includes at least the basic features and price features of the house to be predicted. For example, the basic features may include the geographical location (such as the city, community, building, floor, longitude and latitude, etc.), area, apartment structure, whether it is finely decorated, etc.; the price features may include the average price of the house in the community, the average price in the city, the listing price, etc. In addition to the basic features and price features of the reference house, the reference house source information also includes the historical transaction price of the reference house. The price prediction control can be an interface component used to implement the house price prediction function in clients such as applications (Application, APP), web pages, mini-programs, and public accounts.
[0044] Specifically, the house price prediction device responds to the trigger operation acting on the price prediction control, and can directly obtain the target house source information of the house to be predicted and the reference house source information of multiple reference houses input by the user; it can also crawl the target house source information of the house to be predicted and the reference house source information of multiple reference houses from the Internet website according to the information input by the user.
[0045] In some embodiments, in response to a trigger operation on a price prediction control, the target house source information of the house to be predicted is obtained by periodically obtaining the target house source information of the house to be predicted in response to a trigger operation on the price prediction control. The timing duration may be preset, for example, a default value, or a value set by a relevant person according to actual conditions.
[0046] In the above scheme, the house information of different houses can be used as the target house information of the house to be predicted for price prediction at regular intervals, that is, the prices of multiple different houses to be predicted can be automatically predicted, thereby improving the efficiency of house price prediction.
[0047] In some embodiments, in response to a trigger operation on a price prediction control, the target house source information of the house to be predicted is obtained by displaying a house source information entry page in response to a trigger operation on the price prediction control; and in response to an interactive operation on the house source information entry page, the entered house source information is determined as the target house source information of the house to be predicted. The house source information entry page may be a new page presented independently, or a page presented in a pop-up window, such as a prompt box, a dialog box, a modal window, etc.
[0048] Specifically, the house price prediction device responds to the interactive operation on the house information entry page and determines the entered house information as the target house information of the house to be predicted. The method may be to determine the house information manually entered by the user in real time as the target house information of the house to be predicted; or to select the house information of a house from the house information pre-entered into the database or the local library and determine it as the target house information of the house to be predicted.
[0049] In the above scheme, an interactive page (i.e., a house information entry page) can be provided for the user, so that the user can freely set or select the house to be predicted, thereby improving the flexibility of house price prediction.
[0050] In some embodiments, the way in which the house price prediction device obtains reference housing information of multiple reference houses can also be based on the geographical location of the house to be predicted, the reference average price corresponding to the house to be predicted, a preset price range and a statistical time window, to screen each reference house from multiple historically sold houses and determine the reference housing information of the corresponding reference house.
[0051] Among them, the reference average price corresponding to the house to be predicted can be the average price of houses in the community where the house to be predicted is located; the preset price range can be a price range preset according to the reference average price corresponding to the house to be predicted, for example, when the reference average price is 30,000, the preset price range can be set to 20,000-50,000; the statistical time window is a preset time window, for example, the statistical time window is 2 years.
[0052] Specifically, first, from multiple historically sold houses, determine the houses that are geographically close to the house to be predicted (that is, the distance between the house to be predicted and the geographical location is less than the distance threshold), have smaller price fluctuations than the reference average price (that is, the upper and lower floating values are less than the average price threshold), have prices within a preset price range, and have transaction times within the statistical time window as reference houses, and determine the reference housing information of the corresponding reference houses.
[0053] In the above scheme, houses that are geographically close to the house to be predicted, whose prices fluctuate less than the reference average price, whose prices are within the preset price range, and whose transaction times are within the statistical time window can be selected as reference houses, so that the statistically determined reference houses are as consistent as possible with the house to be predicted in terms of location and price, thereby ensuring the accuracy of the subsequent predicted price of the house to be predicted based on the reference housing information of the reference houses.
[0054] S120 , respectively perform vector conversion processing on the target property information and the reference property information to generate a target property vector and reference property vectors.
[0055] Specifically, the target property information and the reference property information are subjected to vector conversion processing to generate the target property vector and each reference property vector by directly using a semantic vectorization algorithm to perform vector conversion processing on the target property information and the reference property information to generate the target property vector and each reference property vector, for example, a co-occurrence matrix algorithm, a dictionary matching algorithm, etc.
[0056] In some embodiments, an embedding layer is used as a structure that can convert high-dimensional sparse features (such as geographic location, house structure, price) into a low-dimensional dense vector space. Therefore, the target house information and the reference house information are vector-converted to generate the target house vector and each reference house vector, and the target house information and each reference house information are input into the embedding layer to generate the target house vector and each reference house vector.
[0057] S130. Input the target property vector and each reference property vector into the linear transformation layer in the first attention module for vector mapping processing, so as to map the target property vector into a first query matrix, map the vector of non-price features in each reference property vector into a first key matrix, and map the vector of price features in each reference property vector into a first value matrix.
[0058] Among them, the linear transformation layer includes three independent learnable weight matrices (W Q , W K , W V ), the input vector can be mapped into the query matrix (Q), key matrix (K) and value matrix (V) through these three independent learnable weight matrices.
[0059] Therefore, the prediction device of the house price can use the weight matrix W in the linear transformation layer of the first attention module Q Map the target property vector to the first query matrix (the formula is Q = XW Q , X is the target listing vector); using the weight matrix W in the linear transformation layer of the first attention module K Map the vectors of non-price features in each reference property vector into the first key matrix (the formula is K = YW K , Y is the vector of non-price features in the reference house vector); using the weight matrix W in the linear transformation layer of the first attention module V Map the price feature vectors in each reference property vector into the first value matrix (the formula is V = ZW V , Z is the vector of price features in the reference housing vector).
[0060] In some embodiments, Figure 2FIG. 1 is a schematic diagram of a structure of a first attention module provided in an embodiment of the present disclosure. Figure 2 As shown in A or B, the first attention module 10 may include a linear transformation layer 11 for performing vector mapping processing on the vector input into the first attention module 10.
[0061] In some embodiments, the local vectors corresponding to the basic features of the house in the target house vector and the local vectors corresponding to the basic features of the house in each reference house vector are input into the linear transformation layer in the first attention module for vector mapping processing, so as to map the local vectors in the target house vector into a first query matrix, map the vectors of non-price features of the local vectors in each reference house vector into a first key matrix, and map the vectors of price features of the local vectors in each reference house vector into a first value matrix.
[0062] The basic house feature includes at least one feature representing the house structure, the house price and the house location. The local vector corresponding to the basic house feature is a vector corresponding to at least one feature representing the house structure, the house price and the house location.
[0063] In the above scheme, the predicted price of the house to be predicted can be predicted based on the local vector corresponding to the basic features of the house in the target house source vector and the local vector corresponding to the basic features of the house in each reference house source vector, thereby saving computing resources.
[0064] S140. Input the first query matrix, the first key matrix, and the first value matrix into at least one first attention head in the first attention module for attention processing to generate a first candidate price feature.
[0065] Among them, the first candidate price feature represents the candidate price obtained from the historical transaction price of each reference house based on the similarity between the house to be predicted and the reference house. Each attention head includes a weighted matrix corresponding to the query matrix (Q), a weighted matrix corresponding to the key matrix (K), and a weighted matrix corresponding to the value matrix (V). When receiving the input, the attention head can weight the query matrix (Q), the key matrix (K), and the value matrix (V) according to each weighted matrix, and calculate the correlation strength between the house to be predicted and each reference house according to the weighted query matrix (Q) and the key matrix (K), and convert it into an attention weight, and then use the attention weight to perform a weighted summation on the value matrix (V) to obtain the attention calculation result.
[0066] Specifically, the first candidate price feature can be calculated according to the following formula:
[0067]
[0068] Where A is used to represent the first candidate price feature, Q is used to represent the weighted first query matrix, K is used to represent the weighted first key matrix, V is used to represent the weighted first value matrix, and d k Used to represent the number of columns of Q and K after weighting.
[0069] In some embodiments, Figure 2 As shown in A or B in FIG, the first attention module 10 may include at least one first attention head 12 for performing attention processing on the matrix input to the first attention module 10. It should be noted that when there are multiple first attention heads 12, each first attention head 12 needs to perform attention processing on the input first query matrix, first key matrix and first value matrix to generate the first candidate price feature.
[0070] S150: Generate a predicted price of the house to be predicted based on the first candidate price feature, and display target house source information and predicted price of the house to be predicted.
[0071] First, based on the first candidate price feature, a predicted price of the house to be predicted is generated.
[0072] Specifically, when the first attention module includes one first attention head, the first candidate price feature determined by the first attention head is determined as the predicted price of the house to be predicted; when the first attention module includes multiple first attention heads, the multiple first candidate price features determined by the multiple first attention heads are fused to generate the predicted price of the house to be predicted.
[0073] The method of fusing the multiple first candidate price features may be to use statistical methods, fusion algorithms, etc. For example, the statistical method may be to determine the mean (such as weighted average, direct mean, extreme value average, etc.), median, etc. of the multiple first candidate price features as the predicted price of the house to be predicted; the fusion algorithm may be a cluster analysis algorithm, a weighted logistic regression algorithm, etc.
[0074] Secondly, the target property information and predicted price of the house to be predicted are displayed.
[0075] Specifically, the target house information and predicted price of the house to be predicted can be displayed in a table, a map combined with a mark, a card, a dynamic sliding view, etc. according to the actual use scenario. For example, when the scene is displayed to the customer on the mobile phone, the display method can be a map combined with a mark or a dynamic sliding view; when the scene is a price statistics scene, it can be displayed in a table or card.
[0076] The above technical solution of the embodiment of the present disclosure first performs vector conversion processing on the target house source information of the house to be predicted and the reference house source information including the historical transaction price of the reference house, generates the target house source vector and each reference house source vector, and inputs the target house source vector and each reference house source vector into the linear transformation layer in the first attention module for vector mapping processing, so as to map the target house source vector into the first query matrix, map the vector of non-price features in each reference house source vector into the first key matrix, and map the vector of price features in each reference house source vector into the first value matrix. Then, the first query matrix, the first key matrix and the first value matrix are input into at least one first attention head in the first attention module for attention processing to generate the first candidate price feature. Among them, the first candidate price feature represents the candidate price obtained from the historical transaction price of each reference house based on the similarity between the house to be predicted and the reference house. Finally, based on the first candidate price feature, the predicted price of the house to be predicted is generated, and the target house source information and predicted price of the house to be predicted are displayed. In this way, on the one hand, the first query matrix, the first key matrix and the first value matrix can be used to extract explicit features of the target house source information and the reference house source information, and then these explicit features are used to generate the first candidate price features based on the similarity between the house to be predicted and the reference house and the historical transaction prices of each reference house, and finally the predicted price of the house to be predicted is determined according to the first candidate price features, avoiding the problem that the price feature cannot be guaranteed to account for the proportion when predicting the price when using the prediction model of the black box mode, and improving the accuracy of predicting the house price. On the other hand, the attention mechanism can also be used to generate the first candidate price features according to the similarity between the house to be predicted and the reference house and the historical transaction prices of each reference house, and finally the predicted price of the house to be predicted is determined according to the first candidate price features, instead of the current use of the attention mechanism to only use the target house source information of the house to be predicted itself for price prediction, which improves the use of the attention mechanism in price prediction and further improves the accuracy of predicting the house price.
[0077] Figure 3 is a flow chart of another housing price prediction method provided by an embodiment of the present disclosure. It optimizes step S150. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Figure 3 , the prediction method of the house price includes:
[0078] S210, in response to a trigger operation acting on a price prediction control, obtaining target house source information of a house to be predicted and reference house source information of a plurality of reference houses.
[0079] Among them, the reference housing information at least includes the historical transaction price of the reference house.
[0080] S220, performing vector conversion processing on the target house source information and the reference house source information respectively to generate a target house source vector and each reference house source vector;
[0081] S230, input the target property vector and each reference property vector into the linear transformation layer in the first attention module for vector mapping processing, so as to map the target property vector into a first query matrix, map the vector of non-price features in each reference property vector into a first key matrix, and map the vector of price features in each reference property vector into a first value matrix.
[0082] S240: Input the first query matrix, the first key matrix and the first value matrix into at least one first attention head in the first attention module for attention processing to generate a first candidate price feature.
[0083] The first candidate price feature represents a candidate price obtained from the historical transaction prices of the reference houses based on the similarity between the house to be predicted and the reference houses.
[0084] S231. Input the target property vector and each reference property vector into the linear transformation layer in the second attention module for vector mapping processing, so as to generate a second query matrix, a second key matrix and a second value matrix based on the self-attention mechanism.
[0085] Specifically, unlike the attention mechanism which focuses on the vector mapping relationship between two different inputs (target house vector and each reference house vector), the self-attention mechanism focuses more on the relationship between different features of the same set of inputs. Therefore, the house price prediction device can use the weight matrix in the linear transformation layer of the second attention module to perform vector mapping processing on the target house vector and each reference house vector, and obtain the second query matrix, second key matrix and second value matrix corresponding to the target house vector, and the second query matrix, second key matrix and second value matrix corresponding to each reference house vector.
[0086] Similar to step S130, the prediction device for house prices can use the weight matrix in the linear transformation layer of the second attention module according to the formula: Q = XW Q , K = XW K 、V=XW V Map the target property vector or the reference property vector into a second query matrix, a second key matrix, and a second value matrix. Where X is the target property vector or the reference property vector, W Q is the learnable weight matrix corresponding to the query matrix Q, W K is the learnable weight matrix corresponding to the key matrix K, W V is the learnable weight matrix corresponding to the value matrix V.
[0087] In some embodiments, Figure 4 FIG. 1 is a schematic diagram of a second attention module provided in an embodiment of the present disclosure. Figure 4 As shown, the second attention module 20 may include a linear transformation layer 21 for performing vector mapping processing on the vector input into the second attention module 20.
[0088] S241. Input the second query matrix, the second key matrix and the second value matrix into multiple second attention heads in the second attention module for attention processing to generate second candidate price features.
[0089] Specifically, the second query matrix, the second key matrix and the second value matrix are input into multiple second attention heads in the second attention module for attention processing. The method of generating the second candidate price features is the same as the method of generating the first candidate price features in step S140, which will not be repeated here.
[0090] In some embodiments, Figure 4 As shown, the second attention module 20 may include multiple second attention heads 22 for performing attention processing on the matrix input into the second attention module 20.
[0091] S251. Fuse the first candidate price feature and the second candidate price feature to generate a predicted price.
[0092] Specifically, the way of fusing the first candidate price feature and the second candidate price feature may be the same as the way of fusing the first candidate price feature when the first attention module includes multiple first attention heads in step S150.
[0093] The first candidate price feature and the second candidate price feature are fused to generate a predicted price. Alternatively, the first candidate price feature and the second candidate price feature are first concatenated, and the concatenated result is input into a fully connected layer for feature fusion to generate a predicted price for the house to be predicted.
[0094] Among them, the way of splicing the first candidate price feature and the second candidate price feature can be to simply splice the first candidate price feature and the second candidate price feature, for example, the first candidate price feature is P1, the second candidate price feature is P2, and the feature vector after splicing is: Concatenated Feature = [P1, P2]; it can also be weighted splicing of the first candidate price feature and the second candidate price feature, for example, the feature vector after splicing is: ConcatenatedFeature = [a1*P1, a2*P2], where a1 is the weight of the first candidate price feature P1, and a2 is the weight of the second candidate price feature P2; it can also be difference splicing, normalized splicing, etc.
[0095] The fully connected layer is pre-trained and can perform weighted processing and nonlinear transformation on the splicing results to generate a predicted price. Specifically, the splicing result is input into the fully connected layer, which performs weighted summation of the splicing result and the weight matrix, and then adds the bias to obtain the weighted summation result. The weighted summation result is then transformed nonlinearly through an activation function (such as ReLU, Sigmoid, Tanh, etc.) to generate the predicted price of the house to be predicted.
[0096] S252: Display the target house source information and predicted price of the house to be predicted.
[0097] It should be noted that the execution order of S230 - S240 and S231 - S241 is not limited here, and S231 - S241 may be executed before S230 - S240, or S231 - S241 may be executed in parallel with S230 - S240.
[0098] The above technical solution of the disclosed embodiment can use the mutual attention mechanism to determine the first candidate price feature between the target house source information of the house to be predicted and the reference house source information of each reference house, use the self-attention mechanism to determine the second candidate price feature corresponding to the target house source information itself or the reference house source information itself, and then fuse the first candidate price feature and the second candidate price feature to obtain the predicted price of the house to be predicted. That is to say, when predicting the house price, the disclosed embodiment no longer only uses the target house source information of the house to be predicted itself for price prediction, but uses the mutual attention mechanism, the self-attention mechanism, and the fusion mechanism to combine the target house source information of the house to be predicted and the reference house source information of each reference house for prediction, so that the predicted house price is more accurate.
[0099] Figure 5 is a flowchart of another housing price prediction method provided by an embodiment of the present disclosure. It optimizes step S140 and step S150. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Figure 5 , the prediction method of the house price includes:
[0100] S310, in response to a trigger operation acting on a price prediction control, obtaining target house source information of a house to be predicted and reference house source information of a plurality of reference houses.
[0101] Among them, the reference housing information at least includes the historical transaction price of the reference house.
[0102] S320, respectively perform vector conversion processing on the target property information and the reference property information to generate a target property vector and reference property vectors.
[0103] S330, input the target property vector and each reference property vector into the linear transformation layer in the first attention module for vector mapping processing, so as to map the target property vector into a first query matrix, map the vector of non-price features in each reference property vector into a first key matrix, and map the vector of price features in each reference property vector into a first value matrix.
[0104] S341. Input the first query matrix, the first key matrix and the first value matrix into the multiple first attention heads in the first attention module for attention processing respectively to generate multiple first candidate price features.
[0105] The number of first candidate price features is the same as the number of first attention heads. The structure of each first attention head is the same, but the weighting matrices of the corresponding query matrix (Q), key matrix (K), and value matrix (V) are all different.
[0106] Specifically, when each first attention head receives the first query matrix, the first key matrix and the first value matrix, it first weights the first query matrix, the first key matrix and the first value matrix according to its own corresponding weighting matrix to obtain the weighted first query matrix, the first key matrix and the first value matrix, and then calculates its own corresponding first candidate price feature according to the formula in step S140.
[0107] S351. Perform fusion processing on the first candidate price features to generate a predicted price.
[0108] Specifically, the manner of fusing the first candidate price features may be the same as the manner of fusing the first candidate price features and the second candidate price features in step S251.
[0109] The method of fusing the first candidate price features to generate the predicted price may also be to input the first candidate price features into a multilayer perceptron (MLP) network layer for feature fusion to generate the predicted price of the house to be predicted.
[0110] Among them, the MLP network layer is pre-trained, including the input layer, hidden layer and output layer. The hidden layer performs weighted summation and transformation on the input features through a nonlinear activation function to obtain the predicted price of the house to be predicted.
[0111] S352: Display the target house source information and predicted price of the house to be predicted.
[0112] The above technical solution of the disclosed embodiment can use multiple first attention heads to perform attention processing on the first query matrix, the first key matrix and the first value matrix, generate multiple first candidate price features, and then fuse the multiple first candidate price features to generate the predicted price of the house to be predicted. In this way, different representation subspaces of the input matrix can be learned simultaneously through multiple independent attention heads, so as to capture more house information, enhance the expression ability of the model, enable the model to pay attention to different house features, and further improve the accuracy of determining the house price. At the same time, splitting the feature space and parallel computing can effectively reduce the computational bottleneck of the model.
[0113] Figure 6 2 is a flowchart of another housing price prediction method provided by the embodiment of the present disclosure. It optimizes step S240 and step S251. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Figure 6 , the prediction method of the house price includes:
[0114] S410, in response to a trigger operation acting on a price prediction control, obtaining target house source information of a house to be predicted and reference house source information of a plurality of reference houses.
[0115] Among them, the reference housing information at least includes the historical transaction price of the reference house.
[0116] S420, performing vector conversion processing on the target house source information and the reference house source information respectively to generate a target house source vector and each reference house source vector;
[0117] S430, input the target property vector and each reference property vector into the linear transformation layer in the first attention module for vector mapping processing, so as to map the target property vector into a first query matrix, map the vector of non-price features in each reference property vector into a first key matrix, and map the vector of price features in each reference property vector into a first value matrix.
[0118] S442. Input the first query matrix, the first key matrix and the first value matrix into the multiple first attention heads in the first attention module for attention processing to generate multiple first candidate price features.
[0119] Among them, the number of the first candidate price features is consistent with the number of the first attention heads.
[0120] The detailed description of this step can be found in step S341 and will not be repeated here.
[0121] S431. Input the target property vector and each reference property vector into the linear transformation layer in the second attention module for vector mapping processing, so as to generate a second query matrix, a second key matrix and a second value matrix based on the self-attention mechanism.
[0122] The detailed description of this step can be found in step S231 and will not be repeated here.
[0123] S441. Input the second query matrix, the second key matrix and the second value matrix into multiple second attention heads in the second attention module for attention processing to generate second candidate price features.
[0124] The detailed description of this step can be found in step S241 and will not be repeated here.
[0125] S451: Fuse multiple first candidate price features and second candidate price features to generate a predicted price.
[0126] The method of fusing the plurality of first candidate price features and the second candidate price features to generate a predicted price is the same as step S251 or step S351.
[0127] S452: Display the target house source information and predicted price of the house to be predicted.
[0128] The above-mentioned technical scheme of the disclosed embodiment no longer only uses the target housing information of the house to be predicted to make price predictions when predicting house prices, but uses the mutual attention mechanism, self-attention mechanism, and fusion mechanism to combine the target housing information of the house to be predicted and the reference housing information of each reference house for prediction, so that the predicted house price is more accurate.
[0129] Figure 7 1 is a flowchart of another housing price prediction method provided by the embodiment of the present disclosure. It optimizes step S140. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Figure 7 , the prediction method of the house price includes:
[0130] S510, in response to a trigger operation acting on a price prediction control, obtaining target house source information of a house to be predicted and reference house source information of a plurality of reference houses.
[0131] Among them, the reference housing information at least includes the historical transaction price of the reference house.
[0132] S520: Perform vector conversion processing on the target property information and the reference property information respectively to generate a target property vector and reference property vectors.
[0133] S530, input the target property vector and each reference property vector into the linear transformation layer in the first attention module for vector mapping processing, so as to map the target property vector into a first query matrix, map the vector of non-price features in each reference property vector into a first key matrix, and map the vector of price features in each reference property vector into a first value matrix.
[0134] S541. Perform vector dot product processing based on the first query matrix and the first key matrix to determine an initial similarity matrix between the house to be predicted and each reference house.
[0135] Specifically, the initial similarity matrix can be expressed as C = Query * Key T , where C is used to represent the initial similarity matrix, Query is used to represent the first query matrix, and Key is used to represent the first key matrix.
[0136] S542: Based on the time decay weight of each reference house, correct the initial similarity matrix to determine a corrected similarity matrix.
[0137] Specifically, based on the time decay weight of each reference house, the initial similarity matrix is corrected, and the corrected similarity matrix can be determined by weighting the initial similarities of the corresponding reference houses using the time decay weight of each reference house to obtain the corrected similarity matrix.
[0138] Among them, the time decay weight represents the importance of the historical transaction price of the reference house changing over time.
[0139] In some embodiments, the time decay weight is determined based on the current time, the transaction time of the reference house, and the length of time corresponding to the statistical time window.
[0140] Specifically, the time decay weight of the reference house may be determined according to the following formula.
[0141]
[0142] Among them, Weight is used to indicate the time attenuation weight of the reference house, T is used to indicate the duration corresponding to the statistical time window, and time is used to indicate the transaction time of the reference house (that is, the interval between the transaction of the reference house and the current time, and the unit is consistent with T).
[0143] S543 , scaling the corrected similarity matrix based on the scaling factor corresponding to the first key matrix, and normalizing the scaling result to generate a target similarity matrix.
[0144] The elements in the target similarity matrix are attention scores, which represent the similarity between the predicted house and the corresponding reference house. The normalization processing method can be to use a normalization function for normalization processing, for example, a softmax function, a sigmoid function, a logistic function, etc.
[0145] S544. Perform vector dot product processing based on the target similarity matrix and the first value matrix to generate a first candidate price feature.
[0146] In some embodiments, the first query matrix, the first key matrix, and the first value matrix are input into at least one first attention head in the first attention module for attention processing to generate the first candidate price feature. The first candidate price feature can be determined according to the following formula:
[0147]
[0148] Among them, Attention is used to represent the first candidate price feature, Query is used to represent the first query matrix, Key is used to represent the first key matrix, and Weight is used to represent the time decay weight of the reference house. Used to represent the scaling factor, d k It is used to indicate the number of columns of the first key matrix, and Value is used to indicate the first value matrix.
[0149] S550: Generate a predicted price of the house to be predicted based on the first candidate price feature, and display the target house source information and predicted price of the house to be predicted.
[0150] The above-mentioned technical scheme of the disclosed embodiment can use the time decay weights that characterize the importance of the historical transaction prices of the reference houses changing over time to correct the similarity matrix when determining the first candidate price features, thereby avoiding the interference of the reference house information of the reference houses with long transaction intervals in the prediction of the house prices to be predicted, and further improving the accuracy of the predicted house prices.
[0151] Figure 8 The structure diagram of a house price prediction device provided by the embodiment of the present disclosure is shown in FIG. Figure 8 As shown, the house price prediction device includes:
[0152] The acquisition module 71 is used to respond to the trigger operation acting on the price prediction control, and acquire the target house source information of the house to be predicted, and the reference house source information of multiple reference houses; wherein the reference house source information at least includes the historical transaction price of the reference house;
[0153] The conversion module 72 is used to perform vector conversion processing on the target house source information and the reference house source information respectively to generate a target house source vector and each reference house source vector;
[0154] A mapping module 73, configured to input the target property vector and each reference property vector into the linear transformation layer in the first attention module for vector mapping processing, so as to map the target property vector into a first query matrix, map the vector of non-price features in each reference property vector into a first key matrix, and map the vector of price features in each reference property vector into a first value matrix;
[0155] The attention module 74 is used to input the first query matrix, the first key matrix and the first value matrix into at least one first attention head in the first attention module for attention processing to generate a first candidate price feature; wherein the first candidate price feature represents a candidate price obtained from the historical transaction prices of each reference house based on the similarity between the house to be predicted and the reference house;
[0156] The generating module 75 is used to generate the predicted price of the house to be predicted based on the first candidate price feature, and display the target house source information and the predicted price of the house to be predicted.
[0157] A prediction device for house prices provided by the embodiment of the present disclosure can, on the one hand, perform explicit feature extraction of the first query matrix, the first key matrix and the first value matrix on the target house source information and the reference house source information, and then use these explicit features based on the similarity between the house to be predicted and the reference house and the historical transaction price of each reference house to generate the first candidate price feature, and finally determine the predicted price of the house to be predicted according to the first candidate price feature, avoiding the problem that the price feature cannot be guaranteed to account for the prediction when the prediction model of the black box mode is used to predict the price, and improves the accuracy of predicting the house price. On the other hand, it is also possible to use the attention mechanism to generate the first candidate price feature according to the similarity between the house to be predicted and the reference house and the historical transaction price of each reference house, and finally determine the predicted price of the house to be predicted according to the first candidate price feature, instead of only being able to use the target house source information of the house to be predicted itself for price prediction when the attention mechanism is currently used, thereby improving the method of using the attention mechanism in price prediction and further improving the accuracy of predicting the house price.
[0158] In some embodiments, the mapping module 73 is further configured to, after performing vector conversion processing on the target property information and the reference property information to generate the target property vector and each reference property vector, input the target property vector and each reference property vector into the linear transformation layer in the second attention module for vector mapping processing, so as to generate a second query matrix, a second key matrix and a second value matrix based on the self-attention mechanism;
[0159] The attention module 74 is further used to input the second query matrix, the second key matrix and the second value matrix into the multiple second attention heads in the second attention module for attention processing to generate second candidate price features;
[0160] The generating module 75 is specifically used to fuse the first candidate price feature and the second candidate price feature to generate a predicted price.
[0161] In some embodiments, the attention module 74 is specifically used to input the first query matrix, the first key matrix and the first value matrix into a plurality of first attention heads in the first attention module for attention processing, to generate a plurality of first candidate price features; wherein the number of the first candidate price features is consistent with the number of the first attention heads;
[0162] The generating module 75 is specifically used to fuse the features of the first candidate prices to generate a predicted price.
[0163] In some embodiments, as shown in Question 8, the attention module 74 includes a dot product submodule, a correction submodule, and a scaling submodule;
[0164] A dot product submodule, configured to perform vector dot product processing based on the first query matrix and the first key matrix to determine an initial similarity matrix between the house to be predicted and each reference house;
[0165] A correction submodule, for correcting the initial similarity matrix based on the time decay weight of each reference house, and determining a corrected similarity matrix; wherein the time decay weight represents the importance of the historical transaction price of the reference house changing over time;
[0166] A scaling submodule is used to scale the correction similarity matrix based on the scaling factor corresponding to the first key matrix, and normalize the scaling result to generate a target similarity matrix; wherein the elements in the target similarity matrix are attention scores, and the attention scores represent the similarity between the house to be predicted and the corresponding reference house;
[0167] The dot product submodule is further used to perform vector dot product processing based on the target similarity matrix and the first value matrix to generate a first candidate price feature.
[0168] In some embodiments, the time decay weight is determined based on the current time, the transaction time of the reference house, and the length of time corresponding to the statistical time window.
[0169] In some embodiments, the mapping module 73 is specifically used to input the local vectors corresponding to the basic features of the house in the target house source vector and the local vectors corresponding to the basic features of the house in each reference house source vector into the linear transformation layer in the first attention module for vector mapping processing, so as to map the local vectors in the target house source vector into a first query matrix, map the vectors of non-price features of the local vectors in each reference house source vector into a first key matrix, and map the vectors of price features of the local vectors in each reference house source vector into a first value matrix; wherein the basic features of the house include features characterizing at least one of the house structure, house price and house location.
[0170] In some embodiments, the acquisition module 71 is specifically used to screen each reference house from multiple historically sold houses based on the geographical location of the house to be predicted, the reference average price corresponding to the house to be predicted, the preset price range and the statistical time window, and determine the reference housing information of the corresponding reference house.
[0171] In some embodiments, the acquisition module 71 is specifically used to:
[0172] In response to the trigger operation acting on the price prediction control, the target house source information of the house to be predicted is obtained at a regular interval;
[0173] or,
[0174] In response to the triggering operation on the price prediction control, a page for inputting house information is displayed;
[0175] In response to an interactive operation on a housing source information entry page, the entered housing source information is determined as target housing source information of the house to be predicted.
[0176] The house price prediction device provided in the embodiments of the present disclosure can execute the house price prediction method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0177] It is worth noting that in the embodiment of the above-mentioned house price prediction device, the various units, modules and sub-modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units / modules / sub-modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present disclosure.
[0178] Fig. 9 The structure diagram of an electronic device provided by the embodiment of the present disclosure is shown in FIG. Fig. 9As shown, the electronic device 400 includes a processor 401, a memory 402, an input device 403 and an output device 404, and these components are interconnected through a bus system and / or other forms of connection mechanisms (not shown). The number of the processor 401 and the memory 402 can be one or more, Fig. 9 In the figure, a processor 401 and a memory 402 are taken as an example.
[0179] The processor 401 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 400 to perform desired functions.
[0180] The memory 402 may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. In some embodiments, the memory 402 may further include a memory remotely arranged relative to the processor 401, and these remote memories may be connected to the electronic device 400 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. One or more computer programs or instructions may be stored in the above-mentioned memory 402, and the processor 401 may run these programs or instructions to implement the prediction method of the house price described in any embodiment of the present disclosure and / or other desired functions. Various contents such as target house source information, reference house source information, etc. may also be stored in the above-mentioned memory 402.
[0181] The input device 403 may include, for example, a keyboard, a mouse, etc. The output device 404 may output various information to the outside, including the determined candidate prices, the predicted prices, etc. The output device 404 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, etc.
[0182] Understandably, for simplicity, Fig. 9 Only some of the components related to the present disclosure in the electronic device 400 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 400 may also include any other appropriate components.
[0183] In addition to the above methods and devices, the prediction method of house prices in any embodiment of the present disclosure can also be implemented as a computer software program. For example, the present disclosure embodiment also includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a memory. When the computer program is executed by a processor, the processor executes the prediction method of house prices provided in any embodiment of the present disclosure.
[0184] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0185] In addition, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, enables the processor to execute the method for predicting house prices provided by an embodiment of the present disclosure.
[0186] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0187] It should be noted that the terms used in the present disclosure are only for describing specific embodiments, rather than limiting the scope of the present application. As shown in the present disclosure specification and claims, unless the context clearly indicates an exception, the words "one", "a", "a kind of" and / or "the" do not specifically refer to the singular, but may also include the plural. The term "and / or" includes any and all combinations of one or more related listed items. Relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method or device. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method or device including the elements.
[0188] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for predicting house prices, characterized in that: include: In response to a trigger operation acting on a price prediction control, target house source information of a house to be predicted and reference house source information of a plurality of reference houses are obtained; wherein the reference house source information at least includes a historical transaction price of the reference house; Performing vector conversion processing on the target property information and the reference property information respectively to generate a target property vector and reference property vectors; Inputting the target property vector and each of the reference property vectors into a linear transformation layer in a first attention module for vector mapping processing, so as to map the target property vector into a first query matrix, map the vector of non-price features in each of the reference property vectors into a first key matrix, and map the vector of price features in each of the reference property vectors into a first value matrix; Inputting the first query matrix, the first key matrix, and the first value matrix into at least one first attention head in the first attention module for attention processing to generate a first candidate price feature; wherein the first candidate price feature represents a candidate price obtained from the historical transaction prices of each of the reference houses based on the similarity between the house to be predicted and the reference house; Based on the first candidate price feature, a predicted price of the house to be predicted is generated, and the target house source information and the predicted price of the house to be predicted are displayed.
2. The method according to claim 1, characterized in that After respectively performing vector conversion processing on the target property information and the reference property information to generate a target property vector and reference property vectors, the method further includes: Input the target property vector and each of the reference property vectors into the linear transformation layer in the second attention module for vector mapping processing, so as to generate a second query matrix, a second key matrix, and a second value matrix based on a self-attention mechanism; Inputting the second query matrix, the second key matrix and the second value matrix into a plurality of second attention heads in the second attention module for attention processing to generate second candidate price features; The step of generating a predicted price of the house to be predicted based on the first candidate price feature includes: The first candidate price feature and the second candidate price feature are fused to generate the predicted price.
3. The method according to claim 1 or 2, characterized in that: The step of inputting the first query matrix, the first key matrix, and the first value matrix into at least one first attention head in the first attention module for attention processing to generate a first candidate price feature includes: Inputting the first query matrix, the first key matrix, and the first value matrix into a plurality of first attention heads in the first attention module for attention processing respectively to generate a plurality of first candidate price features; wherein the number of the first candidate price features is consistent with the number of the first attention heads; The step of generating a predicted price of the house to be predicted based on the first candidate price feature includes: The first candidate price features are fused to generate the predicted price.
4. The method according to claim 1, characterized in that: The first attention head performs attention processing on the first query matrix, the first key matrix, and the first value matrix to generate a first candidate price feature in the following manner: Performing vector dot product processing based on the first query matrix and the first key matrix to determine an initial similarity matrix between the house to be predicted and each of the reference houses; Based on the time decay weight of each of the reference houses, the initial similarity matrix is corrected to determine a corrected similarity matrix; wherein the time decay weight represents the importance of the historical transaction price of the reference house changing over time; Scaling the corrected similarity matrix based on the scaling factor corresponding to the first key matrix, and normalizing the scaling result to generate a target similarity matrix; wherein the elements in the target similarity matrix are attention scores, and the attention scores represent the similarity between the house to be predicted and the corresponding reference house; The first candidate price feature is generated by performing vector dot product processing based on the target similarity matrix and the first value matrix.
5. The method according to claim 4, characterized in that The time decay weight is determined based on the current time, the transaction time of the reference house and the duration corresponding to the statistical time window.
6. The method according to claim 1, characterized in that Inputting the target property vector and each of the reference property vectors into a linear transformation layer in a first attention module for vector mapping processing, so as to map the target property vector into a first query matrix, map the vector of non-price features in each of the reference property vectors into a first key matrix, and map the vector of price features in each of the reference property vectors into a first value matrix, comprises: The local vectors corresponding to the basic features of the house in the target house source vector and the local vectors corresponding to the basic features of the house in each of the reference house source vectors are input into the linear transformation layer in the first attention module for vector mapping processing, so as to map the local vectors in the target house source vector to the first query matrix, map the vectors of non-price features of the local vectors in each of the reference house source vectors to the first key matrix, and map the vectors of price features of the local vectors in each of the reference house source vectors to the first value matrix; wherein the basic features of the house include features characterizing at least one of the house structure, the house price and the house location.
7. The method according to claim 1, characterized in that Get reference property information for multiple reference properties, including: Based on the geographical location of the house to be predicted, the reference average price corresponding to the house to be predicted, the preset price range and the statistical time window, each of the reference houses is screened from multiple historically sold houses, and the reference housing information of the corresponding reference house is determined.
8. The method according to claim 1, characterized in that The response acts on the trigger operation of the price prediction control to obtain the target house source information of the house to be predicted, including: In response to a trigger operation acting on the price prediction control, target house source information of the house to be predicted is obtained at a regular interval; Alternatively, the response acts on the trigger operation of the price prediction control to obtain the target house source information of the house to be predicted, including: In response to a trigger operation on the price prediction control, a page for inputting house information is displayed; In response to an interactive operation on the housing source information entry page, the entered housing source information is determined as target housing source information of the house to be predicted.
9. An electronic device, characterized in that: The electronic device comprises: Processor and memory; The processor is used to execute the house price prediction method according to any one of claims 1 to 8 by calling the program or instruction stored in the memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program or an instruction, and the program or the instruction enables a computer to execute the method for predicting house prices according to any one of claims 1 to 8.
11. A computer program product, characterized in that The computer program product is used to implement the method for predicting house prices as claimed in any one of claims 1 to 8.
Citation Information
Cited By
Yield prediction method and device for produced product, storage medium and program product
CN121212427A