Electronic apparatus and method for performing search based on inverted-index key using multi-level quantization and sliding window
Patent Information
- Application Number
- KR1020260045671
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2026-03-13
- Publication Date
- 2026-09-16
- Estimated Expiration
- 2045-11-21
Smart Images

Figure 112026030879504-PAT00002_ABST
Abstract
Description
Technology Field
[0001] The present disclosure relates to an electronic device and method for performing an efficient search of high-dimensional vector data, and more specifically, to an electronic device and method for performing an inverse index key-based search using multi-level quantization and a sliding window by verifying whether a match of quantized low-dimensional patterns is performed. Background Technology
[0002] With the advancement of artificial intelligence technology, methods of representing unstructured data such as images, text, and voice by embedding them into high-dimensional vectors are widely used. Since these embedding vectors have the characteristic that semantically similar data are distributed in close locations in vector space, vectors similar to a query vector can be efficiently found by performing a similarity search to find the vector most similar to a specific query vector among multiple vectors.
[0003] However, as the dimensionality of a vector increases, the computational load and latency can rise sharply due to the curse of dimensionality. Furthermore, directly calculating distances across the entire vector space leads to high memory usage and computational resource consumption in large datasets, making it difficult to provide real-time services.
[0004] To address this, conventional indexing techniques have utilized graph structures to shorten search paths, such as HNSW (Hierarchical Navigable Small World), or indexing methods that search in cluster units by course-quantizing vector spaces, such as IVF (Inverted File). However, graph-based indexes involve a complex and time-consuming construction process, while IVF, although capable of reducing index size, requires an additional re-ranking step to ensure precision, making it disadvantageous for real-time updates.
[0005] Therefore, the need has arisen for an invention capable of efficient dimensionality reduction and ensuring precision in high-dimensional vector spaces without using complex graphs or clustering structures. Prior art literature
[0006] Republic of Korea Registered Publication 2772554 B1(2025.02.20) The problem to be solved
[0007] The purpose of the embodiments disclosed in this disclosure is to provide an electronic device and method for performing an inverse index key-based search using multi-level quantization and a sliding window, wherein each dimensional component of a high-dimensional vector is multi-level quantized and a sliding window is applied to the quantized components to perform a search based on a low-dimensional pattern structure.
[0008] The problems that this disclosure aims to solve are not limited to those mentioned above, and other unmentioned problems will be clearly understood by a person skilled in the art from the description below. means of solving the problem
[0009] An electronic device for performing an inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure, for achieving the technical problem described above, comprises: a memory storing at least one process for performing an inverse index key-based search operation using multi-level quantization and a sliding window; and at least one processor that performs the operation according to the process. The at least one processor may be configured to quantize the component values of each dimension constituting a high-dimensional vector based on a threshold value according to a preset quantization level, apply a sliding window to the quantized component values of the dimension to generate an index sequence that combines the quantized component values of the dimension, map the index sequence to the index of the starting dimension of the high-dimensional vector to generate an index key, and store in a vector database an inverse index structure in which a list of identifiers of vectors including the index key is used as a value.
[0010] A method for performing an inverse index key-based search using multi-level quantization and a sliding window, performed by a processor of a device according to the present disclosure to achieve the technical problem described above, wherein the method comprises: a step of quantizing the component values of each dimension constituting a high-dimensional vector based on a threshold value according to a preset quantization level; a step of generating an index sequence by applying a sliding window to the quantized component values of the dimension to generate an index sequence that combines the quantized component values of the dimension; a step of generating an index key by mapping the index sequence to the index of the starting dimension of the high-dimensional vector; and a step of storing a vector database in an inverse index structure with a list of identifiers of vectors including the index key as a value.
[0011] In addition to this, a computer program stored on a computer-readable recording medium for implementing the present disclosure may be further provided.
[0012] In addition to this, a computer-readable recording medium for recording a computer program for implementing the present disclosure may be further provided. Effects of the invention
[0013] According to the aforementioned means for solving the problem of the present disclosure, by utilizing an index key generated through a sliding window and components quantized at multiple levels before performing direct distance calculation in the entire dimension of a high-dimensional vector, the effect of providing search results with low response latency while storing more vectors in the same hardware resources is provided.
[0014] The effects of the present disclosure are not limited to those mentioned above, and other unmentioned effects will be clearly understood by a person skilled in the art from the description below. Brief explanation of the drawing
[0015] FIG. 1 is a simplified block diagram illustrating the configuration of an electronic device that performs inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure. FIG. 2 is a flowchart illustrating a method of an electronic device for performing inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure. FIG. 3 is a table illustrating quantization according to a threshold value of an electronic device that performs inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure. FIG. 4 is a table illustrating an index sequence according to a window of an electronic device that performs inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure. FIG. 5 is an embodiment showing key-values of an electronic device performing inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure. FIG. 6 is a block diagram illustrating the search process of an electronic device that performs inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure. FIG. 7 is a table showing the analysis process for setting threshold values of an electronic device that performs inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure. FIG. 8 is a process diagram illustrating the selection of a sliding window method of an electronic device that performs inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure. FIG. 9 is a process diagram illustrating sliding window size selection options of an electronic device that performs inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure. FIG. 10 is a process diagram illustrating an index density control option of a sliding window of an electronic device that performs inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure. FIG. 11 is an embodiment illustrating an index density control process of an electronic device that performs inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure. FIG. 12 is a block diagram illustrating distributed storage of an electronic device that performs inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure. Specific details for implementing the invention
[0016] Throughout this disclosure, the same reference numerals denote the same components. This disclosure does not describe all elements of the embodiments, and general content in the art to which this disclosure pertains or content that overlaps between embodiments is omitted. The terms 'part, module, component, block' as used in the specification may be implemented in software or hardware, and depending on the embodiments, a plurality of 'parts, modules, components, blocks' may be implemented as a single component, or a single 'part, module, component, block' may include a plurality of components.
[0017] Throughout the specification, when a part is described as being "connected" to another part, this includes not only cases where they are directly connected but also cases where they are indirectly connected, and indirect connections include connections made via a wireless communication network.
[0018] Furthermore, when it is stated that a part "includes" a certain component, this means that, unless specifically stated otherwise, it does not exclude other components but may include additional components.
[0019] Throughout the specification, when it is stated that a component is located "on" another component, this includes not only cases where a component is in contact with another component, but also cases where another component exists between the two components.
[0020] The terms first, second, etc. are used to distinguish one component from another, and the components are not limited by the aforementioned terms.
[0021] Singular expressions include plural expressions unless there is an obvious exception in the context.
[0022] In each step, identification codes are used for convenience of explanation and do not describe the order of the steps; the steps may be performed differently from the specified order unless a specific order is clearly indicated in the context.
[0023] The operating principles and embodiments of the present disclosure will be described below with reference to the attached drawings.
[0024] In this specification, the term "device according to the present disclosure" includes all various devices capable of performing computational processing and providing results to a user. For example, the device according to the present disclosure may include all of a computer, a server device, and a portable terminal, or may be in the form of any one of these.
[0025] Here, the computer may include, for example, a notebook, desktop, laptop, tablet PC, slate PC, etc. equipped with a web browser.
[0026] The above server device is a server that processes information by communicating with an external device, and may include an application server, a computing server, a database server, a file server, a game server, a mail server, a proxy server, and a web server.
[0027] The above portable terminal may include, for example, all types of handheld-based wireless communication devices such as PCS (Personal Communication System), GSM (Global System for Mobile communications), PDC (Personal Digital Cellular), PHS (Personal Handyphone System), PDA (Personal Digital Assistant), IMT (International Mobile Telecommunication)-2000, CDMA (Code Division Multiple Access)-2000, W-CDMA (W-Code Division Multiple Access), WiBro (Wireless Broadband Internet) terminals, smartphones, etc., as well as wearable devices such as watches, rings, bracelets, anklets, necklaces, glasses, contact lenses, or head-mounted devices (HMDs).
[0028] Functions related to artificial intelligence according to the present disclosure are operated through a processor and memory. The processor may be composed of one or more processors. In this case, the one or more processors may be general-purpose processors such as CPUs, APs, and DSPs (Digital Signal Processors), graphics-dedicated processors such as GPUs and VPUs (Vision Processing Units), or artificial intelligence-dedicated processors such as NPUs. The one or more processors control the processing of input data according to predefined operation rules or artificial intelligence models stored in memory. Alternatively, if the one or more processors are artificial intelligence-dedicated processors, the artificial intelligence-dedicated processors may be designed with a hardware structure specialized for processing a specific artificial intelligence model.
[0029] The predefined operating rules or artificial intelligence models are characterized by being created through learning. Here, being created through learning means that a predefined operating rules or artificial intelligence models configured to perform desired characteristics (or objectives) are created by a basic artificial intelligence model being trained using multiple learning data by a learning algorithm. Such learning may be performed on the device itself where the artificial intelligence according to the present disclosure is executed, or it may be performed through a separate server and / or system. Examples of learning algorithms include supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but are not limited to the examples described above.
[0030] An artificial intelligence model may be composed of multiple neural network layers. Each of the multiple neural network layers has multiple weight values and performs neural network operations through operations between the results of previous layers and the multiple weights. The multiple weights possessed by the multiple neural network layers can be optimized based on the learning results of the artificial intelligence model. For example, the multiple weights may be updated so that the loss value or cost value obtained from the artificial intelligence model during the learning process is reduced or minimized. Artificial neural networks may include deep neural networks (DNNs), such as Convolutional Neural Networks (CNNs), Deep Neural Networks (DNNs), Recurrent Neural Networks (RNNs), Restricted Boltzmann Machines (RBMs), Deep Belief Networks (DBNs), Bidirectional Recurrent Deep Neural Networks (BRDNNs), or Deep Q-Networks, but are not limited to the examples mentioned above.
[0031] According to an exemplary embodiment of the present disclosure, a processor can implement artificial intelligence. Artificial intelligence refers to a machine learning method based on an artificial neural network that enables a machine to learn by mimicking human biological neurons. Methodologies of artificial intelligence can be classified according to the learning method into supervised learning, where input and output data are provided together as training data and the solution (output data) to the problem (input data) is predetermined; unsupervised learning, where only input data is provided without output data and the solution (output data) to the problem (input data) is not predetermined; and reinforcement learning, where a reward is given from an external environment whenever an action is taken from the current state, and learning proceeds in a direction that maximizes such reward. In addition, artificial intelligence methodologies can be classified according to the architecture, which is the structure of the learning model. The architectures of widely used deep learning technologies can be classified into Convolutional Neural Networks (CNN), Recurrent Neural Networks (RNN), Transformers, and Generative Adversarial Networks (GAN).
[0032] The device and system may include an artificial intelligence model. The artificial intelligence model may be a single model or may be implemented as multiple models. The artificial intelligence model may be composed of a neural network (or artificial neural network) and may include statistical learning algorithms that mimic biological neurons in machine learning and cognitive science. A neural network may refer to a model that possesses problem-solving capabilities by having artificial neurons (nodes) that form a network through synaptic connections and change the strength of synaptic connections through learning. The neurons of a neural network may include combinations of weights or biases. A neural network may include one or more layers composed of one or more neurons or nodes. For example, the device may include an input layer, a hidden layer, and an output layer. The neural network constituting the device can infer a result (output) to be predicted from an arbitrary input by changing the weights of the neurons through learning.
[0033] The processor can create a neural network, train or learn a neural network, perform computations based on received input data, generate an information signal based on the results of the computation, or retrain the neural network. Neural network models may include, but are not limited to, various types of models such as Convolutional Neural Networks (CNN), Region with Convolutional Neural Networks (R-CNN), Region Proposal Networks (RPN), Recurrent Neural Networks (RNN), Stacking-based Deep Neural Networks (S-DNN), State-Space Dynamic Neural Networks (S-SDNN), Deconvolutional Networks, Deep Belief Networks (DBN), Restricted Boltzmann Machines (RBM), Fully Convolutional Networks, Long Short-Term Memory Networks (LSTM), and Classification Networks, such as GoogleNet, AlexNet, and VGG Network. The processor may include one or more processors to perform computations according to the neural network models. For example, a neural network is a deep neural It may include a network (Deep Neural Network).
[0034] Neural networks include CNN (Convolutional Neural Network), RNN (Recurrent Neural Network), perceptron, multilayer perceptron, FF (Feed Forward), RBF (Radial Basis Function), DFF (Deep Feed Forward), LSTM (Long Short Term Memory), GRU (Gated Recurrent Unit), AE (Auto Encoder), VAE (Variational Auto) Encoder), DAE (Denoising Auto Encoder), SAE (Sparse Auto Encoder), MC (Markov Chain), HN (Hopfield Network), BM (Boltzmann Machine), RBM (Restricted Boltzmann Machine), DBN (Deep Belief Network), DCN (Deep Convolutional Network), DN (Deconvolutional Network), DCIGN (Deep Convolutional Inverse Graphics Network), GAN (Generative Adversarial Network), LSM (Liquid State Machine), ELM (Extreme Learning Machine), ESN (Echo A person skilled in the art will understand that any neural network may be included, but is not limited to, State Network, Deep Residual Network, Differential Neural Computer, Neural Turing Machine, Capsule Network, Kohonen Network, and Attention Network.
[0035] According to an exemplary embodiment of the present disclosure, the processor comprises a Convolutional Neural Network (CNN) such as GoogleNet, AlexNet, VGG Network, Region with Convolutional Neural Network (R-CNN), Region Proposal Network (RPN), Recurrent Neural Network (RNN), Stacking-based Deep Neural Network (S-DNN), State-Space Dynamic Neural Network (S-SDNN), Deconvolutional Network, Deep Belief Network (DBN), Restricted Boltzmann Machine (RBM), Fully Convolutional Network, Long Short-Term Memory (LSTM) Network, Classification Network, Generative Modeling, eXplainable AI, Continual AI, Representation Learning, AI for Material Design, BERT, SP-BERT, MRC / QA, Text Analysis, Dialog System, GPT-3, GPT-4 for Natural Language Processing, Visual Analytics, Visual Understanding, Video Synthesis for Vision Processing, Anomaly Detection, Prediction, Time-Series Forecasting, Optimization for ResNet Data Intelligence, Various artificial intelligence structures and algorithms, such as recommendation and data creation, may be used, but are not limited thereto. Hereinafter, embodiments of the present disclosure will be described in detail with reference to the attached drawings.
[0036] FIG. 1 is a simplified block diagram illustrating the configuration of an electronic device that performs inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure.
[0037] Referring to FIG. 1, the electronic device (100) according to the present disclosure may include an input / output module (110), a communication module (120), a memory (130), and a processor (140). Hereinafter, the electronic device (100) is an electronic device that performs inverse index key-based search using multi-level quantization and a sliding window, and the method thereof is assumed to be implemented through the electronic device (100).
[0038] The input / output module (110) may be various interfaces or connection ports that receive user input or output information to the user. The input / output module (110) may be divided into an input module and an output module.
[0039] The input module receives user input from the user. The input module is for inputting video information (or signals), audio information (or signals), data, or information input by the user, and may include at least one of at least one camera, at least one microphone, and a user input unit. Voice data or image data collected by the input unit may be analyzed and processed into a user control command.
[0040] User input can take various forms, including key input, touch input, and voice input. Examples of input modules capable of receiving such user input include traditional keypads, keyboards, and mice; as well as touch sensors that detect user touch; microphones that receive voice signals; cameras that recognize gestures through image recognition; proximity sensors consisting of light or infrared sensors that detect user approach; motion sensors that recognize user movements using accelerometers or gyroscopes; and all other diverse forms of input means that detect or receive various types of user input. This is a comprehensive concept.
[0041] Here, the touch sensor can be implemented as a piezoelectric or capacitive touch sensor that detects touch through a touch panel or touch film attached to the display panel, or as an optical touch sensor that detects touch by an optical method. In addition, the input module may be implemented in the form of an input interface (USB port, PS / 2 port, etc.) that connects an external input device to receive user input, instead of a device that detects user input itself.
[0042] The output module can output various types of information and provide it to the user. The output module is a comprehensive concept that includes a display for outputting video, a speaker for outputting sound (and / or an amplifier connected thereto), a haptic device for generating vibration, and various other forms of output means. In addition, the output module may be implemented in the form of a port-type output interface that connects the individual output means described above.
[0043] For example, an output module in the form of a display can display text, still images, and videos. The term "display" refers to a broad concept of an image display device that includes all types of devices capable of performing image output functions, such as Liquid Crystal Displays (LCDs), Light Emitting Diode (LED) displays, Organic Light Emitting Diode (OLED) displays, Flat Panel Displays (FPDs), transparent displays, Curved Displays, flexible displays, 1D displays, holographic displays, projectors, and others. Such a display may also take the form of a touch display integrated with the touch sensor of an input module.
[0044] In other words, the input / output module (110) can receive user input or provide output to the user based on a user interface.
[0045] The communication module (120) can communicate with an external device. Accordingly, the device can transmit and receive information with an external device through the communication module. For example, the device can communicate with an external device using the communication module so that information stored and generated within the electric vehicle charging management system is shared. The communication module (120) may include, for example, at least one of a wired communication module, a wireless communication module, a short-range communication module, and a location information module.
[0046] Here, communication, that is, the transmission and reception of data, can be performed via wired or wireless means. To this end, the communication module may be composed of a wired communication module that connects to the internet, etc., via a LAN (Local Area Network); a mobile communication module that connects to a mobile communication network via a mobile communication base station to transmit and receive data; a short-range communication module that uses a WLAN (Wireless Local Area Network) family communication method such as Wi-Fi or a WPAN (Wireless Personal Area Network) family communication method such as Bluetooth or Zigbee; a satellite communication module that uses a GNSS (Global Navigation Satellite System) such as GPS (Global Positioning System); or a combination thereof. The wireless communication technology used for communication may include NB-IoT (Narrowband Internet of Things) for low-power communication. In this case, for example, NB-IoT technology may be an example of LPWAN (Low Power Wide Area Network) technology and may be implemented according to standards such as LTE Cat (category) NB1 and / or LTE Cat NB2, but is not limited to the names mentioned above. Additionally, or generally, wireless communication technology implemented in wireless devices according to various embodiments may perform communication based on LTE-M technology. In this case, for example, LTE-M technology may be an example of LPWAN technology and may be referred to by various names such as eMTC (enhanced Machine Type Communication).For example, LTE-M technology may be implemented in at least one of various standards such as 1) LTE CAT 0, 2) LTE Cat M1, 3) LTE Cat M2, 4) LTE non-BL (non-Bandwidth Limited), 5) LTE-MTC, 6) LTE Machine Type Communication, and / or 7) LTE M, and is not limited to the names mentioned above. Additionally or generally, wireless communication technology implemented in wireless devices according to various embodiments may include at least one of ZigBee, Bluetooth, and Low Power Wide Area Network (LPWAN) for low-power communication, and is not limited to the names mentioned above. As an example, ZigBee technology can create personal area networks (PANs) related to small / low-power digital communication based on various standards such as IEEE 802.15.4 and may be referred to by various names.
[0047] The memory (130) can store various types of information. The memory can store data temporarily or semi-permanently. For example, the memory may store an operating system (OS) for operating the first device and / or the second device, data for hosting a website, or data regarding a program or application (e.g., a web application) for generating Braille. In addition, the memory may store modules in the form of computer code as described above.
[0048] Examples of memory (130) may include a hard disk drive (HDD), a solid state drive (SSD), flash memory, ROM (Read-Only Memory), and RAM (Random Access Memory). These memories may be provided as built-in or removable types.
[0049] The processor (140) controls the overall operation of the electronic device (100). To this end, the processor (140) performs computation and processing of various information and can control the operation of the components of the first device and / or the second device.
[0050] The processor (140) may be implemented as a computer or a similar device according to hardware, software, or a combination thereof. Hardware-wise, the processor (140) may be provided in the form of an electronic circuit that processes electrical signals to perform control functions, and software-wise, it may be provided in the form of a program that drives the hardware processor. Meanwhile, unless otherwise specifically mentioned in the following description, the operation of the first device and / or the second device may be interpreted as being performed by the control of the processor (140). That is, the modules may be interpreted as the processor (140) controlling the first device and / or the second device to perform the following operations.
[0051] The processor (140) may be implemented with a memory that stores data for an algorithm or a program that reproduces the algorithm for controlling the operation of components within the device, and at least one sub-processor (not shown) that performs the aforementioned operation using the data stored in the memory. In this case, the memory and the processor may each be implemented as separate chips. Alternatively, the memory and the processor may be implemented as a single chip.
[0052] Additionally, the processor (140) may control a combination of any one or more of the components described above in order to implement various embodiments according to the present disclosure, which will be described in the drawings below, on the device.
[0053] FIG. 2 is a flowchart illustrating a method of an electronic device for performing an inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure; FIG. 3 is a table illustrating quantization according to a threshold value of an electronic device for performing an inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure; FIG. 4 is a table illustrating an index sequence according to a window of an electronic device for performing an inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure; and FIG. 5 is an embodiment showing key-values of an electronic device for performing an inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure.
[0054] An electronic device (100) for performing an inverse index key-based search using multi-level quantization and a sliding window according to one embodiment of the present disclosure may include a memory (130) storing at least one process for performing an inverse index key-based search operation using multi-level quantization and a sliding window, and at least one processor (140) for performing the operation according to said process.
[0055] As illustrated in FIG. 2, the at least one processor (140) may be configured to perform the steps of: quantizing the component values of each dimension constituting a high-dimensional vector based on a threshold value according to a preset quantization level (S210); applying a sliding window to the quantized component values of the dimension to generate an index sequence that combines the quantized component values of the dimension (S220); mapping the index sequence to the index of the starting dimension of the high-dimensional vector to generate an index key (S230); and storing the index key in a vector database in an inverted index structure with a list of identifiers of vectors containing the index key as a value (S240).
[0056] In step (S210), for each dimension component of the input high-dimensional vector, a set of thresholds based on distribution-based analysis or predefined criteria can be applied to convert the component values into multi-level quantized values.
[0057] For example, as shown in the table (30) in FIG. 3, a threshold value can be determined as delta, and the component value of each dimension of a high-dimensional vector can be compared with said delta. A negative delta or less can be converted to a quantization value of -1, a delta greater than or equal to a negative delta or less can be converted to a quantization value of 0, and a delta greater than a positive delta can be converted to a quantization value of 1.
[0058] In other words, by using at least one threshold value to convert each dimensional component of a high-dimensional vector into a simple integer, the continuous value distribution in high-dimensional space can be mapped to three discrete values, thereby lightweighting the vector.
[0059] Additionally, at least one processor (140) may be configured to reset the quantization level according to the data type of the high-dimensional vector. Although FIG. 3 distinguishes by setting three quantization levels, the quantization levels may be set differently by considering data information such as data type, data distribution, and data characteristics.
[0060] In step (S220), at least one processor (140) may apply a continuous window that sequentially combines M consecutive dimensional components of a quantized vector after setting a window size M, or apply a sliding window that selects dimensions with specific intervals by applying a discontinuous rule and forms the result into a sequence.
[0061] For example, as shown in the table (40) in FIG. 4, when M=4, for a continuous window, an index sequence can be generated by grouping continuous dimensions consisting of continuous integers such as [1,2,3,4] and [2,3,4,5]. For a discontinuous window, an index sequence can be generated by sampling non-continuous but constant-spaced continuous dimensions such as [1,3,5,7] and [2,4,6,8] according to a fixed-spacing window, or an index sequence such as [2,8,15,31] can be generated according to hash-based dimension selection. For a discontinuous window, an index sequence can also be generated by multi-resolution-based dimension selection using different sampling strategies depending on the location, where the front part of the vector is continuously dense and the back part is discontinuously sparse.
[0062] In other words, an index sequence can be generated by applying a sliding window of size M along each dimension of a high-dimensional vector and combining quantized values of continuous dimensions. The quantized values of continuous dimensions can be used to filter the index sequence based on local patterns within the vector using a continuous or discontinuous window.
[0063] As an example, the sliding window may combine a continuous window and a discontinuous window. A continuous window may be applied to data where local correlations between adjacent dimensions are important, while a discontinuous window may be applied to data where specific patterns appear sparsely across all dimensions.
[0064] Accordingly, at least one processor (140) is configured to configure the type of sliding window differently according to the inter-dimensional correlation of the high-dimensional vector, and the sliding window may include a continuous window that combines component values of continuous dimensions or a discontinuous window that combines component values of separated dimensions according to a preset rule.
[0065] In step (S230), a structured key can be generated in the form of a combination of a start index and an index sequence value based on the starting point of each window.
[0066] For example, as in the embodiment (50) illustrated in FIG. 5, if the starting dimension is 325 and the sequence generated in the window is [-1,0,1,-1], the index key may have a structure such as “325:-1,0,1,-1”. The index key may be used as an inverse index entry to quickly filter a group of candidates based on a common pattern between vectors.
[0067] In step (S240), index keys and the identifier list values of vectors can be stored in an inverted index structure. Values can be mapped by organizing the unique identifiers of all vectors with the same index key into a single list in a key-value structure. Since storage is performed on an index key basis, even if vectors are added or deleted, only the linked list can be simply modified without the need to reconstruct the entire index.
[0068] For example, as in the embodiment (50) illustrated in FIG. 5, a vector with an index key [325:-1,0,1,-1] can obtain a key-value structure by mapping the value to a list of vector identifiers such as VectorID_101 and VectorID_523.
[0069] FIG. 6 is a block diagram illustrating the search process of an electronic device that performs inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure.
[0070] According to one embodiment of the present disclosure, at least one processor (140) may be configured to extract an index key of an input query vector, search for vector candidate values having the same index key as the index key of the query vector in a vector database using the extracted index key of the input query vector, and calculate similarity with the query vector only for the vectors included in the searched vector candidate values.
[0071] As illustrated in FIG. 6, the original vector to be indexed can be received as an input vector (S610). The input vector may be an embedding extracted from data such as images, text, or voice, and may be provided in a form containing high-dimensional continuous values.
[0072] A quantized input vector can be generated by quantizing each dimensional component value of the input vector based on a threshold value (S620). The threshold value can be set differently depending on the distribution of the component values of each dimension.
[0073] After generating an index sequence by applying a sliding window to the quantized input vector, an index key can be generated by combining each sequence with a starting dimension index (S630). Depending on the correlation of the continuous dimensions, the quantized input vector can be filtered into a specific pattern using a continuous window or a discontinuous window.
[0074] Based on the generated index key, identifiers of vectors containing the corresponding pattern can be stored as key-value pairs in an inverted index structure (S640). The IDs of all input vectors with the corresponding index key can be stored as a list.
[0075] Meanwhile, when a search request occurs, a query vector may be received as input (S710). The query vector may also be a high-dimensional embedding.
[0076] A query vector can be quantized based on the same criteria as the input vector to generate a quantized query vector (S720). One or more query keys can be generated for the quantized query vector based on the same criteria as the input vector (S730). In other words, a quantized query vector is generated by applying the same threshold and quantization rules as the input vector, and a query key is generated by applying the same window size and sliding movement rules as the input vector.
[0077] Index keys and query keys, in other words, comparison keys, can be generated in the same way during the indexing and search processes.
[0078] Key-value pairs in an inverted index structure can be retrieved during the search process. A vector candidate group can be extracted by searching for entries with the same key value in the inverted index structure (S740). Specifically, by retrieving key-value entries corresponding to the query key, a list of identifiers of vectors containing the corresponding query key can be obtained as a vector candidate group.
[0079] Similarity calculations with the query vector can be performed only on the vectors extracted as vector candidates (S750). For example, operations such as cosine similarity or distance measurement based on dot product can be performed, and the amount of computation can be significantly reduced by performing operations only on the candidate vectors rather than on all vectors.
[0080] Based on the results of the similarity calculation, multiple vectors with the highest similarity can be sorted and provided to a user-based interface or a higher-level application to output the final result (S760). At least one processor (140) may be configured to calculate the cosine similarity with the query vector only for the vectors included in the searched vector candidate values, and to output a preset number of top similarity vectors with the highest cosine similarity to the user interface. For example, the identifiers of the top K similarity vectors or the original objects of the corresponding vectors may be returned to the user.
[0081] Therefore, only values with exactly matching keys are selected as candidates for similarity calculation through the generated index key, and similarity calculation can be performed only on the candidates.
[0082] FIG. 7 is a table showing the analysis process for setting threshold values of an electronic device that performs inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure.
[0083] At least one processor (140) according to one embodiment of the present disclosure may be configured to analyze the distribution of component values of each dimension constituting the high-dimensional vector and to set a threshold value such that the quantized component values of the dimension included in each quantization level become equal according to the result of the analysis of the distribution.
[0084] The table (70) shown in FIG. 7 illustrates the distribution of components included in each quantization level when the component values of each dimension constituting a high-dimensional vector are quantized into quantization levels (-1, 0, 1) according to an arbitrary threshold value.
[0085] At least one processor (140) can calculate statistical distributions, such as cumulative distribution functions, percentiles, and mean standard deviation-based ranges, for each dimension component value of an input set of vectors. As shown in FIG. 7, multiple threshold candidates such as 0.00001, 0.0001, 0.001, 0.008, 0.01, 0.02, and 0.03 can be selected to calculate the ratio of quantization to (-1, 0, 1) based on each threshold.
[0086] As shown in the table (70) of FIG. 7, when the threshold value is 0.008, it can be seen that the three values are relatively equal, with the ratio of values quantized to -1 being 0.432, the ratio of values quantized to 0 being 0.205, and the ratio of values quantized to 1 being 0.363.
[0087] Accordingly, at least one processor (140) can analyze the distribution of the entire or sampled vector components and set a value that distinguishes the top 40% or bottom 40% as a threshold delta, and induce the quantization values to be evenly distributed according to minus delta and plus delta. By selecting an optimal threshold, the quality of multi-level quantization can be improved, and the accuracy and index quality of the entire search system can be improved.
[0088] FIG. 8 is a process diagram illustrating the selection of a sliding window method of an electronic device that performs inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure.
[0089] At least one processor (140) according to one embodiment of the present disclosure is configured to configure the type of the sliding window differently according to the interdimensional correlation of the high-dimensional vector, and the sliding window may include a continuous window that combines component values of a continuous dimension or a discontinuous window that combines component values of a spaced dimension according to a preset rule.
[0090] At least one processor (140) can determine whether the input vector or query vector contains quantized values (S810). It can determine whether there is a statistically significant correlation by analyzing the correlation between adjacent dimensions of the quantized values (S820).
[0091] Specifically, correlation coefficients can be analyzed by utilizing criteria that include correlation coefficients based on variance and covariance in continuous dimensions, changes in slope in specific dimensional intervals, semantic similarity in continuous dimensions in vector generation models, or similarity of sequences that pattern continuous dimensional values.
[0092] If there is a correlation between adjacent dimensions (Yes in S820), sliding can be performed by selecting a continuous window (S830). For example, if the meanings of adjacent tokens are strongly linked in a continuous text embedding, or if spatial location-based features in an image embedding are mapped to adjacent dimensions, it can be set as a continuous window.
[0093] If there is no correlation between adjacent dimensions (No in S820), sliding can be performed by selecting a discontinuous window (S840). For example, if a vector embedding model constructs a dimensional layout by mixing various information sources such as tokens, pixels, and frequencies, the pattern between adjacent dimensions does not reflect semantic connectivity, so it may be set as a discontinuous window.
[0094] FIG. 9 is a process diagram illustrating sliding window size selection options of an electronic device that performs inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure.
[0095] As illustrated in FIG. 9, at least one processor (140) can perform an indexing process according to the above-described process (S910). During the indexing process, an indexing option can be provided to adjust the threshold and window size. The indexing option can be set to adjust the relationship between the precision and recall of the search.
[0096] If high precision is required (Yes in S920), the window size can be increased (S930). By lowering the threshold and increasing the window size, only vectors with very similar patterns can be selected as vector candidates. This can be set in a service that must guarantee a very fast response speed by minimizing the targets of subsequent similarity calculations.
[0097] If high recall is required instead of high precision (No in S920), the window size can be reduced (S940). By increasing the threshold and reducing the window size, vectors with slightly different quantization patterns can be selected as vector candidates. This setting can be used in services where search accuracy is critical and the omission of similar vectors must be minimized.
[0098] Accordingly, at least one processor (140) according to one embodiment of the present disclosure may be configured to provide an index option for adjusting the size or threshold of the sliding window.
[0099] FIG. 10 is a process diagram illustrating an index density adjustment option of a sliding window of an electronic device performing an inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure, and FIG. 11 is an embodiment illustrating an index density adjustment process of an electronic device performing an inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure.
[0100] According to one embodiment of the present disclosure, at least one processor (140) may be configured to provide a search option that, when extracting an index key of a query vector input to perform a search, the sliding window skips at least one of the component values of the quantized dimension of the query vector to adjust the index density.
[0101] As illustrated in FIG. 10, at least one processor (140) can perform a search process according to the above-described process (S1010). A search can be performed based on a query vector input during the search process. A search option for adjusting index density can be provided during the search process. Index density is a parameter for controlling response speed by limiting the number of vector candidates; as index density increases, the number of indexes removed increases, and thus the number of keys searched decreases, which can increase speed and decrease recall. The search option can be set to be adjusted according to the demand for fast search speed.
[0102] If a fast search speed is required (Yes in S1020), the index density can be increased (S1030). For example, a fast search speed may be required when a fast response mode is selected in the user interface or when real-time operations are provided, or when the system load increases and the overall throughput needs to be increased.
[0103] If fast search speed is not required (No in S1020), in other words, if high recall is important, index density can be reduced (S1040). This may be a case where recall is required when search accuracy needs to be increased or the quality of subsequent similarity calculations needs to be enhanced, or when computational resources are sufficient.
[0104] Index density can be reduced by constructing a window by skipping some quantized dimension components in a sliding window, using a window smaller than the existing window size, or reducing the number of dimensions included within each window.
[0105] As illustrated in FIG. 11, the query vector (1111) can be quantized to form a quantized query vector (1112). In this case, if the index density is 1, the 5th index can be removed from the quantized query vector (1112) to group the 4 indices together. Alternatively, if the index density is 2, the 5th and 6th indices can be removed from the quantized query vector (1112) and then group the 4 indices together.
[0106] In other words, by generating index sequences of different patterns based on index density settings, index keys can be searched considering search speed or recall.
[0107] FIG. 12 is a block diagram illustrating distributed storage of an electronic device that performs inverse index key-based search using multi-level quantization and a sliding window according to the present disclosure.
[0108] At least one processor (140) according to one embodiment of the present disclosure may be configured to distribute and store values in which the index key and the identifier list of the vector are stored in a plurality of vector databases.
[0109] As illustrated in FIG. 12, index keys may be distributed and stored in DB 1 (1210), DB 2 (1220), and DB 3 (1230), respectively. Specifically, the 1st to 10th indices of the index keys may be stored in DB 1 (1210), the 11th to 20th indices in DB 2 (1220), and the 21st to 30th indices in DB 3 (1230).
[0110] An index key according to one embodiment of the present disclosure is a sequence with a sliding window applied based on quantized values, and because it is a compressed index, the index memory footprint is small and it is easy to store on disk or distributed across multiple servers.
[0111] This enables low-cost and post-processing optimization, and can achieve high performance in resource-constrained environments or large-scale disk-based searches.
[0112] Meanwhile, a method for performing an inverse index key-based search using multi-level quantization and a sliding window, performed by a processor of a device according to the present disclosure, wherein the method may include: a step of quantizing the component values of each dimension constituting a high-dimensional vector based on a threshold value according to a preset quantization level; a step of generating an index sequence by combining the quantized component values of the dimensions by applying a sliding window to the quantized component values of the dimensions; a step of generating an index key by mapping the index sequence to the index of the starting dimension of the high-dimensional vector; and a step of storing in a vector database an inverse index structure in which a list of identifiers of vectors including the index key is used as a value.
[0113] Content that overlaps with the above is omitted for the sake of brevity in the specification.
[0114] Meanwhile, the disclosed embodiments may be implemented in the form of a recording medium that stores instructions executable by a computer. The instructions may be stored in the form of program code and, when executed by a processor, may generate a program module to perform the operation of the disclosed embodiments. The recording medium may be implemented as a computer-readable recording medium.
[0115] Computer-readable recording media include all types of recording media that store instructions that can be decoded by a computer. Examples include ROM (Read Only Memory), RAM (Random Access Memory), magnetic tape, magnetic disk, flash memory, optical data storage devices, etc.
[0116] As described above, the disclosed embodiments have been explained with reference to the attached drawings. Those skilled in the art will understand that the present disclosure may be practiced in forms different from the disclosed embodiments without changing the technical spirit or essential features of the present disclosure. The disclosed embodiments are illustrative and should not be interpreted restrictively. Explanation of the symbols
[0117] 100: Electronic device 110: I / O module 120: Communication module 130: Memory 140: Processor 1210, 1220, 1230: DB
Claims
Claim 1 An electronic device for performing an inverse index key-based search using multiple levels of quantization and a sliding window, comprising: a memory storing at least one process for performing an inverse index key-based search operation using multiple levels of quantization and a sliding window; and at least one processor performing the operation according to said process; wherein the at least one processor is configured to quantize each dimension component value of an input query vector based on a threshold value according to a preset quantization level, generate a query key by applying a sliding window to the quantized dimension component value of the query vector, search for vector candidate values having an index key identical to the query key in a vector database stored in an inverse index structure, and calculate similarity with the query vector only for vectors included in the searched vector candidate values. Claim 2 An electronic device for performing an inverse index key-based search using multi-level quantization and a sliding window, wherein, in claim 1, at least one processor is configured to generate a query key by applying a sliding window to the dimension component values of the quantized query vector, and to generate the query key by adjusting the index density while skipping at least one of the quantized dimension component values according to a preset search option. Claim 3 An electronic device for performing an inverse index key-based search using multiple level quantization and a sliding window, wherein, in claim 1, the at least one processor quantizes the component values of each dimension constituting a high-dimensional vector based on a threshold value according to a preset quantization level, applies a sliding window to the quantized component values of the dimension to generate an index sequence that combines the quantized component values of the dimension, maps the index sequence to the index of the starting dimension of the high-dimensional vector to generate an index key, and stores in a vector database an inverse index structure in which a list of identifiers of vectors including the index key is the value. Claim 4 In claim 3, the electronic device performing inverse index key-based search using multi-level quantization and a sliding window, wherein the at least one processor is configured to reset the quantization level according to the data type of the high-dimensional vector. Claim 5 An electronic device for performing inverse index key-based search using multi-level quantization and a sliding window, wherein the at least one processor is configured to analyze the distribution of component values of each dimension constituting the high-dimensional vector and to set a threshold value such that the quantized component values of the dimension included in each quantization level become equal according to the result of the analysis of the distribution. Claim 6 An electronic device for performing inverse index key-based search using multi-level quantization and a sliding window, wherein, in claim 3, at least one processor is configured to determine the type of the sliding window differently according to the inter-dimensional correlation of the high-dimensional vector, and the sliding window includes a continuous window that combines component values of continuous dimensions or a discontinuous window that combines component values of separated dimensions according to a preset rule. Claim 7 In claim 3, the electronic device performing an inverse index key-based search using multi-level quantization and a sliding window, wherein the at least one processor is configured to distribute and store values in which the index key and the identifier list of the vector are stored in a plurality of vector databases. Claim 8 A method for performing an inverse index key-based search using multi-level quantization and a sliding window performed by a processor of a device, the method comprising: a step of quantizing each dimension component value of an input query vector based on a threshold value according to a preset quantization level; a step of generating a query key by applying a sliding window to the quantized dimension component values of the query vector; a step of searching for vector candidate values having an index key identical to the query key in a vector database stored in an inverse index structure; and a step of calculating similarity with the query vector only for vectors included in the searched vector candidate values. Claim 9 In claim 8, the step of generating the query key is to generate the query key by applying a sliding window to the dimension component values of the quantized query vector, and to generate the query key by adjusting the index density while skipping at least one of the quantized dimension component values according to a preset search option, thereby performing an inverse index key-based search using multi-level quantization and a sliding window. Claim 10 A method for performing an inverse index key-based search using multiple level quantization and a sliding window according to claim 8, further comprising: a step of quantizing the component values of each dimension constituting a high-dimensional vector based on a threshold value according to a preset quantization level; a step of generating an index sequence by combining the quantized component values of the dimensions by applying a sliding window to the quantized component values of the dimensions; a step of generating an index key by mapping the index sequence to the index of the starting dimension of the high-dimensional vector; and a step of storing in a vector database as an inverse index structure with a list of identifiers of vectors including the index key as a value.
Citation Information
Patent Citations
Method and system for searching electroencephalograph y signal using spectrum analysis and vector quantization
KR101675875B1
Apparatus for learning vector quantization and method thereof
KR1020250067277A
Cooperative optimization device and method of inverse index structure and vector quantization
KR102772554B1
Search and retrieval of electronic documents using key-value based partition-by-query indices
US10210282B2
Dynamic indexing in key-value stores
US12271360B1
