TWI399945B - Method and system for invoking functions - Google Patents

Method and system for invoking functions Download PDF

Info

Publication number
TWI399945B
TWI399945B TW98134078A TW98134078A TWI399945B TW I399945 B TWI399945 B TW I399945B TW 98134078 A TW98134078 A TW 98134078A TW 98134078 A TW98134078 A TW 98134078A TW I399945 B TWI399945 B TW I399945B
Authority
TW
Taiwan
Prior art keywords
function
hash value
configuration
configuration parameter
hash
Prior art date
Application number
TW98134078A
Other languages
Chinese (zh)
Other versions
TW201114216A (en
Inventor
Bin Rong Chen
Original Assignee
Hon Hai Prec Ind Co Ltd
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 Hon Hai Prec Ind Co Ltd filed Critical Hon Hai Prec Ind Co Ltd
Priority to TW98134078A priority Critical patent/TWI399945B/en
Publication of TW201114216A publication Critical patent/TW201114216A/en
Application granted granted Critical
Publication of TWI399945B publication Critical patent/TWI399945B/en

Links

Landscapes

  • Computer And Data Communications (AREA)

Description

功能調用系統及方法 Function calling system and method

本發明涉及一種功能管理系統及方法,尤其涉及一種功能調用系統及方法。 The invention relates to a function management system and method, in particular to a function calling system and method.

隨著寬頻接入在家庭的普及,IP語音(VoIP)、IPTV業務的迅速發展,越來越多的IP終端設備被引入到家庭網路中,傳統的基於簡單網路管理協定(SNMP)的網管在管理數目眾多的終端設備時已經變得越來越力不從心,如何有效地實施對家庭網路設備的管理成為運營商不得不考慮的一個問題。 With the popularity of broadband access in the home, the rapid development of voice over IP (VoIP) and IPTV services, more and more IP terminal devices are introduced into the home network, and the traditional is based on Simple Network Management Protocol (SNMP). Network management has become more and more incapable of managing a large number of terminal devices. How to effectively implement management of home network devices has become an issue that operators have to consider.

用戶端設備(CPE,Customer Premises Equipment)廣域網管理協議(下文簡稱為“TR-069”)是由數位用戶線路論壇/組織(簡稱為“DSL FORUM”)開發的技術規範之一,其規定了家庭閘道進行遠端管理配置時的通用框架和協定,用於藉由網路對家庭閘道進行遠端集中管理。TR-069可以認為是DSL FORUM關於家庭網路一系列設備遠端管理的基礎。依據TR-069的管理思路,DSL FORUM制定了一系列關於家庭網路設備的規範,包括針對機頂盒、電話適配器等相關規範,其中,包括家庭閘道資料模型(下文簡稱為“TR-098”)。所述TR-098定義了家庭閘道設備的配置資訊範本。 The Customer Premises Equipment (CPE) WAN Management Protocol (hereinafter referred to as "TR-069") is one of the technical specifications developed by the Digital Subscriber Line Forum/Organization ("DSL FORUM"), which specifies the family. The general framework and protocol for the remote management configuration of the gateway for remote centralized management of the home gateway through the network. TR-069 can be considered as the basis for DSL FORUM's remote management of a range of devices on the home network. According to the management idea of TR-069, DSL FORUM has developed a series of specifications for home network equipment, including related specifications for set-top boxes and telephone adapters, including the home gateway data model (hereinafter referred to as "TR-098"). . The TR-098 defines a configuration information template for a home gateway device.

然而,由於家庭網路設備的數量越來越多,相應的需管理的參數也越來越繁雜,如何能快速檢索到相應的參數以實現功能的調用是一個亟待解決的問題。 However, due to the increasing number of home network devices, the corresponding parameters to be managed are more and more complicated. How to quickly retrieve the corresponding parameters to realize the function call is an urgent problem to be solved.

鑒於以上內容,有必要提供一種功能調用系統及方法,可快速查找所有與TR-098以及與TR-098類似的資料模型(即以字串與數位來命名其中物件或參數的資料模型)所定義的參數,並根據參數名稱快速檢索到相應的功能指針,從而實現功能的調用。 In view of the above, it is necessary to provide a function calling system and method for quickly finding all data models similar to TR-098 and TR-098 (that is, a data model in which characters or parameters are named by strings and digits). The parameters are quickly retrieved according to the parameter name to the corresponding function pointer, thereby implementing the function call.

一種功能調用系統,應用於網路裝置中,該網路裝置藉由網路分別與外部裝置以及網路終端裝置相連接,該功能調用系統包括:計算模組,用於獲取網路終端裝置包括的配置參數,並根據配置參數的參數名稱計算相應的雜湊值;生成模組,用於確定各配置參數所對應的功能及獲取所確定功能相應的功能指針,創建一個雜湊表,並將計算所得的各配置參數的雜湊值與相對應的功能指針導入所述的雜湊表中;接收模組,用於從外部裝置接收一個配置命令,並獲取該配置命令所包括的配置參數的名稱;所述的計算模組,進一步用於根據該配置參數的名稱計算一個相應的雜湊值;檢索模組,用於根據該配置參數所對應的雜湊值檢索雜湊表中是否有相同的雜湊值;及執行模組,用於在所述雜湊表中有相同的雜湊值時確定與該檢索到的雜湊值相應的功能指針,並根據所確定的功能指針調用相應的功能以實現所接收的配置命令。 A function calling system is applied to a network device, wherein the network device is respectively connected to an external device and a network terminal device by using a network, and the function calling system comprises: a computing module, configured to acquire the network terminal device, including The configuration parameter, and calculate the corresponding hash value according to the parameter name of the configuration parameter; the generating module is used to determine the function corresponding to each configuration parameter and obtain the function pointer corresponding to the determined function, create a hash table, and calculate the result The hash value of each configuration parameter and the corresponding function pointer are imported into the hash table; the receiving module is configured to receive a configuration command from the external device, and obtain a name of the configuration parameter included in the configuration command; The computing module is further configured to calculate a corresponding hash value according to the name of the configuration parameter; the retrieval module is configured to retrieve, according to the hash value corresponding to the configuration parameter, whether the hash value is the same in the hash table; and the execution module a group, configured to determine a function pointer corresponding to the retrieved hash value when the same hash value is present in the hash table, Invoking the corresponding function according to the determined pointer to implement the received configuration command.

一種功能調用方法,應用於網路裝置中,該網路裝置藉由網路分別與外部裝置以及網路終端裝置相連接,該方法包括:獲取網路終端裝置包括的配置參數,並根據配 置參數的參數名稱計算相應的雜湊值;確定各配置參數所對應的功能,並獲取所確定功能相應的功能指針;創建一個雜湊表,並將計算所得的各配置參數的雜湊值與相對應的功能指針導入所述的雜湊表中;從外部裝置接收一個配置命令,並獲取該配置命令所包括的配置參數的名稱;根據該配置參數的名稱計算一個相應的雜湊值;根據該配置參數所對應的雜湊值檢索雜湊表中是否有相同的雜湊值;及若所述雜湊表中有相同的雜湊值,確定與該檢索到的雜湊值相應的功能指針,並根據所確定的功能指針調用相應的功能以實現所接收的配置命令。 A function calling method is applied to a network device, wherein the network device is respectively connected to an external device and a network terminal device by using a network, and the method includes: acquiring configuration parameters included in the network terminal device, and Set the parameter name of the parameter to calculate the corresponding hash value; determine the function corresponding to each configuration parameter, and obtain the function pointer corresponding to the determined function; create a hash table, and calculate the hash value of each configuration parameter corresponding to the corresponding The function pointer is imported into the hash table; receiving a configuration command from the external device, and obtaining a name of the configuration parameter included in the configuration command; calculating a corresponding hash value according to the name of the configuration parameter; corresponding to the configuration parameter The hash value retrieves whether there is the same hash value in the hash table; and if the hash table has the same hash value, determines a function pointer corresponding to the retrieved hash value, and calls the corresponding function pointer according to the determined function pointer Function to implement the received configuration commands.

相較於習知技術,所述的功能調用系統及方法,可根據參數名稱快速檢索到相應的功能指針,從而實現功能的調用,有效節省了參數檢索的時間,並提高了檢索效率。 Compared with the prior art, the function calling system and method can quickly retrieve the corresponding function pointer according to the parameter name, thereby realizing the function calling, effectively saving the time of parameter retrieval, and improving the retrieval efficiency.

如圖1所示,是本發明功能調用系統的較佳實施方式的運行環境圖。所述功能調用系統(下文簡稱為“調用系統”)2可運行於網路裝置1中,該網路裝置1藉由網路5與不同的網路終端裝置6相連。所述調用系統2用於根據從外部裝置發送的配置命令快速檢索各網路終端6包括的配置參數,從而根據該配置參數調用相應的功能以實現所述的配置命令。 As shown in FIG. 1, it is an operational environment diagram of a preferred embodiment of the function invoking system of the present invention. The function calling system (hereinafter simply referred to as "calling system") 2 can be operated in the network device 1, which is connected to different network terminal devices 6 via the network 5. The calling system 2 is configured to quickly retrieve configuration parameters included in each network terminal 6 according to a configuration command sent from an external device, thereby invoking corresponding functions according to the configuration parameters to implement the configuration command.

所述調用系統2可適用於查找所有與TR-098以及與TR-098類似的資料模型(即以字串與數位來命名其中物件或參數的資料模型)所定義的參數。 The calling system 2 can be adapted to find all parameters defined by TR-098 and a data model similar to TR-098 (ie, a data model in which strings or digits are used to name objects or parameters).

如圖1所示為一個應用TR-069的網路架構圖範例,運行支援系統(OSS,Operations Support System)3與自動配置伺服器(ACS,Automatic Configuration Server)4藉由網路5與所述的網路裝置1相連,從而將配置命令發送到網路終端裝置6以實現對網路終端裝置6的遠端管理。例如,當該網路裝置1為家庭閘道時,其所連接的網路終端裝置6可以是網路儲存設備、電腦、機頂盒、電話適配設備等。所述的遠端管理可以包括,但不限於,設備的自動配置、設備的軟體和硬體的升級、設備的狀態和性能監測以及故障診斷等。 As shown in FIG. 1 , an example of a network architecture diagram of an application TR-069, an Operations Support System (OSS) 3 and an Automatic Configuration Server (ACS) 4 are described by the network 5 The network devices 1 are connected to transmit configuration commands to the network terminal device 6 for remote management of the network terminal device 6. For example, when the network device 1 is a home gateway, the network terminal device 6 to which it is connected may be a network storage device, a computer, a set top box, a telephone adapter device, or the like. The remote management may include, but is not limited to, automatic configuration of the device, software and hardware upgrade of the device, status and performance monitoring of the device, and fault diagnosis.

所述網路5,可以是網際網路(Internet),還可以是其他類型的通訊網絡。 The network 5 can be an Internet or other types of communication networks.

如圖2所示,是本發明功能調用系統的較佳實施方式的功能模組圖。所述的功能調用系統2運行在所述的網路裝置1中,該網路裝置1還包括處理器10以及儲存裝置12。所述處理器10用於執行所述網路裝置1中安裝或嵌入的各類軟體。所述的儲存裝置12用於儲存各類資料,例如,各類配置參數等。 2 is a functional block diagram of a preferred embodiment of the function invoking system of the present invention. The function calling system 2 is operated in the network device 1 , and the network device 1 further comprises a processor 10 and a storage device 12 . The processor 10 is configured to execute various types of software installed or embedded in the network device 1. The storage device 12 is configured to store various types of materials, for example, various configuration parameters and the like.

在本較佳實施方式中,所述的功能調用系統2包括多個功能模組,分別是:計算模組20、生成模組22、接收模組24、檢索模組26以及執行模組28。 In the preferred embodiment, the function invoking system 2 includes a plurality of functional modules, namely: a computing module 20, a generating module 22, a receiving module 24, a retrieval module 26, and an execution module 28.

所述的生成模組22用於創建一個雜湊表(hash table)。所述的雜湊表(也叫散列表),用於存放鍵值對(key/value),是根據關鍵碼值直接進行訪問的資料結 構,其可藉由把關鍵碼值映射到表中一個位置來訪問/存取記錄,從而加快查找的速度。 The generating module 22 is configured to create a hash table. The hash table (also called a hash table) is used to store a key value pair (key/value), which is a data node directly accessed according to the key code value. Structure, which can speed up the lookup by accessing/accessing records by mapping key values to a location in the table.

所述的計算模組20用於獲取各網路終端裝置6包括的配置參數,並根據配置參數的參數名稱計算相應的雜湊值(hash value)。 The computing module 20 is configured to obtain configuration parameters included in each network terminal device 6, and calculate a corresponding hash value according to the parameter name of the configuration parameter.

雜湊值的計算有多種方式(hash function),如圖3所示僅為其中一種演算法的程式段範例,實際應用中也可採取其他不同的演算法。圖3中採用的hash function是“uint32_t hashlittle(const void *key,size_t length,uint32_t initval)”。藉由此hash function所計算出的雜湊值是32位(bit)的正整數,而實際所採用的雜湊值的位元數可根據雜湊表的大小(size)來決定。雜湊表的大小是根據系統中配置參數的數目決定的,例如,雜湊表的大小不得小於配置參數的數目。 There are many ways to calculate the hash value. As shown in Figure 3, it is only a block example of one of the algorithms. In practice, other different algorithms can be used. The hash function employed in Figure 3 is "uint32_t hashlittle(const void *key,size_t length,uint32_t initval)". The hash value calculated by this hash function is a 32-bit positive integer, and the number of bits of the actually used hash value can be determined according to the size of the hash table. The size of the hash table is determined by the number of configuration parameters in the system. For example, the size of the hash table must not be less than the number of configuration parameters.

假設系統中共有1500個配置參數,該1500介於1024(2的10次方)與2048(2的11次方)之間,由於雜湊表的大小必須大於配置參數的數目,因此可確定為2048。又假設雜湊表中的每個雜湊值為4位元組,每個功能指針為4位元組,因此,雜湊表的大小可確定為2048*(4+4)=16384位元組,並且雜湊值的位數可以相應設定為11位(2的11次方為2048位元組)。在本實施方式中,雜湊值的位數可以藉由“h=(h & hashmask(*))”指定,其中“*”代表指定的位數,例如,“*”可以設定為11,則代表確定雜湊值的位數為11位。 Suppose there are 1500 configuration parameters in the system. The 1500 is between 1024 (2 to the power of 10) and 2048 (the power of 2 to the power of 2). Since the size of the hash table must be greater than the number of configuration parameters, it can be determined as 2048. . It is also assumed that each hash value in the hash table is 4 bytes, and each function pointer is 4 bytes. Therefore, the size of the hash table can be determined to be 2048*(4+4)=16384 bytes, and the hash is The number of digits of the value can be set to 11 bits (2 to the 20th power of 2048 bytes). In the present embodiment, the number of bits of the hash value can be specified by "h=(h & hashmask(*))", where "*" represents the specified number of bits, for example, "*" can be set to 11, which represents The number of bits for determining the hash value is 11 bits.

在圖3所示的範例中,該程式段可處理不同長度的字串,例如,參數一的名稱為“hello,world”,其長度(length)為11位;參數二的名稱為“hello,world!”,其長度為12位。對應於參數一的輸出結果分別是結果一“0x395815F8”與結果二“0x000001F8”。其中,結果一“0x395815F8”為實際計算所得的雜湊值,而結果二“0x000001F8”為利用“h=(h & hashmask(10))”所最終確定為10位的雜湊值。在本實施方式中,結果二作為計算所得的配置參數的雜湊值。 In the example shown in FIG. 3, the program segment can process strings of different lengths. For example, the name of the parameter one is "hello, world", and the length (length) is 11 bits; the name of the parameter two is " Hello, world!", its length is 12 digits. The output results corresponding to the parameter one are the result one "0x395815F8" and the result two "0x000001F8". Among them, the result "0x395815F8" is the actually calculated hash value, and the result two "0x000001F8" is the hash value finally determined to be 10 bits by "h=(h & hashmask(10))". In the present embodiment, the result 2 is a hash value of the calculated configuration parameter.

所述的生成模組22還用於獲取各配置參數所對應的功能以及所述功能的功能指針,並將計算所得的各配置參數的雜湊值與相對應的功能指針導入所述的雜湊表中。其中,所述的配置參數的雜湊值可用於作為雜湊表中的索引,以便後續檢索相應的功能指針從而快速調用相關功能。 The generating module 22 is further configured to acquire a function corresponding to each configuration parameter and a function pointer of the function, and import the calculated hash value of each configuration parameter and a corresponding function pointer into the hash table. . The hash value of the configuration parameter can be used as an index in the hash table to subsequently retrieve the corresponding function pointer to quickly invoke the related function.

所述的配置參數對應的功能可以包括,但不限於,存取配置參數、設置或修改配置參數等。 The functions corresponding to the configuration parameters may include, but are not limited to, accessing configuration parameters, setting or modifying configuration parameters, and the like.

所述的生成模組22將上述配置參數的雜湊值、相對應的功能指針以及雜湊表等資料存入所述的儲存裝置12中。 The generating module 22 stores the hash value of the configuration parameter, the corresponding function pointer, and the hash table into the storage device 12.

所述的接收模組24用於從外部裝置接收一個配置命令,並獲取該配置命令所包括的配置參數的名稱。所述的配置命令可以是,但不限於,對網路終端裝置6的參數進行存取、設置、修改、新增,對網路終端裝置6內的軟硬體進行升級等。 The receiving module 24 is configured to receive a configuration command from an external device, and obtain a name of a configuration parameter included in the configuration command. The configuration command may be, but not limited to, accessing, setting, modifying, and adding parameters of the network terminal device 6, upgrading the software and hardware in the network terminal device 6, and the like.

所述的計算模組20用於根據該配置參數的名稱計算一個相應的雜湊值。 The computing module 20 is configured to calculate a corresponding hash value according to the name of the configuration parameter.

在實際應用中,由於網路終端裝置6的用戶也可對各配置參數進行設置或者修改,並且相應的修改參數名稱。例如,原配置參數的名稱為A,對該配置參數的內容進行調整後,在配置參數的參數名稱後增加序號,如A.1。在本較佳實施方式中,所述的計算模組20在計算過程中可忽略該序號,而僅根據參數名稱計算相應的雜湊值,從而使得該雜湊值保持一致性。 In practical applications, since the user of the network terminal device 6 can also set or modify each configuration parameter, and correspondingly modify the parameter name. For example, the name of the original configuration parameter is A. After adjusting the content of the configuration parameter, add the sequence number after the parameter name of the configuration parameter, such as A.1. In the preferred embodiment, the computing module 20 can ignore the serial number in the calculation process, and only calculate the corresponding hash value according to the parameter name, so that the hash value remains consistent.

所述的檢索模組26用於根據該配置參數所對應的雜湊值檢索雜湊表中是否有相同的雜湊值。 The search module 26 is configured to retrieve whether the same hash value is in the hash table according to the hash value corresponding to the configuration parameter.

若所述雜湊表中有相同的雜湊值,則所述的執行模組28用於確定與該檢索到的雜湊值相應的功能指針,並根據所確定的功能指針調用相應的功能以實現所接收的配置命令。 If the hash table has the same hash value, the execution module 28 is configured to determine a function pointer corresponding to the retrieved hash value, and invoke a corresponding function according to the determined function pointer to implement the received function. Configuration command.

若所述雜湊表中沒有相同的雜湊值,所述的檢索模組26返回一個提示給外部裝置,以提示所述雜湊表中無相應的配置參數。 If there is no identical hash value in the hash table, the retrieval module 26 returns a prompt to the external device to indicate that there is no corresponding configuration parameter in the hash table.

如圖4所示,是本發明功能調用方法的較佳實施方式的流程圖。首先,步驟S2,所述的計算模組20獲取各網路終端裝置6包括的配置參數。 As shown in FIG. 4, it is a flow chart of a preferred embodiment of the function invocation method of the present invention. First, in step S2, the computing module 20 acquires configuration parameters included in each network terminal device 6.

步驟S4,所述的生成模組22創建一個雜湊表。所述的雜湊表用於存放鍵值對,是根據關鍵碼值直接進行訪問的資料結構,其可藉由把關鍵碼值映射到表中一個位置來 訪問/存取記錄,從而加快查找的速度。 In step S4, the generating module 22 creates a hash table. The hash table is used to store a key value pair, and is a data structure directly accessed according to a key value, which can be mapped to a position in the table by mapping the key value to Access/access records to speed up the lookup.

步驟S6,所述的計算模組20根據配置參數的參數名稱計算相應的雜湊值。 In step S6, the computing module 20 calculates a corresponding hash value according to the parameter name of the configuration parameter.

步驟S8,所述的生成模組22獲取各配置參數所對應的功能以及所述功能的功能指針,將計算所得的各配置參數的雜湊值與相對應的功能指針導入所述的雜湊表中。其中,所述的配置參數的雜湊值可用於作為表中的索引,以便後續檢索相應的功能指針從而快速調用相關功能。此外,所述的生成模組22將上述配置參數的雜湊值、相對應的功能指針以及雜湊表等資料存入所述的儲存裝置12中。 In step S8, the generating module 22 acquires the function corresponding to each configuration parameter and the function pointer of the function, and imports the calculated hash value of each configuration parameter and the corresponding function pointer into the hash table. The hash value of the configuration parameter can be used as an index in the table, so that the corresponding function pointer is subsequently retrieved to quickly call the related function. Further, the generation module 22 stores data such as a hash value of the configuration parameter, a corresponding function pointer, and a hash table into the storage device 12.

步驟S10,所述的接收模組24從外部裝置接收一個配置命令,並獲取該配置命令所包括的配置參數的名稱。所述的配置命令可以是,但不限於,對網路終端裝置6的參數進行存取、設置、修改、新增,對網路終端裝置6內的軟硬體進行升級等。 In step S10, the receiving module 24 receives a configuration command from an external device, and acquires a name of a configuration parameter included in the configuration command. The configuration command may be, but not limited to, accessing, setting, modifying, and adding parameters of the network terminal device 6, upgrading the software and hardware in the network terminal device 6, and the like.

步驟S12,所述的計算模組20根據該配置參數的名稱計算一個相應的雜湊值。 In step S12, the computing module 20 calculates a corresponding hash value according to the name of the configuration parameter.

步驟S14,所述的檢索模組26根據該配置參數所對應的雜湊值檢索雜湊表中是否有相同的雜湊值。 In step S14, the search module 26 retrieves whether the hash value in the hash table has the same hash value according to the hash value corresponding to the configuration parameter.

若所述雜湊表中有相同的雜湊值,於步驟S16,所述的執行模組28確定與該檢索到的雜湊值相應的功能指針。步驟S18,所述的執行模組28根據所確定的功能指針調用相應的功能以實現所接收的配置命令,然後結束本流程。 If the hash table has the same hash value, in step S16, the execution module 28 determines a function pointer corresponding to the retrieved hash value. In step S18, the execution module 28 calls the corresponding function according to the determined function pointer to implement the received configuration command, and then ends the process.

若所述雜湊表中沒有相同的雜湊值,於步驟S20,所述的檢索模組26返回一個提示給外部裝置,以提示所述雜湊表中無相應的配置參數,然後結束本流程。 If there is no identical hash value in the hash table, in step S20, the search module 26 returns a prompt to the external device to prompt that there is no corresponding configuration parameter in the hash table, and then ends the process.

綜上所述,本發明符合發明專利要件,爰依法提出專利申請。惟,以上所述者僅為本發明之較佳實施例,本發明之範圍並不以上述實施例為限,舉凡熟悉本案技藝之人士援依本發明之精神所作之等效修飾或變化,皆應涵蓋於以下申請專利範圍內。 In summary, the present invention complies with the requirements of the invention patent and submits a patent application according to law. The above is only the preferred embodiment of the present invention, and the scope of the present invention is not limited to the above-described embodiments, and equivalent modifications or variations made by those skilled in the art in light of the spirit of the present invention are It should be covered by the following patent application.

1‧‧‧網路裝置 1‧‧‧Network device

10‧‧‧處理器 10‧‧‧ processor

12‧‧‧儲存裝置 12‧‧‧Storage device

2‧‧‧功能調用系統 2‧‧‧ function calling system

20‧‧‧計算模組 20‧‧‧Computation Module

22‧‧‧生成模組 22‧‧‧Generation Module

24‧‧‧接收模組 24‧‧‧ receiving module

26‧‧‧檢索模組 26‧‧‧Search Module

28‧‧‧執行模組 28‧‧‧Execution module

3‧‧‧運行支援系統 3‧‧‧Operation Support System

4‧‧‧自動配置伺服器 4‧‧‧Automatic configuration server

5‧‧‧網路 5‧‧‧Network

6‧‧‧網路終端 6‧‧‧Network terminal

圖1是本發明功能調用系統的較佳實施方式的運行環境圖。 1 is a diagram showing the operating environment of a preferred embodiment of the function invoking system of the present invention.

圖2是本發明功能調用系統的較佳實施方式的功能模組圖。 2 is a functional block diagram of a preferred embodiment of the function invocation system of the present invention.

圖3是本發明功能調用系統的較佳實施方式的雜湊值計算程式範例。 3 is an example of a hash value calculation program of a preferred embodiment of the function invoking system of the present invention.

圖4是本發明功能調用方法的較佳實施方式的流程圖。 4 is a flow chart of a preferred embodiment of the function invocation method of the present invention.

1‧‧‧網路裝置 1‧‧‧Network device

10‧‧‧處理器 10‧‧‧ processor

12‧‧‧儲存裝置 12‧‧‧Storage device

2‧‧‧功能調用系統 2‧‧‧ function calling system

20‧‧‧計算模組 20‧‧‧Computation Module

22‧‧‧生成模組 22‧‧‧Generation Module

24‧‧‧接收模組 24‧‧‧ receiving module

26‧‧‧檢索模組 26‧‧‧Search Module

28‧‧‧執行模組 28‧‧‧Execution module

Claims (10)

一種功能調用系統,應用於網路裝置中,該網路裝置藉由網路分別與外部裝置以及網路終端裝置相連接,該功能調用系統包括:計算模組,用於獲取網路終端裝置包括的配置參數,並根據配置參數的參數名稱計算相應的雜湊值;生成模組,用於確定各配置參數所對應的功能及獲取所確定功能相應的功能指針,創建一個雜湊表,並將計算所得的各配置參數的雜湊值與相對應的功能指針導入所述的雜湊表中;接收模組,用於從外部裝置接收一個配置命令,並獲取該配置命令所包括的配置參數的名稱;所述的計算模組,進一步用於根據該配置參數的名稱計算一個相應的雜湊值;檢索模組,用於根據該配置參數所對應的雜湊值檢索雜湊表中是否有相同的雜湊值;及執行模組,用於在所述雜湊表中有相同的雜湊值時確定與該檢索到的雜湊值相應的功能指針,並根據所確定的功能指針調用相應的功能以實現所接收的配置命令。 A function calling system is applied to a network device, wherein the network device is respectively connected to an external device and a network terminal device by using a network, and the function calling system comprises: a computing module, configured to acquire the network terminal device, including The configuration parameter, and calculate the corresponding hash value according to the parameter name of the configuration parameter; the generating module is used to determine the function corresponding to each configuration parameter and obtain the function pointer corresponding to the determined function, create a hash table, and calculate the result The hash value of each configuration parameter and the corresponding function pointer are imported into the hash table; the receiving module is configured to receive a configuration command from the external device, and obtain a name of the configuration parameter included in the configuration command; The computing module is further configured to calculate a corresponding hash value according to the name of the configuration parameter; the retrieval module is configured to retrieve, according to the hash value corresponding to the configuration parameter, whether the hash value is the same in the hash table; and the execution module a group, configured to determine a function pointer corresponding to the retrieved hash value when the same hash value is present in the hash table, Calling the corresponding function according to the determined pointer to implement the received configuration command. 如申請專利範圍第1項所述的功能調用系統,所述的生成模組還用於將所述的雜湊值以及雜湊表存入所述網路裝置的儲存裝置中。 The function calling system according to claim 1, wherein the generating module is further configured to store the hash value and the hash table in a storage device of the network device. 如申請專利範圍第1項所述的功能調用系統,所述的配置命令包括對網路終端裝置的自動配置、對網路終端裝置的軟體和硬體的升級、對網路終端裝置的狀態和性能監測以 及故障診斷。 The function invoking system according to claim 1, wherein the configuration command comprises automatic configuration of a network terminal device, upgrading of software and hardware of the network terminal device, status of the network terminal device, and Performance monitoring And troubleshooting. 如申請專利範圍第1項所述的功能調用系統,所述的計算模組在計算過程中忽略參數名稱後的序號,僅根據參數名稱計算相應的雜湊值。 For example, in the function invoking system described in claim 1, the computing module ignores the serial number after the parameter name in the calculation process, and calculates the corresponding hash value only according to the parameter name. 如申請專利範圍第1項所述的功能調用系統,所述的檢索模組還用於在所述雜湊表中沒有相同的雜湊值時提示所述雜湊表中無相應的配置參數。 The function invoking system of claim 1, wherein the search module is further configured to prompt that there is no corresponding configuration parameter in the hash table when there is no same hash value in the hash table. 一種功能調用方法,應用於網路裝置中,該網路裝置藉由網路分別與外部裝置以及網路終端裝置相連接,該方法包括:獲取網路終端裝置包括的配置參數,並根據配置參數的參數名稱計算相應的雜湊值;確定各配置參數所對應的功能,並獲取所確定功能相應的功能指針;創建一個雜湊表,並將計算所得的各配置參數的雜湊值與相對應的功能指針導入所述的雜湊表中;從外部裝置接收一個配置命令,並獲取該配置命令所包括的配置參數的名稱;根據該配置參數的名稱計算一個相應的雜湊值;根據該配置參數所對應的雜湊值檢索雜湊表中是否有相同的雜湊值;及若所述雜湊表中有相同的雜湊值,確定與該檢索到的雜湊值相應的功能指針,並根據所確定的功能指針調用相應的功能以實現所接收的配置命令。 A function calling method is applied to a network device, wherein the network device is respectively connected to an external device and a network terminal device by using a network, the method comprising: acquiring configuration parameters included in the network terminal device, and according to the configuration parameter The parameter name calculates the corresponding hash value; determines the function corresponding to each configuration parameter, and obtains the function pointer corresponding to the determined function; creates a hash table, and calculates the hash value of each configuration parameter and the corresponding function pointer Importing the hash table; receiving a configuration command from an external device, and obtaining a name of a configuration parameter included in the configuration command; calculating a corresponding hash value according to the name of the configuration parameter; according to the hash corresponding to the configuration parameter Whether the value retrieves the same hash value in the hash table; and if the hash table has the same hash value, determines a function pointer corresponding to the retrieved hash value, and invokes the corresponding function according to the determined function pointer Implement the received configuration commands. 如申請專利範圍第6項所述的功能調用方法,該方法還包括: 將所述的雜湊值以及雜湊表存入所述網路裝置的儲存裝置中。 The method for calling a function as described in claim 6 of the patent scope, the method further comprising: The hash value and the hash table are stored in a storage device of the network device. 如申請專利範圍第6項所述的功能調用方法,該方法還包括:若所述雜湊表中沒有相同的雜湊值,則提示所述雜湊表中無相應的配置參數。 The method for invoking a function according to claim 6, wherein the method further comprises: if there is no identical hash value in the hash table, prompting that there is no corresponding configuration parameter in the hash table. 如申請專利範圍第6項所述的功能調用方法,所述的配置命令包括對網路終端裝置的自動配置、對網路終端裝置的軟體和硬體的升級、對網路終端裝置的狀態和性能監測以及故障診斷。 The function invoking method according to claim 6, wherein the configuration command includes automatic configuration of a network terminal device, upgrading of a software and a hardware of the network terminal device, status of the network terminal device, and Performance monitoring and troubleshooting. 如申請專利範圍第6項所述的功能調用方法,所述計算所得的各配置參數的雜湊值在雜湊表中作為索引。 The function calling method according to claim 6, wherein the calculated hash value of each configuration parameter is used as an index in the hash table.
TW98134078A 2009-10-08 2009-10-08 Method and system for invoking functions TWI399945B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW98134078A TWI399945B (en) 2009-10-08 2009-10-08 Method and system for invoking functions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW98134078A TWI399945B (en) 2009-10-08 2009-10-08 Method and system for invoking functions

Publications (2)

Publication Number Publication Date
TW201114216A TW201114216A (en) 2011-04-16
TWI399945B true TWI399945B (en) 2013-06-21

Family

ID=44909953

Family Applications (1)

Application Number Title Priority Date Filing Date
TW98134078A TWI399945B (en) 2009-10-08 2009-10-08 Method and system for invoking functions

Country Status (1)

Country Link
TW (1) TWI399945B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070143280A1 (en) * 2005-12-19 2007-06-21 Microsoft Corporation Determining cardinality of a parameter using hash values
TW200847694A (en) * 2007-01-31 2008-12-01 Ibm System and method for multicore communication processing
US20080320582A1 (en) * 2007-06-19 2008-12-25 Rockwell Automation Technologies, Inc. Real-time industrial firewall
US7552125B1 (en) * 2006-03-22 2009-06-23 Emc Corporation Synergistic data structures
TW200933411A (en) * 2008-01-25 2009-08-01 Inventec Corp English words searching system using math operations and method thereof
TW200939063A (en) * 2008-03-04 2009-09-16 Ind Tech Res Inst Record system and method based on one-way hash function

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070143280A1 (en) * 2005-12-19 2007-06-21 Microsoft Corporation Determining cardinality of a parameter using hash values
US7552125B1 (en) * 2006-03-22 2009-06-23 Emc Corporation Synergistic data structures
TW200847694A (en) * 2007-01-31 2008-12-01 Ibm System and method for multicore communication processing
US20080320582A1 (en) * 2007-06-19 2008-12-25 Rockwell Automation Technologies, Inc. Real-time industrial firewall
TW200933411A (en) * 2008-01-25 2009-08-01 Inventec Corp English words searching system using math operations and method thereof
TW200939063A (en) * 2008-03-04 2009-09-16 Ind Tech Res Inst Record system and method based on one-way hash function

Also Published As

Publication number Publication date
TW201114216A (en) 2011-04-16

Similar Documents

Publication Publication Date Title
CN102035669B (en) Function calling system and method
US11463320B2 (en) Method and apparatus for modeling NETCONF-based network system instructions with YANG language
CN113381870B (en) Message processing method and device
WO2006014766A2 (en) Method and apparatus for converting network management protocol to markup language
US20160055142A1 (en) System and Method for Metadata Enhanced Inventory Management of a Communications System
WO2020062959A1 (en) Data configuration method and apparatus
WO2016107397A9 (en) System and method for model-based search and retrieval of networked data
US8462773B2 (en) Default gateway, terminal device, and method for exchanging VoIP signaling
US8868697B2 (en) Method and system for device management, and device
CN110417891A (en) Data processing method, device, API gateway and rear end management equipment
CN111711532B (en) Unified management method for heterogeneous network equipment
CN113381875B (en) Method for acquiring configuration data
TWI399945B (en) Method and system for invoking functions
CN110633162B (en) Remote call implementation method and device, computer equipment and storage medium
CN108769249B (en) iOS high-performance high-expansion network device, implementation method, server and medium
CN107404410B (en) Method and device for constructing virtual network function platform in cloud environment
US8073819B2 (en) System and method for storing element information
CN111988179B (en) YANG model management system, method and storage medium
TWI540861B (en) Management system and management method
US11172062B2 (en) Packet identifying method and packet identifying device
Zhang et al. Applying Software Transformation Techniques to Security Testing
CN103546323A (en) Method for remotely managing WIFI interface in terminal of coaxial or power line Ethernet
CN1176537C (en) Method for validating validity of information device in household network
WO2012100672A1 (en) Method and apparatus for accessing voice device
JP2003318898A (en) Dynamic snmp network device

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees