CN116827761B - Dual-machine hot standby switching method, system, equipment and medium - Google Patents

Dual-machine hot standby switching method, system, equipment and medium Download PDF

Info

Publication number
CN116827761B
CN116827761B CN202311101976.3A CN202311101976A CN116827761B CN 116827761 B CN116827761 B CN 116827761B CN 202311101976 A CN202311101976 A CN 202311101976A CN 116827761 B CN116827761 B CN 116827761B
Authority
CN
China
Prior art keywords
standby
station
site
switching
trigger signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311101976.3A
Other languages
Chinese (zh)
Other versions
CN116827761A (en
Inventor
卢瑞昕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Dinstar Co ltd
Original Assignee
Shenzhen Dinstar Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Dinstar Co ltd filed Critical Shenzhen Dinstar Co ltd
Priority to CN202311101976.3A priority Critical patent/CN116827761B/en
Publication of CN116827761A publication Critical patent/CN116827761A/en
Application granted granted Critical
Publication of CN116827761B publication Critical patent/CN116827761B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Hardware Redundancy (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a method, a system, equipment and a medium for switching dual-computer hot standby, and belongs to the technical field of dual-computer hot standby. And the main station establishes communication connection with at least one standby station, and transmits the state and attribute data of the main station to the at least one standby station. After receiving the state and attribute data of the active site, the standby site predicts the state and attribute data to determine a trigger signal that the active site will fail and returns the trigger signal to the active site. After the active station monitors the trigger signal returned by the standby station, the active station is switched to the standby station, the target standby station is determined according to the trigger signal, and then the switching signal is sent to the target standby station, so that the target standby station is switched to the active station after the switching signal is received. Therefore, the calculation and storage resources of the standby server in the standby state are fully utilized, the fault of the main server is determined in advance by predicting the state and attribute data of the main server, and the potential fault of the main server is detected in time.

Description

Dual-machine hot standby switching method, system, equipment and medium
Technical Field
The present application relates to the field of dual hot standby technologies, and in particular, to a dual hot standby switching method, a dual hot standby switching system, a site device, and a computer readable storage medium.
Background
Dual hot standby (Dual-Machine Hot Standby) is a high availability architecture in which there are two servers (one primary and one secondary), the primary server handles the actual workload, and the secondary server is on standby ready to take over the functions of the primary server. In a dual hot standby architecture, data synchronization is maintained between the primary and standby servers to ensure that data on the standby servers remains consistent with the primary server. Common data synchronization methods include replication-based techniques such as database replication or file synchronization. When the main server fails or is not available, the standby server immediately takes over the roles of the standby server and continues to process the user requests and tasks. This handoff process is typically automatic and needs to be done as quickly as possible to reduce system downtime and the impact of the user experience. The dual hot-standby architecture provides high availability and fault recovery capability so that the system can continue to operate properly even if a hardware fault, software error, or other unexpected situation occurs. It can be applied to various critical business systems such as database servers, web servers, application servers, etc. to ensure continuity and availability of the system.
However, in the event of a failure of the primary server, the secondary server needs to take over its work. The time of the failover depends on a number of factors, including detection time, resource preparation time, service start time, and the like. If the failover time is too long, it may result in delays or interruptions in user requests. In addition, under normal conditions, the standby server is in a standby state, and its computing and storage resources are not fully utilized. This may result in lower resource utilization and increased system costs.
Therefore, the problem that the fault detection of the main server is not timely and the utilization rate of the standby server is low exists in the existing dual-machine hot standby, and a method for timely detecting the potential fault of the main server and fully utilizing the standby server is needed.
Disclosure of Invention
The application mainly aims to provide a method for switching a dual-computer hot standby, a system for switching the dual-computer hot standby, site equipment and a computer readable storage medium, and aims to timely detect potential faults of a main server and fully utilize the standby server.
In order to achieve the above object, the present application provides a method for switching dual hot standby, where the method is applied to a primary station, and the method includes:
establishing communication connection with at least one standby site, and transmitting state and attribute data of the active site to at least one standby site;
Monitoring a trigger signal returned by the standby station, wherein the standby station returns the trigger signal to the active station after predicting and determining that the active station will fail based on the state and attribute data;
and after receiving a trigger signal returned by the standby station, switching to the standby station, determining a target standby station based on the trigger signal, and sending a switching signal to the target standby station, wherein the target standby station is switched to the active station after receiving the switching signal.
Illustratively, the step of switching to the standby station and determining the target standby station based on the trigger signal after receiving the trigger signal returned by the standby station includes:
after receiving the first trigger signal returned by the standby station, or after receiving that the number of trigger signals returned by the standby station is greater than or equal to a preset number, switching to the standby station and determining a target standby station based on the trigger signals.
Illustratively, the step of determining the target backup station based on the trigger signal includes:
determining a standby station of the first returned trigger signal as a target standby station;
Or the trigger signals comprise the state and attribute data of the standby stations, and the target standby stations are determined based on the state and attribute data of the standby stations in the trigger signals which are larger than or equal to the preset number.
In order to achieve the above object, the present application provides a method for switching a dual hot standby, the method being applied to a standby station, the method comprising:
establishing communication connection with a main station, and receiving state and attribute data of the main station;
after determining that the active site will fail based on the state and attribute data predictions, returning a trigger signal to the active site;
and switching to the active site after receiving the switching signal of the active site.
Illustratively, the step of returning a trigger signal to the active site after determining that the active site will fail based on the state and attribute data predictions includes:
predicting the state and attribute data based on a plurality of preset prediction models to obtain prediction results of all preset prediction models, wherein the prediction results of all preset prediction models comprise that the main station is about to fail and the main station is not failed;
And after the quantity proportion of the predicted results with faults in all the predicted results of the active site is larger than a preset proportion, determining that the active site will be faulty and returning a trigger signal to the active site.
Illustratively, the step of predictively determining that the active site will fail based on the state and attribute data includes:
on any standby site, determining a target prediction model corresponding to the state and attribute of the standby site;
predicting the state and attribute data of the active site based on the target prediction model of each standby site to obtain a prediction result of each standby site, wherein the prediction result of each standby site comprises that the active site will fail or the active site will not fail;
and after the number proportion of the predicted results with faults in the active site in all the predicted results is larger than a preset proportion, determining that the active site will be faulty and returning a trigger signal to the active site by any standby site.
Illustratively, the step of returning a trigger signal to the active site includes:
And returning a trigger signal comprising the state and attribute data of the standby site to the active site.
The application also provides a dual-machine hot standby system, which comprises:
a primary site, at least one backup site;
establishing communication connection with at least one standby site on the active site, and transmitting state and attribute data of the active site to at least one standby site; monitoring a trigger signal returned by the standby station, wherein the standby station returns the trigger signal to the active station after predicting and determining that the active station will fail based on the state and attribute data; after receiving a trigger signal returned by the standby station, switching to the standby station, determining a target standby station based on the trigger signal, and sending a switching signal to the target standby station, wherein the target standby station is switched to a main station after receiving the switching signal;
establishing communication connection with a main station on the standby station, and receiving state and attribute data of the main station; after determining that the active site will fail based on the state and attribute data predictions, returning a trigger signal to the active site; and switching to the active site after receiving the switching signal of the active site.
The application also provides a station device, which comprises: memory, a processor, and a computer program stored on the memory and executable on the processor, which when executed by the processor, performs the steps of the dual hot standby switching method as claimed in any one of the preceding claims.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method for switching a dual hot standby as described above.
The application also provides a first switching device of the dual-machine hot standby, which comprises:
the first communication module is used for establishing communication connection with at least one standby site and sending the state and attribute data of the active site to at least one standby site;
the monitoring module is used for monitoring a trigger signal returned by the standby station, wherein the standby station returns the trigger signal to the active station after predicting and determining that the active station is about to fail based on the state and attribute data;
and the first switching module is used for switching to the standby station after receiving the trigger signal returned by the standby station, determining a target standby station based on the trigger signal and sending a switching signal to the target standby station, wherein the target standby station is switched to the main station after receiving the switching signal.
The application also provides a second switching device of the dual-machine hot standby, which comprises:
the second communication module is used for establishing communication connection with the main station and receiving the state and attribute data of the main station;
the return module is used for returning a trigger signal to the active site after the active site is predicted and determined to have faults based on the state and the attribute data;
and the second switching module is used for switching to the active site after receiving the switching signal of the active site.
The embodiment of the application provides a switching method of a dual-computer hot standby, a switching system of the dual-computer hot standby, site equipment and a computer readable storage medium, wherein a communication connection is established between a main site and at least one standby site, and state and attribute data of the main site are sent to at least one standby site; monitoring a trigger signal returned by the standby station, wherein the standby station returns the trigger signal to the active station after predicting and determining that the active station will fail based on the state and attribute data; and after receiving a trigger signal returned by the standby station, switching to the standby station, determining a target standby station based on the trigger signal, and sending a switching signal to the target standby station, wherein the target standby station is switched to the active station after receiving the switching signal. Establishing communication connection with a main station at a standby station, and receiving state and attribute data of the main station; after determining that the active site will fail based on the state and attribute data predictions, returning a trigger signal to the active site; and switching to the active site after receiving the switching signal of the active site.
In the application, a communication connection is established between the active site and at least one standby site, and the active site transmits its status and attribute data to the at least one standby site. After receiving the state and attribute data of the active site, the standby site predicts the state and attribute data to determine a trigger signal that the active site will fail and returns the trigger signal to the active site. After the active station monitors the trigger signal returned by the standby station, the active station is switched to the standby station, the target standby station is determined according to the trigger signal, and then the switching signal is sent to the target standby station, so that the target standby station is switched to the active station after the switching signal is received. Therefore, the calculation and storage resources of the standby server in the standby state are fully utilized, the fault of the main server is determined in advance by predicting the state and attribute data of the main server, and the potential fault of the main server is detected in time.
Drawings
FIG. 1 is a schematic diagram of an operating device of a hardware operating environment according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of an embodiment of a method for switching dual hot standby according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of another embodiment of a method for switching dual hot standby according to an embodiment of the present application;
Fig. 4 is a schematic diagram of a first switching device of a dual hot standby according to an embodiment of the present application;
fig. 5 is a schematic diagram of a second switching device of a dual hot standby according to an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
Referring to fig. 1, fig. 1 is a schematic diagram of an operating device of a hardware operating environment according to an embodiment of the present application.
As shown in fig. 1, the operation device may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) Memory or a stable nonvolatile Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the structure shown in fig. 1 is not limiting of the operating device and may include more or fewer components than shown, or certain components may be combined, or a different arrangement of components.
As shown in fig. 1, an operating system, a data storage module, a network communication module, a user interface module, and a computer program may be included in the memory 1005 as one type of storage medium.
In the operating device shown in fig. 1, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with a user; the processor 1001, the memory 1005 in the operation device of the present application may be provided in an operation device that calls a computer program stored in the memory 1005 through the processor 1001 and performs the following operations:
establishing communication connection with at least one standby site, and transmitting state and attribute data of the active site to at least one standby site;
monitoring a trigger signal returned by the standby station, wherein the standby station returns the trigger signal to the active station after predicting and determining that the active station will fail based on the state and attribute data;
And after receiving a trigger signal returned by the standby station, switching to the standby station, determining a target standby station based on the trigger signal, and sending a switching signal to the target standby station, wherein the target standby station is switched to the active station after receiving the switching signal.
In an embodiment, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations:
the step of switching to the standby station after receiving the trigger signal returned by the standby station and determining the target standby station based on the trigger signal comprises the following steps:
after receiving the first trigger signal returned by the standby station, or after receiving that the number of trigger signals returned by the standby station is greater than or equal to a preset number, switching to the standby station and determining a target standby station based on the trigger signals.
In an embodiment, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations:
the step of determining the target standby station based on the trigger signal includes:
determining a standby station of the first returned trigger signal as a target standby station;
Or the trigger signals comprise the state and attribute data of the standby stations, and the target standby stations are determined based on the state and attribute data of the standby stations in the trigger signals which are larger than or equal to the preset number.
In an embodiment, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations:
establishing communication connection with a main station, and receiving state and attribute data of the main station;
after determining that the active site will fail based on the state and attribute data predictions, returning a trigger signal to the active site;
and switching to the active site after receiving the switching signal of the active site.
In an embodiment, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations:
the step of returning a trigger signal to the active site after determining that the active site will fail based on the state and attribute data predictions includes:
predicting the state and attribute data based on a plurality of preset prediction models to obtain prediction results of all preset prediction models, wherein the prediction results of all preset prediction models comprise that the main station is about to fail and the main station is not failed;
And after the quantity proportion of the predicted results with faults in all the predicted results of the active site is larger than a preset proportion, determining that the active site will be faulty and returning a trigger signal to the active site.
In an embodiment, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations:
the step of determining that the active site will fail based on the state and attribute data predictions includes:
on any standby site, determining a target prediction model corresponding to the state and attribute of the standby site;
predicting the state and attribute data of the active site based on the target prediction model of each standby site to obtain a prediction result of each standby site, wherein the prediction result of each standby site comprises that the active site will fail or the active site will not fail;
and after the number proportion of the predicted results with faults in the active site in all the predicted results is larger than a preset proportion, determining that the active site will be faulty and returning a trigger signal to the active site by any standby site.
In an embodiment, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations:
the step of returning a trigger signal to the active site includes:
and returning a trigger signal comprising the state and attribute data of the standby site to the active site.
Referring to fig. 2, in an embodiment of a method for switching a dual hot standby, the method is applied to a main station, and the method includes:
step S10, establishing communication connection with at least one standby site, and sending state and attribute data of the active site to at least one standby site;
in the application, the main site is a main server, and the standby site is a standby server; the main site refers to a logical main site, which is a site providing service currently, and the standby site refers to a logical standby site, which plays a role in protecting the main site; the physical master site and the backup site are determined during installation and cannot be changed along with the switching of the master-backup relationship. The main station product is in the main state most of the time and provides service to the outside; the standby site product is in standby state most of the time, and plays a role in protecting the primary site.
In this embodiment, the dual hot standby switching system includes a primary station and at least one backup station, where the primary station and the at least one backup station establish a communication connection, and belong to a one-to-many communication connection relationship, and the primary station sends state and attribute data of the primary station itself to the at least one backup station, where the state and attribute data of the primary station includes, but is not limited to, 1, data storage related data: the primary site typically stores all business data and status information, including databases, file systems, caches, etc. 2. Request processing related data: the active site is responsible for receiving requests from clients and performing corresponding processing and response, including the number of client requests, etc. 3. Computing resource-related data: the active site typically has high computational power for executing complex business logic and algorithms, including data such as central processor resources, memory resources, and the like. 4. Network connection related data: the active site needs to establish a connection with the client and handle network communications, including data such as network resources.
Step S20, monitoring a trigger signal returned by the standby station, wherein the standby station returns the trigger signal to the active station after predicting and determining that the active station will fail based on the state and attribute data;
After the state and attribute data of the active site are sent to at least one standby site, the active site monitors a trigger signal returned by the standby site, a prediction model for predicting whether a fault will occur or not based on the state and attribute data is arranged on the standby site, and the returned trigger signal is a signal for predicting and determining that the active site will occur based on the state and attribute data of the active site sent by the active site by the standby site.
Step S30, after receiving a trigger signal returned by the standby station, switching to the standby station, determining a target standby station based on the trigger signal, and sending a switching signal to the target standby station, wherein the target standby station switches to a main station after receiving the switching signal.
After receiving the trigger signal returned by the standby station, the active station can automatically switch to the standby station and determine the target standby station based on the trigger signal, then the switching signal is sent to the target standby station, and the target standby station automatically switches to the active station after receiving the switching signal, so that the active-standby switching is completed.
Illustratively, the step of switching to the standby station and determining the target standby station based on the trigger signal after receiving the trigger signal returned by the standby station includes:
After receiving the first trigger signal returned by the standby station, or after receiving that the number of trigger signals returned by the standby station is greater than or equal to a preset number, switching to the standby station and determining a target standby station based on the trigger signals.
After receiving a trigger signal returned by the standby station, when switching to the standby station and determining a target standby station based on the trigger signal, switching to the standby station and determining the target standby station based on the trigger signal after receiving a first trigger signal returned by the standby station, so as to quickly complete the primary-standby switching; or after the number of the trigger signals returned by the standby stations is greater than or equal to the preset number, switching to the standby stations and determining the target standby stations based on the trigger signals so as to accurately complete the primary and standby switching.
Illustratively, the step of determining the target backup station based on the trigger signal includes:
determining a standby station of the first returned trigger signal as a target standby station;
or the trigger signals comprise the state and attribute data of the standby stations, and the target standby stations are determined based on the state and attribute data of the standby stations in the trigger signals which are larger than or equal to the preset number.
When the target standby station is determined based on the trigger signal, the standby station returning the trigger signal can be determined to be the target standby station, so that the primary-standby switching can be completed quickly. Or the trigger signals comprise the state and attribute data of the standby stations, and the target standby stations are determined based on the state and attribute data of the standby stations in the trigger signals which are larger than or equal to the preset number so as to accurately complete the primary-standby switching.
Wherein, the state and attribute data of the standby station include but are not limited to: 1. number of data copies: the backup node generally stores a copy or backup of the data of the primary node, and can maintain the consistency of the data by means of real-time data copying or incremental synchronization. 2. Number of detected faults: the standby node is responsible for monitoring the running state of the main node so as to discover the faults of the main node in time. 3. Handover preparation related data: the standby node needs to be ready to take over the work of the master node, including preloading data, preparing computing resources, setting up network connections, and so forth. 4. Number of detected heartbeats: the standby node will normally perform heartbeat detection with the main node periodically to determine whether the main node is operating normally.
In this embodiment, a communication connection is established between the active site and at least one standby site, and the active site transmits its status and attribute data to the at least one standby site. After receiving the state and attribute data of the active site, the standby site predicts the state and attribute data to determine a trigger signal that the active site will fail and returns the trigger signal to the active site. After the active station monitors the trigger signal returned by the standby station, the active station is switched to the standby station, the target standby station is determined according to the trigger signal, and then the switching signal is sent to the target standby station, so that the target standby station is switched to the active station after the switching signal is received. Therefore, the calculation and storage resources of the standby server in the standby state are fully utilized, the fault of the main server is determined in advance by predicting the state and attribute data of the main server, and the potential fault of the main server is detected in time.
The embodiment of the application provides a method for switching a dual hot standby, referring to fig. 3, in an embodiment of the method for switching the dual hot standby, the method is applied to a standby station, and the method includes:
step T10, establishing communication connection with a main station, and receiving state and attribute data of the main station;
in the application, the main site is a main server, and the standby site is a standby server; the main site refers to a logical main site, which is a site providing service currently, and the standby site refers to a logical standby site, which plays a role in protecting the main site; the physical master site and the backup site are determined during installation and cannot be changed along with the switching of the master-backup relationship. The main station product is in the main state most of the time and provides service to the outside; the standby site product is in standby state most of the time, and plays a role in protecting the primary site.
In this embodiment, the dual hot standby switching system includes a primary station and at least one backup station, where the primary station and the at least one backup station establish a communication connection, and belong to a one-to-many communication connection relationship, and the backup station receives state and attribute data of the primary station, where the state and attribute data of the primary station includes, but is not limited to, 1, data storage related data: the primary site typically stores all business data and status information, including databases, file systems, caches, etc. 2. Request processing related data: the active site is responsible for receiving requests from clients and performing corresponding processing and response, including the number of client requests, etc. 3. Computing resource-related data: the active site typically has high computational power for executing complex business logic and algorithms, including data such as central processor resources, memory resources, and the like. 4. Network connection related data: the active site needs to establish a connection with the client and handle network communications, including data such as network resources.
Step T20, after the main station is predicted and determined to have faults based on the state and attribute data, a trigger signal is returned to the main station;
the standby station is provided with a prediction model for predicting whether a fault occurs or not based on the state and attribute data, and the standby station predicts and determines a trigger signal of the main station to occur based on the state and attribute data of the main station sent by the main station, and returns the trigger signal to the main station for monitoring the trigger signal returned by the standby station.
Illustratively, the step of returning a trigger signal to the active site after determining that the active site will fail based on the state and attribute data predictions includes:
predicting the state and attribute data based on a plurality of preset prediction models to obtain prediction results of all preset prediction models, wherein the prediction results of all preset prediction models comprise that the main station is about to fail and the main station is not failed;
and after the quantity proportion of the predicted results with faults in all the predicted results of the active site is larger than a preset proportion, determining that the active site will be faulty and returning a trigger signal to the active site.
In this embodiment, a plurality of preset prediction models are mounted on the backup site, which may be a plurality of prediction models of the same type or a plurality of prediction models, and the prediction models may predict whether the primary site will fail according to the state and attribute data of the primary site.
After the main station is predicted and determined to be faulty based on the state and attribute data of the main station, when a trigger signal is returned to the main station, the state and attribute data of the main station are predicted based on a plurality of preset prediction models, and the prediction results of the main station of each preset prediction model being faulty and the main station not being faulty are obtained.
After the number proportion of the prediction results of the faults of the main station in all the prediction results is larger than a preset proportion, the probability that the main station will have faults can be considered to be larger, and then the main station will have faults can be accurately determined, and a trigger signal is returned to the main station.
Illustratively, the step of predictively determining that the active site will fail based on the state and attribute data includes:
on any standby site, determining a target prediction model corresponding to the state and attribute of the standby site;
Predicting the state and attribute data of the active site based on the target prediction model of each standby site to obtain a prediction result of each standby site, wherein the prediction result of each standby site comprises that the active site will fail or the active site will not fail;
and after the number proportion of the predicted results with faults in the active site in all the predicted results is larger than a preset proportion, determining that the active site will be faulty and returning a trigger signal to the active site by any standby site.
When the main station is predicted and determined to be faulty based on the state and attribute data of the main station, the states and attributes of the standby stations are different from each other, and the states and the attributes at each moment are also different from each other, so that a corresponding target prediction model is determined on any standby station according to the states and the attributes of the standby stations, and a prediction result is obtained more accurately and rapidly. And then, predicting the state and attribute data of the main station based on the target prediction model of each standby station to obtain the prediction result of each standby station.
And likewise, after the number proportion of the predicted results of the primary site to be faulty in all the predicted results is larger than a preset proportion, determining that the primary site is to be faulty. Meanwhile, any standby station returns a trigger signal to the main station, the first standby station receives the state and attribute of the main station and returns the trigger signal to the main station, the first standby station which obtains the prediction result returns the trigger signal to the main station, the standby station returns the trigger signal to the main station when the quantity of the standby station is larger than the preset proportion, communication connection can exist between the standby stations, and the standby station which is most idle at present and has the greatest residual calculation power and resources returns the trigger signal to the main station.
Illustratively, the step of returning a trigger signal to the active site includes:
and returning a trigger signal comprising the state and attribute data of the standby site to the active site.
When a trigger signal is returned to the active site, the trigger signal includes state and attribute data of the standby site. Therefore, after receiving the trigger signal returned by the standby station, the active station automatically switches to the standby station, and simultaneously determines the target standby station based on the trigger signal, and then the active station sends a switching signal to the target standby station. And the target standby station is automatically switched to the active station after receiving the switching signal, so that the active-standby switching is completed.
Step T30, after receiving the switching signal of the active site, switching to the active site.
After receiving the trigger signal returned by the standby station, the active station automatically switches to the standby station, determines the target standby station based on the trigger signal, and then sends a switching signal to the target standby station. If the current standby station is the target standby station, the current standby station is automatically switched to the active station after receiving the switching signal, so that the active-standby switching is completed.
In this embodiment, a communication connection is established between the active site and at least one standby site, and the active site transmits its status and attribute data to the at least one standby site. After receiving the state and attribute data of the active site, the standby site predicts the state and attribute data to determine a trigger signal that the active site will fail and returns the trigger signal to the active site. After the active station monitors the trigger signal returned by the standby station, the active station is switched to the standby station, the target standby station is determined according to the trigger signal, and then the switching signal is sent to the target standby station, so that the target standby station is switched to the active station after the switching signal is received. Therefore, the calculation and storage resources of the standby server in the standby state are fully utilized, the fault of the main server is determined in advance by predicting the state and attribute data of the main server, and the potential fault of the main server is detected in time.
Referring to fig. 4, in addition, the embodiment of the application further provides a first switching device of the dual hot standby, where the first switching device includes:
the first communication module M1 is configured to establish a communication connection with at least one backup station, and send status and attribute data of the primary station to at least one backup station;
A monitoring module M2, configured to monitor a trigger signal returned by the backup station, where the backup station returns the trigger signal to the active station after predicting and determining that the active station will fail based on the state and attribute data;
and the first switching module M3 is used for switching to the standby station after receiving the trigger signal returned by the standby station, determining a target standby station based on the trigger signal and sending a switching signal to the target standby station, wherein the target standby station is switched to the active station after receiving the switching signal.
Illustratively, the first switching module is further configured to:
after receiving the first trigger signal returned by the standby station, or after receiving that the number of trigger signals returned by the standby station is greater than or equal to a preset number, switching to the standby station and determining a target standby station based on the trigger signals.
Illustratively, the first switching module is further configured to:
determining a standby station of the first returned trigger signal as a target standby station;
or the trigger signals comprise the state and attribute data of the standby stations, and the target standby stations are determined based on the state and attribute data of the standby stations in the trigger signals which are larger than or equal to the preset number.
The first switching device of the dual hot standby adopts the switching method of the dual hot standby in the embodiment, and aims to timely detect potential faults of the main server and fully utilize the standby server. Compared with the conventional technology, the beneficial effects of the first switching device of the dual hot standby provided by the embodiment of the application are the same as those of the switching method of the dual hot standby provided by the embodiment, and other technical features in the first switching device of the dual hot standby are the same as those disclosed by the method of the embodiment, so that the description is omitted herein.
Referring to fig. 5, in addition, an embodiment of the present application further provides a second switching device for dual hot standby, where the second switching device includes:
the second communication module N1 is used for establishing communication connection with the main station and receiving state and attribute data of the main station;
a return module N2, configured to return a trigger signal to the active site after predicting and determining that the active site will fail based on the state and attribute data;
and the second switching module N3 is used for switching to the active site after receiving the switching signal of the active site.
Illustratively, the return module is further configured to:
Predicting the state and attribute data based on a plurality of preset prediction models to obtain prediction results of all preset prediction models, wherein the prediction results of all preset prediction models comprise that the main station is about to fail and the main station is not failed;
and after the quantity proportion of the predicted results with faults in all the predicted results of the active site is larger than a preset proportion, determining that the active site will be faulty and returning a trigger signal to the active site.
Illustratively, the return module is further configured to:
on any standby site, determining a target prediction model corresponding to the state and attribute of the standby site;
predicting the state and attribute data of the active site based on the target prediction model of each standby site to obtain a prediction result of each standby site, wherein the prediction result of each standby site comprises that the active site will fail or the active site will not fail;
and after the number proportion of the predicted results with faults in the active site in all the predicted results is larger than a preset proportion, determining that the active site will be faulty and returning a trigger signal to the active site by any standby site.
Illustratively, the return module is further configured to:
and returning a trigger signal comprising the state and attribute data of the standby site to the active site.
The second switching device of the dual hot standby adopts the switching method of the dual hot standby in the embodiment, and aims to timely detect potential faults of the main server and fully utilize the standby server. Compared with the conventional technology, the second switching device for dual hot standby provided by the embodiment of the application has the same beneficial effects as the switching method for dual hot standby provided by the embodiment, and other technical features in the second switching device for dual hot standby are the same as the features disclosed by the method of the embodiment, and are not repeated herein.
In addition, the embodiment of the application also provides a site device, which comprises: a memory, a processor, and a computer program stored on the memory and executable on the processor, which when executed by the processor, performs the steps of the method for switching a dual hot standby as described above.
In addition, the embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the steps of the dual hot standby switching method when being executed by a processor.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
From the above description of embodiments, it will be clear to a person skilled in the art that the above embodiment method may be implemented by means of software plus a necessary general hardware platform, but may of course also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the conventional technology in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, including several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present application.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the application, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. The method for switching the dual hot standby is characterized by being applied to a main station, and comprises the following steps:
establishing communication connection with at least one standby site, and transmitting state and attribute data of the active site to at least one standby site;
monitoring a trigger signal returned by the standby station, wherein the standby station returns the trigger signal to the active station after predicting and determining that the active station will fail based on the state and attribute data;
and after receiving a trigger signal returned by the standby station, switching to the standby station, determining a target standby station based on the trigger signal, and sending a switching signal to the target standby station, wherein the target standby station is switched to the active station after receiving the switching signal.
2. The method for switching a dual hot standby according to claim 1, wherein the step of switching to a standby station and determining a target standby station based on a trigger signal returned from the standby station after receiving the trigger signal comprises:
after receiving the first trigger signal returned by the standby station, or after receiving that the number of trigger signals returned by the standby station is greater than or equal to a preset number, switching to the standby station and determining a target standby station based on the trigger signals.
3. The method for switching a dual hot standby according to claim 2, wherein the step of determining a target standby station based on the trigger signal comprises:
determining a standby station of the first returned trigger signal as a target standby station;
or the trigger signals comprise the state and attribute data of the standby stations, and the target standby stations are determined based on the state and attribute data of the standby stations in the trigger signals which are larger than or equal to the preset number.
4. A method for switching a dual hot standby, wherein the method is applied to a standby station, and the method comprises the following steps:
establishing communication connection with a main station, and receiving state and attribute data of the main station;
After determining that the active site will fail based on the state and attribute data predictions, returning a trigger signal to the active site;
and switching to the active site after receiving the switching signal of the active site.
5. The method of switching dual hot standby of claim 4, wherein the step of returning a trigger signal to the active site after determining that the active site will fail based on the state and attribute data predictions comprises:
predicting the state and attribute data based on a plurality of preset prediction models to obtain prediction results of all preset prediction models, wherein the prediction results of all preset prediction models comprise that the main station is about to fail and the main station is not failed;
and after the quantity proportion of the predicted results with faults in all the predicted results of the active site is larger than a preset proportion, determining that the active site will be faulty and returning a trigger signal to the active site.
6. The method of switching dual hot standby of claim 4, wherein said step of predictively determining that said active site will fail based on said state and attribute data comprises:
On any standby site, determining a target prediction model corresponding to the state and attribute of the standby site;
predicting the state and attribute data of the active site based on the target prediction model of each standby site to obtain a prediction result of each standby site, wherein the prediction result of each standby site comprises that the active site will fail or the active site will not fail;
and after the number proportion of the predicted results with faults in the active site in all the predicted results is larger than a preset proportion, determining that the active site will be faulty and returning a trigger signal to the active site by any standby site.
7. The method for switching between dual hot standby according to claim 4, wherein the step of returning the trigger signal to the active site comprises:
and returning a trigger signal comprising the state and attribute data of the standby site to the active site.
8. A dual hot standby system, the system comprising:
a primary site, at least one backup site;
establishing communication connection with at least one standby site on the active site, and transmitting state and attribute data of the active site to at least one standby site; monitoring a trigger signal returned by the standby station, wherein the standby station returns the trigger signal to the active station after predicting and determining that the active station will fail based on the state and attribute data; after receiving a trigger signal returned by the standby station, switching to the standby station, determining a target standby station based on the trigger signal, and sending a switching signal to the target standby station, wherein the target standby station is switched to a main station after receiving the switching signal;
Establishing communication connection with a main station on the standby station, and receiving state and attribute data of the main station; after determining that the active site will fail based on the state and attribute data predictions, returning a trigger signal to the active site; and switching to the active site after receiving the switching signal of the active site.
9. A station apparatus, the station apparatus comprising: memory, a processor, and a computer program stored on the memory and executable on the processor, which when executed by the processor, performs the steps of the method of switching a dual hot standby according to any one of claims 1 to 3 or the steps of the method of switching a dual hot standby according to any one of claims 4 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which when being executed by a processor, implements the steps of the method for switching a dual hot standby according to any one of claims 1 to 3 or the steps of the method for switching a dual hot standby according to any one of claims 4 to 7.
CN202311101976.3A 2023-08-30 2023-08-30 Dual-machine hot standby switching method, system, equipment and medium Active CN116827761B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311101976.3A CN116827761B (en) 2023-08-30 2023-08-30 Dual-machine hot standby switching method, system, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311101976.3A CN116827761B (en) 2023-08-30 2023-08-30 Dual-machine hot standby switching method, system, equipment and medium

Publications (2)

Publication Number Publication Date
CN116827761A CN116827761A (en) 2023-09-29
CN116827761B true CN116827761B (en) 2023-11-10

Family

ID=88114916

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311101976.3A Active CN116827761B (en) 2023-08-30 2023-08-30 Dual-machine hot standby switching method, system, equipment and medium

Country Status (1)

Country Link
CN (1) CN116827761B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106789246A (en) * 2016-12-22 2017-05-31 广西防城港核电有限公司 The changing method and device of a kind of active/standby server
CN114624989A (en) * 2020-12-09 2022-06-14 Abb瑞士股份有限公司 Preventative controller switching
CN114726712A (en) * 2022-03-31 2022-07-08 湖南宇诺辰电子科技有限公司 Control method and system for reinforcing board card
CN115510156A (en) * 2022-09-22 2022-12-23 新华三技术有限公司 Cloud native high-availability database service providing system and method
CN116264541A (en) * 2022-11-07 2023-06-16 中移(苏州)软件技术有限公司 Multi-dimension-based database disaster recovery method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10812388B2 (en) * 2019-02-07 2020-10-20 Cisco Technology, Inc. Preventing damage to flows in an SDN fabric by predicting failures using machine learning

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106789246A (en) * 2016-12-22 2017-05-31 广西防城港核电有限公司 The changing method and device of a kind of active/standby server
CN114624989A (en) * 2020-12-09 2022-06-14 Abb瑞士股份有限公司 Preventative controller switching
CN114726712A (en) * 2022-03-31 2022-07-08 湖南宇诺辰电子科技有限公司 Control method and system for reinforcing board card
CN115510156A (en) * 2022-09-22 2022-12-23 新华三技术有限公司 Cloud native high-availability database service providing system and method
CN116264541A (en) * 2022-11-07 2023-06-16 中移(苏州)软件技术有限公司 Multi-dimension-based database disaster recovery method and device

Also Published As

Publication number Publication date
CN116827761A (en) 2023-09-29

Similar Documents

Publication Publication Date Title
US10983880B2 (en) Role designation in a high availability node
KR100575497B1 (en) Fault tolerant computer system
CN109151045B (en) Distributed cloud system and monitoring method
CN109669762B (en) Cloud computing resource management method, device, equipment and computer readable storage medium
CN106330475B (en) Method and device for managing main and standby nodes in communication system and high-availability cluster
CN103152419A (en) High availability cluster management method for cloud computing platform
US20080288812A1 (en) Cluster system and an error recovery method thereof
CN109921942B (en) Cloud platform switching control method, device and system and electronic equipment
CN105069152B (en) data processing method and device
CN104158707A (en) Method and device of detecting and processing brain split in cluster
US20160036654A1 (en) Cluster system
CN101262479B (en) A network file share method, server and network file share system
JP6007988B2 (en) Standby system apparatus, operational system apparatus, redundant configuration system, and load distribution method
CN110351122B (en) Disaster recovery method, device, system and electronic equipment
CN117370316A (en) High availability management method and device for database, electronic equipment and storage medium
CN116827761B (en) Dual-machine hot standby switching method, system, equipment and medium
CN107168774B (en) Virtual machine migration method and system based on local storage
CN113625540A (en) Dual-computer hot standby control method and device and dual-computer hot standby system
JP2012014674A (en) Failure recovery method, server, and program in virtual environment
CN112367386B (en) Ignite-based automatic operation and maintenance method and device and computer equipment
WO2014176969A1 (en) Automatic disaster recovery switching method and device
CN114598591A (en) Embedded platform node fault recovery system and method
US11954509B2 (en) Service continuation system and service continuation method between active and standby virtual servers
CN113176969A (en) Service providing method, device, equipment and computer readable storage medium
CN108933873B (en) User data synchronization method and device

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