Claims (4)
비동기 전달 모드(ATM) 가상채널(VC) 교환 시스템에 적용되는 해쉬 증가 함수와 테이블의 참조 변수를 이용한 테이블 검색방법에 있어서, 키를 입력받아 해쉬 함수를 이용하여 검색할 테이블의 인덱스 값을 계산하고, 증가 함수를 이용하여 검색 위치의 증가 값을 계산한 후, 검색 횟수를 초기화하고, 검색 횟수가 테이블의 사이즈를 넘지 않으면 인덱스 값에 해당하는 테이블의 레코드를 찾아 테이블의 상태를 파악하는 제1단계(100 내지 106); 상기 제1단계(100 내지 106)에서 테이블 상태가 오프이거나 또는 온이지만 테이블의 키 값과 입력된 키 값이 일치하지 않으면 검색 실패를 알리고 종료하며, 테이블의 상태가 온이고 테이블의 키 값과 입력된 키 값이 일치하면 검색된 데이타를 출력하는 제2단계(107,108); 및 상기 제1단계(100 내지 106)에서 테이블 상태가 대기(wait)이고 테이블의 키 값과 입력된 키 값이 일치하면 검색된 데이타를 출력하고, 테이블 상태가 대기이고 테이블의 키 값과 입력된 키 값이 일치하지 않으면 검색 횟수를 '1'증가시키고, 현재 인덱스 값에 증가 값을 더하여 다음 인덱스 값을 설정한 후, 검색 횟수가 테이블의 사이즈를 넘지 않는 범위 내에서 테이블을 검색하는 과정을 반복하는 제3단계(109 내지 111)를 포함하는 것을 특징으로 하는 테이블 검색 방법.In a table search method using a hash increasing function and a table reference variable applied to an asynchronous transfer mode (ATM) virtual channel (VC) exchange system, an index value of a table to be searched is calculated using a key input and a hash function A first step of calculating an increase value of a search position by using an increasing function, initializing a search number, and if the search number does not exceed the size of the table, searching the record of the table corresponding to the index value to grasp the state of the table (100 to 106); If the table status is off or on in the first step (100 to 106) but the key value of the table does not match the inputted key value, the search is notified of failure and the process ends. If the status of the table is on, A second step (107,108) of outputting the retrieved data if the key values match; And if the table state is a wait in the first step (100 to 106) and the key value of the table matches the input key value, the retrieved data is output. If the table state is standby and the key value of the table and the input key If the values do not match, the process repeats the process of increasing the number of searches by '1', adding the increment value to the current index value to set the next index value, and then searching the table within a range where the number of searches does not exceed the table size And a third step (109 to 111).
제1항에 있어서, 상기 제1단계(100 내지 106)는, 키를 입력받아 해쉬 함수를 이용하여 검색할 테이블의 인덱스 값을 계산하고, 증가 함수를 이용하여 검색 위치의 증가 값을 계산한 후, 검색 횟수를 '1'로 초기화하고, 검색 횟수가 테이블의 사이즈를 넘는 최소 소수보다 작거나 같은지를 판단하는 제4단계(100 내지 103); 및 상기 제4단계(100 내지 103)에서 검색 횟수가 테이블의 사이즈를 넘는 최소 소수보다 작거나 같지 않으면 검색 실패를 알리고 종료하며, 검색 횟수가 테이블의 사이즈를 넘는 최소 소수보다 작거나 같으면 인덱스 값에 해당하는 테이블의 레코드를 찾아 테이블의 상태를 파악하는 제5단계(104 내지 106)를 포함하는 것을 특징으로 하는 테이블 검색방법.2. The method as claimed in claim 1, wherein the first step (100 to 106) receives a key, calculates an index value of a table to be searched using a hash function, calculates an increase value of a search position using an increasing function A fourth step (100 to 103) of initializing the number of retrieval to '1', and determining whether the number of retrieval is smaller than or equal to a minimum prime number exceeding the size of the table; And if the number of retrievals is less than or equal to the minimum prime number exceeding the size of the table in the fourth step 100 to 103, And a fifth step (104-106) of finding a record of the corresponding table and grasping the state of the table.
제1항 또는 제2항에 있어서, 상기 해쉬 함수를 이용하여 검색할 테이블의 인덱스 값을 계산하는 과정은, 테이블의 사이즈를 넘는 최소의 소수를 설정한 후, 입력된 키 값을 테이블의 사이즈를 넘는 최소의 소수 값으로 나누어 그 값을 인덱스 값으로 취하여 이루어지는 것을 특징으로 하는 테이블 검색방법.3. The method of claim 1 or claim 2, wherein the step of calculating an index value of a table to be searched using the hash function comprises: setting a minimum prime number exceeding a size of a table; Dividing the result by the minimum prime number over the minimum value and taking the value as an index value.
제1항 또는 제2항에 있어서, 상기 증가함수를 이용하여 검색 위치 증가값을 계산하는 과정은, 테이블의 사이즈를 넘는 최소의 소수를 설정한 후, 테이블의 사이즈를 넘는 최소의 소수 값으로 입력된 키 값을 나누어 몫을 계산하고, 상기 계산된 몫을 다시 테이블의 사이즈를 넘는 최소 소수 값으로 나누어 증가 값을 계산한 후, 계산한 증가값이 '0'이면 증가값을 '1'증가하여 출력하고, 증가값이 '0'이 아니면 계산된 증가값을 출력하여 이루어지는 것을 특징으로 하는 테이블 검색방법.3. The method of claim 1 or claim 2, wherein the step of calculating a search position increase value using the increase function comprises: setting a minimum prime number exceeding the size of the table, and then inputting the minimum prime number exceeding the size of the table And then the calculated quotient is divided by the minimum decimal value exceeding the size of the table to calculate an increment value. If the increment value is '0', the increment value is incremented by '1' And outputs the calculated increment value if the increment value is not '0'.
※ 참고사항 : 최초출원 내용에 의하여 공개하는 것임.※ Note: It is disclosed by the contents of the first application.