Master-slave state recognition method, electronic device, and storage medium

By configuring a master-slave switchover notification script in the 5G private network management system, the server status is monitored and analyzed in real time, which solves the problems of high system availability and automatic fault switching. It enables real-time monitoring of the service status of master and slave machines and fault handling, ensuring system stability and availability.

CN122268752APending Publication Date: 2026-06-23NANNING FUGUI PRECISION IND CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANNING FUGUI PRECISION IND CO LTD
Filing Date
2024-12-20
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

In 5G private network management systems, existing technologies struggle to achieve high system availability, accurately determine the service status of master and slave machines, identify automatic fault switching times, and lack real-time status monitoring and notification mechanisms.

Method used

By configuring master-slave switchover notification scripts on the master and slave servers, the server status is monitored in real time. When the status switches, the encapsulated code is used to analyze and process the data, and a switchover notification of the real-time status of the dual-machine hot standby is sent. The script management module and the switchover status management module are used to determine the switchover status of the server and notify the administrator.

Benefits of technology

It enables real-time monitoring of the service status of dual-master hot standby master and slave machines, ensuring high system availability, timely alerts and handling of server failures, and guaranteeing long-term system stability and high availability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122268752A_ABST
    Figure CN122268752A_ABST
Patent Text Reader

Abstract

A master-slave state recognition method, when the state switching of the dual master-slave mechanism occurs, triggers the master-slave switching notification script and sends the switching notification of the real-time state of the dual machine hot backup to the manager in a general format after encapsulating and analyzing and processing the code. The application also provides an electronic device and a storage medium for realizing the method, which can realize real-time control of the service state of the dual master-slave hot backup machine, meet the needs of customers to control the real-time state of the high availability system, and timely remind and process when any server in the system fails or is unexpectedly terminated, thereby effectively ensuring the long-term stability and high availability of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a state identification method, and more particularly to a master-slave state identification method, an electronic device, and a storage medium. Background Technology

[0002] In a 5G private network management system, high system availability is required, along with accurate determination of master / slave service status and automatic fault switching time. To ensure high availability, at least two servers on the same network segment need to be deployed with the Fiber Network Management System (FNMS), Keepalived dual-machine hot standby, and MariaDB database management system. One FNMS server serves as the master server, and the other as the hot standby server. Keepalived is used for dual-machine hot standby management on both servers, and two virtual IPs on the same network segment are provided as entry points for the 5G private network management system.

[0003] When the service of one of the FNMS servers is unexpectedly interrupted, the system will quickly activate another redundant or backup FNMS server to take over the work of the unexpectedly terminated server. The failover process is completed automatically without warning or notification and is not visible to the user. Summary of the Invention

[0004] In view of the above, it is necessary to provide a master-slave status identification method, electronic device and storage medium, which monitors two FNMS servers through a detection script. When a dual master-slave mechanism status switch occurs, the script is triggered and analyzed by the encapsulated code, and then a switch notification of the real-time status of dual-machine hot standby is sent in a general format.

[0005] This invention provides a master-slave state identification method applied in an electronic device, comprising: a master server and a slave server configured as a first virtual server and a second virtual server, respectively; the master server and the slave server configured with a first master-slave switchover notification script and a second master-slave switchover notification script, respectively; when the master server and the slave server switch master-slave, the master server and the slave server respectively call the first master-slave switchover notification script and the second master-slave switchover notification script; the master server and the slave server respectively write switchover information into a first switchover record file and a second switchover record file through the first master-slave switchover notification script and the second master-slave switchover notification script; and based on the first switchover record file and the second switchover record file... The switching information recorded in the file determines the switching status of the master server and the slave server; it determines whether the master server and the slave server are still serving the first virtual server and the second virtual server respectively; if the master server and the slave server are serving the first virtual server and the second virtual server respectively, it determines that the master server and the slave server are in normal operation; it determines whether the master server is simultaneously serving the first virtual server and the second virtual server; and if the master server is simultaneously serving the first virtual server and the second virtual server, it determines that the slave server is in a fault state, and the master server and the slave server respectively send the switching status notification to the administrator.

