RU2623882C1 - Method for searching inlet line in search tree with indexing of search tree nodes - Google Patents

Method for searching inlet line in search tree with indexing of search tree nodes Download PDF

Info

Publication number
RU2623882C1
RU2623882C1 RU2016105559A RU2016105559A RU2623882C1 RU 2623882 C1 RU2623882 C1 RU 2623882C1 RU 2016105559 A RU2016105559 A RU 2016105559A RU 2016105559 A RU2016105559 A RU 2016105559A RU 2623882 C1 RU2623882 C1 RU 2623882C1
Authority
RU
Russia
Prior art keywords
node
search
tree
nodes
search tree
Prior art date
Application number
RU2016105559A
Other languages
Russian (ru)
Inventor
Андрей Владимирович Собко
Original Assignee
Акционерное общество "Лаборатория Касперского"
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Акционерное общество "Лаборатория Касперского" filed Critical Акционерное общество "Лаборатория Касперского"
Priority to RU2016105559A priority Critical patent/RU2623882C1/en
Application granted granted Critical
Publication of RU2623882C1 publication Critical patent/RU2623882C1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9027Trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

FIELD: information technology.
SUBSTANCE: in method for searching the input line in search tree, a character dictionary is created that defines the set of characters that is used in the search. Search tree is created and search tree is indexed by creating an indexing table containing the symbols and a set of search tree nodes indexes. Plurality of indexes of nodes is determined, that will be used when searching the input line with the search tree. The input line is searched in the search tree by comparing sublines of incoming line with sublines only in those tree nodes, whose indixes coincide with the indexes in index table for incoming line, which reduces the number of sublines comparison operations performed.
EFFECT: reducing path search time with search tree.
4 cl, 5 dwg

Description

Область техникиTechnical field

Изобретение относится к решениям для поиска информации по дереву, а более конкретно к способам поиска входной строки в дереве поиска, содержащем маски.The invention relates to solutions for finding information in a tree, and more particularly to methods for finding an input string in a search tree containing masks.

Уровень техникиState of the art

В настоящее время одним из способов защиты вычислительного устройства является контроль действий программного обеспечения (ПО) приложением безопасности (например, антивирусным приложением) при обращении к объектам (например, к файлам) по различным путям (англ. path). При этом пути могут быть локальными (обращение к локальным каталогам и папкам), реестровыми (обращение к реестру операционной системы), сетевыми (доступ к другим вычислительным устройствам или ресурсам сети интернет). Также следует отметить, что синтаксис путей может изменяться в зависимости от типа операционной системы и типа файловой системы.Currently, one of the ways to protect a computing device is to control the actions of software (software) by a security application (for example, an anti-virus application) when accessing objects (for example, files) in various ways (English path). In this case, the paths can be local (access to local directories and folders), registry (access to the registry of the operating system), network (access to other computing devices or Internet resources). It should also be noted that the path syntax may vary depending on the type of operating system and type of file system.

Антивирусное приложение, например, может анализировать пути, по которым обращается программа, и принимать решение о небезопасности тех или иных действий программы. Но обычно анализ является трудоемкой задачей, так как любые методы анализа требуют расчетов, а возможности аппаратных ресурсов вычислительного устройства, на котором установлено антивирусное приложение, ограничены. В связи с этим можно задавать список разрешенных (или запрещенных) путей. При обращении программы по определенному пути необходимо определить, разрешено ли данное действие. Для этого антивирусное приложение может искать путь, по которому обращается программа, в списке разрешенных (или запрещенных) путей.An anti-virus application, for example, can analyze the ways in which a program accesses and make decisions about the insecurity of certain program actions. But usually analysis is a time-consuming task, since any analysis methods require calculations, and the hardware resources of the computing device on which the antivirus application is installed are limited. In this regard, you can specify a list of allowed (or forbidden) paths. When accessing the program in a certain way, it is necessary to determine whether this action is allowed. To do this, the antivirus application can search for the path that the program accesses in the list of allowed (or forbidden) paths.

Так как пути в общем случае представляют собой строки, количество разрешенных путей может быть достаточно большим, а приложение может обращаться к сотням и даже тысячам путей, поиск по списку разрешенных путей может выполняться долгое время. Кроме того, пути могут содержать «маски» - специальные символы или последовательности символов, которые используются для описания схожих путей. Процессорное время, затраченное на поиск, может быть значительным. Для ускорения поиска пути нужно использовать не наборы строк (существующих путей), а другие структуры данных, например деревья.Since paths are generally strings, the number of allowed paths can be quite large, and the application can access hundreds or even thousands of paths, searching the list of allowed paths can take a long time. In addition, paths may contain “masks” - special characters or sequences of characters that are used to describe similar paths. The processor time spent searching can be significant. To speed up the search for the path, you need to use not data sets of lines (existing paths), but other data structures, such as trees.

Сама задача поиска по дереву не нова. Так, публикация US7403494 описывает поиск по дереву, причем для каждого узла дерева генерируется ключ, который используется для ускорения перенаправления портов в сетевых устройствах.The tree search task itself is not new. So, publication US7403494 describes a tree search, and a key is generated for each tree node, which is used to accelerate port forwarding in network devices.

Публикация US 8880507 описывает систему поиска IP-адресов, использующую дерево, в узлах которого содержатся подстроки.Publication US 8880507 describes an IP address lookup system using a tree whose nodes contain substrings.

Публикация US 8572126 описывает поиск по троичному дереву, в котором могут использоваться регулярные выражения.Publication US 8572126 describes a search in a ternary tree in which regular expressions can be used.

Существующие системы и способы не решают задачу поиска различных путей по дереву. Предлагаемый способ выполняет поиск входной строки по дереву, узлы которого могут содержать маски.Existing systems and methods do not solve the problem of finding various paths in a tree. The proposed method searches for an input string in a tree whose nodes may contain masks.

Сущность изобретенияSUMMARY OF THE INVENTION

Технический результат настоящего изобретения заключается в повышении производительности поиска по дереву по сравнению с известными способами поиска по дереву, узлы которого содержат подстроки, путем сравнения подстрок входящей строки с подстроками только в тех узлах дерева, индексы которых совпадают с индексами в таблице индексации для входящей строки, что уменьшает количество выполняемых операций сравнения подстрок.The technical result of the present invention is to increase the search performance of a tree compared to the known methods of searching a tree, the nodes of which contain substrings, by comparing substrings of the incoming string with substrings only in those nodes of the tree whose indices coincide with the indexes in the index table for the incoming string, which reduces the number of substring comparison operations performed.

