KR20010019620A - Data Search Method Using Binary Linked List - Google Patents

Data Search Method Using Binary Linked List Download PDF

Info

Publication number
KR20010019620A
KR20010019620A KR1019990036137A KR19990036137A KR20010019620A KR 20010019620 A KR20010019620 A KR 20010019620A KR 1019990036137 A KR1019990036137 A KR 1019990036137A KR 19990036137 A KR19990036137 A KR 19990036137A KR 20010019620 A KR20010019620 A KR 20010019620A
Authority
KR
South Korea
Prior art keywords
data
search
pointer
linked list
search data
Prior art date
Application number
KR1019990036137A
Other languages
Korean (ko)
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 KR1019990036137A priority Critical patent/KR20010019620A/en
Publication of KR20010019620A publication Critical patent/KR20010019620A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE: A data search method is provided to store data with a binary linked list structure including an upper pointer and a lower pointer, and search the data by using the binary linked list so that it can reduce a search time. CONSTITUTION: The method comprises steps of reading data stored in the first register among the binary linked list of a corresponding data memory(S61, S62), comparing the recorded data with a search data(S63), reporting that a corresponding search data is found if the comparison result is identical, and stopping the search process(S64), checking if the recorded data is over the search data in the case that the comparison result is not identical(S65), reading the register directed by the lower pointer in the case that the recorded data is over the search data(S66), reading the register directed by the upper pointer in the case that the recorded data is under the search data(S67), comparing the recorded data with the search data in the memory area directed by the upper or lower pointer(S68), reporting that a corresponding search data is found if the comparison result is identical, and stopping the search process(S64), and repeating the checking and comparison processes till finding the corresponding search data or no data in the upper or the lower pointer.

Description

이진 연결 리스트를 이용한 데이터 검색 방법{Data Search Method Using Binary Linked List}Data Search Method Using Binary Linked List}

본 발명은 이진 연결 리스트를 이용한 데이터 검색 방법에 관한 것으로, 특히 연결 리스트의 포인터를 상위 포인터와 하위 포인터로 구분하고, 검색 데이터와 기록 데이터를 비교한 결과에 따라 상위 또는 하위 포인터를 이용하여 데이터 검색을 수행하도록 한 이진 연결 리스트를 이용한 데이터 검색 방법에 관한 것이다.The present invention relates to a data retrieval method using a binary linked list. In particular, a pointer of a linked list is divided into an upper pointer and a lower pointer, and the data is searched using the upper or lower pointer according to a result of comparing the search data with the recorded data. The present invention relates to a data retrieval method using a binary linked list.

일반적으로, 다수의 자료가 저장된 메모리로부터 원하는 자료의 존재 및 해당 자료의 위치를 검색하는 방법으로 압축 함수를 이용하는 방법이 있는데, 해당 압축 함수는 크기가 큰 데이터를 압축 메모리의 주소 정보에 맞는 압축된 형태의 데이터로 만드는 기능을 갖는다.In general, a compression function is used to retrieve the existence of desired data and the location of the data from a memory in which a plurality of data are stored. The compression function compresses a large amount of data according to address information of the compressed memory. Has the function of making form data.

즉, 해당 자료 검색을 위한 압축 메모리를 갖는 메모리의 구조는 첨부된 도면 도 1에 도시된 바와 같이, 실제 데이터가 존재하는 데이터 메모리 영역과, 해당 데이터 메모리의 주소 정보가 기록되어 있는 압축 메모리 영역으로 구분된다.That is, a structure of a memory having a compressed memory for searching for a corresponding material is a data memory area in which actual data exists and a compressed memory area in which address information of the data memory is recorded, as shown in FIG. 1. Are distinguished.

여기서, 해당 압축 메모리의 주소 정보는 첨부된 도면 도 2와 같이, 검색하고자 하는 데이터를 다항식으로 나눈 나머지이며, 해당 압축 함수의 결과값으로 실제 압축 메모리의 내용은 데이터 메모리의 주소 정보를 갖게 된다.Here, the address information of the compressed memory is the remainder obtained by dividing the data to be searched by the polynomial as shown in FIG. 2, and the actual content of the compressed memory has the address information of the data memory as a result of the compression function.

예를 들어, 전술한 도 1에서와 같이 하위 6비트 값만을 해당 압축 메모리 영역으로 할당하여 압축 함수의 결과값인 압축된 형태의 데이터를 저장하게 되며, 해당 데이터 메모리는 전술한 도 2와 같이 연결 리스트(Linked List) 구조의 포인터와 실제 데이터를 저장하는 이중 구조를 갖는다.For example, as shown in FIG. 1, only the lower 6-bit value is allocated to a corresponding compressed memory area to store data in a compressed form that is a result of a compression function. The data memory is connected as shown in FIG. It has a double structure that stores a pointer to a linked list structure and actual data.

한편, 종래의 압축 함수를 이용한 메모리 검색 동작을 상세하게 설명하면 다음과 같다.Meanwhile, a memory search operation using a conventional compression function will be described in detail as follows.

먼저, 입력되는 특정 데이터로부터 압축 함수를 통과한 압축 메모리 주소를 구한 후, 해당 압축 메모리 주소를 이용하여 압축 메모리로부터 데이터 메모리 주소를 추출한다.First, a compressed memory address having passed through a compression function is obtained from specific input data, and then a data memory address is extracted from the compressed memory using the corresponding compressed memory address.

그리고, 해당 압축 메모리로부터 추출한 데이터 메모리 주소를 이용하여 대응하는 데이터 메모리 영역을 판독해서 검색하고자 하는 데이터(이하, '검색 데이터'라 칭함)가 존재하는지를 확인한다.Then, the corresponding data memory area is read using the data memory address extracted from the compressed memory to check whether there is data to be searched (hereinafter referred to as 'search data').

즉, 해당 데이터 메모리 주소에 대응하는 메모리 영역에는 연결 리스트 포인터와 실제 기록된 데이터가 존재하므로, 해당 기록 데이터와 검색 데이터를 비교하여 일치하는지를 확인하게 되는데, 해당 데이터가 일치하지 않는 경우 첨부된 도면 도 3에 도시된 바와 같이, 해당 연결 리스트 포인터가 지시하는 다음 주소 영역에 기록된 데이터를 검색 데이터와 비교하여 일치하는지를 순차적으로 확인함으로써, 해당 데이터 메모리에 검색 데이터가 존재하는지를 확인하게 된다.That is, since there is a connection list pointer and the actual recorded data in the memory area corresponding to the corresponding data memory address, it is checked whether the corresponding record data and the search data are matched and matched. As shown in Fig. 3, the data recorded in the next address area indicated by the corresponding connection list pointer is compared with the search data to sequentially check whether the search data exists in the corresponding data memory.

이때, 연결 리스트 포인터가 지시하는 소정 어드레스 영역의 데이터와 검색 데이터가 일치하는 경우 즉, 검색 데이터가 존재하는 경우 이를 보고하게 되고, 해당 연결 리스트 포인터가 공란이 될 때까지 계속적으로 검색을 수행한 결과 검색 데이터가 존재하지 않는 경우 해당 검색 데이터가 존재하지 않음을 보고하게 된다.In this case, if the data of the predetermined address area indicated by the linked list pointer and the search data match, that is, if the search data exists, it is reported and the search is continuously performed until the corresponding linked list pointer becomes blank. If the search data does not exist, it will report that the search data does not exist.

그런데, 종래에는 연결 리스트의 깊이에 비례하여 데이터 검색 시간이 길어짐에 따라 짧은 시간에 데이터 존재를 확인하여 내부 제어신호로 활용해야 하는 경우 검색 시간이 길어짐에 따라 정상적인 처리를 수행하지 못하는 경우가 있었다.However, in the related art, when data search time is lengthened in proportion to the depth of a linked list, when the data exists in a short time and needs to be used as an internal control signal, normal processing may not be performed as the search time is lengthened.

예를 들어, 네트워크 장비인 이더넷 스위치에서 고속의 스위칭을 수행하는 경우 입력되는 패킷의 MAC 주소를 이용하여 스위칭 정보를 요구하게 되는데, 해당 MAC 주소를 이용한 스위칭 정보 요구시 검색 시간이 길어지면 스위칭 지연이 발생하게 되고, 이에 따라 해당 네트워크 장비에서 정상적인 스위칭 처리를 수행하지 못하게 되는 경우가 있었다.For example, when performing high-speed switching in an Ethernet switch, which is a network equipment, switching information is requested using the MAC address of an incoming packet. When the searching time is long when switching information is requested using the corresponding MAC address, the switching delay is increased. As a result, there was a case in which the network equipment could not perform a normal switching process.

