High-dimensional data similarity connection query method and device based on mapping space division

By mapping high-dimensional data to one-dimensional space and dividing subspaces to obtain candidate data pairs, it solves the problem of low efficiency in high-dimensional data similarity connection queries and achieves efficient similarity queries.

CN108846067BInactive Publication Date: 2024-10-18LUOYANG NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201810577149.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-06-05
Publication Date
2024-10-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

High-dimensional data similarity join query has high computational complexity in large-scale data, resulting in low query efficiency, and traditional methods cannot meet the performance requirements.

Method used

By mapping high-dimensional data to one-dimensional space and dividing the subspace according to the preset distance threshold, determining the subspace number corresponding to the data, obtaining candidate data pairs, calculating the original distance to obtain similarity query results, reducing computational complexity and reducing Number of candidate results.

Benefits of technology

It improves the efficiency of high-dimensional data similarity connection queries. By mapping high-dimensional data to one-dimensional space and dividing subspaces, the computational complexity is reduced and the number of candidate results is reduced, thereby improving query efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN108846067B_ABST
    Figure CN108846067B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a high-dimensional data similarity connection query method and device based on mapping space division. The method includes obtaining high-dimensional original data and mapping the original data to a one-dimensional space; determining a second distance threshold according to a first distance threshold and a chi-square distribution property, and dividing the one-dimensional space into multiple subspaces according to the second distance threshold; determining the number of the subspace corresponding to each original data; obtaining candidate data pairs according to the second distance threshold and the number of the subspace; calculating the original distance of the candidate data pair and comparing the original distance with the first distance threshold to obtain a similarity query result. The device is used to execute the method. The embodiment of the present invention maps the high-dimensional original data to a one-dimensional space, divides the original data in the one-dimensional space according to the second distance threshold, and then performs a similarity query, thereby reducing the computational complexity and the number of candidate results, thereby improving the query efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a high-dimensional data similarity connection query method and device based on mapping space division. Background Art

[0002] With the development of data collection technology and the advancement of data collection equipment, the scale, accuracy and dimension of data are increasing rapidly in an unprecedented way. The dimensions of many types of data can reach thousands or even tens of thousands of dimensions, such as graphics, images, videos, trajectories, time series, etc. The purpose of high-dimensional data similarity connection query is to find data pairs whose similarity is greater than or equal to a given similarity threshold or whose distance is less than or equal to a given distance threshold from massive high-dimensional data sets. It has important applications in many fields, such as image clustering, document deduplication, similar video detection, etc.

[0003] Similarity connection query of massive high-dimensional data is a computationally intensive operation. As the scale and dimension of data continue to increase, traditional centralized processing methods and index-based algorithms can no longer meet performance requirements.

[0004] Similarity query is an important operation with wide applications. Currently, many researchers have conducted extensive research on it. In order to solve the performance and scalability problems faced by large-scale data similarity connection queries, the existing technology uses the MapReduce framework to solve them. However, for high-dimensional data, when similarity queries are performed through the MapReduce framework, the computational complexity is high, which leads to low query efficiency. Summary of the invention

[0005] In view of this, an object of an embodiment of the present invention is to provide a high-dimensional data similarity connection query method and device based on mapping space partitioning to solve the above technical problems.

[0006] In a first aspect, an embodiment of the present invention provides a high-dimensional data similarity connection query method based on mapping space partition, comprising:

[0007] Obtain all high-dimensional raw data to be queried, and map the raw data into a one-dimensional space;

[0008] Determine a second distance threshold according to a preset first distance threshold and a chi-square distribution property, and divide the one-dimensional space according to the second distance threshold to obtain a plurality of subspaces;

[0009] Determine the number of the subspace corresponding to each of the original data;

[0010] Obtaining a candidate data pair corresponding to the original data according to the second distance threshold and the number of the subspace;

[0011] The original distance of the candidate data pair is calculated, and the original distance is compared with the first distance threshold to obtain a similarity query result.

[0012] Further, the determining the number of the subspace corresponding to each of the original data includes:

[0013] Calculate the mapping value of each of the original data in the one-dimensional space;

[0014] The number of the subspace corresponding to each of the original data is determined according to the mapping value and the second distance threshold.

[0015] Further, the determining the number of the subspace corresponding to each of the original data according to the mapping value and the second distance threshold includes:

[0016] According to the formula The number of the subspace corresponding to each of the original data is calculated, where:

[0017] S i is the number of the subspace corresponding to the i-th original data, π1(v i ) is the mapping value corresponding to the i-th original data, i is a positive integer, and kε is the second distance threshold.

[0018] Further, obtaining the candidate data pair corresponding to the original data according to the second distance threshold and the number of the subspace includes:

[0019] Get a subspace S in turn i The original data in the subspace S i The original data in the adjacent numbered subspaces and the subspace S i The original data and the subspace S i Any two of the original data in adjacent subspaces constitute the candidate data pair.

[0020] Furthermore, the comparing the original distance with the first distance threshold to obtain a similarity query result includes:

[0021] If it is determined that the original distance is less than or equal to the first distance threshold, the candidate data corresponding to the original distance is used as the similarity query result.

[0022] In a second aspect, an embodiment of the present invention provides a high-dimensional data similarity connection query device based on mapping space partition, comprising:

[0023] A mapping module, used to obtain all high-dimensional raw data to be queried, and map the raw data into a one-dimensional space;

[0024] A space division module, used to determine a second distance threshold according to a preset first distance threshold and a chi-square distribution property, and divide the one-dimensional space according to the second distance threshold to obtain a plurality of subspaces;

[0025] A subspace number determination module, used to determine the number of the subspace corresponding to each of the original data;

[0026] A candidate data pair acquisition module, configured to obtain a candidate data pair corresponding to the original data according to the second distance threshold and the number of the subspace;

[0027] The comparison module is used to calculate the original distance of the candidate data pair, and compare the original distance with the first distance threshold to obtain a similarity query result.

[0028] Furthermore, the determination module is specifically used to:

[0029] Calculate the mapping value of each of the original data in the one-dimensional space;

[0030] The number of the subspace corresponding to each of the original data is determined according to the mapping value and the second distance threshold.

[0031] Furthermore, the determination module is specifically used to:

[0032] According to the formula The number of the subspace corresponding to each of the original data is calculated, where:

[0033] S i is the number of the subspace corresponding to the i-th original data, π1(v i ) is the mapping value corresponding to the i-th original data, i is a positive integer, and kε is the second distance threshold.

[0034] Furthermore, the candidate data pair acquisition module is specifically used to:

[0035] Get a subspace S in turn i The original data in the subspace S i The original data in the adjacent subspace and the subspace S i The original data and the subspace S i Any two of the original data in adjacent subspaces constitute the candidate data pair.

[0036] Furthermore, the comparison module is specifically used for:

[0037] If it is determined that the original distance is less than or equal to the first distance threshold, the candidate data corresponding to the original distance is used as the similarity query result.

[0038] In a third aspect, an embodiment of the present invention provides an electronic device, including: a processor, a memory, and a bus, wherein:

[0039] The processor and the memory communicate with each other via the bus;

[0040] The memory stores program instructions that can be executed by the processor, and the processor can execute the method steps of the first aspect by calling the program instructions.

[0041] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, including:

[0042] The non-transitory computer-readable storage medium stores computer instructions that cause the computer to perform the method steps of the first aspect.

[0043] The embodiment of the present invention maps high-dimensional raw data to a one-dimensional space, divides the one-dimensional space into multiple subspaces, obtains candidate data pairs corresponding to the raw data in each subspace, obtains the final similarity query result according to the original distance between the candidate data pairs, and divides the raw data in the one-dimensional space according to a second distance threshold, and then performs a similarity query, thereby reducing the computational complexity, reducing the number of candidate results, and improving the query efficiency. Other features and advantages of the present invention will be described in the subsequent description, and will become apparent in part from the description, or will be understood by implementing the embodiments of the present invention. The purposes and other advantages of the present invention can be achieved and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0045] Figure 1 A schematic diagram of a flow chart of a high-dimensional data similarity connection query method based on mapping space partitioning provided by an embodiment of the present invention;

[0046] Figure 2 A similarity connection query framework based on mapping space partitioning provided by an embodiment of the present invention;

[0047] Figure 3 A schematic diagram of the structure of a high-dimensional data similarity connection query device based on mapping space partitioning provided by an embodiment of the present invention;

[0048] Figure 4 This is a structural block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0049] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.

