A micro-cluster-based skyline query method

By using a micro-cluster-based skyline query method, which utilizes z-value indexes and nearest-cover circle to filter micro-clusters, the problem of existing technologies being unable to meet users' diverse choices and distance requirements is solved, and efficient spatial query result recommendation is achieved.

CN116431918BActive Publication Date: 2026-03-24NORTHEASTERN UNIV CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-17
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing spatial query methods cannot effectively meet users' needs in terms of distance and diverse choices, especially in skyline queries, which cannot simultaneously provide Pareto optimal solutions in terms of density and distance.

Method used

A micro-cluster-based skyline query method is adopted. By constructing a z-value index, the feature vector of the query object is transformed into a one-dimensional space. The nearest coverage circle and incremental processing are used to filter out the micro-cluster set that meets the user's needs.

Benefits of technology

It provides Pareto optimal solutions that meet user query requirements in terms of density and distance, improving query efficiency and user experience, simplifying operations, and is suitable for applications such as location-based services and information tracking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116431918B_ABST
    Figure CN116431918B_ABST
Patent Text Reader

Abstract

The application provides a micro-cluster-based skyline query method and relates to the technical field of spatial query. The method first acquires all query objects and user objects, and constructs feature vectors of all query objects and user objects; then converts the feature vectors of the query objects into one-dimensional space by using a z-value index to obtain a set of z-value representations about the query objects, and further obtains a z-value-ordered query object set; according to the characteristics of the z-value, the query objects in the query object set are pruned to obtain a new query object set; finally, a nearest covering circle is constructed for the query objects in the new query object set, the micro-cluster corresponding to the nearest covering circle is found, skyline screening is performed, and thus a skyline micro-cluster set is obtained as the final result micro-cluster set and is recommended to the user. The method returns a set of Pareto optimal solutions meeting the user query requirements in the density and distance dimensions in the form of micro-clusters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of spatial query technology, and in particular to a skyline query method based on micro-clusters. Background Technology

[0002] The widespread adoption and development of the internet has brought users a wealth of information. While satisfying users' information needs in the information age, it has also led to information overload. One effective solution to this problem is spatial data filtering, which involves providing users with potentially interesting options based on their needs and location, allowing them to quickly select the information they require. Too many or too few recommendations are insufficient to meet user needs, especially when users want to consider various factors based on their own circumstances. Therefore, providing high-quality and diverse search results is crucial. Currently, spatial querying is widely used in many fields, particularly in spatial databases. It combines the user's current location information to provide information for selection. The query method is the most core and critical part of spatial querying, largely determining query performance and user satisfaction with the results.

[0003] Currently, the main spatial queries available in spatial databases are: nearest neighbor query, nearest group query, and skyline query.

[0004] (1) Nearest neighbor query

[0005] The nearest neighbor query was first proposed to find the point closest to the query point, using a depth-first search method to traverse an R-tree, for example, "find the nearest park from my location". However, it only focuses on the location of the single closest point to the query point, failing to provide diverse options and thus not meeting user needs. Later, its variant, K-nearest neighbor (KNN) query, found K locations closest to the query point, but these K points are often scattered around the user, far apart from each other. While it provides multiple different options, it is inconvenient for users during actual research. That is, when a user selects a target and arrives at it, they may find it unsatisfactory, and finding another target location might be costly. Therefore, K-nearest neighbor query also fails to meet the user's need for multiple choices given a fixed distance.

[0006] (2) Recent group query

[0007] Unlike nearest neighbor queries, nearest group queries always return a set of closely spaced points, which effectively guides users to explore in a specific direction without incurring significant costs. However, user needs are often diverse, potentially considering not only distance but also the variety of target areas. Therefore, the later NNH (Nearest Neighborhood) query added a requirement for the number of regional query results, but finding the most frequently selected region within the target area remains challenging.

[0008] (3) Skyline query

[0009] Skyline queries aim to find suitable results across two dimensions: the optimal choice in one dimension, the optimal choice in the other, and options in between. These options are then recommended to the user for selection based on their interests. This query technique provides users with diverse choices, allowing them to consider their own circumstances. However, it can only recommend individual options scattered around the user, potentially far apart. Therefore, it suffers from the same problem as K-nearest neighbor queries, failing to adequately meet the user's need for diverse choices at a fixed distance.

[0010] In summary, among existing spatial queries, NN (Nearest Neighbor) queries and their variants aim to find the most recent one or several selection results, while NNH queries and related group queries aim to find the most recent microcluster. However, many applications require the identification of all microclusters in the sky, so existing technologies cannot meet the needs of users. Summary of the Invention

[0011] The technical problem to be solved by the present invention is to provide a skyline query method based on micro-clusters to address the shortcomings of the prior art and realize skyline query.

