A hash-based similarity measurement method for multi-label spatial datasets

Through the hash-based multi-label spatial dataset similarity measurement method, multi-channel images are generated and the Hamming distance is calculated, which solves the problem of insufficient accuracy and speed of multi-label spatial dataset similarity measurement in the existing technology and realizes efficient similarity calculation with low time complexity.

CN119106292BActive Publication Date: 2025-10-03NANJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing similarity measurement methods for multi-label spatial datasets have shortcomings in accuracy and speed, and it is difficult to strike a balance between them. Especially in sample search of multi-label spatial datasets, existing methods find it difficult to maintain efficient calculation while considering the multi-label attributes of the data point set.

Method used

A hash-based similarity measurement method for multi-label spatial datasets is adopted. Multi-channel images are generated through data preprocessing. Hash strings are generated using mean hashing, difference hashing and perceptual hashing methods. The similarity is calculated through Hamming distance. The density distribution information and label weights of the multi-label spatial dataset are combined to generate a similarity representation.

Benefits of technology

The accuracy and efficiency of multi-label spatial dataset search are improved, the time complexity is reduced, the special impact on the distribution of point sets is reduced, and a fast and accurate similarity measurement is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119106292B_ABST
    Figure CN119106292B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of multi-label spatial dataset sample search and discloses a hash-based similarity measurement method for multi-label spatial datasets. The method includes data preprocessing: mapping the coordinates of points in the spatial dataset to plane coordinates within the outer bounding box, and calculating the density of data points with each label within each grid to obtain a density matrix; quasi-multi-channel image generation: mapping the density values ​​to "color channel values" under the corresponding channels and calculating the composite channel values; hash string generation: using mean hashing, difference hashing, and perceptual hashing methods to generate hash strings for each dataset to obtain hash string tuples; and similarity calculation: calculating the Hamming distance between hash strings to obtain the similarity between multi-label spatial datasets. The present invention balances algorithm accuracy and efficiency, maintains low time complexity, and accurately and quickly measures the similarity between multiple labeled spatial datasets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This 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 a key step in the emerging research field of dataset querying. In today's context of building smart cities and intelligent transportation, providing interactive web-based query services for datasets containing spatial information, particularly the large number of geotagged urban facility datasets contained in urban public data platforms, is essential. Currently, a number of project-specific spatial data search systems have been developed. For example, for multi-label spatial datasets, it is crucial to employ objective, easily numerically representable similarity metrics to measure the similarity between different multi-label spatial datasets.

[0003] Currently, a variety of similarity matching models for spatiotemporal datasets have been proposed, such as those based on the maximum bounding rectangle overlap area, the Hausdorff distance of point sets, and the bulldozer distance model based on a histogram generated from point sets. However, these methods all have shortcomings. For example, the maximum bounding rectangle overlap area model struggles to account for the distribution of points within the bounding box and is relatively coarse-grained; the Hausdorff distance of point sets primarily considers edges and is susceptible to outliers, resulting in inaccurate results; and the bulldozer distance model, which generates a histogram, has a cubic time complexity, making it computationally expensive and time-consuming. In practical applications of example search in multi-label spatial datasets, similarity measures are required that balance accuracy and speed, while also considering the multi-label nature of the data points. 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 existing technology.