[0050] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0051] Figure 1 A flow chart of a high-dimensional data similarity connection query method based on mapping space partitioning provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method includes:

[0052] Step 101: Acquire all high-dimensional raw data to be queried, and map the raw data into a one-dimensional space.

[0053] In the specific implementation process, when performing similarity connection query on high-dimensional raw data, a similarity connection query framework based on mapping space partition can be used to perform the query. Figure 2 The similarity connection query framework based on mapping space partitioning provided by the embodiment of the present invention is as follows: Figure 2 As shown in the figure, the framework mainly includes three stages: mapping, filtering and verification. The device first obtains all the high-dimensional raw data to be queried, and maps these high-dimensional raw data to one-dimensional space. In the mapping stage, according to Theorem 1 and Theorem 2, the original data v in the d-dimensional space is dot-producted with a, where each element of the vector a is an independent and identically distributed random variable that obeys the standard normal distribution N(0,1), and is mapped to one-dimensional space.

[0054] It should be noted that high-dimensional data similarity join query (HDSJ) is a query that is performed on two data sets Q and R, where Q = {q1, q2, ..., q n1}, R = {r1, r2, ..., r n2}, q i is the i-th data point in set Q, q i = i1 ,q i2 ,...,q id >,r j is the jth data point in the set R, r j = <r j1 ,r j2 ,...,r jd >,q i , |Q|=n1,|R|=n2. Assuming the distance function is dist and the distance threshold is ε, the similarity connection query result of Q and R is all data pairs whose distance is not greater than ε, that is: HDSJ(Q,R)={ i ,r j >|q i ∈Q,r j ∈R,dist(q i ,r j )≤ε}. The distance function dist is defined as follows:

[0055]

[0056] Theorem 1: For any two d-dimensional vectors q i , Then g(q i )-g(r j ) obeys the normal distribution N(0,dist 2 (q i ,r j )).

[0057] Theorem 2: For any two vectors q i and r j , It obeys the chi-square distribution with m degrees of freedom, that is:

[0058] Step 102: Determine a second distance threshold according to a preset first distance threshold and a chi-square distribution property, and divide the one-dimensional space according to the second distance threshold to obtain a plurality of subspaces.

[0059] ​​In a specific implementation process, the second distance threshold kε can be determined according to the preset first distance threshold ε and the chi-square distribution property, wherein Theorem 3 includes the properties of the chi-square distribution, and Theorem 3 is: if Δ m (q i ,r j )>kε, then: P(dist(q i , r j )>ε)>1 - P(χ 2 >k 2 ). After calculating the second distance threshold, the one-dimensional space is divided into equal grids according to the second distance threshold, such as Figure 2 In the middle part, multiple subspaces S can be obtained i , i is a positive integer, and each subspace is numbered.

[0060] Step 103: Determine the serial number of the subspace corresponding to each of the original data.

[0061] In a specific implementation process, after the original data is mapped into a one-dimensional space, different original data fall into different positions in the one-dimensional space, so the number of each original data falling into its corresponding subspace can be determined.

[0062] Step 104: Obtain candidate data pairs corresponding to the original data according to the second distance threshold and the number of the subspace.

[0063] In the specific implementation process, according to Theorem 3, we can know that the i-th subspace S i The data in can only be similar to the data in its adjacent subspace, that is, similar to the data in the subspace S i The data of the adjacent subspace and the subspace S i The distance between the data in S is less than the second distance threshold. The data in other subspaces must be related to S. i The distance between the data in is greater than the second distance threshold, so there is no need to compare again, thereby improving the efficiency when filtering the data and achieving a better filtering effect. Since the subspace numbering is continuous, the candidate data pair corresponding to the original data can be obtained according to the second distance threshold and the subspace numbering. It can be understood that the so-called candidate data pair is composed of two original data that meet the conditions. And the obtained candidate data pairs are multiple.

[0064] Step 105: Calculate the original distance of the candidate data pair, and compare the original distance with the first distance threshold to obtain a similarity query result.

[0065] In the specific implementation process, Figure 2In the verification stage on the far right, the original distances corresponding to the two original data in each candidate data pair are calculated respectively, and then the original distances are compared with the first distance threshold, so that those that meet the conditions are retained and those that do not meet the conditions are eliminated, and finally the similarity query results are obtained.