[0012] To solve the above-mentioned technical problems, the technical solution adopted by this invention is as follows: a skyline query method based on micro-clusters. First, all query objects and user objects are obtained, and feature vectors of all query objects and user objects are constructed. Then, the feature vectors of the query objects are transformed into a one-dimensional space using z-value indexing to obtain a set of z-value representations of the query objects. Based on the z-values, all query objects are sorted to obtain a z-value-ordered set of query objects. Then, based on the characteristics of z-values, the query objects in the set of query objects are reduced to obtain a new set of query objects. Finally, the nearest coverage circle is constructed for the query objects in the new set of query objects, and the micro-clusters corresponding to the nearest coverage circle are found for skyline filtering. The resulting skyline micro-cluster set is then recommended to the user as the final result micro-cluster set.

[0013] Specifically, the following steps are included:

[0014] Step 1: Retrieve all query objects from the spatial database and obtain the location of user objects online. Use the location coordinates of the query objects stored in the spatial database to construct the feature vector of all query objects, and use the location coordinates of user objects to construct the feature vector of user objects.

[0015] Step 2: Create two micro-cluster sets. One is a candidate micro-cluster set, used to store the micro-clusters initially selected from all query objects. The other is a result micro-cluster set, used to store the micro-clusters that can be recommended to the user as query results. The micro-cluster is the set of data points within a neighborhood radius r after the query object is abstracted into data points in a spatial coordinate system.

[0016] Step 3: Use z-value indexing to transform the feature vector of the query object into a one-dimensional space to obtain a set of z-value representations of the query object;

[0017] The transformation rule for converting the feature vector of a query object to a one-dimensional space using z-value indexing is as follows: The location coordinates of the query object stored in the database are abstracted into data points in a spatial coordinate system. Therefore, for a d-dimensional data point p, each dimension is represented by an m-bit binary number, i.e.: p((a 11 a 12 …a 1m )2,…,(a d1 a d2 ...a dm )2), then the z value of data point p is calculated by the following formula:

[0018]

[0019] Among them, z p Let a be the z-value of data point p. dmLet m be the m-th bit in the binary representation of the coordinate value of data point p in the d-th dimension, where m is the number of bits in the binary number;

[0020] Step 4: Based on the z-values ​​obtained in Step 3, sort all the query objects to obtain a set of query objects ordered by z-values;

[0021] Step 5: Based on the characteristics of the z-value, reduce the number of query objects in each query object set to obtain a new query object set;

[0022] For each query object, calculate the number of neighbors of the query object in the 2r neighborhood, delete query objects whose number of neighbors is less than the set threshold k, and query objects whose number of neighbors is less than the density of a certain microcluster in the result microcluster set and whose distance from the user object minus the neighborhood radius r is greater than the distance between the microcluster in the result microcluster set and the user, to obtain a new set of query objects;

[0023] Step 6: Construct the nearest coverage circle for the query objects in the new query object set, find the micro-clusters corresponding to the nearest coverage circle, perform skyline filtering, and obtain the skyline micro-cluster set as the final result micro-cluster set.

[0024] Step 6.1: For each query object in the new query object set, construct the nearest coverage circle to obtain the nearest coverage circle set constructed from a data point, and the micro-cluster corresponding to each nearest coverage circle; at the same time, continuously perform skyline incremental processing on the obtained micro-clusters to update the result micro-cluster set;

[0025] Step 6.1.1: For each query object in the new query object set in Step 5, construct the nearest coverage circle to obtain the nearest coverage circle set constructed from a data point;

[0026] The coordinates of the center of the most recently covered circle are calculated based on the feature vector of a query object, using the following formula:

[0027]

[0028]

[0029] Among them, C p .x and C p .y represents the x and y coordinates of the center of the nearest covered circle, qx and qy represent the x and y coordinates of the user's location, px and py represent the x and y coordinates of the query object, and d represents the x and y coordinates of the query object. p,q R is the Euclidean distance from the location of the user object to the location of the query object, where R = r is the radius of the nearest covering circle.

[0030] Step 6.1.2: Calculate the distance between each nearest-cover circle in the nearest-cover circle set from Step 6.1.1 and the user object;

[0031] Step 6.1.3: Based on the z-value index, find the query object contained in each nearest covering circle, and obtain the micro-cluster corresponding to each nearest covering circle;

[0032] Step 6.1.4: Filter the micro-clusters obtained in step 6.1.3, filter out micro-clusters with a density greater than the set threshold k, record them, and update the candidate micro-cluster set;

[0033] Step 6.1.5: Calculate the number of microclusters in the candidate microcluster set from Step 6.1.4. When the number exceeds the set threshold K, perform incremental processing on the microclusters and update the resulting microcluster set. The specific steps are as follows:

[0034] Step 6.1.5.1: Transfer all microclusters in the result microcluster set to the candidate microcluster set to obtain a new candidate microcluster set and an empty result microcluster set;

[0035] Step 6.1.5.2: Sort the microclusters in the new candidate microcluster set obtained in Step 6.1.5.1 according to the distance between the microclusters and the user object, and obtain an ordered list of microclusters from the closest to the user.

[0036] Step 6.1.5.3: Traverse the ordered micro-clusters obtained in step 6.1.5.2, calculate the distance from each micro-cluster in the ordered micro-cluster set to the user's location and the distance from each micro-cluster in the result micro-cluster set to the user's location. For micro-clusters with unequal distances, select micro-clusters with a higher density than those in the result micro-cluster set and add them to the result micro-cluster set. If there are micro-clusters in the obtained ordered micro-clusters with a distance equal to that of a micro-cluster in the result micro-cluster set to the user's location, add the micro-cluster with the higher density to the result micro-cluster set and delete the micro-clusters with the lower density. This gives the skyline micro-cluster set as the new result micro-cluster set.

[0037] Step 6.2: Construct a nearest coverage circle based on any two query objects in the new query object set that can appear simultaneously in a nearest coverage circle but not simultaneously in the nearest coverage circle constructed in Step 6.1. This results in a set of nearest coverage circles constructed from two data points, and a micro-cluster corresponding to each nearest coverage circle. Simultaneously, continuously perform skyline incremental processing on the obtained micro-clusters to update the result micro-cluster set.

[0038] Step 6.2.1: Construct a nearest coverage circle based on any two query objects in the new query object set that can appear simultaneously in a nearest coverage circle but not simultaneously in the nearest coverage circle constructed in step 6.1, to obtain a set of nearest coverage circles constructed from two data points;

[0039] The coordinates of the center of the nearest covering circle constructed from two data points are shown in the following formula:

[0040] C'p x = C1 - C2 × C p .y (4)

[0041]

[0042]

[0043]

[0044] A = C2 2 +1

[0045] B=2×C1×p1.x-2×C1×C2-2×p1.y

[0046] C = (p1.x) 2 -2×p1.x×C1+C1 2 +(p1.y) 2 -r 2

[0047] Among them, C′ p .x and C' p .y are the x and y coordinates of the center of the nearest covering circle, respectively. p1 and p2 are two query objects used to construct the nearest covering circle. p1.x and p1.y are the x and y coordinates of query object p1, respectively. p2.x and p2.y are the x and y coordinates of query object p2, respectively.

[0048] Step 6.2.2: Calculate the distance between each nearest coverage circle in the nearest coverage circle set from step 6.2.1 and the user;

[0049] Step 6.2.3: Based on the z-value index, find the query object contained in each nearest covering circle to obtain the micro-cluster corresponding to the nearest covering circle;

[0050] Step 6.2.4: Filter the micro-clusters obtained in step 6.2.3, filter out micro-clusters with a density greater than the set threshold k, record them, and update the candidate micro-cluster set;

[0051] Step 6.2.5: Calculate the number of microclusters in the candidate microcluster set from Step 6.2.4. When the number of microclusters exceeds the set threshold K, perform incremental processing on the microclusters and update the resulting microcluster set. The specific steps are as follows:

[0052] Step 6.2.5.1: Transfer the microclusters in the result microcluster set to the candidate microcluster set to obtain a new candidate microcluster set and an empty result microcluster set;

[0053] Step 6.2.5.2: Sort the microclusters in the new candidate microcluster set obtained in step 6.2.5.1 according to the distance between the microcluster and the user, and obtain an ordered list of microclusters from the closest to the user.

[0054] Step 6.2.5.3: Traverse the ordered micro-clusters obtained in step 6.2.5.2, calculate the distance from each micro-cluster in the ordered micro-cluster set to the user's location and the distance from each micro-cluster in the result micro-cluster set to the user's location. For micro-clusters with unequal distances, select micro-clusters with a higher density than those in the result micro-cluster set and add them to the result micro-cluster set. If there are micro-clusters in the obtained ordered micro-clusters with a distance equal to that of a micro-cluster in the result micro-cluster set to the user's location, add the micro-cluster with the higher density to the result micro-cluster set and delete the micro-clusters with the lower density. This gives the skyline micro-cluster set as the final result micro-cluster set.

[0055] Step 7: Recommend the microclusters in the final result microcluster set to the user for selection.

[0056] The method of this invention describes query objects and user objects as query object feature vectors and user feature vectors. The query object feature vectors and user feature vectors describe location information. The distance between feature vectors measures the distance between query objects. A micro-cluster is all query objects contained within a certain area. Within this area, the number of query objects represents the density of the corresponding micro-cluster; a high micro-cluster density indicates that there are more query objects available for the user to choose from, and these should be recommended to the user. The distance between a micro-cluster and the user measures the user's "degree of interest" in the micro-cluster; a small distance indicates a high degree of user "degree of interest" in the micro-cluster, and these should be recommended to the user. Therefore, the method of this invention transforms the spatial query problem into a problem of finding a skyline solution under satisfied constraints.

[0057] The beneficial effects of the above technical solution are as follows: The skyline query method based on micro-cluster provided by the present invention (1) returns a set of Pareto optimal solutions that meet the user's query requirements in terms of density and distance in the form of micro-clusters. It recommends information that the user is interested in to the user based on the user's information needs, interest location, etc., and guides the user to make a comprehensive choice based on their own situation; (2) This query method can meet the diverse needs of users and can provide users with a variety of different choices from the perspectives of distance and choice diversity, so that users can make a choice based on their own comprehensive situation and shorten the cost of distance for users; In addition, this query method does not require professional knowledge, is simple to operate, and is user-friendly. It can be used in many applications, such as location-based services, information tracking, etc. (3) This method adopts a z-value index structure and a density and distance-based filtering method, which greatly shortens the query time and improves the efficiency of spatial query while ensuring the correctness of the query results, thereby providing users with fast result recommendations and a good user experience. (4) This method adopts an incremental processing method, which greatly improves the efficiency of storage space utilization, thereby enabling the processing of larger datasets and providing more comprehensive recommendation results, and improving user experience satisfaction.