[0006] Preferably, the master-slave status identification method further includes: determining whether the slave server is simultaneously serving the first virtual server and the second virtual server; if the slave server is simultaneously serving the first virtual server and the second virtual server, determining that the master server is in the fault state, and the master server and the slave server respectively send the switch status notification to the administrator.

[0007] Preferably, the master-slave status identification method further includes: determining whether the master server and the slave server have received error information; if the master server and the slave server both receive the error information after the switch, determining that the master server and the slave server are both in the fault state, and the master server and the slave server respectively send the switch status notification to the administrator.

[0008] This invention also provides an electronic device, including a memory, a processor, and a master-slave state identification program stored in the memory and executable on the processor. The electronic device further includes a script management module and a switchover state management module. When the master-slave state identification program is executed by the processor, it performs the following steps: a master server and a slave server are respectively configured as a first virtual server and a second virtual server; the master server and the slave server are respectively configured with a first master-slave switchover notification script and a second master-slave switchover notification script; when the master server and the slave server switch master-slave, the master server and the slave server respectively call the first master-slave switchover notification script and the second master-slave switchover notification script; the master server and the slave server respectively write switchover information through the first master-slave switchover notification script and the second master-slave switchover notification script. A first switchover log file and a second switchover log file; based on the switchover information in the first switchover log file and the second switchover log file, determine the switchover status of the master server and the slave server; determine whether the master server and the slave server are still serving the first virtual server and the second virtual server respectively; if the master server and the slave server are serving the first virtual server and the second virtual server respectively, determine that the master server and the slave server are in normal operation; determine whether the master server is simultaneously serving the first virtual server and the second virtual server; and if the master server is simultaneously serving the first virtual server and the second virtual server, determine that the slave server is in a fault state, and the master server and the slave server respectively send the switchover status notification to the administrator.

[0009] Preferably, when the master-slave status identification program is executed by the processor, it further implements the following steps: determining whether the slave server is simultaneously serving the first virtual server and the second virtual server; if the slave server is simultaneously serving the first virtual server and the second virtual server, determining that the master server is in the fault state, and the master server and the slave server respectively send the switch status notification to the administrator.

[0010] Preferably, when the master-slave status identification program is executed by the processor, it further implements the following steps: determining whether the master server and the slave server have received error information; if the master server and the slave server both receive the error information after the switch, determining that the master server and the slave server are both in the fault state, and the master server and the slave server respectively send the switch status notification to the administrator.

[0011] This invention also provides a storage medium storing a computer program, which, when executed, implements the steps of the master-slave state identification method described above.

[0012] The master-slave status identification method, electronic device, and storage medium of this invention can monitor the service status of the master and slave machines in dual-master hot standby in real time, meeting the customer's need to monitor the real-time status of system high availability. It can also promptly remind and handle any server failure or unexpected termination, effectively ensuring the long-term stability and high availability of the system. Attached Figure Description

[0013] Figure 1 This is a schematic diagram of a 5G private network management system.

[0014] Figures 2-4 This is a diagram illustrating the Keepalived failover mechanism.

[0015] Figure 5 This is a diagram illustrating master-slave synchronization in MariaDB database.

[0016] Figure 6 This is a flowchart of the master-slave state identification method according to an embodiment of the present invention.

[0017] Figure 7 This is a schematic diagram of the Keepalived master-slave switchover notification script according to an embodiment of the present invention.

[0018] Figure 8 and Figure 9 This is a schematic diagram illustrating the configuration of Keepalived.conf according to an embodiment of the present invention.

[0019] Figures 10-13 This is a schematic diagram of the master-slave switching state determination in an embodiment of the present invention.

[0020] Figure 14 This is a schematic diagram of the hardware architecture of the electronic device according to an embodiment of the present invention.

[0021] Figure 15 This is a functional block diagram of an electronic device according to an embodiment of the present invention.

[0022] Explanation of main component symbols 5G Private Network Management System 100 Virtual servers 111, 121 Master server 113 MariaDB database 115, 125 Slave server 123 Electronic devices 200 Processor 210 Memory 220 Master-slave status identification system 230 Script Management Module 310 Switching to Status Management Module 320 Program codes 510 and 530 Steps S101 to S112 The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation

[0023] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0024] Numerous specific details are set forth in the following description to provide a thorough understanding of the invention. The described embodiments are merely some, not all, of the embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.

[0026] It should be noted that the descriptions involving "first," "second," etc., in this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" or "second" may explicitly or implicitly include at least one of the stated features. Furthermore, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.

[0027] Figure 1This is a schematic diagram of a 5G private network management system 100. The 5G private network management system 100 includes a virtual server 111, a virtual server 121, a Master server 113 (master), a Slave server 123 (slave), a MariaDB database 115 connected to the Master server 113, and a MariaDB database 125 connected to the Slave server 123. Virtual server 111 uses a virtual Internet Protocol (IP) address of 192.168.182.156, virtual server 121 uses a virtual IP address of 192.168.182.157, Master server 113 uses a physical IP address of 192.168.182.120, and Slave server 123 uses a physical IP address of 192.168.182.122. Master server 113 and Slave server 123 are mutually master-slave, and MariaDB database 115 and MariaDB database 125 are mutually master-slave.

[0028] Master server 113 and Slave server 123 each configure their own Keepalived.conf. When both Master server 113 and Slave server 123 are working normally, they provide services to virtual server 111 and virtual server 121 respectively. Master server 113 primarily serves virtual server 111 and secondarily serves virtual server 121, while Slave server 123 primarily serves virtual server 121 and secondarily serves virtual server 111.

[0029] When one of the Master server 113 and the Slave server 123 fails, the other server will provide services to both virtual servers 111 and 121 simultaneously, ensuring the continuous availability of the 5G private network management system 100.

[0030] Figures 2-4 This is a diagram illustrating Keepalived's failover mechanism. Failover between Keepalived high-availability services is achieved through the Virtual Router Redundancy Protocol (VRRP). When a user (400) requests a service from the master server (113), such as browsing a webpage, Keepalived monitors the running status of both the master server (113) and the slave server (123) in real time.

[0031] When the Keepalived service is working normally, the Master server 113 continuously sends (multicast) heartbeat messages to the Slave server 123 to let the Slave server 123 know that it is still alive. When the Master server 113 fails (e.g., Figure 2 As shown), the Slave server 123 is unable to send heartbeat messages, preventing it from detecting heartbeats from the Master server 113. Therefore, the Slave server 123 calls its own takeover procedure to take over the Master server 113's IP resources and services (such as...). Figure 3 (As shown). After Master server 113 recovers, Slave server 123 will release the IP resources and services that Master server 113 took over during the failure, and restore its original backup role (e.g., Figure 4 (As shown).

[0032] Figure 5 This is a diagram illustrating master-slave synchronization in MariaDB. During MariaDB master-slave synchronization, MariaDB database 115 records changes to its binary log, also known as binary log events. MariaDB database 125 copies these binary log events to its relay log. MariaDB database 125 then redoes the events in its relay log, thus reflecting the changes in its own data.

[0033] By utilizing the MariaDB database master-slave synchronization mechanism, MariaDB database 125 can synchronize promptly when data changes occur in MariaDB database 115, ensuring data consistency between MariaDB database 125 and MariaDB database 115. The 5G private network management system is configured with MariaDB in a dual-master hot standby configuration, ensuring that MariaDB database 125 will synchronize whenever changes occur in MariaDB database 115.