[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 includes 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 division parameter θ. θ ×2 θ The density distribution information within 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: multi-label spatial dataset D i The corresponding multi-channel image I i Convert to grayscale image GI i , respectively using mean hashing, difference hashing and perceptual hashing methods to generate the multi-label spatial dataset hash string tuple h i ,The multi-label spatial data in the spatial data warehouse constitutes a set of hash string tuples H;

[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 them.

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

[0012] Step 1.1, for In the minimum circumscribed square area, the 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 Location point density value The calculation formula is Get the 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 step 2 maps the density distribution information of the multi-label spatial dataset into a quasi-multi-channel image, specifically comprising the following steps:

[0015] Step 2.1: Add the grid g in the l tag i,j,k 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 the multi-channel image I i The composite channel value in the j-th row and k-th column grid in, For the multi-label spatial dataset D i The label l of the j-th row and k-th column grid 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 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 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 the mean hashing method.

[0020]

[0021] Step 3.2: Grayscale image GI i Perform discrete cosine transform to obtain discrete cosine transform image, traverse each pixel of 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, thus using the perceptual hash processing method to obtain the perceptual hash string

[0022] Step 3.3: multi-channel image I i Compare the pixel values ​​of adjacent pixels pixel by pixel to generate a hash value. If the grayscale value of the current pixel is greater than the grayscale 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 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 Hamming distance, d2(e,i) is h e2 With h i2 Hamming distance, 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 calculates the Hamming distance and takes the average value to obtain the similarity between multi-label spatial data sets. This makes the calculation method have the advantages of the three hash methods and is less affected by the multi-label spatial data sets with special point set distribution.

[0030] Through this application, in the scenario of multi-label spatial dataset search, the accuracy and efficiency of the algorithm are taken into account, and the accuracy of the algorithm is improved while maintaining 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 showing the process of generating a hash string using a hash algorithm. DETAILED DESCRIPTION

[0035] In order to enable people in this technical field to better understand the solution of this application, the technical solution in the embodiments of this application will be clearly and completely described below in combination with the drawings in the embodiments of this application. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0036] like Figure 1 As shown, the present invention is a multi-label spatial dataset similarity measurement method based on hash, which is characterized by: the multi-label spatial dataset 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 spatial 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 division parameter θ. θ ×2 θ Grids of equal size are used to 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 convert the latitude and longitude coordinates into a plane coordinate system. The converted coordinates will be used for subsequent calculations.

[0039] Step 1.2, reference Figure 2 For each multi-label spatial dataset, determine its geographic range and calculate the minimum enclosing rectangle. Then, extend the width of the rectangle to the same distance at both ends so that it is equal to the length of the rectangle, thereby obtaining 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: Divide the area within the outer border into grids of appropriate size, depending on the desired search accuracy. Make each grid a square of the same area, and record its row and column numbers, starting from row 0 and column 0.

[0041] Step 1.4: In the minimum circumscribed square area, the 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 Location point density value The calculation formula is Get the 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 a multi-label spatial dataset into a multi-channel image involves the following steps:

[0045] Step 2.1: Add the grid g in the l tag i,j,k 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 the multi-channel image I i The composite channel value in the j-th row and k-th column grid in, For the multi-label spatial dataset D i The label l of the j-th row and k-th column grid 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 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: multi-label spatial dataset D i The corresponding multi-channel image I i Convert to grayscale image GI i , respectively using mean hashing, difference hashing and perceptual hashing methods to generate the 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 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 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 Perform standard binarization on the composite channel value of each grid; 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 discrete cosine transform image, traverse each pixel of 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, thus using the perceptual hash processing method to obtain the perceptual hash string

[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 at row u and column v 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 the DCT coefficients.

[0061] Step 3.2.3, arrange the binarized results of each grid in order 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 The perceptual 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: multi-channel image I i Compare the pixel values ​​of adjacent pixels pixel by pixel to generate a hash value. If the grayscale value of the current pixel is greater than the grayscale 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 spatial 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 dataset.

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

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

[0070] Step 3.4: Generate 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 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 Hamming distance, d2(e,i) is h e2 With h i2 Hamming distance, 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 outer bounding box of a multi-label spatial dataset is shown in the figure. The outer bounding box is obtained by extending 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 bounding box. Therefore, the distribution of spatial points of different multi-label spatial datasets can be compared by overlapping their outer bounding boxes.

[0075] Figure 3 The process of mapping a three-label spatial dataset into a three-channel image is shown in the figure. Calculating the density value of spatial points with each label requires a large amount of 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 article shows a process of generating hash strings using a hash algorithm. 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 multi-channel image. This innovative method effectively visualizes the distribution characteristics of a set of spatial coordinate points, making the complex relationship between the 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 reducing the deviation that may be caused by a single hashing method, and making 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 foregoing is merely an embodiment of the present invention and is not intended to limit the present invention. It will be apparent to those skilled in the art that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.

Claims

1. A hash-based similarity measurement method for multi-label spatial datasets, characterized by: The hash-based multi-label spatial dataset similarity measurement method comprises the following steps: Step 1: Data preprocessing: Given a spatial data warehouse , For a multi-label spatial dataset with labels, find The minimum circumscribed square of the location point, according to the partition parameter , and divide their respective square areas into Grids of equal size are used to preprocess the multi-label spatial dataset and obtain the density distribution information within all grids; Step 2: Multi-channel image generation: Each multi-label space dataset 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 is generated. ; Specifically include the following steps: Step 2.1: , label Medium-class multi-channel images No. Rank Column Grid Location point density value One-to-one mapping to multi-label space dataset No. Rank Column grid labels The "color channel value" of the corresponding channel : , get the numerical matrix of the channel , traverse , generate a set of numerical matrices for all channels ,in, is the total number of label categories, , represents a set of density matrices; Step 2.2: Get the grid Composite channel value within ,in, For label The weight coefficient of Step 2.3: Multi-label spatial dataset Each grid Corresponding to a class multi-channel image Composite channel value , traverse all grids and get a multi-channel matrix , thus obtaining a multi-channel image ; Step 3, hash string generation: multi-label spatial dataset The corresponding multi-channel image Convert to grayscale image , respectively using mean hashing, difference hashing and perceptual hashing methods to generate hash string tuples of multi-label spatial datasets , the multi-label spatial data in the spatial data warehouse consists of a set of hash string tuples ; Step 4: Similarity calculation: The sample multi-label spatial dataset used for query Generate sample dataset hash string tuple , calculate the sample multi-label space dataset With multi-label spatial datasets The similarity between them.

2. The method for measuring similarity of multi-label spatial datasets based on hashing according to claim 1, characterized in that: The step 3 specifically includes the following steps: Step 3.1: Multi-label spatial dataset Generated multi-channel image Convert to grayscale image , calculate the grayscale image Gray mean , traverse the grayscale image The gray value of each pixel is compared with the gray mean Size relationship, if the gray value of each pixel is greater than or equal to the gray mean It is expressed as , if the gray value of each pixel is less than the gray mean It is expressed as , thus using the mean hashing method to obtain the mean hash string ; Step 3.2: Grayscale image Perform discrete cosine transform to obtain discrete cosine transform image, traverse each pixel of discrete cosine transform, and compare the discrete cosine transform coefficient of each pixel with the average value of discrete cosine transform coefficient. Compare, if the discrete cosine transform coefficient of each pixel is greater than or equal to the average discrete cosine transform coefficient It is recorded as , if the DCT coefficient of each pixel is less than the average DCT coefficient It is recorded as , thus using the perceptual hashing method to obtain the perceptual hash string ; Step 3.3: Classify multi-channel images Compare the pixel values ​​of adjacent pixels pixel by pixel to generate a hash value. If the grayscale value of the current pixel is greater than the grayscale value of the pixel on the right, it is recorded as , otherwise , because it is a pairwise comparison, the number of columns in the converted matrix becomes , while the number of rows remains , thus using the difference hashing method to obtain the difference hash string ; Step 3.4: Generate a multi-label spatial dataset Hash string tuple , traverse all multi-label spatial datasets in the spatial data warehouse and obtain a set of hash string tuples .

3. The method for measuring similarity of multi-label spatial datasets based on hashing according to claim 1, characterized in that: In step 4, the sample multi-label spatial dataset used for query Generated sample dataset hash string tuple ,for , then the similarity between the two original multi-label space datasets is expressed as: , in, for and The Hamming distance of for and The Hamming distance of for and Hamming distance, the greater the similarity, the higher the similarity between the two, and vice versa.

4. The method for measuring similarity of multi-label spatial datasets based on hashing according to claim 1, characterized in that: The step 1 of preprocessing data to obtain the density distribution information of the entire network specifically includes the following steps: Step 1.1, for Statistical minimum circumscribed square area, multi-label spatial dataset With the same label And fall into Rank Column Grid The number of locations in With labels in multi-label spatial datasets The total number of location points ,in ; Step 1.2: Calculate labels Medium Grid Location point density value , the calculation formula is , get a multi-label spatial dataset Tags Density matrix in the grid , traverse all labels to generate a multi-label spatial dataset The density matrix collection of all labels .

Citation Information

Patent Citations

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

    US20200210888A1

  • Unsupervised HASH generation system

    WO2023149588A1