[0058] In summary, this spatial query method is simple, effective, and provides intuitive and easy-to-understand results. It does not require domain knowledge and offers users a variety of high-quality options. Attached Figure Description

[0059] Figure 1 A flowchart illustrating a micro-cluster-based skyline query method provided in an embodiment of the present invention;

[0060] Figure 2 This is a flowchart of incremental processing of microclusters in the candidate microcluster set and updating the result microcluster set provided in the first embodiment of the present invention;

[0061] Figure 3 This is a schematic diagram illustrating a micro-cluster-based skyline query recommendation provided in an embodiment of the present invention. Detailed Implementation

[0062] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.

[0063] This embodiment takes a certain query object as an example and uses the micro-cluster-based skyline query method of the present invention to perform spatial query.

[0064] In this embodiment, a skyline query method based on micro-clusters, such as... Figure 1 As shown, it includes the following steps:

[0065] Step 1: Retrieve all query objects from the spatial database and obtain the location of user objects online. Use the location coordinates of the query objects stored in the spatial database to construct the feature vector of all query objects, and use the location coordinates of user objects to construct the feature vector of user objects.

[0066] In this embodiment, the query object is "country". The location feature vector of the country is a dataset of longitude and latitude of a certain city's country provided by the johnsnowlabs database. This dataset consists of 12,347,585 countries, including 19 pieces of information such as id, name, longitude, and latitude. This invention only uses the id, longitude, and latitude information of the country. Therefore, the data in this embodiment is 12,347,585 original triple records. Each triple includes the country's id, the country's longitude, and the country's latitude. The longitude ranges from 1.45 to 1.74, and the latitude ranges from 42.507 to 42.65. Therefore, the feature vector of the query object is composed of longitude and latitude.

[0067] In this embodiment, the feature vector of the user object is the coordinates of the user's current location, which needs to be obtained online. It has the same dimension as the feature vector of the query object, and is also composed of longitude and latitude.

[0068] Step 2: Create two micro-cluster sets. One is a candidate micro-cluster set, used to store micro-clusters initially selected from all query objects. The other is a result micro-cluster set, used to store micro-clusters that can be recommended to the user as query results. Each micro-cluster is a set of data points within a neighborhood radius r after the query object is abstracted into data points in a spatial coordinate system. The neighborhood radius r is set by the user and r>0.

[0069] Step 3: Use z-value indexing to transform the feature vector of the query object into a one-dimensional space to obtain a set of z-value representations of the query object;

[0070] In this embodiment, for 12,347,585 query objects, the transformation rule for converting the feature vectors of the query objects to one-dimensional space using z-value indexing is as follows: The location coordinates of the query objects stored in the database are abstracted into data points in a spatial coordinate system. Therefore, for a d-dimensional data point p, each dimension is represented by an m-bit binary number, i.e.: p((a 11 a 12 …a 1m )2,…,(a d1 a d2 ...a dm )2), then the z value of data point p is calculated by the following formula:

[0071]

[0072] Among them, z p Let a be the z-value of data point p. dm Let m be the m-th bit in the binary representation of the coordinate value of data point p in the d-th dimension, where m is the number of bits in the binary number;

[0073] Step 4: Based on the z-values ​​obtained in Step 3, sort all the query objects to obtain a set of query objects ordered by z-values;

[0074] Step 5: Based on the characteristics of the z-value, reduce the number of query objects in each query object set to obtain a new query object set;

[0075] Based on the characteristics of z-value, for each query object, calculate the number of neighbors of the query object in the 2r neighborhood, delete query objects whose number of neighbors is less than the set threshold k, and query objects whose number of neighbors is less than the density of a certain micro-cluster in the result micro-cluster set and whose distance from the user object minus the neighborhood radius r is greater than the distance between the micro-cluster in the result micro-cluster set and the user, to obtain a new set of query objects.

[0076] The characteristic of the z-value refers to the fact that two data points that are very close to each other also have very close z-values. For example, to find points p in the δ-neighborhood, we can search only among points whose z-values ​​are near the z-values ​​of point p, that is: points whose z-values ​​are in the interval... Search within the points. Among them... and Points p δ- and point p δ+ The z-value, p δ- and p δ+ These are two new points whose coordinates are obtained by subtracting or adding 2r from the coordinates of point p. That is, if p(p1, p2, ..., p...), then... d ), then p 2r- (p1-2r,p2-2r,…,pd-2rp2r+p1+2rp2+2r,…,pd+2r.

[0077] In this embodiment, the micro-clusters in the result micro-cluster set are the optimal micro-clusters that are currently considered to meet the user's requirements. Initially, it is an empty set, and the micro-clusters in it are added by selecting the optimal micro-clusters from the micro-clusters that meet the user's requirements. The micro-clusters that meet the user's requirements are the micro-clusters with a minimum density of k. The selection is obtained by performing a skyline query on two dimensions: density and distance. That is, we want to find micro-clusters that are no worse than other micro-clusters in both density and distance dimensions.

[0078] The rules for a skyline search can be illustrated with the following example: Suppose you are traveling to Nassau Beach and want to find a cheap hotel that is close to the beach. Generally, the closer a hotel is to the beach, the higher its price. Therefore, we cannot return the best result. Instead, we can only return some hotels that the user may be interested in. These hotels are no worse than other hotels in terms of price and distance. These unselected hotels are the Skyline.

[0079] In this embodiment, the microclusters in the result microcluster set are used as the standard. When the number of neighbors of the query object p in the 2r neighborhood is less than the density of a certain microcluster in the result microcluster set and the distance from the user minus the neighborhood radius r is greater than the distance between the microcluster in the result microcluster set and the user, there will be no microcluster containing the query object p that is not dominated by this microcluster in the result microcluster set. Therefore, in order to reduce unnecessary calculations, the present invention deletes query objects that are not contained in the optimal microcluster in advance.

[0080] Step 6: Construct the nearest coverage circle for the query objects in the new query object set, find the micro-clusters corresponding to the nearest coverage circle, perform skyline filtering, and obtain the skyline micro-cluster set as the final result micro-cluster set.

[0081] Step 6.1: For each query object in the new query object set, construct the nearest coverage circle to obtain the nearest coverage circle set constructed from a data point, and the micro-cluster corresponding to each nearest coverage circle; at the same time, continuously perform skyline incremental processing on the obtained micro-clusters to update the result micro-cluster set;

[0082] Step 6.1.1: For each query object in the new query object set in Step 5, construct the nearest coverage circle to obtain the nearest coverage circle set constructed from a data point;

[0083] The coordinates of the center of the most recently covered circle are calculated based on the feature vector of a query object, using the following formula:

[0084]

[0085]

[0086] Among them, C p .x and C p .y represents the x and y coordinates of the center of the nearest covered circle, qx and qy represent the x and y coordinates of the user's location, px and py represent the x and y coordinates of the query object, and d represents the x and y coordinates of the query object. p,q R is the Euclidean distance from the location of the user object to the location of the query object, where R = r is the radius of the nearest covering circle.

[0087] In this embodiment, C p .x and C p .y represents the longitude and latitude of the center o of the nearest coverage circle, qx and qy represent the longitude and latitude of the user's location, and px and py represent the longitude and latitude of the location of the query object p.

[0088] Step 6.1.2: Calculate the distance between each nearest-cover circle in the nearest-cover circle set from Step 6.1.1 and the user object;

[0089] In this embodiment of the invention, the distance between the nearest coverage circle and the user is the Euclidean distance between the center of the nearest coverage circle and the user's location.

[0090] Step 6.1.3: Based on the z-value index, find the query objects contained in each nearest covering circle to obtain the micro-cluster corresponding to each nearest covering circle; the set of query objects covered by the nearest covering circle with radius R constitutes a micro-cluster.

[0091] In this embodiment of the invention, when the z-value index transforms the feature vector of the query object into a one-dimensional space, the z-values ​​of two closely spaced query objects are also very close. Therefore, when searching for query objects p within the δ-neighborhood, it is possible to search only among query objects whose z-values ​​are near the z-value of query object p, that is: from the range where the z-value is in the δ-neighborhood. Search within the query objects. and The query object p is respectively δ- and point p δ+ The z-value, p δ- and p δ+ These are two new query objects whose coordinates are obtained by subtracting or adding δ from the coordinates of point p. That is, if p(p1, p2, ..., p...), then... d ), then p δ- (p1-δ,p2-δ,…,p d -δ),p δ+ (p1+δ,p2+δ,…,p d +δ); Therefore, when calculating the data volume of each query object p's neighbors in the 2r neighborhood, it is calculated from the z value in... Find the query object p′ in the middle, and calculate the Euclidean distance between each query object p and the query object p one by one, as shown in the following formula:

[0092]

[0093] Where (p′.x,p′.y) and (px,py) are the feature vectors of query object p′ and query object p respectively, p′.x and p′.y are the longitude and latitude of query object p′ respectively, and px and py are the longitude and latitude of query object p respectively; thus, by comparing the distance d with the neighborhood radius r, we can obtain the neighbors of query object p in the neighborhood r, which are the micro-clusters corresponding to the nearest covering circle;

[0094] Step 6.1.4: Filter the micro-clusters obtained in step 6.1.3, filter out micro-clusters with a density greater than the set threshold k, record them, and update the candidate micro-cluster set; micro-cluster density refers to the number of query objects contained in a micro-cluster.

[0095] In this embodiment, it is first necessary to screen micro-clusters that meet the user's requirements, that is, micro-clusters with a density greater than k. Therefore, it is necessary to update the micro-clusters that meet the user's requirements to the candidate micro-cluster set according to the density of the micro-clusters.

[0096] Step 6.1.5: Calculate the number of microclusters in the candidate microcluster set from Step 6.1.4. When the number exceeds the set threshold K, incrementally process the microclusters within it and update the resulting microcluster set, such as... Figure 2 As shown, the specific steps are as follows:

[0097] Step 6.1.5.1: Transfer all microclusters in the result microcluster set to the candidate microcluster set to obtain a new candidate microcluster set and an empty result microcluster set;

[0098] Step 6.1.5.2: Sort the microclusters in the new candidate microcluster set obtained in Step 6.1.5.1 according to the distance between the microclusters and the user object, and obtain an ordered list of microclusters from the closest to the user.

[0099] Step 6.1.5.3: Traverse the ordered micro-clusters obtained in step 6.1.5.2, calculate the distance from each micro-cluster in the ordered micro-cluster set to the user's location and the distance from each micro-cluster in the result micro-cluster set to the user's location. For micro-clusters with unequal distances, select micro-clusters with a higher density than those in the result micro-cluster set and add them to the result micro-cluster set. If there are micro-clusters in the obtained ordered micro-clusters with a distance equal to that of a micro-cluster in the result micro-cluster set to the user's location, add the micro-cluster with the higher density to the result micro-cluster set and delete the micro-clusters with the lower density. This gives the skyline micro-cluster set as the new result micro-cluster set.

[0100] This step involves selecting the Skyline micro-cluster from the candidate micro-cluster set and the result micro-cluster set. Therefore, the micro-clusters in both sets must first be placed in the candidate micro-cluster set and sorted according to their distance from the user's location, from closest to furthest. Then, the micro-clusters are iterated through sequentially, with the first micro-cluster added to the result micro-cluster set. Next, each micro-cluster in the candidate set is compared to the last micro-cluster added to the result micro-cluster set. If the distances to the user are equal, the cluster density is compared. If the cluster density in the candidate set is higher, the cluster in the candidate set replaces the cluster in the result micro-cluster set. If the distances are not equal, it means the micro-cluster in the candidate set is farther from the query target than the cluster in the result micro-cluster set. In this case, the cluster density is directly compared to the maximum cluster density in the result micro-cluster set. If the cluster density in the candidate set is higher, the cluster in the candidate set is added to the result micro-cluster set; otherwise, the cluster is deleted.

[0101] Step 6.2: Construct a nearest coverage circle based on any two query objects in the new query object set that can appear simultaneously in a nearest coverage circle but not simultaneously in the nearest coverage circle constructed in Step 6.1. This results in a set of nearest coverage circles constructed from two data points, and a micro-cluster corresponding to each nearest coverage circle. Simultaneously, continuously perform skyline incremental processing on the obtained micro-clusters to update the result micro-cluster set.

[0102] Step 6.2.1: Construct a nearest coverage circle based on any two query objects in the new query object set that can appear simultaneously in a nearest coverage circle but not simultaneously in the nearest coverage circle constructed in step 6.1, to obtain a set of nearest coverage circles constructed from two data points;

[0103] The coordinates of the center of the nearest covering circle constructed from two data points are shown in the following formula:

[0104] C' px = C1 - C2 × C p .y (5)

[0105]

[0106]

[0107]

[0108] A = C2 2 +1

[0109] B=2×C1×p1.x-2×C1×C2-2×p1.y

[0110] C = (p1.x) 2 -2×p1.x×C1+C1 2 +(p1.y) 2 -r 2

[0111] Among them, C′ p .x and C' p .y are the x and y coordinates of the center of the nearest covering circle, respectively. p1 and p2 are two query objects used to construct the nearest covering circle. p1.x and p1.y are the x and y coordinates of query object p1, respectively. p2.x and p2.y are the x and y coordinates of query object p2, respectively.

[0112] The formula for calculating the longitude and latitude of the center of the nearest coverage circle is derived from the fact that a point on the circle satisfies the equation of the circle. The specific equation is as follows:

[0113] (p1.xC′ p .x) 2 +(p1.yC′ p .y) 2 =r 2 (7)

[0114] (p2.xC′ p .x) 2 +(p2.yC′ p .y) 2 =r 2 (8)

[0115] The above system of two quadratic equations can yield two sets of circle center coordinates. To find the center coordinates of the nearest covering circle, it is necessary to calculate the distance between the two sets of center coordinates and the query object. The set of data points with the closest distance is selected as the center coordinates of the nearest covering circle. That is, the center coordinates of the nearest covering circle are selected based on the following conditions:

[0116]

[0117] Among them, C′ p .x and C' p .y represents the x and y coordinates of the center of the nearest covered circle, and qx and qy represent the x and y coordinates of the user's position, respectively.

[0118] Step 6.2.2: Calculate the distance between each nearest coverage circle in the nearest coverage circle set from step 6.2.1 and the user;

[0119] Step 6.2.3: Based on the z-value index, find the query object contained in each nearest covering circle to obtain the micro-cluster corresponding to the nearest covering circle;

