Hash-based multi-label spatial data set similarity measurement method

Through the hash-based multi-label spatial dataset similarity measurement method, combined with hash string generation and Hamming distance calculation, the multi-label spatial dataset similarity measurement method in the prior art is solved between accuracy and speed The difficult problem of both is to achieve high accuracy similarity measurement at low time complexity.

CN119106292AActive Publication Date: 2024-12-10NANJING UNIV OF POSTS & TELECOMM
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411288892.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-12-10
Estimated Expiration
2044-09-14

AI Technical Summary

Technical Problem

The existing multi-label spatial dataset similarity measurement methods are difficult to balance between accuracy and speed, especially when considering the multi-label properties of the data point set, computing complexity and accuracy are difficult to meet practical application requirements.

Method used

Using a hash-based multi-label spatial dataset similarity measurement method, a multi-channel image of the class is generated through data preprocessing, and a hash string is generated using mean hash, difference hash and perceptual hash methods, and the Hamming distance is passed. Calculate the similarity, combine the density distribution information and label weights to achieve similarity calculation.

Benefits of technology

In the multi-label spatial dataset search scenario, this method takes into account the accuracy and efficiency of the algorithm, reduces the time complexity, improves the accuracy of the algorithm, and effectively considers the importance differences between different labels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119106292A_ABST
    Figure CN119106292A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of multi-label spatial data set sample search, and discloses a Hash-based multi-label spatial data set similarity measurement method, which comprises the following steps of: data preprocessing: mapping point coordinates in a spatial data set into plane coordinates in an outer frame range, and calculating a density value of data points with labels in each grid, obtaining a density matrix; multi-channel-like image generation: mapping the density value into a color channel value under a corresponding channel, and calculating a composite channel value; hash character string generation: generating Hash character strings of each data set by using a mean value Hash method, a difference value Hash method and a perceptual Hash method to obtain a Hash character string tuple; and similarity calculation: calculating the Hamming distance between the Hash character strings to obtain the similarity between the multi-label spatial data sets. According to the method, the accuracy and the efficiency of the algorithm are considered, relatively low time complexity is maintained, and the similarity degree among a plurality of spatial data sets with labels is accurately and quickly measured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of multi-label spatial dataset sample search, and specifically relates to a hash-based multi-label spatial dataset similarity measurement method. Background Art

[0002] Managing and searching datasets with spatial attributes is one of the important steps in the emerging research field of dataset query. In today's environment of building smart cities and intelligent transportation, it is very necessary to provide interactive web query services for datasets with spatial information, especially large datasets of urban facilities with geo-tags in urban public data platforms. Currently, many search systems for spatial data of specific projects have been developed. For sample search of multi-label spatial datasets, it is of great importance to use objective and easy-to-use numerical similarity measurement methods to measure the similarity between different multi-label spatial datasets.

[0003] At present, a variety of similarity matching models for spatiotemporal datasets have been proposed, such as the model based on the maximum bounding rectangle overlap area, the model based on the Hausdorff distance of the point set, and the model based on the bulldozer distance of the point set generating histogram. However, these methods all have some shortcomings. For example, the maximum bounding rectangle overlap area model is difficult to consider the distribution of the point set inside the bounding data frame and is relatively coarse-grained; the Hausdorff distance of the point set mainly considers the edge end and is easily affected by outliers, making the result inaccurate; the calculation of the bulldozer distance model for generating histograms has a cubic time complexity, which is computationally expensive and time-consuming. In the practical application of sample search in multi-label spatial datasets, similarity measurement methods are required to take into account both accuracy and speed, while considering the multi-label attributes of the data point set. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a hash-based multi-label spatial dataset similarity measurement method, which can be used to measure the similarity between several spatial datasets with multiple labels, taking into account both accuracy and speed, and alleviating the shortcomings of the prior art.

[0005] To achieve the above objectives, this application is implemented through the following technical solutions:

[0006] The present invention is a multi-label spatial data set similarity measurement method based on hashing, which specifically comprises the following steps:

[0007] Step 1: Data preprocessing: Given a spatial data warehouse D = {D1, D2, ..., D n}, D i ∈D is a multi-label space dataset with t labels, find D iThe smallest circumscribed square of the position point is divided into 2 according to the partition parameter θ. θ ×2 θ The density distribution information in the grid is calculated.

[0008] Step 2: Multi-channel image generation: Each multi-label space dataset D i The label corresponds to an image channel. According to the calculated density distribution information of the grid in each label, all color channel values ​​of the corresponding channel are generated. According to the weight of the given label, the composite channel value is obtained, and thus a multi-channel image I is generated. i ;

[0009] Step 3: Hash string generation: transform the multi-label spatial dataset D i The corresponding class multi-channel image I i Convert to grayscale image GI i , respectively using mean hashing, difference hashing and perceptual hashing methods to generate a multi-label spatial dataset hash string tuple h i ,The multi-label spatial data in the spatial data warehouse constitute a set H of hash string tuples;

[0010] Step 4: Similarity calculation: The sample multi-label space dataset D used for query e The generated sample data set hash string tuple h e , calculate the sample multi-label space dataset D e With the multi-label spatial dataset D i The similarity between .

[0011] A further improvement of the present invention is that the preprocessing of data in 1 to obtain the density distribution information of the entire network specifically includes the following steps:

[0012] Step 1.1: Statistical minimum circumscribed square area, multi-label spatial dataset D i with the same label l and falls into the jth row and kth column of the grid g i,j,k The number of locations in The total number of location points N with label l in the multi-label spatial dataset il , where 0≤j≤2 θ -1,0≤k≤2 θ -1;

[0013] Step 1.2: Calculate the grid g in the l label i,j,k The location point density value The calculation formula is Get a multi-label spatial dataset D i The density matrix A of the labels l in the gridil , traverse all t labels to generate a multi-label space dataset D i The density matrix set A of all labels i ={A i1 ,A i2 ,…,A it}.

[0014] A further improvement of the present invention is that: the step 2 maps the density distribution information of the multi-label spatial data set into a quasi-multi-channel image, specifically comprising the following steps:

[0015] Step 2.1: For Add the grid g in the l tag i,j,k The location point density value One-to-one mapping to the value under the corresponding channel Get the numerical matrix V of the channel il , traverse Generate a set of numerical matrices V for all channels i = {V i1 ,V i2 ,…,V it}, where t is the total number of label categories, A i represents a set of density matrices;

[0016] Step 2.2: Get a multi-channel image I i The composite channel value in the jth row and kth column of the grid in, is a multi-label spatial dataset D i The label l of the grid in the jth row and kth column corresponds to the “color channel value” of the channel, w il is the weight coefficient of label l;

[0017] Step 2.3: Multi-label spatial dataset D i Each grid g i,j,k Corresponding to a class of multi-channel image I i The composite channel value v i,j,k , traverse all grids and obtain the multi-channel matrix M i = {v i,j,k |0≤j≤2 θ -1,0≤k≤2 θ -1}, thus obtaining a multi-channel image I i , where θ represents the partition parameter.

[0018] A further improvement of the present invention is that the step 3 specifically includes the following steps:

[0019] Step 3.1: Multi-label spatial dataset Di Generated multi-channel image I i Convert to grayscale image GI i , calculate the grayscale image GI i The grayscale mean μ1, traversing the grayscale image GI i The grayscale value of each pixel is compared with the grayscale mean μ1. If the grayscale value of each pixel is greater than or equal to the grayscale mean μ1, it is represented as 1. If the grayscale value of each pixel is less than the grayscale mean μ1, it is represented as 0. The mean hash string is obtained by using the mean hashing method.

[0020]

[0021] Step 3.2: Grayscale image GI i Perform discrete cosine transform to obtain a discrete cosine transform image, traverse each pixel of the discrete cosine transform, compare the discrete cosine transform coefficient of each pixel with the discrete cosine transform coefficient average value μ2, if the discrete cosine transform coefficient of each pixel is greater than or equal to the discrete cosine transform coefficient average value μ2, it is recorded as 1, if the discrete cosine transform coefficient of each pixel is less than the discrete cosine transform coefficient average value μ2, it is recorded as 0, so as to obtain the perceptual hash string by using the perceptual hash processing method.