본 발명은 전술한 바와 같은 문제점을 해결하기 위한 것으로 그 목적은, 상위 포인터와 하위 포인터로 구분되는 이진 연결 리스트를 구성하여 데이터를 관리할 수 있도록 한 후, 해당 검색 데이터와 기록 데이터를 비교하여 검색 데이터가 작은 경우 하위 포인터가 지시하는 메모리 영역의 데이터를 검색하고, 검색 데이터가 큰 경우 상위 포인터가 지시하는 메모리 영역의 데이터를 검색하는 동작을 반복 수행함으로써, 해당 데이터 검색 시간을 단축시키는 데 있다.SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problems, and its object is to construct a binary linked list divided into an upper pointer and a lower pointer so that data can be managed and then searched by comparing the corresponding search data with the recorded data. If the data is small, the data of the memory area indicated by the lower pointer is searched, and if the search data is large, the operation of searching the data of the memory area indicated by the upper pointer is repeated, thereby shortening the data search time.

도 1은 압축 메모리를 갖는 일반적인 메모리의 구조를 도시한 도면.1 shows a structure of a general memory having a compressed memory.

도 2는 종래의 압축 메모리 및 데이터 메모리를 도시한 도면.2 shows a conventional compressed memory and a data memory.

도 3은 종래의 데이터 메모리 검색 절차를 도시한 도면.3 illustrates a conventional data memory retrieval procedure.

도 4는 본 발명에 따른 압축 메모리 및 데이터 메모리를 도시한 도면.4 illustrates a compressed memory and a data memory according to the present invention.

도 5는 본 발명에 따른 데이터 메모리 검색 절차를 도시한 도면.5 is a diagram illustrating a data memory retrieval procedure according to the present invention.

도 6은 본 발명에 따른 이진 연결 리스트를 이용한 데이터 검색 방법을 구현하기 위한 동작 순서도.6 is an operational flowchart for implementing a data retrieval method using a binary linked list according to the present invention.

도 7은 일반적인 이더넷 스위치와 메모리를 도시한 도면.7 illustrates a typical Ethernet switch and memory.

도 8의 (가)는 종래의 데이터 검색 절차를 예시한 도면이고, (나)는 본 발명에 따른 데이터 검색 절차를 예시한 도면.8A is a diagram illustrating a conventional data retrieval procedure, and (B) is a diagram illustrating a data retrieval procedure according to the present invention.

상술한 바와 같은 목적을 달성하기 위한 본 발명의 특징은, 압축 메모리로부터 추출한 데이터 메모리 주소를 이용하여 기록 데이터를 판독하는 과정과; 판독한 기록 데이터와 검색 데이터가 일치하는지를 확인하는 과정과; 일치하지 않는 경우 상기 기록 데이터가 검색 데이터보다 큰지를 확인하는 과정과; 확인한 결과에 따라 이진 연결 리스트의 상위 또는 하위 포인터가 지시하는 기록 데이터를 판독하는 과정과; 판독한 기록 데이터와 검색 데이터가 일치하는지를 확인하는 과정과; 일치하는 경우 검색 데이터가 존재함을 보고하는 과정을 포함하는데 있다.A feature of the present invention for achieving the above object includes the steps of: reading recorded data using a data memory address extracted from a compressed memory; Confirming whether the read record data and the search data match; Checking whether the recorded data is larger than the search data if they do not match; Reading recorded data indicated by the upper or lower pointer of the binary linked list according to the checked result; Confirming whether the read record data and the search data match; If there is a match, the process includes reporting that the search data exists.

여기서, 상기 이진 연결 리스트의 상위 또는 하위 포인터가 지시하는 기록 데이터를 판독하는 과정은, 상기 기록 데이터가 검색 데이터보다 큰 경우 하위 포인터가 지시하는 기록 데이터를 판독하고, 상기 기록 데이터가 검색 데이터보다 작은 경우 상위 포인터가 지시하는 기록 데이터를 판독하는 것을 특징으로 한다.The reading of the recording data indicated by the upper or lower pointer of the binary linked list may include reading the recording data indicated by the lower pointer when the recording data is larger than the search data, and reading the recording data indicated by the lower pointer. In this case, the recording data indicated by the higher pointer is read.

