CN114244735B - Master and slave operation switching method, device and storage medium - Google Patents
Master and slave operation switching method, device and storage medium Download PDFInfo
- Publication number
- CN114244735B CN114244735B CN202111502409.XA CN202111502409A CN114244735B CN 114244735 B CN114244735 B CN 114244735B CN 202111502409 A CN202111502409 A CN 202111502409A CN 114244735 B CN114244735 B CN 114244735B
- Authority
- CN
- China
- Prior art keywords
- equipment
- weight value
- weight
- switching
- mode
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 238000009825 accumulation Methods 0.000 claims description 6
- 238000004590 computer program Methods 0.000 claims description 4
- 230000009471 action Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000003491 array Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 239000012556 adjustment buffer Substances 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
Classifications
-
- 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/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
-
- 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/0659—Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities
-
- 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/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Hardware Redundancy (AREA)
Abstract
The invention discloses a method, a device and a storage medium for switching main and standby operation, wherein the method comprises the following steps: dynamically assigning weights to parameter conditions affecting the operating states of the devices based on the operating states of the first device and the second device, the parameter conditions including at least one of a switching mode, a fail-over mode, an automatic mode, and a default selection; accumulating the weights of the parameter conditions of the first equipment to obtain a first weight value; accumulating the weights of the parameter conditions of the second equipment to obtain a second weight value; and comparing the first weight value with the second weight value to determine the master operation state of the first equipment and the second equipment. By using the dynamic weight value, the weight value is dynamically calculated according to different running conditions, so that the accuracy of the main and standby states of the equipment can be ensured, and the running reliability of the power system can be improved.
Description
Technical Field
The invention relates to the technical field of power systems, in particular to a method and a device for switching main and standby operation and a storage medium.
Background
In order to ensure reliable operation of the system, a dual-machine backup operation mode is generally adopted, wherein one machine needs to be operated in a host state, and the other machine needs to be operated in a standby state or a parallel state. In the related technology, the invention patent application with the patent application number 200710187736.4 discloses a method and a device for realizing the switching of a main device and a standby device, in the method, if the main device fails, the failure type of the main device is determined, a preset weight mapping table is searched according to the failure type to obtain a weight value of the failure, and the weight value is accumulated with the original failure coefficient of the main device to obtain the current failure coefficient of the main device; judging whether the failure coefficient of the main equipment is larger than that of the standby equipment, if so, switching, and bearing the service by the standby equipment. By weighting faults, the fault degree of the main equipment and the standby equipment can be accurately compared, and the high availability of the telecommunication equipment is ensured.
However, the method is applied to the field of telecommunications, and only the fault is assigned by using a preset weight mapping table, the dynamic calculation of the weight is not performed according to different running conditions, and the influence condition of different running conditions on the weight is not reflected. In addition, the switching of the main equipment and the standby equipment is realized through an inverted module device, and the structure is complex.
Disclosure of Invention
The invention aims to solve the technical problem of accurately determining the main and standby states of the power system and ensuring the reliable operation of the power system.
The invention solves the technical problems by the following technical means:
in a first aspect, an embodiment of the present invention employs a method for switching between primary and backup operations, where the method includes:
dynamically assigning weights to parameter conditions affecting the operating states of the devices based on the operating states of the first device and the second device, the parameter conditions including at least one of a switching mode, a fail-over mode, an automatic mode, and a default selection;
accumulating the weights of the parameter conditions of the first equipment to obtain a first weight value;
accumulating the weights of the parameter conditions of the second equipment to obtain a second weight value;
and comparing the first weight value with the second weight value to determine the main and standby running states of the first equipment and the second equipment.
The method comprises the steps of carrying out abstract assignment on real conditions affecting the running state of equipment, selecting different weight values under different affecting conditions, accumulating weights corresponding to all related conditions to form the integral weight of the equipment, comparing the integral weight values of the equipment, determining the equipment with large weight values as a host state, and determining the equipment with small weight values as a slave state. By using the dynamic weight value, the weight value is dynamically calculated according to different running conditions, so that the accuracy of the main and standby states of the equipment can be ensured, and the running reliability of the power system can be improved.
Further, when the parameter condition is a switching mode, the dynamically assigning the weight to the parameter condition affecting the running state of the device includes:
if the switching mode is a manual switching mode to a host mode, assigning k1 to a weight item x1 of the switching mode;
if the switching mode is a manual switching to a standby mode, assigning k2 to a weight item x1 of the switching mode;
if the switching mode is an automatic switching mode, assigning k3 to a weight item x1 of the switching mode;
where k1> k2=k3=0.
Further, when the parameter condition is a failover, the dynamically assigning the weight to the parameter condition affecting the running state of the device includes:
judging whether heartbeat information of opposite terminal equipment is received or not;
if yes, determining that the opposite terminal equipment has no fault, and assigning the weight item x2 of the fault switching as followsl2;
If not, determining the fault unsynchronized state of the opposite terminal equipment, and assigning a weight item x2 of the fault switching as followsl1;
Wherein,l1>l2 = 0。
further, upon determining the fault out-of-sync state, the method further comprises:
delay setting time waiting for synchronization;
and when the set time is exceeded, switching the equipment into a host running mode.
Further, in the automatic mode, the method further comprises:
if the substation does not receive a remote adjustment command sent by the master station in two command periods, assigning m1 for a weight item of the automatic mode;
if the substation receives a remote adjustment instruction sent by the master station in the two instruction periods and the remote adjustment instruction is a new instruction, assigning m2 to a weight item of the automatic mode;
if the substation receives a remote adjustment instruction sent by the master station in the two instruction periods and the remote adjustment instruction is an old instruction, assigning m3 to a weight item of the automatic mode;
if the substation receives two remote adjustment instructions sent by the main station in the two instruction periods, assigning m4 to a weight item of the automatic mode;
wherein m4> m3> m2> m1.
Further, the method further comprises:
when the remote adjustment instruction is received, recording a time count tick of the remote adjustment instruction;
calculating the time difference between the time count tick and the current tick as a tick interval;
and confirming that the remote regulation instruction is the new instruction or the old instruction according to the tick interval.
Further, when the parameter condition is selected as a default, the dynamically assigning the weight to the parameter condition affecting the running state of the device includes:
and assigning the priority weight item as x4=n1 according to the default primary and secondary priority, wherein n1< m1.
Further, for the first device or the second device, the method further comprises:
determining a weight value of the first equipment or the second equipment under the last running condition;
accumulating the weight of each parameter condition of the first equipment and the weight value of the first equipment under the last running condition to obtain a third weight value;
accumulating the weight of each parameter condition of the second equipment and the weight value of the second equipment under the last running condition to obtain a fourth weight value;
and comparing the third weight value with the fourth weight value to determine the main and standby running states of the first equipment and the second equipment.
In a second aspect, the present invention is a primary-backup operation switching device, including:
the dynamic assignment module is used for carrying out dynamic weight assignment on parameter conditions affecting the operation states of the equipment based on the operation states of the first equipment and the second equipment, wherein the parameter conditions comprise at least one of a switching mode, a fault switching mode, an automatic mode and a default selection;
the first accumulation module is used for accumulating the weights of the parameter conditions of the first equipment to obtain a first weight value;
the second accumulation module is used for accumulating the weights of the parameter conditions of the second equipment to obtain a second weight value;
and the state determining module is used for comparing the first weight value with the second weight value and determining the main and standby running states of the first equipment and the second equipment.
In a third aspect, the invention employs a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method as described above.
The invention has the advantages that:
(1) The invention carries out abstract assignment on the actual conditions affecting the running state of the equipment, selects different weight values according to different affecting conditions, integrates the weights corresponding to all the related conditions to form the integral weight of the equipment, determines the equipment with large weight value as the host state and determines the equipment with small weight value as the slave state by comparing the integral weight value of the equipment. By using the dynamic weight value, the weight value is dynamically calculated according to different running conditions, so that the accuracy of the main and standby states of the equipment can be ensured, and the running reliability of the power system can be improved.
(2) In the automatic mode, command comparison is accomplished using command time differences to remove the uncertainty limit of the remote command period.
(3) In the process of determining the overall weight value of the equipment, the weight value of the equipment under the last running condition is added on the basis of considering the weight value of each parameter condition, the overall weight value of the equipment is obtained, and the weight of the default priority of the equipment is also used as the basis for determining the main and standby states so as to avoid unnecessary main and standby switching actions of the system.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
FIG. 1 is a flowchart of a method for switching between primary and backup operations according to a first embodiment of the present invention;
fig. 2 is a block diagram of a primary-standby operation switching device in the second embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described in the following in conjunction with the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1, a first embodiment of the present invention discloses a method for switching between main and standby operations, which includes the following steps:
s10, dynamically assigning weights to parameter conditions affecting the operation states of the equipment based on the operation states of the first equipment and the second equipment, wherein the parameter conditions comprise at least one of a switching mode, a fault switching mode, an automatic mode and a default selection.
It should be noted that, in this embodiment, actual conditions affecting the running state of the device are subjected to abstract assignment, and different weights are selected by different conditions.
It should be understood that the switching mode, the fail-over mode, the automatic mode and the default selection are common conditions affecting the operation state of the device, and those skilled in the art may also select other conditions affecting the operation state of the device and set different weight values according to practical situations.
And S20, accumulating the weights of the parameter conditions of the first equipment to obtain a first weight value.
S30, accumulating the weights of the parameter conditions of the second equipment to obtain a second weight value.
S40, comparing the first weight value with the second weight value, and determining the main operation state of the first equipment and the second equipment.
The device state corresponding to the larger weight value of the first weight value and the second weight value is determined as the master state, and the device state corresponding to the smaller weight value is determined as the slave state. By using the dynamic weight value, the weight value is dynamically calculated according to different running conditions, so that the accuracy of the main and standby states of the equipment can be ensured, and the running reliability of the power system can be improved.
In some embodiments, when the parameter condition is a switching mode, the dynamically assigning weights to parameter conditions affecting an operation state of the device includes:
if the switching mode is a manual switching mode to a host mode, assigning k1 to a weight item x1 of the switching mode;
if the switching mode is a manual switching to a standby mode, assigning k2 to a weight item x1 of the switching mode;
if the switching mode is an automatic switching mode, assigning k3 to a weight item x1 of the switching mode;
where k1> k2=k3=0.
In some embodiments, when the parameter condition is a failover, the dynamically assigning weights to parameter conditions that affect an operating state of the device includes:
judging whether heartbeat information of opposite terminal equipment is received or not;
if yes, determining that the opposite terminal equipment has no fault, and assigning the weight item x2 of the fault switching as followsl2;
If not, determining the fault unsynchronized state of the opposite terminal equipment, and assigning a weight item x2 of the fault switching as followsl1;
Wherein,l1>l2 = 0。
specifically, in this embodiment, an interaction channel is established between the first device and the second device, and is used to interact with respective weight values, heartbeat values, remote adjustment information, and the like, when the devices cannot receive heartbeat information of the opposite device, a fault is considered to be in an unsynchronized state, the weight of the device is lifted, and the fault type includes initial connection failure and communication interruption in the running process; and if the heartbeat information of the opposite terminal equipment is received, determining that the synchronous state is a fault-free synchronous state. An interaction channel is established between the devices, so that the primary and standby switching of the information exchange between the devices can be directly realized.
In some embodiments, upon determining the fault out-of-sync state, the method further comprises:
delay setting time waiting for synchronization;
and when the set time is exceeded, switching the equipment into a host running mode.
The set time is determined according to the site situation, and may be about 1 s.
In some embodiments, in the automatic mode, the method further comprises:
if the substation does not receive a remote adjustment command sent by the master station in two command periods, assigning m1 for a weight item of the automatic mode;
if the substation receives a remote adjustment instruction sent by the master station in the two instruction periods and the remote adjustment instruction is a new instruction, assigning m2 to a weight item of the automatic mode;
if the substation receives a remote adjustment instruction sent by the master station in the two instruction periods and the remote adjustment instruction is an old instruction, assigning m3 to a weight item of the automatic mode;
if the substation receives two remote adjustment instructions sent by the main station in the two instruction periods, assigning m4 to a weight item of the automatic mode;
wherein m4> m3> m2> m1.
In some embodiments, the method further comprises:
when the remote adjustment instruction is received, recording a time count tick of the remote adjustment instruction;
calculating the time difference between the time count tick and the current tick as a tick interval;
and confirming that the remote regulation instruction is the new instruction or the old instruction according to the tick interval.
Specifically, the time difference between the time count tick and the current tick, i.e., Δt1 and Δt2, of the last two instructions in the remote adjustment buffer is used at the time of judgment.
It should be noted that in the automatic mode, the instruction comparison is performed using the instruction time difference in order to remove the limitation of uncertainty of the remote adjustment instruction period.
In some embodiments, when the parameter condition is a default selection, the dynamically assigning weights to parameter conditions that affect the running state of the device includes:
and assigning the priority weight item as x4=n1 according to the default primary and secondary priority, wherein n1< m1.
Here, the priority weight item of the device defaulting to the master state is assigned to n1, and the priority weight item of the device defaulting to the slave state is assigned to 0.
In some embodiments, for the first device or the second device, the method further comprises:
determining a weight value of the first equipment or the second equipment under the last running condition;
accumulating the weight of each parameter condition of the first equipment and the weight value of the first equipment under the last running condition to obtain a third weight value;
accumulating the weight of each parameter condition of the second equipment and the weight value of the second equipment under the last running condition to obtain a fourth weight value;
and comparing the third weight value with the fourth weight value to determine the main and standby running states of the first equipment and the second equipment.
In the determining process of the overall weight value of the device, the weight value of the device under the last running condition is added on the basis of considering the weight value of each parameter condition to obtain the overall weight value of the device, and the weight of the default priority of the device is also used as the basis for determining the active/standby state so as to avoid the system from making unnecessary active/standby switching actions.
For example:
state 1: s1, the host fails, and S2, the standby is switched to the host;
state 2: s1, repairing and starting operation, and increasing the weight of the last operation of the record under the condition of S2 normal operation of a host computer, wherein the operation is performed as follows;
state 3-1: s1 operates in a standby state, and S2 operates in a host state;
if the last run weight is not recorded, it is performed as follows:
state 3-2: s1 is switched to the running state as a host machine, and S2 is switched to the running state as a standby machine.
3-2 shows unnecessary switching action, and normal operation can maintain 3-1.
In some embodiments, the overall weight value of the accumulated device is qs=x1+x2+x3+x4+x5, where x5=f1, which represents the weight value of the last operating condition of the device.
The weight k given under the parameter conditions such as the switching mode, the fail-over mode, the automatic mode, and the default selection,lm, n, f are embodied in different orders of magnitude, for example: k is hundred thousand, l is ten thousand, m is thousand, n is hundred, and f is units.
The different magnitude weight values are selected for different limiting conditions so as to reflect respective influence conditions, and the running states are conveniently and simply compared and determined.
As shown in fig. 2, a second embodiment of the present invention discloses a primary-backup operation switching device, which includes:
a dynamic assignment module 10, configured to dynamically assign weights to parameter conditions that affect the operation states of the devices based on the operation states of the first device and the second device, where the parameter conditions include at least one of a switching mode, a fail-over mode, an automatic mode, and a default selection;
a first accumulating module 20, configured to accumulate weights of the parameter conditions of the first device to obtain a first weight value;
a second accumulating module 30, configured to accumulate weights of the parameter conditions of the second device to obtain a second weight value;
and a state determining module 40, configured to compare the first weight value and the second weight value, and determine a master operation state of the first device and a master operation state of the second device.
It should be noted that, the switching mode, the fail-over mode, the automatic mode and the default selection are common conditions affecting the operation state of the device, and those skilled in the art may select other conditions affecting the operation state of the device according to the actual situation, and set different weight values.
And determining the equipment state corresponding to the larger weight value in the first weight value and the second weight value as a master state, and determining the equipment state corresponding to the smaller weight value as a slave state. By using the dynamic weight value, the weight value is dynamically calculated according to different running conditions, so that the accuracy of the main and standby states of the equipment can be ensured, and the running reliability of the power system can be improved.
It can be understood that, in the active/standby state operation switching device disclosed in this embodiment, the specific situation of performing dynamic weight assignment on the parameter condition affecting the operation state of the device is consistent with that in the active/standby state operation switching method disclosed in the foregoing embodiment, which is not described herein again.
In some embodiments, the apparatus further comprises:
the weight determining module is used for determining a weight value of the first equipment or the second equipment under the last running condition;
the third accumulation module is used for accumulating the weight of each parameter condition of the first equipment and the weight value of the first equipment under the last running condition to obtain a third weight value;
the fourth accumulation module is used for accumulating the weight of each parameter condition of the second equipment and the weight value of the second equipment under the last running condition to obtain a fourth weight value;
the state determining module is further configured to compare the third weight value and the fourth weight value, and determine a master running state of the first device and a master running state of the second device.
In the process of determining the overall weight value of the device, the weight value of the device under the last running condition is added on the basis of considering the weight value of each parameter condition to obtain the overall weight value of the device, and the weight of the default priority of the device is also used as the basis for determining the active/standby state so as to avoid the system from making unnecessary active/standby switching actions
A third embodiment of the invention discloses a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, implements a method as described above.
It should be noted that the logic and/or steps represented in the flowcharts or otherwise described herein, for example, may be considered as a ordered listing of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
While embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the invention, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the invention.
Claims (10)
1. A primary and backup operation switching method, the method comprising:
dynamically assigning weights to parameter conditions affecting the operating states of the devices based on the operating states of the first device and the second device, wherein the parameter conditions include at least two of a switching mode, a fault switching mode, an automatic mode and a default selection;
accumulating the weights of the parameter conditions of the first equipment to obtain a first weight value;
accumulating the weights of the parameter conditions of the second equipment to obtain a second weight value;
comparing the first weight value with the second weight value, determining the main running state of the first equipment and the second equipment, determining the equipment state corresponding to the larger weight value in the first weight value and the second weight value as the master state, and determining the equipment state corresponding to the smaller weight value as the slave state.
2. The method for switching between main and standby operation according to claim 1, wherein when the parameter condition is a switching mode, the dynamically assigning weights to the parameter condition affecting the operation state of the device comprises:
if the switching mode is a manual switching mode to a host mode, assigning k1 to a weight item x1 of the switching mode;
if the switching mode is a manual switching to a standby mode, assigning k2 to a weight item x1 of the switching mode;
if the switching mode is an automatic switching mode, assigning k3 to a weight item x1 of the switching mode;
where k1> k2=k3=0.
3. The primary-backup operation switching method as claimed in claim 1, wherein said dynamically assigning weights to parameter conditions affecting an operation state of the device when said parameter conditions are fail-over, comprises:
judging whether heartbeat information of opposite terminal equipment is received or not;
if yes, determining that the opposite terminal equipment has no fault, and assigning the weight item x2 of the fault switching as followsl2;
If not, determining the fault unsynchronized state of the opposite terminal equipment, and assigning a weight item x2 of the fault switching as followsl1;
Wherein,l1 > l2 = 0。
4. the primary-backup operation switching method of claim 3, wherein upon determining the failed unsynchronized state, the method further comprises:
delay setting time waiting for synchronization;
and when the set time is exceeded, switching the equipment to be in a host mode.
5. The master-slave operation switching method according to claim 2, wherein in the automatic mode, the method further comprises:
if the substation does not receive a remote adjustment command sent by the master station in two command periods, assigning m1 for a weight item of the automatic mode;
if the substation receives a remote adjustment instruction sent by the master station in the two instruction periods and the remote adjustment instruction is a new instruction, assigning m2 to a weight item of the automatic mode;
if the substation receives a remote adjustment instruction sent by the master station in the two instruction periods and the remote adjustment instruction is an old instruction, assigning m3 to a weight item of the automatic mode;
if the substation receives two remote adjustment instructions sent by the main station in the two instruction periods, assigning m4 to a weight item of the automatic mode;
wherein m4> m3> m2> m1.
6. The primary and backup operation switching method of claim 5, wherein the method further comprises:
when the remote adjustment instruction is received, recording a time count tick of the remote adjustment instruction;
calculating the time difference between the time count tick and the current tick as a tick interval;
and confirming that the remote regulation instruction is the new instruction or the old instruction according to the tick interval.
7. The method for switching between main and standby operation according to claim 5, wherein when the parameter condition is a default selection, the dynamically assigning weights to the parameter conditions affecting the operation state of the device comprises:
and assigning the priority weight item as x4=n1 according to the default primary and secondary priority, wherein n1< m1.
8. The primary-backup operation switching method of claim 1, wherein for the first device or the second device, the method further comprises:
determining a weight value of the first equipment or the second equipment under the last running condition;
accumulating the weight of each parameter condition of the first equipment and the weight value of the first equipment under the last running condition to obtain a third weight value;
accumulating the weight of each parameter condition of the second equipment and the weight value of the second equipment under the last running condition to obtain a fourth weight value;
and comparing the third weight value with the fourth weight value to determine the main and standby running states of the first equipment and the second equipment.
9. A primary-backup operation switching device, characterized by comprising:
the dynamic assignment module is used for carrying out dynamic weight assignment on parameter conditions affecting the running states of the equipment based on the running states of the first equipment and the second equipment, wherein the parameter conditions comprise at least two of a switching mode, a fault switching mode, an automatic mode and a default selection;
the first accumulation module is used for accumulating the weights of the parameter conditions of the first equipment to obtain a first weight value;
the second accumulation module is used for accumulating the weights of the parameter conditions of the second equipment to obtain a second weight value;
the state determining module is used for comparing the first weight value and the second weight value, determining the master running state of the first equipment and the second equipment, determining the equipment state corresponding to the larger weight value in the first weight value and the second weight value as the master state, and determining the equipment state corresponding to the smaller weight value as the slave state.
10. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111502409.XA CN114244735B (en) | 2021-12-09 | 2021-12-09 | Master and slave operation switching method, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111502409.XA CN114244735B (en) | 2021-12-09 | 2021-12-09 | Master and slave operation switching method, device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114244735A CN114244735A (en) | 2022-03-25 |
CN114244735B true CN114244735B (en) | 2024-01-16 |
Family
ID=80754448
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111502409.XA Active CN114244735B (en) | 2021-12-09 | 2021-12-09 | Master and slave operation switching method, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114244735B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115296983A (en) * | 2022-08-03 | 2022-11-04 | 青岛海信微联信号有限公司 | Equipment management method and device, electronic equipment and storage medium |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4517639A (en) * | 1982-05-13 | 1985-05-14 | The Boeing Company | Fault scoring and selection circuit and method for redundant system |
CN101163047A (en) * | 2007-11-23 | 2008-04-16 | 上海华为技术有限公司 | Method and device for implementing rearrangement of main equipment and standby equipment |
JP2008226153A (en) * | 2007-03-15 | 2008-09-25 | Toshiba Corp | Redundant computer system |
CN101640688A (en) * | 2009-08-20 | 2010-02-03 | 中兴通讯股份有限公司 | Content delivery network (CDN)-based switching method for main node controller and spare controller and CDN |
CN101702681A (en) * | 2009-11-26 | 2010-05-05 | 福建星网锐捷网络有限公司 | Switching method and device of main/standby router in virtual route redundancy protocol |
CN102035683A (en) * | 2010-12-20 | 2011-04-27 | 新邮通信设备有限公司 | Control method and system for switching of main board and standby board |
CN106789445A (en) * | 2017-02-06 | 2017-05-31 | 凌云天博光电科技股份有限公司 | The state polling method and system of the network equipment in a kind of CHINA RFTCOM Co Ltd |
CN107634855A (en) * | 2017-09-12 | 2018-01-26 | 天津津航计算技术研究所 | A kind of double hot standby method of embedded system |
CN107969727A (en) * | 2017-11-20 | 2018-05-01 | 浙江中烟工业有限责任公司 | A kind of multichannel PID control method for automatically switching suitable for throwing smoke machine |
CN109194514A (en) * | 2018-09-11 | 2019-01-11 | 上海思源弘瑞自动化有限公司 | A kind of two-shipper monitoring method, device, server and storage medium |
WO2020156584A1 (en) * | 2019-02-03 | 2020-08-06 | 比亚迪股份有限公司 | Automatic switching system and method of front-end processor |
CN111641522A (en) * | 2020-05-25 | 2020-09-08 | 杭州安恒信息技术股份有限公司 | Method, system and computer equipment for node switching |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9930481B2 (en) * | 2016-03-07 | 2018-03-27 | International Business Machines Corporation | Switching mobile devices to auto-silent mode |
-
2021
- 2021-12-09 CN CN202111502409.XA patent/CN114244735B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4517639A (en) * | 1982-05-13 | 1985-05-14 | The Boeing Company | Fault scoring and selection circuit and method for redundant system |
JP2008226153A (en) * | 2007-03-15 | 2008-09-25 | Toshiba Corp | Redundant computer system |
CN101163047A (en) * | 2007-11-23 | 2008-04-16 | 上海华为技术有限公司 | Method and device for implementing rearrangement of main equipment and standby equipment |
CN101640688A (en) * | 2009-08-20 | 2010-02-03 | 中兴通讯股份有限公司 | Content delivery network (CDN)-based switching method for main node controller and spare controller and CDN |
CN101702681A (en) * | 2009-11-26 | 2010-05-05 | 福建星网锐捷网络有限公司 | Switching method and device of main/standby router in virtual route redundancy protocol |
CN102035683A (en) * | 2010-12-20 | 2011-04-27 | 新邮通信设备有限公司 | Control method and system for switching of main board and standby board |
CN106789445A (en) * | 2017-02-06 | 2017-05-31 | 凌云天博光电科技股份有限公司 | The state polling method and system of the network equipment in a kind of CHINA RFTCOM Co Ltd |
CN107634855A (en) * | 2017-09-12 | 2018-01-26 | 天津津航计算技术研究所 | A kind of double hot standby method of embedded system |
CN107969727A (en) * | 2017-11-20 | 2018-05-01 | 浙江中烟工业有限责任公司 | A kind of multichannel PID control method for automatically switching suitable for throwing smoke machine |
CN109194514A (en) * | 2018-09-11 | 2019-01-11 | 上海思源弘瑞自动化有限公司 | A kind of two-shipper monitoring method, device, server and storage medium |
WO2020156584A1 (en) * | 2019-02-03 | 2020-08-06 | 比亚迪股份有限公司 | Automatic switching system and method of front-end processor |
CN111641522A (en) * | 2020-05-25 | 2020-09-08 | 杭州安恒信息技术股份有限公司 | Method, system and computer equipment for node switching |
Also Published As
Publication number | Publication date |
---|---|
CN114244735A (en) | 2022-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109032849B (en) | Hot backup system, hot backup method and computer equipment | |
WO2004031979A2 (en) | Method of solving a split-brain condition | |
CN108984349B (en) | Method and device for electing master node, medium and computing equipment | |
CN114244735B (en) | Master and slave operation switching method, device and storage medium | |
CN110618889A (en) | Service availability detection method and device, computer equipment and storage medium | |
CN113810216A (en) | Cluster fault switching method and device and electronic equipment | |
CN110515757B (en) | Information processing method, device, server and medium of distributed storage system | |
CN103885863A (en) | System fault processing method and virtual machine | |
CN113064614B (en) | Firmware upgrading method and system for redundant power supply system of server | |
CN112269693B (en) | Node self-coordination method, device and computer readable storage medium | |
CN113987065A (en) | Database drifting method, system, electronic device and storage medium | |
CN112231142A (en) | System backup recovery method and device, computer equipment and storage medium | |
CN107094167B (en) | Data unloading method and device | |
CN108319679B (en) | Method and device for generating primary key | |
JP5594668B2 (en) | Node, clustering system, clustering system control method, and program | |
JP4798351B2 (en) | Computer system, interface allocation method and program | |
CN116610502A (en) | Fault transfer method, storage medium and equipment for asynchronous database cluster | |
CN115905270B (en) | Method and device for determining active data nodes in database and storage medium | |
CN111669452A (en) | High-availability method and device based on multi-master DNS (Domain name System) architecture | |
CN114500525B (en) | Method, device, computer equipment and medium for updating nodes in distributed system | |
JP7537134B2 (en) | CONTAINER MANAGEMENT DEVICE, CONTAINER MANAGEMENT METHOD, AND PROGRAM | |
CN110837451B (en) | Processing method, device, equipment and medium for high availability of virtual machine | |
CN116089149A (en) | Database system operation method, storage medium and device | |
CN105653389A (en) | Data diagnosis and recovery method and device | |
CN116955018A (en) | Disaster recovery double-activity implementation method, system, storage medium and electronic equipment |
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 |