Dynamic clustering method based on house resource and behavior data and house information service system
Through dynamic clustering methods, the housing and user behavior data are adjusted in real time, which solves the problem of lagging recommendation results in the real estate information service system, and realizes real-time personalized housing recommendations.
Patent Information
- Application Number
- CN202510574557.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-07-15
- Filing Date
- 2025-05-06
- Publication Date
- 2025-08-01
AI Technical Summary
The existing real estate information service system is difficult to respond to changes in housing supply and demand and user interests in real time, resulting in lagging recommendation results and insufficient matching.
The dynamic clustering method based on housing source and behavior data is adopted, and the real-time clustering results are updated dynamically by collecting and storing housing source data and user behavior data in real time, and combining multimodal feature fusion and adaptive neighborhood density to realize real-time adjustment of housing source clusters.
It improves the real-time and personalized level of housing recommendations, can respond to market trends and changes in user interests in a timely manner, and improves the timeliness and accuracy of recommendation results.
Smart Images

Figure CN120408249A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of real estate information data processing, and particularly relates to a dynamic clustering method based on housing source and behavior data and a housing information service system. Background Art
[0002] Real estate information service platforms play an important role in meeting residents' housing needs and providing market information. However, with the continuous update of housing source data and the rapid change of user preferences, traditional housing information service systems have gradually exposed the problem of lagging response.
[0003] Existing platforms generally adopt clustering algorithms such as k-Means or fixed-rule classification methods for static housing source recommendations, which are difficult to reflect the changes in housing supply and demand in a timely manner, resulting in lagging recommendation results and insufficient matching degrees. At the same time, mainstream recommendation methods mainly rely on offline modeling of historical behavior data and lack the ability to adapt to current user behaviors in real time, making it difficult to achieve dynamic and personalized recommendations. Therefore, a dynamic recommendation method with adaptive capabilities is needed to improve the real-time performance of recommendations and the accuracy of housing source matching. Summary of the Invention
[0004] The purpose of the present invention is to overcome the above deficiencies of the prior art and provide a dynamic clustering method based on housing source and behavior data and a housing information service system. By introducing an adaptive dynamic clustering mechanism, the system can update the clustering results according to the real-time changes of housing source data and user behaviors, thereby significantly improving the real-time performance and accuracy of housing source recommendations and better meeting the personalized retrieval needs of users.
[0005] To achieve the above purpose, the technical solution adopted by the present invention is as follows: including the following steps:
[0006] Step S1: Real-time collection and storage of housing source data. Housing source data including housing source text descriptions, housing pictures, and geographical location coordinates are obtained in real time through personnel or data interfaces of real estate platforms. After cleaning and structuring the housing source data, it is stored in the background database.
[0007] Step S2: Real-time acquisition of user behavior data. The browsing, clicking, favoriting, retrieving, and other operation behaviors of users in the housing information service system are recorded to form behavior log data reflecting user interest preferences, and the behavior data is associated with the corresponding housing sources and stored in the database.
[0008] Step S3: Extraction and fusion of housing source features. For each housing source data, a text feature vector, an image feature vector, and a geographical location vector are extracted, and the feature vectors of multiple modalities are combined into a unified housing source feature vector by means of weighted fusion.
[0009] Step S4: Dynamic clustering analysis. Input the set of housing source feature vectors and user behavior data into the dynamic clustering algorithm proposed by the present invention, calculate the similarity and local density values between housing sources in real time, and automatically trigger local splitting or merging of housing source clusters according to the addition, removal, information modification of housing sources and the local density changes caused by users' real-time browsing, clicking, and favorite behaviors, dynamically update the cluster structure, and obtain the housing source category division result that reflects the housing source update and user interest changes in real time;
[0010] Step S5: Recommendation result generation. Extract the corresponding query feature vector according to the query request submitted by the user, calculate the similarity between the query vector and the cluster centers in the housing source category division result, screen housing sources from one or more clusters most relevant to the user's query, and provide accurate and real-time recommendation services for the user's housing source query request.
[0011] Furthermore, the similarity measurement of the dynamic clustering algorithm adopts a comprehensive distance function including multiple difference components, and calculates the following contents for any two housing source data points:
[0012] Calculate the difference d in attributes and content of housing sources attr , including comparing the differences in attributes and content such as location, area, price, house type, text description, and image features, and weighted summing these difference values according to certain weights to obtain d attr ;
[0013] Calculate the difference d in user behavior of housing sources beh , and quantify the difference in the user behavior trajectories between housing sources according to the co-occurrence frequency and time interval of user browsing behaviors;
[0014] Obtain the time difference Δt of housing sources, assign a time decay weight according to the time interval between the release or update of two housing sources, and the greater the time interval, the lower the similarity contribution of the two housing sources;
[0015] Weightedly sum the above-mentioned attribute and content difference d attr , user behavior difference d beh and time difference Δt according to the preset weight coefficients to obtain the comprehensive distance measure d(i, j) between two housing sources,
[0016] (3)
[0017] where ω is the weight coefficient and λ is the time decay factor, which is used to control the contributions of user behavior and time to the housing source similarity.
[0018] Furthermore, the dynamic clustering algorithm determines the initial cluster structure through adaptive neighborhood density, including the following steps:
[0019] Step S1: Determine the neighborhood range N(i) of each housing source data point. The neighborhood is defined by setting the distance between each data point and its k-th nearest neighbor as the neighborhood radius r, so that the size of the neighborhood changes adaptively according to the distribution of housing sources in the dataset. i , so that the neighborhood size changes adaptively according to the distribution of housing sources in the dataset;
[0020] Step S2: Calculate the local density ρ of each housing source data point. The local density is the sum of the contributions of all neighbors within the neighborhood N(i) according to the distance attenuation function and the activity weights of the neighbors themselves. The weight of a neighbor is jointly determined by its most recent active time and the number of user interactions, such that housing source neighbors that are recently active and have frequent interactions contribute more to the density ρ of the target point. i , where the weight of a neighbor is jointly determined by its most recent active time and the number of user interactions, such that housing source neighbors that are recently active and have frequent interactions contribute more to the density ρ of the target point. i Contribute more;
[0021] Step S3: Determine the initial cluster structure based on the local density ρ of the housing source point and the minimum distance δ between this point and points with higher density. Select housing source data points with higher density and larger δ as the initial cluster centers, and assign the remaining housing source data points to the cluster where the nearest high-density neighbor is located. i And the minimum distance δ between this point and points with higher density i Determine the initial cluster structure, select housing source data points with higher density and larger δ i As the initial cluster centers, and assign the remaining housing source data points to the cluster where the nearest high-density neighbor is located.
[0022] Furthermore, the clustering structure dynamic update mechanism of the dynamic clustering algorithm includes the following situations:
[0023] (1) When new housing source data is added, calculate the density ρ of the new data point and the minimum distance δ(new) to points with higher density than it. If ρ new Is higher than the existing points within its neighborhood and δ(new) is greater than the preset threshold, then take this new data point as a new cluster center to generate a new cluster; otherwise, assign it to the cluster where the nearest neighbor with higher density is located, and update the density values of relevant data points within its neighborhood. new Is higher than the existing points within its neighborhood and δ(new) is greater than the preset threshold, then take this new data point as a new cluster center to generate a new cluster; otherwise, assign it to the cluster where the nearest neighbor with higher density is located, and update the density values of relevant data points within its neighborhood.
[0024] (2) When housing source data is taken off the shelf or becomes invalid, reduce its weight to zero and remove it from the neighbor density calculation. If this data point happens to be a cluster center, then reselect the housing source point with the highest density within this cluster as the new cluster center; if there is no obvious candidate point, temporarily mark this cluster as a "small cluster" and wait for new housing sources to be added later to recalculate the density to form a new cluster.
[0025] (3) The dynamic clustering algorithm monitors changes in user behavior in each cluster during operation. When it detects that the average user activity in a certain housing source cluster significantly increases by more than the preset threshold of 15% in the short term, trigger a structural adjustment of this cluster, and divide the housing source cluster into at least two new sub-clusters to refine and distinguish newly emerging user interest categories; when the long-term activity of a certain housing source cluster is lower than the set threshold, gradually reduce the overall density of this cluster and mark this cluster as a niche and unique interest category.
[0026] Furthermore, the method for real-time updating of user behavior data and housing resource feature data in the database specifically includes:
[0027] (1) Real-time monitoring of housing resource data change events, including housing resource addition, removal, or key attribute modification events, and updating these changes incrementally to the database;
[0028] (2) Real-time capturing of user behavior data such as browsing, clicking, or favoriting on the platform, associating the user behavior data with the corresponding housing resource records, and updating them to the database in real-time;
[0029] (3) Providing the housing resource feature data and user behavior data after the above real-time incremental update to the dynamic clustering module to achieve real-time dynamic adjustment of housing resource categories.
[0030] A system for a housing information service data processing method, the system includes a front end and a back end:
[0031] The front end includes a user login module, a housing resource query module, a housing resource display module, and a popular real estate project module, which are used to provide user account management, retrieval interaction, and information display functions;
[0032] The back end includes a data management module, a dynamic clustering module, and a back-end database. Among them, the dynamic clustering module uses the above-mentioned dynamic clustering method to perform clustering analysis on housing resource data and dynamically adjust the cluster structure, and perform housing resource query and recommendation based on dynamic clustering.
[0033] Furthermore, the housing resource query module and the popular real estate project module implement housing resource recommendation and display based on the dynamic clustering module:
[0034] (1) After receiving a user query request, the housing resource query module matches the most relevant housing resource category corresponding to the user query condition from the housing resource category division results currently generated by the dynamic clustering module in real-time, and preferentially displays the housing resources in the matched category to the user;
[0035] (2) The popular real estate project module real-time monitors the user attention indicators of each housing resource category output by the dynamic clustering module. When it detects that the attention of a certain housing resource category is significantly higher than other categories within a set time window, it automatically marks this category as a popular real estate project category and recommends it to the user in real-time.
[0036] Compared with the prior art, the present invention has the following beneficial effects:
[0037] 1. Dynamic Clustering Responds to Changes in User Interests in Real Time: The dynamic clustering algorithm proposed by the present invention can adjust the clustering structure in real time according to changes in housing source data and user behavior, achieving continuous evolution and optimization of the clustering results. Compared with traditional clustering methods such as k-Means that require periodic retraining and cannot reflect real-time changes, the present invention improves the response speed of recommendation results to market dynamics and changes in user interests through real-time update of local density and adaptive adjustment of cluster structure. For example, when a certain type of housing source suddenly receives user attention, the system can automatically identify and subdivide the corresponding new cluster; when a new housing source is added or an old housing source is taken off the shelf, the local relevant clusters can also be updated immediately without global recalculation. This dynamic adjustment ability ensures that the recommendation results always match the current user demand trend, greatly improving the timeliness and personalization of housing source recommendations.
[0038] 2. Similarity of Housing Sources Integrating Multiple Differences: The present invention innovatively proposes a comprehensive similarity calculation method that integrates differences in multi-modal attributes of housing sources, user behavior differences, and housing source timeliness differences. In the specific implementation process, the contributions of housing source basic attributes (geographical location, price, area, housing type, etc.), user interaction behaviors (correlation degree of browsing and click sequences), and housing source release time to similarity are calculated respectively, and dynamic weights are fused. This similarity definition method is significantly different from traditional methods that rely solely on physical distance or static attributes, better conforms to the actual interest preferences of users, and significantly improves the rationality and interpretability of housing source clustering results. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a schematic diagram of the overall architecture of the housing information service system of the present invention;
[0040] Figure 2 is a technical roadmap of the dynamic clustering based on housing source data and user behavior of the present invention DETAILED DESCRIPTION OF THE EMBODIMENTS
[0041] The following further describes the housing information service system and data processing method of the present invention in conjunction with the drawings and embodiments. It should be understood that the embodiments described herein are only used to illustrate the technical solutions of the present invention and do not limit the scope of the present invention. In different embodiments, the technical solutions of the present invention can be appropriately adjusted according to actual needs, and its core idea is centered around the application of the dynamic clustering algorithm to optimize and improve the housing source information retrieval and recommendation services.
[0042] According to Figure 1 and Figure 2 shown, the present invention is specifically implemented through the following technical solutions:
[0043] System Architecture: The housing information service system of the present invention includes two major parts: the front-end and the back-end. The front-end includes a user login module, a housing source query module, a housing source display module, a popular property development module, etc., which are used to provide user account management, retrieval interaction, and information display functions. The back-end includes a data management module (such as housing source data maintenance, user management, statistical analysis, etc.), a dynamic clustering module, and a back-end database, etc., which are used to support data processing and business logic. Among them, the back-end database stores structured housing source information and user behavior data, providing data support for clustering analysis and query. By reasonably dividing the front-end and back-end functional modules, the integrity and scalability of the platform are ensured, and the dynamic clustering module is the core innovative module of the present invention.
[0044] Feature Extraction and Fusion of Housing Source Data: In the data processing process of the back-end, the multi-source heterogeneous data of housing source data is first preprocessed and feature-fused. The system obtains various modal data from the housing source information collected or input by the platform, such as text descriptions, housing source photos, and geographical location information, etc. The semantic feature vector of the housing source description text is extracted through natural language processing technology, the image feature vector of the housing source picture is extracted through computer vision technology, and the longitude and latitude of the housing source are used as the geographical location feature vector. Then, the feature vectors of different modalities are normalized, and the features such as text, image, and location are weighted and fused according to the set weights to generate a unified housing source feature representation vector. The feature extraction and fusion of the housing source data, as the data preparation step for dynamic clustering analysis, ensure the comprehensive representation of the housing source data and provide a basis for subsequent clustering processing.
[0045] Dynamic Clustering Algorithm: After obtaining the above housing source feature vectors and related data, the dynamic clustering module performs clustering analysis on the housing source data and dynamically adjusts the clustering results according to the update of the housing source data and the real-time changes of user behavior. Different from the conventional method (such as the k-Means algorithm) that only performs a one-time static division, the present invention adopts a dynamic clustering mechanism based on adaptive density, and its main features include:
[0046] 1. Similarity Measurement: The present invention proposes a housing source similarity that fuses multiple differences. For any two housing source data, the similarity can be represented by the comprehensive difference distance d(i, j), that is, the smaller the distance, the more similar the two housing sources are, and vice versa, the larger the distance, the less similar the two housing sources are. Specifically, the distance d(i, j) is composed of multiple difference components weighted, including three aspects: attribute and content difference, user behavior difference, and time difference.
[0047] (1) Attribute and Content Difference d attr: Measure the differences between the basic attributes of two housing listings (such as geographical location, area, price, housing type, etc.) and unstructured content (such as housing listing description text, picture features, etc.). For geographical location, use the Haversine formula to calculate the actual geographical distance between the longitudes and latitudes of the two housing listings; for numerical attributes such as area and price, calculate the difference between the two attribute values and perform normalization; for text differences, use text vectorization models (such as TF-IDF, BERT) to convert the description text into vectors, and then use methods such as cosine similarity or Euclidean distance to calculate the differences between the two texts; for picture features, extract the feature vectors of the pictures through a pre-trained convolutional neural network (CNN), and then use methods such as cosine similarity to calculate the differences between the picture feature vectors. The difference values obtained through these calculation methods can be weighted and aggregated according to certain weights to obtain the difference measure d of the housing listing attributes and content attr ,
[0048] (1)
[0049] where d k (i, j) is the difference value of the k-th attribute; the weight coefficient α k adjusts the importance of different attributes in the similarity calculation. For rare or important attributes and content, higher weights can be assigned to amplify the impact of such differences.
[0050] (2) User behavior difference d beh : Measure the differences between housing listings at the user behavior level. Specifically, when multiple users view two housing listings continuously within a very short period of time, it is considered that these two housing listings are highly relevant in terms of user interest. The user behavior difference d beh is defined as follows::
[0051] (2)
[0052] where Users(i, j) represents the number of users who view housing listings i and j simultaneously within the same time window. If there are more users viewing these two housing listings within the same time period, it indicates that these two housing listings are highly relevant in terms of user interest dimensions. TimeInterval(i, j) refers to the time difference between them. If a user views housing listing j immediately after viewing housing listing i within a certain time window, it is considered that the behavioral difference between the two is small; conversely, if the viewing times of these two housing listings are quite different, their behavioral differences are large.
[0053] (3) Time difference Δt: Mainly consider the impact of the release or update timing of housing listings on similarity. Assume that the time difference between the most recent release dates of housing listing i and housing listing j is Δt. Introduce a time decay factor λ in the comprehensive distance calculation, such that as Δt increases, the contribution of the two housing listings to each other's similarity gradually decreases. For example, if the release / update times of two housing listings are very different, then even if other attributes are very similar, the difference in timeliness will increase d(i, j), thereby reducing the impact of the older housing listing on the current clustering result. Introducing time difference makes the clustering result pay more attention to recently listed or active housing listings, and be closer to the current market dynamics.
[0054] Through the above three aspects of differences, define the comprehensive distance function:
[0055] (3)
[0056] where ω is the weight coefficient and λ is the time decay factor, which are used to control the contributions of user behavior and time to the similarity of housing listings. This similarity metric is different from traditional Euclidean distance or simple feature concatenation methods. For the first time, it explicitly incorporates user behavior and time factors into the calculation of housing listing similarity simultaneously and gives independently adjustable weights. This makes the similarity calculation more sensitive to the dynamic changes of user interests and improves the clustering's response ability to real-time hotspots.
[0057] 2. Adaptive neighborhood density: Based on the above similarity metric (distance metric), for each housing listing data point p i calculate the local density value ρ i .
[0058] To make the density calculation adapt to the changes in data distribution, the present invention does not use a global fixed radius, but dynamically determines the neighborhood radius r i for each point. Specifically, for each housing listing point p i , first determine its k nearest neighbors, and set the distance from this point to the k-th nearest neighbor as the neighborhood radius r i . The neighborhood N(i) includes all neighbor points whose distance from p i does not exceed r i . The number of neighbors k can be adjusted according to the data scale and density distribution. In this way, the neighborhood is smaller in the dense area and larger in the sparse area.
[0059] To calculate the contribution of neighbor housing listings within the neighborhood of p i , the present invention defines a comprehensive weight w j for the neighbor point p j, which comprehensively considers the time decay factor and the activity factor:
[0060] (1) Time decay weight w time (j): According to the neighbor housing listing p jCalculation of the nearest active time to the current moment. The recently active housing listings have a higher weight, while the weight of those that have not been updated for a long time or have received no attention decreases.
[0061] (2)Activity weight w act (j): Calculate based on the number of user interactions (such as views, clicks, collections, etc.) obtained by the neighboring housing listing p j recently. The higher the frequency of interaction, the higher the weight, and vice versa.
[0062] The specific calculation methods of the above two factors can be selected according to the actual application scenario and multiplied to obtain the comprehensive weight:
[0063] (4)
[0064] Subsequently, define the local density ρ i of the housing listing point p i as the total weighted contribution of all neighbors to p i within the neighborhood N(i):
[0065] (5)
[0066] where K(·) is a distance decay function (such as a Gaussian kernel). Neighbors closer in distance contribute more, and neighbors beyond the neighborhood radius r i make no contribution to the density.
[0067] In this way, within the neighborhood range of the target housing listing point p i , housing listings that are close in distance and recently active contribute more to its local density; conversely, those that are far away and inactive for a long time contribute less or can even be ignored. This method of calculating local density based on dynamic neighborhoods and activity can accurately reflect the attention heat of housing listings in different regions in real time and has better adaptability compared to traditional density calculation methods with fixed radii or fixed kernel widths.
[0068] 3. Formation and dynamic update of clusters: Using the above similarity measure and density calculation results, the system performs initial clustering on the housing listing data and dynamically adjusts the clustering results according to the real-time changes in the data and user behavior during the operation to continuously optimize the cluster structure:
[0069] (1)Initial clustering: During the system cold start or batch data import phase, calculate the local density ρ i of all housing listing points and determine the minimum distance δ i from each point to a point with higher density. Referring to the general idea of the density peak clustering method, select points with high density and δ iHousing sources with larger values are used as the initial cluster centers, and the remaining housing source data points are assigned to the clusters where their nearest high-density neighbors are located, forming the initial clustering result. This method makes full use of the distribution characteristics of the data and can adaptively determine the clustering structure.
[0070] (2)Cluster structure dynamic adjustment strategy:
[0071] The present invention monitors the changes in housing source data and user behavior in real time and dynamically optimizes the cluster structure.
[0072] ① Adjustment caused by changes in housing source data
[0073] When new housing source data p new is added to the platform, global calculation is not performed, and only local cluster adjustment is carried out: First, calculate the density ρ new of p new and the minimum distance δ(new), and judge whether it forms a new cluster or joins an existing cluster; then, after adding p new to the corresponding cluster, update the local density of the housing source points in the neighborhood (since the new points provide new neighbor contributions, the density of these points may increase); finally, after the density of the housing source points in the neighborhood increases, if it is found that the density of a certain neighbor housing source point exceeds the current cluster center of the cluster where it is located, then this neighbor point automatically becomes the new cluster center, so as to ensure that the clustering structure accurately reflects the real-time data distribution.
[0074] When the housing source p x has been taken off the platform, reduce its density contribution and remove it. If p x is not the cluster center, only need to reduce its weight w x to 0 and remove it from the neighbor density calculation. Although the density of its neighbor points decreases slightly, the membership relationship of the cluster remains unchanged except that p x itself is excluded. If p x happens to be the center of a certain cluster, reselect the housing source with the second highest density in this cluster as the new center; if there is no obvious candidate point, this cluster is temporarily marked as a "small cluster" and waits for new housing sources to recalculate the density to form a new cluster later.
[0075] ② Adjustment caused by changes in user behavior:
[0076] The user interaction behaviors of housing sources (such as browsing, collecting, clicking) affect the activity weight w act in real time, and thus affect its density contribution.
[0077] When the system detects that the average user activity (such as clicks, favorites) of a certain housing cluster has increased significantly in the short term (for example, exceeding the preset threshold by 15%), the system triggers the automatic splitting of this cluster, dividing it into two or more finer sub - clusters to distinguish new emerging branches of user interest preferences. Such a cluster splitting strategy enables the system to timely identify new directions of user interests and avoid the situation where popular clusters become too large and obscure the differences between different sub - categories within them.
[0078] When the user interaction frequency of a certain housing cluster continuously remains below the preset threshold for multiple time windows, the overall density of this cluster is gradually reduced, and this cluster is marked as a niche but unique interest category.
[0079] Through the above steps, the dynamic clustering module can continuously and adaptively optimize the clustering results according to the changes in housing information and user behavior data. User query and recommendation: When the user submits a housing retrieval request through the front - end, the system extracts corresponding features from the user's query conditions or preferences (such as keywords, location selection, reference pictures, etc.) to generate a user query vector. Then, it calculates the similarity between this query vector and the center vectors of each cluster in the current housing clustering result, locates one or more housing clusters that best match the user's intention, and filters out several housing units from these clusters as the recommended results to be returned to the user. Using the pre - formed clustering results to guide retrieval and recommendation can significantly narrow the matching range and improve the accuracy and real - time performance of query responses.
[0080] Example 1:
[0081] System overall architecture and functions
[0082] As Figure 1As shown in the figure, the housing information service system of this embodiment adopts a B / S architecture and consists of a front-end client and a back-end server. The front-end includes a user login module, a housing source query module, a housing source display module, a popular property development module, etc. Among them, the user login module is used for user registration, login, and permission verification. The housing source query module provides a search box and a filtering condition interface, allowing users to input keywords, select regions, or set preferences to submit query requests. The housing source display module is used to present housing source information in the form of a list or a map, supporting viewing details and picture browsing. The popular property development module is used to display the properties or housing sources with relatively high current attention obtained by the system based on overall data analysis. The back-end consists of an application server and a database, including data maintenance and management function modules such as user management, housing source data management, and statistical analysis, responsible for the addition, modification, deletion, and review of housing source information, as well as the recording and analysis of user behavior logs. The dynamic clustering module is deployed in the data processing engine of the back-end, interacts closely with the database, regularly or real-time obtains the latest housing source data and user behavior data for clustering calculation, and stores or caches the clustering analysis results for query use. The present invention continues the modular design of the traditional real estate information platform in the system architecture. While ensuring the completeness of the system functions, by introducing a dynamic clustering data processing engine in the back-end, it realizes a seamless enhancement of the existing business process and improves the intelligence level of the system.
[0083] Collection of housing source data and feature processing of housing source data
[0084] This embodiment introduces the data sources and preprocessing processes of the system. The data of the platform mainly includes two parts: one is the housing source information collected on-site by real estate operators or entered through interfaces, and the other is the user behavior data accumulated during the operation of the platform. First, the operators conduct a carpet-like information collection on the housing sources in the target area according to the standard process, including the basic attributes of the houses (such as location, area, price, house type, orientation, floor, etc.), the photos of the houses taken on-site, the housing source description text (compiled by the collection personnel according to the on-site situation or provided by the landlord), and other supplementary information. All the collected information is sorted, reviewed, and then entered into the back-end database of the platform to form structured housing source data records. At the same time, the system records all kinds of operation behavior data of users on the platform in real-time through the user behavior collection module, such as which housing sources have been browsed, which pictures have been clicked, which housing sources have been favorited or shared, as well as the filtering conditions and stay duration used by users during retrieval. All user behavior data is stored in the database after privacy desensitization processing and is associated with the relevant housing sources (for example, the user ID, housing source ID, timestamp, etc. are recorded in the browsing log).
[0085] After the data is ready, the system preprocesses and extracts features from the housing source data. For text-based information (such as housing source titles, descriptions, addresses, etc.), Chinese word segmentation and pre-trained language models are used to vectorize the text, obtaining the semantic feature vectors of the housing source text. For housing source photos, a deep convolutional neural network model is used to extract image features, encoding each photo into a corresponding feature vector (if a housing source has multiple photos, the feature vectors of its multiple images can be averaged or concatenated to form the overall image feature vector of the housing source). In terms of geographical location information, the longitude and latitude values of the housing source are directly used as two-dimensional coordinate features, and the longitude and latitude can be normalized according to the city scope if necessary. After obtaining the above text feature vectors, image feature vectors, and geographical location vectors, they are synthesized into a unified housing source comprehensive feature vector V through the feature fusion process. house . A feasible method is to first expand or pad the feature vectors of different modalities to the same dimension, and then according to the preset weights, combine V text , V image and V geo by connection fusion to obtain a high-dimensional comprehensive feature vector: that is
[0086] (6)
[0087] where, represents the vector connection or fusion operation, and α, β, γ are the weight coefficients of the features of each modality. The fused V house comprehensively represents the features of all aspects of the housing source, providing the basic data for subsequent similarity calculation and dynamic clustering analysis.
[0088] Dynamic clustering analysis process
[0089] This embodiment describes the specific implementation steps of the dynamic clustering module of the present invention in combination with the Figure 2 shown process. First, the system extracts the comprehensive feature vector set P of all current housing sources from the database, as well as recent user behavior data. Then, the distance d(i, j) between any two housing source feature vectors is calculated according to a predetermined similarity metric function. In actual implementation, a neighbor index of the housing source vector (such as a k-nearest neighbor graph) can be preferentially constructed to improve the calculation efficiency and avoid exhaustive calculation of all point pairs. Next, calculate the local density ρ i of each housing source point p i and the distance metric δ i . Specifically, for each p i , obtain the set N k (i) of its k nearest neighbors, determine the neighborhood radius r i based on the distance to the k-th neighbor, and accumulate the distance decay contributions of all neighbors within the radius r i to calculate ρ i(The neighbor contributions are weighted according to the aforementioned adaptive weight w and the kernel function K(·)). At the same time, any ratio p is calculated i Among the points with higher density, the one i closest to p is taken as the distance value of δ i (If p i is the point with the highest current density, then δ i is set to the distance between this point and the point farthest from it in the dataset). After the calculations of ρ and δ are completed, a decision graph is plotted with ρ as the horizontal axis and δ as the vertical axis, and several points located at the "peak" positions in the graph are selected as cluster centers - these center points usually have relatively high local density and maintain a large distance from the points with higher density than it. After identifying the cluster centers, for each remaining non-center housing source point, find a neighbor with higher density and closest distance to it, and assign this housing source to the cluster where the neighbor is located. Through the above steps, the system obtains the initial housing source clustering division result, such as forming several clusters C1, C2, C3, etc., and determines the center points of each cluster.
[0090] After the clustering result is generated, the system writes the cluster information to which each housing source point belongs into the database or cache, and calculates the summary attributes for each cluster (such as the cluster center feature vector, the list of housing sources within the cluster, etc.). Thereafter, the dynamic clustering module monitors the changes in data and user behavior according to the preset strategy and triggers local updates to ensure that the clustering result is consistent with the latest data situation. For example, the system can regularly check the change in the number of user clicks on each housing source cluster within the past 24 hours every day: If it is found that the total number of clicks on a certain cluster has increased by more than 15% compared with the previous day, it is considered that the popularity of the housing source category corresponding to this cluster has increased significantly. The system will automatically perform a subdivision on this cluster: Select some recently popular housing sources from this cluster as new cluster center candidates, recalculate their local densities and mutual distances, and apply a decision method similar to the initial clustering within this cluster to split this cluster into finer sub-clusters. In this way, the newly emerging housing source interest categories can be formed into independent clusters and receive targeted recommendation processing. On the contrary, if some clusters lack user attention for a long time (the overall activity is very low), the system may reduce their weights or mark and prompt the operation staff to pay attention in the background, but generally will not actively merge them with other clusters to avoid missing small but unique interest categories.
[0091] When a new housing source is added to the database (for example, a broker newly enters a housing source), the system will also trigger the update process of dynamic clustering. For the new housing source vector p new , the system calculates its k-nearest neighbor set N k (new) and the corresponding ρ new , δ(new). If it is determined that p new should belong to an existing cluster, record its membership relationship, and include p in the calculation of the cluster center vector new(The cluster center vector can be recalculated regularly or an incremental update strategy can be adopted); if p new is considered to be the one that should become the new cluster center (meeting the requirements of high enough density and large δ), a new clustering cluster will be added. In any of the above cases, p new will be included in the density calculation of the relevant points within its neighborhood, so that the ρ values of these neighbor points will increase accordingly. To control the update range, the neighborhood influence radius r update can be set, and only the neighbors within the distance r new from p update will be executed for density update. Similarly, if a housing source p x is taken off the platform or becomes invalid, the system will mark its status and reduce its weight w x to 0; in the subsequent density calculation, each neighbor will no longer include p x in it, so that the ρ values of the relevant neighbors will be automatically reduced. If p x was once the center point of a certain cluster, then the new center of the cluster will be selected or the cluster will be split / merged according to the aforementioned cluster structure adjustment strategy in Embodiment 3. The entire update process of the dynamic clustering is transparent to the user and runs continuously in the background to ensure that the clustering result conforms to the current data and user interest situation at any time.
[0092] Personalized housing source recommendation application
[0093] This embodiment describes how to improve the user's housing source search and recommendation experience by using the dynamic clustering results obtained in Embodiment 3. When the user submits a housing source query request through the front-end interface, the system enters the personalized recommendation process. Suppose the user enters several keywords to describe the ideal housing source (such as "quiet community, three bedrooms and one living room, near the subway"), and selects the target area or uploads a reference house type picture. The query parsing module will perform word segmentation and vectorization processing on the text keywords, extract the image feature vector from the uploaded picture, and obtain the geographical location vector of the area selected by the user, and then fuse them to form the user's query feature vector V query . Since the query information provided by the user may not contain some modal features, the system will perform default feature filling: for the missing modality in the query, a zero vector or an average feature vector will be used instead to ensure that the query vector has the same dimension as the housing source feature vector. Subsequently, the system calculates the distance (similarity score) between the query vector and the center vectors of each housing source cluster stored in the background. For example, the same comprehensive distance function d(i, j) as in the clustering stage is used, but at this time one side is replaced by the query vector. Among the calculated series of distances d(V query , V c1 ), d(V query, V c2 ),..., the cluster C bestThe housing source category considered to be the best match for the user's intention. Then, several housing sources are selected from cluster C best according to the distance (for example, the top N housing sources with the closest distance, or the N housing sources with the highest cosine similarity) to form a recommendation list and return it to the user. During this process, if the user specifies a special sorting preference (such as attaching more importance to the location), the system can also adjust the weight parameters of the similarity calculation accordingly to generate a sorting result that meets the user's preference.
[0094] After the recommendation results are returned to the front end, the user can view the brief information of each housing source, including the title, pictures, main parameters, etc., and can click to view the detailed information page. The system provides a "similar housing source recommendation" function on the housing source details page based on the cluster information, that is, several housing sources with the highest similarity are selected from other housing sources belonging to the same cluster as this housing source and recommended to the user, which is convenient for the user to compare and screen among similar housing sources. During the process of the user continuously using the platform, the system also continuously incorporates new browsing behaviors into the user behavior data in the background for further updating the clustering model and recommendation results. For example, when the user frequently browses the housing sources within a certain cluster and stays for a long time, the system may increase the weight of this cluster in subsequent recommendations, or divide this cluster more finely during the next dynamic clustering, so as to give a result that better fits the user's refined preference when the user searches next time. The entire recommendation mechanism forms a closed loop through dynamic clustering and real-time user feedback, continuously optimizing the user's housing search experience.
[0095] It should be noted that the dynamic clustering algorithm of the present invention can be combined with existing search and recommendation technologies without affecting the functions of the original system. For example, for the regular keyword search result page, the housing source list can still be sorted and displayed according to the search relevance, but the present invention can additionally provide a recommendation column such as "Based on your browsing history, you may also be interested in the following housing sources" on the search result page, and these personalized recommendation results are obtained by using dynamic clustering combined with user behavior analysis. At the same time, the method of the present invention has good scalability and can adapt to different scales of data sets and changing user needs. In actual deployment, the interval or trigger conditions for clustering update (such as real-time update or daily batch update) can be flexibly set according to the server performance and data change frequency to balance the response speed and model freshness.
[0096] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above-described exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be embraced within the present invention. Any reference signs in the claims should not be construed as limiting the claims involved.
[0097] In addition, it should be understood that although this specification is described in terms of embodiments, not every embodiment only contains an independent technical solution. This narrative way of the specification is only for clarity. Those skilled in the art should regard the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A dynamic clustering method based on housing source and behavior data, characterized in that, It includes the following steps: Step S1: Real-time collection and storage of housing source data. Through housing source collection personnel or data interfaces on real estate platforms, housing source data including housing source text descriptions, house pictures, and geographical location coordinates are obtained in real time. After cleaning and structuring the housing source data, it is stored in the background database; Step S2: Real-time acquisition of user behavior data. Record the browsing, clicking, favoriting, retrieving and other operation behaviors of users in the housing information service system to form behavior log data reflecting user interest preferences, and associate and store this behavior data with the corresponding housing sources in the database; Step S3: Extraction and fusion of housing source features. For each housing source data, extract text feature vectors, image feature vectors, and geographical location vectors, and use a weighted fusion method to combine feature vectors of multiple modalities into a unified housing source feature vector; Step S4: Dynamic clustering analysis. Input the housing source feature vector set and user behavior data into the dynamic clustering algorithm proposed by the present invention. Calculate the similarity and local density values between housing sources in real time. According to the addition, removal, information modification of housing sources and the local density changes caused by users' real-time browsing, clicking, and favoriting behaviors, automatically trigger the local splitting or merging of housing source clusters, dynamically update the cluster structure, and obtain a housing source category division result that reflects the housing source updates and user interest changes in real time; Step S5: Generation of recommendation results. Extract the corresponding query feature vector according to the query request submitted by the user, calculate the similarity between this query vector and the cluster centers in the housing source category division result, screen housing sources from one or more clusters most relevant to the user's query, and provide accurate and real-time recommendation services for the user's housing source query request.
2. The dynamic clustering method based on housing source and behavior data according to claim 1, wherein: The similarity metric of the dynamic clustering algorithm uses a comprehensive distance function containing multiple difference components, and calculates the following contents for any two housing source data points: Calculate the difference d in attributes and content of housing sources attr , including comparing differences in attributes and content such as location, area, price, housing type, text description, image features, etc., and weighted aggregating these difference values according to certain weights to obtain d attr ; Calculate the difference d in user behavior for housing listings beh , and quantify the difference in user behavior trajectories between housing listings based on the co-occurrence frequency and time interval of user browsing behavior; Obtain the time difference Δt of the housing source, and assign a time decay weight according to the time interval between the release or update of the two housing sources. The greater the time interval, the lower the similarity contribution of the two housing sources; Combine the above attributes with the content difference d attr , the user behavior difference d beh and the time difference Δt, and perform weighted summation according to the preset weight coefficients to obtain the comprehensive distance metric d(i, j) between the two housing units. (3) Where ω is the weight coefficient and λ is the time decay factor, which is used to control the contributions of user behavior and time to the housing source similarity.
3. The dynamic clustering method based on housing source and behavior data according to claim 1, characterized in that: The dynamic clustering algorithm determines the initial cluster structure through adaptive neighborhood density, including the following steps: Step S1: Determine the neighborhood range N(i) of each housing source data point. The neighborhood is formed by setting the distance between each data point and its k-th nearest neighbor as the neighborhood radius r i , so that the size of the neighborhood changes adaptively according to the distribution of housing sources in the dataset; Step S2: Calculate the local density ρ of each housing data point i , where the local density is the sum of the contributions of all neighbors within the neighborhood N(i) according to the distance decay function and the activity weights of the neighbors themselves. The weight of a neighbor is jointly determined by its most recent active time and the number of user interactions, such that housing neighbors that have been recently active and interact frequently contribute more to the density ρ of the target point i ; Step S3: Determine the initial cluster structure based on the local density ρ of the housing source points i and the minimum distance δ between this point and the points with higher density i Select the housing source data points with higher density and larger δ to be the initial cluster centers, and assign the remaining housing source data points to the clusters where their nearest high-density neighbors are located. i 4. The dynamic clustering method based on housing and behavior data according to claim 3, wherein: The clustering structure dynamic update mechanism of the dynamic clustering algorithm includes the following situations: When new housing source data is added, calculate the density ρ of the new data point new and the minimum distance δ(new) of the data points with higher density than it. If ρ new is higher than the existing points in its neighborhood and δ(new) is greater than the preset threshold, then take this new data point as a new cluster center to generate a new cluster; otherwise, assign it to the cluster where the nearest neighbor with higher density is located, and update the density values of the relevant data points in its neighborhood; (2) When a housing source data is taken off the shelf or becomes invalid, reduce its weight to zero and remove it from the neighbor density calculation. If this data point happens to be the cluster center, re-select the housing source point with the highest density in this cluster as the new cluster center; if there is no obvious candidate point, this cluster is temporarily marked as a "small cluster", waiting for new housing sources to recalculate the density and form a new cluster later; (3) The dynamic clustering algorithm monitors the changes in user behavior of each cluster during operation. When it detects that the average user activity of a certain housing source cluster significantly increases by more than the preset threshold of 15% in the short term, trigger the structural adjustment of this cluster, and divide the housing source cluster into at least two new sub-clusters to refine and distinguish the newly emerged interest categories of users; when the long-term activity of a certain housing source cluster is lower than the set threshold, gradually reduce the overall density of this cluster and mark this cluster as a niche and unique interest category.
5. The dynamic clustering method based on housing source and behavior data according to claim 1, characterized in that, The method for real-time updating of user behavior data and housing source feature data in the database specifically includes: (1) Real-time monitoring of housing source data change events, including housing source addition, removal, or key attribute modification events, and updating these changes incrementally to the database; (2) Real-time capturing of user behavior data such as browsing, clicking, or favoriting on the platform, associating the user behavior data with the corresponding housing source records, and updating them to the database in real time; (3) Providing the housing source feature data and user behavior data after the above real-time incremental update to the dynamic clustering module to achieve real-time dynamic adjustment of housing source categories.
6. A system for the dynamic clustering method based on housing and behavior data according to claims 1 to 5, characterized in that, The system includes a front end and a back end: The front end includes a user login module, a housing source query module, a housing source display module, and a popular property module, which are used to provide user account management, retrieval interaction, and information display functions; The back end includes a data management module, a dynamic clustering module, and a back-end database. Among them, the dynamic clustering module uses the dynamic clustering method described in any one of claims 1 - 5 to perform clustering analysis on housing source data and dynamically adjust the cluster structure, and performs housing source query and recommendation based on dynamic clustering.
7. The system of the dynamic clustering method based on housing source and behavior data according to claim 6, characterized in that, The housing source query module and the popular property module implement housing source recommendation and display based on the dynamic clustering module: (1) After receiving a user query request, the housing source query module matches the most relevant housing source category corresponding to the user query condition from the housing source category division results currently generated by the dynamic clustering module in real time, and preferentially displays the housing sources in the matched category to the user; (2) The popular property module real-time monitors the user attention indicators of each housing source category output by the dynamic clustering module. When it detects that the attention of a certain housing source category is significantly higher than other categories within a set time window, it automatically marks this category as a popular property category and recommends it to the user in real time.