Согласно одному из вариантов реализации предоставляется способ поиска входной строки в дереве поиска, в котором: создают словарь символов с помощью средства создания дерева, определяющий множество символов, которое используется при поиске, при этом словарь содержит по меньшей мере: символы алфавита; маски, которыми являются по меньшей мере символ замены одного символа и символ обобщения, заменяющий произвольное число символов в строке; создают дерево поиска с помощью средства создания дерева, при этом набор строк, используемых для создания дерева, включает в себя по меньшей мере одну строку, содержащую маски и символы алфавита; в узлах (node) дерева сохраняются подстроки (substring) каждой строки, входящей в набор строк, при этом в отдельный узел дерева поиска сохраняется подстрока, являющаяся префиксом входящей в набор строк строки, содержащая символы до маски; узел, в который сохраняется последняя подстрока входящей в набор строк строки, является конечным; выполняют индексацию дерева поиска с помощью средства создания дерева, создавая таблицу индексации, содержащую символы и набор индексов узлов дерева поиска, при этом в таблице индексации используются символы из словаря символов; узлам, имеющим одинаковый родительский узел, присваиваются индексы, при этом присвоенный индекс для каждого узла имеет уникальное числовое значение; из подстроки, хранящейся в каждом конечном узле, выделяют последний символ, при этом выделенный символ может являться символом алфавита или маской; для каждого выделенного последнего символа в таблицу индексации добавляется набор индексов узлов дерева поиска, через которые происходит переход от узла, из подстроки которого выделен последний символ, до узла, не имеющего родительского узла; определяют множество индексов узлов с помощью средства поиска, которое будет использовано при поиске входной строки по дереву поиска, при этом выделяют последний символ входящей строки, которую необходимо найти в дереве поиска; из таблицы индексации выбирают набор индексов узлов дерева поиска для поиска упомянутого символа, добавленный на этапе ранее; из таблицы индексации выбирают набор индексов узлов дерева поиска, добавленный на этапе ранее для масок; объединяют выбранные наборы узлов во множество индексов узлов; выполняют поиск входной строки в дереве поиска с помощью средства поиска, при этом из входящей строки последовательно выделяют подстроку, начиная с первого символа; сравнивают выделенную подстроку с подстроками, хранящимися в узлах дерева поиска, при этом сначала определяется, входит ли индекс сравниваемого узла в множество индексов узлов, определенное на этапе ранее, затем сравнивается значение выделенной подстроки и подстроки, сохраненной в узле.According to one embodiment, a method is provided for searching for an input string in a search tree, in which: a dictionary of characters is created using a tree creation tool defining a plurality of characters used in the search, the dictionary comprising at least: alphabetical characters; masks, which are at least one character replacement symbol and a generalization symbol replacing an arbitrary number of characters in a string; creating a search tree using the tree creation tool, wherein the set of lines used to create the tree includes at least one line containing masks and alphabetical characters; in the nodes of the tree, substring of each line in the set of strings is saved, while in the separate node of the search tree, the substring is saved, which is the prefix of the line in the set of lines containing characters before the mask; the node to which the last substring of the line in the rowset is stored is the terminal; perform indexing of the search tree using the tree creation tool, creating an indexing table containing symbols and a set of indexes of nodes of the search tree, while symbols from the symbol dictionary are used in the indexing table; Nodes that have the same parent node are assigned indices, and the assigned index for each node has a unique numerical value; the last character is extracted from the substring stored in each end node, while the selected character can be an alphabet character or a mask; for each last character selected, a set of indexes of the nodes of the search tree is added to the indexing table, through which the transition occurs from the node from which the last character is selected from the substring to the node that does not have a parent node; determining a plurality of node indices using a search tool that will be used when searching for an input line in the search tree, and the last character of the input line to be found in the search tree is selected; from the indexing table, a set of indexes of nodes of the search tree for searching the said symbol is added, added at the stage earlier; from the indexing table, a set of indexes of nodes of the search tree added at the stage earlier for masks is selected; Combine selected sets of nodes into multiple node indices. they search for the input line in the search tree using the search tool, and a substring is sequentially selected from the input line starting from the first character; comparing the selected substring with the substrings stored in the nodes of the search tree, it is first determined whether the index of the compared node is included in the set of node indices determined in the previous step, then the value of the selected substring and the substring stored in the node are compared.

Согласно одному из частных вариантов реализации предоставляется способ, в котором словарь символов дополнительно содержит цифры.According to one particular embodiment, a method is provided in which the character dictionary further comprises numbers.

Согласно другому частному реализации варианту реализации предоставляется способ, в котором словарь символов дополнительно содержит знаки препинания.According to another particular implementation embodiment, a method is provided in which the character dictionary further comprises punctuation marks.

Согласно еще одному частному варианту реализации предоставляется способ, в котором конечный узел дерева имеет по меньшей мере один дочерний узел.According to yet another particular embodiment, a method is provided in which an end node of a tree has at least one child node.

Краткое описание чертежейBrief Description of the Drawings

Дополнительные цели, признаки и преимущества настоящего изобретения будут очевидными из прочтения последующего описания осуществления изобретения со ссылкой на прилагаемые чертежи, на которых:Additional objectives, features and advantages of the present invention will be apparent from reading the following description of an embodiment of the invention with reference to the accompanying drawings, in which:

Фиг. 1 изображает пример работы программного обеспечения на компьютере.FIG. 1 shows an example of how the software works on a computer.

Фиг.2А изображает способ поиска входной строки в дереве поиска, содержащем маски.Fig. 2A depicts a method for searching an input string in a search tree containing masks.

Фиг. 2Б отображает структуру дерева поиска.FIG. 2B displays the structure of the search tree.

Фиг. 2В отображает структуру дерева поиска после индексации.FIG. 2B shows the structure of the search tree after indexing.

Фиг. 3 представляет пример компьютерной системы общего назначения, на которой может быть реализовано настоящее изобретение.FIG. 3 is an example of a general purpose computer system on which the present invention may be implemented.

Описание вариантов осуществления изобретенияDescription of Embodiments

Объекты и признаки настоящего изобретения, способы для достижения этих объектов и признаков станут очевидными посредством отсылки к примерным вариантам осуществления. Однако настоящее изобретение не ограничивается примерными вариантами осуществления, раскрытыми ниже, оно может воплощаться в различных видах. Сущность, приведенная в описании, является ничем иным, как конкретными деталями, обеспеченными для помощи специалисту в области техники в исчерпывающем понимании изобретения, и настоящее изобретение определяется только в объеме приложенной формулы.The objects and features of the present invention, methods for achieving these objects and features will become apparent by reference to exemplary embodiments. However, the present invention is not limited to the exemplary embodiments disclosed below, it can be embodied in various forms. The essence described in the description is nothing more than the specific details provided to assist the specialist in the field of technology in a comprehensive understanding of the invention, and the present invention is defined only in the scope of the attached claims.

Фиг. 1 изображает пример работы приложений на вычислительном устройстве.FIG. 1 shows an example of the operation of applications on a computing device.