[0022] Step 3.3: multi-channel image I i The pixel value difference of adjacent pixels is compared pixel by pixel to generate a hash value. If the gray value of the current pixel is greater than the gray value of the pixel on the right, it is recorded as 1, otherwise it is 0. Since it is a pairwise comparison, the number of columns in the converted matrix becomes 2 θ -1, while the number of rows is still 2 θ , thus using the difference hashing method to obtain the difference hash string

[0023] Step 3.4: Generate a multi-label spatial dataset D i Hash string tuple h i ={h i1 ,h i2 ,h i3}, traverse all multi-label spatial data sets in the spatial data warehouse and obtain the hash string tuple set H = {h1,h2,…,h n}.

[0024] A further improvement of the present invention is that: in step 4, the sample multi-label spatial dataset D used for query e The generated sample data set hash string tuple h e , for h i∈H, then the similarity between the two original multi-label space datasets is expressed as:

[0025]

[0026] Where d1(e,i) is h e1 With h i1 The Hamming distance of , d2(e,i) is h e2 With h i2 The Hamming distance of , d3(e,i) is h e3 With h i3 Hamming distance, the greater the similarity, the higher the similarity between the two, and vice versa.

[0027] The beneficial effects of the present invention are as follows: the present application establishes a two-dimensional storage structure of density representation for a multi-label spatial data set, generates a quasi-multi-channel image, and visualizes the distribution characteristics of a set of spatial coordinate points.

[0028] The present invention calculates the composite channel value of each pixel by weighted summation and integrates multi-label features, which not only reduces the spatial complexity but also fully considers the importance differences between different labels.

[0029] The present invention generates corresponding hash strings by using the mean hash method, the difference hash method and the perceptual hash method, and respectively calculates the Hamming distance to find the average value to obtain the similarity between multi-label spatial data sets, so that the calculation method has the advantages of the three hash methods and is less affected by the multi-label spatial data sets with special point set distribution conditions.

[0030] Through this application, in the scenario of multi-label spatial data set search, the accuracy and efficiency of the algorithm are taken into account, and the accuracy of the algorithm is improved while maintaining a low time complexity. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 Schematic diagram of the process of this application.

[0032] Figure 2 Generate bounding box diagrams for multi-label spatial datasets.

[0033] Figure 3 Schematic diagram of the process of mapping a three-label space dataset into a three-channel image.

[0034] Figure 4 A diagram of the process of generating a hash string using a hash algorithm. DETAILED DESCRIPTION

[0035] In order to enable those skilled in the art to better understand the scheme of the present application, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making any creative work shall fall within the scope of protection of this application.

[0036] like Figure 1 As shown, the present invention is a multi-label spatial data set similarity measurement method based on hash, characterized in that: the multi-label spatial data set similarity measurement method based on hash has the following steps:

[0037] Step 1: Data preprocessing: Given a spatial data warehouse D = {D1, D2, ..., D n}, D i ∈D is a multi-label space dataset D with t labels i , find the multi-label space data D i The smallest circumscribed square of the position point is divided into 2 according to the partition parameter θ. θ ×2 θ grids of equal size and calculate the density distribution information within the grids, including:

[0038] Step 1.1: According to the geographical characteristics of the area where the multi-label spatial dataset is located, select an appropriate map projection method to transform the longitude and latitude coordinates into a plane coordinate system. The transformed coordinates will be used for subsequent calculations.

[0039] Step 1.2, reference Figure 2 For each multi-label spatial dataset, determine its geographic scope and calculate the minimum enclosing rectangle. Then, extend the width of the rectangle to both ends at equal distances to make it equal to the length of the rectangle, so as to obtain a square outer frame. This square should be able to completely cover the unrotated complete outline of the dataset, and there is no square with a smaller area that meets this condition. Take one vertex of the outer frame as the coordinate origin, establish a plane rectangular coordinate system, and scale all multi-label spatial datasets to have the same outer frame area to facilitate comparison in subsequent operations. The scaling process keeps the relative positions of each point in the dataset unchanged and only adjusts the overall size. The outer frame is called the minimum enclosing square of this multi-label spatial dataset.

[0040] Step 1.3: Depending on the required search accuracy, use grids of appropriate size to divide the area within the outer frame. Each grid obtained by division is a square of the same area. Record its row and column numbers, starting from row 0 and column 0.

[0041] Step 1.4: Statistical minimum circumscribed square area, multi-label spatial dataset Di with the same label l and falls into the jth row and kth column of the grid g i,j,k The number of locations in The total number of location points N with label l in the multi-label spatial dataset il , where 0≤j≤2 θ -1,0≤k≤2 θ -1.

[0042] Step 1.5, reference Figure 3 , calculate the grid g in the l label i,j,k The location point density value The calculation formula is Get a multi-label spatial dataset D i The density matrix A of the labels l in the grid il , traverse all t labels to generate a multi-label space dataset D i The density matrix set A of all labels i ={A i1 ,A i2 ,…,A it}.

[0043] Step 2: Multi-channel image generation: Each multi-label space dataset D i The label corresponds to an image channel. According to the calculated density distribution information of the grid in each label, all color channel values ​​of the corresponding channel are generated. According to the weight of the given label, the composite channel value is obtained, and thus a multi-channel image I is generated. i ;

[0044] Mapping the density distribution information of the multi-label spatial dataset into a quasi-multi-channel image includes the following steps:

[0045] Step 2.1: For Add the grid g in the l tag i,j,k The location point density value One-to-one mapping to the value under the corresponding channel Get the numerical matrix V of the channel il , traverse Generate a set of numerical matrices V for all channels i = {V i1 ,V i2 ,…,V it}, where t is the total number of label categories, A i represents a collection of density matrices.

[0046] Step 2.2: Get a multi-channel image I i The composite channel value in the jth row and kth column of the grid in, is a multi-label spatial dataset D i The label l of the grid in the jth row and kth column corresponds to the “color channel value” of the channel, w il is the weight coefficient of label l;

[0047] Step 2.3: Multi-label spatial dataset D i Each grid g i,j,k Corresponding to a class of multi-channel image I i The composite channel value v i,j,k , traverse all grids and obtain the multi-channel matrix M i = {v i,j,k |0≤j≤2 θ -1,0≤k≤2 θ -1}, thus obtaining a multi-channel image I i , where θ represents the partition parameter.

[0048] Step 3: Hash string generation: transform the multi-label spatial dataset D i The corresponding class multi-channel image I i Convert to grayscale image GI i , respectively using mean hashing, difference hashing and perceptual hashing methods to generate a multi-label spatial dataset hash string tuple h i , the multi-label spatial data in the spatial data warehouse constitutes a hash string tuple set H. The specific steps include:

[0049] Step 3.1: Multi-label spatial dataset D i Generated multi-channel image I i Convert to grayscale image GI i , calculate the grayscale image GI i The grayscale mean μ1, traversing the grayscale image GI i The grayscale value of each pixel is compared with the grayscale mean μ1. If the grayscale value of each pixel is greater than or equal to the grayscale mean μ1, it is represented as 1. If the grayscale value of each pixel is less than the grayscale mean μ1, it is represented as 0. The mean hash string is obtained by using the mean hashing method.

[0050]

[0051] like Figure 4 As shown, in this step, the mean hashing method is used to generate the mean hash string of the multi-label spatial dataset, which specifically includes the following steps:

[0052] Step 3.1.1: Use the formula The composite channel value of each grid is binarized in a standard way; where Bij is the standard binarization result of the grid in row i and column j, V ij is the composite channel value of the grid at row i and column j, is the average of all composite channel values.

[0053] Step 3.1.2: Arrange the standard binarization results of each grid from left to right and from top to bottom to obtain a string consisting of only characters 0 and 1, which is the mean hash string corresponding to the data set. The formula is as follows: i×L+j =B ij , where L is the number of grids in each row or column of the multi-label spatial dataset, a i×L+j The (i×L+j)th bit of the mean hash string, a 01 string of length L×L The mean hash string corresponding to the data set.

[0054] The process can be expressed by the following formula:

[0055] a i×L+j =B ij

[0056] Where L is the number of grids in each row or column of the multi-label spatial dataset.

[0057] Step 3.2: Grayscale image GI i Perform discrete cosine transform to obtain a discrete cosine transform image, traverse each pixel of the discrete cosine transform, compare the discrete cosine transform coefficient of each pixel with the discrete cosine transform coefficient average value μ2, if the discrete cosine transform coefficient of each pixel is greater than or equal to the discrete cosine transform coefficient average value μ2, it is recorded as 1, if the discrete cosine transform coefficient of each pixel is less than the discrete cosine transform coefficient average value μ2, it is recorded as 0, so as to obtain the perceptual hash string by using the perceptual hash processing method.

[0058] like Figure 4 As shown, in this step, the perceptual hashing method is used to generate the perceptual hash string of the multi-label spatial dataset, which specifically includes the following steps:

[0059] Step 3.2.1: Perform discrete cosine transform (DCT) on the multi-channel image generated by the multi-label spatial dataset, using the two-dimensional discrete cosine transform formula Among them, the orthogonal normalization coefficient f(i,j)=V ij , F(u,v) is the DCT value of the grid in the uth row and vth column after discrete cosine transform, and L is the number of grids in each row or column of the multi-label spatial dataset;

[0060] Step 3.2.2: Use the formula Binarize the composite channel value of each grid, where is the average value of DCT coefficients.

[0061] Step 3.2.3: Arrange the binarization results of each grid from left to right and from top to bottom to obtain a string consisting of only characters 0 and 1, which is the perceptual hash string corresponding to the data set. The formula is as follows: i×L+j =B ij , p i×L+j To perceive the (i×L+j)th bit of the hash string, a 01 string of length L×L It is the perception hash string corresponding to the dataset.

[0062] The process can be expressed by the following formula:

[0063] p i×L+j =B ij

[0064] Step 3.3: classify multi-channel image I i The pixel value difference of adjacent pixels is compared pixel by pixel to generate a hash value. If the gray value of the current pixel is greater than the gray value of the pixel on the right, it is recorded as 1, otherwise it is 0. Since it is a pairwise comparison, the number of columns in the converted matrix becomes 2 θ -1, while the number of rows is still 2 θ , thus using the difference hashing method to obtain the difference hash string

[0065] like Figure 4 As shown, in this step, the difference hash method is used to generate the difference hash string of the multi-label space dataset, which specifically includes the following steps:

[0066] Step 3.3.1. Use the formula 0≤i,jL) perform difference binarization on the composite channel value of each grid and compare it with the adjacent grid on the right, except for the rightmost column;

[0067] Step 3.3.2: Arrange the binarization results of each grid except the rightmost column from left to right and from top to bottom to obtain a string consisting of only characters 0 and 1, which is the mean hash string corresponding to the data set. The formula is as follows: i×(L-1)+j =B ij , d i×(L-1)+j The (i×(L-1)+j)th bit of the difference hash string, a 01 string with a length of L×(L-1) The difference hash string corresponding to the data set.

[0068] The formula for this process is as follows:

[0069] d i×(L-1)+j =B ij

[0070] Step 3.4: Generate a multi-label spatial dataset D i Hash string tuple h i ={h i1 ,h i2 ,h i3}, traverse all multi-label spatial data sets in the spatial data warehouse and obtain the hash string tuple set H = {h1,h2,…,h n}.

[0071] Step 4: Similarity calculation: The sample multi-label space dataset D used for query e Generate a sample data set hash string tuple h e , for h i ∈H, then the two original multi-label space datasets D e With D i The similarity between them is expressed as:

[0072]

[0073] Where d1(e,i) is h e1 With h i1 The Hamming distance of , d2(e,i) is h e2 With h i2 The Hamming distance of , d3(e,i) is h e3 With h i3 Hamming distance, the greater the similarity, the higher the similarity between the two, and vice versa.