[0120] Step 6.2.4: Filter the micro-clusters obtained in step 6.2.3, filter out micro-clusters with a density greater than the set threshold k, record them, and update the candidate micro-cluster set;

[0121] Step 6.2.5: Calculate the number of microclusters in the candidate microcluster set from Step 6.2.4. When the number of microclusters exceeds the set threshold K, perform incremental processing on the microclusters and update the resulting microcluster set. The specific steps are as follows:

[0122] Step 6.2.5.1: Transfer the microclusters in the result microcluster set to the candidate microcluster set to obtain a new candidate microcluster set and an empty result microcluster set;

[0123] Step 6.2.5.2: Sort the microclusters in the new candidate microcluster set obtained in step 6.2.5.1 according to the distance between the microcluster and the user, and obtain an ordered list of microclusters from the closest to the user.

[0124] Step 6.2.5.3: Traverse the ordered micro-clusters obtained in step 6.2.5.2, calculate the distance from each micro-cluster in the ordered micro-cluster set to the user's location and the distance from each micro-cluster in the result micro-cluster set to the user's location. For micro-clusters with unequal distances, select micro-clusters with a higher density than those in the result micro-cluster set and add them to the result micro-cluster set. If there are micro-clusters in the obtained ordered micro-clusters with a distance equal to that of a micro-cluster in the result micro-cluster set to the user's location, add the micro-cluster with the higher density to the result micro-cluster set and delete the micro-clusters with the lower density. This gives the skyline micro-cluster set as the final result micro-cluster set.

[0125] Step 7: Recommend the microclusters in the final result microcluster set to the user for selection.

[0126] In this embodiment, the skyline query recommendation based on micro-clusters can be achieved through... Figure 3Let's represent the query results, where the cluster density k = 3, the pentagon q represents the user object, the black dot represents the query object, and A, B, and C represent three clusters that satisfy the requirement of having at least three query objects within the nearest coverage circle of radius R. Since clusters A and B both have three query objects within the nearest coverage circle of radius R, and cluster A is closer to q, cluster A is a candidate result. Although cluster C is farther from user object q than cluster A, it also has more query objects than cluster A, making it a candidate result as well. Therefore, the final query results are clusters A and C.

