Primary and standby platform switching method, device, equipment, system and medium
By using the central processing unit (CPU) in the switching equipment of the rail transit safety computer platform to regularly obtain system platform status information and generate active/standby switching information, the problems of active/standby switching delay and poor reliability in the existing technology are solved, and the More secure and reliable switching process.
Patent Information
- Application Number
- CN202310295214.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-23
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2043-03-23
AI Technical Summary
The existing rail transit safety computer platform has problems of delay and poor reliability when switching between active and standby states, especially security issues caused by the participation of third parties or non-safe switching boards.
The central processing unit (CPU) of the switching device uses at least two methods to obtain the status information of different system platforms according to the preset cycle, including the active and standby status and fault level, and generates the active and standby switching information based on this information to realize the active and standby state. Automatic switching avoids status information transmission delays and improves switching security and reliability.
It effectively avoids the phenomenon of dual main system platforms or no main system platform, improves the safety and reliability of active and standby state switching, reduces switching time, and enhances the system's anti-risk capability.
Smart Images

Figure CN116238569B
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of rail transit control technology, and in particular to a method, device, equipment, system and medium for switching between a primary and a secondary platform. Background Art
[0002] Most of the current rail transit safety computer platforms use a two-by-two-out-of-two structure, and the master-slave state switching between the dual-system platforms is mostly achieved by a third party or a non-safety switch board. Due to the involvement of a third party, the master-slave state switching time is long, resulting in delays, resulting in the phenomenon of dual-main system platforms or no main system platform, and poor reliability; and the use of non-safety switch boards has safety issues. Summary of the invention
[0003] The present invention provides a method, device, equipment, system and medium for switching between active and standby platforms, so as to take into account the safety and reliability of switching between active and standby states of a system platform.
[0004] According to one aspect of the present invention, a method for switching between a primary and a secondary platform is provided, which is executed by a central processing unit (CPU) in a switching device, and includes:
[0005] Acquiring status information of different system platforms in at least two ways according to a preset period; wherein the preset period is less than the scheduling period of the system platform; wherein the system platform includes a main system platform and a backup system platform; and the status information includes a main and backup status and a fault level;
[0006] Controlling generation of active / standby switching information according to status information of each of the system platforms;
[0007] According to the active / standby switching information, each of the system platforms is controlled to switch between active and standby states.
[0008] According to another aspect of the present invention, there is provided a main-standby platform switching device, characterized in that it is configured in a central processing unit (CPU) in a switching device and comprises:
[0009] A status information acquisition module, used to acquire status information of different system platforms in at least two ways according to a preset period; wherein the preset period is less than the scheduling period of the system platform; wherein the system platform includes a main system platform and a backup system platform; and the status information includes a main and backup status and a fault level;
[0010] A master-slave switching information generating module, used for controlling and generating master-slave switching information according to the status information of each of the system platforms;
[0011] The active / standby state switching module is used to control each of the system platforms to switch between active / standby states according to the active / standby switching information.
[0012] According to another aspect of the present invention, there is provided a switching device, comprising:
[0013] one or more processors;
[0014] A memory for storing one or more programs;
[0015] When one or more programs are executed by one or more processors, the one or more processors can execute any one of the primary and standby platform switching methods provided by the embodiments of the present invention.
[0016] According to another aspect of the present invention, there is provided a system for switching between a primary and a secondary platform, the system comprising different system platforms and a switching device;
[0017] The system platform includes a main system platform and a backup system platform; the switching device is respectively connected to each of the system platforms for communication.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions, and the computer instructions are used to enable a processor to implement any one of the primary and standby platform switching methods provided in the embodiments of the present invention when executed.
[0019] The master-slave platform switching scheme provided by the embodiment of the present invention is executed by the central processing unit CPU in the switching device, and obtains the status information of different system platforms by adopting at least two methods according to a preset period; wherein the preset period is less than the scheduling period of the system platform; wherein the system platform includes a master system platform and a backup system platform; the status information includes the master-slave status and the fault level; according to the status information of each system platform, the master-slave switching information is controlled to be generated; according to the master-slave switching information, each system platform is controlled to switch the master-slave status. The above scheme obtains the status information of different system platforms by adopting at least two methods according to the preset period. Since the preset period is less than the scheduling period of the system platform, the delay in the transmission of the status information is avoided, the accuracy of the master-slave switching information generated according to the status information is improved, the safety and reliability of the master-slave status switching is improved, and the phenomenon of dual master system platforms or no master system platform is avoided. In addition, the embodiment of the present invention automatically generates the master-slave switching information by introducing a switching device, thereby reducing the time for each system platform to switch the master-slave status.
[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description.
[0022] Figure 1 is a flow chart of a method for switching between a primary and a secondary platform provided in Embodiment 1 of the present invention;
[0023] Figure 2 is a flow chart of a method for switching between active and standby platforms provided in Embodiment 2 of the present invention;
[0024] Figure 3 It is a structural diagram of a main-standby platform switching system provided in Embodiment 3 of the present invention;
[0025] Figure 4 It is a structural schematic diagram of a main-standby platform switching device provided in Embodiment 4 of the present invention;
[0026] Figure 5 It is a structural schematic diagram of a switching device of a primary-standby platform switching method provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0027] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0028] Embodiment 1
[0029] Figure 1 It is a flow chart of a method for switching between active and standby platforms provided in the first embodiment of the present invention. This embodiment can be applied to the situation of controlling the active and standby status switching between the active and standby platforms. The method can be executed by an active and standby platform switching device. The device can be implemented in software and / or hardware and can be configured in an electronic device that carries the active and standby platform switching function. The electronic device can be a switching device.
[0030] See also Figure 1 The method for switching between the primary and standby platforms shown in the figure is executed by a central processing unit (CPU) in a switching device, and includes:
[0031] S110: Acquire status information of different system platforms in at least two ways according to a preset period.
[0032] Among them, the preset cycle refers to the processing cycle of the CPU. The embodiment of the present invention does not impose any limitation on the size of the preset cycle, which can be set by technical personnel based on experience or needs. It is only necessary to ensure that the preset cycle is smaller than the scheduling cycle of the system platform. The scheduling cycle refers to the cycle of the system platform for rail transit control. The system platform refers to a rail transit safety computer platform for rail transit control. Specifically, the system platform includes a main system platform and a backup system platform. The main system platform is used to perform rail transit control tasks. The backup system platform is used to replace the main system platform to perform rail transit control tasks when the main system platform fails to work normally.
[0033] Among them, the status information refers to the status information of the system platform. Specifically, the status information may include the active-standby status and the fault level. The active-standby status refers to an identifier that can be used to characterize the identity of the active system platform and / or the standby system platform in the system platform. The fault level can be used to quantify the degree of failure of the active system platform and / or the standby system platform. The embodiment of the present invention does not impose any limitation on the classification of fault levels, which can be set by technicians based on experience. Exemplarily, the fault level can be divided into five levels, namely, level 1 fault, level 2 fault, level 3 fault, level 4 fault and level 5 fault. The higher the fault level, the more serious the degree of the fault.
[0034] In an optional embodiment, two platform CPUs are provided in the system platform; the status information of the system platform includes status information of different platform CPUs in the system platform; different platform CPUs use different information transmission modes and / or transmission interface types to send status information.
[0035] In any system platform in the embodiment of the present invention, two platform CPUs are provided. Among them, one platform CPU is the main system platform CPU, and the other platform CPU is the backup system platform CPU. Among them, the main system platform CPU can be used to control the work of the system platform to which it belongs. When the main system platform CPU fails, the backup system platform CPU can take over the main system platform CPU to control the system platform to which it belongs. It should be noted that the status information sent by the two platform CPUs in the same system platform at the same timestamp should be the same; if different, it indicates that at least one of the two platform CPUs in the system platform is faulty.
[0036] The embodiments of the present invention do not impose any limitation on the information transmission mode and / or transmission interface type, which can be set by technicians based on experience. Exemplarily, the information transmission mode may include at least two secure communication modes of Ethernet (ETH) protocol, controller area network (CAN), input / output interface (I / O interface) protocol, and serial port communication (such as serial port 485, 422 or 232, etc.) to ensure the security of information interaction between the switching device and the system platform. Correspondingly, the transmission interface type may include at least two of ETH interface, CAN interface and I / O interface, etc.
[0037] It should be noted that when two platform CPUs in the same system platform send status information to the switching device, a delay may occur, and the switching device can provide a preset delay range for the two platform CPUs; within the preset delay range, if the status information sent by the two platform CPUs is synchronized, it indicates that there is no fault in the two platform CPUs; within the preset delay range, if the status information sent by the two platform CPUs is not synchronized, it indicates that there is a fault in the platform CPU that delays sending the status information. The embodiment of the present invention does not impose any limitation on the preset delay range, which can be set by technicians based on experience or needs.
[0038] It is understandable that by introducing two platform CPUs, it is possible to avoid the situation where the system platform cannot perform subsequent work when the platform CPU in any system platform fails, thereby improving the availability of the system platform. At the same time, different platform CPUs use different information transmission methods and / or transmission interface types to send status information, thereby improving the diversity of status information transmission, avoiding the situation where the status information cannot be transmitted or is transmitted incorrectly due to a failure of a certain transmission interface, and improving the accuracy of status information transmission.
[0039] It should be noted that a communication connection is established between the switching device and different system platforms through a transmission interface. Accordingly, at least two types of communication interfaces such as an ETH interface, a CAN interface and an I / O interface are provided in the switching device. The advantage of setting at least two types of transmission interfaces is that the scalability of the switching device is improved, and the adaptability and versatility are better; the transmission interface anomalies caused by common cause failures are effectively avoided, and the reliability and security of the transmission interface between the switching device and the system platform are improved; and when a transmission interface of the switching device is abnormal, another information transmission method or another transmission interface can be used for communication, thereby improving the switching device's ability to handle emergencies. It should be noted that when a transmission interface of the switching device is abnormal, an alarm message of the transmission interface anomaly can be sent to the maintenance machine. Among them, the maintenance machine can be used as a processor for maintenance, management and fault diagnosis of the switching device.
[0040] Specifically, the CPU in the switching device obtains the status information of the main system platform and / or the standby system platform in at least two ways according to a preset period.
[0041] S120. Control and generate active / standby switching information according to status information of each system platform.
[0042] The master-slave switching information refers to the information of master-slave state switching between the master system platform and the backup system platform in the control system platform.
[0043] Specifically, the CPU in the switching device may control the generation of new active / standby switching information according to the status information of the active system platform and / or the standby system platform.
[0044] S130. According to the active / standby switching information, control each system platform to switch between active and standby states.
[0045] Specifically, the CPU in the switching device sends the generated active / standby switching information to each system platform, and each system platform switches the active / standby state according to the received active / standby switching information.
[0046] The master-slave platform switching scheme provided by the embodiment of the present invention is executed by the central processing unit CPU in the switching device, and obtains the status information of different system platforms by adopting at least two methods according to a preset period; wherein the preset period is less than the scheduling period of the system platform; wherein the system platform includes a master system platform and a backup system platform; the status information includes the master-slave status and the fault level; according to the status information of each system platform, the master-slave switching information is controlled to be generated; according to the master-slave switching information, each system platform is controlled to switch the master-slave status. The above scheme obtains the status information of different system platforms by adopting at least two methods according to the preset period. Since the preset period is less than the scheduling period of the system platform, the delay in the transmission of the status information is avoided, the accuracy of the master-slave switching information generated according to the status information is improved, the safety and reliability of the master-slave status switching is improved, and the phenomenon of dual master system platforms or no master system platform is avoided. In addition, the embodiment of the present invention automatically generates the master-slave switching information by introducing a switching device, thereby reducing the time for each system platform to switch the master-slave status.
[0047] On the basis of the above embodiment, in order to improve the accuracy of the CPU in the switching device generating the active-standby switching information, in an optional embodiment, the switching device includes two switching CPUs. Specifically, the standard fault verification information is sent to the other switching CPU; if the fault verification information received by itself is inconsistent with the standard fault verification information, abnormal indication information is generated, and the generation of active-standby switching information is prohibited; if the fault verification information received by itself is consistent with the standard fault verification information, and the abnormal indication information sent by the other switching CPU is not received, the generation of active-standby switching information is allowed.
[0048] The standard fault check information can be used to detect faults of two switching CPUs in the switching device. The fault check information refers to information obtained by another switching CPU processing the standard fault check information. The abnormal indication information refers to information indicating that there are faults in the two switching CPUs in the switching device.
[0049] Specifically, the situation where the fault verification information received by itself is inconsistent with the standard fault verification information may be due to a fault in the switching CPU, which causes an abnormality in the standard fault verification information sent by the switching CPU to another switching CPU, and then causes an abnormality in the fault verification information processed by the other switching CPU; and / or, due to a fault in the other switching CPU, the fault verification information obtained by the other switching CPU after processing according to the standard fault verification information is abnormal.
[0050] It should be noted that, of the two switching CPUs in the switching device, one switching CPU is used to obtain status information sent by a platform CPU in the main system platform and a platform CPU in the backup system platform; the other switching CPU is used to obtain status information sent by another platform CPU in the main system platform and another platform CPU in the backup system platform. For the main and backup states in the received status information, after comparing the two and finding them to be consistent, the main and backup system is judged, and then the main and backup switching information is generated.
[0051] It should be noted that the main system switching CPU can send standard fault verification information to the standby system switching CPU according to a preset period. The embodiment of the present invention does not impose any limitation on the length of the preset period, which can be set by technicians based on experience.
[0052] In an embodiment of the present invention, the main system switching CPU sends standard fault verification information to the standby system switching CPU; the standby system switching CPU receives and processes the standard fault verification information, and feeds back the processed fault verification information to the main system switching CPU. If the fault verification information received by the main system switching CPU is inconsistent with the standard fault verification information, it indicates that at least one switching CPU in the switching device has a fault, and the acquisition of the status information of the system platform stops. At this time, the system platform can maintain the current master-slave state; the main system switching CPU or the standby system switching CPU can generate abnormal indication information, and send the abnormal indication information to the maintenance machine; the maintenance machine can control the switching device to restart according to the abnormal indication information, and check the status of the switching device after restart; if the switching device after restart has no abnormality, the switching device starts to generate the master-slave switching information; if the switching device after restart has an abnormality, it continues to restart until the number of restarts reaches the pre-configured number, and then it is determined that the switching device is down. The embodiment of the present invention does not impose any restrictions on the size of the pre-configured number of times, which can be set by technicians based on experience.
[0053] It can be understood that by introducing standard fault verification information, fault detection is performed on the two switching CPUs in the switching device, which improves the reliability of the switching CPU, avoids the situation where inaccurate primary-standby switching information generated by the faulty switching CPU, and improves the accuracy of the primary-standby switching information generated by the switching CPU.
[0054] In an embodiment of the present invention, in order to prevent common cause failures, the four platform CPUs in the main system platform and the backup system platform interact with the switching device in real time with status information and master-slave switching information through different information transmission methods and / or transmission interface types. The switching device analyzes and obtains the master-slave switching information by comparing the master-slave status and fault level of the two systems (main system platform and backup system platform) based on the status information sent by the four CPUs after two of the two CPUs are compared and found to be consistent; and sends the master-slave switching information to the four CPUs of the two systems. After the main system platform and the backup system platform receive the master-slave switching information sent by the switching device, they synchronize the master-slave switching information through dual-system synchronization and start the master-slave status switching. By switching the master-slave status through the switching device, the generation of abnormal signals can be effectively avoided, and the judgment time for different system platforms to switch the master-slave status can be greatly shortened. Optionally, the master-slave status switching between different system platforms can be completed within one system platform control cycle at the fastest.
[0055] In the embodiment of the present invention, in order to further improve the accuracy of the active-standby switching information, the switching CPU in the switching device can be regularly inspected for tasks. The task inspection refers to the detection of the dimensions of the active-standby switching information generated by the switching CPU, that is, the detection of whether the switching CPU has processed the status information sent through different information transmission modes and / or transmission interface types to obtain the active-standby switching information.
[0056] Embodiment 2
[0057] Figure 2 This is a flow chart of a method for switching between active and standby platforms provided in the second embodiment of the present invention. Based on the above embodiments, this embodiment further refines the operation of "controlling the generation of active and standby switching information according to the status information of each system platform" into "controlling the generation of active and standby switching information according to the status information of the same system platform at different timestamps; and / or, controlling the generation of active and standby switching information according to the status information of different system platforms at the same timestamp" to improve the active and standby switching information generation mechanism. It should be noted that for the parts not described in detail in the embodiments of the present invention, please refer to the descriptions of other embodiments.
[0058] See also Figure 2 The method for switching between the primary and secondary platforms shown includes:
[0059] S210: Acquire status information of different system platforms in at least two ways according to a preset period.
[0060] The preset period is smaller than the scheduling period of the system platform; the system platform includes a main system platform and a backup system platform; the status information includes the main and backup status and the fault level.
[0061] S220 . Control generation of active / standby switching information according to status information of the same system platform at different timestamps.
[0062] In an optional embodiment, controlling the generation of active-standby switching information according to the state information of the same system platform at different timestamps includes: if the state information of the same system platform at different timestamps changes, generating the active-standby switching information.
[0063] For example, for the main system platform in the system platform, the CPU in the switching device obtains the status information of the main system platform at the previous moment and the current moment. If the fault level of the main system platform at the previous moment is a level three fault, and the fault level of the main system platform at the current moment is a level five fault, and the higher the fault level, the more serious the degree of the fault, then the CPU in the switching device generates active-standby switching information; if the fault level of the main system platform at the previous moment was a level three fault, and the fault level of the main system platform at the current moment is also a level three fault, then the CPU in the switching device does not generate active-standby switching information.
[0064] It can be understood that by generating the master-slave switching information based on whether the status information of the same system platform at the same timestamp has changed, it is possible to determine the master-slave switching information based on comprehensive consideration of possible changes in the working status of the system platform, thereby improving the effectiveness of the master-slave switching information.
[0065] S230 . Controlling generation of active / standby switching information according to status information of different system platforms at the same timestamp.
[0066] In an optional embodiment, based on the status information of different system platforms at the same timestamp, control is performed to generate the master-slave switching information, including: based on the status information of different system platforms at the same timestamp, selecting a system platform with a better status from each system platform as a candidate master system platform; if the candidate master system platform is different from the system platform currently in the master system state, generating the master-slave switching information.
[0067] For example, the CPU in the switching device obtains the status information of different system platforms at the current moment. If the fault level of one system platform at the current moment is a level three fault, and the fault level of another system platform at the current moment is a level two fault, and the higher the fault level, the more serious the degree of the fault, then the system platform with the level two fault is used as a candidate main system platform; if the candidate main system platform is the main system platform at the current moment, the main-standby switching information is not generated; if the candidate main system platform is the standby system platform at the current moment, the main-standby switching information is generated.
[0068] It can be understood that by introducing a candidate main system platform, the generation of master-slave switching information is controlled according to whether the candidate main system platform is the same as the system platform currently in the main system state, thereby avoiding the generation of unnecessary master-slave switching information and reducing the waste of computing resources.
[0069] S240. According to the active / standby switching information, control each system platform to switch between active and standby states.
[0070] The master-slave platform switching solution provided by the embodiment of the present invention improves the master-slave switching information generation mechanism by refining the operation of controlling the generation of master-slave switching information according to the status information of each system platform into controlling the generation of master-slave switching information according to the status information of the same system platform at different timestamps; and / or controlling the generation of master-slave switching information according to the status information of different system platforms at the same timestamp. The above scheme controls the generation of master-slave switching information according to the status information of the same system platform at different timestamps, and / or according to the status information of different system platforms at the same timestamp, thereby avoiding the situation where the master-slave switching information cannot be generated or the generated master-slave switching information is inaccurate due to the generation of master-slave switching information in a single manner, thereby improving the accuracy and diversity of the generation of master-slave switching information.
[0071] Embodiment 3
[0072] Figure 3 This is a schematic diagram of the structure of a main-standby platform switching system provided by Embodiment 3 of the present invention. This embodiment of the present invention provides an optional embodiment based on the above embodiment. It should be noted that for the parts not described in detail in this embodiment of the present invention, reference can be made to the descriptions of other embodiments.
[0073] See also Figure 3 The structural diagram of a main-standby platform switching system shown in the figure includes a switching device, two system platforms, and power supplies corresponding to each system platform. For the convenience of distinction, the two system platforms are respectively referred to as platform series 1 and platform series 2; accordingly, the power supply corresponding to platform series 1 is referred to as series 1 power supply, and the power supply corresponding to platform series 2 is referred to as series 2 power supply.
[0074] Specifically, the platform series includes the platform CPU a、Platform CPU b , transmission interface module M and transmission interface module M'. The platform system includes a platform CPU c 、Platform CPU d , transmission interface module N and transmission interface module N'. It should be noted that the transmission interface module M, transmission interface module M', transmission interface module N and transmission interface module N' can be used to establish communication connections with the switching device respectively. In the embodiment of the present invention, the transmission interface type and / or the number of transmission interfaces in the transmission interface module M, transmission interface module M', transmission interface module N and transmission interface module N' can be the same or different. The embodiment of the present invention does not impose any limitation on this, and it can be set by the technician according to experience or needs. It should be noted that the platform CPU in the platform series 1 and the platform series 2 a 、Platform CPU b 、Platform CPU c and platform CPU d are the same.
[0075] The switching device is used to control the active / standby state switching between platform 1 and platform 2. Specifically, the switching device may include power module A, power module B, and switching CPU. g , Switch CPU h , transmission interface module M, transmission interface module M', transmission interface module N and transmission interface module N'. Among them, a series of power supply is switched through power supply module A to CPU g and switch CPU h One of them supplies power; the second power supply is switched to CPU through power module B g and switch CPU h Another power supply in the CPU forms a relatively independent power supply system. g The CPU can be switched to the master system to generate master-slave switching information. h Can switch CPU for standby system, used to switch CPU g Perform fault detection; and switch CPU g When it fails to work properly, switch to another CPU g , generate active / standby switching information. Taking the transmission interface module M as an example, the transmission interface type in the transmission interface module M may include at least two of the ETH interface, CAN interface, 422 / 485 interface, 232 interface and I / O interface, etc.; the number of transmission interfaces in the transmission interface module M may include at least two of the ETH interface, CAN interface, 422 / 485 interface, 232 interface and I / O interface, etc. It should be noted that the switching CPU g and switch CPU h The configuration parameters in should be the same.g and switch CPU h The active / standby switching information generated at the same time should be the same. g and switch CPU h If the master / slave switching information generated at the same time is different, the CPU can be switched according to the standard fault verification information. g and switch CPU h Perform fault detection; if the fault detection result is normal, it indicates that the platform system 1 and / or platform system 2 has a fault; if the fault detection result is abnormal, it indicates that the switching device has a fault.
[0076] In the embodiment of the present invention, a dual-system power supply (a system power supply and a system power supply) is used for independent power supply, and a power supply system (power module A and power module B) is formed inside the switching device. This avoids the situation where the switching device cannot work normally due to a failure of the single-system power supply when the single-system power supply is used, thereby improving the risk resistance of the switching device.
[0077] In the embodiment of the present invention, the switching device adopts a dual CPU two-out-of-two structure. Specifically, different transmission interfaces are used to receive the platform CPUs in the platform series 1 and the platform series 2. a 、Platform CPU b 、Platform CPU c and platform CPU d The status information sent is compared by the dual CPUs to generate the master-slave switching information. The advantage of the dual CPU two-out-of-two structure of the switching device is that the safety of the switching device is improved. For example, the safety level of the switching device can reach SIL4 level at most.
[0078] In an embodiment of the present invention, the platform system 1 and the platform system 2 in the same master-slave platform switching system should be functionally identical. To ensure that the platform system 1 and the platform system 2 are functionally identical, the switching device may perform a functional check on the platform system 1 and the platform system 2. Specifically, the switching device may obtain the basic information of the platform system 1 and the platform system 2 respectively, and determine whether the platform system 1 and the platform system 2 are functionally identical based on the basic information. The basic information refers to the basic parameter information of the platform system 1 and / or the platform system 2. Optionally, the basic information may include configuration information and version information. The version information refers to the version identification information of the platform system 1 and / or the platform system 2. If the platform system 1 is the new version AA and the platform system 2 is the old version A, the check fails. The configuration information refers to the number of signal machines connected to the platform system 1 and / or the platform system 2. If the platform system 1 controls four signal machines and the platform system 2 controls three signal machines, the check fails.
[0079] It should be noted that the embodiment of the present invention does not impose any restrictions on the verification time of the platform series 1 and the platform series 2, and the verification can be performed according to the preset verification frequency, or when the platform series 1 and the platform series 2 are started, or the technicians can perform the verification as needed. The embodiment of the present invention does not impose any restrictions on the size of the preset verification frequency, and the technicians can set it according to their experience.
[0080] In an embodiment of the present invention, when the switching device fails to verify the functions of platform system 1 and platform system 2, the communication between platform system 1 and platform system 2 and the switching device is stopped; if verification is performed when platform system 1 and platform system 2 are started, and the verification fails, it is impossible to determine the active and standby states of platform system 1 and platform system 2 at the current moment; if verification is performed when platform system 1 and platform system 2 are working, and the verification fails, it is impossible to determine whether the active and standby states of platform system 1 and platform system 2 at the current moment are correct. Platform system 1 and / or platform system 2 can report abnormal information to the superior system. The abnormal information refers to information that there are functional differences between platform system 1 and platform system 2.
[0081] Embodiment 4
[0082] Figure 4 This is a schematic diagram of the structure of a master-slave platform switching device provided in Embodiment 4 of the present invention. This embodiment can be applied to the case of controlling the master system platform and the backup system platform to switch between the master and backup states. The method can be executed by the master-slave platform switching device, which can be implemented in software and / or hardware, and can be configured in an electronic device that carries the master-slave platform switching function.
[0083] like Figure 4 As shown, the device can be configured in a central processing unit (CPU) in a switching device, and the device includes: a state information acquisition module 410, a master-slave switching information generation module 420, and a master-slave state switching module 430. Among them,
[0084] The status information acquisition module 410 is used to acquire status information of different system platforms in at least two ways according to a preset period; wherein the preset period is less than the scheduling period of the system platform; wherein the system platform includes a main system platform and a backup system platform; and the status information includes a main and backup status and a fault level;
[0085] The active / standby switching information generating module 420 is used to control the generation of active / standby switching information according to the status information of each system platform;
[0086] The active / standby state switching module 430 is used to control each system platform to perform active / standby state switching according to active / standby switching information.
[0087] The master-slave platform switching scheme provided by the embodiment of the present invention is executed by the central processing unit CPU in the switching device, and the status information of different system platforms is obtained by the status information acquisition module in at least two ways according to the preset period; wherein the preset period is less than the scheduling period of the system platform; wherein the system platform includes the main system platform and the backup system platform; the status information includes the master-slave status and the fault level; the master-slave switching information generation module controls the generation of the master-slave switching information according to the status information of each system platform; and the master-slave status switching module controls each system platform to switch the master-slave status according to the master-slave switching information. The above scheme obtains the status information of different system platforms by at least two ways according to the preset period. Since the preset period is less than the scheduling period of the system platform, the delay in the transmission of the status information is avoided, the accuracy of the master-slave switching information generated according to the status information is improved, the safety and reliability of the master-slave status switching are improved, and the phenomenon of dual master system platforms or no master system platform is avoided. In addition, the embodiment of the present invention automatically generates the master-slave switching information by introducing the switching device, thereby reducing the time for each system platform to switch the master-slave status.
[0088] Optionally, the active / standby switching information generating module 420 includes:
[0089] A first active / standby switching information generating unit is configured to control and generate active / standby switching information according to state information of the same system platform at different timestamps; and / or,
[0090] The second active-standby switching information generating unit is used to control the generation of active-standby switching information according to the state information of different system platforms at the same timestamp.
[0091] Optionally, the first active / standby switching information generating unit is specifically configured to:
[0092] If the status information of the same system platform at different timestamps changes, active / standby switching information is generated.
[0093] Optionally, the second active / standby switching information generating unit is specifically configured to:
[0094] According to the status information of different system platforms at the same timestamp, a system platform with a better status is selected from various system platforms as a candidate main system platform;
[0095] If the candidate master system platform is different from the system platform currently in the master system state, master-slave switching information is generated.
[0096] Optionally, the switching device includes two switching CPUs; the device also includes:
[0097] A standard fault check information sending module, used for sending standard fault check information to another switching CPU;
[0098] A switching information prohibition generation module, used to generate abnormal indication information and prohibit the generation of active / standby switching information if the fault verification information received by the module is inconsistent with the standard fault verification information;
[0099] The switching information permission generation module is used to allow the generation of active / standby switching information if the fault verification information received by itself is consistent with the standard fault verification information and no abnormal indication information sent by another switching CPU is received.
[0100] Optionally, two platform CPUs are provided in the system platform; the status information of the system platform includes status information of different platform CPUs in the system platform; and different platform CPUs use different information transmission modes and / or transmission interface types to send status information.
[0101] The active / standby platform switching device provided in the embodiment of the present invention can execute the active / standby platform switching method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing each active / standby platform switching method.
[0102] In the technical solution of the present invention, the collection, storage, use, processing, transmission, provision and disclosure of the status information, master-slave switching information, standard fault verification information, abnormal indication information and fault verification information involved all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0103] Embodiment 5
[0104] Figure 5 It is a structural diagram of a switching device for implementing a method for switching between primary and standby platforms provided in Embodiment 5 of the present invention. Electronic device 510 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The switching device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0105] like Figure 5As shown, the switching device 510 includes at least one processor 511, and a memory connected to the at least one processor 511, such as a read-only memory (ROM) 512, a random access memory (RAM) 513, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 511 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 512 or the computer program loaded from the storage unit 518 to the random access memory (RAM) 513. In the RAM 513, various programs and data required for the operation of the switching device 510 can also be stored. The processor 511, the ROM 512, and the RAM 513 are connected to each other via a bus 514. An input / output (I / O) interface 515 is also connected to the bus 514.
[0106] A number of components in the switching device 510 are connected to the I / O interface 515, including: an input unit 516, such as a keyboard, a mouse, etc.; an output unit 517, such as various types of displays, speakers, etc.; a storage unit 518, such as a disk, an optical disk, etc.; and a communication unit 519, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 519 allows the switching device 510 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0107] The processor 511 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 511 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 511 executes the various methods and processes described above, such as the primary and standby platform switching method.
[0108] In some embodiments, the primary and standby platform switching method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 518. In some embodiments, part or all of the computer program may be loaded and / or installed on the switching device 510 via the ROM 512 and / or the communication unit 519. When the computer program is loaded into the RAM 513 and executed by the processor 511, one or more steps of the primary and standby platform switching method described above may be performed. Alternatively, in other embodiments, the processor 511 may be configured to perform the primary and standby platform switching method in any other appropriate manner (e.g., by means of firmware).
[0109] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0110] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0111] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0112] To provide interaction with a user, the systems and techniques described herein may be implemented on a switching device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the switching device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0113] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0114] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0115] In an optional embodiment, the present invention further provides a main-standby platform switching system, wherein the main-standby platform switching system is provided as follows: Figure 5 Switching device shown.
[0116] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0117] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for switching between a primary and a standby platform, characterized in that: Executed by the central processing unit (CPU) in the switching device, including: Acquiring status information of different system platforms in at least two ways according to a preset period; wherein the preset period is less than the scheduling period of the system platform; wherein the system platform includes a main system platform and a backup system platform; and the status information includes a main and backup status and a fault level; Controlling generation of active / standby switching information according to status information of each of the system platforms; According to the active / standby switching information, control each of the system platforms to switch between active / standby states; The switching device includes two switching CPUs; determining whether the master-slave switching information generated by the two switching CPUs at the same time is the same, and if different, performing fault detection on the switching CPU according to standard fault detection information; performing fault detection on the switching CPU according to the standard fault detection information includes: Send standard fault check information to another switching CPU; If the fault verification information received by itself is inconsistent with the standard fault verification information, abnormal indication information is generated, and the generation of the active / standby switching information is prohibited; If the fault verification information received by itself is consistent with the standard fault verification information, and no abnormal indication information sent by another switching CPU is received, the generation of the active-standby switching information is allowed.
2. The method according to claim 1, characterized in that The controlling and generating the active / standby switching information according to the status information of each of the system platforms includes: Controlling generation of the master-slave switching information according to status information of the same system platform at different timestamps; and / or, The master-slave switching information is controlled and generated according to the status information of different system platforms at the same timestamp.
3. The method according to claim 2, characterized in that The controlling and generating the active / standby switching information according to the status information of the same system platform at different timestamps includes: If the status information of the same system platform at different timestamps changes, the active / standby switching information is generated.
4. The method according to claim 2, characterized in that: The controlling and generating the active / standby switching information according to the status information of different system platforms at the same timestamp includes: According to the status information of different system platforms at the same timestamp, a system platform with a better status is selected from the system platforms as a candidate main system platform; If the candidate master system platform is different from the system platform currently in the master system state, the master-standby switching information is generated.
5. The method according to any one of claims 1 to 4, characterized in that: Two platform CPUs are arranged in the system platform; the status information of the system platform includes status information of different platform CPUs in the system platform; different platform CPUs use different information transmission modes and / or transmission interface types to send status information.
6. A main-standby platform switching device, characterized in that: The central processing unit (CPU) configured in the switching device includes: A status information acquisition module, used to acquire status information of different system platforms in at least two ways according to a preset period; wherein the preset period is less than the scheduling period of the system platform; wherein the system platform includes a main system platform and a backup system platform; and the status information includes a main and backup status and a fault level; A master-slave switching information generating module, used for controlling and generating master-slave switching information according to the status information of each of the system platforms; A master-slave state switching module, used to control each of the system platforms to switch between master and standby states according to the master-slave switching information; The switching device includes two switching CPUs; determining whether the master-slave switching information generated by the two switching CPUs at the same time is the same, and if different, performing fault detection on the switching CPU according to standard fault detection information; the device also includes: A standard fault check information sending module, used for sending standard fault check information to another switching CPU; A switching information prohibition generation module, used for generating abnormal indication information and prohibiting the generation of the master-slave switching information if the fault verification information received by the module is inconsistent with the standard fault verification information; The switching information permission generation module is used to allow the generation of the active / standby switching information if the fault verification information received by itself is consistent with the standard fault verification information and no abnormal indication information sent by another switching CPU is received.
7. A switching device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement a method for switching between active and standby platforms as described in any one of claims 1 to 5.
8. A main-standby platform switching system, characterized in that: The system comprises different system platforms, and the switching device as claimed in claim 7; The system platform includes a main system platform and a backup system platform; the switching device is respectively connected to each of the system platforms for communication.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a method for switching between active and standby platforms as described in any one of claims 1 to 5 is implemented.