[0074] Figure 2 The figure shows the outer border of a multi-label spatial dataset. The outer border is obtained by expanding the width of the minimum circumscribed rectangle of the outer contour of the region described by the multi-label spatial dataset, which means that all spatial points in the dataset fall within the outer border. Therefore, the distribution of spatial points of different multi-label spatial datasets can be compared by overlapping their outer borders.

[0075] Figure 3 The figure shows the process of mapping a three-label spatial dataset into a three-channel image. Calculating the density value of spatial points with each label requires a large storage space. Therefore, by calculating the composite channel value, the density values ​​​​are merged into one value according to the label weight, which saves a lot of storage space and reduces the time complexity of the search process.

[0076] Figure 4The process of generating a hash string using a hash algorithm is shown in the figure. The mean hash method, difference hash method, and perceptual hash method each have different advantages. Different multi-label spatial data sets have different spatial point density distribution characteristics. For different density distribution characteristics, the accuracy of the hash strings generated by the three hash methods is different. Therefore, by generating three hash strings at the same time and taking the average of the Hamming distance, the error can be reduced and the accuracy of the similarity calculation can be improved.

[0077] Therefore, in the present invention, a two-dimensional storage structure is introduced to establish a density representation and generate a quasi-multi-channel image. This innovative method effectively visualizes the distribution characteristics of a set of spatial coordinate points, making the complex relationship between data more intuitive and easy to understand. The similarity between multi-label spatial data sets is determined by calculating the Hamming distance and averaging it. This method combines the advantages of the three hashing methods, effectively reduces the deviation that may be caused by a single hashing method, and makes the similarity calculation more accurate and reliable. Through the present invention, in the scenario of multi-label spatial data set search, the algorithm proposed by the present invention significantly improves the accuracy of the algorithm while maintaining a low time complexity, thanks to its innovative data representation method, efficient hashing strategy fusion, and sophisticated weighted summation calculation.

[0078] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims

1. A hash-based multi-label spatial data set similarity measurement method, characterized by: The hash-based multi-label spatial data set similarity measurement method has the following steps: Step 1: Data preprocessing: Store several multi-label spatial datasets D i The area described by each multi-label spatial dataset in the spatial data warehouse is divided into 2 θ ×2 θ Grids of equal size are used to preprocess the multi-label spatial data set to obtain the density distribution information in all grids; Step 2: Multi-channel image generation: Each multi-label space dataset D i The label corresponds to an image channel. According to the calculated density distribution information of the grid in each label, all color channel values ​​of the corresponding channel are generated. According to the weight of the given label, the composite channel value is obtained, and thus a multi-channel image I is generated. i ; Step 3: Hash string generation: transform the multi-label spatial dataset D i The corresponding class multi-channel image I i Convert to grayscale image GI i , respectively using mean hashing, difference hashing and perceptual hashing methods to generate a multi-label spatial dataset hash string tuple h i ,The multi-label spatial data in the spatial data warehouse constitute a set H of hash string tuples; Step 4: Similarity calculation: The sample multi-label space dataset D used for query e Generate a sample data set hash string tuple h e , calculate the sample multi-label space dataset D e With the multi-label spatial dataset D i The similarity between .

2. According to claim 1, a hash-based multi-label spatial data set similarity measurement method is characterized by: The step 2 maps the density distribution information of the multi-label space data set into a quasi-multi-channel image, specifically comprising the following steps: Step 2.1: For Add the grid g in the l tag i,j,k The location point density value One-to-one mapping to the value under the corresponding channel Get the numerical matrix V of the channel il , traverse Generate a set of numerical matrices V for all channels i = {V i1 ,V i2 ,…,V it }, where t is the total number of label categories, A i represents a set of density matrices; Step 2.2: Get a multi-channel image I i The composite channel value in the grid of row j and column k in, is a multi-label spatial dataset D i The label l of the grid in the jth row and kth column corresponds to the "color channel value" of the channel, w il is the weight coefficient of label l; Step 2.3: Multi-label spatial dataset D i Each grid g i,j,k Corresponding to a class of multi-channel image I i The composite channel value v i,j,k , traverse all grids and obtain the multi-channel matrix M i = {v i,j,k |0≤j≤2 θ -1,0≤k≤2 θ -1}, thus obtaining a multi-channel image I i , where θ represents the partition parameter.

