Summary of the invention
In view of this, the present invention provides the acquisition methods of a kind of installment state and device cannot expire in prior art solving
The problem of installment state inquiry during foot batch installation system.
Specifically, the present invention is achieved through the following technical solutions:
The present invention provides the acquisition methods of a kind of installment state, described method to be applied to install management equipment, described method
Including:
The installation interface sectional drawing that mounted equipment is current is obtained in current period;
Calculate the image parameters that interior this installation interface sectional drawing obtained of current period is corresponding;
The figure that relatively described image parameters is corresponding with the installation interface sectional drawing of this mounted equipment that a upper cycle obtains
Sheet parameter is the most identical;
If it is identical, it is determined that the installment state of described mounted equipment is abnormal;
If it is different, then by picture ginseng corresponding for the installation interface sectional drawing of the described mounted equipment obtained in the upper cycle
Number is updated to the image parameters that the interior installation interface sectional drawing obtained of current period is corresponding.
Further, described acquisition is mounted the installation interface sectional drawing that equipment is current, specifically includes:
Transmission sectional drawing order is to mounted equipment, so that mounted equipment will be currently installed on interface according to described sectional drawing order
Sectional drawing stores to set path;
Described set path is gone to obtain the installation interface sectional drawing that mounted equipment is current.
Further, before the installment state determining mounted equipment is abnormal, described method also includes:
Frequency of abnormity corresponding for the installment state of mounted equipment is arranged threshold value;
Whether the frequency of abnormity that the installment state of the mounted equipment of judgement is corresponding reaches this threshold value,
If it is, determine that the installment state of this mounted equipment is for abnormal.
Further, before the installment state determining mounted equipment is abnormal, described method also includes:
Relatively described image parameters is the most identical with the image parameters installing resting state figure corresponding prestored, if identical,
The installment state then showing this mounted equipment is normal, if it is different, then show that the installment state of this mounted equipment is for abnormal.
Further, after the installment state determining current mounted equipment is extremely, described method also includes:
Extract the Word message in this installation interface sectional drawing and show.
Based on identical design, the present invention also provides for the acquisition device of a kind of installment state, and described device is applied to install
Management equipment, described device includes:
Sectional drawing acquiring unit, for obtaining the installation interface sectional drawing that mounted equipment is current in current period;
Parameter calculation unit, the image parameters that this installation interface sectional drawing of acquisition is corresponding in calculating current period;
Parameter comparing unit, for the installation of this mounted equipment that relatively described image parameters and a upper cycle obtain
The image parameters that interface sectional drawing is corresponding is the most identical;
Status determining unit, installation circle of this mounted equipment for obtaining when described image parameters and a upper cycle
When image parameters that face sectional drawing is corresponding is identical, determine that the installment state of described mounted equipment is for abnormal;
Parameter updating block, installation circle of this mounted equipment for obtaining when described image parameters and a upper cycle
During image parameters difference corresponding to face sectional drawing, the installation interface sectional drawing pair of described mounted equipment that will obtain in the upper cycle
The image parameters answered is updated to the image parameters that the interior installation interface sectional drawing obtained of current period is corresponding.
Further, described sectional drawing acquiring unit, specifically for transmission sectional drawing order to mounted equipment, so that mounted
Equipment will be currently installed on interface sectional drawing according to described sectional drawing order and store to set path;Described set path is gone to obtain mounted
The installation interface sectional drawing that equipment is current.
Further, before the installment state determining mounted equipment is abnormal, described status determining unit, it is additionally operable to
Frequency of abnormity corresponding for the installment state of mounted equipment is arranged threshold value;Judge corresponding different of the installment state of mounted equipment
Often whether number of times reaches this threshold value, if it is, determine that the installment state of this mounted equipment is for abnormal.
Further, before the installment state determining mounted equipment is abnormal, described status determining unit, it is additionally operable to
Relatively described image parameters is the most identical with the image parameters installing resting state figure corresponding prestored, if identical, then display should
The installment state of mounted equipment is normal, if it is different, then show that the installment state of this mounted equipment is for abnormal.
Further, after the installment state determining current mounted equipment is extremely, described device also includes:
Information display unit, for extracting the Word message in this installation interface sectional drawing and showing.
As can be seen here, the present invention can make installation management equipment obtain the installation that mounted equipment is current in current period
Interface sectional drawing also calculates the image parameters that this installation interface sectional drawing is corresponding, is then obtained in this image parameters and a upper cycle
The image parameters that the installation interface sectional drawing of this mounted equipment is corresponding compares, if identical, it is determined that described mounted equipment
Installment state be abnormal;If it is different, then by the installation interface sectional drawing pair of the described mounted equipment of acquisition in the upper cycle
The image parameters answered is updated to the image parameters that the interior installation interface sectional drawing obtained of current period is corresponding.Therefore, the present invention is permissible
Installment state batch query and the management of mounted equipment is realized when batch installation system.
Detailed description of the invention
In order to solve the problem that prior art exists, the present invention provides acquisition methods and the device of a kind of installment state, can
In current period, obtain the current installation interface sectional drawing of mounted equipment so that installing management equipment and calculate this installation interface
The image parameters that sectional drawing is corresponding, the installation interface of this mounted equipment then obtained in this image parameters and a upper cycle cuts
The image parameters that figure is corresponding compares, if identical, it is determined that the installment state of described mounted equipment is abnormal;If it is different,
Then image parameters corresponding for the installation interface sectional drawing of the described mounted equipment obtained in the upper cycle is updated to current week
The image parameters that in phase, the installation interface sectional drawing of acquisition is corresponding.Therefore, the present invention can realize when batch installation system being pacified
Install standby installment state batch query and management.
Refer to Fig. 1, be the process of the acquisition methods of a kind of installment state in a kind of illustrative embodiments of the present invention
Flow chart, described method includes:
Step 101, the installation interface sectional drawing that the mounted equipment of acquisition is current in current period;
In the present embodiment, KVM is passed through to long-range mounted equipment batch carry mirror image installation system when the equipment of installation
Time, installment state management can be carried out by installing management equipment, this installation management equipment can be KVM client or server
The equipment at place.When carry mirror-image system, this installation management equipment can obtain the peace of mounted equipment according to predetermined period
Dress interface sectional drawing.Specifically, as a example by current period, described installation management equipment to obtain mounted setting in current period
During standby current installation interface sectional drawing, sectional drawing order can be sent to mounted equipment, so that mounted equipment is according to described section
Figure order will be currently installed on interface sectional drawing and store to set path.Further, management equipment is installed can sectional drawing order be sent out
Give the BMC (Baseboard Management Controller, baseboard management controller) of mounted equipment, so that BMC pair
The interface of current mounted equipment carries out sectional drawing, thus obtains the installation interface sectional drawing of this mounted equipment current period, and will
This installation interface sectional drawing is saved in and the set path in the mounted equipment of this installation management equipment agreement, in order to this installation pipe
Reason equipment obtains, at this set path, the installation interface sectional drawing that this BMC preserves.Afterwards, management equipment is installed and can go described setting
Path obtains the installation interface sectional drawing that mounted equipment is current.
The image parameters that in step 102, calculating current period, this installation interface sectional drawing of acquisition is corresponding;
In the present embodiment, when described installation management equipment, to get mounted equipment in described mounted equipment current
Installation interface sectional drawing after, this picture ginseng corresponding to installation interface sectional drawing obtained in current period can be calculated further
Number, wherein said image parameters has uniqueness, and this image parameters can be hash value and two influent streams etc. of picture.
The installation interface sectional drawing of this mounted equipment that step 103, relatively described image parameters and a upper cycle obtain
Corresponding image parameters is the most identical;The most then go to step 104;If it is not, then go to step 105;
Step 104, determine that the installment state of described mounted equipment is for abnormal;
Step 105, by picture ginseng corresponding for the installation interface sectional drawing of described mounted equipment that obtained in the upper cycle
Number is updated to the image parameters that the interior installation interface sectional drawing obtained of current period is corresponding.
In the present embodiment, the picture that management equipment can be corresponding by comparing the installation interface sectional drawing of current period is installed
The image parameters that parameter is corresponding with the installation interface sectional drawing that a upper cycle obtains, determines the state of being currently installed on.Specifically,
When comparative result is identical, then can illustrate that this installation interface is not changed in current time period, it can be considered that
The installment state of this mounted equipment is abnormal.When comparative result is different, then can illustrate should in current time period
Installation interface changes, it can be considered that the installment state of this mounted equipment is normal, such that it is able to continue monitoring, so
Image parameters corresponding for the installation interface sectional drawing of the described mounted equipment obtained in the upper cycle can be updated to currently
The image parameters that in cycle, the installation interface sectional drawing of acquisition is corresponding, thus carry out the comparison in next cycle.
It addition, in optional embodiment of the present invention, the monitoring method of above-mentioned installment state can also is that according to KVM's
Request of data is monitored, when KVM obtains less than the request of data of mounted equipment, and BMC installation to mounted equipment again
Interface carries out screenshotss, goes to step 101, and after screenshotss, the image parameters in former and later two cycles is identical, then goes to step 104 and determines
The installment state of described mounted equipment is abnormal, thus triggers and report an error, for the monitoring of request of data can reduce screenshotss and
Comparison procedure, improves work efficiency.
In optional embodiment of the present invention, installing management equipment in the installment state determining mounted equipment is exception
Before, it is also possible to further frequency of abnormity corresponding for the installment state of mounted equipment is arranged threshold value, and sentence in current period
Whether the frequency of abnormity that the installment state of disconnected mounted equipment is corresponding reaches this threshold value, if it is, determine this mounted equipment
Installment state be abnormal.For example, when install management equipment in current period relatively described image parameters with on one
When image parameters corresponding to installation interface sectional drawing that cycle obtains is identical, the frequency of abnormity of the installment state of this mounted equipment adds
1, but do not determine in this cycle that the installment state of this mounted equipment is for abnormal;If during next cycle, this installation management equipment
When image parameters that relatively described image parameters is corresponding with the installation interface sectional drawing that a upper cycle obtains is identical, then this is mounted
The frequency of abnormity of the installment state of equipment adds 1 again, but does not determines in this cycle that the installment state of this mounted equipment is for abnormal;Directly
Frequency of abnormity to this mounted equipment reaches during this threshold value (such as 3 times), then it is assumed that the installment state of this mounted equipment is
Abnormal.In the present embodiment, it is also possible to the counting of this frequency of abnormity is carried out time control, when exceeding Preset Time, this counting
Can reset.Therefore, the present invention can reduce the error in judgement of installment state, thus improves the accuracy rate of installment state management.
In the preferred embodiment of the invention, described installation management equipment can be a certain by resting on for a long time in advance
The interface sectional drawing of installation interface is as installation resting state figure corresponding to this installation system, and it is corresponding to calculate installation resting state figure
Image parameters.Image parameters corresponding to the installation interface sectional drawing that compares current period when described installation management equipment with upper one
Image parameters phase corresponding to installation interface sectional drawing that cycle obtains is at the same time it can also be determine whether the installation interface of current period
The image parameters that sectional drawing is corresponding is the most identical with the image parameters installing resting state figure corresponding prestored, if identical, it is determined that
The installment state of this mounted equipment is normal, if it is different, then determine that the installment state of this mounted equipment is for abnormal.
Therefore the present invention produces in the case of can solving to rest on a certain installation interface in normal installation procedure for a long time
Raw state erroneous judgement problem, such that it is able to improve the accuracy rate that installment state judges further.
It should be noted that the present invention can determine current period with on the installation interface sectional drawing in a cycle identical time,
By the way of threshold value being set, resting state figure and combinations thereof is installed, judge that installment state is abnormal, wherein to whether reaching further
To threshold value and install resting state Rule of judgment judgement order the most without limitation.For example, user can first judge exception
Whether number of times reaches threshold value, if reaching threshold value, is then abnormal;Or, first judge exception, after exception, frequency of abnormity added 1 every time,
When frequency of abnormity reaches threshold value, then compare with the installation resting state figure deposited, if comparative result is different, be then abnormal;Or
Person, compares the installation interface sectional drawing of current period with the installation resting state figure deposited, if it is different, be then abnormal;Or, first
Compare with the installation resting state figure deposited, if it is different, then frequency of abnormity adds 1, sectional drawing the most again, judging before and after's periodogram
When sheet parameter is identical, frequency of abnormity adds 1 again, repeats above-mentioned sectional drawing again, it is judged that the mistake that front and back cycle image parameters is the most identical
Journey, during until frequency of abnormity reaches threshold value, is defined as exception;Or, first compare, if not with the installation resting state figure deposited
With, then frequency of abnormity adds 1, the most again sectional drawing, when judging that before and after's cycle image parameters is identical, then stops with the installation deposited
State diagram is compared, if it is different, frequency of abnormity adds 1 again, repeats above-mentioned sectional drawing again, it is judged that when front and back cycle image parameters is identical, then
The process compared with the installation resting state figure deposited, during until frequency of abnormity reaches threshold value, is defined as exception.User can root
According to being actually needed the suitable determination methods of selection, such that it is able to make installation management have more specific aim.
In optional embodiment of the present invention, determine that the current installment state being mounted equipment is different when installing management equipment
Chang Hou, can obtain the Word message in this sectional drawing by the character recognition technology in picture and show, so that user
The installation detailed status of mounted equipment can be monitored.
As can be seen here, the present invention can make installation management equipment obtain the installation that mounted equipment is current in current period
Interface sectional drawing also calculates the image parameters that this installation interface sectional drawing is corresponding, is then obtained in this image parameters and a upper cycle
The image parameters that the installation interface sectional drawing of this mounted equipment is corresponding compares, if identical, it is determined that described mounted equipment
Installment state be abnormal;If it is different, then by the installation interface sectional drawing pair of the described mounted equipment of acquisition in the upper cycle
The image parameters answered is updated to the image parameters that the interior installation interface sectional drawing obtained of current period is corresponding.Therefore, the present invention is permissible
Installment state batch query and the management of mounted equipment is realized when batch installation system.
For making the purpose of the present invention, technical scheme and advantage clearer, below the program of the present invention is made into one
Step ground describes in detail.
When user hangs over mirror image installation system based on KVM on multiple stage remote equipment, it is provided with and management software is installed
Management equipment is installed and can monitor the installment state of mounted equipment simultaneously.With a mounted equipment and installation management equipment
As a example by Jiao Hu: when system starts (being assumed to be the t0 moment) when carry is installed, and this installation management equipment is according to prefixed time interval (example
Such as 5 seconds) send after sectional drawing order receives sectional drawing order to the BMC, BMC of the equipment of being mounted the installation interface of mounted equipment is entered
Row screenshotss, obtain the sectional drawing A in t0 moment and are saved in by sectional drawing A and install the specified path that management equipment is made an appointment, this section
Figure can be JPG form.Then, management equipment is installed to arrive the specified path acquisition sectional drawing A of this BMC and calculate sectional drawing A's
Image parameters, illustrates as a example by this image parameters MD5 value in hash value in the present embodiment.After calculating completes, pipe is installed
Reason equipment can preserve the MD5 value of this section of A figure;When next time interval (being assumed to be the t1 moment), management equipment is installed also
Sectional drawing order can be sent to BMC, make BMC obtain the sectional drawing B in t1 moment and sectional drawing B is saved in this specified path, and cover t0
The sectional drawing A in moment.Then management equipment it is installed and can obtain the sectional drawing B in t1 moment, and calculate the MD5 value of sectional drawing B, then compare
The MD5 value of sectional drawing A and sectional drawing B, if the MD5 value of two images differs, then explanation installation is normally carried out, the most again by sectional drawing B
MD5 value as current MD5 value, compare with the MD5 value of the sectional drawing C in the t2 moment obtained next time, the like, until be
System installation;If the MD5 value of two images is identical, then it is assumed that install failure, then the sectional drawing B in the t1 moment got is led to
Cross pictograph identification technology and extract image context word information, using the Word message of acquisition as installment state information.Described peace
Dress status information can include the information such as device name, the IP address of equipment and installment state.User can be according to IP ground
Location and device name distinguish different mounted equipment, it is possible to realize monitoring multiple installation equipment simultaneously, improve and install effect
Rate.
Further, in the present embodiment, when the MD5 value of two images of t1 with t0 moment is identical, first uncertain installation
Failure, but MD5 value with the sectional drawing in t2 moment compares again, if MD5 value is the most identical, can suspect it is install failure.The most just
Being to say, if it is considered herein that installation sectional drawing is identical within a period of time, being install failure, this time span can be according to system
Depending on the actual demand installed.But in view of for normal installation procedure also can stop longer installation screen, therefore exist
Preferably in mode, installing management equipment can be carried out stopping longer installation screen in this system installation process in advance
Sectional drawing, and obtain its MD5 value and save, during actual installation, if install within a period of time sectional drawing identical, can be by
The MD5 value installing sectional drawing compares, if MD5 value is identical, then it is assumed that be with the MD5 value stopping longer sectional drawing prestored
Normal mounting, otherwise it is assumed that install abnormal.
Based on identical design, the present invention also provides for the acquisition device of a kind of installment state, and this device can pass through software
Realize, it is also possible to realize by the way of hardware or software and hardware combining.As a example by implemented in software, the installment state of the present invention
Acquisition device, as the device on a logical meaning, is that the CPU by its place device is by computer corresponding in memorizer
Programmed instruction runs after reading and forms.
Refer to Fig. 2 and Fig. 3, be the acquisition device of a kind of installment state in a kind of illustrative embodiments of the present invention
300, described device is applied to install management equipment, and the basic running environment of this device includes CPU, memorizer and other hardware,
From logic level, this device 300 includes:
Sectional drawing acquiring unit 301, for obtaining the installation interface sectional drawing that mounted equipment is current in current period;
Parameter calculation unit 302, the image parameters that this installation interface sectional drawing of acquisition is corresponding in calculating current period;
Parameter comparing unit 303, for comparing the described image parameters this mounted equipment with upper cycle acquisition
The image parameters that installation interface sectional drawing is corresponding is the most identical;
Status determining unit 304, the peace of this mounted equipment for obtaining when described image parameters and a upper cycle
When image parameters that dress interface sectional drawing is corresponding is identical, determine that the installment state of described mounted equipment is for abnormal;
Parameter updating block 305, the peace of this mounted equipment for obtaining when described image parameters and a upper cycle
During image parameters difference corresponding to dress interface sectional drawing, the installation interface of the described mounted equipment obtained in the upper cycle is cut
The image parameters that figure is corresponding is updated to the image parameters that the interior installation interface sectional drawing obtained of current period is corresponding.
Optionally, described sectional drawing acquiring unit 301, specifically for transmission sectional drawing order to mounted equipment, so that being pacified
Installing is standby will be currently installed on interface sectional drawing according to described sectional drawing order and store to set path;Go described set path to obtain to be pacified
The standby current installation interface sectional drawing of installing.
Optionally, before the installment state determining mounted equipment is abnormal, described status determining unit 304, also use
The frequency of abnormity corresponding in the installment state by mounted equipment arranges threshold value;Judge that the installment state of mounted equipment is corresponding
Whether frequency of abnormity reaches this threshold value, if it is, determine that the installment state of this mounted equipment is for abnormal.
Optionally, before the installment state determining mounted equipment is abnormal, described status determining unit 304, also use
The most identical with the image parameters installing resting state figure corresponding prestored in relatively described image parameters, if identical, then show
The installment state of this mounted equipment is normal, if it is different, then show that the installment state of this mounted equipment is for abnormal.
Optionally, after the installment state determining current mounted equipment is extremely, described device also includes:
Information display unit 306, for extracting the Word message in this installation interface sectional drawing and showing.
As can be seen here, the present invention can make installation management equipment obtain the installation that mounted equipment is current in current period
Interface sectional drawing also calculates the image parameters that this installation interface sectional drawing is corresponding, is then obtained in this image parameters and a upper cycle
The image parameters that the installation interface sectional drawing of this mounted equipment is corresponding compares, if identical, it is determined that described mounted equipment
Installment state be abnormal;If it is different, then by the installation interface sectional drawing pair of the described mounted equipment of acquisition in the upper cycle
The image parameters answered is updated to the image parameters that the interior installation interface sectional drawing obtained of current period is corresponding.Therefore, the present invention is permissible
Installment state batch query and the management of mounted equipment is realized when batch installation system.
In said apparatus, the function of unit and the process that realizes of effect specifically refer to corresponding step in said method
Realize process, do not repeat them here.
For device embodiment, owing to it corresponds essentially to embodiment of the method, so relevant part sees method in fact
The part executing example illustrates.Device embodiment described above is only schematically, wherein said as separating component
The unit illustrated can be or may not be physically separate, and the parts shown as unit can be or can also
It not physical location, i.e. may be located at a place, or can also be distributed on multiple NE.Can be according to reality
Need to select some or all of module therein to realize the purpose of the application scheme.Those of ordinary skill in the art are not paying
In the case of going out creative work, i.e. it is appreciated that and implements.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all essences in the present invention
Within god and principle, any modification, equivalent substitution and improvement etc. done, within should be included in the scope of protection of the invention.