CN109194514A - A kind of two-shipper monitoring method, device, server and storage medium - Google Patents
A kind of two-shipper monitoring method, device, server and storage medium Download PDFInfo
- Publication number
- CN109194514A CN109194514A CN201811058598.4A CN201811058598A CN109194514A CN 109194514 A CN109194514 A CN 109194514A CN 201811058598 A CN201811058598 A CN 201811058598A CN 109194514 A CN109194514 A CN 109194514A
- Authority
- CN
- China
- Prior art keywords
- machine
- opposite side
- characteristic value
- host
- side machine
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
- H04L41/0663—Performing the actions predefined by failover planning, e.g. switching to standby network elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Hardware Redundancy (AREA)
- Testing And Monitoring For Control Systems (AREA)
Abstract
The invention discloses a kind of two-shipper monitoring method, device, server and storage mediums.This method comprises: obtaining the feature vector of the machine, and the characteristic value of described the machine is determined according to described eigenvector;The characteristic value of opposite side machine is obtained, and the characteristic value of the opposite side machine is compared with the characteristic value of described the machine;If judging, the characteristic value of described the machine is greater than the characteristic value of the opposite side machine, sends synchrodata to the opposite side machine, and determine described the machine as host, the opposite side machine is as standby host;If judging, the characteristic value of the opposite side machine is greater than the characteristic value of described the machine, receives the synchrodata that the opposite side machine is sent, and determines the opposite side machine as host, and described the machine is as standby host.Technical solution provided in an embodiment of the present invention by the way of competing host, solves the problems, such as two-shipper frequent switching under the premise of meeting two-node cluster hot backup operation, improves the efficiency and stability of two-shipper monitoring, enhances fault-tolerance.
Description
Technical field
The present embodiments relate to system monitoring field more particularly to a kind of two-shipper monitoring method, device, server and deposit
Storage media.
Background technique
With the continuous development of computer technology, in order to guarantee the high availability of server or other service equipments, subtract
Few downtime, dual-locomotive heat handoff technique have obtained broad development in system monitoring field.
The working method of two-shipper hot-swap is generally divided into two kinds: active/standby mode and double host modes.Active/standby mode refers to
One server is in the state of activation of certain business, and another server is in the stand-by state of the business;Double host modes
Refer to two kinds of different business activestandby state each other on two-server respectively.However two ways is normal main handover mechanism, it is right
It in a certain business, presets and forces default host, be set as forcing the administrative unit of default host once running, necessarily host shape
State, host break down stoppage in transit maintenance restore again when, need at least 2 switch between master and slave machines could complete two-shipper synchronous working,
Although such mechanism is able to satisfy basic switching demand, but two-shipper state flow path switch is relative complex, and switching time is more long, efficiency
It is low, and fault-tolerance is poor.
Summary of the invention
The present invention provides a kind of two-shipper monitoring method, device, server and storage mediums, are meeting two-node cluster hot backup operation
Under the premise of, by the way of competing host, the frequent switching of two-shipper is avoided, improves the efficiency and stabilization of two-node cluster hot backup
Property, enhance fault-tolerance.
In a first aspect, the embodiment of the invention provides two-shipper monitoring methods, comprising:
The feature vector of the machine is obtained, and determines the characteristic value of described the machine according to described eigenvector;
The characteristic value of opposite side machine is obtained, and the characteristic value of the opposite side machine is compared with the characteristic value of described the machine;
If judging, the characteristic value of described the machine is greater than the characteristic value of the opposite side machine, sends same step number to the opposite side machine
According to, and described the machine is determined as host, the opposite side machine is as standby host;
If judging, the characteristic value of the opposite side machine is greater than the characteristic value of described the machine, receives the synchronization that the opposite side machine is sent
Data, and the opposite side machine is determined as host, described the machine is as standby host.
Second aspect, the embodiment of the invention also provides a kind of two-shipper monitoring devices, comprising:
Feature vector obtains module, determines for obtaining the feature vector of the machine, and according to the feature vector of described the machine
The characteristic value of the machine;
Comparison module, for obtaining the characteristic value of opposite side machine, and by the spy of the characteristic value of the opposite side machine and described the machine
Value indicative is compared;
First judgment module, if for judging that the characteristic value of described the machine is greater than the characteristic value of the opposite side machine, to described
Opposite side machine sends synchrodata, and determines described the machine as host, and the opposite side machine is as standby host;
Second judgment module, if receiving institute for judging that the characteristic value of the opposite side machine is greater than the characteristic value of described the machine
The synchrodata of opposite side machine transmission is stated, and determines the opposite side machine as host, described the machine is as standby host.
The third aspect, the embodiment of the invention provides a kind of computer equipments, comprising: memory, processor and is stored in
On memory and the computer program that can run on a processor, the processor realize the two-shipper when executing described program
Monitoring method.
Fourth aspect, the embodiment of the invention provides a kind of computer readable storage mediums, are stored thereon with computer journey
Sequence realizes the two-shipper monitoring method when program is executed by processor.
Technical solution provided in an embodiment of the present invention is not fixed host and standby host under the premise of two-node cluster hot backup operation, leads to
It crosses feature vector and determines characteristic value, then compare the characteristic value size of the machine Yu opposite side machine, so that it is determined that based on characteristic value is big
Machine, and real-time synchrodata is sent from host to standby host, to keep data consistent, using the side based on characteristic value competition host
Formula reduces the number of the Two-channel switching during failure and maintenance, improves the efficiency and stability of two-shipper monitoring, enhance appearance
Mistake.
Detailed description of the invention
Fig. 1 is a kind of flow chart for two-shipper monitoring method that the embodiment of the present invention one provides;
Fig. 2 is a kind of flow chart of two-shipper competition host provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of flow chart for two-shipper monitoring method that the embodiment of the present invention three provides;
Fig. 4 is a kind of flow chart for two-shipper monitoring method that the embodiment of the present invention four provides;
Fig. 5 is a kind of structural block diagram for two-shipper monitoring device that the embodiment of the present invention five provides;
Fig. 6 is a kind of structural block diagram for two-shipper monitoring device that the embodiment of the present invention six provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just
Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is the flow chart for the two-shipper monitoring method that the embodiment of the present invention one provides, and the method for the present embodiment can be based on
Two-shipper monitoring device executes, which can be integrated in the server by software and or hardware realization, described device, this
The scene that inventive embodiments provide can be the scene that two running servers carry out system monitoring.As shown in Figure 1, specific
Include the following steps:
S101: obtaining the feature vector of the machine, and the characteristic value of described the machine is determined according to described eigenvector.
In embodiments of the present invention, optionally, the feature vector of the machine may include: the machine runing time, native service
State and other customized factors;Wherein, the machine runing time can be the monitoring time of the machine monitoring current system.The machine
Service state, comprising: at least one of flexible bus service state, real-time database service state, history library service state.Wherein,
Flexible bus service state can be the operating status of the software bus of system, such as: the transmission speed of software bus;Real-time database
Service state can be the operating status of the real time data of system, such as: current load value size;History library service state, can
Be system historical data operating status, such as: the historical occupancy rate of CPU.
Optionally, other customized factors may include: the operating status and the operation of configuration instrument of image processing tool
State;Wherein, image processing tool can be the tool that image procossing is carried out in system, such as: improve the soft of image resolution ratio
Part or device.Configuration instrument, the i.e. working condition of configuration software in system, such as: the operating status of host computer display interface;
Different according to the system difference and demand that are monitored, native service state and other customized factors can be with self-definings.
In an embodiment of the embodiment of the present invention, optionally, described the machine is determined according to described eigenvector
Characteristic value may include: the characteristic value for calculating described the machine according to the following formula: Y=α A+ β B+ γ C;Wherein, Y is described
The characteristic value of machine;The α is the weight of the machine runing time, and the A is the runing time of described the machine, and the β is institute
The weight of native service state is stated, the B is the value of the native service state, and the γ is the power of other customized factors
Weight, the C are the value of other customized factors.Wherein, different weights, α, β, γ setting are set according to different systems
It can be set in the present embodiment for different numerical value, β > α > γ.Wherein, the runing time A of the machine can be set as with
It hour is unit, part less than 1 hour not evaluation, such as: the machine runs 1 hour, then A=1;The machine operation 2.5 is small
When, then A=2;A value can also be set according to traffic coverage, such as: runing time is less than or equal to 1 hour, then A=1;Operation
Time was greater than 1 hour and less than or equal to 4 hour, then A=2;Runing time was greater than 4 and less than or equal to 10 hour, then A=3.
In an embodiment of the embodiment of the present invention, optionally, the value of the native service state can be by such as
Lower method determines: determining the quantity of the native service state monitored;Wherein, the native service state may include: soft total
At least one of line service state, real-time database service state, history library service state;According to the class of the native service state
Type and/or quantity determine the value of native service state.
Specifically, the value calculating method of native service state may is that flexible bus service state, real-time database service shape
State, history library service state assign identical numerical value;Native service shape is determined according to the quantity of the native service state monitored
The value of state.Such as: flexible bus service state, real-time database service state, history library service state are assigned a value of 1 respectively, if the machine
Flexible bus service state, real-time database service state, any one in history library service state are monitored, then native service state
Value B=1;If monitoring flexible bus service state, real-time database service state, two in history library service state, the machine
The value B=2 of service state;If monitoring flexible bus service state, real-time database service state, history library service state, then the machine
The value B=3 of service state;If not monitoring any service state therein, the value B=0 of native service state.
Or it can also be divided according to flexible bus service state, real-time database service state, history library service state significance level
Different score values is not assigned, and the value of native service state is determined according to the type of native service state and quantity.Wherein, the machine takes
Business state includes at least one of flexible bus service state, real-time database service state, history library service state.Such as: it will be soft
Bus service state, real-time database service state, history library service state are assigned a value of 1,2 and 3 respectively.If the machine has only monitored soft total
Line service state, then the value B=1 of native service state;The machine has only monitored history library service state, then native service state
Value B=2;Real-time database service state is monitored, then the value B=3 of native service state;If having monitored therein multinomial, the machine
The value of service state is the sum of corresponding score value of multinomial service state;Any service state therein is not monitored, then the machine takes
The value B=0 of business state.
In an embodiment of the embodiment of the present invention, optionally, the value of other customized factors can pass through
Following method determines: determining the quantity of other the customized factors monitored, other customized factors, comprising: at image
The operating status of science and engineering tool and the operating status of configuration instrument;It is true according to the type of other customized factors and/or quantity
The value of fixed other customized factors.
Wherein, the determination method of the value of the customized factor can be with reference to the determination method of the value of native service state.Specifically
May is that the operating status of the image processing tool in the customized factor and the operating status of configuration instrument are assigned respectively it is identical
Numerical value, the value of other customized factors is determined according to the quantity of other the customized factors monitored.Such as: if by image
The operating status of science and engineering tool and the operating status of configuration instrument are assigned a value of 1 respectively, if the machine monitors the fortune of image processing tool
Any one in row state and the operating status of configuration instrument, by the value C=1 of the then customized factor;If the machine monitors figure
As the operating status of handling implement and the operating status of configuration instrument, then the value C=2 of the customized factor;It does not monitor therein
State, then C=0.
Or it can also be according to the significance level for the different operating statuses for including in the customized factor, by image processing tool
Operating status and the operating status of configuration instrument assign different score values respectively, according to the type sum number of other customized factors
Measure the value for determining other customized factors.Such as: by the operating status of image processing tool and the operating status of configuration instrument point
Not Fu Yu 1 and 2, if the machine has only monitored the operating status of graphical authoring tools, the value C=1 of the customized factor;If the machine is only
The operating status of configuration instrument is monitored, then the value C=2 of the customized factor;If the machine has monitored this two operating statuses simultaneously,
The then value C=3 of the customized factor;If the machine does not monitor any service state therein, the value C=0 of the customized factor.
S102: the characteristic value of opposite side machine is obtained, and the characteristic value of the characteristic value of the opposite side machine and described the machine is carried out
Compare.
In an embodiment of the embodiment of the present invention, optionally, the characteristic value of opposite side machine is obtained, may include: to connect
The heartbeat message that the opposite side machine is sent is received, and extracts the characteristic value of the opposite side machine from the heartbeat message.It is locally received
The characteristic value of opposite side machine is obtained to heartbeat message;Wherein, heartbeat message sends character string information with udp broadcast or mode of unicast
Indicate the operating status of server, sending method and transmission interval can be set.
It should be noted that the method that opposite side machine determines that the method for characteristic value determines characteristic value with the machine is identical.
S103: if judging, the characteristic value of described the machine is greater than the characteristic value of the opposite side machine, real-time to the opposite side machine
Synchrodata is sent, and determines described the machine as host, the opposite side machine is as standby host.
If the characteristic value of the machine is greater than the characteristic value of opposite side machine, real time data and historical data are synchronized to opposite side by the machine
Machine to guarantee that two machine data are consistent, and determines the machine as host, and opposite side machine is as standby host.
S104: if judging, the characteristic value of the opposite side machine is greater than the characteristic value of described the machine, receives the opposite side machine and sends
Real-time synchrodata, and determine the opposite side machine as host, described the machine is as standby host.
If the characteristic value of the machine is less than the characteristic value of opposite side machine, the real time data and history number that locally received opposite side machine issues
According to guarantee that two machine data are consistent, and determining opposite side machine, as host, the machine is as standby host.
Wherein, when two machine characteristic values are equal, using in two machines long operational time as host.It should be noted that
The execution sequence of S103 and S104 is unrestricted, can carry out simultaneously, can also first carry out S103 and execute S104 again, can also be first
It executes S104 and executes S103 again.
On the basis of the above embodiments, the method can also include: in synchrodata, if two-shipper it is synchronous not at
Function is sounded an alarm by characteristic value in two-shipper is big, staff is reminded to overhaul in time.
Technical solution provided in an embodiment of the present invention, by the state of two-shipper monitoring system, by comparing the characteristic value of two machines
Size is encountering abnormal feelings so that it is determined that characteristic value is greatly host, and sends real-time synchrodata from host to standby host
Condition, for example, hostdown or maintenance when, based on characteristic value compete host by way of, standby host can become host, and due to
The synchrodata that there is standby host host to send in real time, can execute the task of monitoring, based on synchrodata so as to solve to lead
When machine abnormal conditions the problem of two-shipper frequent switching, the efficiency and stability of two-shipper hot-swap are improved, fault-tolerance is enhanced.Phase
Run host than currently, when failure machine or servicing machine restore, runing time is short, the value of native service state and the customized factor
Value is both less than host, and therefore, characteristic value is less than current operation host, and failure machine or servicing machine automatically become standby host after restoring,
The operating status of current hosts is not influenced, does not generate data service handoff procedure, and impact will not be generated to operating system.
Embodiment two
Fig. 2 is the flow chart that the machine that the embodiment of the present invention two provides on the basis of the above embodiments competes host.Such as
Shown in Fig. 2, the process of the machine competition host provided in an embodiment of the present invention is as follows:
S201: it is locally initiating, and it is defaulted as standby host;
It is defaulted as standby host when locally initiating, determines this by obtaining the feature vector of the machine, and according to described eigenvector
The characteristic value of machine.
In embodiments of the present invention, optionally, the feature vector of the machine may include: the machine runing time, native service
State and other customized factors.
Optionally, the characteristic value that described the machine is determined according to described eigenvector may include: to calculate according to the following formula
The characteristic value of described the machine: Y=α A+ β B+ γ C;Wherein, Y is the characteristic value of described the machine;When the α is that described the machine is run
Between weight, the A be described the machine runing time, the β be the native service state weight, the B is described
The value of native service state, the γ are the weight of other customized factors, and the C is the value of other customized factors.
It should be noted that the method that opposite side machine determines that the method for characteristic value determines characteristic value with the machine is identical.
S202: judge whether the machine can receive the heartbeat message of opposite side machine;
Wherein, heartbeat message indicates the operating status of server with udp broadcast or mode of unicast transmission character string information,
Its sending method and transmission interval can be set.
If it is not, executing S203;If so, executing S205
S203: the machine is upgraded to host;
S204: the machine sounds an alarm;
It is sounded an alarm by host i.e. the machine, staff is reminded to overhaul in time.
S205: judge whether the machine competes host success;
Optionally, the heartbeat message that locally received opposite side machine is sent, and the opposite side machine is extracted from the heartbeat message
Characteristic value, compare the characteristic value size of the machine and opposite side machine, characteristic value it is big be used as host, characteristic value it is small be used as standby host.
If local features value is greater than opposite side machine, the machine competes host success;If local features value is less than opposite side machine, the machine competition master
Machine is unsuccessful.
If it is not, executing S206;If so, executing S209;
S206: two-shipper is synchronous, the real-time synchronization data that locally received opposite side machine is sent;
The real-time synchronization data that locally received opposite side machine is sent, to guarantee that two machine data are consistent.
S207: judge whether two-shipper synchronization succeeds;
If it is not, executing S212;If so, executing S208;
S208: opposite side machine is upgraded to host, and the machine is standby host;
S209: two-shipper is synchronous, and the machine sends real-time synchronization data to opposite side machine;
The real-time synchronization data that locally received opposite side machine is sent, to guarantee that two machine data are consistent.
S210: judge whether two-shipper synchronization succeeds;
If it is not, executing S212;If so, executing S211;
S211: the machine is upgraded to host, and opposite side machine is standby host;S212: it sounds an alarm.
When synchrodata, is sounded an alarm by characteristic value in the machine and opposite side machine is big, staff is reminded to overhaul in time.
Technical solution provided in an embodiment of the present invention discloses a kind of overall process of two-shipper competition host, monitors system by two-shipper
The state of system, by comparing the characteristic value size of two machines, so that it is determined that characteristic value is greatly host, meanwhile, when the machine can not connect
It receives when synchronizing unsuccessful to the heartbeat message or two-shipper of machine, can all sound an alarm, staff is prompted to search in time side by side
Real-time synchrodata is sent except failure, and from host to standby host;It is synchronous that two-shipper is carried out before switching host, is also ensured double
The mode of machine competition host will not generate loss of data during system monitoring, in the premise for guaranteeing two-node cluster hot backup operation
Under, it is reasonable to carry out two-shipper hot-swap, the efficiency and stability of two-shipper monitoring are improved, fault-tolerance is enhanced.
Embodiment three
Fig. 3 is the two-shipper monitoring method flow chart that the embodiment of the present invention three provides, base of the present embodiment in above-described embodiment
On plinth, the machine controls the first equipment of the first setting quantity, and opposite side machine controls the second equipment of the second setting quantity.
Optionally, the first equipment and the second equipment all can be protective devices.
Optionally, the first setting quantity and the second setting quantity can be identical.
Technical solution provided in an embodiment of the present invention includes:
S310: obtaining the feature vector of the machine, and the characteristic value of described the machine is determined according to described eigenvector;
In embodiments of the present invention, optionally, the feature vector of the machine may include: the machine runing time, native service
State and other customized factors.
Optionally, the characteristic value that described the machine is determined according to described eigenvector may include: to calculate according to the following formula
The characteristic value of described the machine: Y=α A+ β B+ γ C;Wherein, Y is the characteristic value of described the machine;When the α is that described the machine is run
Between weight, the A be described the machine runing time, the β be the native service state weight, the B is described
The value of native service state, the γ are the weight of other customized factors, and the C is the value of other customized factors.
S320: the characteristic value of opposite side machine is obtained, and the characteristic value of the characteristic value of the opposite side machine and described the machine is carried out
Compare;
In an embodiment of the embodiment of the present invention, optionally, the characteristic value of opposite side machine is obtained, may include: to connect
The heartbeat message that the opposite side machine is sent is received, and extracts the characteristic value of the opposite side machine from the heartbeat message.It is locally received
The characteristic value of opposite side machine is obtained to heartbeat message;Wherein, heartbeat message sends character string information with udp broadcast or mode of unicast
Indicate the operating status of server, sending method and transmission interval can be set.
S330: judge whether the characteristic value of described the machine is greater than the characteristic value of the opposite side machine.
If so, S340 is executed, if it is not, executing S360.
S340: synchrodata is sent to the opposite side machine, and determines described the machine as host, the opposite side machine is as standby
Machine;
S350: if monitor to receive the heartbeat message exception that the opposite side machine is sent, adapter tube second sets the institute of quantity
State the second equipment.
Optionally, the heartbeat message for not receiving the transmission of opposite side machine in preset time, then determine opposite side machine heartbeat message
It is abnormal, at this time by the machine, i.e. host, the equipment for taking over the control of opposite side machine, to guarantee that controlled device operates normally;When described preset
Between can need to set according to system.
S360: receiving the synchrodata that the opposite side machine is sent, and determines the opposite side machine as host, and described the machine is made
For standby host.
S370: if monitor to receive the heartbeat message exception that the opposite side machine is sent, switching described the machine is host, and
Second equipment of the setting quantity of adapter tube second.
Optionally, the heartbeat message for not receiving the transmission of opposite side machine in preset time, then determine opposite side machine heartbeat message
Abnormal, first switching the machine is host, the equipment for then taking over the control of opposite side machine, to guarantee that controlled device operates normally at this time;Institute
Stating preset time can need to set according to system.When the machine monitors that the heartbeat message for receiving the opposite side machine transmission is normal
When, return to the operation for obtaining the feature vector of the machine.
When the machine monitors to receive the heartbeat message exception of opposite side machine transmission, the machine is sounded an alarm, and reminds staff
Maintenance in time.
Technical solution provided in an embodiment of the present invention whether receiving the heartbeat message of opposite side machine normally by judgement, and is tied
The working method for closing two-shipper competition host when the heartbeat message of machine receives abnormal in opposite side, can take over opposite side machine institute by the machine
The equipment of control ensure that the normal operation of controlled device, enhance the fault-tolerance of system.
Example IV
Fig. 4 is the two-shipper monitoring method flow chart that the embodiment of the present invention four provides on the basis of the above embodiments, the party
Method includes:
S410: the machine operation;
The machine obtains the feature vector of the machine while operation, and the spy of described the machine is determined according to described eigenvector
Value indicative.
S420: sending the machine heartbeat message, receives opposite side machine heartbeat message;
The machine sends heartbeat message to opposite side machine, meanwhile, the heartbeat message that locally received opposite side machine is sent.
S430: judge whether the heartbeat message for receiving the transmission of opposite side machine is abnormal;
Optionally, the heartbeat message for not receiving the transmission of opposite side machine in preset time, then determine opposite side machine heartbeat message
Abnormal, the preset time can need to set according to system.
If so, executing S440;If it is not, executing S420;
S440: judge whether the machine is host;
Judge that the machine is host or standby host at the time of receiving opposite side machine heartbeat message exception.
If it is not, executing S450;If so, executing S460;
S450: the machine is switched to host;
When locally received opposite side machine heartbeat message exception, if the machine is standby host at this time, need to be switched to host.
S460: the machine takes over the controlled equipment of opposite side machine.
Technical solution provided in an embodiment of the present invention, when the heartbeat message exception of opposite side machine, the machine is if host, then directly
The equipment that adapter tube opposite side machine is controlled;The machine is if standby host, then the machine is upgraded to the equipment that host rear tube opposite side machine is controlled,
The normal operation that ensure that controlled device enhances the fault-tolerance of system.
Embodiment five
Fig. 5 is a kind of structural block diagram for two-shipper monitoring device that the embodiment of the present invention five provides, which can be by software
And/or hardware realization, comprising: feature vector obtains module 51, comparison module 52, first judgment module 53 and the second judgment module
54。
Feature vector obtains module 51, for obtaining the feature vector of the machine, and it is true according to the feature vector of described the machine
Determine the characteristic value of the machine.
Comparison module 52, for obtaining the characteristic value of opposite side machine, and by the characteristic value of the opposite side machine and described the machine
Characteristic value is compared;
First judgment module 53, if for judging that the characteristic value of described the machine is greater than the characteristic value of the opposite side machine, to institute
It states opposite side machine and sends synchrodata, and determine described the machine as host, the opposite side machine is as standby host;
Second judgment module 54, if being received for judging that the characteristic value of the opposite side machine is greater than the characteristic value of described the machine
The synchrodata that the opposite side machine is sent, and the opposite side machine is determined as host, described the machine is as standby host.
Optionally, the feature vector of described the machine, comprising: the machine runing time, native service state and other customized
The factor;
The characteristic value that described the machine is determined according to described eigenvector, comprising:
The characteristic value of described the machine: Y=α A+ β B+ γ C is calculated according to the following formula;
Wherein, the Y is the characteristic value of described the machine;The α is the weight of the machine runing time, and the A is institute
The runing time of the machine is stated, the β is the weight of the native service state, and the B is the value of the native service state, institute
The weight of other customized factors described in γ is stated, the C is the value of other customized factors.
Optionally, the value of the native service state determines by the following method:
Determine the quantity of the native service state monitored;Wherein, the native service state, comprising: flexible bus service
At least one of state, real-time database service state, history library service state;
The value of native service state is determined according to the type of the native service state and/or quantity.
Optionally, the value of other customized factors determines by the following method:
Determine the quantity of other the customized factors monitored, other customized factors, comprising: image processing tool
Operating status and configuration instrument operating status;
The value of other customized factors is determined according to the type of other customized factors and/or quantity.
Optionally, if the first equipment of described the machine control the first setting quantity, the second setting of opposite side machine control number
Second equipment of amount;Described device further include: adapter tube module 55 if being host for described the machine, and monitors described in reception
When the heartbeat message exception that opposite side machine is sent, adapter tube second sets second equipment of quantity;
If described the machine is standby host, and when monitoring to receive the heartbeat message exception that the opposite side machine is sent, described in switching
The machine is host, and adapter tube second sets second equipment of quantity.
Optionally, described device further includes return module 56, for working as the heartbeat for monitoring to receive the opposite side machine and sending
When message is normal, the operation for obtaining the feature vector of the machine is returned.
Optionally, the characteristic value for obtaining opposite side machine, comprising:
The heartbeat message that the opposite side machine is sent is received, and extracts the feature of the opposite side machine from the heartbeat message
Value.
Method provided by any embodiment of the invention can be performed in above-mentioned apparatus, has the corresponding functional module of execution method
And beneficial effect.
Embodiment six
Fig. 6 is a kind of structural schematic diagram for two-shipper monitoring device that the embodiment of the present invention six provides, as shown in fig. 6, this sets
Standby includes processor 60, memory 61, input unit 62 and output device 63;The quantity of processor 60 can be one in equipment
Or it is multiple, in Fig. 5 by taking a processor 60 as an example;Device handler 60, memory 61, input unit 62 and output device 63 can
To be connected by bus or other modes, in Fig. 6 for being connected by bus.
Memory 61 is used as a kind of computer readable storage medium, can be used for storing software program, journey can be performed in computer
Sequence and module, as (feature vector acquisition module 51 compares the corresponding module of two-shipper monitoring device in the embodiment of the present invention four
Module 52, first judgment module 53 and the second judgment module 54).The software that processor 60 is stored in memory 61 by operation
Program, instruction and module realize above-mentioned two-shipper monitoring thereby executing the various function application and data processing of equipment
Method.
Memory 61 can mainly include storing program area and storage data area, wherein storing program area can store operation system
Application program needed for system, at least one function;Storage data area, which can be stored, uses created data etc. according to terminal.This
Outside, memory 61 may include high-speed random access memory, can also include nonvolatile memory, for example, at least a magnetic
Disk storage device, flush memory device or other non-volatile solid state memory parts.In some instances, memory 61 can be further
Including the memory remotely located relative to processor 60, these remote memories can pass through network connection to equipment.It is above-mentioned
The example of network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Input unit 62 can be used for receiving the number or character information of input, and generate with the user setting of equipment and
The related key signals input of function control.Output device 63 may include that display screen etc. shows equipment.
Embodiment seven
The embodiment of the present invention seven also provides a kind of storage medium comprising computer executable instructions, and the computer can be held
Row instruction is used to execute a kind of two-shipper monitoring method when being executed by computer processor, this method comprises:
The feature vector of the machine is obtained, and determines the characteristic value of described the machine according to described eigenvector;
The characteristic value of opposite side machine is obtained, and the characteristic value of the opposite side machine is compared with the characteristic value of described the machine;
If judging, the characteristic value of described the machine is greater than the characteristic value of the opposite side machine, sends same step number to the opposite side machine
According to, and described the machine is determined as host, the opposite side machine is as standby host;
If judging, the characteristic value of the opposite side machine is greater than the characteristic value of described the machine, receives the synchronization that the opposite side machine is sent
Data, and the opposite side machine is determined as host, described the machine is as standby host.
Certainly, a kind of storage medium comprising computer executable instructions, computer provided by the embodiment of the present invention
Two-shipper monitoring provided by any embodiment of the invention can also be performed in the method operation that executable instruction is not limited to the described above
Relevant operation in method.
By the description above with respect to embodiment, it is apparent to those skilled in the art that, the present invention
It can be realized by software and required common hardware, naturally it is also possible to which by hardware realization, but in many cases, the former is more
Good embodiment.Based on this understanding, technical solution of the present invention substantially in other words contributes to the prior art
Part can be embodied in the form of software products, which can store in computer readable storage medium
In, floppy disk, read-only memory (Read-Only Memory, ROM), random access memory (Random such as computer
Access Memory, RAM), flash memory (FLASH), hard disk or CD etc., including some instructions are with so that a computer is set
Standby (can be personal computer, server or the network equipment etc.) executes method described in each embodiment of the present invention.
It is worth noting that, included each unit and module are only according to function in the embodiment of above-mentioned searcher
Energy logic is divided, but is not limited to the above division, as long as corresponding functions can be realized;In addition, each function
The specific name of energy unit is also only for convenience of distinguishing each other, the protection scope being not intended to restrict the invention.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that
The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention
It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also
It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.
Claims (10)
1. a kind of two-shipper monitoring method, which is characterized in that the described method includes:
The feature vector of the machine is obtained, and determines the characteristic value of described the machine according to described eigenvector;
The characteristic value of opposite side machine is obtained, and the characteristic value of the opposite side machine is compared with the characteristic value of described the machine;
If judging, the characteristic value of described the machine is greater than the characteristic value of the opposite side machine, sends synchrodata to the opposite side machine, and
Described the machine is determined as host, the opposite side machine is as standby host;
If judging, the characteristic value of the opposite side machine is greater than the characteristic value of described the machine, receives the same step number that the opposite side machine is sent
According to, and the opposite side machine is determined as host, described the machine is as standby host.
2. the method according to claim 1, wherein the feature vector of described the machine, comprising: when the machine is run
Between, native service state and other customized factors;
The characteristic value that described the machine is determined according to described eigenvector, comprising:
The characteristic value of described the machine: Y=α A+ β B+ γ C is calculated according to the following formula;
Wherein, the Y is the characteristic value of described the machine;The α is the weight of the machine runing time, and the A is described
The runing time of machine, the β are the weight of the native service state, and the B is the value of the native service state, the γ
The weight of other customized factors, the C are the value of other customized factors.
3. according to the method described in claim 2, it is characterized in that,
The value of the native service state determines by the following method:
Determine the quantity of the native service state monitored;Wherein, the native service state, comprising: flexible bus service state,
At least one of real-time database service state, history library service state;
The value of native service state is determined according to the type of the native service state and/or quantity.
4. according to the method described in claim 2, it is characterized in that,
The value of other customized factors determines by the following method:
Determine the quantity of other the customized factors monitored, other customized factors, comprising: the fortune of image processing tool
The operating status of row state and configuration instrument;
The value of other customized factors is determined according to the type of other customized factors and/or quantity.
5. the method according to claim 1, wherein if the first of described the machine control the first setting quantity sets
It is standby, the second equipment of the second setting of opposite side machine control quantity;
The method also includes:
If described the machine is host, and when monitoring to receive the heartbeat message exception that the opposite side machine is sent, the setting of adapter tube second
Second equipment of quantity;
If described the machine is standby host, and when monitoring to receive the heartbeat message exception that the opposite side machine is sent, switches described the machine
For host, and adapter tube second sets second equipment of quantity.
6. according to the method described in claim 5, it is characterized by further comprising:
When monitoring that the heartbeat message for receiving the opposite side machine transmission is normal, the operation for obtaining the feature vector of the machine is returned.
7. the method according to claim 1, wherein the characteristic value for obtaining opposite side machine, comprising:
The heartbeat message that the opposite side machine is sent is received, and extracts the characteristic value of the opposite side machine from the heartbeat message.
8. a kind of two-shipper monitoring device characterized by comprising
Feature vector obtains module, determines the machine for obtaining the feature vector of the machine, and according to the feature vector of described the machine
Characteristic value;
Comparison module, for obtaining the characteristic value of opposite side machine, and by the characteristic value of the characteristic value of the opposite side machine and described the machine
It is compared;
First judgment module, if for judging that the characteristic value of described the machine is greater than the characteristic value of the opposite side machine, to the opposite side
Machine sends synchrodata, and determines described the machine as host, and the opposite side machine is as standby host;
Second judgment module, if it is described right to receive for judging that the characteristic value of the opposite side machine is greater than the characteristic value of described the machine
The synchrodata that side machine is sent, and the opposite side machine is determined as host, described the machine is as standby host.
9. a kind of server including memory, processor and stores the computer that can be run on a memory and on a processor
Program, which is characterized in that the processor realizes the two-shipper monitoring as described in any in claim 1-7 when executing described program
Method.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor
The two-shipper monitoring method as described in any in claim 1-7 is realized when execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811058598.4A CN109194514B (en) | 2018-09-11 | 2018-09-11 | Dual-computer monitoring method and device, server and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811058598.4A CN109194514B (en) | 2018-09-11 | 2018-09-11 | Dual-computer monitoring method and device, server and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109194514A true CN109194514A (en) | 2019-01-11 |
CN109194514B CN109194514B (en) | 2021-12-14 |
Family
ID=64910465
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811058598.4A Active CN109194514B (en) | 2018-09-11 | 2018-09-11 | Dual-computer monitoring method and device, server and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109194514B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109921942A (en) * | 2019-03-18 | 2019-06-21 | 无锡华云数据技术服务有限公司 | Cloud platform method for handover control, device, system and electronic equipment |
CN110850787A (en) * | 2019-12-04 | 2020-02-28 | 中国石化销售股份有限公司华南分公司 | Parallel control system and method |
CN111371625A (en) * | 2020-03-18 | 2020-07-03 | 北京佳讯飞鸿电气股份有限公司 | Method for realizing dual-computer hot standby |
CN112394662A (en) * | 2020-11-11 | 2021-02-23 | 许继集团有限公司 | Transformer substation monitoring system server role determination method and system |
CN112596991A (en) * | 2020-12-27 | 2021-04-02 | 卡斯柯信号有限公司 | Hot standby reverse cutting method based on machine health state |
CN114003551A (en) * | 2021-11-01 | 2022-02-01 | 山东芯慧微电子科技有限公司 | FPGA hot standby controller for master-slave dual-computer hot standby |
CN114244735A (en) * | 2021-12-09 | 2022-03-25 | 南京丰道电力科技有限公司 | Main/standby operation switching method and device and storage medium |
CN114337944A (en) * | 2022-03-16 | 2022-04-12 | 中国人民解放军海军工程大学 | System-level main/standby redundancy general control method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1220809A (en) * | 1997-03-21 | 1999-06-23 | 诺基亚电信公司 | Method of preventing data inconisistency between master exchange data and backup exchange data |
CN101458496A (en) * | 2008-12-22 | 2009-06-17 | 卡斯柯信号有限公司 | Double mainframe backup control method |
CN102263663A (en) * | 2011-08-09 | 2011-11-30 | 北京佳讯飞鸿电气股份有限公司 | Double-network management server data maintenance method |
CN102916825A (en) * | 2011-08-01 | 2013-02-06 | 中兴通讯股份有限公司 | Management equipment of dual-computer hot standby system, management method and dual-computer hot standby system |
CN105306605A (en) * | 2015-12-09 | 2016-02-03 | 北京中电普华信息技术有限公司 | Double host server system |
-
2018
- 2018-09-11 CN CN201811058598.4A patent/CN109194514B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1220809A (en) * | 1997-03-21 | 1999-06-23 | 诺基亚电信公司 | Method of preventing data inconisistency between master exchange data and backup exchange data |
CN101458496A (en) * | 2008-12-22 | 2009-06-17 | 卡斯柯信号有限公司 | Double mainframe backup control method |
CN102916825A (en) * | 2011-08-01 | 2013-02-06 | 中兴通讯股份有限公司 | Management equipment of dual-computer hot standby system, management method and dual-computer hot standby system |
CN102263663A (en) * | 2011-08-09 | 2011-11-30 | 北京佳讯飞鸿电气股份有限公司 | Double-network management server data maintenance method |
CN105306605A (en) * | 2015-12-09 | 2016-02-03 | 北京中电普华信息技术有限公司 | Double host server system |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109921942A (en) * | 2019-03-18 | 2019-06-21 | 无锡华云数据技术服务有限公司 | Cloud platform method for handover control, device, system and electronic equipment |
CN110850787A (en) * | 2019-12-04 | 2020-02-28 | 中国石化销售股份有限公司华南分公司 | Parallel control system and method |
CN110850787B (en) * | 2019-12-04 | 2021-06-29 | 中国石油化工股份有限公司 | Parallel control system and method |
CN111371625A (en) * | 2020-03-18 | 2020-07-03 | 北京佳讯飞鸿电气股份有限公司 | Method for realizing dual-computer hot standby |
CN112394662A (en) * | 2020-11-11 | 2021-02-23 | 许继集团有限公司 | Transformer substation monitoring system server role determination method and system |
CN112596991A (en) * | 2020-12-27 | 2021-04-02 | 卡斯柯信号有限公司 | Hot standby reverse cutting method based on machine health state |
CN112596991B (en) * | 2020-12-27 | 2023-09-08 | 卡斯柯信号有限公司 | Hot standby reverse cutting method based on machine health state |
CN114003551A (en) * | 2021-11-01 | 2022-02-01 | 山东芯慧微电子科技有限公司 | FPGA hot standby controller for master-slave dual-computer hot standby |
CN114244735A (en) * | 2021-12-09 | 2022-03-25 | 南京丰道电力科技有限公司 | Main/standby operation switching method and device and storage medium |
CN114244735B (en) * | 2021-12-09 | 2024-01-16 | 南京丰道电力科技有限公司 | Master and slave operation switching method, device and storage medium |
CN114337944A (en) * | 2022-03-16 | 2022-04-12 | 中国人民解放军海军工程大学 | System-level main/standby redundancy general control method |
Also Published As
Publication number | Publication date |
---|---|
CN109194514B (en) | 2021-12-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109194514A (en) | A kind of two-shipper monitoring method, device, server and storage medium | |
CN106331098B (en) | Server cluster system | |
CN113014634B (en) | Cluster election processing method, device, equipment and storage medium | |
CN102571452B (en) | Multi-node management method and system | |
CN105187249B (en) | A kind of fault recovery method and device | |
CN107733684A (en) | A kind of multi-controller computing redundancy cluster based on Loongson processor | |
CN102739453B (en) | Main/standby switching method, equipment and system | |
CN103199972A (en) | Double machine warm backup switching method and warm backup system achieved based on SOA and RS485 bus | |
CN103346903A (en) | Dual-machine backup method and device | |
CN108153263B (en) | DCS controller redundancy method and device | |
CN109921942B (en) | Cloud platform switching control method, device and system and electronic equipment | |
CN103441863A (en) | Double-server hot standby system in blank pipe automatic system and control method thereof | |
CN104158707A (en) | Method and device of detecting and processing brain split in cluster | |
CN109308242A (en) | A kind of dynamic monitoring and controlling method, device, equipment and storage medium | |
CN110209526A (en) | A kind of accumulation layer synchronization system and storage medium | |
US20170244252A1 (en) | Autonomous Operational Platform for Micro-Grid Energy Management | |
CN108984602B (en) | Database control method and database system | |
CN114553900B (en) | Distributed block storage management system, method and electronic equipment | |
CN109947630B (en) | Fault notification method, device and storage medium | |
CN105306256B (en) | A kind of two-node cluster hot backup implementation method based on VxWorks equipment | |
CN109218206B (en) | Method and device for limiting link state advertisement quantity | |
CN106814643B (en) | A kind of control method and system of two-node cluster hot backup | |
CN115086153B (en) | Message processing system, message processing method, device and storage medium | |
CN116827761B (en) | Dual-machine hot standby switching method, system, equipment and medium | |
CN110519393B (en) | Self-service equipment supervision method, device, equipment, server and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |