Search method

The method addresses the inefficiencies in virtual database searching by constructing search indices on mapped tabular data through inverse mappings, enabling efficient retrieval and display of large datasets with reduced preparation time and storage needs.

WO2026018723A1PCT designated stage Publication Date: 2026-01-22FURUSHO SHINJI
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2025/024239
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-16
Filing Date
2025-07-04
Publication Date
2026-01-22

AI Technical Summary

Technical Problem

Existing virtual database technologies, such as data virtualization, do not allow for the inheritance of indexes that enable efficient searching of real databases, limiting the ability to perform searches on virtual tabular data effectively.

Method used

A method is introduced to construct a search index on mapped tabular data by converting subsets using inverse mappings, allowing searches to be performed on source tabular data and then converting the results back to mapped tabular data, utilizing allocation mappings and index operators to facilitate efficient data retrieval.

Benefits of technology

Enables efficient searching of virtual tabular data by allowing immediate assembly and display of large datasets with minimal preparation time, while maintaining compact storage and transfer requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2025024239_22012026_PF_FP_ABST
    Figure JP2025024239_22012026_PF_FP_ABST
Patent Text Reader

Abstract

A search method according to one aspect of the present disclosure is a method for configuring a search index on mapping tabular data that is virtual tabular data defined by mapping, the search method including: transforming a first subset to be searched for on the mapping tabular data into a second subset on source tabular data, which is the source of values for the mapping tabular data, using inverse mapping of mapping from the source tabular data to the mapping tabular data, and performing searching on the source tabular data using the second subset; and transforming a search result set obtained as the search result into a third subset on the mapping tabular data using the mapping from the source tabular data to the mapping tabular data, and setting the third subset as a search result set.
Need to check novelty before this filing date? Find Prior Art

Description

How to search

[0001] The present disclosure relates to a search method.

[0002] In recent years, advances in various sensor devices and observation equipment have made it possible to obtain tabular data containing large amounts of data (so-called big data) representing sensing results, observation results, and the like. This has led to an increasing need for users to select multiple columns from one or more tabular data sets to create virtual tabular data tailored to their own intended use. One method for achieving this need is to use a technology known as a virtual database or data virtualization (see, for example, Non-Patent Document 1). This technology executes subqueries on distributed databases located behind a query received from a user.

[0003] "Data Hub, Data Lake, and Data Virtualization Comparison - MarkLogic - Progress," Internet <URL: https: / / www.progress.com / jp / marklogic / data-platform / comparisons / data-hub-vs-data-lake>

[0004] However, in the technology known as virtual database or data virtualization, it is not possible to have the virtual database inherit an index that enables searching of a real database.

[0005] The present disclosure has been made in consideration of the above points, and aims to provide a technology that can realize a search on virtual tabular data.

[0006] A search method according to one aspect of the present disclosure is a method for constructing a search index on mapped tabular data, which is virtual tabular data defined by a mapping, and includes converting a first subset to be searched on the mapped tabular data into a second subset on the source tabular data using an inverse mapping of a mapping from source tabular data that is the source of values ​​of the mapped tabular data to the mapped tabular data, searching on the source tabular data using the second subset, and converting a search result set obtained as a result of the search into a third subset on the mapped tabular data using a mapping from the source tabular data to the mapped tabular data, and using the third subset as a search result set.

[0007] It is possible to realize searches on virtual tabular data.

[0008] FIG. 1 is a diagram showing an example of mapping table format data. FIG. 2 is a diagram showing an example of the hardware configuration of a search device according to the present embodiment. FIG. 3 is a diagram showing an example of the overall configuration of a system including a search device according to the present embodiment. NNC, SVL, ACM, INV, INV -1 1 is a diagram showing an example of NNC, SVL, ACM, INV, INV -1 FIG. 2 is a diagram (part 2) showing an example of the search device according to the present embodiment. FIG. 3 is a flowchart showing an example of the operation of the search device according to the present embodiment. FIG. 4 is a diagram (part 1) showing a search in Example 1. FIG. 5 is a diagram (part 2) showing a search in Example 1. FIG. 6 is a diagram (part 1) showing filtering on Src0 in Example 1. FIG. 7 is a diagram (part 1) showing filtering on Src1 in Example 1. FIG. 8 is a diagram (part 2) showing filtering on Src0 in Example 1. FIG. 9 is a diagram showing filtering on Src1 in Example 1. FIG. 10 is a diagram showing mapping table format data in Example 2. FIG. 11 is a diagram showing a search in Example 2. FIG. 12 is a diagram showing a search in Example 2.

[0009] An embodiment of the present invention will be described below with reference to the drawings. In the following embodiment, a search device 10 will be described that creates virtual tabular data by mapping values ​​of multiple columns from one or more tabular data, and performs a search on the virtual tabular data. Hereinafter, virtual tabular data created by mapping values ​​of multiple columns from one or more tabular data will be referred to as "mapped tabular data." Note that a mapping that can create mapped tabular data may also be called an "allocation mapping," etc.

[0010] <Preparation> First, terms, notations, etc. necessary for explaining this embodiment will be prepared.

[0011] Natural numbers start from 0. In other words, integers equal to or greater than 0 are called natural numbers.

[0012] The subscripts of a one-dimensional array start from 0, and the elements are enclosed in parentheses as follows: (a 0 , a 1 , ..., a N-1 ). The i-th element of a one-dimensional array is written by adding [i] to the end of the array. For example, the second element of the array (10, 11, 12) is written as (10, 11, 12) [2], so (10, 11, 12) [2] = 12. The number of elements in an array is also called its size.

[0013] A set of natural numbers starting from 0 to N-1 is called an N-ary consecutive number. For example, 0, 1, and 2 are ternary consecutive numbers. When N is not explicitly stated, it is simply called a "sequential number."