В общем случае вычислительное устройство работает под управлением операционной системы 110. Приложения 120 обращаются к различным файлам, веткам реестра, путям в локальной сети. Для вычислительных устройств могут быть определены политики безопасности 170, в соответствии с которыми каждое приложение имеет свой определенный набор путей, по которым приложению разрешен доступ. Приложение безопасности (например, антивирусное приложение) 160 может наблюдать за другими приложениями 120 и сравнивать пути, к которым обращаются приложения, а при возникновении нарушений политик безопасности приложениями 120 блокировать доступ этих приложений 120 к ресурсам по неразрешенным политиками путям. В общем случае приложение безопасности 160 выполняет наблюдение за активностью других приложений и блокирует их доступ с использованием перехвата вызовов API-функций. Например, приложение безопасности 160 может перехватывать вызовы API-функций приложением 120, определять параметры перехваченного вызова, которые в свою очередь могут содержать пути, и сравнивать параметры с политиками безопасности 170.In general, the computing device is running an operating system 110. Applications 120 access various files, registry branches, and paths on the local network. For computing devices, security policies 170 may be defined according to which each application has its own specific set of paths by which the application is allowed access. A security application (eg, an anti-virus application) 160 can monitor other applications 120 and compare the paths accessed by applications, and if security policy violations occur by applications 120, block the access of these applications 120 to resources through unauthorized policies. In general, a security application 160 monitors the activity of other applications and blocks their access by intercepting calls to API functions. For example, security application 160 may intercept API function calls by application 120, determine intercepted call parameters, which in turn may contain paths, and compare settings with security policies 170.

В частном случае количество путей, контролируемых приложением безопасности 160, может быть достаточно большим. Также политики безопасности могут содержать как правила, содержащие только разрешенные пути, так и правила, содержащие запрещенные пути. Пути могут представлять собой:In the particular case, the number of paths controlled by the security application 160 can be quite large. Also, security policies can contain both rules containing only allowed paths and rules containing forbidden paths. Paths can be:

- локальные пути к файлам и каталогам 130 (в зависимости от типа устройства и операционной системы формат путей может отличаться);- local paths to files and directories 130 (depending on the type of device and operating system, the format of the paths may vary);

- пути к веткам реестра 140;- paths to registry branches 140;

- пути в локальной сети 150;- paths in the local network 150;

- адреса ресурсов в сети интернет 155;- addresses of resources on the Internet 155;

- пути к определенным сервисам и серверам (например, строка связи с базой данных 165 на SQL-сервере);- paths to certain services and servers (for example, a connection string with database 165 on an SQL server);

- любые другие пути и адреса, которые можно представить в виде форматированной строки.- any other paths and addresses that can be represented as a formatted string.

Пути, разрешенные или запрещенные для приложения, могут быть описаны в базе данных, которую использует приложение безопасности 180. Зачастую множество путей содержит пути из одного каталога, которые могут быть описаны с помощью масок. В общем случае маска - это строка, с помощью которой может быть описано множество похожих строк. В общем случае маски описываются с помощью специальных символов (спецсимволов), например, «?» (маска произвольного одиночного символа) и «*» (маска произвольного числа произвольных символов). Описание с помощью масок сокращает общее количество путей, контролируемых приложением безопасности 160, например, пути «C:\Windows\System\Drivers» и «D:\Windows\System32\Drivers» могут быть описаны с помощью маски «?:\Windows\System*\Drivers». Однако количество контролируемых (разрешенных или запрещенных) путей даже в случае использования масок может быть значительным. При линейном последовательном поиске сравнение пути, к которому обращается приложение, со всеми разрешенными (запрещенными) путями занимает значительное время, так как является последовательным сравнением строк друг с другом. При этом возможно замедление работы как отдельного приложения 120, так и приложения безопасности 160 или операционной системы 110 в целом. При выполнении ресурсоемких задач, например, при математических расчетах или обработке запросов к базе данных, на вычислительном устройстве (например, компьютере или сервере) замедление недопустимо, необходимо решение для быстрого поиска пути, по которому обращается приложение, во множестве разрешенных путей.Paths allowed or denied for the application can be described in the database that the security application 180 uses. Often, many paths contain paths from the same directory, which can be described using masks. In general, a mask is a string that can be used to describe many similar strings. In the general case, masks are described using special characters (special characters), for example, “?” (Mask of an arbitrary single character) and “*” (mask of an arbitrary number of arbitrary characters). The description using masks reduces the total number of paths controlled by the security application 160, for example, the paths “C: \ Windows \ System \ Drivers” and “D: \ Windows \ System32 \ Drivers” can be described using the mask “?: \ Windows \ System * \ Drivers. " However, the number of controlled (allowed or forbidden) paths, even in the case of using masks, can be significant. In a linear sequential search, comparing the path that the application accesses with all allowed (forbidden) paths takes considerable time, since it is a sequential comparison of strings with each other. In this case, it is possible to slow down the operation of a separate application 120, as well as a security application 160 or the operating system 110 as a whole. When performing resource-intensive tasks, for example, in mathematical calculations or processing database queries, on a computing device (for example, a computer or server), deceleration is unacceptable, you need a solution to quickly find the path that the application is accessing in the set of allowed paths.

Проблема быстрого поиска пути, описанная выше, может быть решена с помощью дерева поиска, содержащего маски путей, которое будет использоваться приложением безопасности 160 для поиска пути, к которому обращается приложение 120, среди разрешенных или запрещенных путей.The quick path search problem described above can be solved by using a search tree containing path masks that will be used by the security application 160 to search for the path that the application 120 accesses among the allowed or forbidden paths.

Фиг. 2А изображает способ поиска пути по дереву поиска, содержащему маски путей.FIG. 2A depicts a method for searching a path through a search tree containing path masks.

Тип дерева поиска - не бинарное, каждый узел (англ. node) может иметь более одного потомка или не иметь потомков вообще. Дерево поиска представляет собой дерево, где подстроки, входящие в состав пути, располагаются в узлах дерева 220. Кроме того, в одном из вариантов реализации узлы одного уровня, у которых одинаковый родительский узел, могут быть связаны между собой в виде направленного списка (узел дерева содержит указатель на другой узел).The type of the search tree is not binary, each node (English node) can have more than one descendant or have no descendants at all. The search tree is a tree where the substrings included in the path are located in the nodes of the tree 220. In addition, in one embodiment, nodes of the same level that have the same parent node can be linked together in the form of a directed list (tree node contains a pointer to another node).

На начальном этапе 201 средство создания дерева 291 создает словарь символов. Словарь символов содержит символы и спецсимволы, которые могут быть использованы средством создания дерева 291 при создании дерева. Например, в качестве символов используются только английские символы в верхнем регистре. Кроме того, в качестве спецсимволов могут использоваться упомянутые символы «?» и «*». Расположение спецсимволов в строке адреса произвольное, количество спецсимволов не ограничено. В общем случае запрещается использовать комбинации из рядом расположенных спецсимволов (то есть нельзя указать «*?», «?*» или «**»).At an initial step 201, the tree builder 291 creates a character dictionary. The symbol dictionary contains symbols and special characters that can be used by the tree creation tool 291 to create the tree. For example, only uppercase English characters are used as characters. In addition, the mentioned characters “?” And “*” can be used as special characters. The location of special characters in the address bar is arbitrary, the number of special characters is not limited. In general, it is forbidden to use combinations of adjacent special characters (that is, you cannot specify "*?", "? *" Or "**").

В одном из вариантов реализации для каждого символа в словаре средство создания дерева 291 добавляет индекс - числовое значение. Например, элементы словаря, состоящего из английских символов верхнем регистре, цифр и спецсимволов, имеют индексы от «0» до «36» (26 индексов добавляются для букв алфавита, 10 индексов для цифр, индекс «36» добавляется для спецсимволов).In one embodiment, for each character in the dictionary, the tree builder 291 adds an index — a numerical value. For example, elements of a dictionary consisting of English uppercase characters, numbers and special characters have indices from “0” to “36” (26 indices are added for letters of the alphabet, 10 indices for numbers, index “36” is added for special characters).

Пример дерева поиска 220, построенного на этапе 202 средством создания дерева 291 для набора путей:An example of a search tree 220 constructed in step 202 by means of creating a tree 291 for a set of paths:

Figure 00000001
Figure 00000001

отображен на Фиг. 2Б.shown in FIG. 2B.

При построении дерева поиска 220 средство создания дерева 291 сохраняет (помещает) в узлы дерева поиска 220 подстроки (англ. substring), состоящие из символов словаря, при этом каждая строка из набора путей разделяется на подстроки. В общем случае реализации настоящего изобретения из каждой строки из набора путей выделяется и помещается в отдельный узел дерева поиска 220 подстрока, являющаяся префиксом строки из набора путей, содержащая символы до спецсимвола («?» или «*»). В одном из вариантов реализации спецсимвол «?» также помещается в отдельный узел дерева поиска 220. Оставшаяся подстрока (оставшаяся часть строки из набора путей) также (по вышеуказанным правилам) разделяется на подстроки, если содержит другие спецсимволы, в ином случае помещается в отдельный узел дерева поиска 220. В случае, если строка из набора путей содержит подстроку, которая содержится в подстроке одного из узлов дерева поиска 220, подстрока этого узла разделяется на две подстроки, при этом первая подстрока сохраняется в этом узле дерева поиска 220, а вторая - в дочернем. Узел дерева поиска 220, в который помещается последняя подстрока входящей в набор путей строки, является конечным, но может содержать потомков. Конечные узлы дерева поиска 222 отмечены на Фиг. 2Б с помощью утолщенных контурных линий.When constructing the search tree 220, the tool for creating the tree 291 saves (places) substrings consisting of dictionary characters in the nodes of the search tree 220, with each line from the set of paths being divided into substrings. In the General case, the implementation of the present invention from each line of the set of paths is allocated and placed in a separate node of the search tree 220 substring, which is the prefix of the line from the set of paths containing characters before the special character ("?" Or "*"). In one embodiment, the special character “?” Is also placed in a separate node of the search tree 220. The remaining substring (the rest of the line from the set of paths) is also (according to the above rules) divided into substrings if it contains other special characters, otherwise it is placed in a separate node search tree 220. If a string from a set of paths contains a substring that is contained in a substring of one of the nodes of the search tree 220, the substring of this node is divided into two substrings, while the first substring is stored in this tree node OISCA 220, and the second - in the child. The node of the search tree 220, which contains the last substring of the string included in the set of paths, is finite, but may contain descendants. The end nodes of the search tree 222 are marked in FIG. 2B using thickened contour lines.

На этапе 203 средство построения дерева 291 выполняет индексацию дерева поиска 222, которое после индексации имеет структуру, отображенную на Фиг. 2В. Средство построения дерева 291 присваивает индексы узлам, у которых есть соседние узлы на том же уровне дерева поиска 222 (в общем случае тем узлам, у которых одинаковый родительский узел). Например, это узлы 0 и 1 (родительский узел без индекса - «\REGISTRY\MACHINE\S»); узлы 2, 3 и 4 (родительский узел - 1); узлы 5 и 6 (родительский узел - 4); узлы 7 и 8 (родительский узел без индекса - «*\»); узлы 9,10 и 11 (родительский узел - 8). При этом присвоенный индекс для каждого узла имеет уникальное числовое значение. Индексы узлов дерева поиска 222 указаны в скобках на Фиг. 2В.At step 203, the tree builder 291 indexes the search tree 222, which after indexing has the structure shown in FIG. 2B. Tree Builder 291 assigns indexes to nodes that have neighboring nodes at the same level of search tree 222 (in general, to nodes that have the same parent node). For example, these are nodes 0 and 1 (the parent node without an index is “\ REGISTRY \ MACHINE \ S”); nodes 2, 3 and 4 (parent node - 1); nodes 5 and 6 (parent node - 4); nodes 7 and 8 (the parent node without an index is “* \”); nodes 9,10 and 11 (parent node - 8). Moreover, the assigned index for each node has a unique numerical value. The node indexes of the search tree 222 are indicated in parentheses in FIG. 2B.

Далее средство построения дерева 291 с использованием словаря символов строит таблицу индексации. В каждом конечном узле средство построения дерева 291 выбирает последний символ подстроки узла. Далее от каждого конечного узла дерева средство построения дерева 291 движется к самому верхнему узлу, и в таблице индексации сохраняет индексы узлов, через которые осуществлялось движение. Если выбранный символ (последний символ подстроки конченого узла) встречается более чем в одном конечном узле дерева поиска 222, то индексы узлов, через которые осуществлялось движение, объединяются средством построения дерева 291.Next, the tree builder 291 using the symbol dictionary builds an index table. At each end node, the tree builder 291 selects the last character of the substring of the node. Further, from each leaf node of the tree, the tree builder 291 moves to the uppermost node, and in the indexing table saves the indices of the nodes through which the movement was carried out. If the selected character (the last character of the substring of the finished node) occurs in more than one final node of the search tree 222, then the indices of the nodes through which the movement was carried out are combined by the tree builder 291.

В результате таблица индексации в одном из вариантов реализации выглядит так (сам символ, индексы узлов):As a result, the indexing table in one embodiment looks like this (the symbol itself, node indices):

Figure 00000002
Figure 00000002

На этапе 204 средство поиска 292 определяет множество индексов узлов, которые будут использованы при поиске входной строки по дереву поиска 222. Для этого по таблице индексации для последнего символа строки, которую надо найти, определяется набор индексов узлов, по которым необходимо выполнить поиск. Так, например, в строке «REGISTRY\MACHINE\SYSTEM\CONTROLSET001\ENUM\ROOT\LEGACY_KLP» последним символом является «Р», поэтому согласно таблице индексации, при поиске необходимо использовать узлы (3), (10) дерева поиска 222. Кроме того, так как дерево поиска 222 содержит произвольный символ в конечном узле, индексы узлов, ведущие к нему, тоже учитываются средством поиска 292, то есть при поиске необходимо также использовать узлы (1), (2), (0), (8), (11). Средство поиска 292 объединяет наборы индексов узлов во множество индексов узлов, в результате чего определяет, что при поиске упомянутой строки среди узлов, в которых есть ветвление (родительский узел имеет более одного дочернего узла), выполнять сравнение нужно только в узлах (3), (10), (1), (2), (0), (8), (11). В одном из вариантов реализации множество индексов узлов может быть по значению индекса.At step 204, the search tool 292 determines a plurality of node indices that will be used when searching for an input row in the search tree 222. To do this, a set of node indices to be searched is determined from the index table for the last character of the row to be found. So, for example, in the line “REGISTRY \ MACHINE \ SYSTEM \ CONTROLSET001 \ ENUM \ ROOT \ LEGACY_KLP” the last character is “P”, therefore, according to the indexing table, you must use the nodes (3), (10) of the search tree 222. In addition to Moreover, since the search tree 222 contains an arbitrary symbol in the final node, the node indices leading to it are also taken into account by the search tool 292, i.e., nodes (1), (2), (0), (8) must also be used in the search , (eleven). The search tool 292 combines the sets of node indices into multiple node indices, as a result of which it determines that when searching for the mentioned row among nodes that have a branch (the parent node has more than one child node), the comparison should be performed only in nodes (3), ( 10), (1), (2), (0), (8), (11). In one embodiment, a plurality of node indices may be based on the index value.

На этапе 205 средство поиска 292 выполняет поиск входной строки в дереве поиска 222. Происходит сравнение входной строки с подстроками, хранящимися в узлах дерева поиска 222, при этом сначала определяется, входит ли индекс узла во множество индексов узлов, определенное на этапе 204, если узлу присвоен индекс, затем подстрока узла ищется во входной строке. В настоящее время существует множество способов быстрого поиска подстроки в строке, существуют также способы, которые выполняют упомянутый поиск с использованием масок. Рассмотрение этих способов выходит за рамки настоящего изобретения. Если подстрока из узла дерева поиска 222 содержится во входной строке и находится в начале входной строки (является префиксом входной строки), то часть входной строки, эквивалентная подстроке из узла дерева поиска 222, удаляется из входной строки, и поиск продолжается. Оставшаяся часть входной строки (подстрока) сравнивается с дочерними узлами упомянутого узла дерева, подстрока которого содержалась во входной строке. Как и ранее, сначала определяется, входит ли индекс узла во множество индексов узлов, определенное на этапе 204, если узлу присвоен индекс, затем подстрока узла ищется в оставшейся части входной строки. Таким образом, ветвления дерева, которые образованы узлами, индексы которых не указаны в таблице индексации, не используются для поиска средством поиска 292.At step 205, the search tool 292 searches for the input string in the search tree 222. The input string is compared with the substrings stored in the nodes of the search tree 222, and it is first determined whether the node index is included in the set of node indices determined in step 204 if the node an index is assigned, then the substring of the node is looked up in the input string. Currently, there are many ways to quickly search for a substring in a string, there are also methods that perform the said search using masks. Consideration of these methods is beyond the scope of the present invention. If the substring from the node of the search tree 222 is contained in the input line and is at the beginning of the input line (is the prefix of the input line), then the part of the input line equivalent to the substring from the node of the search tree 222 is deleted from the input line and the search continues. The rest of the input string (substring) is compared with the child nodes of the tree node, the substring of which was contained in the input string. As before, it is first determined whether the node index is included in the set of node indices determined in step 204, if the node is assigned an index, then the substring of the node is searched for in the remainder of the input string. Thus, tree branches that are formed by nodes whose indices are not listed in the index table are not used for search by the search tool 292.

Так, в примере, рассмотренном выше, поиск упомянутой входной строки «REGISTRY\MACHINE\SYSTEM\CONTROLSET001\ENUM\ROOT\LEGACY_KLP» выполняется с использованием узлов (3), (10), (1), (2), (0), (8), (11) дерева поиска 222. Самый верхний узел дерева поиска 222 не имеет индекса, подстрока «\REGISTRY\MACHINE\S», содержащаяся в нем, является частью упомянутой входной строки. Эта часть строки удаляется из входной строки, поиск продолжается для строки «YSTEM\CONTROLSET001\ENUM\ROOT\LEGACY_KLP», с которой сравнивается подстрока «OFTWARE\» узла дерева поиска 222 с индексом (1). Индекс этого узла включен в таблицу индексации, это означает, что в дочерних узлах ветвлений дерева поиска 222 существует подстрока, заканчивающаяся на символ «Р» или содержащая маску. Однако подстрока узла с индексом (1) не является частью строки, для которой продолжается поиск. Поиск не продолжается с использованием дочерних узлов узла с индексом (1), а продолжается с использованием узла с индексом (0), который также входит в определенное ранее множество индексов узлов. Так как строка «YSTEM\CONTROLSET» является частью строки поиска, строка поиска принимает вид «001\ENUM\ROOT\LEGACY_KLP», и поиск продолжается с использованием дочерних узлов узла (0). Дочерний узел только один, не имеет индекса, поэтому выполняется поиск его подстроки в строке поиска. Так как подстрока этого узла имеет вид «*\» (то есть содержит маску), используются упомянутые способы поиска подстроки с использованием масок. Так, в результате такого поиска подстрока «001\» эквивалентна подстроке «*\». Входная строка принимает вид «ENUM\ROOT\LEGACY_KLP», и поиск продолжается. Узел с индексом (7) не входит в определенное ранее множество индексов узлов, поэтому поиск с использованием данного узла не производится. Узел с индексом (8) входит в определенное ранее множество индексов узлов, подстрока «ENUM\ROOT\LEGACY_KL» узла (8) является частью строки. В результате строка для поиска принимает вид «Р». В определенное ранее множество индексов узлов не входит узел (9), но входят узлы (10) и (11), поэтому происходит поиск подстроки узла (10) в строке поиска. Поиск не успешен, далее происходит поиск подстроки узла (11) в строке поиска. Так как подстрока этого узла имеет вид «?» (то есть содержит маску), используются упомянутые способы поиска подстроки с использованием масок. Так, в результате такого поиска подстрока «Р» эквивалентна подстроке «?». Таким образом, упомянутая входная строка найдена средством поиска 292 в дереве поиска 222, то есть описана подстроками и масками, хранящимися в узлах дерева поиска 222.So, in the example considered above, the search for the mentioned input string “REGISTRY \ MACHINE \ SYSTEM \ CONTROLSET001 \ ENUM \ ROOT \ LEGACY_KLP” is performed using nodes (3), (10), (1), (2), (0) , (8), (11) search tree 222. The topmost node of the search tree 222 does not have an index, the substring "\ REGISTRY \ MACHINE \ S" contained in it is part of the mentioned input line. This part of the string is removed from the input string, the search continues for the string "YSTEM \ CONTROLSET001 \ ENUM \ ROOT \ LEGACY_KLP", with which the substring "OFTWARE \" of the search tree node 222 is compared with index (1). The index of this node is included in the indexing table, which means that in the child nodes of the branches of the search tree 222 there is a substring ending in the character "P" or containing a mask. However, the substring of the node with index (1) is not part of the string for which the search continues. The search does not continue using the child nodes of the node with index (1), but continues using the node with index (0), which is also included in the previously defined set of node indices. Since the string “YSTEM \ CONTROLSET” is part of the search string, the search string takes the form “001 \ ENUM \ ROOT \ LEGACY_KLP”, and the search continues using the child nodes of the node (0). There is only one child node, it does not have an index, so it searches for its substring in the search bar. Since the substring of this node has the form “* \” (that is, it contains a mask), the mentioned methods of searching for a substring using masks are used. So, as a result of such a search, the substring “001 \” is equivalent to the substring “* \”. The input line takes the form "ENUM \ ROOT \ LEGACY_KLP", and the search continues. A node with index (7) is not included in the previously defined set of node indices, therefore, a search using this node is not performed. The node with index (8) is included in the previously defined set of node indices, the substring "ENUM \ ROOT \ LEGACY_KL" of node (8) is part of the string. As a result, the search string takes the form "P". The previously defined set of node indices does not include the node (9), but the nodes (10) and (11) enter, so the substring of the node (10) is searched in the search bar. The search was not successful, then the substring of the node (11) is searched in the search bar. Since the substring of this node has the form “?” (That is, it contains a mask), the mentioned methods of searching for a substring using masks are used. So, as a result of such a search, the substring “P” is equivalent to the substring “?”. Thus, said input string is found by the search engine 292 in the search tree 222, that is, described by substrings and masks stored in the nodes of the search tree 222.

Функциональность средства построения дерева 291 и средства поиска 292 может быть реализована исключительно аппаратными средствами, а также в виде комбинации, где часть функциональности реализована программными средствами, а часть - аппаратными. В некоторых вариантах реализации программная часть функциональности упомянутых средств может быть исполнена на процессоре компьютера общего назначения (пример изображен на Фиг. 3).The functionality of the tree builder 291 and the search tool 292 can be implemented exclusively in hardware, as well as in the form of a combination, where some of the functionality is implemented by software and some by hardware. In some embodiments, the software part of the functionality of the said tools can be executed on a general-purpose computer processor (an example is shown in Fig. 3).

Фиг. 3 представляет пример компьютерной системы общего назначения, персональный компьютер или сервер 20, содержащий центральный процессор 21, системную память 22 и системную шину 23, которая содержит разные системные компоненты, в том числе память, связанную с центральным процессором 21. Системная шина 23 реализована, как любая известная из уровня техники шинная структура, содержащая в свою очередь память шины или контроллер памяти шины, периферийную шину и локальную шину, которая способна взаимодействовать с любой другой шинной архитектурой. Системная память содержит постоянное запоминающее устройство (ПЗУ) 24, память с произвольным доступом (ОЗУ) 25. Основная система ввода/вывода (BIOS) 26, содержит основные процедуры, которые обеспечивают передачу информации между элементами персонального компьютера 20, например, в момент загрузки операционной системы с использованием ПЗУ 24.FIG. 3 represents an example of a general purpose computer system, a personal computer or server 20 comprising a central processor 21, a system memory 22, and a system bus 23 that contains various system components, including memory associated with the central processor 21. The system bus 23 is implemented as any prior art bus structure comprising, in turn, a bus memory or a bus memory controller, a peripheral bus and a local bus that is capable of interacting with any other bus architecture. The system memory contains read-only memory (ROM) 24, random access memory (RAM) 25. The main input / output system (BIOS) 26, contains basic procedures that ensure the transfer of information between the elements of the personal computer 20, for example, at the time of loading the operating ROM systems 24.

Персональный компьютер 20 в свою очередь содержит жесткий диск 27 для чтения и записи данных, привод магнитных дисков 28 для чтения и записи на сменные магнитные диски 29 и оптический привод 30 для чтения и записи на сменные оптические диски 31, такие как CD-ROM, DVD-ROM и иные оптические носители информации. Жесткий диск 27, привод магнитных дисков 28, оптический привод 30 соединены с системной шиной 23 через интерфейс жесткого диска 32, интерфейс магнитных дисков 33 и интерфейс оптического привода 34 соответственно. Приводы и соответствующие компьютерные носители информации представляют собой энергонезависимые средства хранения компьютерных инструкций, структур данных, программных модулей и прочих данных персонального компьютера 20.The personal computer 20 in turn contains a hard disk 27 for reading and writing data, a magnetic disk drive 28 for reading and writing to removable magnetic disks 29, and an optical drive 30 for reading and writing to removable optical disks 31, such as a CD-ROM, DVD -ROM and other optical information carriers. The hard disk 27, the magnetic disk drive 28, the optical drive 30 are connected to the system bus 23 through the interface of the hard disk 32, the interface of the magnetic disks 33 and the interface of the optical drive 34, respectively. Drives and associated computer storage media are non-volatile means of storing computer instructions, data structures, software modules and other data of a personal computer 20.

Настоящее описание раскрывает реализацию системы, которая использует жесткий диск 27, сменный магнитный диск 29 и сменный оптический диск 31, но следует понимать, что возможно применение иных типов компьютерных носителей информации 56, которые способны хранить данные в доступной для чтения компьютером форме (твердотельные накопители, флеш карты памяти, цифровые диски, память с произвольным доступом (ОЗУ) и т.п.), которые подключены к системной шине 23 через контроллер 55.The present description discloses an implementation of a system that uses a hard disk 27, a removable magnetic disk 29, and a removable optical disk 31, but it should be understood that other types of computer storage media 56 that can store data in a form readable by a computer (solid state drives, flash memory cards, digital disks, random access memory (RAM), etc.) that are connected to the system bus 23 through the controller 55.