3. The method for measuring similarity of multi-label spatial data sets based on hashing according to claim 1, characterized in that: The step 3 specifically comprises the following steps: Step 3.1: Multi-label spatial dataset D i Generated multi-channel image I i Convert to grayscale image GI i , calculate the grayscale image GI i The grayscale mean μ1, traversing the grayscale image GI i The grayscale value of each pixel is compared with the grayscale mean μ1. If the grayscale value of each pixel is greater than or equal to the grayscale mean μ1, it is represented as 1. If the grayscale value of each pixel is less than the grayscale mean μ1, it is represented as 0. The mean hash string is obtained by using the mean hashing method. Step 3.2: Grayscale image GI i Perform discrete cosine transform to obtain a discrete cosine transform image, traverse each pixel of the discrete cosine transform, compare the discrete cosine transform coefficient of each pixel with the discrete cosine transform coefficient average value μ2, if the discrete cosine transform coefficient of each pixel is greater than or equal to the discrete cosine transform coefficient average value μ2, it is recorded as 1, if the discrete cosine transform coefficient of each pixel is less than the discrete cosine transform coefficient average value μ2, it is recorded as 0, so as to obtain the perceptual hash string by using the perceptual hash processing method. Step 3.3: multi-channel image I i The pixel value difference of adjacent pixels is compared pixel by pixel to generate a hash value. If the gray value of the current pixel is greater than the gray value of the pixel on the right, it is recorded as 1, otherwise it is 0. Since it is a pairwise comparison, the number of columns in the converted matrix becomes 2 θ -1, while the number of rows is still 2 θ , thus using the difference hashing method to obtain the difference hash string Step 3.4: Generate a multi-label spatial dataset D i Hash string tuple h i ={h i1 ,h i2 ,h i3 }, traverse all multi-label spatial data sets in the spatial data warehouse and obtain the hash string tuple set H = {h1,h2,…,h n }.

4. The method for measuring similarity of multi-label spatial data sets based on hashing according to claim 1, characterized in that: In step 4, the sample multi-label spatial dataset D used for query is e The generated sample data set hash string tuple h e , for h i ∈H, then the similarity between the two original multi-label space datasets is expressed as: Where d1(e,i) is h e1 With h i1 The Hamming distance of , d2(e,i) is h e2 With h i2 The Hamming distance of , d3(e,i) is h e3 With h i3 Hamming distance, the greater the similarity, the higher the similarity between the two, and vice versa.

5. A hash-based multi-label spatial data set similarity measurement method according to any one of claims 1 to 4, characterized in that: The preprocessing step 1 is as follows: given a spatial data warehouse D = {D1, D2, ..., D n }, D i ∈D is a multi-label space dataset with t labels, find D i The smallest circumscribed square of the position point is divided into 2 according to the partition parameter θ. θ ×2 θ The density distribution information in the grid is calculated.

6. The method for measuring similarity of multi-label spatial data sets based on hashing according to claim 5 is characterized in that: The preprocessing of data in 1 to obtain the density distribution information of the entire network specifically includes the following steps: Step 1.1: Statistical minimum circumscribed square area, multi-label spatial dataset D i with the same label l and falls into the jth row and kth column of the grid g i,j,k The number of locations in The total number of location points N with label l in the multi-label spatial dataset il , where 0≤j≤2 θ -1,0≤k≤2 θ -1; Step 1.2: Calculate the grid g in the l label i,j,k Location point density value The calculation formula is Get a multi-label spatial dataset D i The density matrix A of the labels l in the grid il , traverse all t labels to generate a multi-label space dataset D i The density matrix set A of all labels i ={A i1 ,A i2 ,…,A it }.

Citation Information

Patent Citations

  • Multi-label image retrieval method based on deep hash

    CN110457514A

  • Multi-label remote sensing image retrieval method and system

    CN118093924A

  • Method and system for similarity-based multi-label learning

    US20200210888A1

  • Unsupervised HASH generation system

    WO2023149588A1