[0014] The mapping from N-ary sequential numbers to M-ary sequential numbers can be represented by an array of natural numbers with size N. For example, assuming N=3 and M=2, the mapping from ternary sequential numbers, which correspond to 0 → 1, 1 → 0, and 2 → 1, to binary sequential numbers can be represented by an array of (1, 0, 1).

[0015] An operator called an index operator is represented by "." and is defined below for a one-dimensional array A.

[0016] A (x 0 , x 1 , ..., x M-1) = (A[x 0 ], A[x 1 ], ..., A[x M-1 ]) where x 0 , x 1 , ..., x M-1 is a natural number.

[0017] The index operator is associative. For example, if A, B, and C are one-dimensional arrays, then (A * B) * C = A * (B * C).

[0018] An array A=(a 0 , a 1 , ..., a N-1 ) can be decomposed into the following: This decomposition is called LP decomposition.

[0019] A = L P L = (l 0 , l 1 , ..., l N-1 ) for any i<j, i <l j P = (p 0 , p 1 , ..., p N-1 ) and p i is an N-ary sequential element, and for any i≠j, p i ≠p j Note that L represents seSelection and P represents Permutation.

[0020] When LP division is performed, L is in ascending order, so whether a certain value is included in A can be efficiently checked by bisection search. On the other hand, P represents a sorting, and if the size of P is N, its elements are N-ary consecutive numbers. By using P, by swapping the elements and subscripts of P, the inverse transformation P -1 That is, P[i] = j ⇔ P -1 [j] = i. At this time, P·P -1 =P -1 P = I (where I is the identity transformation) holds, where I = (0, 1, ..., N-1).

[0021] Tabular data is data consisting of one or more records with one or more columns. In tabular data, identification information called record numbers is assigned to the records that make up the tabular data. When tabular data is displayed in a table format, rows generally represent records, columns represent columns, and regions called cells are arranged in the rows and columns. Tabular data may also be referred to as "table data" or "table data," for example. A column may also be referred to as a "dimension." Furthermore, tabular data consisting of one or more records with only one column (in other words, data extracted from tabular data consisting of one or more records with multiple columns) may also be referred to as "column data," for example. Column data can be represented as a one-dimensional array.

[0022] Hereafter, the column that is the domain of an allocation mapping will be called the "source column," and the column (column of the mapping tabular data) that contains the range of the allocation mapping will be called the "target column." Also, an allocation mapping is a mapping that associates the record number of the source column with the record number of the target column.

[0023] In this case, the allocation mapping must satisfy at least the following properties:

[0024] Property 1 (injectivity): The allocation mapping is a mapping that associates record numbers one-to-one between the source column and the target column. In other words, the allocation mapping is i , the two record numbers of the source column are rs 1 , rs 2 When this is done, rs 1 ≠rs 2 If f i (rs 1 ) ≠ f i (rs 2 ) to be.

[0025] Property 2 (non-conflict): An allocation mapping does not collide with other allocation mappings that have the same target column in the record number of the target column. In other words, two allocation mappings that create the same mapped tabular data and have the same target column containing the range are called f. i , f j When this is done, f i (rs 1 ) = f j (rs 2 ) becomes rs 1 and rs 2 does not exist (however, rs 1 is the allocation mapping f i The record number of the source column, rs 2 is the allocation mapping f j is the record number of the source column.

[0026] Any mapping can be used as an allocation mapping as long as it satisfies the above properties 1 and 2. Examples of allocation mappings include a mapping that lists the correspondence between record numbers between source columns and target columns, a linear mapping, etc.

[0027] Note that an allocation mapping always has an inverse mapping due to the above property 1. Furthermore, by using mapping composition, the source column of an allocation mapping may be a column of the mapping tabular data.

[0028] By defining allocation mappings for each of the multiple source columns, mapped table format data is created (defined) by those allocation mappings. Hereinafter, each of the multiple column data that become source columns will be referred to as "Src0," "Src1," etc. Mapped table format data will also be referred to as "MTD (Mapped Table Formatted Data)."

[0029] With such mapped tabular data, whenever a cell appears that requires a value for display or the like, the inverse mapping is followed to obtain the value from the source. If the source is also mapped tabular data, the inverse mapping is followed again to obtain the value from the source. By repeating this process, the data will eventually reach the source that holds the value itself, and the value will be obtained from that source. With this mechanism, no matter how large the tabular data, it can be immediately assembled and displayed, and it can be started to be used with almost no preparation time required. In this respect, mapped tabular data has an advantage that existing virtual databases or data virtualization do not have.

[0030] Furthermore, mapping table data only requires the size of the mapping definition that defines it, so no matter how large the data it represents, it has the advantage of being compact and easy to store and transfer.

[0031] <Specific Example of Mapping Table Format Data> An example of mapping table format data is shown in Fig. 1. In the example shown in Fig. 1, column data 1000 is Src0, column data 2000 is Src1, and the allocation mapping f 0 and f 1 3 shows the mapping table data 3000 created by the above.

[0032] In the example shown in FIG. 0 The source column is the column data 1000, the target column is the “name” column of the mapping table data 3000, and 0 = (2, 0, 3, 1). This allocation mapping f 0 is a mapping that associates the record numbers (0, 1, 2, 3) of the column data 1000 with the record numbers (2, 0, 3, 1) of the mapped tabular data 3000, respectively.

[0033] Similarly, in the example shown in FIG. 1 The source column is the column data 2000, the target column is the “age” column of the mapping tabular data 3000, and 1 = (3, 1, 0, 2). This allocation mapping f 2is a mapping that associates the record numbers (0, 1, 2, 3) of the column data 2000 with the record numbers (3, 1, 0, 2) of the mapped tabular data 3000, respectively.

[0034] In addition, the allocation mapping f 0 The inverse map of 0 -1 = (1, 3, 0, 2), allocation mapping f 1 The inverse map of 1 -1 = (2, 1, 3, 0).

[0035] <Example of Hardware Configuration of Search Device 10> An example of the hardware configuration of the search device 10 according to this embodiment is shown in Fig. 2. As shown in Fig. 2, the search device 10 according to this embodiment includes an input device 101, a display device 102, an external I / F 103, a communication I / F 104, a RAM (Random Access Memory) 105, a ROM (Read Only Memory) 106, an auxiliary storage device 107, and a processor 108. Each of these pieces of hardware is connected to each other via a bus 109 so as to be able to communicate with each other.

[0036] The input device 101 is, for example, a keyboard, a mouse, a touch panel, a physical button, etc. The display device 102 is, for example, a display, a display panel, etc. Note that the search device 10 does not necessarily have to include at least one of the input device 101 and the display device 102, for example.

[0037] The external I / F 103 is an interface with an external device such as a recording medium 103a. Examples of the recording medium 103a include a CD (Compact Disc), a DVD (Digital Versatile Disk), an SD memory card (Secure Digital memory card), and a USB (Universal Serial Bus) memory card.

[0038] The communication I / F 104 is an interface for connecting to the network 20. The RAM 105 is a volatile semiconductor memory (storage device) that temporarily stores programs and data. The ROM 106 is a non-volatile semiconductor memory (storage device) that can store programs and data even when the power is turned off. The auxiliary storage device 107 is a non-volatile storage device such as an HDD (Hard Disk Drive), an SSD (Solid State Drive), or a flash memory. The processor 108 is, for example, one of various arithmetic devices such as a CPU (Central Processing Unit).

[0039] 2 is an example and is not intended to be limiting. For example, the search device 10 may have multiple auxiliary storage devices 107 or multiple processors 108, may not have some of the hardware shown in the figure, or may have various types of hardware other than the hardware shown in the figure.

[0040] <Example of Overall Configuration of a System Including a Search Device 10> Fig. 3 shows an example of the overall configuration of a system including a search device 10 according to this embodiment. As shown in Fig. 3, the search device 10 according to this embodiment is communicatively connected to database servers distributed over a network 20, including the Internet, etc. These database servers store one or more files that represent tabular data in a predetermined data structure. Note that the database server may also store one or more pieces of mapped tabular data (more precisely, allocation maps that define the mapped tabular data).

[0041] Here, the search device 10 according to this embodiment has a mapping table data creation unit 201, a search condition acceptance unit 202, a search unit 203, and a search result output unit 204. Each of these units is realized, for example, by processing in which one or more programs installed in the search device 10 are executed by the processor 108 or the like. The search device 10 according to this embodiment also has a memory unit 205. The memory unit 205 is realized, for example, by a memory area of ​​the auxiliary storage device 107 or the like.

[0042] The mapping table data creation unit 201 creates an allocation mapping f for a plurality of column data serving as source columns. i (i=0, . . . , N−1) are created or defined, respectively, to create a plurality of allocation mappings f i N is the allocation map f i The total number of allocation maps f i is stored in the storage unit 205, for example.

[0043] Each column data serving as a source column may be column data extracted from tabular data stored in a database server on the network 20, or may be column data extracted from tabular data stored in the memory unit 205.

[0044] The search condition receiving unit 202 receives search conditions for the mapping table-format data. Note that the search conditions may be provided by a user of the search device 10, or may be provided by another device or equipment other than the search device 10, or may be provided by some program (e.g., a program that realizes generative AI (Artificial Intelligence)) included in the search device 10 or another device or equipment.

[0045] Based on the search conditions received by the search condition receiving unit 202, the search unit 203 searches the mapping table format data for the record numbers of records that satisfy the search conditions.

[0046] The search result output unit 204 outputs the search results by the search unit 203 to a predetermined output destination. The output destination is not limited to a specific output destination, but examples thereof include the display device 102 such as a display, a storage area such as the auxiliary storage device 107, other devices or equipment connected in a communicable manner, and some program possessed by the search device 10 or other devices or equipment.

[0047] The storage unit 205 stores a file in which tabular data is represented in a predetermined data structure, a mapping table data (more precisely, a layout mapping f that defines the mapping table data), and the like.i (i=0, . . . , N-1)) and so on.

[0048] <Data Structure of Tabular Data> Tabular data is represented in a data structure that allows for the reading of a value corresponding to a record number in the column data when a record number is given for each column data that makes up the tabular data. Here, examples of data structures that allow for the reading of a value corresponding to a record number include any of the following (a) to (d). However, it goes without saying that the data structure is not limited to these.

[0049] (a) Column data (b) NNC (Natural Numbered Column) and SVL (Sorted Value List) (c) SVL, ACM (Accumulation Array), and INV (Inverted Record Index) (d) INV, INV -1 , and any of the above (a) to (c). In the following, we will mainly assume the above (b) or (d) as the data structure from which the value corresponding to the record number can be read.

[0050] Here, NNC is a list-style data structure in which each value contained in the corresponding column data is represented by replacing it with the storage location of that value in SVL. SVL is a list-style data structure whose elements are the ascending and unique values ​​of each value appearing in the corresponding column data. ACM is a list-style data structure whose elements, for each element of the SVL of the corresponding column data, are the values ​​that indicate the position next to the last position on INV where the record number of that element is stored. Each element of ACM gives the number of occurrences of values ​​equal to or less than the element on SVL corresponding to that element. INV is a list-style data structure whose elements are the transposed record numbers of the corresponding column data. INV -1 is a list-type data structure in which the value of each element in the INV is swapped with the storage location of that element. For details on NNC, SVL, ACM, and INV and how to create them, see, for example, Reference 1.

[0051] <NNC, SVL, ACM, INV, INV -1 As an example, NNC, SVL, ACM, INV, INV of the column data 1000 shown in FIG. -1 As shown in FIG. 4, the NNC 1100 of the column data 1000 is (1,0,2,1), the SVL 1200 is ('Alice', 'Bob', 'Cat'), the ACM 1300 is (1,3,4), the INV 1400 is (1,0,3,2), and the INV -1 1500 becomes (1, 0, 3, 2).

[0052] As an example, NNC, SVL, ACM, INV, and INV of the column data 2000 shown in FIG. -1 As shown in FIG. 5, the NNC 2100 of the column data 2000 is (1, 2, 1, 0), the SVL 2200 is (18, 20, 21), the ACM 2300 is (1, 3, 4), the INV 2400 is (3, 0, 2, 1), and the INV -1 2500 becomes (1, 3, 2, 0).

[0053] <Example of Operation of Search Device 10> An example of operation of the search device 10 according to this embodiment will be described below with reference to FIG.

[0054] The mapping table data creation unit 201 creates an allocation mapping f for a plurality of column data serving as source columns. i (i=0, . . . , N−1) are created or defined (step S101). i (i=0,...,N-1) is created. i (i=0, . . . , N−1) is stored in the storage unit 205, for example.

[0055] The search condition receiving unit 202 receives search conditions for the mapping table-format data created in step S101 (step S102). Note that the search conditions may be given, for example, as a set of record numbers of the mapping table-format data, as a logical expression or a conditional expression for column values ​​of the mapping table-format data, or in other formats.

[0056] Based on the search conditions received in step S102, the search unit 203 searches the mapping table-format data created in step S101 for record numbers that satisfy the search conditions (step S103). A specific example of the search method in this step will be described later.

[0057] The search result output unit 204 outputs the record number searched in step S103 as the search result to a predetermined output destination (step S104).

[0058] <Example 1> Example 1 of the search in step S103 of Fig. 6 will be described. In Example 1, it is assumed that a subset (2, 1, 0) of record numbers in the map tabular data 3000 and a conditional expression (name>'B*', age>20) are given as search conditions for the map tabular data 3000 shown in Fig. 1. This means that the record numbers of records that satisfy the conditional expression (name>'B*', age>20) are searched for from the subset (2, 1, 0) of record numbers in the map tabular data 3000.

[0059] A case where the record number of a record that satisfies the search conditions is searched for will be described with reference to FIGS.

[0060] Step 1-1: The search unit 203 searches for an allocation map f 0 The inverse mapping f 0 -1 The search unit 203 converts the subset (2, 1, 0) of record numbers on the MTD (mapped table format data 3000) into a subset of record numbers on the Src0 (column data 1000) using f 0 -1 (2,1,0)=(1,3,0,2) and (2,1,0)=(0,3,1) to obtain the subset (0,3,1) of record numbers on Src0.

[0061] Step 1-2: The search unit 203 performs filtering on Src0 to find a subset of record numbers that satisfy the conditional expression name > 'B*' for the "name" column from the subset (0, 3, 1) of record numbers on Src0. Filtering on Src0 determines whether the values ​​corresponding to each record number included in the subset (0, 3, 1) on Src0 satisfy the conditional expression name > 'B*', and obtains a set of record numbers corresponding to values ​​that satisfy the conditional expression name > 'B*'. This obtains a subset (0, 3) of record numbers that satisfy the conditional expression name > 'B*' on Src0. In other words, filtering realizes a search index. Specific examples of filtering methods in this procedure will be described later.

[0062] Step 1-3: The search unit 203 searches for the allocation map f 0 The search unit 203 converts the subset (0, 3) of record numbers on Src0 into a subset of record numbers on MTD using f 0 (0,3)=(2,0,3,1) and (0,3)=(2,1) are used to obtain the subset (2,1) of record numbers on the MTD.

[0063] Step 1-4: The search unit 203 searches for the allocation mapping f 1 The inverse mapping f 1 -1 The search unit 203 converts the subset (2, 1) of record numbers on the MTD into a subset of record numbers on Src1 (column data 2000) using f 1 -1 (2,1)=(2,1,3,0) and (2,1)=(3,1) are used to obtain the subset (3,1) of record numbers on Src1.

[0064] Step 1-5: The search unit 203 performs filtering on Src1 to find a subset (1) of record numbers on Src1 that satisfy the conditional expression age > 20 for the "age" column, from the subset (3, 1) of record numbers on Src1. In filtering on Src1, it is determined whether the values ​​corresponding to each record number included in the subset (3, 1) on Src1 satisfy the conditional expression age > 20, and a set of record numbers corresponding to values ​​that satisfy the conditional expression age > 20 is obtained. This results in a subset (1) of record numbers on Src1 that satisfy the conditional expression age > 20. In other words, filtering realizes a search index. Specific examples of filtering methods in this step will be described later.

[0065] Step 1-6: The search unit 203 searches for the allocation mapping f 1 The search unit 203 converts the subset (1) of record numbers on Src1 into a subset of record numbers on MTD using f 1 (1) = (3, 1, 0, 2) (1) = (1) yields a subset (1) of record numbers on the MTD. The record number "1" included in this subset is the record number of the record that satisfies the conditional expression (name > 'B*', age > 20) among the subset (2, 1, 0) of record numbers in the mapping table-format data 3000. This yields the search result (1).

[0066] <<Specific Example (1) of Filtering Method in Step 1-2>> An example of the filtering method in Step 1-2 will be described with reference to Fig. 9. In Fig. 9, INV1400 and INV1400 of the column data 1000 are filtered. -1 The following describes a case where only record numbers corresponding to values ​​that satisfy the conditional expression "name>'B*'" are extracted from the subset (0, 3, 1) using INV1400 and INV1500. -1 1500 is realized as an array, and INV1400 and INV -1 The i-th element of 1500 is INV 1 [i] and INV 1 -1In the following, the interval represented by consecutive subscripts M, M+1, ..., N on a one-dimensional array will be written as [M, N].