그리고, 상기 판독한 기록 데이터와 검색 데이터가 일치하는지를 확인하는 과정에서, 상기 기록 데이터와 검색 데이터가 일치하지 않고 상기 기록 데이터가 검색 데이터보다 큰 경우 이진 연결 리스트의 하위 포인터가 공란인지를 확인하는 단계와; 공란인 경우 검색 데이터가 존재하지 않음을 보고하는 단계를 더 포함하는 것을 특징으로 하며, 상기 기록 데이터와 검색 데이터가 일치하지 않고 상기 기록 데이터가 검색 데이터보다 작은 경우 이진 연결 리스트의 상위 포인터가 공란인지를 확인하는 단계와; 공란인 경우 검색 데이터가 존재하지 않음을 보고하는 단계를 더 포함하는 것을 특징으로 한다.And in the process of checking whether the read record data and the search data match, if the record data and the search data do not match and the record data is larger than the search data, checking whether the lower pointer of the binary linked list is blank. Wow; The method may further include reporting that the search data does not exist in the case of a blank. If the record data and the search data do not match and the record data is smaller than the search data, the upper pointer of the binary linked list is blank. Confirming; If blank, the method may further include reporting that no search data exists.

나아가, 상기 검색 데이터가 존재하지 않음을 보고하는 단계는, 상기 검색 데이터를 데이터 메모리의 소정 영역에 기록하되, 공란인 포인터에 상기 검색 데이터가 기록된 주소 정보를 기록하는 단계를 더 포함하는 것을 특징으로 한다.In addition, the reporting of the absence of the search data may include recording the search data in a predetermined area of the data memory, and recording address information in which the search data is recorded in a blank pointer. It is done.

이하, 본 발명에 따른 실시예를 첨부한 도면을 참조하여 상세하게 설명하면 다음과 같다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

본 발명에서는 데이터 검색 시간을 단축시키기 위한 압축 메모리의 구성은 종래와 동일하게 하고, 종래 방식의 데이터 메모리에 존재하는 연결 리스트 구조를 이진 연결 리스트(Binary Linked List) 구조를 변경시켰는데, 첨부한 도면 도 4에 도시한 바와 같이, 해당 데이터 메모리내에 존재하는 데이터 구조체의 연결 리스트 포인터를 상위 포인터와 하위 포인터로 구분된 이진 연결 리스트로 구성하였으며, 해당 상위 포인터와 하위 포인터의 이진 포인터 정보를 활용하여 데이터 검색을 수행하게 된다.In the present invention, the structure of the compressed memory for shortening the data retrieval time is the same as in the related art, and the structure of the binary linked list is changed from the structure of the linked list existing in the conventional data memory. As shown in FIG. 4, the linked list pointer of the data structure existing in the corresponding data memory is composed of a binary linked list divided into an upper pointer and a lower pointer, and data is obtained by using the binary pointer information of the upper pointer and the lower pointer. The search will be performed.

이때, 해당 이진 포인터 정보를 활용하여 데이터 검색을 수행하기 위해서는 첨부한 도면 도 5에 도시한 바와 같이, 검색하고자 하는 데이터의 크기에 따라 연결 리스트의 검색 영역을 구분하게 되는데, 입력 데이터인 검색 데이터와 데이터 메모리에 기록된 검색 데이터를 비교하여, 해당 검색 데이터가 기록 데이터보다 큰 경우 상위 포인터가 지시하는 영역의 데이터를 검색하게 되고, 반대로 검색 데이터가 기록 데이터보다 작은 경우 하위 포인터가 지시하는 영역의 데이터를 검색하게 된다.In this case, in order to perform data search using the corresponding binary pointer information, as shown in FIG. 5, the search area of the linked list is divided according to the size of the data to be searched. By comparing the search data recorded in the data memory, if the search data is larger than the recording data, the data of the area indicated by the upper pointer is searched. On the contrary, if the search data is smaller than the recording data, the data of the area indicated by the lower pointer is searched. Will be searched.

즉, 본 발명에 따른 이진 연결 리스트를 이용한 데이터 검색시 압축 메모리의 판독 동작은 종래 방식과 동일하며, 해당 데이터 메모리에서 검색 데이터를 기준으로 이진 검색을 수행하는 것이 종래 방식과 구분되므로, 해당 압축 메모리 주소를 이용하여 압축 메모리로부터 데이터 메모리 주소를 추출해서 대응하는 데이터 메모리 영역에 대한 검색 동작을 첨부한 도면 도 6을 참조하여 상세하게 설명하면 다음과 같다.That is, the read operation of the compressed memory when searching data using the binary linked list according to the present invention is the same as the conventional method, and since performing the binary search based on the search data in the corresponding data memory is distinguished from the conventional method, the corresponding compressed memory A search operation for a corresponding data memory region by extracting a data memory address from the compressed memory using the address will be described in detail with reference to FIG. 6.

먼저, 해당 압축 메모리로부터 추출한 데이터 메모리 주소를 이용하여 대응하는 데이터 메모리 영역에 대한 검색을 수행하는 경우 해당 데이터 메모리의 이진 연결 리스트에서 첫번째 단에 기록된 데이터를 판독한 후(스텝 S61, S62), 판독한 기록 데이터와 검색 데이터를 비교하여 일치하는지를 확인한다(스텝 S63).First, when performing a search for a corresponding data memory area using the data memory address extracted from the compressed memory, after reading the data recorded in the first stage from the binary linked list of the corresponding data memory (steps S61 and S62), The read record data and the search data are compared to confirm whether they match (step S63).

이때, 기록 데이터와 검색 데이터가 일치하는 경우 해당 검색 데이터가 존재함을 보고한 후(스텝 S64), 데이터 검색 동작을 종료하게 되고, 해당 기록 데이터와 검색 데이터가 일치하지 않는 경우 해당 기록 데이터와 검색 데이터를 다시 비교하여 기록 데이터가 검색 데이터보다 큰지를 확인하게 된다(스텝 S65).At this time, if the record data and the search data match, it is reported that the search data exists (step S64), and then the data search operation is terminated. If the record data and the search data do not match, the record data and the search data are not matched. The data is compared again to confirm whether the record data is larger than the search data (step S65).

만약, 해당 기록 데이터가 검색 데이터보다 큰 경우 기록 데이터를 판독한 이진 연결 리스트의 하위 포인터가 지시하는 데이터 메모리 영역에 기록된 데이터를 판독하게 되고(스텝 S66), 해당 기록 데이터가 검색 데이터보다 작은 경우 기록 데이터를 판독한 이진 연결 리스트의 상위 포인터가 지시하는 데이터 메모리 영역에 기록된 데이터를 판독하게 된다(스텝 S67).If the record data is larger than the search data, the recorded data is read in the data memory area indicated by the lower pointer of the binary linked list from which the record data is read (step S66), and the record data is smaller than the search data. The data written in the data memory area indicated by the upper pointer of the binary linked list which has read the write data is read (step S67).

이후, 해당 상위 또는 하위 포인터가 지시하는 데이터 메모리 영역에서 판독한 기록 데이터를 검색 데이터와 비교하여 일치하는지를 확인하고(스텝 S68), 확인한 결과 데이터가 일치하는 경우 해당 검색 데이터가 존재함을 보고한 후(스텝 S64), 데이터 검색 동작을 종료하게 되고, 해당 데이터가 일치하지 않는 경우 해당 기록 데이터와 검색 데이터를 다시 비교하여 기록 데이터가 검색 데이터보다 큰지를 확인하게 된다(스텝 S69).Thereafter, the write data read out from the data memory area indicated by the corresponding upper or lower pointer is compared with the search data to check whether the matching data is matched (step S68). (Step S64), the data search operation is ended, and if the data does not match, the record data and the search data are compared again to confirm whether the record data is larger than the search data (step S69).

만약, 해당 기록 데이터가 검색 데이터보다 큰 경우 기록 데이터를 판독한 이진 연결 리스트의 하위 포인터가 공란인지를 확인하여(스텝 S70), 공란이 아닌 경우 해당 하위 포인터가 지시하는 데이터 메모리 영역에 기록된 데이터를 판독하는 스텝 S66으로 귀환하여 반복 동작을 수행하게 된다.If the record data is larger than the search data, check whether the lower pointer of the binary linked list from which the record data has been read is blank (step S70). If the record data is not blank, the data recorded in the data memory area indicated by the corresponding lower pointer is checked. The flow returns to step S66 of reading out the sequence to perform the repetitive operation.

그런데, 해당 기록 데이터가 검색 데이터보다 작은 경우 기록 데이터를 판독한 이진 연결 리스트의 상위 포인터가 공란인지를 확인하여(스텝 S71), 공란이 아닌 경우 해당 상위 포인터가 지시하는 데이터 메모리 영역에 기록된 데이터를 판독하는 스텝 S67로 귀환하여 반복 동작을 수행하게 된다.By the way, if the record data is smaller than the search data, it is checked whether the upper pointer of the binary linked list from which the record data has been read is blank (step S71), and if it is not blank, the data recorded in the data memory area indicated by the higher pointer is blank. The process returns to step S67 of reading and the repetitive operation is performed.

한편, 스텝 S70에서 하위 포인터가 공란인 경우 또는 스텝 S71에서 상위 포인터가 공란인 경우 해당 검색 데이터가 존재하지 않음을 보고한 후(스텝 S72), 검색 동작을 종료하게 된다. 이때, 해당 검색 데이터는 해당 데이터 메모리의 소정 영역에 기록하되, 공란인 상위 또는 하위 포인터에 검색 데이터가 기록된 주소 정보를 기록하게 된다.On the other hand, when the lower pointer is blank in step S70 or the upper pointer is blank in step S71, the search operation is terminated after reporting that there is no corresponding search data (step S72). At this time, the search data is recorded in a predetermined area of the data memory, but the address information in which the search data is recorded is recorded in a blank upper or lower pointer.

예를 들어, 다수의 네트워크 포트를 지원하는 이더넷 스위치의 경우 첨부한 도면 도 7과 같이 메모리를 구성하여 각 포트로부터 전달되는 네트워크 정보인 이더넷 패킷을 고속으로 스위칭하기 위해 해당 패킷 내부의 6바이트 MAC 주소를 사용하여 스위칭 정보를 요구하는데, 해당 MAC 주소를 이용하여 데이터 메모리상의 스위칭 정보를 요구하기 위해 입력되는 데이터인 이더넷 MAC 주소가 '123456ABCDEF'(16진수)이고, 메모리에 기록된 데이터가 '23456789ABCD'(16진수)라고 가정하면, 해당 MAC 주소가 기록 데이터보다 작으므로 하위 포인터가 지시하는 데이터 메모리 영역의 기록 데이터를 판독하여 해당 검색 데이터와 일치하는지를 확인하게 된다.For example, in the case of an Ethernet switch supporting a plurality of network ports, as shown in FIG. 7, a 6-byte MAC address inside the packet for high-speed switching of an Ethernet packet, which is network information transmitted from each port, by configuring a memory. Requesting switching information using Ethernet MAC address, which is input data to request switching information on data memory using MAC address, is '123456ABCDEF' (hexadecimal), and data recorded in memory is '23456789ABCD' Assuming (hexadecimal), since the corresponding MAC address is smaller than the write data, the write data of the data memory area indicated by the lower pointer is read to check whether the matched data is the same.

만약, 일치하지 않는 경우 해당 기록 데이터가 입력 데이터인 MAC 주소보다 큰지를 확인하여, 그 결과에 따라 하위 또는 상위 포인터가 지시하는 데이터 메모리 영역의 기록 데이터를 판독하여 해당 검색 데이터와 일치하는지를 확인하는 동작을 반복 수행함으로써, 종래의 데이터 검색 동작에 비해 신속한 데이터 검색이 가능해 진다.If it does not match, check whether the corresponding write data is larger than the MAC address which is the input data, and according to the result, read the write data in the data memory area indicated by the lower or upper pointer to check whether the write data matches the corresponding search data. By repeating this operation, it is possible to search the data faster than in the conventional data search operation.

다시 말해서, 종래의 데이터 검색 동작은 첨부한 도면 도 8의 (가)와 같이 검색 데이터가 'bcde'인 경우 연결 리스트의 포인터를 따라 검색을 수행하여 해당 포인터가 '공란'이 되기까지 검색해야 해당 검색 데이터가 존재하지 않음을 알게 되었지만, 본 발명에 따른 이진 연결 리스트를 이용하여 데이터 검색을 수행하는 경우 도 8의 (나)와 같이 첫번째 단에서 기록 데이터 '1234'보다 검색 데이터 'bcde'가 크므로 상위 포인터가 지시하는 영역의 데이터 'a34c'와 비교하게 되고, 이때, 서로 일치하지 않고 검색 데이터가 큰 상태에서 상위 포인터가 '공란'이므로 데이터 검색 동작을 종료하게 됨에 따라 신속한 데이터 검색이 가능해 진다.In other words, in the conventional data search operation, when the search data is 'bcde' as shown in FIG. 8 (a) of the accompanying drawings, the data search operation should be performed by searching along the pointer of the linked list until the corresponding pointer becomes 'blank'. Although it was found that the search data does not exist, when the data search is performed using the binary linked list according to the present invention, since the search data 'bcde' is larger than the recorded data '1234' in the first stage as shown in FIG. Therefore, the data is compared with 'a34c' in the area indicated by the upper pointer. At this time, the upper pointer is 'blank' in a state where the search data is large and do not match with each other. .

그리고, 해당 검색 데이터 'bcde'를 데이터 메모리에 기록하게 되고, 해당 검색 데이터가 기록된 주소 정보를 'a34c'가 기록된 상위 포인터의 '공란'에 기록하게 된다.Then, the search data 'bcde' is recorded in the data memory, and the address information in which the search data is recorded is recorded in the 'blank' of the upper pointer in which 'a34c' is recorded.

또한, 본 발명에 따른 실시예는 상술한 것으로 한정되지 않고, 본 발명과 관련하여 통상의 지식을 가진자에게 자명한 범위내에서 여러 가지의 대안, 수정 및 변경하여 실시할 수 있다.In addition, the embodiments according to the present invention are not limited to the above-described embodiments, and various alternatives, modifications, and changes can be made within the scope apparent to those skilled in the art.

이상과 같이, 본 발명은 상위 포인터와 하위 포인터로 구분되는 이진 연결 리스트를 구성하여 데이터를 관리할 수 있도록 한 후, 해당 검색 데이터와 기록 데이터를 비교하여 검색 데이터가 작은 경우 하위 포인터가 지시하는 메모리 영역의 데이터를 검색하고, 검색 데이터가 큰 경우 상위 포인터가 지시하는 메모리 영역의 데이터를 검색하는 동작을 반복 수행함으로써, 해당 데이터 검색 시간을 단축시킬 수 있게 된다.As described above, the present invention configures a binary linked list divided into an upper pointer and a lower pointer to manage data, and then compares the corresponding search data with the recorded data, and the memory indicated by the lower pointer when the search data is small. By retrieving the data of the area and retrieving the data of the memory area indicated by the upper pointer when the search data is large, the corresponding data retrieval time can be shortened.

Claims (5)

압축 메모리로부터 추출한 데이터 메모리 주소를 이용하여 기록 데이터를 판독하는 과정과; 판독한 기록 데이터와 검색 데이터가 일치하는지를 확인하는 과정과; 일치하지 않는 경우 상기 기록 데이터가 검색 데이터보다 큰지를 확인하는 과정과; 확인한 결과에 따라 이진 연결 리스트의 상위 또는 하위 포인터가 지시하는 기록 데이터를 판독하는 과정과; 판독한 기록 데이터와 검색 데이터가 일치하는지를 확인하는 과정과; 일치하는 경우 검색 데이터가 존재함을 보고하는 과정을 포함하는 것을 특징으로 하는 이진 연결 리스트를 이용한 데이터 검색 방법.Reading recorded data using the data memory address extracted from the compressed memory; Confirming whether the read record data and the search data match; Checking whether the recorded data is larger than the search data if they do not match; Reading recorded data indicated by the upper or lower pointer of the binary linked list according to the checked result; Confirming whether the read record data and the search data match; And if it matches, reporting the presence of search data. 제 1항에 있어서,The method of claim 1, 상기 이진 연결 리스트의 상위 또는 하위 포인터가 지시하는 기록 데이터를 판독하는 과정은, 상기 기록 데이터가 검색 데이터보다 큰 경우 하위 포인터가 지시하는 기록 데이터를 판독하고, 상기 기록 데이터가 검색 데이터보다 작은 경우 상위 포인터가 지시하는 기록 데이터를 판독하는 것을 특징으로 하는 이진 연결 리스트를 이용한 데이터 검색 방법.The process of reading the write data indicated by the upper or lower pointer of the binary linked list may include reading the write data indicated by the lower pointer when the record data is larger than the search data, and reading the record data indicated by the lower pointer than the search data. A data retrieval method using a binary linked list, characterized by reading the record data indicated by a pointer. 제 1항에 있어서,The method of claim 1, 상기 판독한 기록 데이터와 검색 데이터가 일치하는지를 확인하는 과정에서, 상기 기록 데이터와 검색 데이터가 일치하지 않고 상기 기록 데이터가 검색 데이터보다 큰 경우 이진 연결 리스트의 하위 포인터가 공란인지를 확인하는 단계와; 공란인 경우 검색 데이터가 존재하지 않음을 보고하는 단계를 더 포함하는 것을 특징으로 하는 이진 연결 리스트를 이용한 데이터 검색 방법.Determining whether the lower pointer of the binary linked list is blank when the recorded data and the search data do not match and the record data is larger than the search data in the process of checking whether the read record data and the search data match each other; And if it is blank, reporting the search data does not exist. 제 1항에 있어서,The method of claim 1, 상기 판독한 기록 데이터와 검색 데이터가 일치하는지를 확인하는 과정에서, 상기 기록 데이터와 검색 데이터가 일치하지 않고 상기 기록 데이터가 검색 데이터보다 작은 경우 이진 연결 리스트의 상위 포인터가 공란인지를 확인하는 단계와; 공란인 경우 검색 데이터가 존재하지 않음을 보고하는 단계를 더 포함하는 것을 특징으로 하는 이진 연결 리스트를 이용한 데이터 검색 방법.Determining whether the upper pointer of the binary linked list is blank when the record data and the search data do not match and the record data is smaller than the search data in the process of checking whether the read record data and the search data match each other; And if it is blank, reporting the search data does not exist. 제 3항 또는 제 4항에 있어서,The method according to claim 3 or 4, 상기 검색 데이터가 존재하지 않음을 보고하는 단계는, 상기 검색 데이터를 데이터 메모리의 소정 영역에 기록하되, 공란인 포인터에 상기 검색 데이터가 기록된 주소 정보를 기록하는 단계를 더 포함하는 것을 특징으로 하는 이진 연결 리스트를 이용한 데이터 검색 방법.The reporting of the absence of the search data may include recording the search data in a predetermined area of the data memory and recording address information on which the search data is recorded in a blank pointer. Data retrieval method using binary linked list.
KR1019990036137A 1999-08-28 1999-08-28 Data Search Method Using Binary Linked List KR20010019620A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019990036137A KR20010019620A (en) 1999-08-28 1999-08-28 Data Search Method Using Binary Linked List

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019990036137A KR20010019620A (en) 1999-08-28 1999-08-28 Data Search Method Using Binary Linked List