Компьютер 20 имеет файловую систему 36, где хранится записанная операционная система 35, а также дополнительные программные приложения 37, другие программные модули 38 и данные программ 39. Пользователь имеет возможность вводить команды и информацию в персональный компьютер 20 посредством устройств ввода (клавиатуры 40, манипулятора «мышь» 42). Могут использоваться другие устройства ввода (не отображены): микрофон, джойстик, игровая консоль, сканнер и т.п. Подобные устройства ввода по своему обычаю подключают к компьютерной системе 20 через последовательный порт 46, который в свою очередь подсоединен к системной шине, но могут быть подключены иным способом, например, при помощи параллельного порта, игрового порта или универсальной последовательной шины (USB). Монитор 47 или иной тип устройства отображения также подсоединен к системной шине 23 через интерфейс, такой как видеоадаптер 48. В дополнение к монитору 47, персональный компьютер может быть оснащен другими периферийными устройствами вывода (не отображены), например колонками, принтером и т.п.Computer 20 has a file system 36 where the recorded operating system 35 is stored, as well as additional software applications 37, other program modules 38, and program data 39. The user is able to enter commands and information into personal computer 20 via input devices (keyboard 40, keypad “ the mouse "42). Other input devices (not displayed) can be used: microphone, joystick, game console, scanner, etc. Such input devices are, as usual, connected to the computer system 20 via a serial port 46, which in turn is connected to the system bus, but can be connected in another way, for example, using a parallel port, a game port, or a universal serial bus (USB). A monitor 47 or other type of display device is also connected to the system bus 23 via an interface such as a video adapter 48. In addition to the monitor 47, the personal computer may be equipped with other peripheral output devices (not displayed), such as speakers, a printer, and the like.

Персональный компьютер 20 способен работать в сетевом окружении, при этом используется сетевое соединение с другим или несколькими удаленными компьютерами 49. Удаленный компьютер (или компьютеры) 49 являются такими же персональными компьютерами или серверами, которые имеют большинство или все упомянутые элементы, отмеченные ранее при описании существа персонального компьютера 20, представленного на Фиг. 3. В вычислительной сети могут присутствовать также и другие устройства, например маршрутизаторы, сетевые станции, пиринговые устройства или иные сетевые узлы.The personal computer 20 is capable of operating in a networked environment, using a network connection with another or more remote computers 49. The remote computer (or computers) 49 are the same personal computers or servers that have most or all of the elements mentioned earlier in the description of the creature the personal computer 20 of FIG. 3. Other devices, such as routers, network stations, peer-to-peer devices, or other network nodes may also be present on the computer network.

Сетевые соединения могут образовывать локальную вычислительную сеть (LAN) 50 и глобальную вычислительную сеть (WAN). Такие сети применяются в корпоративных компьютерных сетях, внутренних сетях компаний и, как правило, имеют доступ к сети Интернет. В LAN- или WAN-сетях персональный компьютер 20 подключен к локальной сети 50 через сетевой адаптер или сетевой интерфейс 51. При использовании сетей персональный компьютер 20 может использовать модем 54 или иные средства обеспечения связи с глобальной вычислительной сетью, такой как Интернет. Модем 54, который является внутренним или внешним устройством, подключен к системной шине 23 посредством последовательного порта 46. Следует уточнить, что сетевые соединения являются лишь примерными и не обязаны отображать точную конфигурацию сети, т.е. в действительности существуют иные способы установления соединения техническими средствами связи одного компьютера с другим.Network connections can form a local area network (LAN) 50 and a wide area network (WAN). Such networks are used in corporate computer networks, internal networks of companies and, as a rule, have access to the Internet. In LAN or WAN networks, the personal computer 20 is connected to the local area network 50 via a network adapter or network interface 51. When using the networks, the personal computer 20 may use a modem 54 or other means of providing communication with a global computer network such as the Internet. The modem 54, which is an internal or external device, is connected to the system bus 23 via the serial port 46. It should be clarified that the network connections are only exemplary and are not required to display the exact network configuration, i.e. in reality, there are other ways to establish a technical connection between one computer and another.

В заключение следует отметить, что приведенные в описании сведения являются примерами, которые не ограничивают объем настоящего изобретения, определенного формулой. Специалисту в данной области становится понятным, что могут существовать и другие варианты осуществления настоящего изобретения, согласующиеся с сущностью и объемом настоящего изобретения.In conclusion, it should be noted that the information provided in the description are examples that do not limit the scope of the present invention defined by the claims. One skilled in the art will recognize that there may be other embodiments of the present invention consistent with the spirit and scope of the present invention.

Claims (25)

1. Способ поиска входной строки в дереве поиска, в котором:1. A way to search for an input string in a search tree, in which: а) создают словарь символов с помощью средства создания дерева, определяющий множество символов, которое используется при поиске, при этом словарь содержит, по меньшей мере:a) create a dictionary of characters using the means of creating a tree that defines the set of characters that is used in the search, while the dictionary contains at least: - символы алфавита;- characters of the alphabet; - маски, которыми являются, по меньшей мере, символ замены одного символа и символ обобщения, заменяющий произвольное число символов в строке;- masks, which are at least a character replacement of one character and a generalization character that replaces an arbitrary number of characters in a string; б) создают дерево поиска с помощью средства создания дерева, при этом:b) create a search tree using the tree creation tool, while: - набор строк, используемых для создания дерева, включает в себя по меньшей мере одну строку, содержащую маски и символы алфавита;- the set of lines used to create the tree includes at least one line containing masks and characters of the alphabet; - в узлах (node) дерева сохраняются подстроки (substring) каждой строки, входящей в набор строк, при этом:- in the nodes of the tree the substring of each line in the rowset is saved, while: - в отдельный узел дерева поиска сохраняется подстрока, являющаяся префиксом входящей в набор строк строки, содержащая символы до маски;- a substring is saved in a separate node of the search tree, which is a prefix of a line in a set of lines of a string containing characters before the mask; - узел, в который сохраняется последняя подстрока входящей в набор строк строки, является конечным;- the node into which the last substring of the string included in the rowset is stored is the final one; в) выполняют индексацию дерева поиска с помощью средства создания дерева, создавая таблицу индексации, содержащую символы и набор индексов узлов дерева поиска, при этом:c) perform indexing of the search tree using the tree creation tool, creating an indexing table containing symbols and a set of indexes of the nodes of the search tree, while: - в таблице индексации используются символы из словаря символов;- symbols from the symbol dictionary are used in the indexing table; - узлам, имеющим одинаковый родительский узел, присваиваются индексы, при этом присвоенный индекс для каждого узла имеет уникальное числовое значение;- nodes with the same parent node are assigned indices, while the assigned index for each node has a unique numerical value; - из подстроки, хранящейся в каждом конечном узле, выделяют последний символ, при этом выделенный символ может являться символом алфавита или маской;- the last character is extracted from the substring stored in each end node, while the selected character can be an alphabet character or a mask; - для каждого выделенного последнего символа в таблицу индексации добавляется набор индексов узлов дерева поиска, через которые происходит переход от узла, из подстроки которого выделен последний символ, до узла, не имеющего родительского узла;- for each last character selected, a set of indexes of nodes of the search tree is added to the indexing table, through which a transition occurs from the node from which the last character is selected from the substring to the node that does not have a parent node; г) определяют множество индексов узлов с помощью средства поиска, которое будет использовано при поиске входной строки по дереву поиска, при этом:d) determine the set of node indices using the search tool, which will be used when searching for the input string in the search tree, while: - выделяют последний символ входящей строки, которую необходимо найти в дереве поиска;- select the last character of the incoming line, which must be found in the search tree; - из таблицы индексации выбирают набор индексов узлов дерева поиска для поиска упомянутого символа, добавленный на этапе ранее;- from the indexing table, select the set of indexes of the nodes of the search tree to search for the mentioned symbol, added at the stage earlier; - из таблицы индексации выбирают набор индексов узлов дерева поиска, добавленный на этапе ранее для масок;- from the indexing table, select the set of indexes of the nodes of the search tree added at the stage earlier for masks; - объединяют выбранные наборы узлов во множество индексов узлов;- combine the selected sets of nodes into multiple node indices; д) выполняют поиск входной строки в дереве поиска с помощью средства поиска, при этом:e) they search for the input string in the search tree using the search tool, while: - из входящей строки последовательно выделяют подстроку, начиная с первого символа;- a substring is sequentially selected from the input line starting from the first character; - сравнивают выделенную подстроку с подстроками, хранящимися в узлах дерева поиска, при этом сначала определяется, входит ли индекс сравниваемого узла в множество индексов узлов, определенное на этапе ранее, затем сравнивается значение выделенной подстроки и подстроки, сохраненной в узле.- compare the selected substring with the substrings stored in the nodes of the search tree, it is first determined whether the index of the compared node is included in the set of node indices determined at the stage earlier, then the value of the selected substring and the substring stored in the node is compared. 2. Способ по п. 1, в котором словарь символов дополнительно содержит цифры.2. The method of claim 1, wherein the character dictionary further comprises numbers. 3. Способ по п. 1, в котором словарь символов дополнительно содержит знаки препинания.3. The method of claim 1, wherein the character dictionary further comprises punctuation marks. 4. Способ по п. 1, в котором конечный узел дерева имеет по меньшей мере один дочерний узел.4. The method according to claim 1, in which the end node of the tree has at least one child node.
RU2016105559A 2016-02-18 2016-02-18 Method for searching inlet line in search tree with indexing of search tree nodes RU2623882C1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU2016105559A RU2623882C1 (en) 2016-02-18 2016-02-18 Method for searching inlet line in search tree with indexing of search tree nodes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU2016105559A RU2623882C1 (en) 2016-02-18 2016-02-18 Method for searching inlet line in search tree with indexing of search tree nodes

Publications (1)

Publication Number Publication Date
RU2623882C1 true RU2623882C1 (en) 2017-06-29

Family

ID=59312495

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2016105559A RU2623882C1 (en) 2016-02-18 2016-02-18 Method for searching inlet line in search tree with indexing of search tree nodes

Country Status (1)

Country Link
RU (1) RU2623882C1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5610603A (en) * 1995-09-28 1997-03-11 International Business Machines Corporation Sort order preservation method used with a static compression dictionary having consecutively numbered children of a parent
EA005646B1 (en) * 2001-11-01 2005-04-28 Верисайн, Инк. High speed non-concurrency controlled database
US7403494B2 (en) * 2000-12-30 2008-07-22 Electronics And Telecommunications Research Institute Method for generating nodes in multiway search tree and search method using the same
US20100011016A1 (en) * 2008-07-11 2010-01-14 Adobe Systems Incorporated Dictionary compilations
US8572126B2 (en) * 2010-06-25 2013-10-29 Educational Testing Service Systems and methods for optimizing very large n-gram collections for speed and memory
US8880507B2 (en) * 2010-07-22 2014-11-04 Brocade Communications Systems, Inc. Longest prefix match using binary search tree

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5610603A (en) * 1995-09-28 1997-03-11 International Business Machines Corporation Sort order preservation method used with a static compression dictionary having consecutively numbered children of a parent
US7403494B2 (en) * 2000-12-30 2008-07-22 Electronics And Telecommunications Research Institute Method for generating nodes in multiway search tree and search method using the same
EA005646B1 (en) * 2001-11-01 2005-04-28 Верисайн, Инк. High speed non-concurrency controlled database
US20100011016A1 (en) * 2008-07-11 2010-01-14 Adobe Systems Incorporated Dictionary compilations
US8572126B2 (en) * 2010-06-25 2013-10-29 Educational Testing Service Systems and methods for optimizing very large n-gram collections for speed and memory
US8880507B2 (en) * 2010-07-22 2014-11-04 Brocade Communications Systems, Inc. Longest prefix match using binary search tree

Similar Documents

Publication Publication Date Title
US11972203B1 (en) Using anchors to generate extraction rules
US10102253B2 (en) Minimizing index maintenance costs for database storage regions using hybrid zone maps and indices
JP4698738B2 (en) Multi-segment string search
US7562087B2 (en) Method and system for processing directory operations
US10083200B2 (en) Batch incremental update
US9195939B1 (en) Scope in decision trees
RU2523112C1 (en) System and method of selecting optimum type of antiviral verification when accessing file
US11249992B2 (en) Parsing of user queries in a remote network management platform using extended context-free grammar rules
Koppula et al. Learning url patterns for webpage de-duplication
US11637864B2 (en) Hardening of cloud security policies
US11429650B2 (en) Parsing of user queries in a remote network management platform using linguistic matching
RU2622629C2 (en) Method of searching for the road by tree
CN102867049A (en) Chinese PINYIN quick word segmentation method based on word search tree
JP2015530021A (en) Using primary and secondary connection connection tables
CN116204534B (en) Data archiving method, device, equipment and storage medium
RU2623882C1 (en) Method for searching inlet line in search tree with indexing of search tree nodes
RU2620996C1 (en) Input string searching method in the search tree with indexing, used in the string tree construction
RU2587424C1 (en) Method of controlling applications
Cao et al. An attack graph generation method based on parallel computing
US8775746B2 (en) Information processing system and method
JP7173165B2 (en) History management device, history management method and program
RU2660643C1 (en) System and method of detecting the harmful cil-file
RU2614561C1 (en) System and method of similar files determining
JP7424393B2 (en) Estimation system, estimation method and estimation program
RU2584505C2 (en) System and method for filtering files to control applications