[0067] Step 11-1: The search unit 203 searches for an INV whose value satisfies the conditional expression name>'B*'. 1 This identifies the upper section. 1 The above interval [1, 3] is obtained.

[0068] Step 11-2: The search unit 203 searches for the record number "0" included in the subset (0, 3, 1) and finds the INV 1 -1 Then, the search unit 203 determines whether [0] belongs to the interval [1, 3]. 1 -1 If [0] belongs to the interval [1, 3], add record number "0" to the result set. In this case, INV 1 -1 Since [0]=1, record number "0" is added to the result set.

[0069] Step 11-3: The search unit 203 searches for the record number "3" included in the subset (0, 3, 1) and finds the INV 1 -1 Then, the search unit 203 determines whether INV [3] belongs to the interval [1, 3]. 1 -1 If [3] belongs to the interval [1, 3], add record number "3" to the result set. In this case, INV 1 -1 Since [3]=2, record number "3" is added to the result set.

[0070] Step 11-4: The search unit 203 searches for the record number "1" included in the subset (0, 3, 1) and finds the INV 1 -1 Then, the search unit 203 determines whether or not [1] belongs to the interval [1, 3]. 1 -1 If [1] belongs to the interval [1, 3], add record number "1" to the result set. In this case, INV 1 -1Since [1]=0, record number "1" is not added to the result set.

[0071] As a result of the above, the subset (0, 3) of record numbers that satisfies the conditional expression name>'B*' from the subset (0, 3, 1) of record numbers in the column data 1000 is obtained as a result set.

[0072] <<Specific Example (1) of Filtering Method in Step 1-5>> An example of the filtering method in Step 1-5 above will be described with reference to Fig. 10. In Fig. 10, INV2400 and INV -1 The following describes a case where only record numbers corresponding to values ​​that satisfy the conditional expression age>20 are extracted from the subset (3, 1) using INV2400 and INV2500. -1 2500 is realized as an array, and INV2400 and INV -1 The i-th element of 2500 is INV 2 [i] and INV 2 -1 It is assumed that it is obtained by [i].

[0073] Step 12-1: The search unit 203 searches for INV 2 This identifies the upper section. 2 The above interval [3] is obtained.

[0074] Step 12-2: The search unit 203 searches for the record number "3" included in the subset (3, 1) using the INV 2 Then, the search unit 203 determines whether or not INV [3] belongs to the section [3]. 2 If [3] belongs to the interval [3], add record number "3" to the result set. In this case, INV 2 Since [3]=0, record number "3" is not added to the result set.

[0075] Step 12-3: The search unit 203 searches for the INV 2 Then, the search unit 203 determines whether or not [1] belongs to the section [3]. 2If [1] belongs to section [3], add record number "1" to the result set. In this case, INV 2 Since [1]=3, record number "1" is added to the result set.

[0076] As a result of the above, the subset (1) of record numbers that satisfies the conditional expression age>20, out of the subset (3, 1) of record numbers in the column data 2000, is obtained as a result set.

[0077] <<Specific Example (Part 2) of Filtering Method in Step 1-2>> Another example of the filtering method in Step 1-2 above will be described with reference to Fig. 11. Fig. 11 explains the case where only record numbers corresponding to values ​​that satisfy the conditional expression name>'B*' are extracted from the subset (0, 3, 1) using NNC1100 and SVL1200 of the column data 1000. Hereinafter, it is assumed that NNC1100 and SVL1200 are realized as arrays, and the i-th elements of NNC1100 and SVL1200 are respectively NNC 1 [i] and SVL 1 It is assumed that it is obtained by [i].

[0078] Step 21-1: The search unit 203 searches for an SVL whose value satisfies the conditional expression name>'B*'. 1 This identifies the upper section of the SVL. 1 The above interval [1] is obtained.

[0079] Step 21-2: The search unit 203 uses the record number “0” included in the subset (0, 3, 1) to search for the NNC 1 Then, the search unit 203 determines whether [0] belongs to the interval [1]. 1 If [0] belongs to the interval [1], add record number "0" to the result set. In this case, NNC 1 Since [0]=1, record number "0" is added to the result set.

[0080] Step 21-3: The search unit 203 searches for the NNC using the record number "3" included in the subset (0, 3, 1). 1 Then, the search unit 203 determines whether or not [3] belongs to the interval [1].1 If [3] belongs to the interval [1], add the record number "3" to the result set. 1 Since [3]=1, record number "3" is added to the result set.

[0081] Step 21-4: The search unit 203 uses the record number “1” included in the subset (0, 3, 1) to search for the NNC 1 Then, the search unit 203 determines whether [1] belongs to the interval [1]. 1 If [1] belongs to the interval [1], add record number "1" to the result set. In this case, NNC 1 Since [1]=0, record number "0" is not added to the result set.

[0082] As a result of the above, the subset (0, 3) of record numbers that satisfies the conditional expression name>'B*' from the subset (0, 3, 1) of record numbers in the column data 1000 is obtained as a result set.

[0083] <<Specific Example (Part 2) of Filtering Method in Step 1-5>> Another example of the filtering method in Step 1-5 above will be described with reference to Fig. 12. Fig. 12 explains a case where only record numbers corresponding to values ​​that satisfy the conditional expression age>20 are extracted from the subset (3, 1) using NNC2100 and SVL2200 of the column data 2000. Hereinafter, it is assumed that NNC2100 and SVL2200 are realized as arrays, and the i-th elements of NNC2100 and SVL2200 are respectively NNC 2 [i] and SVL 2 It is assumed that it is obtained by [i].

[0084] Step 22-1: The search unit 203 searches for an SVL whose value satisfies the conditional expression age>20. 2 This identifies the upper section. 2 The above interval [2] is obtained.

[0085] Step 22-2: The search unit 203 searches for the NNC using the record number "3" included in the subset (3, 1). 2 Then, the search unit 203 determines whether or not [3] belongs to the interval [2].2 If [3] belongs to the interval [2], add the record number "3" to the result set. 2 Since [3]=0, record number "3" is not added to the result set.

