Summary of the invention
The technical problem to be solved in the present invention is that the above-mentioned defective at prior art provides a kind of supervisory system, and it can not rely on the basis of any agreement, carries out system configuration automatically.
The technical scheme that the present invention solves its technical matters employing is, a kind of supervisory system is provided, comprise: monitoring module and at least one monitored object, described supervisory system further comprises at least one collector of the data acquisition that is used for described at least one monitored object;
Described monitoring module enters automatic configuration operation pattern, implements configuration data renewal logical process based on setting trigger condition, and the duty attribute of described collector and monitored object is set.
In supervisory system of the present invention, described monitoring module comprise be used to carry out that the collector that described configuration data upgrades logical process is provided with unit, collector reset unit, increases progressively the unit, data processing unit, decrement unit and detection reset unit;
Wherein, described collector is provided with the unit and is used to described collector that collector configuration data updating mark is set;
Described collector reset unit is used for monitored object being carried out the described collector configuration data updating mark that resets after data acquisition is finished at described collector;
Before the described described collector configuration data updating mark that increases progressively that the unit is used for after described collector carries out data acquisition to monitored object, described collector reset unit resets, the configuration data that increases progressively the described monitored object of being gathered upgrades reference count;
The data that described data processing unit is used for described collector is collected are carried out data processing;
Described decrement unit be used for successively decreasing after finishing when the described data processing configuration data of the described monitored object of being gathered upgrades reference count;
Described detection reset unit is used for finishing described configuration data after the configuration data renewal reference count that detects described collector configuration data updating mark and described monitored object resets and upgrades logical process.
In supervisory system of the present invention, the automatic triggering of described collector comprises:
Interrupted by the hardware trigger that is arranged on the communication interface place between collector and the described monitoring module, described monitoring module receives described interruption and enters described automatic configuration operation pattern; Or
When the monitored object configuration information in being stored in described collector changed, described collector sent signal from the described monitoring module of trend, and described monitoring module is caught described signal and entered described automatic configuration operation pattern.
In supervisory system of the present invention, described monitoring module is provided with the duty attribute of described collector based on the communications status of described collector.
In supervisory system of the present invention, described monitoring module is based on the communications status of described collector and/or be stored in the duty attribute that monitored object configuration information in the described collector is provided with described monitored object.
In supervisory system of the present invention, when the duty attribute of described collector or described monitored object was off working state, described monitoring module assert that described collector or described monitored object do not exist and mark.
The present invention solves another technical scheme that its technical matters adopts, and constructs a kind of collocation method of supervisory system, comprising:
S1, trigger monitoring module and enter automatic configuration operation pattern based on setting trigger condition;
S2, described monitoring module are implemented configuration data and are upgraded logical process, and the duty attribute of collector and monitored object is set.
In the collocation method of supervisory system of the present invention, described configuration data upgrades logical process and comprises:
For described collector is provided with collector configuration data updating mark, described collector carries out data acquisition to monitored object;
The configuration data that increases progressively the described monitored object of being gathered upgrades reference count;
Described collector configuration data updating mark resets after described data acquisition is finished;
The described data that collect are carried out data processing, and after described data processing was finished, the successively decrease configuration data of the described monitored object of being gathered of described monitoring module upgraded reference count;
The configuration data that detects described collector configuration data updating mark and described monitored object upgrades and finishes described configuration data renewal logical process after reference count resets.
In the collocation method of supervisory system of the present invention, in described step S2, described monitoring module is provided with the duty attribute of described collector based on the communications status of described collector; And/or
Described monitoring module is based on the communications status of described collector and/or be stored in the duty attribute that monitored object configuration information in the described collector is provided with described monitored object.
Implement supervisory system of the present invention and collocation method thereof, have following beneficial effect:
Enter automatic configuration operation pattern by triggering monitoring module, make it be configured the Data Update logical process and collector is set and the duty attribute of monitored object, make supervisory system not relying on the basis of any agreement, carry out system configuration automatically.
Further, the invention provides the multiple triggering condition of configuration automatically, can be applicable to system's beginning, the dynamic change (as some hot-plug equipment) of device configuration information when follow-up upgrade expanding and operation realizes configuration automatically.In addition, based on processing logic, provide a kind of general framework to communication state, both be applicable to the agreement of sending on the support configuration information, also be applicable to the simple protocol that no configuration information transmits, and layoutprocedure realization robotization, the engineering staff need not to understand the system configuration CONSTRUCTED SPECIFICATION.
Embodiment
As shown in Figure 1, in supervisory system of the present invention, comprise monitoring module 100 (be generally, also can have a plurality of), a plurality of collector 300 and a plurality of monitored object 200.Collector 300 can be used to realize signals collecting and/or the control to monitored object 200, and it is communicated by letter with monitoring module 100 by communication port.In a preferred embodiment of the invention, monitoring module 100 and collector 300 can be one physically, and just monitoring module 100 has data acquisition function concurrently.At this moment, the data acquisition function of monitoring module can virtually be a virtual collector, and collector 300 also can be virtual collector, communicates by letter with monitoring module 100 by virtual communication port.Monitored object 200 can be intelligent power equipment, intelligence instrument, the industrial control equipment that can communicate by letter with collector 300, USP (uninterrupted power source), also can be as other devices or equipment such as battery, direct supplys, also can be some signals, as electric current, voltage or the like.In other embodiments of the invention, for some smart machine, itself have the data acquisition reporting functions concurrently, physically collector and monitored object also are one at this moment.
Communication interface between monitoring module 100 and the collector 300 can adopt the standard network communication interface, also can adopt other as serial communication interface or the like, for example can adopt serial ports, network interface or USB mouth or the like.Described monitoring module 100 enters automatic configuration operation pattern, implements configuration data renewal logical process based on setting trigger condition, and the duty attribute of described collector 300 and monitored object 200 is set.
Fig. 2 is the logic diagram of second embodiment of supervisory system of the present invention.Based on Fig. 2 the layoutprocedure of supervisory system of the present invention is described in detail below.At first, be collector 300 and monitored object 200 interpolation duty attributes.Then, trigger monitoring module 100 and enter automatic configuration operation pattern, implement configuration data and upgrade logical process, and the duty attribute of described collector 300 and monitored object 200 is set based on setting trigger condition.
According to the difference of the scope of affected collector and monitored object, the configure trigger condition is divided into three levels automatically: the electricity of described monitoring module 100 starts and triggers, and the user triggers or the automatic triggering of described collector 300.Electricity for monitoring module 100 starts, and it can influence whole collectors and the monitored object of being controlled by this monitoring module.And trigger for the user, it can influence selected collector of user and monitored object.And, obviously can only influence the collector of automatic triggering and the monitored object of its correspondence for the automatic triggering of collector.The automatic triggering of wherein said collector 300 comprises two kinds of situations.When the communication interface place between collector 300 and the described monitoring module 100 be provided with interrupt hardware the time, trigger by this interrupt hardware and to interrupt, described monitoring module 100 receives described interruptions and also enters described automatic configuration operation pattern.Certainly, this interrupt hardware also can be arranged on other positions, and those skilled in the art can be according to the time and the frequency of actual needs control interruption generation.When collector 300 has built-in agreement to support, in the time of can changing by the monitored object configuration information of this agreement control in being stored in described collector 300, described collector 300 sends signal from the described monitoring module 100 of trend, and described monitoring module 100 is caught described signal and entered described automatic configuration operation pattern.This signal can be a message.
In the present invention, described monitoring module 100 comprises that collector is provided with unit 101, collector reset unit 102, increases progressively unit 103, data processing unit 104, decrement unit 105 and detect reset unit 106, upgrades logical process to be used to carrying out described configuration data.Described configuration data upgrades logical process and comprises data acquisition, processing and end step.This data acquisition step and data processing step can be carried out simultaneously, also can successively carry out.
Wherein, this data acquisition step is that described collector is provided with unit 101 and for described collector 300 collector configuration data updating mark is set; 300 pairs of monitored objects 200 of described collector carry out data acquisition; Described collector reset unit 102 carries out the described collector configuration data updating mark that resets after data acquisition is finished at 300 pairs of monitored objects 200 of described collector.
This data processing step be described increase progressively unit 103 after 300 pairs of monitored objects 200 of described collector carry out data acquisition, described collector reset unit 102 resets before the described collector configuration data updating mark, the configuration data that increases progressively the described monitored object of being gathered 200 upgrades reference count.The data that 104 pairs of described collectors 300 of described subsequently data processing unit collect are carried out data processing.Successively decrease after finishing when the described data processing configuration data of the described monitored object of being gathered 200 of described decrement unit 105 upgrades reference count.
Described end step is that described detection reset unit 106 finishes described configuration data renewal logical process after the configuration data renewal reference count that detects described collector configuration data updating mark and described monitored object resets.
In the present invention, described monitoring module 100 is provided with the duty attribute of described collector 300 based on the communications status of described collector 300.That is to say that collector 300 communications just often its duty attribute are set to duty; Its duty attribute is set to off working state during communication failure.
When collector 300 is supported automatic configuration feature, it can store monitored object configuration information, and determine the configuration information of relevant monitored object by special packet or signal, and send this configuration information to monitoring module 100, dispose the duty of monitored object for its communications status based on this configuration information and collector 300.When the communication disruption of collector 300, the monitored object of setting its correspondence is an off working state, when the communication of collector 300 just often, then set the duty attribute of monitored object based on this configuration information.
When collector 300 was supported automatically configuration feature, described monitoring module 100 was provided with the duty attribute of described monitored object 200 based on the communications status of described collector 300.When the communication disruption of collector 300, the monitored object of setting its correspondence is an off working state, when the communication of collector 300 just often, the monitored object of setting its correspondence is a duty.
In the present invention, when the duty attribute of described collector 300 or described monitored object 200 was off working state, described monitoring module 100 described collectors 300 of identification or described monitored object 200 did not exist and are marked in the configuration file.
Implement supervisory system of the present invention, can enter automatic configuration operation pattern by triggering monitoring module, make it be configured the Data Update logical process and collector is set and the duty attribute of monitored object, make supervisory system not relying on the basis of any agreement, carry out system configuration automatically.Further, supervisory system of the present invention provides the multiple triggering condition of configuration automatically, can be applicable to system's beginning, and the dynamic change (as some hot-plug equipment) of device configuration information when follow-up upgrade expanding and operation realizes configuration automatically.In addition, based on processing logic, provide a kind of general framework to communication state, both be applicable to the agreement of sending on the support configuration information, also be applicable to the simple protocol that no configuration information transmits, and layoutprocedure realization robotization, the engineering staff need not to understand the system configuration CONSTRUCTED SPECIFICATION.
Fig. 3 is the process flow diagram of first embodiment of the collocation method of supervisory system of the present invention.As shown in Figure 3, the collocation method of supervisory system of the present invention is based on supervisory system shown in Fig. 1, and it specifically comprises:
S1, trigger monitoring module 100 and enter automatic configuration operation pattern based on setting trigger condition;
S2, described monitoring module 100 are implemented configuration data and are upgraded logical process, and the duty attribute of collector 300 and monitored object 200 is set.
Wherein, in certain embodiments, collector 300 and monitored object 200 carry the duty attribute.In certain embodiments, need be collector 300 and monitored object 200 interpolation duty attributes.In further embodiments, when storing this duty attribute in the monitoring module 100, also need this duty attribute is safeguarded.
According to the difference of the scope of affected collector and monitored object, the configure trigger condition is divided into three levels automatically: the electricity of described monitoring module 100 starts and triggers, and the user triggers or the automatic triggering of described collector 300.Electricity for monitoring module 100 starts, and it can influence whole collectors and the monitored object of being controlled by this monitoring module.And trigger for the user, it can influence selected collector of user and monitored object.And, obviously can only influence the collector of automatic triggering and the monitored object of its correspondence for the automatic triggering of collector.The automatic triggering of wherein said collector 300 comprises two kinds of situations.When the communication interface place between collector 300 and the described monitoring module 100 be provided with interrupt hardware the time, trigger by this interrupt hardware and to interrupt, described monitoring module 100 receives described interruptions and also enters described automatic configuration operation pattern.Certainly, this interrupt hardware also can be arranged on other positions, and those skilled in the art can be according to the time and the frequency of actual needs control interruption generation.When collector 300 has built-in agreement to support, in the time of can changing by the monitored object configuration information of this agreement control in being stored in described collector 300, described collector 300 sends signal from the described monitoring module 100 of trend, and described monitoring module 100 is caught described signal and entered described automatic configuration operation pattern.This signal can be a message.
Each step of duty attribute that described configuration data upgrades logical process, collector 300 and monitored object 200 can be realized based on each module of the supervisory system shown in Fig. 2, has stated with regard to no longer tiring out at this.
Fig. 4 is the process flow diagram of second embodiment of the collocation method of supervisory system of the present invention.As shown in Figure 4, in step S21,, trigger monitoring module 100 and enter automatic configuration operation pattern based on setting trigger condition.In certain embodiments, collector 300 and monitored object 200 carry the duty attribute.In certain embodiments, need be collector 300 and monitored object 200 interpolation duty attributes.In further embodiments, when storing this duty attribute in the monitoring module 100, also need this duty attribute is safeguarded.According to the difference of the scope of affected collector and monitored object, the configure trigger condition is divided into three levels automatically: the electricity of described monitoring module 100 starts and triggers, and the user triggers or the automatic triggering of described collector 300.Electricity for monitoring module 100 starts, and it can influence whole collectors and the monitored object of being controlled by this monitoring module.And trigger for the user, it can influence selected collector of user and monitored object.And, obviously can only influence the collector of automatic triggering and the monitored object of its correspondence for the automatic triggering of collector.The automatic triggering of wherein said collector 300 comprises two kinds of situations.When the communication interface place between collector 300 and the described monitoring module 100 be provided with interrupt hardware the time, trigger by this interrupt hardware and to interrupt, described monitoring module 100 receives described interruptions and also enters described automatic configuration operation pattern.Certainly, this interrupt hardware also can be arranged on other positions, and those skilled in the art can be according to the time and the frequency of actual needs control interruption generation.When collector 300 has built-in agreement to support, in the time of can changing by the monitored object configuration information of this agreement control in being stored in described collector 300, described collector 300 sends signal from the described monitoring module 100 of trend, and described monitoring module 100 is caught described signal and entered described automatic configuration operation pattern.This signal can be a message.
In step S22, described monitoring module 100 is provided with collector configuration data updating mark for described collector 300.When collector configuration data updating mark is set or after setting finished, 300 pairs of monitored objects 200 of described collector carried out data acquisition.
In step S23, the configuration data that described monitoring module 100 increases progressively the described monitored object of being gathered 200 upgrades reference count.
In step S24, described collector configuration data updating mark resets after described data acquisition is finished.
In step S25,100 pairs of described data that collect of monitoring module are carried out data processing.
In step S26, after the data processing among the described determination step S25 was finished, the configuration data of the described monitored object of being gathered 200 that successively decreases upgraded reference count.
In step S27, described monitoring module 100 judges that the configuration data of described collector configuration data updating mark and described monitored object upgrades reference count and whether resets.If, illustrating that then configuration data upgrades logical process and finishes, method of the present invention enters step S28.Otherwise, illustrating that configuration data upgrades logical process and also do not finish, method of the present invention is returned step S22, and the configuration data of circulation execution in step S22-S27 upgrades logical process.
In step S28, the duty attribute of collector 300 and monitored object 200 is set.
In the present invention, described monitoring module 100 is provided with the duty attribute of described collector 300 based on the communications status of described collector 300.That is to say that collector 300 communications just often its duty attribute are set to duty; Its duty attribute is set to off working state during communication failure.
When collector 300 is supported automatic configuration feature, it can store monitored object configuration information, and determine the configuration information of relevant monitored object by special packet or signal, and send this configuration information to monitoring module 100, dispose the duty of monitored object for its communications status based on this configuration information and collector 300.When the communication disruption of collector 300, the monitored object of setting its correspondence is an off working state, when the communication of collector 300 just often, then set the duty attribute of monitored object based on this configuration information.
When collector 300 was supported automatically configuration feature, described monitoring module 100 was provided with the duty attribute of described monitored object 200 based on the communications status of described collector 300.When the communication disruption of collector 300, the monitored object of setting its correspondence is an off working state, when the communication of collector 300 just often, the monitored object of setting its correspondence is a duty.
In the embodiments of the invention shown in Fig. 4, the duty attribute setting of described collector 300 is carried out at step S28, just carries out after the configuration data renewal logical process of step S22-S27 is finished.But in other preferred embodiments of the present invention, can before step S27 carries out or in execution in step S27, the duty attribute of described collector 300 be set.
In yet another embodiment of the present invention, when the duty attribute of described collector 300 or described monitored object 200 was off working state, described monitoring module 100 described collectors 300 of identification or described monitored object 200 did not exist and are marked in the configuration file.
In another embodiment of the present invention, after automatic configuration operation pattern begins/finishes, all should notify application layer.In a preferred embodiment of the invention, preferably pass through man-machine interface display notification user, and switch to normal mode of operation by user's operation.In another preferred embodiment of the present invention, also can be directly switch to normal mode of operation by application layer.
Implement the present invention, enter automatic configuration operation pattern by triggering monitoring module, make it implement configuration data and upgrade logical process and collector is set and the duty attribute of monitored object, make supervisory system not relying on the basis of any agreement, carry out system configuration automatically.
Further, the invention provides the multiple triggering condition of configuration automatically, can be applicable to system's beginning, the dynamic change (as some hot-plug equipment) of device configuration information when follow-up upgrade expanding and operation realizes configuration automatically.In addition, based on processing logic, provide a kind of general framework to communication state, both be applicable to the agreement of sending on the support configuration information, also be applicable to the simple protocol that no configuration information transmits, and layoutprocedure realization robotization, the engineering staff need not to understand the system configuration CONSTRUCTED SPECIFICATION.
Though the present invention describes by specific embodiment, it will be appreciated by those skilled in the art that, without departing from the present invention, can also carry out various conversion and be equal to alternative the present invention.Therefore, the present invention is not limited to disclosed specific embodiment, and should comprise the whole embodiments that fall in the claim scope of the present invention.