House resource recommendation method and device
By constructing context prompt words and inserting a low-rank matrix into the property recommendation model, the property recommendation model is optimized to adapt to data sparseness, and the problem of poor accuracy of property recommendation is solved and more efficient property recommendation is achieved.
Patent Information
- Application Number
- CN202411496083.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-28
AI Technical Summary
In the prior art, there is a problem that poor accuracy of housing recommendations due to data sparseness.
By obtaining the property data, constructing a context prompt word for it, and inserting a low-rank matrix into the weight matrix of the property recommendation model, taking the context prompt word as input, using the model to predict the corresponding content, calculate the loss value and optimize the model matrix to adapt to the property data. When receiving user queries, use the optimized model to determine the target listing and recommend it.
It improves the accuracy of housing supply recommendations and solves the problem of poor recommendation accuracy caused by data sparseness.
Smart Images

Figure CN119537434A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of house recommendation, and in particular to a house recommendation method and device. Background Art
[0002] In the real estate industry, the property recommendation system has become one of the key technologies for information filtering and personalized services. The recommendation system analyzes the user's historical behavior and preferences to provide users with personalized content recommendations to improve user experience and satisfaction. However, the data sparsity problem (not enough data) in the recommendation system has always been the main obstacle to its performance. Data sparsity can affect the accuracy and effectiveness of the recommendation algorithm. Summary of the invention
[0003] In view of this, embodiments of the present application provide a housing recommendation method, device, electronic device and computer-readable storage medium to solve the problem of poor accuracy of recommended housing due to data sparsity in the prior art.
[0004] In a first aspect of an embodiment of the present application, a method for recommending a house is provided, comprising: obtaining house data and constructing contextual prompt words for the house data; inserting a low-rank matrix into a weight matrix of a house recommendation model, taking the contextual prompt words as input of the house recommendation model, and using the house recommendation model to predict content corresponding to the contextual prompt words based on the house data; calculating a loss value based on the house data and the content corresponding to the contextual prompt words, and optimizing the low-rank matrix in the house recommendation model based on the loss value so that the house recommendation model adapts to the house data; upon receiving a query request from a user, determining a target house corresponding to the query request based on the house data using the house recommendation model, and recommending the target house to the user.
[0005] According to a second aspect of an embodiment of the present application, a housing recommendation device is provided, comprising: a construction module, configured to obtain housing data and construct context prompt words for the housing data; a prediction module, configured to insert a low-rank matrix into a weight matrix of a housing recommendation model, use the context prompt words as input of the housing recommendation model, and use the housing recommendation model to predict content corresponding to the context prompt words based on the housing data; an optimization module, configured to calculate a loss value based on the housing data and the content corresponding to the context prompt words, and optimize the low-rank matrix in the housing recommendation model according to the loss value so that the housing recommendation model adapts to the housing data; a determination module, configured to, when receiving a user's query request, use the housing recommendation model to determine a target housing corresponding to the query request based on the housing data, and recommend the target housing to the user.
[0006] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0007] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0008] Compared with the prior art, the embodiments of the present application have the following beneficial effects: obtaining housing data and constructing contextual prompt words for the housing data; inserting a low-rank matrix into the weight matrix of the housing recommendation model, taking the contextual prompt words as the input of the housing recommendation model, and using the housing recommendation model to predict the content corresponding to the contextual prompt words based on the housing data; calculating the loss value based on the housing data and the content corresponding to the contextual prompt words, and optimizing the low-rank matrix in the housing recommendation model based on the loss value, so that the housing recommendation model can adapt to the housing data; upon receiving a user's query request, using the housing recommendation model to determine the target housing corresponding to the query request based on the housing data, and recommending the target housing to the user. The above technical means can solve the problem of poor accuracy of recommended housing due to data sparsity in the prior art, thereby improving the accuracy of recommended housing. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0010] Figure 1 It is a flowchart of a housing recommendation method provided in an embodiment of the present application;
[0011] Figure 2 It is a flowchart of another housing source recommendation method provided in an embodiment of the present application;
[0012] Figure 3 It is a structural schematic diagram of a housing source recommendation device provided in an embodiment of the present application;
[0013] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0014] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0015] A housing recommendation method and device according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0016] Figure 1 It is a flowchart of a housing recommendation method provided in an embodiment of the present application. Figure 1 The housing resource recommendation method can be executed by a computer or a server, or software on the computer or the server. Figure 1 As shown, the house recommendation method includes:
[0017] S101, obtaining house data and constructing context prompt words for the house data;
[0018] S102, inserting a low-rank matrix into a weight matrix of a house recommendation model, taking the context prompt words as input of the house recommendation model, and using the house recommendation model to predict content corresponding to the context prompt words based on house data;
[0019] S103, calculating a loss value based on the house data and the content corresponding to the context prompt word, and optimizing the low-rank matrix in the house recommendation model according to the loss value, so that the house recommendation model is adapted to the house data;
[0020] S104, when receiving a query request from a user, determining a target property corresponding to the query request based on property data using a property recommendation model, and recommending the target property to the user.
[0021] There are multiple pieces of house data. Multiple context prompts can be constructed for each piece of house data, or one context prompt can be constructed for multiple pieces of house data. The house data set contains house identification number, location, area, price, number of rooms, number of bathrooms, construction year, etc. The context prompts of house data are questions about some information of house data. For example, a context prompt is "What is the area and number of rooms of houses with a price of 7 million yuan in a certain area?" The house recommendation model predicts the content corresponding to the context prompt based on the house data as "The area of houses with a price of 7 million yuan in this area is generally 120 square meters, and the number of rooms in the suite is 3-4." The house data is counted to obtain the actual values of the area and number of rooms of houses with a price of 7 million yuan in this area, and the loss value between the actual values of the area and number of rooms of houses with a price of 7 million yuan in this area and the predicted area of the house recommendation model as "The area of houses with a price of 7 million yuan in this area is generally 120 square meters, and the number of rooms in the suite is 3-4".
[0022] In order to speed up the training, the low-rank matrix in the house recommendation model can be optimized based on the loss value only, and the weight matrix of the house recommendation model is not optimized. The purpose is to make the house recommendation model adapt to the house data. Inserting the low-rank matrix into the weight matrix of the house recommendation model can be regarded as decomposing the weight matrix W into W+U*V T , where U and V are low-rank matrices and T is the transposed symbol. Since W has a large amount of data, while U and V have a small amount of data, the number of parameters that need to be optimized can be greatly reduced by training U and V instead of the entire W. The house recommendation model can be any commonly used large language model. The house recommendation model has multiple weight matrices, and low-rank matrices can be inserted into some or all of the weight matrices.
[0023] In fact, contextual prompt words are equivalent to questions. The above training is the process of adapting or learning the property data in the process of answering contextual prompt words. When receiving the user's query request, the property recommendation model determines the target property corresponding to the query request based on the property data and recommends the target property to the user. The target property is one or more properties in the property data.
[0024] According to the technical solution provided in the embodiment of the present application, the house source data is obtained, and context prompt words are constructed for the house source data; a low-rank matrix is inserted into the weight matrix of the house source recommendation model, and the context prompt words are used as the input of the house source recommendation model, and the house source recommendation model is used to predict the content corresponding to the context prompt words based on the house source data; the loss value is calculated based on the house source data and the content corresponding to the context prompt words, and the low-rank matrix in the house source recommendation model is optimized according to the loss value, so that the house source recommendation model can adapt to the house source data; when receiving the user's query request, the house source recommendation model is used to determine the target house source corresponding to the query request based on the house source data, and the target house source is recommended to the user. The above technical means can solve the problem of poor accuracy of recommended houses due to data sparsity in the prior art, thereby improving the accuracy of recommended houses.
[0025] Furthermore, constructing contextual prompt words for the property data includes: identifying missing values in the property data and representing the missing values with null value markers in the property data; and constructing contextual prompt words for the property data based on the null value markers in the property data.
[0026] For example, if a piece of property data is missing the price of a property with a target identification number, then a context prompt word "What is the price of the property with the target identification number?" is constructed for the property data. The property data may also be preprocessed, where the data preprocessing includes cleaning the data, such as removing duplicate records.
[0027] Furthermore, after inserting the low-rank matrix into the weight matrix of the housing recommendation model, the method also includes: marking a preset proportion of null value marks in the housing data to obtain labels of the preset proportion of null value marks; dividing the housing data into labeled first training data and unlabeled second training data; using the context prompt words corresponding to the first training data as the input of the housing recommendation model, and using the housing recommendation model to predict the content corresponding to the context prompt words corresponding to the first training data based on the first training data; calculating the loss value based on the label of the first training data and the content corresponding to the context prompt words corresponding to the first training data, and optimizing the low-rank matrix in the housing recommendation model based on the loss value to adapt the housing recommendation model to the housing data.
[0028] To further improve the training speed, only part of the housing data can be used to train the housing recommendation model. Specifically, the housing data is divided into first training data and second training data, and the empty value tags in the first training data are annotated to obtain labels of the empty value tags. The housing recommendation model is trained using the contextual prompt words corresponding to the first training data.
[0029] Furthermore, after optimizing the low-rank matrix in the housing recommendation model based on the loss value so that the housing recommendation model adapts to the housing data, the method also includes: taking the context prompt words corresponding to the second training data as the input of the housing recommendation model, and using the housing recommendation model to predict the content corresponding to the context prompt words corresponding to the second training data based on the second training data; performing data interpolation on the null value markers in the second training data based on the content corresponding to the context prompt words corresponding to the second training data to update the housing data; and using the housing recommendation model to determine the target housing corresponding to the query request based on the updated housing data, and recommending the target housing to the user.
[0030] Because the null value tags in the second training data are not marked, the information represented by the null value tags in the second training data is unknown. Also, because the housing recommendation model determines the target housing corresponding to the query request based on the housing data, if there are uncertain null value tags in the housing data, it will affect the accuracy of the recommendation of the housing recommendation model. Therefore, the housing recommendation model predicts the content corresponding to the context prompt words corresponding to the second training data based on the second training data, and replaces the null value tags in the second training data with the predicted content (data interpolation) to update the housing data.
[0031] Furthermore, after recommending the target property to the user, the method also includes: receiving feedback from the user, determining a reward value for the target property corresponding to the query request using a property recommendation model based on the feedback; and optimizing a low-rank matrix in the property recommendation model based on the reward value.
[0032] This embodiment uses a reinforcement learning method to further optimize the low-rank matrix in the housing recommendation model according to user feedback during the use of the housing recommendation model to improve the effect of the housing recommendation model. User feedback includes satisfaction, dissatisfaction, and neutrality, etc. The reward value is determined based on the feedback, the loss value is calculated based on the reward value, and the low-rank matrix in the housing recommendation model is optimized according to the loss value.
[0033] Figure 2 is a flowchart of another housing source recommendation method provided in an embodiment of the present application. Figure 2 As shown:
[0034] Execute the following loop:
[0035] S201, receiving feedback from users, and evaluating the performance of the housing recommendation model based on the feedback;
[0036] S202, if the evaluation result meets expectations, exit the loop;
[0037] S203, if the evaluation result does not meet expectations, reconstruct context prompt words for the house data;
[0038] S204, using the reconstructed context prompt word as an input of a housing recommendation model, and using the housing recommendation model to predict content corresponding to the reconstructed context prompt word based on housing data;
[0039] S205, calculating a loss value based on the housing data and the content corresponding to the reconstructed context prompt word, and optimizing the low-rank matrix in the housing recommendation model according to the loss value, so that the housing recommendation model is adapted to the housing data;
[0040] S206: upon receiving the query request, determining a target property based on the property data using a property recommendation model, and recommending the target property to the user.
[0041] The performance of the housing recommendation model is evaluated based on feedback. The housing recommendation model can be scored based on the feedback. When the score is greater than the preset score, the performance of the housing recommendation model is considered to be good and the loop is exited. When the score is less than or equal to the preset score, it is considered that the performance of the housing recommendation model needs to be further improved, and the housing recommendation model is further trained: specifically, the context prompt words are reconstructed for the housing data, and the housing recommendation model is trained using the reconstructed context prompt words and housing data. Subsequently, the housing recommendation model is continued to be used to determine the target housing based on the housing data, and the target housing is recommended to the user, and the user's feedback is received. The performance of the housing recommendation model is evaluated based on the feedback.
[0042] In an optional embodiment, after recommending the target property to the user, the method further includes: executing the following loop: receiving feedback from the user, and evaluating the performance of the property recommendation model based on the feedback; if the evaluation result meets expectations, exiting the loop; if the evaluation result does not meet expectations, inserting other low-rank matrices based on the low-rank matrices already inserted in the weight matrix of the property recommendation model; using contextual prompt words as input to the property recommendation model, and using the property recommendation model to predict the content corresponding to the contextual prompt words based on the property data; calculating a loss value based on the property data and the content corresponding to the contextual prompt words, and optimizing the low-rank matrix in the property recommendation model based on the loss value to adapt the property recommendation model to the property data; upon receiving a query request, using the property recommendation model to determine the target property based on the property data, and recommending the target property to the user.
[0043] The performance of the housing recommendation model is evaluated based on feedback. The housing recommendation model can be scored based on the feedback. When the score is greater than the preset score, the performance of the housing recommendation model is considered to be good and the loop is exited. When the score is less than or equal to the preset score, it is considered that the performance of the housing recommendation model needs to be further improved, and the housing recommendation model continues to be trained: specifically, on the basis of the low-rank matrix that has been inserted into the weight matrix of the housing recommendation model, more low-rank matrices are inserted, and the housing recommendation model is trained using contextual prompt words and housing data. Subsequently, the housing recommendation model is continued to be used to determine the target housing based on the housing data, and the target housing is recommended to the user, and the user's feedback is received. The performance of the housing recommendation model is evaluated based on the feedback.
[0044] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0045] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0046] Figure 3 Schematic diagram of a housing recommendation device provided in an embodiment of the present application. Figure 3 As shown, the house recommendation device includes:
[0047] The construction module 301 is configured to obtain house source data and construct context prompt words for the house source data;
[0048] The prediction module 302 is configured to insert a low-rank matrix into the weight matrix of the housing recommendation model, use the context prompt words as inputs of the housing recommendation model, and use the housing recommendation model to predict the content corresponding to the context prompt words based on the housing data;
[0049] The optimization module 303 is configured to calculate a loss value based on the house data and the content corresponding to the context prompt word, and optimize the low-rank matrix in the house recommendation model according to the loss value, so that the house recommendation model is adapted to the house data;
[0050] The determination module 304 is configured to, upon receiving a query request from a user, determine a target property corresponding to the query request based on the property data using a property recommendation model, and recommend the target property to the user.
[0051] According to the technical solution provided in the embodiment of the present application, the house source data is obtained, and context prompt words are constructed for the house source data; a low-rank matrix is inserted into the weight matrix of the house source recommendation model, and the context prompt words are used as the input of the house source recommendation model, and the house source recommendation model is used to predict the content corresponding to the context prompt words based on the house source data; the loss value is calculated based on the house source data and the content corresponding to the context prompt words, and the low-rank matrix in the house source recommendation model is optimized according to the loss value, so that the house source recommendation model can adapt to the house source data; when receiving the user's query request, the house source recommendation model is used to determine the target house source corresponding to the query request based on the house source data, and the target house source is recommended to the user. The above technical means can solve the problem of poor accuracy of recommended houses due to data sparsity in the prior art, thereby improving the accuracy of recommended houses.
[0052] In some embodiments, the construction module 301 is further configured to identify missing values in the property data, and to indicate the missing values with null value markers in the property data; and to construct contextual prompt words for the property data based on the null value markers in the property data.
[0053] For example, if a piece of property data is missing the price of a property with a target identification number, then a context prompt word "What is the price of the property with the target identification number?" is constructed for the property data. The property data may also be preprocessed, where the data preprocessing includes cleaning the data, such as removing duplicate records.
[0054] In some embodiments, the optimization module 303 is further configured to annotate a preset proportion of empty value marks in the housing data to obtain labels of the preset proportion of empty value marks; divide the housing data into labeled first training data and unlabeled second training data; use the context prompt words corresponding to the first training data as the input of the housing recommendation model, and use the housing recommendation model to predict the content corresponding to the context prompt words corresponding to the first training data based on the first training data; calculate the loss value based on the label of the first training data and the content corresponding to the context prompt words corresponding to the first training data, and optimize the low-rank matrix in the housing recommendation model based on the loss value to adapt the housing recommendation model to the housing data.
[0055] To further improve the training speed, only part of the housing data can be used to train the housing recommendation model. Specifically, the housing data is divided into first training data and second training data, and the empty value tags in the first training data are annotated to obtain labels of the empty value tags. The housing recommendation model is trained using the contextual prompt words corresponding to the first training data.
[0056] In some embodiments, the determination module 304 is further configured to use the context prompt words corresponding to the second training data as input of the housing recommendation model, and use the housing recommendation model to predict the content corresponding to the context prompt words corresponding to the second training data based on the second training data; perform data interpolation on the null value markers in the second training data based on the content corresponding to the context prompt words corresponding to the second training data to update the housing data; use the housing recommendation model to determine the target housing corresponding to the query request based on the updated housing data, and recommend the target housing to the user.
[0057] Because the null value tags in the second training data are not marked, the information represented by the null value tags in the second training data is unknown. Also, because the housing recommendation model determines the target housing corresponding to the query request based on the housing data, if there are uncertain null value tags in the housing data, it will affect the accuracy of the recommendation of the housing recommendation model. Therefore, the housing recommendation model predicts the content corresponding to the context prompt words corresponding to the second training data based on the second training data, and replaces the null value tags in the second training data with the predicted content (data interpolation) to update the housing data.
[0058] In some embodiments, the optimization module 303 is further configured to receive user feedback, determine a housing recommendation model based on the feedback, determine a reward value for a target housing source corresponding to the query request, and optimize a low-rank matrix in the housing recommendation model according to the reward value.
[0059] This embodiment uses a reinforcement learning method to further optimize the low-rank matrix in the housing recommendation model according to user feedback during the use of the housing recommendation model to improve the effect of the housing recommendation model. User feedback includes satisfaction, dissatisfaction, and neutrality, etc. The reward value is determined based on the feedback, the loss value is calculated based on the reward value, and the low-rank matrix in the housing recommendation model is optimized according to the loss value.
[0060] In some embodiments, the optimization module 303 is further configured to execute the following loop: receiving user feedback, and evaluating the performance of the housing recommendation model based on the feedback; if the evaluation result meets expectations, exiting the loop; if the evaluation result does not meet expectations, reconstructing contextual prompts for the housing data; using the reconstructed contextual prompts as input to the housing recommendation model, and using the housing recommendation model to predict the content corresponding to the reconstructed contextual prompts based on the housing data; calculating a loss value based on the housing data and the content corresponding to the reconstructed contextual prompts, and optimizing the low-rank matrix in the housing recommendation model based on the loss value to adapt the housing recommendation model to the housing data; upon receiving a query request, using the housing recommendation model to determine a target housing based on the housing data, and recommending the target housing to the user.
[0061] The performance of the housing recommendation model is evaluated based on feedback. The housing recommendation model can be scored based on the feedback. When the score is greater than the preset score, the performance of the housing recommendation model is considered to be good and the loop is exited. When the score is less than or equal to the preset score, it is considered that the performance of the housing recommendation model needs to be further improved, and the housing recommendation model is further trained: specifically, the context prompt words are reconstructed for the housing data, and the housing recommendation model is trained using the reconstructed context prompt words and housing data. Subsequently, the housing recommendation model is continued to be used to determine the target housing based on the housing data, and the target housing is recommended to the user, and the user's feedback is received. The performance of the housing recommendation model is evaluated based on the feedback.
[0062] In some embodiments, the optimization module 303 is also configured to execute the following loop: receive user feedback, and evaluate the performance of the housing recommendation model based on the feedback; if the evaluation result meets expectations, exit the loop; if the evaluation result does not meet expectations, insert other low-rank matrices based on the low-rank matrix already inserted in the weight matrix of the housing recommendation model; use contextual prompt words as input to the housing recommendation model, and use the housing recommendation model to predict the content corresponding to the contextual prompt words based on the housing data; calculate the loss value based on the housing data and the content corresponding to the contextual prompt words, and optimize the low-rank matrix in the housing recommendation model based on the loss value to adapt the housing recommendation model to the housing data; when a query request is received, use the housing recommendation model to determine the target housing based on the housing data, and recommend the target housing to the user.
[0063] The performance of the housing recommendation model is evaluated based on feedback. The housing recommendation model can be scored based on the feedback. When the score is greater than the preset score, the performance of the housing recommendation model is considered to be good and the loop is exited. When the score is less than or equal to the preset score, it is considered that the performance of the housing recommendation model needs to be further improved, and the housing recommendation model continues to be trained: specifically, on the basis of the low-rank matrix that has been inserted into the weight matrix of the housing recommendation model, more low-rank matrices are inserted, and the housing recommendation model is trained using contextual prompt words and housing data. Subsequently, the housing recommendation model is continued to be used to determine the target housing based on the housing data, and the target housing is recommended to the user, and the user's feedback is received. The performance of the housing recommendation model is evaluated based on the feedback.
[0064] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0065] Figure 4 Schematic diagram of an electronic device 4 provided in an embodiment of the present application. Figure 4As shown, the electronic device 4 of this embodiment includes: a processor 401, a memory 402, and a computer program 403 stored in the memory 402 and executable on the processor 401. When the processor 401 executes the computer program 403, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 401 executes the computer program 403, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0066] The electronic device 4 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 4 may include, but is not limited to, a processor 401 and a memory 402. Those skilled in the art will appreciate that Figure 4 The electronic device 4 is merely an example and does not limit the electronic device 4 , and may include more or less components than those shown in the figure, or different components.
[0067] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0068] The memory 402 may be an internal storage unit of the electronic device 4, for example, a hard disk or memory of the electronic device 4. The memory 402 may also be an external storage device of the electronic device 4, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 4. The memory 402 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 402 is used to store computer programs and other programs and data required by the electronic device.
[0069] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0070] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.
[0071] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A housing recommendation method, characterized in that: include: Acquire property data, and construct context prompt words for the property data; Inserting a low-rank matrix into a weight matrix of a house recommendation model, taking the context prompt word as an input of the house recommendation model, and using the house recommendation model to predict content corresponding to the context prompt word based on the house data; Calculating a loss value based on the housing data and the content corresponding to the context prompt word, and optimizing a low-rank matrix in the housing recommendation model according to the loss value, so that the housing recommendation model is adapted to the housing data; When a user's query request is received, the target house corresponding to the query request is determined based on the house data using the house recommendation model, and the target house is recommended to the user.
2. The method according to claim 1, characterized in that Constructing contextual prompt words for the house data, including: Identifying missing values in the property data and representing the missing values with null value markers in the property data; Based on the null value marker in the house source data, the context prompt word is constructed for the house source data.
3. The method according to claim 2, characterized in that After inserting the low-rank matrix into the weight matrix of the house recommendation model, the method further includes: Marking a preset proportion of empty value marks in the housing source data to obtain labels of the preset proportion of empty value marks; Dividing the housing data into first labeled training data and second unlabeled training data; Using the context prompt word corresponding to the first training data as input to the housing recommendation model, and using the housing recommendation model to predict the content corresponding to the context prompt word corresponding to the first training data based on the first training data; The loss value is calculated based on the label of the first training data and the content corresponding to the context prompt word corresponding to the first training data, and the low-rank matrix in the house recommendation model is optimized according to the loss value to adapt the house recommendation model to the house data.
4. The method according to claim 3, characterized in that After optimizing the low-rank matrix in the housing recommendation model according to the loss value so as to adapt the housing recommendation model to the housing data, the method further includes: using the context prompt word corresponding to the second training data as input to the housing recommendation model, and using the housing recommendation model to predict the content corresponding to the context prompt word corresponding to the second training data based on the second training data; Performing data interpolation on the null value tags in the second training data based on the content corresponding to the context prompt word corresponding to the second training data, so as to update the housing source data; The housing recommendation model is used to determine a target housing source corresponding to the query request based on the updated housing source data, and the target housing source is recommended to the user.
5. The method according to claim 1, characterized in that: After recommending the target house to the user, the method further includes: receiving feedback from the user, and determining the housing recommendation model based on the feedback to determine a reward value of a target housing corresponding to the query request; A low-rank matrix in the housing recommendation model is optimized according to the reward value.
6. The method according to claim 1, characterized in that After recommending the target house to the user, the method further includes: Execute the following loop: receiving feedback from the user, and evaluating the performance of the housing recommendation model based on the feedback; If the evaluation result is as expected, exit the loop; If the evaluation result does not meet expectations, reconstruct context prompt words for the property data; Using the reconstructed context prompt words as input to the housing recommendation model, and using the housing recommendation model to predict content corresponding to the reconstructed context prompt words based on the housing data; Calculating a loss value based on the house data and the content corresponding to the reconstructed context prompt word, and optimizing a low-rank matrix in the house recommendation model according to the loss value so as to adapt the house recommendation model to the house data; When the query request is received, the target house is determined based on the house data using the house recommendation model, and the target house is recommended to the user.
7. The method according to claim 1, characterized in that After recommending the target house to the user, the method further includes: Execute the following loop: receiving feedback from the user, and evaluating the performance of the housing recommendation model based on the feedback; If the evaluation result is as expected, exit the loop; If the evaluation result does not meet expectations, inserting another low-rank matrix based on the low-rank matrix already inserted into the weight matrix of the housing recommendation model; Using the context prompt word as an input of the housing recommendation model, and using the housing recommendation model to predict the content corresponding to the context prompt word based on the housing data; Calculating a loss value based on the housing data and the content corresponding to the context prompt word, and optimizing a low-rank matrix in the housing recommendation model according to the loss value, so that the housing recommendation model is adapted to the housing data; When the query request is received, the target house is determined based on the house data using the house recommendation model, and the target house is recommended to the user.
8. A housing source recommendation device, characterized in that: include: A construction module is configured to obtain house source data and construct context prompt words for the house source data; A prediction module is configured to insert a low-rank matrix into a weight matrix of a house recommendation model, use the context prompt word as an input of the house recommendation model, and use the house recommendation model to predict content corresponding to the context prompt word based on the house data; an optimization module, configured to calculate a loss value based on the housing data and the content corresponding to the context prompt word, and optimize a low-rank matrix in the housing recommendation model according to the loss value, so as to adapt the housing recommendation model to the housing data; The determination module is configured to, upon receiving a user's query request, determine a target property corresponding to the query request based on the property data using the property recommendation model, and recommend the target property to the user.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.