[0086] Step 22-3: The search unit 203 searches for the NNC using the record number “1” included in the subset (3, 1). 2 Then, the search unit 203 determines whether [1] belongs to the interval [2]. 2 If [1] belongs to the interval [2], add record number "1" to the result set. In this case, NNC 2 Since [1]=2, record number "1" is added to the result set.

[0087] As a result of the above, the subset (1) of record numbers that satisfies the conditional expression age>20, out of the subset (3, 1) of record numbers in the column data 2000, is obtained as a result set.

[0088] Example 2 Example 2 of the search in step S103 of Fig. 6 will be described. In Example 2, the mapping table format data 8000 shown in Fig. 13 is targeted. The mapping table format data 8000 shown in Fig. 13 is a table in which column data 4000 is Src0, column data 5000 is Src1, column data 6000 is Src2, and column data 7000 is Src3, and the allocation mapping f 0 ~f 3 It was created by.

[0089] In the example shown in FIG. 0 The source column is the column data 4000, the target column is the “name” column of the mapping table data 8000, and 0 = (0, 2, 4). This allocation mapping f 0 is a mapping that associates the record numbers (0, 1, 2) of the column data 4000 with the record numbers (0, 2, 4) of the mapping table format data 8000, respectively.

[0090] Similarly, in the example shown in FIG. 1The source column is the column data 5000, the target column is the “name” column of the mapping table data 8000, and 1 = (1, 3, 5). 2 The source column is the column data 6000, the target column is the “place” column of the mapping tabular data 8000, and 2 = (0, 1, 2). Similarly, f 3 The source column is the column data 7000, the target column is the “place” column of the mapping tabular data 8000, and 3 = (3, 4, 5).

[0091] Here, the allocation mapping f 0 The inverse mapping f 0 -1 is the allocation mapping f 0 When is regarded as an array and subjected to LP decomposition, it can be obtained as follows: As mentioned above, LP decomposition is a technique for decomposing an array into two arrays L and P of the same size as the array.

[0092] f 0 =L 0 ・P 0 L 0 [j] = rm rs 0 =P 0 -1 [j] where L 0 is f 0 Array in which the elements of P are arranged in ascending order 0 is f 0 Each element of L 0 The array P 0 -1 Is P 0 is a mapping, the array is equivalent to the inverse mapping. 0 is the record number on the column data 4000. Specifically, f 0 = (0, 2, 4), L 0 =(0,2,4),P 0 =(0,1,2),P 0 -1 = (0, 1, 2).

