SU1228116A1 - Information retrieval device - Google Patents
Information retrieval device Download PDFInfo
- Publication number
- SU1228116A1 SU1228116A1 SU843748516A SU3748516A SU1228116A1 SU 1228116 A1 SU1228116 A1 SU 1228116A1 SU 843748516 A SU843748516 A SU 843748516A SU 3748516 A SU3748516 A SU 3748516A SU 1228116 A1 SU1228116 A1 SU 1228116A1
- Authority
- SU
- USSR - Soviet Union
- Prior art keywords
- input
- register
- output
- inputs
- elements
- Prior art date
Links
Abstract
Изобретение относитс к области вычислительной техники и позвол ет сократить врем поиска информации в блоке пам ти за счет уменьшени количества обращений к нему дл поиска требуемой записи. Устройство содержит регистры адреса верхней и нижней границ соответственно, сумматор, регистр , ключа, первую и вторую схемы сравнени , регистр информации, блок пам ти, в котором хранитс информаци , выходной регистр, генератор импульсов , с первого по третий элементы ИЛИ, первую и вторую группы элементов ИЛИ, реверсивный счетчик, распределитель импульсов, первой и второй элементы И. Поиск записи инициируетс по входу пуска устройства. На входы кода ключа адреса верхней и нижней границ предварительно подаютс коды ключа искомой записи, адреса последней и первой записи в наборе данных соответственно, а по установочному входу устройства производитс занесение исходных данных в соот- ветствунмцие регистры. 1 ил. (ЛThe invention relates to the field of computer technology and reduces the time spent searching for information in a memory unit by reducing the number of accesses to it to search for the required entry. The device contains upper and lower bounds address registers, respectively, adder, register, key, first and second comparison circuits, information register, memory block in which information is stored, output register, pulse generator, first to third OR elements, first and second groups of elements OR, reversible counter, pulse distributor, first and second elements I. Record search is initiated by the device start input. The key codes of the address of the upper and lower bounds are preliminarily supplied with the key codes of the desired record, the addresses of the last and first records in the dataset, respectively, and the input data are entered into the corresponding registers at the device installation input. 1 il. (L
Description
Изобретение относитс к вычислительной технике и может быть использовано в системах управлени базами данных..The invention relates to computing and can be used in database management systems.
Цель изобретени - повышение быст родействи устройства за счет уменшени количества обращений к блоку пам ти дл поиска требуемой записи.The purpose of the invention is to increase the speed of the device by reducing the number of accesses to the memory unit to search for the required entry.
На чертеже изображена блок-схема устройства.The drawing shows a block diagram of the device.
Устройство содержит регистр 1 адреса верхней границы, регистр 2 адрса нижней границы,,.сумматор 3, регистр 4 ключа, первую схему 5 сравнни , регистр 6 информации, блок 7 пам ти, выходной регистр 8, генератор 9 импульсов, первый элемент ИЛИ 10, первую группу элементов ИЛИ 11, второй и третий элементы ИЛИ 12 и 13 реверсивный счетчик 14, распределитель 15 импульсов, вторую схему 16 сравнени , первый и второй элементы И 17 и 18, вторую группу элементов ИЛИ 19, вход 20 пуска устройства, установочный вход 21 устройства, вход 22 кода ключа устройства, вход 23 адреса верхней границы устройства , вход 24 адреса нижней границы устройства, выход 25 адреса устройства , выход 26 признака устройства.The device contains the upper limit address register 1, the lower limit address register 2, the adder 3, the register 4 keys, the first compare circuit 5, the information register 6, the memory block 7, the output register 8, the pulse generator 9, the first element OR 10, the first group of elements OR 11, the second and third elements OR 12 and 13 reversible counter 14, the distributor 15 pulses, the second comparison circuit 16, the first and second elements AND 17 and 18, the second group of elements OR 19, the device start input 20, the installation input 21 devices, input 22 of the device key code, input 23 addresses the top s device limits input 24 addresses the lower boundary of the device, the output device 25 address output 26 of the apparatus of feature.
Позици ми 27, 28 и 29 обозначены выходы Равно, Меньше и Больше первой схемы 5 соответственно. Позици ми 30 - 33 обозначены первый, второй, третий и четвертый выходы распределител 15 соответственно.Positions 27, 28 and 29 designate the outputs Equals, Less and More than the first circuit 5, respectively. The positions 30 to 33 denote the first, second, third, and fourth outputs of the distributor 15, respectively.
Кажда запись набора данных состоит из ключа и информационной части . Предполагаетс , что записи набора данных, наход щегос в блоке 7 пам ти, отсортированы по возрастанию ключей. Требуетс найти адрес записи с заданным ключом. Адрес чейки (записи), раздел ющей набор данных (или оставшуюс часть набора данных, в которой находитс искома запись) на две примерно равные части , называетс рубежом.Each dataset record consists of a key and an information part. It is assumed that the data set records located in memory block 7 are sorted in ascending order of keys. It is required to find the address of the entry with the given key. The address of the cell (record) dividing the data set (or the remaining part of the data set, in which the search record is located) into two approximately equal parts, is called a boundary.
Устройство работает следующим образом .The device works as follows.
В исходном состо нии счетчик 14 и регистры 6 и 8 обнулены, распределитель 15 установлен В исходное состо ние . На входы 22, 23 и 24 подаютс коды ключа искомой записи, адреса последней записи в наборе данных и адреса первой записи в наборе данных соответственно. По импульсу наIn the initial state, the counter 14 and the registers 6 and 8 are reset, the distributor 15 is set to the initial state. The inputs 22, 23, and 24 are supplied with the key codes of the search entry, the address of the last entry in the data set, and the address of the first entry in the data set, respectively. By impulse on
установочном входе 21 разрешаетс запись информации в регистры 4, 1 и 2, в результате чего код-ключа искомой записи заноситс в регистр 4, код адреса последней записи в наборе данных через первую группу элементов ИЛИ 11 записываетс в регистр 1, а код адреса первой записи в наборе данных через вторую группу злементов ИЛИ 19 - в регистр 2. Будем называть адрес последней записи в наборе данных верхней границей (БГ), а адрес первой записи - нижней границей (НГ).installation input 21 is allowed to write information to registers 4, 1 and 2, as a result of which the key code of the required record is entered into register 4, the address code of the last entry in the data set through the first group of elements OR 11 is written into register 1, and the address code of the first entry in the data set through the second group of elements OR 19 - into register 2. We will call the address of the last record in the data set the upper bound (BG), and the address of the first record - the lower bound (NG).
Поиск записи инициируетс подачей импульса по входу 20, в результате чего запускаетс генератор 9. Импульсы с его выхода через распределитель 15 подаютс в различныеRecord search is initiated by applying a pulse to the input 20, as a result of which the generator 9 is started. The pulses from its output through the distributor 15 are fed to various
точки устройства. Первый импульс по вл етс на выходе 30 распределител 15. Этот импульс разрешает запись информации в счетчик 14, в результате чего сумма НГ и ВГ с выходов сумматора 3 со сдвигом на один разр д в сторону младших разр дов заноситс в счетчик 14. Этот код вл етс первым (в последующем - очередным рубежом. Таким образом, первый рубеж Р, определ етс след5тощим образом:device points. The first pulse appears at the output 30 of the distributor 15. This pulse permits the recording of information into the counter 14, as a result of which the sum of NG and VG from the outputs of the adder 3 with a shift of one bit in the direction of the lower bits is entered into the counter 14. This code is It is the first (in the following - the next frontier. Thus, the first frontier P, is determined as follows:
Р/ L (НГ + ВГ )/2J,R / L (NG + VG) / 2J,
где 1цхД - ближайшее целое, меньшее или равное х. После этого по вл етс импульс на выходе 31 распределител 15, по которому запись, определ етс рубежом, с выходов блока 7 пам ти заноситс в регистр 6. Перва схема 5 осуществл ет сравнение кода ключа искомой записи, наход щегос в регистре 4, с кодом ключа записи, считанной на регистр 6. При этом возможныwhere lxd is the nearest integer less than or equal to x. After that, a pulse appears at the output 31 of the distributor 15, according to which the record is determined by the boundary, from the outputs of the memory block 7 is entered into the register 6. The first circuit 5 compares the key code of the desired record located in the register 4, with the code key entries read on register 6. In this case,
следующие ситуации.the following situations.
Код считанной записи совпадает с искомым кодом ключа. В этом случае по вл етс сигнал Равно на выходе 27 первой схемы 5, по которому адресThe code of the read entry matches the desired key code. In this case, the signal Equals at the output 27 of the first circuit 5, at which the address
искомой записи, наход щийс в счетчике 14, заноситс в регистр 8, а генератор 9 останавливаетс .the required record, located in the counter 14, is entered into the register 8, and the generator 9 stops.
Код считанной записи меньше иско-; мого кода ключа. В этом случае возникает сигнал Меньше на выходе 28 первой схемы 5. Этим сигналом задаетс суммирующий режим счетчика .14 и открываетс первый элемент И 17.The code of the read record is less than iso; My key code. In this case, the Smaller signal appears at the output 28 of the first circuit 5. This signal sets the summing mode of the counter .14 and opens the first AND 17 element.
3131
Код считанной записи больше искомого кода ключа. Это приводит к по влению сигнала Больше на вьпсоде 29 первой схемы 5, по которому задаетс вь1читаю1ций режим счетчика 14 и откры- ваетс второй элемент И 18.The code of the read record is greater than the required key code. This leads to the appearance of the More signal at step 29 of the first circuit 5, according to which the mode of the counter 14 is set and the second element And 18 is opened.
По импульсу на выходе 32 распределител 15 содержимое счетчика 14 увеличиваетс или уменьшаетс на единицу в зависимости ат заданного режима работы.According to the pulse at the output 32 of the distributor 15, the contents of the counter 14 are increased or decreased by one, depending on the given operating mode.
После этого по вл етс импульс на выходе 33 распределител 15, который проходит либо через первый элемент И 17, либо через второй элемент И 18 и стробирует запись информации либо в регистр 2, либо в регистр 1. В результате этого в один из регистров 1 или 2 осуществл етс запись кода, сформированного в счетчике 14. After that, a pulse appears at the output 33 of the distributor 15, which passes through either the first element 17 and the second element 18 and gates the recording of information either into register 2 or into register 1. As a result, one of the registers 1 or 2, the code generated in the counter 14 is recorded.
Таким образом, если код ключа считанной из блока 7 записи меньше искомого кода ключа (т.е. в первой половине набора данных искомой записи нет), то 1 первому рубежу прибавл ет- с единица и получившийс код записываетс в регистр 2 в качестве нижней границы нового набора данньпс, содержащего искомую запись, если же код ключа считанной из блока 7 записи больше искомого кода ключа (т.е. во второй половине набора данных искомой записи нет), то из первого рубежа вычитаетс единица и получившийс код записываетс в регистр 1 в качестве верхней границы нового набора данных, содержащего искомую за- пис,ь. Следовательно после выборки записи по первому рубежу и анализа ее ключа размер набора данных уменьшаетс вдвое.Thus, if the key code of the record read from block 7 is less than the required key code (i.e. there is no required record in the first half of the data set), then 1 adds 1 to the first line and the resulting code is written to register 2 as the lower limit A new set of data containing the required record, if the key code of the record read from block 7 is greater than the desired key code (i.e. in the second half of the data set of the required record is not present), one is subtracted from the first turn and the resulting code is written to register 1 in as the top face The new dataset containing the record you are looking for is Ü. Consequently, after sampling a first-line record and analyzing its key, the size of the data set is halved.
После этого снова по вл етс импульс на выходе 30 распределител 15, по которому формируетс второй рубеж по тому же правилу,After that, a pulse appears again at the outlet 30 of the distributor 15, according to which the second boundary is formed according to the same rule
P,j L(Hr + 8r)/2J,P, j L (Hr + 8r) / 2J,
только одна из Иг или 8Г не равна соответствующему коду при формировании первого рубежа.only one of IG or 8G is not equal to the corresponding code when forming the first frontier.
В дальнейшем устройство работает аналогично описанному.In the future, the device operates as described.
Если искома запись в наборе данных отсутствует, то наступит такой момент, когда ВГ станет меньше НГ (на единицу). Эту ситуацию фиксирзг- ет втора схема1-16 сравнени , выдава сигнал на своем выходе, когдаIf there is no record in the data set, then the moment will come when the SH will be less than NG (by one). This situation is fixed by the second comparison circuit 1–16, giving a signal at its output when
8181
j j
0 0
5 050
5 б Q 5 b Q
сwith
5five
00
5five
164164
содержимое регистра I меньше содержимого регистра 2. Этот сигнал остановит генератор 9 и пройдет на выход 26, чем засвидетельствует отсутствие записи с искомым ключом.the contents of register I are less than the contents of register 2. This signal will stop the generator 9 and pass to exit 26, which is indicated by the absence of a record with the desired key.
Поспедук цие обращени к найденной записи могут быть реализованы путем установки устройства в исходное состо ние и загрузки в регистры 1 и 2 адреса этой записи, а в регистр 4 - ее ключа. После этого на вход 20 подаетс импульс, по которому на регистр 6 будет считана требуема запись , а генератор 9 импульсов остановитс .The search for the found record can be realized by setting the device to its original state and loading registers 1 and 2 of the address of this record, and register 4 its key. After that, a pulse is applied to the input 20, through which the required record will be read to register 6, and the pulse generator 9 will stop.
За счет реализации в предлагаемом устройстве другого принципа формировани рубежа на количество записей в наборе данных не накладываетс никаких ограничений. Следовательно дл обеспечени работы устройства нет необходимости искусственно увеличивать количество записей. Реальное число записей в этом случае совпадает с фактическим числом записей Это ведет к более экономному расходу пам ти и к уменьшению количества обращений к блоку пам ти дЛ поиска требуемой записи.Due to the implementation in the proposed device of a different principle of forming a milestone, the number of records in the data set does not impose any restrictions. Therefore, to ensure the operation of the device, there is no need to artificially increase the number of entries. The actual number of records in this case coincides with the actual number of records. This leads to a more economical memory consumption and to a decrease in the number of accesses to the memory block to search for the required record.
Таким образом, применение изобретени позвол ет повысить быстродей- ствие устройства и сократить аппаратурные затраты.Thus, the application of the invention allows to increase the speed of the device and reduce hardware costs.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU843748516A SU1228116A1 (en) | 1984-06-06 | 1984-06-06 | Information retrieval device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU843748516A SU1228116A1 (en) | 1984-06-06 | 1984-06-06 | Information retrieval device |
Publications (1)
Publication Number | Publication Date |
---|---|
SU1228116A1 true SU1228116A1 (en) | 1986-04-30 |
Family
ID=21121993
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU843748516A SU1228116A1 (en) | 1984-06-06 | 1984-06-06 | Information retrieval device |
Country Status (1)
Country | Link |
---|---|
SU (1) | SU1228116A1 (en) |
-
1984
- 1984-06-06 SU SU843748516A patent/SU1228116A1/en active
Non-Patent Citations (1)
Title |
---|
Авторское свидетельство СССР № 342185, кл. G 06 F 7/22, 1969. Авторское свидетельство СССР № 1126972, кл. G 06 F 15/40, 1984. * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US3962689A (en) | Memory control circuitry | |
SU1228116A1 (en) | Information retrieval device | |
US4128879A (en) | Recirculating memory with plural input-output taps | |
SU809350A1 (en) | Storage | |
GB1468753A (en) | Associative memory | |
SU551702A1 (en) | Buffer storage device | |
SU1185325A1 (en) | Device for searching given number | |
SU1621049A1 (en) | Device for searching for information | |
SU1208562A1 (en) | Device for editing records in tables | |
SU809182A1 (en) | Memory control device | |
SU1532914A1 (en) | Device for searching for given number | |
SU1462292A1 (en) | Device for searching for preset number | |
SU1564648A1 (en) | Device for data hunting | |
SU1023396A1 (en) | Storage for associative memory | |
SU1183955A1 (en) | Device for searching given number | |
SU1479941A1 (en) | Unit for editing data in table | |
SU1711185A1 (en) | Device for information searching | |
SU1160472A1 (en) | Buffer storage | |
SU439810A1 (en) | Exchange device | |
RU2108618C1 (en) | Multichannel priority device | |
SU1277210A1 (en) | Associative storage | |
SU1328819A2 (en) | Apparatus for monitoring the program run | |
SU1211735A1 (en) | Device for checking program run | |
SU1674099A1 (en) | Data input device | |
SU1107118A1 (en) | Device for sorting numbers |