Publications (1)

Publication Number Publication Date
KR20010019620A true KR20010019620A (en) 2001-03-15

Family

ID=19609113

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019990036137A KR20010019620A (en) 1999-08-28 1999-08-28 Data Search Method Using Binary Linked List

Country Status (1)

Country Link
KR (1) KR20010019620A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100586461B1 (en) * 2003-10-15 2006-06-08 임혜숙 Method, Hardware Architecture and Recording Medium for Searching IP Address by Using Pipeline Binary Tree

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100586461B1 (en) * 2003-10-15 2006-06-08 임혜숙 Method, Hardware Architecture and Recording Medium for Searching IP Address by Using Pipeline Binary Tree

Similar Documents

Publication Publication Date Title
CN100401425C (en) Circuit and method for performing variable width searches in a content addressable memory
JP3250544B2 (en) Transfer destination search method, transfer destination search device, search table recording medium, and search program recording medium
US7042748B2 (en) Content addressable memory with cascaded array
KR102195836B1 (en) Method for managing index
WO2004109555A1 (en) Method and system for comparing multiple bytes of data to stored string segments
US20030093613A1 (en) Compressed ternary mask system and method
US20100014516A1 (en) Table lookup mechanism for address resolution
US7231383B2 (en) Search engine for large-width data
US4975872A (en) Dual port memory device with tag bit marking
US20030163442A1 (en) FFS search and edit pipline separation
KR100565456B1 (en) A tertiary cam cell
KR20010019620A (en) Data Search Method Using Binary Linked List
US7154892B2 (en) Method and apparatus for managing LPM-based CAM look-up table, and recording medium therefor
US6341346B1 (en) Method for comparison between a pattern sequence and a variable length key
CN100361088C (en) Method for realizing device test
US6401188B1 (en) Method for selection on a pattern sequence
KR20200136858A (en) Method for managing index
KR100656762B1 (en) Method for searching a position to be recorded with data in a memory
KR100329179B1 (en) Method for managing channel resources in IMT-2000 base station
US20030028748A1 (en) Circuit for recording digital waveform data and method of doing the same
JP2680010B2 (en) Hash bit array configuration method
JPS6014324A (en) Associative storage device
KR100479589B1 (en) Apparatus for Composing Content Addressable Memory
KR100535839B1 (en) Method for searching general directory number
CN111309580A (en) Method, system, equipment and medium for testing performance of ext4 file system

Legal Events

Date Code Title Description
WITN Withdrawal due to no request for examination