[0093] Inverse mapping f 0 -1 can be realized as follows. First, f 0 =L 0 ・P 0 By the mapping f 0 L 0 and P 0 Then, when rm is given, L 0 Using [j] = rm, the elements are sorted in ascending order. 0 j is identified by bisection search. Note that there is no inverse mapping for rm where j does not exist. Finally, rs 0 =P 0 -1 Using [j], rs 0 Each time rm is given, j is specified and rs 0 By finding the inverse mapping f 0 -1 is realized. 0 -1 is rs 0 = f 0 -1 (rm) holds, and rm is used as input and rs 0 It is a function of one variable input and one variable output, with the output being . 0 , rm 1 , ..., rm N-1 ) is used as input to a one-dimensional array (rs 0 0 , rs 0 1 , ..., rs 0 N-1 It is possible to define a function with N inputs and N outputs, where (rs 0 0 , rs 0 1 , ..., rs 0 N-1 ) = f 0 -1 (rm 0 , rm 1 , ..., rm N-1 ) can be used. In the following description, f 0 -1is either one variable input and one variable output or N variable input and N variable output.

[0094] As mentioned above, the allocation map f 1 The inverse mapping f 1 -1 is expressed as follows:

[0095] f 1 =L 1 ・P 1 L 1 [j] = rm rs 1 =P 1 -1 [j] where L 1 is f 1 Array in which the elements of P are arranged in ascending order 1 is f 1 Each element of L 1 The array P 1 -1 Is P 1 The array corresponding to the inverse mapping when considering 1 is the record number on the column data 5000.

[0096] Similarly, the allocation mapping f 2 The inverse mapping f 2 -1 is expressed as follows:

[0097] f 2 =L 2 ・P 2 L 2 [j] = rm rs 2 =P 2 -1 [j] where L 2 is f 2 Array in which the elements of P are arranged in ascending order 2 is f 2 Each element of L 2 The array P 2 -1 Is P 2 The array corresponding to the inverse mapping when considering 2 is the record number on the column data 6000.

[0098] Similarly, the allocation mapping f 3 The inverse mapping f 3-1 is expressed as follows:

[0099] f 3 =L 3 ・P 3 L 3 [j] = rm rs 3 =P 3 -1 [j] where L 3 is f 3 Array in which the elements of P are arranged in ascending order 3 is f 3 Each element of L 3 The array P 3 -1 Is P 3 The array corresponding to the inverse mapping when considering 3 is the record number on the column data 7000.

[0100] 13, the universal set (0, 1, 2, 3, 4, 5) of record numbers in the mapping table-format data 8000 and a conditional expression ('Bob' ≦ name ≦ 'Cat', place = 'South') are given. This means that the universal set (0, 1, 2, 3, 4, 5) of record numbers in the mapping table-format data 8000 is searched for record numbers of records that satisfy the conditional expression ('Bob' ≦ name ≦ 'Cat', place = 'South').

[0101] A case where the record number of a record that satisfies the search conditions is searched for will be described with reference to FIGS.

[0102] Step 2-1: For the "name" column of MTD (map table-format data 8000), the search unit 203 separates each element of the universal set (0, 1, 2, 3, 4, 5) of record numbers on MTD into elements corresponding to record numbers on Src0 (column data 4000) and elements corresponding to record numbers on Src1 (column data 5000). This results in a subset (0, 2, 4) consisting of elements corresponding to record numbers on Src0 and a subset (1, 3, 5) consisting of elements corresponding to record numbers on Src1.

[0103] The search unit 203 may perform the above separation by any method. For example, the search unit 203 may perform the following separation: 0 -1 and f 1 -1 Using this, the universal set (0, 1, 2, 3, 4, 5) of record numbers on the MTD can be separated into the subsets (0, 2, 4) and (1, 3, 5). Additionally, if there is knowledge between the source column and the target column (for example, if there is knowledge that when rm is divided by 2, if the remainder is 0, it corresponds to the record number on Src0, and if the remainder is 1, it corresponds to the record number on Src1), the search unit 203 may use this knowledge to separate the universal set (0, 1, 2, 3, 4, 5) of record numbers on the MTD into the subsets (0, 2, 4) and (1, 3, 5).

[0104] Step 2-2: The search unit 203 searches for the allocation mapping f 0 The inverse mapping f 0 -1 The search unit 203 converts the subset (0, 2, 4) of record numbers corresponding to the record numbers of Src0 on the MTD into a subset of record numbers on Src0 using f 0 -1 (0, 2, 4) = (0, 1, 2) to obtain the subset (0, 1, 2) of record numbers on Src0.

[0105] Step 2-3: The search unit 203 filters on Src0 to find a subset of record numbers that satisfy the conditional expression 'Bob' ≦ name ≦ 'Cat' related to the "name" column from the subset (0, 1, 2) of record numbers on Src0. In filtering on Src0, it is determined whether the values ​​corresponding to each record number included in the subset (0, 1, 2) on Src0 satisfy the conditional expression 'Bob' ≦ name ≦ 'Cat', and a set of record numbers corresponding to values ​​that satisfy the conditional expression 'Bob' ≦ name ≦ 'Cat' is obtained. This results in a subset (0, 2) of record numbers that satisfy the conditional expression 'Bob' ≦ name ≦ 'Cat' on Src0. Note that the filtering method in this step can be the same as in Example 1, so its description will be omitted.

[0106] Step 2-4: The search unit 203 searches for the allocation mapping f 0 The search unit 203 converts the subset (0, 2) of record numbers on Src0 into a subset of record numbers on MTD using f 0 (0,2)=(0,4) gives the subset (0,4) of record numbers on the MTD.

[0107] Step 2-5: The search unit 203 searches for the allocation mapping f 1 The inverse mapping f 1 -1 The search unit 203 converts the subset (1, 3, 5) of record numbers corresponding to the record numbers of Src1 on the MTD into a subset of record numbers on Src1 using f 1 -1 (1, 3, 5) = (0, 1, 2) to obtain the subset (0, 1, 2) of record numbers on Src1.

[0108] Step 2-6: The search unit 203 filters on Src1 to find a subset of record numbers that satisfy the conditional expression 'Bob' ≦ name ≦ 'Cat' for the "name" column from the subset (0, 1, 2) of record numbers on Src1. The filtering on Src1 determines whether the values ​​corresponding to each record number included in the subset (0, 1, 2) on Src1 satisfy the conditional expression 'Bob' ≦ name ≦ 'Cat', and obtains a set of record numbers corresponding to values ​​that satisfy the conditional expression 'Bob' ≦ name ≦ 'Cat'. This obtains a subset (1) of record numbers that satisfy the conditional expression 'Bob' ≦ name ≦ 'Cat' on Src1. Note that the filtering method in this step can be the same as in Example 1, and therefore its description will be omitted.

[0109] Step 2-7: The search unit 203 searches for the allocation mapping f 1 The search unit 203 converts the subset (1) of record numbers on Src1 into a subset of record numbers on MTD using f 1 (1)=(3) to obtain the subset (3) of record numbers on the MTD.

[0110] Step 2-8: The search unit 203 combines the subsets (0, 4) and (3) obtained in steps 2-4 and 2-7, respectively, to obtain the subset (0, 4, 3) of record numbers on the MTD.

[0111] Step 2-9: For the "age" column of the MTD, the search unit 203 separates each element of the subset (0, 4, 3) of record numbers on the MTD into elements corresponding to record numbers on Src2 (column data 6000) and elements corresponding to record numbers on Src3 (column data 7000). This results in a subset (0) consisting of elements corresponding to record numbers on Src2 and a subset (4, 3) consisting of elements corresponding to record numbers on Src3.

[0112] The search unit 203 may perform the above separation by any method. For example, the search unit 203 may perform the following separation: 2 -1 and f 3 -1 Using this, the subset (0, 4, 3) of record numbers on the MTD can be separated into the subsets (0) and (4, 3). Additionally, if there is knowledge between the source column and the target column (for example, if there is knowledge that rm of 0 to 2 corresponds to record numbers on Src2 and rm of 3 to 4 corresponds to record numbers on Src3), the search unit 203 may use this knowledge to separate the subset (0, 4, 3) of record numbers on the MTD into the subsets (0) and (4, 3).

[0113] Step 2-10: The search unit 203 searches for the allocation mapping f 2 The inverse mapping f 2 -1 The search unit 203 converts the subset (0) of record numbers corresponding to the record numbers of Src2 on the MTD into a subset of record numbers on Src2 using f 2 -1 (0)=(0) gives the subset (0) of record numbers on Src2.

[0114] Step 2-11: The search unit 203 performs filtering on Src2 to find a subset of record numbers from the subset (0) of record numbers on Src2 that satisfy the conditional expression place='South' related to the "place" column. In filtering on Src2, it is determined whether the value corresponding to each record number included in the subset (0) on Src2 satisfies the conditional expression place='South', and a set of record numbers corresponding to values ​​that satisfy the conditional expression place='South' is obtained. This results in a subset (0) of record numbers on Src2 that satisfy the conditional expression place='South'. Note that the filtering method in this step can be the same as in Example 1, so its description will be omitted.

[0115] Step 2-12: The search unit 203 searches for the allocation mapping f 2 The search unit 203 converts the subset (0) of record numbers on Src2 into a subset of record numbers on MTD using f 2 (0)=(0) gives the subset (0) of record numbers on the MTD.

[0116] Step 2-13: The search unit 203 searches for the allocation mapping f 3 The inverse mapping f 3 -1 The search unit 203 converts the subset (4, 3) of record numbers corresponding to the record numbers of Src3 on the MTD into a subset of record numbers on Src3 using f 3 -1 (4,3)=(1,0) to obtain the subset (1,0) of record numbers on Src3.

[0117] Step 2-14: The search unit 203 performs filtering on Src3 to find a subset of record numbers that satisfy the conditional expression place='South' for the "place" column from the subset (1,0) of record numbers on Src3. In filtering on Src3, it is determined whether the value corresponding to each record number included in the subset (1,0) on Src3 satisfies the conditional expression place='South', and a set of record numbers corresponding to values ​​that satisfy the conditional expression place='South' is obtained. This results in a subset (0) of record numbers that satisfy the conditional expression place='South' on Src3. Note that the filtering method in this step can be the same as in Example 1, so its description will be omitted.

[0118] Step 2-15: The search unit 203 searches for the allocation mapping f 3 The search unit 203 converts the subset (0) of record numbers on Src3 into a subset of record numbers on MTD using f 3 (0)=(3) gives the subset (3) of record numbers on the MTD.

[0119] Step 2-16: The search unit 203 combines the subsets (0) and (3) obtained in steps 2-12 and 2-15, respectively, to obtain the subset (0, 3) of record numbers on the MTD as the search result.

[0120] <Modifications> Modifications of the above embodiment will be described below. Note that the following modifications can be combined with each other as long as they do not contradict each other.

[0121] Modification 1 In the above-described first embodiment, f 0 ≠f 1 However, f 0 = f 1 If f 0 ・f 1 -1 =I (where I is the identity mapping), so the above steps 1-3 and 1-4 do not need to be performed.

[0122] Modification 2 In the above-described second embodiment, f 0 ≠f2 , f 1 ≠f 3 However, f 0 = f 2 And f 1 = f 3 If this is the case, similarly to the above-mentioned first modification, the above-mentioned steps 2-4, 2-7, 2-8, 2-9, 2-10, and 2-13 do not need to be executed.

[0123] Variation 3 In the above-described second embodiment, the number of allocation mappings for the "name" column and the "place" column of the mapping table-format data as target columns was two, but the number of allocation mappings for the "name" column and the "place" column of the mapping table-format data as target columns may be different. For example, the number of allocation mappings for the "name" column as the target column may be "2," and the number of allocation mappings for the "place" column as the target column may be "1," etc.

[0124] <Summary> As described above, when search conditions for virtual tabular data are given, the search device 10 according to this embodiment uses an allocation mapping that maps record numbers of multiple columns onto the virtual tabular data to search for record numbers that satisfy the search conditions in each of the allocation source columns, and maps the common set of those record numbers using the allocation mapping. Furthermore, when search conditions for multiple dimensions are given, the search device 10 according to this embodiment executes the above search in cascade (series) for each dimension. This makes it possible to search for record numbers that satisfy the search conditions in the virtual tabular data.

[0125] The present invention is not limited to the above-described specifically disclosed embodiments, and various modifications, changes, and combinations with known technologies are possible without departing from the scope of the claims.

[0126] This application is based on basic application No. 2024-113449 filed in Japan on July 16, 2024, the entire contents of which are incorporated herein by reference.

[0127] [References] Reference 1: International Publication No. 2023 / 276162

[0128] REFERENCE SIGNS LIST 10 Search device 20 Network 101 Input device 102 Display device 103 External I / F 103a Recording medium 104 Communication I / F 105 RAM 106 ROM 107 Auxiliary storage device 108 Processor 109 Bus 201 Mapping table format data creation unit 202 Search condition acceptance unit 203 Search unit 204 Search result output unit 205 Storage unit

Claims

1. A method for constructing a search index on mapped tabular data, which is virtual tabular data defined by a mapping, comprising: converting a first subset to be searched on the mapped tabular data into a second subset on the source tabular data using an inverse mapping of a mapping from source tabular data, which is the source of values ​​for the mapped tabular data, to the mapped tabular data; searching the source tabular data using the second subset; converting a set of search results obtained as a result of the search into a third subset on the mapped tabular data using a mapping from the source tabular data to the mapped tabular data; and using the third subset as the search result set.

2. The search method of claim 1, wherein a search is performed on the source tabular data using a search index realized by filtering that takes a record number as input and outputs the record number if the record number satisfies a search condition.

3. The search method described in claim 2, wherein the search index is realized using a first array that provides an evaluation index for determining whether the search conditions are met, and a second array that converts the record number into a storage location on the first array.

4. The search method described in claim 3, wherein the search index is an index that identifies a section in the first array that satisfies the search conditions and uses the second array to determine whether the record number belongs to the section in the first array.

5. A search method according to claim 3 or 4, wherein the first array is an array whose elements are the transposed record numbers of the corresponding columns of the tabular data, and the second array is an array in which the values ​​of each element of the first array and the storage positions of the values ​​are swapped.

6. A search method as described in claim 3 or 4, wherein the first array is an array whose elements are the values ​​of the corresponding column of the tabular data in ascending order and unique values, and the second array is an array in which the values ​​of the column are replaced with the storage positions of the values ​​in the first array.

7. The search method of claim 1, wherein a multidimensional index is implemented by cascading searches on the source tabular data.

Citation Information

Patent Citations

  • Search method and search device

    JP7462191B2