[0066] The embodiment of the present invention maps high-dimensional original data to a one-dimensional space and divides the one-dimensional space into multiple subspaces, obtains candidate data pairs corresponding to the original data in each subspace, and obtains the final similarity query result according to the original distance between the candidate data pairs. Since the high-dimensional original data is mapped to a one-dimensional space and then a similarity query is performed, the computational complexity is greatly reduced, thereby improving the query efficiency.

[0067] Based on the above embodiment, the step of determining the serial number of the subspace corresponding to each of the original data includes:

[0068] Calculate the mapping value of each of the original data in the one-dimensional space;

[0069] The number of the subspace corresponding to each of the original data is determined according to the mapping value and the second distance threshold.

[0070] In the specific implementation process, for all the original data, the mapping value of the one-dimensional space corresponding to each original data is calculated, and then the number of each original data falling in the corresponding subspace is determined according to the mapping value corresponding to each original data and the second distance threshold. A common method is to divide the mapping value by the second distance threshold to obtain. For example, the number of the subspace corresponding to each original data can be calculated according to formula (2):

[0071]

[0072] Among them, S i is the number of the subspace corresponding to the i-th original data, π1(v i ) is the mapping value corresponding to the i-th original data, i is a positive integer, and kε is the second distance threshold.

[0073] The embodiment of the present invention determines and calculates the serial number of the subspace corresponding to each original data, thereby providing a basis for data filtering and improving the efficiency and effect of data filtering.

[0074] Based on the above embodiment, obtaining the candidate data pair corresponding to the original data according to the second distance threshold and the number of the subspace includes:

[0075] Get a subspace S in turn i The original data in the subspace S i The original data in the adjacent numbered subspaces and the subspace Si The original data and the subspace S i Any two of the original data in adjacent subspaces constitute the candidate data pair.

[0076] In the specific implementation process, when obtaining candidate data pairs, it is necessary to select each subspace in the one-dimensional space. Assuming that there are n subspaces in the one-dimensional space, for the vector corresponding to S1, it is only necessary to compare it with the original data corresponding to S1∪S2, that is, to combine the original data corresponding to S1∪S2 into candidate data pairs. i The original data corresponding to (n>i>1) only needs to be compared with S i-1 ∪S i ∪S i+1 The corresponding original data can be compared, that is, S i-1 ∪S i ∪S i+1 The corresponding original data are combined in pairs to form candidate data pairs. n The corresponding original data only needs to be compared with S n-1 ∪S n The corresponding original data can be compared, that is, S n-1 ∪S n The corresponding original data are combined in pairs to form candidate data pairs.

[0077] The embodiment of the present invention improves the efficiency of candidate data pair screening by forming candidate data pairs from two of the original data in adjacent subspaces and then judging whether the candidate data pairs belong to similarity query results, thereby improving the efficiency of data similarity connection query.

[0078] Based on the above embodiments, the step of comparing the original distance with the first distance threshold to obtain a similarity query result includes:

[0079] If it is determined that the original distance is less than or equal to the first distance threshold, the candidate data corresponding to the original distance is used as the similarity query result.

[0080] In the specific implementation process, according to formula (1), the original distance corresponding to the two original data in each candidate data pair can be calculated, and the original distance is compared with the first distance threshold. If the original distance is less than or equal to the first distance threshold, it means that the two original data in the candidate data pair meet the data similarity requirements, and the candidate data can be put into the similarity query result. On the contrary, if the original distance is greater than the first distance threshold, it means that the two original data in the candidate data pair do not meet the data similarity requirements, and the candidate data cannot be used as the similarity query result.

[0081] The embodiment of the present invention maps high-dimensional original data to a one-dimensional space and divides the one-dimensional space into multiple subspaces, obtains candidate data pairs corresponding to the original data in each subspace, and obtains the final similarity query result according to the original distance between the candidate data pairs. Since the high-dimensional original data is mapped to a one-dimensional space and then a similarity query is performed, the computational complexity is greatly reduced, thereby improving the query efficiency.

[0082] The embodiment of the present invention also provides a similarity connection query algorithm based on mapping space partitioning, and the specific algorithm is as follows:

[0083]

[0084]

[0085] Figure 3 A schematic diagram of a high-dimensional data similarity connection query device based on mapping space partitioning provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the device includes: a mapping module 301, a space division module 302, a subspace number determination module 303, a candidate data pair acquisition module 304 and a comparison module 305, wherein:

[0086] The mapping module 301 is used to obtain all high-dimensional original data to be queried, and map the original data to a one-dimensional space; the space division module 302 is used to determine a second distance threshold according to a preset first distance threshold and a chi-square distribution property, and divide the one-dimensional space according to the second distance threshold to obtain a plurality of subspaces; the subspace number determination module 303 is used to determine the number of the subspace corresponding to each of the original data; the candidate data pair acquisition module 304 is used to obtain the candidate data pairs corresponding to the original data according to the second distance threshold and the number of the subspace; the comparison module 305 is used to calculate the original distance of the candidate data pairs, and compare the original distance with the first distance threshold to obtain a similarity query result.

[0087] In the specific implementation process, the mapping module 301 first obtains all the high-dimensional raw data to be queried, and maps these high-dimensional raw data to a one-dimensional space. The space division module 302 can determine the second distance threshold kε according to the preset first distance threshold ε and the chi-square distribution property, and after calculating the second distance threshold, divide the one-dimensional space into equal grids according to the second distance threshold, such as Figure 2 In the middle part, multiple subspaces S can be obtained i, i is a positive integer, and each subspace is numbered. After mapping the original data to the one-dimensional space, different original data fall in different positions in the one-dimensional space, so the subspace number determination module 303 can determine the number of each original data falling in its corresponding subspace. The candidate data pair acquisition module 304 obtains the candidate data pair corresponding to the original data according to the second distance threshold and the subspace number. The comparison module 305 calculates the original distance corresponding to the two original data in each candidate data pair respectively, and then compares the original specific with the first distance threshold, so as to keep those that meet the conditions and eliminate those that do not meet the conditions, and finally obtain the similarity query result.

[0088] The embodiment of the present invention maps high-dimensional original data to a one-dimensional space and divides the one-dimensional space into multiple subspaces, obtains candidate data pairs corresponding to the original data in each subspace, and obtains the final similarity query result according to the original distance between the candidate data pairs. Since the high-dimensional original data is mapped to a one-dimensional space and then a similarity query is performed, the computational complexity is greatly reduced, thereby improving the query efficiency.

[0089] Based on the above embodiment, the determination module is specifically used for:

[0090] Calculate the mapping value of each of the original data in the one-dimensional space;

[0091] The number of the subspace corresponding to each of the original data is determined according to the mapping value and the second distance threshold.

[0092] Based on the above embodiment, the determination module is specifically used for:

[0093] According to the formula The number of the subspace corresponding to each of the original data is calculated, where:

[0094] S i is the number of the subspace corresponding to the i-th original data, π1(v i ) is the mapping value corresponding to the i-th original data, i is a positive integer, and kε is the second distance threshold.

[0095] Based on the above embodiment, the candidate data pair acquisition module is specifically used for:

[0096] Get a subspace S in turn i The original data in the subspace S i The original data in the adjacent subspace and the subspace S i The original data and the subspace S i Any two of the original data in adjacent subspaces constitute the candidate data pair.

[0097] Based on the above embodiments, the comparison module is specifically used for:

[0098] If it is determined that the original distance is less than or equal to the first distance threshold, the candidate data corresponding to the original distance is used as the similarity query result.

[0099] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method, and will not be described in detail here.

[0100] In summary, the embodiments of the present invention map high-dimensional original data to a one-dimensional space, divide the one-dimensional space into multiple subspaces, obtain candidate data pairs corresponding to the original data in each subspace, and obtain the final similarity query result according to the original distance between the candidate data pairs. Since the high-dimensional original data is mapped to a one-dimensional space and then a similarity query is performed, the computational complexity is greatly reduced, thereby improving the query efficiency.

[0101] Please refer to Figure 4 , Figure 4 The electronic device may include a query device 401 , a memory 402 , a storage controller 403 , a processor 404 , a peripheral interface 405 , an input / output unit 406 , an audio unit 407 , and a display unit 408 .

[0102] The memory 402, storage controller 403, processor 404, peripheral interface 405, input / output unit 406, audio unit 407, and display unit 408 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines. The query device 401 includes at least one software function module that can be stored in the memory 402 in the form of software or firmware or solidified in the operating system (OS) of the query device 401. The processor 404 is used to execute an executable module stored in the memory 402, such as a software function module or computer program included in the query device 401.

[0103] The memory 402 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electric erasable programmable read-only memory (EEPROM), etc. The memory 402 is used to store programs, and the processor 404 executes the program after receiving the execution instruction. The method executed by the server of the flow process definition disclosed in any of the embodiments of the present invention can be applied to the processor 404 or implemented by the processor 404.

[0104] The processor 404 may be an integrated circuit chip having the ability to process signals. The above-mentioned processor 404 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present invention may be implemented or executed. A general-purpose processor may be a microprocessor or the processor 404 may also be any conventional processor, etc.

[0105] The peripheral interface 405 couples various input / output devices to the processor 404 and the memory 402. In some embodiments, the peripheral interface 405, the processor 404 and the memory controller 403 can be implemented in a single chip. In other embodiments, they can be implemented by separate chips.

[0106] The input / output unit 406 is used to provide input data to the user to implement the interaction between the user and the server (or local terminal). The input / output unit 406 can be, but is not limited to, a mouse and a keyboard.

[0107] The audio unit 407 provides an audio interface to the user and may include one or more microphones, one or more speakers, and an audio circuit.

[0108] The display unit 408 provides an interactive interface (e.g., a user operation interface) between the electronic device and the user or is used to display image data for the user's reference. In this embodiment, the display unit 408 may be a liquid crystal display or a touch display. If it is a touch display, it may be a capacitive touch screen or a resistive touch screen that supports single-point and multi-point touch operations. Supporting single-point and multi-point touch operations means that the touch display can sense touch operations generated simultaneously from one or more positions on the touch display, and the sensed touch operations are handed over to the processor 404 for calculation and processing.

[0109] The peripheral interface 405 couples various input / output devices to the processor 404 and the memory 402. In some embodiments, the peripheral interface 405, the processor 404 and the memory controller 403 can be implemented in a single chip. In other embodiments, they can be implemented by separate chips.

[0110] The input and output unit 406 is used to provide input data to the user to realize the interaction between the user and the processing terminal. The input and output unit 406 can be, but is not limited to, a mouse and a keyboard.

[0111] Understandably, Figure 4 The structure shown is for illustration only, and the electronic device may also include Figure 4 More or fewer components as shown, or with Figure 4 Different configurations are shown. Figure 4 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0112] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0113] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0114] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0115] The above description is only a preferred 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 modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention. It should be noted that similar numbers and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0116] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0117] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

Claims

1. A high-dimensional data similarity connection query device based on mapping space partitioning, It is characterized in that include: A mapping module, used to obtain all high-dimensional raw data to be queried, and map the raw data into a one-dimensional space; The space division module is used to determine the second distance threshold according to the preset first distance threshold and the chi-square distribution property, and divide the one-dimensional space into equal grids according to the second distance threshold to obtain multiple subspaces, wherein the chi-square distribution property is: i The data of the adjacent subspace and the subspace S i The distance between the data in S is less than the second distance threshold. The data in other subspaces are i The distance between the data in is greater than a second distance threshold; The subspace number determination module is used to determine the number of the subspace corresponding to each of the original data, including: Calculate the mapping value of each of the original data in the one-dimensional space; Determine the number of the subspace corresponding to each of the original data according to the mapping value and the second distance threshold: According to the formula The number of the subspace corresponding to each of the original data is calculated, where: S i is the number of the subspace corresponding to the i-th original data, π 1 (v) i is the mapping value corresponding to the i-th original data, i is a positive integer, k ε is the second distance threshold; A candidate data pair acquisition module, used to obtain the candidate data pair corresponding to the original data according to the second distance threshold and the number of the subspace, includes: Get a subspace S in turn i The original data in the subspace S i The original data in the adjacent subspace and the subspace S i The original data and the subspace S i Any two of the original data in adjacent subspaces constitute the candidate data pair; The comparison module is used to calculate the original distance of the candidate data pair, and compare the original distance with the first distance threshold to obtain a similarity query result.

2. The device according to claim 1, It is characterized in that The comparison module is specifically used for: If it is determined that the original distance is less than or equal to the first distance threshold, the candidate data corresponding to the original distance is used as the similarity query result.

Citation Information

Patent Citations

  • Matching method based on generalization bi-direction similarity connection technique

    CN104166719A