[0034] It should be noted that in actual applications, the Master server 113 and the MariaDB database 115 can be set up on the same device, and the Slave server 123 and the MariaDB database 125 can be set up on the same device.

[0035] Figure 6 This is a flowchart illustrating the steps of a master-slave state identification method according to an embodiment of the present invention, applied in an electronic device, wherein the electronic device is a 5G private network management server. Depending on different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0036] In step S101, the Master server 113 and the Slave server 123 respectively configure the Keepalived.conf master-slave switchover notification script. When a master-slave switchover occurs, the Master server 113 and the Slave server 123 respectively call the master-slave switchover notification script.

[0037] In step S102, Master server 113 and Slave server 123 respectively write the switching information to their switching record files through the master-slave switching notification script. The switching information describes that Master server 113 and Slave server 123 primarily or secondarily provide services to virtual server 111 and virtual server 121, respectively.

[0038] refer to Figure 7 In the Keepalived.conf master-slave switchover notification script, code 510 defines the notification format and writes it to the switchover log file, while code 530 determines the status of the Master server 113 or Slave server 123 as Master, Slave, or Fault. The switchover log file is as follows: Figure 8 and Figure 9 As shown.

[0039] Step S103: Determine the switching status of Master server 113 and Slave server 123 based on the recording time and master-slave information in the switch log file.

[0040] Step S104: Determine whether Master server 113 and Slave server 123 are serving virtual server 111 and virtual server 121 respectively. If not, proceed to step S106.

[0041] Step S105: If Master server 113 and Slave server 123 are serving virtual server 111 and virtual server 121 respectively, and Master server 113 and Slave server 123 are in normal operating condition, then... Figure 10 As shown.

[0042] Step S106: Determine whether Master server 113 serves both virtual server 111 and virtual server 121 simultaneously. If not, proceed to step S108.

[0043] Step S107: If Master server 113 serves both virtual server 111 and virtual server 121 simultaneously, Master server 113 is in the normal operating state, and Slave server 123 is in a fault state. Figure 11As shown. Next, Master server 113 and Slave server 123 respectively send the switchover status notification to the administrator (step S112).

[0044] Step S108: Determine whether Slave server 123 serves both virtual server 111 and virtual server 121 simultaneously. If not, proceed to step S110.

[0045] Step S109: If Slave server 123 serves both virtual server 111 and virtual server 121 simultaneously, Master server 113 is in the fault state, and Slave server 123 is in the normal operating state. Figure 12 As shown. Next, Master server 113 and Slave server 123 respectively send the switch status notification to the administrator (step S112).

[0046] Step S110: Determine whether Master server 113 and Slave server 123 have received Fault information. If not, the process ends. It should be noted that when Master server 113 and Slave server 123 encounter a service error while providing virtual server 111 or virtual server 121 (i.e., a failure), the error event will be recorded in their respective master-slave switchover notification scripts and transmitted to the administrator.

[0047] Step S111: If both Master server 113 and Slave server 123 receive Fault information, both Master server 113 and Slave server 123 are in the aforementioned fault state. Figure 13 As shown. Next, Master server 113 and Slave server 123 respectively send the switchover status notification to the administrator (step S112), wherein the switchover status notification includes the fault status of Master server 113 and Slave server 123.

[0048] Figure 14 This is a schematic diagram of the hardware architecture of an electronic device according to an embodiment of the present invention. The electronic device 200, for example, a Master server 113 or a Slave server 123, but not limited thereto, can communicate with and be connected to the processor 210, memory 220, and master-slave status identification system 230 via a system bus. Figure 14 Only the electronic device 200 with components 210-230 is shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0049] The memory 220 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 220 may be an internal storage unit of the electronic device 200, such as the hard disk or memory of the electronic device 200. In other embodiments, the memory may also be an external storage device of the electronic device 200, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 200. Of course, the memory 220 may also include both internal storage units and external storage devices of the electronic device 200. In this embodiment, the memory 220 is typically used to store the operating system and various application software installed on the electronic device 200, such as the program code of the master-slave status identification system 230. Furthermore, the memory 220 can also be used to temporarily store various types of data that have been output or will be output.

[0050] In some embodiments, the processor 210 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 210 is typically used to control the overall operation of the electronic device 200. In this embodiment, the processor 210 is used to run program code stored in the memory 220 or process data, for example, to run the master-slave status identification system 230.

[0051] It should be noted that, Figure 14 The electronic device 200 is merely an example. In other embodiments, the electronic device 200 may also include more or fewer components, or have different component configurations.

[0052] If the modules / units integrated in the electronic device 200 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, disks, optical discs, computer memory, read-only memory, random access memory, electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0053] Figure 15 This is a functional block diagram of an electronic device according to an embodiment of the present invention, which is used to execute a master-slave state identification method. The master-slave state identification method of this embodiment can be implemented by a computer program stored in a storage medium, such as memory 220 in the electronic device 200. When the computer program implementing the method of the present invention is loaded into memory 220 by processor 210, it drives processor 210 of the electronic device 200 to execute the master-slave state identification method of this embodiment.

[0054] The electronic device 200 of this embodiment includes a script management module 310 and a switching state management module 320.

[0055] The script management module 310 configures the master-slave switchover notification script in Keepalived.conf to the servers, such as Master server 113 and Slave server 123, and calls the master-slave switchover notification script when the master-slave switchover occurs.

[0056] The switching status management module 320 writes the switching information of Master server 113 or Slave server 123 into their switching record files through the master-slave switching notification script. The switching information describes that Master server 113 and Slave server 123 primarily or secondarily provide services to virtual server 111 and virtual server 121, respectively.

[0057] The switching status management module 320 determines the switching status between the Master server 113 and the Slave server 123 based on the recording time and master-slave information of the switching record file.

[0058] The switching state management module 320 determines whether Master server 113 and Slave server 123 are serving virtual server 111 and virtual server 121 respectively. If Master server 113 and Slave server 123 are serving virtual server 111 and virtual server 121 respectively, then Master server 113 and Slave server 123 are in a normal operating state. Figure 10 As shown.

[0059] The switching state management module 320 determines whether the Master server 113 is simultaneously serving both virtual server 111 and virtual server 121. If the Master server 113 is simultaneously serving both virtual server 111 and virtual server 121, the Master server 113 is in the normal operating state, and the Slave server 123 is in a fault state. Figure 11 As shown. Next, the switching status management module 320 sends the switching status notification to the administrator.

[0060] The switching state management module 320 determines whether the Slave server 123 is simultaneously serving both virtual server 111 and virtual server 121. In step S109, if the Slave server 123 is simultaneously serving both virtual server 111 and virtual server 121, the Master server 113 is in the fault state, and the Slave server 123 is in the normal operating state. Figure 12 As shown. Next, the switching status management module 320 sends the switching status notification to the administrator.

[0061] The switching state management module 320 determines whether Master server 113 and Slave server 123 have received Fault information. If both Master server 113 and Slave server 123 have received Fault information, both Master server 113 and Slave server 123 are in the aforementioned fault state. Figure 13 As shown. Next, the switching status management module 320 sends the switching status notification to the administrator, wherein the switching status notification includes the fault status of the Master server 113 and the Slave server 123.

[0062] It is understood that the module division described above is merely a logical functional division, and other division methods may be used in actual implementation. Furthermore, the functional modules in the various embodiments of this application can be integrated into the same processing unit, or each module can exist physically separately, or two or more modules can be integrated into the same unit. The integrated modules described above can be implemented in hardware or in a combination of hardware and software functional modules.

[0063] For those skilled in the art, other corresponding changes or adjustments can be made to the technical solutions and concepts provided in the embodiments of the present invention in combination with actual needs, and all such changes and adjustments should fall within the protection scope of the claims of the present invention.

