Main-standby switching method and device and storage medium
By obtaining and modifying the main and backup status of the main control board in the base station of the microservice architecture, and controlling the main and backup status switching of the software system according to the software switching sequence, the existing technology cannot normally control the microservice architecture base station for main and backup switching. The problem is to realize the normal master-stop handover of the base station and the reliability of the system.
Patent Information
- Application Number
- CN202311036993.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-15
- Publication Date
- 2025-02-21
AI Technical Summary
The existing technology cannot normally control the base stations of the microservice architecture to perform master-support switching, making it difficult for the base stations of the microservice architecture to support the master-support function.
By obtaining the main and backup status of the first base station main control board, if the main and backup status is the main and backup status is detected, the main and backup status of the first base station main control board is modified to the backup status and then the second The base station main control board sends the main and standby status switching command. According to the software switching sequence control, at least one software system deployed in the first base station main control board performs the system main and standby status switching, and sends the system main and standby switching instructions to the second base station main control board.
It realizes that the base station based on the microservice architecture can perform normal master-secure handover, ensuring the reliability and stability of the system.
Smart Images

Figure CN119497121A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of communication equipment control, and in particular to a master-slave switching method, equipment and storage medium. Background Art
[0002] High reliability communication is a key technology in enterprise (to business, TOB) application scenarios. Base stations generally ensure system reliability through the master-slave function. When the main control board fails, the backup control board can quickly sense and switch the overall software system and quickly restore services.
[0003] Wireless base stations support active and standby functions in a single software architecture. Both the main board and standby board of the base station have a large management application, and all services are centrally coupled to the program. During the active and standby switching process, the software platform only needs to complete the switching of the management program, and the process control is relatively simple.
[0004] However, with the development of communication technology, the base station platform adopts a microservice architecture. Since each business function module is split and encapsulated in an independent container service, the software architecture is more complex. The existing active-standby switching method is not applicable to base stations with a microservice architecture, making it difficult for base stations with a microservice architecture to support active-standby functions. Summary of the invention
[0005] The main purpose of the present invention is to provide a master-slave switching method, device and storage medium, aiming to solve the technical problem that the prior art cannot normally control the master-slave switching of base stations of the microservice architecture.
[0006] To achieve the above object, the present invention provides a master-slave switching method, which is applied to a first base station main control board, wherein the first base station main control board and the second base station main control board are arranged in the same base station;
[0007] The active / standby switching method comprises:
[0008] Obtaining the active / standby status of the main control board of the first base station;
[0009] If the master-slave state is the main board state and a master-slave switching signal is detected, the master-slave state of the first base station main control board is changed to the standby board state, and a master-slave state switching instruction is sent to the second base station main control board;
[0010] At least one software system deployed in the first base station main control board is controlled to switch the system active / standby state according to the software switching sequence, and a system active / standby switching instruction is sent to the second base station main control board.
[0011] In a possible implementation of the present application, controlling at least one software system deployed in the first base station main control board to switch the system active-standby state according to the software switching sequence, and sending a system active-standby switching instruction to the second base station main control board, includes:
[0012] Traverse the software switching sequence to obtain the system to be switched;
[0013] Switching the system active-standby state of the to-be-switched system deployed in the main control board of the first base station to the standby system state;
[0014] If the switching is completed, a system active / standby switching instruction is sent to the second base station main control board;
[0015] If a switching success signal fed back by the second base station main control board is received, detecting whether there are untraversed elements in the software switching sequence;
[0016] If all elements in the software switching sequence have been traversed, the traversal of the software switching sequence ends.
[0017] In a possible implementation of the present application, if a switching success signal fed back by the second base station main control board is received, after detecting whether there are untraversed elements in the software switching sequence, the method further includes:
[0018] If there are elements that have not been traversed, return to the step of traversing the software switching sequence to obtain the system to be switched.
[0019] In a possible implementation of the present application, switching the system active-standby state of the to-be-switched system deployed in the main control board of the first base station to the standby system state includes:
[0020] If the system to be switched is a microservice system, a master-slave switching instruction is sent to each container in the system to be switched, and a switching completion signal fed back by each container is received;
[0021] Detect whether there is a container that has not fed back a switching completion signal;
[0022] If all containers have fed back a switching completion signal, it is determined that the switching is completed.
[0023] In a possible implementation of the present application, after detecting whether there is a container that has not fed back a switching completion signal, the method further includes:
[0024] If there is a container that has not fed back a switching completion signal, the container that has not fed back a switching completion signal is used as the target container;
[0025] resetting the target container based on the standby system state;
[0026] If the reset is completed, the switching is determined to be completed.
[0027] In a possible implementation of the present application, if the master-slave state is the main board state and a master-slave switching signal is detected, the master-slave state of the first base station main control board is changed to the standby board state, and a master-slave state switching instruction is sent to the second base station main control board, including:
[0028] If the master-slave state is the mainboard state and a master-slave switching signal is detected, the base station is controlled to suspend providing external services;
[0029] Controlling the software systems in the first base station main control board and the second base station main control board to perform data synchronization;
[0030] If data synchronization is completed, the active-standby state of the first base station main control board is changed to the standby board state, and a active-standby state switching instruction is sent to the second base station main control board.
[0031] In a possible implementation of the present application, after obtaining the active / standby status of the main control board of the first base station, the method further includes:
[0032] If the active-standby state is a standby board state, monitoring the hardware state of the main control board of the second base station;
[0033] If the hardware status meets the preset abnormal switching condition, the active / standby status of the main control board of the first base station is changed to the main board status;
[0034] The system active / standby state of at least one software system deployed in the main control board of the first base station is changed to the active system state according to the software switching sequence.
[0035] In a possible implementation of the present application, if the hardware state satisfies a preset abnormal switching condition, before changing the active / standby state of the first base station main control board to the main board state, the method further includes:
[0036] If the hardware status is that the main control board is reset or the main control board is ejected, it is determined that the hardware status meets the preset abnormal switching condition.
[0037] In a possible implementation of the present application, if the active-standby state is a standby board state, after monitoring the hardware state of the second base station main control board, the method further includes:
[0038] If a system active / standby switching instruction sent by the second base station main control board is received, determining the system to be switched and the target active / standby state according to the system active / standby switching instruction;
[0039] Modifying the system active / standby state of the to-be-switched system deployed in the main control board of the first base station to the target active / standby state;
[0040] If the modification is completed, a switching success signal is sent to the first base station main control board.
[0041] In addition, to achieve the above-mentioned purpose, an embodiment of the present application also provides a master-standby switching device, which includes: a processor, a memory, and a master-standby switching program stored in the memory and executable on the processor, and when the master-standby switching program is executed by the processor, the steps of the master-standby switching method described above are implemented.
[0042] In addition, to achieve the above-mentioned purpose, an embodiment of the present application also provides a computer-readable storage medium, on which a master-slave switching program is stored, and when the master-slave switching program is executed, the steps of the master-slave switching method described above are implemented.
[0043] The present invention obtains the master-slave state of the main control board of the first base station; if the master-slave state is the main board state and a master-slave switching signal is detected, the master-slave state of the first base station main control board is modified to the standby board state, and a master-slave state switching instruction is sent to the second base station main control board; at least one software system deployed in the first base station main control board is controlled to switch the system master-slave state according to a software switching sequence, and a system master-slave switching instruction is sent to the second base station main control board. When the master-slave switching signal is detected, not only the first base station main control board and the second base station main control board are controlled to switch the main control board master-slave, but also the software systems deployed in the main control boards of each base station are controlled to switch the system master-slave in sequence according to the software switching sequence, thereby ensuring that the base station based on the microservice architecture can also normally switch the master-slave state. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a schematic diagram of the structure of an electronic device in a hardware operating environment involved in an embodiment of the present invention;
[0045] Figure 2 A schematic diagram of a flow chart of a first embodiment of a method for switching between a primary and a secondary device according to the present invention;
[0046] Figure 3 It is a flow chart of the second embodiment of the active / standby switching method of the present invention;
[0047] Figure 4 A schematic diagram of a flow chart of a third embodiment of a method for switching between a primary and a secondary device according to the present invention;
[0048] Figure 5 A schematic diagram of a base station software platform architecture according to an embodiment of the present invention;
[0049] Figure 6 A schematic diagram of a master / slave decision process according to an embodiment of the present invention;
[0050] Figure 7 A schematic diagram of a normal active / standby switching process according to an embodiment of the present invention;
[0051] Figure 8 A schematic diagram of a container replacement process according to an embodiment of the present invention;
[0052] Fig. 9 A schematic diagram of a flow chart of a fourth embodiment of a method for switching between a primary and a secondary device according to the present invention;
[0053] Fig.10 A schematic diagram of an abnormal active / standby switching process according to an embodiment of the present invention;
[0054] Fig.11 This is a structural block diagram of the first embodiment of the active-standby switching device of the present invention.
[0055] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0056] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0057] Reference Figure 1 , Figure 1 The present invention is a schematic diagram of the structure of the master-slave switching device in the hardware operating environment involved in the embodiment of the present invention.
[0058] like Figure 1 As shown, the electronic device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0059] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0060] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a master-slave switching program.
[0061] exist Figure 1 In the electronic device shown, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the electronic device of the present invention can be set in a master-slave switching device, and the electronic device calls the master-slave switching program stored in the memory 1005 through the processor 1001, and executes the master-slave switching method provided by an embodiment of the present invention.
[0062] The embodiment of the present invention provides a method for switching between a primary and a secondary device, referring to Figure 2 , Figure 2 The figure is a flow chart of a first embodiment of a method for switching between active and standby devices according to the present invention.
[0063] In this embodiment, the steps include:
[0064] Step S10: Obtain the active / standby status of the main control board of the first base station.
[0065] It should be noted that two base station main control boards (which may be referred to as a first base station main control board and a second base station main control board, where the first and the second are only distinguished by numbers and are not limited to specific base station main control boards) may be provided in the base station. The two base station main control boards provide services as one active and one standby, forming active and standby functions to ensure the system reliability of the base station. The execution subject of this embodiment may be the active-standby switching device, and the active-standby switching device may be a base station main control board or a base station main control board provided in the base station. In this embodiment and the following embodiments, the active-standby switching method of the present invention is described with the first base station main control board as the execution subject.
[0066] In actual use, a system management program is set in the main control board of the base station, and the system management program may include a resident hardware driver management program, an operating system management program, and a single board system control program, etc. The hardware driver management program can operate and obtain the hardware status; the operating system management program provides basic services such as single board task scheduling, task communication, and file system to ensure the operating environment of the software system; the single board system control program maintains and manages important data on the single board, such as the active and standby status, data files, etc.; then, obtaining the active and standby status of the main control board of the first base station at this time may be to read the active and standby status maintained by the single board system control program.
[0067] Step S20: If the active-standby state is the main board state and a active-standby switching signal is detected, the active-standby state of the first base station main control board is changed to the standby board state, and an active-standby state switching instruction is sent to the second base station main control board.
[0068] It should be noted that if the master-slave state of the main control board of the first base station is the main board state, it means that the main control board of the first base station is running as the main board in the master-slave function, and the main control board of the second base station is running as the standby board in the master-slave function. At this time, the master-slave state of the second base station main control board is the standby board state. If a master-standby switching signal is detected at this time, it means that normal master-standby switching is required at this time. Therefore, the master-standby state of the first base station main control board can be modified to the standby board state, and a master-standby state switching instruction can be sent to the second base station main control board to enable the second base station main control board to synchronously modify the master-standby state to the main board state.
[0069] In a possible implementation of this embodiment, in order to prevent the base station from providing abnormal services to the outside, which may cause an abnormality in a device connected to the base station, step S20 in this embodiment may include:
[0070] If the master-slave state is the mainboard state and a master-slave switching signal is detected, the base station is controlled to suspend providing external services;
[0071] Controlling the software systems in the first base station main control board and the second base station main control board to perform data synchronization;
[0072] If data synchronization is completed, the active-standby state of the first base station main control board is changed to the standby board state, and a active-standby state switching instruction is sent to the second base station main control board.
[0073] It should be noted that if the master-slave state of the main control board of the first base station is the main board state and the master-slave switching signal is detected, it means that master-slave switching is required at this time. During the master-slave switching process, the main control board and software system of the base station will undergo master-slave switching. At this time, if data services are continued to be provided to the outside, it may cause abnormalities in the equipment connected to the base station (such as interruption in the middle of business processing resulting in data abnormalities, etc.). Therefore, the base station can be controlled to suspend external services, and the software system under the master-slave function generally only synchronizes data regularly at a fixed period. At this time, in order to ensure that there will be no data differences in the software system after the switch, the first base station main control board can send a data synchronization signal to the second base station main control board when controlling the base station to suspend external services, so that the software systems in the first base station main control board and the second base station main control board can synchronize data.
[0074] It can be understood that if data synchronization is completed, the data in the software systems of the first base station main control board and the second base station main control board will remain consistent. At this time, the software system in the second base station main control board can maintain the same service effect as the software system in the first base station main control board when providing services to the outside world. Therefore, the master-slave switching can be performed. At this time, the master-slave state of the first base station main control board can be modified to the standby board state, and a master-slave state switching instruction can be sent to the second base station main control board to change the master-slave state of the second base station main control board to the main board state, and continue to execute subsequent steps to complete the master-slave switching.
[0075] Step S30: Control at least one software system deployed in the first base station main control board to switch the system active / standby state according to the software switching sequence, and send a system active / standby switching instruction to the second base station main control board.
[0076] It should be understood that, for a base station that provides services based on a microservice architecture, after completing the active-standby status switching of the base station main control board, in order to ensure that the switched base station main control board can provide services normally, it is necessary to update the active-standby status of the software system deployed on the base station main control board. Since there may be interactions between the software of each software system and they cannot be switched at the same time, at least one software system deployed in the first base station main control board can be controlled in sequence to switch the system active-standby status according to the switching order recorded in the pre-built software switching sequence. At the same time, a system active-standby switching instruction can be sent to the second base station main control board to control the software system deployed on the second base station main control board and the software system in the first base station main control board to switch the system active-standby status, thereby ensuring the normal execution of the active-standby functions and avoiding abnormal base station services caused by multiple masters.
[0077] The software switching sequence may be pre-set by the administrator of the primary / standby switching device according to the interaction relationship between the software systems, the system type, etc., and the system identifiers of the software systems may be sequentially stored in the software switching sequence.
[0078] This embodiment obtains the master-slave state of the main control board of the first base station; if the master-slave state is the main board state and the master-slave switching signal is detected, the master-slave state of the main control board of the first base station is modified to the standby board state, and a master-slave state switching instruction is sent to the main control board of the second base station; at least one software system deployed in the main control board of the first base station is controlled to switch the system master-slave state according to the software switching sequence, and a system master-slave switching instruction is sent to the main control board of the second base station. When the master-slave switching signal is detected, not only the main control board of the first base station and the main control board of the second base station are controlled to switch the main control board master-slave, but also the software systems deployed in the main control boards of each base station are controlled to switch the system master-slave in sequence according to the software switching sequence, which ensures that the base station based on the microservice architecture can also perform the master-slave switching normally.
[0079] refer to Figure 3 , Figure 3 The figure is a flow chart of a second embodiment of a method for switching between active and standby devices according to the present invention.
[0080] Based on the first embodiment, step S30 of the active / standby switching method in this embodiment includes:
[0081] Step S301: traverse the software switching sequence to obtain the system to be switched.
[0082] It should be noted that traversing the software switching sequence to obtain the system to be switched can be based on the sequence order of the software switching sequence, traversing the system identifiers stored in the software switching sequence, and taking the software system corresponding to the traversed system identifier as the system to be switched.
[0083] For example, assuming that the software switching sequence is "ABC", the software switching sequence is traversed, and the first system identified by the traversal is A. Then, the software system with the corresponding system identification A can be used as the system to be switched.
[0084] Step S302: Switch the system active-standby state of the to-be-switched system deployed in the main control board of the first base station to the standby system state.
[0085] It should be noted that since the master-slave state of the first base station main control board has been switched to the standby board state, it is now necessary to synchronously switch the software system deployed in the first base station main control board to the standby system state. Therefore, the master-slave state of the system to be switched deployed in the first base station main control board can be switched to the standby system state.
[0086] Step S303: If the switching is completed, a system active / standby switching instruction is sent to the second base station main control board.
[0087] It can be understood that after the system to be switched in the main control board of the first base station is switched to the standby system state, the corresponding software system deployed in the main control board of the second base station needs to be switched to the main system state to ensure the normal operation of the master-slave functions. At this time, a system master-slave switching instruction can be generated according to the system identifier with the switching system, and the system master-slave switching instruction is sent to the main control board of the second base station. At this time, the main control board of the second base station can find the software system corresponding to the system to be switched according to the system identifier in the system master-slave switching instruction, and switch its system master-slave state to the main system state.
[0088] Step S304: if a switching success signal fed back by the second base station main control board is received, then detecting whether there are any untraversed elements in the software switching sequence.
[0089] It can be understood that if a switching success signal is received from the second base station main control board, it means that the second base station main control board has completed the system master-slave state switching of the software system according to the master-slave switching instruction. At this time, it can be detected whether there are any untraversed elements in the software switching sequence to determine whether to continue the traversal.
[0090] Step S305: If all elements in the software switching sequence have been traversed, the traversal of the software switching sequence is terminated.
[0091] It can be understood that if all elements in the software switching sequence have been traversed, it means that the software systems deployed in the first base station main control board and the second base station main control board have been switched between the system master-slave status according to the software switching sequence. At this time, the base station can use the switched base station main control board and software system to provide normal external services. Therefore, the traversal of the software switching sequence can be terminated.
[0092] If there are untraversed elements in the software switching sequence, it means that some software systems have not yet switched between the system master and standby states. At this time, it is necessary to continue traversing the software switching sequence. At this time, you can return to step S301 and continue traversing the software switching sequence to ensure that at the end of the traversal, all software systems have switched between the system master and standby states.
[0093] This embodiment obtains the system to be switched by traversing the software switching sequence; switches the system active-standby state of the system to be switched deployed in the first base station main control board to the standby system state; if the switching is completed, sends a system active-standby switching instruction to the second base station main control board; if a switching success signal fed back by the second base station main control board is received, detects whether there are untraversed elements in the software switching sequence; if all elements in the software switching sequence have been traversed, ends the traversal of the software switching sequence. Since it is during the traversal process, the software systems in the first base station main control board and the second base station main control board are controlled in turn according to the sequence order of the software switching sequence to switch the system active-standby state, ensuring that no software system interaction abnormalities occur during the switching process.
[0094] refer to Figure 4 , Figure 4 The figure is a flow chart of a third embodiment of a method for switching between active and standby devices according to the present invention.
[0095] Based on the first embodiment, step S302 of the active / standby switching method in this embodiment includes:
[0096] Step S3021: If the system to be switched is a microservice system, a master-slave switching instruction is sent to each container in the system to be switched, and a switching completion signal fed back by each container is received.
[0097] It should be noted that a microservice system can be composed of multiple containers running microservices. The active and standby states of a general software system are directly controlled by the system, so instructions can be directly sent to the software system to switch between the active and standby states. However, a microservice system is composed of multiple containers, and the way the active and standby states of the system are switched is different from other types of software systems.
[0098] In actual use, the system master-slave status of each container is controlled by the management program inside the container. When the system master-slave status of the microservice system is switched, it is necessary to send a master-slave switching instruction to each container in the system to be switched. When each container receives the master-slave switching instruction, the management program inside the container will control the microservices running in the container to perform system master-slave switching, and after the switching is completed, the switching completion signal will be fed back to the main control board of the first base station.
[0099] Step S3022: Detect whether there is a container that has not fed back a switching completion signal.
[0100] It is understandable that the microservice system is composed of multiple containers. Therefore, the system master-slave state switching of the microservice system will be determined to be completed only when all systems in the microservice system have completed the system master-slave state switching. Therefore, in order to accurately determine whether the system to be switched has completed the system master-slave state switching, it is possible to detect whether there is a container that has not fed back a switching completion signal.
[0101] Among them, in order to avoid slow active-standby switching of the base station due to waiting too long, a preset time length can be set in advance. After sending the active-standby switching instruction to each container in the system to be switched, if a switching completion signal fed back by the container is received within the preset time length, it can be determined that the container has not fed back a switching completion signal.
[0102] Step S3023: If each container has fed back a switching completion signal, it is determined that the switching is completed.
[0103] It is understandable that if each container has fed back a switching completion signal, that is, all containers included in the system to be switched have completed the system active / standby state, therefore, it can be determined that the system active / standby state switching of the system to be switched is completed.
[0104] If there are containers that do not feed back the switching completion signal, it means that some containers in the system to be switched have an exception when switching the system master-slave state, resulting in the switching not being completed. At this time, processing can be performed to ensure that the system master-slave state switching of the system to be switched is completed. At this time, after step S3022 in this embodiment, the following may be further included:
[0105] If there is a container that has not fed back a switching completion signal, the container that has not fed back a switching completion signal is used as the target container;
[0106] resetting the target container based on the standby system state;
[0107] If the reset is completed, the switching is determined to be completed.
[0108] It should be noted that if there are containers that have not fed back the switching completion signal, it means that an exception has occurred in these containers when switching the system's active and standby states, and additional processing is required to ensure that the system's active and standby states are switched. Therefore, the containers that have not fed back the switching completion signal in the system to be switched can be used as target containers.
[0109] In a specific implementation, resetting the container may be resetting the microservice running in the container (i.e., destroying the process of the microservice and reloading the microservice). When resetting the microservice, it is necessary to provide its corresponding active-standby status. Therefore, the main control board of the first base station has been switched to the standby board status at this time. Accordingly, the active-standby status of the software system running therein should be set to the standby system status. Therefore, the target container can be reset based on the standby system status.
[0110] Among them, the standby system state can be a system master-standby state corresponding to the standby board state of the first base station main control board, and can be set in a specific software system of the first base station main control board (such as the system management program set in the base station main control board as mentioned above). When resetting the target container, the target container can read the standby system state from the specific software system and reset based on the standby system state.
[0111] It can be understood that if the reset of the target container is completed, the system master-slave status of all containers in the system to be switched has been switched to a standby system status consistent with the standby board status of the first base station main control board in which it is located. Therefore, it can be determined that the system master-slave status switching of the system to be switched is completed.
[0112] Among them, if the system to be switched is a microservice system, and there is a container that has not fed back a switching completion signal, namely, the target container, it means that the container switching failure may have caused a container dual-standby and dual-master abnormality. At this time, in order to ensure that when the target container is controlled to be reset, the corresponding reset instruction can be directly sent to the second base station main control board to reset the multiple containers included in the system to be switched in the second base station main control board, so that the system master-standby state of the multiple containers included in the system to be switched in the second base station main control board is switched to the main system state consistent with the main board state of the second base station main control board, thereby ensuring that the container master-standby state is normal. At this time, since the containers included in the system to be switched in the first base station main control board and the second base station main control board have actually switched the system master-standby state, there is no need to send the system master-standby switching instruction to the second base station main control board, but directly detect whether there are untraversed elements in the software switching sequence, so as to determine which steps to execute subsequently.
[0113] For ease of understanding, now combined Figure 5 , Figure 6 , Figure 7 and Figure 8 This is for illustration only, but not for limitation. Figure 5 is a schematic diagram of the base station software platform architecture of this embodiment, Figure 6 Schematic diagram of the master-slave decision process of this embodiment. Figure 7 Schematic diagram of the normal active / standby switching process of this embodiment. Figure 8 Schematic diagram of the container replacement process of this embodiment.
[0114] like Figure 5 As shown, two base station main control boards are deployed in the base station, one as the main board and the other as the backup board to form the main and backup functions to provide external services. Each base station main control board is equipped with four software systems, namely system management program, communication management program, microservice management program, and microservice system.
[0115] The following is an introduction to each software system:
[0116] System management program: including resident hardware driver management program, operating system management program and single board system control program, etc. The hardware driver management program can operate and obtain the hardware status; the operating system management program provides basic services such as single board task scheduling, task communication, file system, etc. to ensure the operating environment of the software system; the single board system control program maintains and manages important data on the single board, such as the master and standby status, data files, etc.
[0117] Communication manager: provides publish-subscribe communication services for software programs on the board, and supports inter-board and intra-board cross-process communication. The basic model of the publish-subscribe communication method includes publishers, channels, and subscribers. The publisher publishes messages to the channel, and the subscriber subscribes to the channel. Once there is a message on the channel, the message will be sent to the subscriber. The communication manager is responsible for maintaining this communication model.
[0118] Microservice management program: deploys and manages the microservice system on the single board, maintains the image version warehouse of all containers in the system, and determines the life cycle of the container. When the system management program is powered on, it requests all active and standby microservice blueprints from the microservice management program to facilitate the system management program to manage the switching of all microservices during the switching phase.
[0119] Microservice system: A microservice system can be viewed as a container cluster. By splitting and encapsulating the business function modules of the base station software platform, each functional service is presented as an independent container. The application software on each container can be divided into two parts: (1) container management service and (2) product application service. There is only one container management service, which is responsible for maintaining the active / standby status at the container level and managing the active / standby switching process of the software system in the container. An abnormality in the management service will cause the container to reset. There are generally multiple product application services on the container, carrying different business scenarios.
[0120] Among them, in the master-slave scenario, both the main board and the backup board deploy the four major software systems introduced in the first part and distinguish between the master and the backup. Only the main board provides external communication services and various product services. The backup board synchronizes the operating data of the main board in real time and does not provide external services. The hardware characteristics of the main control board determine that there can only be one physical main board when the base station is running. To simplify the master-slave management, the system design stipulates that the master-slave status of the software platform and the master-slave status of the hardware are consistent. To ensure the correctness of the master-slave status of all software, it can be stipulated that:
[0121] 1. The blocking of the power-on initialization and switching phases of the microservice management program and the communication management program depends on the active and standby status of the single-board system management program.
[0122] 2. The blocking of the power-on initialization and switching phases of the container management service depends on the active and standby status of the single-board system management program.
[0123] 3. The blocking of the power-on initialization and switching phases of the container's product application services depends on the active and standby status of the container management service.
[0124] When a single board (i.e., a single base station main control board) is powered on, the system manager, communication manager, and microservice manager are powered on in parallel, but the microservice manager and communication manager need to block and wait for the system manager to decide on the master and standby status of the single board when deciding on the master and standby. The system manager obtains the hardware status when it is powered on, and after deciding on the master and standby, it notifies the microservice manager and communication manager through messages (such as http messages) respectively, and creates a master and standby status file. The microservice manager then deploys the microservice system and creates all containers; the communication manager starts the subscription communication service for all software. The management service of each container in the microservice system is powered on first, and obtains the master and standby status of the single board from the master and standby status file of the single board created by the system manager. Then, all application product services in the container obtain the master and standby status through the management service when they are powered on.
[0125] During the switching phase, the switching sequence of each software system is controlled according to its dependency on the active / standby state, which is system management program, microservice management program, communication management program, and microservice system in order (i.e., the software switching sequence is: system management program → microservice management program → communication management program → microservice system). This strategy ensures that the active / standby state of the microservice system is consistent with the single-board hardware and system management program when the entire board is reset and restarted, the microservice is reset and restarted, and after the single-board active / standby switching. The schematic diagram of active / standby management during the power-on phase and the switching phase of the microservice system is shown in the figure below. Figure 6 shown.
[0126] When the main control board of the first base station operates as the main board and the main control board of the second base station operates as the standby board, and the main control board of the first base station detects the main-standby switching signal, the main-standby switching process is as follows: Figure 7 As shown, the following steps are included:
[0127] Step 1: Pre-switching. Broadcast the pre-switching of all microservices, suspend external product services, and synchronize the current new request data to the standby microservice in a timely manner.
[0128] Step 2: System hypervisor switching. After the system hypervisor on the main board is switched from the main to the backup, the system hypervisor on the backup board is switched from the backup to the main, and then the result is returned to the original system hypervisor on the main board.
[0129] Step 3: Switching the microservice management program. The original mainboard system management program notifies the microservice management program on this board to switch from the main board to the backup board, and then notifies the microservice management program on the original backup board to switch from the backup board to the main board. After the microservice management program switch is completed, the result is returned to the original mainboard system management program.
[0130] Step 4: Communication management program switching. The original mainboard system management program notifies the communication management program on this board to switch from master to backup, and then notifies the communication management program on the original backup board to switch from backup to master. After the communication management program switching is completed, the result is returned to the original mainboard system management program.
[0131] Step 5: Microservice system switchover. The specific implementation steps are as follows: Figure 8 As shown, the system management program of the original main board (i.e., the main control board of the first base station as the main board) broadcasts and notifies the management services on each container of the main board and the standby board to perform normal switching. The management services on each container of the main and standby boards broadcast and notify all product application services with main and standby attributes in the container to switch. After each product application service is switched, the switching result is returned to the management service. After all product application services are switched, the management service returns the switching result to the system management program. After all containers of the microservice system are switched, the normal switching process ends. Similar to the abnormal switching process, if the system management program does not receive a switching response from a container within the time required by the switching performance, the system management program will request the microservice management program to reset the container to achieve self-healing.
[0132] Among them, the switching in the above description refers to the switching of the master-slave status, from master to slave or from slave to master, for example: switching from master-slave status from main board status to slave board status, or switching the master-slave status of the software system from master system status to slave system status.
[0133] In this embodiment, if the system to be switched is a microservice system, the master-slave switching instruction is sent to each container in the system to be switched, and the switching completion signal fed back by each container is received; it is detected whether there is a container that has not fed back the switching completion signal; if each container has fed back the switching completion signal, it is determined that the switching is completed. When the system master-slave status is switched for each software system, it is also detected whether the system to be switched is a microservice system. If so, the master-slave switching instruction is sent by broadcasting to the container, ensuring that the microservice system constructed by a combination of multiple containers can be controlled to normally switch the system master-slave status.
[0134] refer to Fig. 9 , Fig. 9 The figure is a flow chart of a fourth embodiment of a method for switching between active and standby devices according to the present invention.
[0135] Based on the first embodiment above, after step S10, the active / standby switching method of this embodiment further includes:
[0136] Step S20': if the active-standby state is the standby board state, the hardware state of the main control board of the second base station is monitored.
[0137] It should be noted that if the master-slave state of the first base station main control board is the standby board state, it means that the first base station main control board is running as the standby board in the master-slave function, and the second base station main control board is running as the main board in the master-slave function. At this time, in order to ensure that when an abnormality occurs in the second base station main control board, the first base station main control board can quickly replace the second base station main control board to provide services, the first base station main control board can monitor the hardware status of the second base station main control board.
[0138] Among them, the first base station main control board and the second base station main control board can be connected through a hardware interface of preset specifications (such as an intelligent platform management interface (IPMI)). At this time, the first base station main control board can monitor the hardware status of the second base station main control board through the hardware interface. The hardware status may include the access status, hardware operation status and other status of the base station main control board.
[0139] Step S30': if the hardware status meets the preset abnormal switching condition, the active / standby status of the main control board of the first base station is changed to the main board status.
[0140] It should be noted that if the hardware status of the second base station main control board meets the preset abnormal switching conditions, it means that the second base station main control board can no longer provide services normally at this time. At this time, the first base station main control board is required to quickly replace the second base station main control board to provide services to the outside world. Therefore, the master-slave status of the first base station main control board can be changed to the main board status.
[0141] In a specific implementation, the preset abnormal switching condition can be pre-set by the administrator of the active / standby switching device according to the state that the base station main control board cannot provide services normally. In this case, before step S30' in this embodiment, the following may also be included:
[0142] If the hardware status is that the main control board is reset or the main control board is ejected, it is determined that the hardware status meets the preset abnormal switching condition.
[0143] It can be understood that if the hardware status of the second base station main control board is a main control board reset (such as the administrator manually resets the main control board, or resets the main control board when a specific status is detected), it means that the service in the second base station main control board is reset at this time, and its external service must be interrupted at this time, and it cannot maintain normal external service. Therefore, it can be determined that the hardware status of the second base station main control board meets the preset abnormal switching conditions.
[0144] If the hardware status of the second base station main control board is that the main control board is popped up, it means that the second base station main control board is popped up at this time (such as being popped up due to regular maintenance, or being popped up due to detecting abnormalities such as the operating temperature of the main control board), and its link status with the base station is interrupted. At this time, it is inevitable that it will not be able to maintain normal external services. Therefore, it can be determined that the hardware status of the second base station main control board meets the preset abnormal switching conditions.
[0145] In a specific implementation, more hardware states (such as damage to the main control board, etc.) may be set according to actual needs to meet preset abnormal switching conditions, and this embodiment does not impose any restrictions on this.
[0146] Step S40': modifying the system active / standby state of at least one software system deployed in the main control board of the first base station to the active system state according to the software switching sequence.
[0147] It can be understood that after the active-standby status of the first base station main control board is changed to the main board status, the active-standby status of at least one software system deployed in the first base station main control board needs to be changed to the main system status to ensure the simultaneous switching of the hardware and software of the base station main control board, so that the base station can still provide normal services to the outside world when an abnormality occurs in the second base station main control board.
[0148] It should be noted that, according to the software switching sequence, changing the system active-standby state of at least one software system deployed in the main control board of the first base station to the main system state can be changing the system active-standby state of at least one software system deployed in the main control board of the first base station to the main system state in sequence according to the sequence order recorded in the software switching sequence. The execution mode can be traversal execution, and the specific implementation steps are similar to the execution steps of the second embodiment above. However, since the second base station main control board can no longer provide services normally, the first base station main control board does not need to send corresponding instructions to the second base station main control board when switching. At this time, step S40' described in this embodiment may include:
[0149] Traverse the software switching sequence to obtain the system to be switched;
[0150] Switching the system master-slave state of the to-be-switched system deployed in the main control board of the first base station to the master system state;
[0151] Detecting whether there are any untraversed elements in the software switching sequence;
[0152] If all elements in the software switching sequence have been traversed, the traversal of the software switching sequence ends.
[0153] For ease of understanding, now combined Fig.10 This is for illustration only, but not for limitation. Fig.10 FIG. 1 is a schematic diagram of an abnormal master-slave switching process of this embodiment. Fig.10 As shown, when the first base station main control board detects that the hardware status of the second base station main control board meets the preset abnormal switching conditions, that is, when the abnormal switching trigger source is the main board reset / unplug scenario, the standby board (i.e., the first base station main control board) actively initiates the switch. After the trigger mechanism main board is reset, the standby board system management program detects that the underlying hardware master-slave status has flipped, and unconditionally quickly upgrades to the main board to resume business. The overall process of abnormal switching is as follows Fig.10 As shown, the specific steps include:
[0154] Step 1: The system management program switches from standby to master. The system management program starts the whole board switching process, updates the single board status to master, and switches to the master status to provide system services.
[0155] Step 2: The microservice management program is backed up and switched to the master. After the system management program is switched, it notifies the microservice management program to switch to the master. After the microservice management program is backed up and switched to the master, it returns the result to the system management program.
[0156] Step 3: The communication management program is backed up and restored to the master. The system management program notifies the communication management program to back up and restore to the master. After the communication management program is backed up and restored to the master, it returns the result to the system management program.
[0157] Step 4: Switch the microservice system from standby to master. The switchover process for each container in the microservice system is the same and independent of each other (for the specific process, please refer to the above Figure 8 ). The system management program broadcasts and notifies the management service on each container to switch from standby to master, and then the management service on each container broadcasts and notifies all product application services with master and standby attributes in the container to switch from standby to master. After each product application service switch is completed, the switch result is returned to the management service. After all product application services are switched, the management service returns the switch result to the system management program. After all containers in the microservice system are switched, the abnormal switch process ends.
[0158] If the system hypervisor does not receive a switching response from a container within the time required by the switching performance, it means that the container switching has failed. The system hypervisor requests the microservice hypervisor to reset the container for self-healing to ensure the reliability of the software system switching phase.
[0159] Among them, the switching in the above description refers to the switching of the master-slave status, from master to slave or from slave to master, for example: switching from master-slave status from main board status to slave board status, or switching the master-slave status of the software system from master system status to slave system status.
[0160] In a possible implementation of this embodiment, since the second base station main control board operates as the main board, when the second base station main control board detects the main-standby switching signal, it may initiate the main-standby switching. At this time, in order to ensure that the first base station main control board can cooperate with the second base station main control board to perform the main-standby switching, after step S20' in this embodiment, it may also include:
[0161] If a system active / standby switching instruction sent by the second base station main control board is received, determining the system to be switched and the target active / standby state according to the system active / standby switching instruction;
[0162] Modifying the system active / standby state of the to-be-switched system deployed in the main control board of the first base station to the target active / standby state;
[0163] If the modification is completed, a switching success signal is sent to the first base station main control board.
[0164] It should be noted that if a system active-standby switching instruction is received from the main control board of the second base station, it means that the main control board of the second base station is performing active-standby switching, and it has already performed system active-standby status switching on some software systems. At this time, the main control board of the first base station needs to synchronously switch the corresponding software system to perform system active-standby status switching. Therefore, the system active-standby switching instruction can be parsed to obtain the system identifier and target active-standby status, and the corresponding system to be switched can be found according to the system identifier.
[0165] It is understandable that after determining the system to be switched, the system active-standby state of the system to be switched can be modified to the target active-standby state, and after the modification is completed, a switching success signal is sent to the first base station main control board so that it can continue to execute the active-standby system switching on the software system.
[0166] Among them, if the system to be switched is a microservice system, then when modifying its system master-slave state, it is necessary to use broadcasting to notify each container it contains to switch the system master-slave state. At the same time, if a container that does not feedback a switching completion signal appears when switching the system master-slave state, it can also be reset at this time to switch its system master-slave state to the main system state corresponding to the current main board state of the first base station main control board. The specific implementation steps can refer to the above-mentioned third embodiment and will not be repeated here.
[0167] In a specific implementation, if the first base station main control board receives a reset instruction sent by the second base station main control board, it can also control the reset of multiple containers contained in the system to be switched in the first base station main control board according to the reset instruction, and switch its system master-slave state to the main system state corresponding to the current main board state of the first base station main control board.
[0168] In this embodiment, if the master-slave state is the standby board state, the hardware state of the second base station main control board is monitored; if the hardware state meets the preset abnormal switching condition, the master-slave state of the first base station main control board is modified to the main board state; according to the software switching sequence, the system master-slave state of at least one software system deployed in the first base station main control board is modified to the main system state. Since when the master-slave state of the first base station main control board is the standby board state, the first base station main control board will monitor the hardware state of the second base station main control board in real time to determine whether the second base station main control board can provide services normally, and when the hardware state meets the preset abnormal switching condition, the master-slave state of the first base station main control board is quickly switched to the main board state, and the system master-slave state of the software system in the first base station main control board is simultaneously modified to the main system state, to ensure that when the main board is abnormal and cannot provide services normally, the standby board can quickly replace the main board to provide services to the outside.
[0169] In addition, an embodiment of the present invention further provides a storage medium, on which a master-slave switching program is stored. When the master-slave switching program is executed by a processor, the steps of the master-slave switching method described above are implemented.
[0170] Reference Fig.11 , Fig.11 This is a structural block diagram of the first embodiment of the active-standby switching device of the present invention.
[0171] like Fig.11 As shown, the active / standby switching device proposed in the embodiment of the present invention includes:
[0172] A status acquisition module 10 is used to acquire the active / standby status of the main control board of the first base station;
[0173] The mainboard switching module 20 is used to change the main and standby states of the first base station main control board to the standby state if the main and standby states are the mainboard state and a main and standby switching signal is detected, and send a main and standby state switching instruction to the second base station main control board;
[0174] The system switching module 30 is used to control at least one software system deployed in the first base station main control board to switch the system active and standby states according to the software switching sequence, and send a system active and standby switching instruction to the second base station main control board.
[0175] This embodiment obtains the master-slave state of the main control board of the first base station; if the master-slave state is the main board state and the master-slave switching signal is detected, the master-slave state of the main control board of the first base station is modified to the standby board state, and a master-slave state switching instruction is sent to the main control board of the second base station; at least one software system deployed in the main control board of the first base station is controlled to switch the system master-slave state according to the software switching sequence, and a system master-slave switching instruction is sent to the main control board of the second base station. When the master-slave switching signal is detected, not only the main control board of the first base station and the main control board of the second base station are controlled to switch the main control board master-slave, but also the software systems deployed in the main control boards of each base station are controlled to switch the system master-slave in sequence according to the software switching sequence, which ensures that the base station based on the microservice architecture can also perform the master-slave switching normally.
[0176] In a possible implementation of the present application, the system switching module 30 is also used to traverse the software switching sequence to obtain the system to be switched; switch the system active-standby state of the system to be switched deployed in the first base station main control board to the standby system state; if the switching is completed, send a system active-standby switching instruction to the second base station main control board; if a switching success signal is received from the second base station main control board, detect whether there are any elements in the software switching sequence that have not been traversed; if all elements in the software switching sequence have been traversed, end the traversal of the software switching sequence.
[0177] In a possible implementation of the present application, the system switching module 30 is further configured to return to the step of traversing the software switching sequence to obtain the system to be switched if there are elements that have not been traversed.
[0178] In a possible implementation of the present application, the system switching module 30 is also used to send a master-slave switching instruction to each container in the system to be switched if the system to be switched is a microservice system, and receive a switching completion signal fed back by each container; detect whether there is a container that has not fed back a switching completion signal; if each container has fed back a switching completion signal, determine that the switching is completed.
[0179] In a possible implementation of the present application, the system switching module 30 is further used to, if there is a container that has not fed back a switching completion signal, use the container that has not fed back a switching completion signal as a target container; reset the target container based on the standby system state; if the reset is completed, determine that the switching is completed.
[0180] In a possible implementation of the present application, the mainboard switching module 20 is also used to control the base station to suspend providing external services if the master-slave state is the mainboard state and a master-slave switching signal is detected; control the software systems in the first base station main control board and the second base station main control board to synchronize data; if the data synchronization is completed, modify the master-slave state of the first base station main control board to the standby board state, and send a master-slave state switching instruction to the second base station main control board.
[0181] In a possible implementation of the present application, the mainboard switching module 20 is also used to monitor the hardware status of the second base station main control board if the master-slave status is the standby board status; if the hardware status meets the preset abnormal switching conditions, the master-slave status of the first base station main control board is changed to the mainboard status; according to the software switching sequence, the system master-slave status of at least one software system deployed in the first base station main control board is changed to the master system status.
[0182] In a possible implementation of the present application, the mainboard switching module 20 is further used to determine that the hardware status meets a preset abnormal switching condition if the hardware status is a main control board reset or a main control board pop-up.
[0183] In a possible implementation of the present application, the main board switching module 20 is also used to determine the system to be switched and the target active-standby state according to the system active-standby switching instruction if a system active-standby switching instruction sent by the second base station main control board is received; modify the system active-standby state of the system to be switched deployed in the first base station main control board to the target active-standby state; if the modification is completed, send a switching success signal to the first base station main control board.
[0184] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present invention. In specific applications, technicians in this field can make settings as needed, and the present invention does not limit this.
[0185] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.
[0186] In addition, for technical details not fully described in this embodiment, reference can be made to the active-standby switching method provided in any embodiment of the present invention, and will not be repeated here.
[0187] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0188] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0189] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0190] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A master-slave switching method, applied to a first base station main control board, wherein the first base station main control board and the second base station main control board are arranged in the same base station; The active / standby switching method comprises: Obtaining the active / standby status of the main control board of the first base station; If the master-slave state is the main board state and a master-slave switching signal is detected, the master-slave state of the first base station main control board is changed to the standby board state, and a master-slave state switching instruction is sent to the second base station main control board; At least one software system deployed in the first base station main control board is controlled to switch the system active / standby state according to the software switching sequence, and a system active / standby switching instruction is sent to the second base station main control board.
2. The active / standby switching method according to claim 1, characterized in that: The controlling at least one software system deployed in the first base station main control board to switch the system active / standby state according to the software switching sequence, and sending a system active / standby switching instruction to the second base station main control board, comprises: Traverse the software switching sequence to obtain the system to be switched; Switching the system active-standby state of the to-be-switched system deployed in the main control board of the first base station to the standby system state; If the switching is completed, a system active / standby switching instruction is sent to the second base station main control board; If a switching success signal fed back by the second base station main control board is received, detecting whether there are untraversed elements in the software switching sequence; If all elements in the software switching sequence have been traversed, the traversal of the software switching sequence ends.
3. The active / standby switching method according to claim 2, wherein: If a switching success signal fed back by the second base station main control board is received, after detecting whether there are untraversed elements in the software switching sequence, the method further includes: If there are elements that have not been traversed, return to the step of traversing the software switching sequence to obtain the system to be switched.
4. The active / standby switching method according to claim 2, wherein: The step of switching the system active-standby state of the to-be-switched system deployed in the main control board of the first base station to a standby system state includes: If the system to be switched is a microservice system, a master-slave switching instruction is sent to each container in the system to be switched, and a switching completion signal fed back by each container is received; Detect whether there is a container that has not fed back a switching completion signal; If all containers have fed back a switching completion signal, it is determined that the switching is completed.
5. The active / standby switching method according to claim 4, characterized in that: After detecting whether there is a container that has not fed back a switching completion signal, the method further includes: If there is a container that has not fed back a switching completion signal, the container that has not fed back a switching completion signal is used as the target container; resetting the target container based on the standby system state; If the reset is completed, the switching is determined to be completed.
6. The active / standby switching method according to claim 1, characterized in that: If the master-slave state is the main board state and a master-slave switching signal is detected, the master-slave state of the first base station main control board is changed to the standby board state, and a master-slave state switching instruction is sent to the second base station main control board, including: If the master-slave state is the mainboard state and a master-slave switching signal is detected, the base station is controlled to suspend providing external services; Controlling the software systems in the first base station main control board and the second base station main control board to perform data synchronization; If data synchronization is completed, the active-standby state of the first base station main control board is changed to the standby board state, and a active-standby state switching instruction is sent to the second base station main control board.
7. The active / standby switching method according to any one of claims 1 to 6, characterized in that: After obtaining the active / standby status of the main control board of the first base station, the method further includes: If the master-slave state is a standby board state, monitoring the hardware state of the second base station main control board; If the hardware status meets the preset abnormal switching condition, the active / standby status of the main control board of the first base station is changed to the main board status; The system active / standby state of at least one software system deployed in the main control board of the first base station is changed to the active system state according to the software switching sequence.
8. The active / standby switching method according to claim 7, characterized in that: If the hardware state meets the preset abnormal switching condition, before changing the active / standby state of the first base station main control board to the main board state, the method further includes: If the hardware status is that the main control board is reset or the main control board is ejected, it is determined that the hardware status meets the preset abnormal switching condition.
9. The active / standby switching method according to claim 7, characterized in that: If the active-standby state is a standby board state, after monitoring the hardware state of the second base station main control board, the method further includes: If a system active / standby switching instruction sent by the second base station main control board is received, determining the system to be switched and the target active / standby state according to the system active / standby switching instruction; Modifying the system active / standby state of the to-be-switched system deployed in the main control board of the first base station to the target active / standby state; If the modification is completed, a switching success signal is sent to the first base station main control board.
10. A master-slave switching device, characterized in that: The active-standby switching device comprises: a processor, a memory, and an active-standby switching program stored in the memory and executable on the processor. When the active-standby switching program is executed by the processor, the steps of the active-standby switching method according to any one of claims 1 to 9 are implemented.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a master-slave switching program, which, when executed, implements the steps of the master-slave switching method according to any one of claims 1 to 9.