[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the claims of the present invention.

Claims

1. A skyline query method based on micro-clusters, characterized in that: Includes the following steps: Step 1: Retrieve all query objects from the spatial database and obtain the location of user objects online. Use the location coordinates of the query objects stored in the spatial database to construct the feature vector of all query objects, and use the location coordinates of user objects to construct the feature vector of user objects. Step 2: Create two micro-cluster sets. One is a candidate micro-cluster set, which is used to store the micro-clusters initially filtered from all query objects. The other is a result micro-cluster set, which is used to store the micro-clusters that can be recommended to users as query results. Step 3: Use z-value indexing to transform the feature vector of the query object into a one-dimensional space to obtain a set of z-value representations of the query object; Step 4: Based on the z-values ​​obtained in Step 3, sort all the query objects to obtain a set of query objects ordered by z-values; Step 5: Based on the characteristics of the z-value, reduce the number of query objects in each query object set to obtain a new query object set; Based on the characteristics of z-value, for each query object, calculate the number of neighbors of the query object in the 2r neighborhood, delete query objects whose number of neighbors is less than the set threshold k, and query objects whose number of neighbors is less than the density of a certain micro-cluster in the result micro-cluster set and whose distance from the user object minus the neighborhood radius r is greater than the distance between the micro-cluster in the result micro-cluster set and the user, to obtain a new set of query objects. Step 6: Construct the nearest coverage circle for the query objects in the new query object set, find the micro-clusters corresponding to the nearest coverage circle, perform skyline filtering, and obtain the skyline micro-cluster set as the final result micro-cluster set. Step 7: Recommend the microclusters in the final result microcluster set to the user for selection.

2. The skyline query method based on micro-clusters according to claim 1, characterized in that: Step 3, which uses z-value indexing to transform the feature vector of the query object into a one-dimensional space, follows this rule: The location coordinates of the query object stored in the database are abstracted into data points in a spatial coordinate system. Therefore, for a d-dimensional data point p, each dimension is represented by an m-bit binary number, i.e.: ,…, Then the z value of data point p is calculated by the following formula: (1); in, Let z be the z-value of data point p. Let m be the m-th bit in the binary representation of the coordinate value of data point p in the d-th dimension, where m is the number of bits in the binary number.

3. The skyline query method based on micro-clusters according to claim 2, characterized in that: The specific method for step 6 is as follows: Step 6.1: For each query object in the new query object set, construct the nearest coverage circle to obtain the nearest coverage circle set constructed from a data point, and the micro-cluster corresponding to each nearest coverage circle; at the same time, continuously perform skyline incremental processing on the obtained micro-clusters to update the result micro-cluster set; Step 6.1.1: For each query object in the new query object set in Step 5, construct the nearest coverage circle to obtain the nearest coverage circle set constructed from a data point; The coordinates of the center of the nearest coverage circle constructed from a data point are calculated based on the feature vector of a query object, using the following formula: (2); (3); in, and These are the x and y coordinates of the center of the nearest covering circle constructed from a single data point. and These are the x and y coordinates of the user's location, respectively. and These are the x and y coordinates of the query object, respectively. R is the Euclidean distance from the user object's location to the query object's location, where R=r is the radius of the nearest covering circle; Step 6.1.2: Calculate the distance between each nearest covering circle in the nearest covering circle set from Step 6.1.1 and the user object; Step 6.1.3: Based on the z-value index, find the query object contained in each nearest covering circle, and obtain the micro-cluster corresponding to each nearest covering circle; Step 6.1.4: Filter the micro-clusters obtained in step 6.1.3, filter out micro-clusters with a density greater than the set threshold k, record them, and update the candidate micro-cluster set; Step 6.1.5: Calculate the number of microclusters in the candidate microcluster set in step 6.1.

4. When the number exceeds the set threshold K, perform incremental processing on the microclusters and update the result microcluster set. Step 6.2: Construct a nearest coverage circle based on any two query objects in the new query object set that can appear simultaneously in a nearest coverage circle but not simultaneously in the nearest coverage circle constructed in Step 6.

1. This results in a set of nearest coverage circles with center coordinates constructed from two data points, and a micro-cluster corresponding to each nearest coverage circle. Simultaneously, continuously perform skyline incremental processing on the obtained micro-clusters to update the result micro-cluster set.

4. The skyline query method based on micro-clusters according to claim 3, characterized in that: The specific method for step 6.1.5 is as follows: Step 6.1.5.1: Transfer all microclusters in the result microcluster set to the candidate microcluster set to obtain a new candidate microcluster set and an empty result microcluster set; Step 6.1.5.2: Sort the microclusters in the new candidate microcluster set obtained in Step 6.1.5.1 according to the distance between the microclusters and the user object, and obtain an ordered list of microclusters from the closest to the user. Step 6.1.5.3: Traverse the ordered micro-clusters obtained in step 6.1.5.2, calculate the distance from each micro-cluster in the ordered micro-cluster set to the user's location and the distance from each micro-cluster in the result micro-cluster set to the user's location. For micro-clusters with unequal distances, select the micro-clusters with higher density than the micro-clusters in the result micro-cluster set and add them to the result micro-cluster set. If there are micro-clusters in the obtained ordered micro-clusters with the same distance from the micro-clusters in the result micro-cluster set to the user's location, add the micro-clusters with higher density to the result micro-cluster set and delete the micro-clusters with lower density. This gives the skyline micro-cluster set as the new result micro-cluster set.

5. The skyline query method based on micro-clusters according to claim 4, characterized in that: The specific method for step 6.2 is as follows: Step 6.2.1: Construct a nearest coverage circle based on any two query objects in the new query object set that can appear simultaneously in a nearest coverage circle but not simultaneously in the nearest coverage circle constructed in step 6.1, and obtain the nearest coverage circle set with the center coordinates of the two data points; The coordinates of the center of the nearest covering circle constructed from two data points are shown in the following formula: (4); (5); ; ; ; ; ; in, and These are the x and y coordinates of the center of the nearest covering circle constructed from the two data points. and These are the two query objects used to construct the most recently covered circle. , These are the query objects. The x and y coordinates, , These are the query objects. The x and y coordinates; Step 6.2.2: Calculate the distance between each nearest coverage circle in the nearest coverage circle set from step 6.2.1 and the user; Step 6.2.3: Based on the z-value index, find the query object contained in each nearest covering circle to obtain the micro-cluster corresponding to the nearest covering circle; Step 6.2.4: Filter the micro-clusters obtained in step 6.2.3, filter out micro-clusters with a density greater than the set threshold k, record them, and update the candidate micro-cluster set; Step 6.2.5: Calculate the number of microclusters in the candidate microcluster set in step 6.2.

4. When the number of microclusters is greater than the set threshold K, perform incremental processing on the microclusters and update the result microcluster set.

6. The skyline query method based on micro-clusters according to claim 5, characterized in that: The specific method for step 6.2.5 is as follows: Step 6.2.5.1: Transfer the microclusters in the result microcluster set to the candidate microcluster set to obtain a new candidate microcluster set and an empty result microcluster set; Step 6.2.5.2: Sort the microclusters in the new candidate microcluster set obtained in step 6.2.5.1 according to the distance between the microcluster and the user, and obtain an ordered list of microclusters from the closest to the user. Step 6.2.5.3: Traverse the ordered micro-clusters obtained in step 6.2.5.2, calculate the distance from each micro-cluster in the ordered micro-cluster set to the user's location and the distance from each micro-cluster in the result micro-cluster set to the user's location. For micro-clusters with unequal distances, select the micro-clusters with higher density than the micro-clusters in the result micro-cluster set and add them to the result micro-cluster set. If there are micro-clusters in the obtained ordered micro-clusters with the same distance from the micro-clusters in the result micro-cluster set to the user's location, add the micro-clusters with higher density to the result micro-cluster set and delete the micro-clusters with lower density. This gives the skyline micro-cluster set as the final result micro-cluster set.