Claims

1. A master-slave state identification method, applied in an electronic device, characterized in that, The method includes: The master server and the slave server are configured as the first virtual server and the second virtual server, respectively. The master server and the slave server are respectively configured with a first master-slave switchover notification script and a second master-slave switchover notification script. When the master server and the slave server switch master-slave, the master server and the slave server respectively call the first master-slave switchover notification script and the second master-slave switchover notification script. The master server and the slave server respectively write the switching information into the first switching record file and the second switching record file through the first master-slave switching notification script and the second master-slave switching notification script; The switching status of the master server and the slave server is determined based on the switching information in the first switching record file and the second switching record file; Determine whether the master server and the slave server are still serving the first virtual server and the second virtual server, respectively. If the master server and the slave server serve the first virtual server and the second virtual server respectively, it is determined that the master server and the slave server are in normal operating condition; Determine whether the master server simultaneously serves both the first virtual server and the second virtual server; and If the master server serves both the first virtual server and the second virtual server, it is determined that the slave server is in a fault state, and the master server and the slave server respectively send the switch status notification to the administrator.

2. The master-slave state identification method as described in claim 1, characterized in that, Also includes: Determine whether the slave server is simultaneously serving both the first virtual server and the second virtual server; If the slave server serves both the first virtual server and the second virtual server simultaneously, it is determined that the master server is in the fault state, and the master server and the slave server respectively send the switch status notification to the administrator.

3. The master-slave state identification method as described in claim 2, characterized in that, Also includes: Determine whether the master server and the slave server have received error messages; If both the master server and the slave server receive the error message after the switchover, it is determined that both the master server and the slave server are in the fault state, and the master server and the slave server respectively send the switchover status notification to the administrator.

4. An electronic device, characterized in that, The electronic device includes a memory, a processor, and a master-slave state identification program stored in the memory and executable on the processor. The electronic device also includes a script management module and a switching state management module. When the master-slave state identification program is executed by the processor, it performs the following steps: The master server and the slave server are configured as the first virtual server and the second virtual server, respectively. The master server and the slave server are respectively configured with a first master-slave switchover notification script and a second master-slave switchover notification script. When the master server and the slave server switch master-slave, the master server and the slave server respectively call the first master-slave switchover notification script and the second master-slave switchover notification script. The master server and the slave server respectively write the switching information into the first switching record file and the second switching record file through the first master-slave switching notification script and the second master-slave switching notification script; The switching status of the master server and the slave server is determined based on the switching information in the first switching record file and the second switching record file; Determine whether the master server and the slave server are still serving the first virtual server and the second virtual server, respectively. If the master server and the slave server serve the first virtual server and the second virtual server respectively, it is determined that the master server and the slave server are in normal operating condition; Determine whether the main server is simultaneously serving both the first virtual server and the second virtual server; and If the master server serves both the first virtual server and the second virtual server, it is determined that the slave server is in a fault state, and the master server and the slave server respectively send the switch status notification to the administrator.

5. The electronic device as claimed in claim 4, characterized in that, When the master-slave state identification program is executed by the processor, it also performs the following steps: Determine whether the slave server is simultaneously serving both the first virtual server and the second virtual server; If the slave server serves both the first virtual server and the second virtual server simultaneously, it is determined that the master server is in the fault state, and the master server and the slave server respectively send the switch status notification to the administrator.

6. The electronic device as claimed in claim 5, characterized in that, When the master-slave state identification program is executed by the processor, it also performs the following steps: Determine whether the master server and the slave server have received error messages; If both the master server and the slave server receive the error message after the switchover, it is determined that both the master server and the slave server are in the fault state, and the master server and the slave server respectively send the switchover status notification to the administrator.

7. A storage medium storing at least one computer instruction thereon, characterized in that, The instructions are loaded and executed by the processor as described in any one of claims 1-3, representing the master-slave state identification method.