CN101150461B - A node query method and device in system - Google Patents

A node query method and device in system Download PDF

Info

Publication number
CN101150461B
CN101150461B CN2007101774353A CN200710177435A CN101150461B CN 101150461 B CN101150461 B CN 101150461B CN 2007101774353 A CN2007101774353 A CN 2007101774353A CN 200710177435 A CN200710177435 A CN 200710177435A CN 101150461 B CN101150461 B CN 101150461B
Authority
CN
China
Prior art keywords
node
querying
cycle
system queries
arrives
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN2007101774353A
Other languages
Chinese (zh)
Other versions
CN101150461A (en
Inventor
蒋正义
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN2007101774353A priority Critical patent/CN101150461B/en
Publication of CN101150461A publication Critical patent/CN101150461A/en
Application granted granted Critical
Publication of CN101150461B publication Critical patent/CN101150461B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The invention discloses a technical proposal for enquiring a node in a system, which includes setting the query periods for the system and each node. Arrival node of the node enquiry period is determined when the system enquiry period is reached; the node is to be enquired when only one arrival node exists in the node query period; one of the nodes is to be enquired when a plurality of arrival nodes exist in the node enquiry period; the node being enquired is deleted from a record of the arrival node in the node enquiry period. The technical proposal of the invention can avoid the enquiry to a great deal of nodes in the system in short periods of time, guarantee the system performance and real time character and avoid the impact on CPU of a system. In addition, technical proposal of the invention is capable of ensuring the enquiry period of each node to a certain degree.

Description

The method of node and device in a kind of inquiry system
Technical field
The present invention relates to computer application field, refer to the method and the device of node in a kind of inquiry system especially.
Background technology
In system, as embedded and sensing system, in order to know the operating state of each node in the system, system can carry out periodic queries to the node that self comprised, so that grasp the running status of node, whole system is better moved.Node described herein can be physical entity, also can be logic entity.For example, the port on the router is exactly to need the node inquired about in a kind of system.
In the prior art, status poll mode at present commonly used is: be each node setting polling cycle independently separately, every polling cycle just inquires about the nodes for state of correspondence.Because the timer between the node is independent the setting, therefore can't avoid occurring in the short time situation that great deal of nodes is inquired about, particularly when synchronization has a plurality of nodes to inquire about.Can cause inquiring about the problem that too frequently causes the systematic function reduction like this, can cause impact, have a strong impact on the real-time of system system CPU.
Summary of the invention
In view of this, the invention provides the method for node in a kind of inquiry system, by the situation that great deal of nodes is inquired about of using that this method can avoid occurring in the system in the short time.
For achieving the above object, technical scheme of the present invention is achieved in that
The method of node in a kind of inquiry system, this method comprises: the querying node cycle that system queries cycle and each node are set; The described system queries cycle is determined the node that the querying node cycle arrives when arriving;
When only there is one in the node that arrives when the querying node cycle, this node is inquired about; The node that arrives when the querying node cycle exists when a plurality of, and one of them node is inquired about;
This node of inquiring about is deleted from the nodes records of querying node cycle arrival.
In addition, the invention provides the device of node in a kind of inquiry system, by the situation that great deal of nodes is inquired about of using that this device can avoid occurring in the system in the short time.
For achieving the above object, technical scheme of the present invention is achieved in that
The device of node in a kind of inquiry system, this device comprises: system processing unit and node processing unit;
When described system processing unit arrived in the system queries cycle that is provided with, to the polling cycle arrival of node processing unit indication mechanism;
The node that the querying node cycle arrives is determined in described node processing unit after the indication of receiving the arrival of described system queries cycle; When only there is one in the node that arrives when the querying node cycle, this node is inquired about, and this node of inquiring about is deleted from the nodes records of querying node cycle arrival; The node that arrives when the querying node cycle exists when a plurality of, and one of them node is inquired about, and deletes the nodes records that this node of inquiring about was arrived from the querying node cycle.
The technical scheme of node in a kind of inquiry system provided by the present invention is by being provided with the querying node cycle of system queries cycle and each node; When the system queries cycle arrives, the node that the querying node cycle arrives is inquired about, avoided the situation that great deal of nodes is inquired about occurring in the system in the short time, guaranteed the performance and the real-time of system, stoped the impact that system CPU is caused.In addition, technical scheme of the present invention can also guarantee each querying node cycle to a certain extent.
Description of drawings
Fig. 1 is a method exemplary process diagram of the present invention;
Fig. 2 is a device exemplary block diagram of the present invention;
Fig. 3 is the process chart in the system queries cycle of the embodiment of the invention;
Fig. 4 is the structure drawing of device of the embodiment of the invention.
Embodiment
In the detailed description of this part, only, illustrate and described preferred embodiment of the present invention by to implementing the example of the desired best mode of inventor of the present invention.It will be appreciated that and not deviate under the prerequisite of the present invention, it is made amendment with regard to each conspicuous aspect.Correspondingly, it is exemplary in itself that drawing and description should be regarded as, rather than restrictive.
The invention provides the technical scheme of node in a kind of inquiry system, by the querying node cycle of system queries cycle and each node is set; When the system queries cycle arrives, the node that the querying node cycle arrives is inquired about.Technical scheme of the present invention is owing to only when the system queries cycle arrives, inquire about a node, and a node only can be inquired about by the system that therefore guaranteed in a period of time, and then can avoid the situation that great deal of nodes is inquired about occurring in the interior system of short time.
Referring to Fig. 1, Fig. 1 is a method exemplary process diagram of the present invention.This method comprises: the querying node cycle that system queries cycle and each node are set; And comprise following steps: in step 101, when the system queries cycle arrives, determine the node that the querying node cycle arrives; In step 102, when only there is one in the node that arrives when the querying node cycle, this node only depositing is inquired about; The node that arrives when the querying node cycle exists when a plurality of, inquires about for one that a plurality of polling cycles are arrived in the nodes; In step 103, this node of inquiring about is deleted from the nodes records of querying node cycle arrival.
Referring to Fig. 2, Fig. 2 is a structure drawing of device of the present invention.This device comprises system processing unit and node processing unit.Wherein, when system processing unit arrived in the system queries cycle that is provided with, to the polling cycle arrival of node processing unit indication mechanism.The node that the querying node cycle arrives is determined in the node processing unit after the indication of receiving the arrival of system queries cycle; When only there is one in the node that arrives when the querying node cycle, this node is inquired about, and from the nodes records of querying node cycle arrival, deleted; The node that arrives when the querying node cycle exists when a plurality of, and one of them node is inquired about, and deletes the nodes records that this node of inquiring about was arrived from the querying node cycle.
In technical scheme of the present invention, the system queries cycle is set can comprises system queries timer and system queries duration are set, system queries counter and system queries value perhaps are set.Under the situation that system queries timer and system queries duration are set, when the system queries timer arrived set system queries duration, then the system queries cycle arrived, and just can inquire about the node that a querying node cycle arrives this moment.In addition, after the system queries timer arrived the system queries duration, the system queries timer restarted timing, enters the timing in next system queries cycle.Under the situation that system queries counter and system queries value are set, when the set system queries value of system queries counter arrival, then the system queries cycle arrives.After the system queries counter arrived the system queries value, the system queries counter restarted counting, entered the counting in next system queries cycle.
Similar with the method that the system queries cycle is set, also can realize for the querying node cycle by the mode that timer and counter are set.The mode that the querying node cycle is set for node can be that querying node timer and querying node duration are set; Monitor node inquiry timer when the querying node timer arrives the querying node duration, determines that then this node is the node that arrives polling cycle.And after node was inquired about, the querying node timer of this node correspondence restarted timing, entered the next node timing of polling cycle.The mode that the querying node cycle of node is set can also be: for node is provided with querying node counter and querying node value; The querying node counter of monitor node when the querying node counter arrives the querying node value, is then determined the node that this node arrived for the querying node cycle.After node was inquired about, the querying node counter of this node correspondence restarted counting, enters the next node counting of polling cycle.
Below realize that with counter the technical scheme in system queries cycle and querying node cycle is an example, enumerate embodiment technical scheme of the present invention described in detail.
System queries counter n is set sWith system queries value N s, and the node setting querying node counter n separately for needing in the system to inquire about pWith querying node value N pIn the present embodiment, suppose the querying node value N of all nodes pIdentical.Here, it should be noted that the querying node value of each node is identical, is not the essential features that realizes technical solution of the present invention.According to the application scenario of reality, each querying node value does not need identical, and this does not influence the specific implementation of technical solution of the present invention.
Under system initial state, after making system start-up, can begin inquiry as early as possible, can be with system queries counter n sInitial value be set to N s, with querying node counter n pInitial value be set to N pFor the new node that needs inquiry that adds in system's running, begin inquiry as early as possible in order to make this node, also can be with its querying node counter n pInitial value be set to N p
After system start-up, the system queries counter of setting and querying node counter begin counting, system's real-time monitoring system query counts device and each querying node counter.In the process that monitors, real time record querying node counter arrives the node of querying node value, and when the count value of system queries counter arrives the system queries value, the processing that enters a system queries cycle.Arrive a system queries during cycle in system, concrete processing procedure as shown in Figure 3:
In step 301, judge the current node that whether writes down querying node counter arrival querying node value, if then execution in step 302; Otherwise, finish the processing of current polling cycle.
In step 302, judged whether only to write down the node of a querying node counter arrival querying node count value, if, execution in step 303; Otherwise, execution in step 304.
In step 303, the node of record is inquired about.Finish the processing of current polling cycle.
In step 304, one of them node of record is inquired about.Finish the processing of current polling cycle.
The node that arrives the querying node count value at the querying node counter of record exists when a plurality of, can inquire about the node of record at first; Each node itself just exists under the situation of priority in system, can inquire about the highest node of its medium priority.When if there is not priority in each node in the system, can according to the priority that is provided with the highest node of priority be inquired about then in advance for each node is provided with priority.In addition, when having the identical node of two or two priority, can to wherein at first the node of record preferentially inquire about.
In an embodiment of the present invention, when the system queries counter arrives the system queries value, then restart immediately, enter the counting in next system queries cycle; When the querying node counter arrived the querying node value, after this node was inquired about, the querying node counter of this node correspondence restarted, and entered the next node counting of polling cycle.
In the present embodiment, can both be queried to, can make the system queries count value of setting and querying node count value satisfy N in order to guarantee each node s* x≤N p, the node number that can inquire about for system's maximum of x wherein.
Referring to Fig. 4, Fig. 4 is the structure drawing of device of the embodiment of the invention, and general structure is identical with exemplary block diagram shown in Figure 2.
Just, concrete, system processing unit comprises system control unit and system queries counter; Wherein, the system queries counter is counted, when the system queries counter arrives the system queries value that is provided with, and the reporting system control unit, and restart counting; After system control unit is received the notice of system queries counter, to the polling cycle arrival of node processing unit indication mechanism.
The querying node counter that the node processing unit comprises the node control unit and is provided with for each node; The querying node counter is counted, when arriving the querying node value, and notifying section point control unit; What the receiving node control unit sent restarts when indicating, and restarts counting; The notice that node control unit receiving node query counts device sends, record querying node counter arrives the node of querying node value, when receiving the indication that system processing unit sends, when only having a nodes records, this node is inquired about, when having a plurality of nodes records, one of them node is inquired about; After node is inquired about, from record, delete this node, and restart indication to the querying node counter transmission of this node correspondence.
The embodiment that the present invention introduced is to be example so that system queries counter and querying node counter to be set, and technical scheme of the present invention is described in detail.As preceding, in technical scheme of the present invention, can also adopt system queries timer and querying node timer, realize technical scheme of the present invention.Concrete implementation is identical with the implementation of counter, only need be with the system queries counter and the querying node counter of correspondence, replace with system queries timer and querying node timer, specific implementation can beyond all doubt obtaining from the specific implementation of counter, therefore is not described in detail in this.Certainly, in technical scheme of the present invention, also can be to use system queries timer and querying node counter or system queries counter and querying node timer.
In the present embodiment,, therefore avoided the situation that great deal of nodes is inquired about occurring in the system in the short time, guaranteed the performance and the real-time of system because every system queries cycle could inquire about the node that a querying node cycle arrives.In addition, for node, the cycle of its inquiry is N p+ aN s, wherein a is illustrated in and arrives the interstitial content that primary system need be waited for during polling cycle, in concrete implementation procedure, the situation of a plurality of node queuing inquiries only just might occur in system initialisation phase.After the normal operation of system, generally be the situation waiting in line to inquire about to occur; Simultaneously, the N that generally is provided with sMuch smaller than N p, therefore, technical scheme of the present invention not only can guarantee system cycle node is inquired about, and avoids occurring in the short time situation that great deal of nodes is inquired about; Can also guarantee that node inquires about on a relatively fixing cycle.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being made, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. the method for node in the inquiry system is characterized in that this method comprises: the querying node cycle that system queries cycle and each node are set; The described system queries cycle is determined the node that the querying node cycle arrives when arriving;
When only there is one in the node that arrives when the querying node cycle, this node is inquired about; The node that arrives when the querying node cycle exists when a plurality of, and one of them node is inquired about;
This node of inquiring about is deleted from the nodes records of querying node cycle arrival.
2. the method for node is characterized in that in the inquiry system according to claim 1,
Describedly the system queries cycle is set is: system queries timer and system queries duration are set; The described system queries cycle arrives: described system queries timer arrives set system queries duration; This method further comprises: when the system queries timer arrived the system queries duration, the system queries timer restarted timing;
Perhaps,
Describedly the system queries cycle is set is: system queries counter and system queries value are set; The described system queries cycle arrives: described system queries counter arrives set system queries value; This method further comprises: when the system queries counter arrived the system queries value, the system queries counter restarted counting.
3. the method for node is characterized in that in the inquiry system according to claim 2,
The described querying node cycle that each node is set is: be each node setting querying node timer and querying node duration separately; The node that described definite querying node cycle arrives is: monitor the querying node timer of each node, record querying node timer arrives the node of querying node duration; Further comprise after the deletion the described nodes records that this node of inquiring about was arrived from the querying node cycle: the querying node timer of this node correspondence restarts timing;
Perhaps,
The described querying node cycle that each node is set is: be each node setting querying node counter and querying node value separately; The node that described definite querying node cycle arrives is: monitor the querying node counter of each node, record querying node counter arrives the node of querying node value; Further comprise after the deletion the described nodes records that this node of inquiring about was arrived from the querying node cycle: the querying node counter of this node correspondence restarts counting.
4. the method for node is characterized in that in the inquiry system according to claim 3,
Under the situation that is provided with system queries duration and querying node duration, when the querying node duration that each node is provided with was identical, the product of the interstitial content that the system queries duration of described setting and system's maximum can be inquired about was less than or equal to the querying node duration;
Under the situation that is provided with system queries value and querying node value, when to the querying node value of each node setting when identical, the product of the interstitial content that the system queries value of described setting and system's maximum can be inquired about is less than or equal to the querying node value.
5. the method for node is characterized in that in the inquiry system according to claim 3, and this method further comprises:
Be provided with for each node under the situation of querying node timer and querying node duration, the querying node timer initial value of newly added node is set to the querying node duration of this node;
Be provided with for each node under the situation of querying node counter and querying node value, the querying node counter initial value of newly added node is set to the querying node value of this node.
6. the method for node in the inquiry system according to claim 1, it is characterized in that, the described node that arrives when the querying node cycle exists when a plurality of, one of them node inquired about be: when having the node that a plurality of querying node cycle arrives, the node of record is at first inquired about.
7. according to the method for node in claim 1, the 2 or 3 described inquiry systems, it is characterized in that this method further comprises: for each node is provided with priority;
The described node that arrives when the querying node cycle exists when a plurality of, one of them node is inquired about be: when having the node that a plurality of querying node cycle arrives, the node that its medium priority is the highest is inquired about.
8. the device of node in the inquiry system is characterized in that this device comprises: system processing unit and node processing unit;
When described system processing unit arrived in the system queries cycle that is provided with, to the polling cycle arrival of node processing unit indication mechanism;
The node that the querying node cycle arrives is determined in described node processing unit after the indication of receiving the arrival of described system queries cycle; When only there is one in the node that arrives when the querying node cycle, this node is inquired about, and this node of inquiring about is deleted from the nodes records of querying node cycle arrival; The node that arrives when the querying node cycle exists when a plurality of, and one of them node is inquired about, and deletes the nodes records that this node of inquiring about was arrived from the querying node cycle.
9. the device of node is characterized in that in the inquiry system according to claim 8,
Described system processing unit comprises system control unit and system queries timer; Wherein, described system queries timer carries out timing, when the system queries timer arrives the system queries duration that is provided with, notifies described system control unit, and picks up counting again; After described system control unit is received the notice of described system queries timer, to the polling cycle arrival of node processing unit indication mechanism;
Perhaps,
Described system processing unit comprises system control unit and system queries counter; Wherein, described system queries counter is counted, and when the system queries counter arrives the system queries value that is provided with, notifies described system control unit, and restarts counting; After described system control unit is received the notice of described system queries counter, to the polling cycle arrival of node processing unit indication mechanism.
10. the device of node according to Claim 8 or in the 9 described inquiry systems is characterized in that,
The querying node timer that described node processing unit comprises the node control unit and is provided with for each node; Described querying node timer carries out timing, when arriving the querying node duration, notifies described node control unit; Receive restarting when indicating of described node control unit transmission, restart timing; The notice that described node control unit receiving node inquiry timer sends, record querying node timer arrives the node of querying node duration, when receiving the indication that described system processing unit sends, when only having a nodes records, this node is inquired about, when having a plurality of nodes records, one of them node is inquired about; After this node is inquired about, from record, delete this node, and restart indication to the querying node timer transmission of this node correspondence;
Perhaps,
The querying node counter that described node processing unit comprises the node control unit and is provided with for each node; Described querying node counter is counted, and when arriving the querying node value, notifies described node control unit; Receive restarting when indicating of described node control unit transmission, restart counting; The notice that described node control unit receiving node query counts device sends, record querying node counter arrives the node of querying node value, when receiving the indication that described system processing unit sends, when only having a nodes records, this node is inquired about, when having a plurality of nodes records, one of them node is inquired about; After this node is inquired about, from record, delete this node, and restart indication to the querying node counter transmission of this node correspondence.
CN2007101774353A 2007-11-15 2007-11-15 A node query method and device in system Active CN101150461B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007101774353A CN101150461B (en) 2007-11-15 2007-11-15 A node query method and device in system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007101774353A CN101150461B (en) 2007-11-15 2007-11-15 A node query method and device in system

Publications (2)

Publication Number Publication Date
CN101150461A CN101150461A (en) 2008-03-26
CN101150461B true CN101150461B (en) 2010-06-02

Family

ID=39250813

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007101774353A Active CN101150461B (en) 2007-11-15 2007-11-15 A node query method and device in system

Country Status (1)

Country Link
CN (1) CN101150461B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1237065A (en) * 1998-04-30 1999-12-01 温克通讯公司 Response capacity management in interactive broadcast systems
CN1433196A (en) * 2002-01-18 2003-07-30 富士通株式会社 Polling communication system and polling control method
CN1553598A (en) * 2003-05-29 2004-12-08 华为技术有限公司 Detecting method and detector for single-board fault
CN1859184A (en) * 2005-12-30 2006-11-08 华为技术有限公司 Method for increasing communication link layer protocol efficiency
CN101051988A (en) * 2007-05-22 2007-10-10 杭州华三通信技术有限公司 Method and device for dispatching permanent virtual path

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1237065A (en) * 1998-04-30 1999-12-01 温克通讯公司 Response capacity management in interactive broadcast systems
CN1433196A (en) * 2002-01-18 2003-07-30 富士通株式会社 Polling communication system and polling control method
CN1553598A (en) * 2003-05-29 2004-12-08 华为技术有限公司 Detecting method and detector for single-board fault
CN1859184A (en) * 2005-12-30 2006-11-08 华为技术有限公司 Method for increasing communication link layer protocol efficiency
CN101051988A (en) * 2007-05-22 2007-10-10 杭州华三通信技术有限公司 Method and device for dispatching permanent virtual path

Also Published As

Publication number Publication date
CN101150461A (en) 2008-03-26

Similar Documents

Publication Publication Date Title
US20050108385A1 (en) Method and system for managing a discovery-related process in a network
US20040252638A1 (en) Method and apparatus for managing flow control in a data processing system
EP2864883A2 (en) Querying for business service processing status information
CN111970339B (en) Request control method and device and electronic equipment
CN112416969B (en) Parallel task scheduling system in distributed database
WO2020238989A1 (en) Method and apparatus for scheduling task processing entity
CN105939345A (en) Management method and device of protocol table item timer
CN107436904B (en) Data acquisition method, data acquisition device, and computer-readable storage medium
CN101150461B (en) A node query method and device in system
US8909666B2 (en) Data query system and constructing method thereof and corresponding data query method
WO2007059667A1 (en) A method for obtaining the network element alarm data
CN108712494A (en) Handle the method, apparatus and equipment of asynchronous message
CN110413398B (en) Task scheduling method and device, computer equipment and storage medium
EP1929706A1 (en) Device management system using log management object and method for generating and controlling logging data therein
US20020010732A1 (en) Parallel processes run scheduling method and device and computer readable medium having a parallel processes run scheduling program recorded thereon
CN100589417C (en) System and method for processing a large number reporting message on topology interface in telecommunication network management system
CN104639379A (en) Proxy testing method and device
WO2016090938A1 (en) Data communication method and apparatus, and computer storage medium
KR101968575B1 (en) Method for automatic real-time analysis for bottleneck and apparatus for using the same
CN102123067A (en) Digital subscriber line (DSL) local terminal equipment and energy saving method thereof
CN115118615A (en) Network monitoring data processing method and device
CN108924013B (en) Network flow accurate acquisition method and device
US20030041115A1 (en) Managing memory resident queues to control resources of the systems using the queues
KR100274848B1 (en) Network management method for network management system
KR101725408B1 (en) Tasks scheduling method for realtime operating system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: Xinhua three Technology Co., Ltd.

Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base

Patentee before: Huasan Communication Technology Co., Ltd.