Management platform switching method, device, storage medium and electronic equipment
By determining the cause of the failure and the time to repair it, and adjusting the data transmission and interaction task time, the problem of business interruption after the cloud management platform failure was solved, and business continuity and stability were achieved.
Patent Information
- Application Number
- CN202411849878.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-12-13
AI Technical Summary
Directly switching to the backup platform after the cloud management platform fault is repaired will cause business services to be interrupted, resulting in extended business time and reduced stability and accuracy.
By determining the cause of the failure and the time to repair it, and adjusting the time of data transmission and interactive tasks, a smooth switching of the platform can be achieved, ensuring business continuity and stability.
It avoids business service interruptions, improves the continuity and stability of business execution, and ensures the reliability of the cloud management platform.
Smart Images

Figure CN119676063B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computers, and specifically, to a method, device, storage medium, electronic device, and program product for switching a management platform. Background Art
[0002] In the cloud computing era, cloud management platforms are used to manage a large number of heterogeneous resources, hosting the operation of customer business systems, and thus providing diverse services to a large number of users. To ensure the stability of cloud management platform services and prevent business losses caused by failures of a single cloud management platform, related technologies often set up backup platforms for cloud management platforms. However, since these technologies often directly switch to the backup platform after the cloud management platform failure is repaired, business services are forced to be interrupted, resulting in longer business hours and reduced stability and accuracy. Summary of the Invention
[0003] The embodiments of the present application provide a management platform switching method, device, storage medium, electronic device and program product to at least solve the problem in the related art that after the cloud management platform fault is repaired, the backup platform is usually directly switched to the cloud management platform, and the business service is forced to be interrupted, resulting in extended business time, reduced business stability and accuracy.
[0004] According to one embodiment of the present application, a method for switching a management platform is provided, which is applied to a target server, wherein the target server is used to switch a target platform for managing a target terminal, the target platform being a platform selected from a first platform running on a first server and a second platform running on a second server, the target platform interacting with the target terminal via a switch, and the first server being connected to the second server via a target interface, the method comprising: when the target platform is the first platform and a target fault occurs on the first platform, switching the target platform to the second platform; determining a target fault cause for the target fault occurring on the first platform, and determining a target time for the first platform to complete fault repair based on the target fault cause; and determining, based on the target time, the time for the second platform to switch to the first platform. A first moment of sending target data and a second moment of re-establishing an interactive relationship between the target terminal and the first platform, wherein the second moment is later than the first moment, and the target data includes data generated when the second platform, as the target platform, manages the target terminal after the first platform has most recently failed; a first indication message is sent to the second platform, and a second indication message is sent to the target terminal, wherein the first indication message is used to instruct the target terminal to transmit the target data to the first platform based on the first moment, and the second indication message is used to instruct the target terminal to adjust the execution time of the task of interacting with the target platform within a predetermined time period to other times outside the predetermined time period, and to re-establish an interactive relationship with the first platform at the second moment, and the predetermined time period includes the second moment.
[0005] In an exemplary embodiment, determining the target fault cause of the target fault occurring on the first platform and determining the target time for the first platform to complete fault repair based on the target fault cause includes at least one of the following: when it is determined that the type of the target fault cause is the first type, determining the target time for the first platform to complete fault repair according to a predetermined rule, wherein the predetermined rule records the fault repair time corresponding to the first type of fault cause; when the target fault cause cannot be determined or the type of the target fault cause is the second type, sending the fault data of the target fault occurring on the first platform to the first terminal to request the first terminal to return a target response message carrying the target time, wherein the second type is a fault type other than the first type.
[0006] In an exemplary embodiment, before switching the target platform to the second platform, the method further includes: synchronizing the first data of the first platform to the second platform according to a target period, wherein the first data includes data generated by the first platform as the target platform to manage the target terminal; in the event of a failure of the first platform, synchronizing the first data generated within a first time period to the second platform, wherein the first time period is the time period from the time of the most recent data synchronization to the time when the first platform fails.
[0007] In an exemplary embodiment, determining the target failure cause of the first platform includes: determining first task data of a first task executed by the first platform when a failure occurs; sending an indication message to the second platform, wherein the indication message is used to instruct the second platform to query whether second task data of a second task with the same attributes as the first task is stored in the second platform, and if the second task data is stored in the second platform, returning the second task data through a first response message; determining the target failure cause based on the first task data and the first response message.
[0008] In an exemplary embodiment, before synchronizing the first data of the first platform to the second platform according to a target period, the method further includes: determining the target period in the following manner: when the resource occupancy rate of the first platform is less than a first threshold, determining a predetermined period as the target period; when the resource occupancy rate of the first platform is greater than or equal to the first threshold, shortening the predetermined period to obtain a second period, and determining the second period as the target period.
[0009] In an exemplary embodiment, after synchronizing the first data of the first platform to the second platform according to the target period, the method further includes: after receiving the first data, the second platform determines whether the first data includes the target task data of the target task and determines whether the target task is completed, wherein the target task is the task recorded in the target task list, and the target task list is used to record the unexecuted tasks included in the second data received by the second platform, and the second data is the first data historically received by the second platform; when the second platform determines that the first data includes the target task data and determines that the target task is completed, the third task data of the target task stored in the first storage path and the target task data are dumped to the second storage path, wherein the third task data is the task data of the target task included in the second data. The first storage path is used to cache the stored data, and the second storage path is used to store the stored data for a long time; when the second platform determines that the first data includes the target task data and that the target task has not been completed, the target task data is stored in the first storage path; when the second platform determines that the first data includes fourth task data of other completed third tasks other than the target task data, the fourth task data is stored in the third storage path, and when the second platform determines that the first data includes fifth task data of other unfinished fourth tasks other than the target task data, the fifth task data is stored in the fourth storage path, and the fourth task is added to the target task list, wherein the third storage path is used to store the stored data for a long time, and the fourth storage path is used to cache the stored data.
[0010] According to another embodiment of the present application, a switching device for a management platform is provided, which is applied to a target server, wherein the target server is used to switch a target platform for managing a target terminal, the target platform is a platform selected from a first platform running on a first server and a second platform running on a second server, the target platform interacts with the target terminal through a switch, and the first server is connected to the second server through a target interface, and the device includes: a switching module, which is used to switch the target platform to the second platform when the target platform is the first platform and a target failure occurs on the first platform; a first determination module, which is used to determine a target fault cause of the target failure occurring on the first platform, and determine a target time for the first platform to complete fault repair based on the target fault cause; a second determination module, which is used to determine the target time according to the target time. a first moment when the second platform sends target data to the first platform and a second moment when the target terminal re-establishes an interactive relationship with the first platform, wherein the second moment is later than the first moment, and the target data includes data generated when the second platform, as the target platform, manages the target terminal after the first platform has most recently failed; a sending module, configured to send a first indication message to the second platform and a second indication message to the target terminal, wherein the first indication message is used to instruct the target terminal to transmit the target data to the first platform based on the first moment, and the second indication message is used to instruct the target terminal to adjust the execution time of the task of interacting with the target platform within a predetermined time period to other times outside the predetermined time period, and to re-establish an interactive relationship with the first platform at the second moment, and the predetermined time period includes the second moment.
[0011] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.
[0012] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0013] According to another embodiment of the present application, a computer program product is provided, including a computer program, which implements the steps of any of the above method embodiments when executed by a processor.
[0014] Through the present application, since the target time for the first platform to complete the fault repair is first determined, and then the second time for the target terminal to establish a connection with the first platform is determined based on the target time, the target terminal can adjust the task execution time of the interactive task that needs to be executed within the predetermined time period near the second time to outside the predetermined time period, thereby avoiding cutting off the interactive task being executed when the target terminal establishes a connection with the first platform. Therefore, it can solve the problem in the related technology that after the cloud management platform repairs the fault, the backup platform is usually directly switched to the cloud management platform, and the business service is forced to be interrupted, resulting in extended business time, reduced business stability and accuracy, thereby ensuring the continuity and stability of business execution. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is a hardware structure block diagram of a server device according to a method for switching a management platform according to an embodiment of the present application;
[0016] Figure 2 is a flowchart of a method for switching a management platform according to an embodiment of the present application;
[0017] Figure 3 This is a flowchart of disaster recovery performed by a disaster recovery device according to an embodiment of the present application;
[0018] Figure 4 Schematic diagram of disaster recovery performed by a disaster recovery device according to an embodiment of the present application;
[0019] Figure 5 This is a structural block diagram of a switching device of a management platform according to an embodiment of the present application. DETAILED DESCRIPTION
[0020] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0021] It should be noted that the terms "first", "second", etc. in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0022] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 This is a hardware structure diagram of a server device for a method of switching a management platform according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data, wherein the above-mentioned server device may also include a transmission device 106 for communication functions and an input and output device 108. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0023] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the switching method of the management platform in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above-mentioned method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories can be connected to the server device via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0024] The transmission device 106 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by a communication provider of the server device. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0025] In this embodiment, a method for switching a management platform is provided, which is applied to a target server, wherein the target server is used to switch a target platform for managing a target terminal, the target platform being a platform selected from a first platform running on a first server and a second platform running on a second server, the target platform interacting with the target terminal via a switch, and the first server being connected to the second server via a target interface. Figure 2 is a flow chart of a method for switching a management platform according to an embodiment of the present application, such as Figure 2As shown, the process includes the following steps:
[0026] Step S202: when the target platform is the first platform and a target failure occurs on the first platform, switching the target platform to the second platform;
[0027] Step S204: determining a target fault cause of the target fault occurring on the first platform, and determining a target time for completing fault repair on the first platform based on the target fault cause;
[0028] Step S206: Determine, based on the target time, a first time at which the second platform sends target data to the first platform and a second time at which the target terminal re-establishes an interactive relationship with the first platform, wherein the second time is later than the first time, and the target data includes data generated when the second platform, as the target platform, manages the target terminal after the first platform has most recently failed.
[0029] Step S208: Send a first indication message to the second platform and send a second indication message to the target terminal, wherein the first indication message is used to instruct the target terminal to transmit the target data to the first platform based on the first moment, and the second indication message is used to instruct the target terminal to adjust the execution time of the task of interacting with the target platform within the predetermined time period to other times outside the predetermined time period, and to re-establish the interaction relationship with the first platform at the second moment, and the predetermined time period includes the second moment.
[0030] In the above steps, exemplarily, the target platform includes but is not limited to: a cloud management platform, the first platform includes but is not limited to: a cloud management platform, the second platform includes but is not limited to: a cloud management platform, the first platform and the second platform are in different environments under different data centers, the target terminal includes but is not limited to: a virtual machine, a container, a database instance, an application service instance, a network device, a storage device, a physical server, a cloud service component, an end-user device, etc., the first platform has a higher priority in managing the target terminal than the second platform, the target server may be the same as or different from the first server, and the target server may be the same as or different from the second server.
[0031] In the above steps, since the target time for the first platform to complete the fault repair is first determined, and then the second time for the target terminal to establish a connection with the first platform is determined based on the target time, the target terminal can adjust the task execution time of the interactive task that needs to be executed within the predetermined time period near the second time to outside the predetermined time period, thereby avoiding cutting off the interactive task being executed when the target terminal establishes a connection with the first platform. This solves the problem in the related art that after the cloud management platform repairs the fault, the backup platform is usually directly switched to the cloud management platform, and the business service is forced to be interrupted, resulting in extended business time, reduced business stability and accuracy, thereby ensuring the continuity and stability of business execution.
[0032] The execution subject of the above steps may be a program running on the target server, etc., but is not limited thereto.
[0033] In an optional embodiment, determining the target fault cause of the target fault occurring on the first platform, and determining the target time for the first platform to complete fault repair based on the target fault cause includes at least one of the following: when it is determined that the type of the target fault cause is the first type, determining the target time for the first platform to complete fault repair according to a predetermined rule, wherein the predetermined rule records the fault repair time corresponding to the first type of fault cause; when the target fault cause cannot be determined or the type of the target fault cause is the second type, sending the fault data of the target fault occurring on the first platform to the first terminal to request the first terminal to return a target response message carrying the target time, wherein the second type is a fault type other than the first type.
[0034] In the above steps, the first type of target failure includes but is not limited to: failures that have occurred in the history of the first platform and whose repair time can be determined; the second type of target failure includes but is not limited to: failures whose repair time cannot be determined; the target response message includes but is not limited to: HTTP (HyperText Transfer Protocol) response message.
[0035] In the above steps, by determining the target time for the platform to complete fault repair, the target server can determine the first time when the second platform sends target data to the first platform and the second time when the target terminal re-establishes an interactive relationship with the first platform based on the target time, and enable the target terminal to adjust the task execution time of the interactive task that needs to be performed within the predetermined time period near the second time to outside the predetermined time period, thereby enhancing the reliability and stability of the cloud management platform.
[0036] In an optional embodiment, before switching the target platform to the second platform, the method further includes: synchronizing the first data of the first platform to the second platform according to a target period, wherein the first data includes data generated by the first platform as the target platform to manage the target terminal; in the event of a failure of the first platform, synchronizing the first data generated within a first time period to the second platform, wherein the first time period is the time period from the time of the most recent data synchronization to the time when the first platform fails.
[0037] In the above steps, the target period includes, but is not limited to, 1 hour, 2 hours, 3 hours, and the like, and the first data includes, but is not limited to, metadata. In the above steps, by synchronizing the first data on the first platform to the second platform according to the target period and, in the event of a failure of the first platform, synchronizing the first data within the first period to the second platform before switching the target platform to the second platform, the second platform is ensured to include all data on the first platform, thereby improving the stability of the second platform's management of the target terminal.
[0038] In an optional embodiment, determining the target failure cause of the first platform includes: determining the first task data of the first task executed by the first platform when the failure occurs; sending an indication message to the second platform, wherein the indication message is used to instruct the second platform to query whether the second task data of the second task with the same attributes as the first task is stored in the second platform, and if the second task data is stored in the second platform, returning the second task data through a first response message; determining the target failure cause based on the first task data and the first response message.
[0039] In the above steps, by querying whether the second platform stores second task data of a task with the same attributes as the first task executed when a fault occurs on the first platform, it is possible to determine the cause of the target fault based on the second task data and the first task data when the second task data is stored in the second platform, thereby achieving the effect of improving the accuracy of fault identification and reducing the time consumption of fault diagnosis.
[0040] In an optional embodiment, before synchronizing the first data of the first platform to the second platform according to the target period, the method also includes: determining the target period in the following manner: when the resource occupancy rate of the first platform is less than a first threshold, determining the predetermined period as the target period; when the resource occupancy rate of the first platform is greater than or equal to the first threshold, shortening the predetermined period to obtain a second period, and determining the second period as the target period.
[0041] In the above steps, the resource occupancy rate includes but is not limited to: the occupancy rate of computing resources, the occupancy rate of storage resources, the occupancy rate of network resources, etc., the first threshold includes but is not limited to: 80%, 85%, 90%, etc., the predetermined period includes but is not limited to: 1 hour, 2 hours, 3 hours, etc., the second period includes but is not limited to: 0.5 hours, 1 hour, 1.5 hours, etc., the predetermined period and the second period can be adjusted according to the application scenario.
[0042] Since the platform stability is low when the resource utilization rate is high, in the above steps, by shortening the data synchronization cycle when the resource utilization rate reaches the threshold, the real-time performance of data synchronization can be improved and the risk of data loss can be reduced.
[0043] In an optional embodiment, after synchronizing the first data of the first platform to the second platform according to the target period, the method further includes: after receiving the first data, the second platform determines whether the first data includes the target task data of the target task and determines whether the target task is completed, wherein the target task is the task recorded in the target task list, and the target task list is used to record the unexecuted tasks included in the second data received by the second platform, and the second data is the first data historically received by the second platform; when the second platform determines that the first data includes the target task data and determines that the target task is completed, the third task data of the target task stored in the first storage path and the target task data are dumped to the second storage path, wherein the third task data is the task data of the target task included in the second data. The first storage path is used to cache the stored data, and the second storage path is used to store the stored data for a long time; when the second platform determines that the first data includes the target task data and that the target task has not been completed, the target task data is stored in the first storage path; when the second platform determines that the first data includes fourth task data of other completed third tasks other than the target task data, the fourth task data is stored in the third storage path, and when the second platform determines that the first data includes fifth task data of other unfinished fourth tasks other than the target task data, the fifth task data is stored in the fourth storage path, and the fourth task is added to the target task list, wherein the third storage path is used to store the stored data for a long time, and the fourth storage path is used to cache the stored data.
[0044] In the above steps, the first storage path and the fourth storage path may be the same or different, and the second storage path and the third storage path may be the same or different. By storing the task data of completed tasks for a long period of time and caching the task data of uncompleted tasks, if a failure occurs on the first platform, the second task data of a task with the same attributes as the first task executed when the first platform failed can be searched on the second platform for fault identification, thereby improving the accuracy of fault identification and reducing the time required for fault diagnosis.
[0045] The following is an illustrative description of the solution in this application with reference to specific embodiments:
[0046] The embodiment of the present application provides an intelligent disaster recovery device for a cloud management platform, comprising: a disaster recovery preset device, a master-slave synchronization device, a master-slave switching device, a master-slave back-cut device, and a switching recording device. Figure 3 This is a flowchart of disaster recovery performed by a disaster recovery device according to an embodiment of the present application. Figure 4 FIG. 1 is a schematic diagram of a disaster recovery device according to an embodiment of the present application performing disaster recovery. Figure 3 As shown, the process includes the following steps:
[0047] In step S302, the disaster recovery preset device configures the master-slave relationship between the cloud management platform in the production environment and the cloud management platform in the disaster recovery environment based on the user's configuration operation, that is, the priority of the master platform is higher than the backup platform, so that by default, the cloud management platform in the production environment (that is, the master platform) carries normal business operations, and the cloud management platform in the disaster recovery environment (that is, the backup platform) is not enabled, wherein the production environment and the disaster recovery environment are in different environments in different data centers, and the configuration operation includes: IP, port, login username and password of the master and backup environments, configuration to master-slave mode, and clearing network-related container configurations in the backup environment;
[0048] Step S304: The master-slave synchronization device initiates a master-slave synchronization operation in the master environment, periodically replicating the data on the master platform to the slave platform to ensure data consistency between the master and slave platforms. If this is the first synchronization operation, the full data on the master platform is synchronized to the slave platform, and incremental data is subsequently synchronized periodically. If this is not the first synchronization operation, the incremental data is synchronized directly, and the time for the next incremental data synchronization is determined.
[0049] Step S306: When a failure occurs on the primary platform, the active / standby switching device sends a request message to the administrator to request whether to perform a platform switch. If the administrator returns a message agreeing to the switch or the administrator does not return a message after a timeout, the active / standby switching device performs the switch. If the administrator returns a message disagreeing with the switch, the active / standby switching device waits for manual processing.
[0050] In step S308, the master-slave switchback device monitors the task regularly and monitors the status of the master environment. After the master environment failure is restored, it sends a request message to the administrator to ask whether to switch the platform. When the administrator returns a message agreeing to switch or the administrator times out without returning a message, it starts data synchronization and synchronizes the data in the backup environment to the master environment to ensure the consistency of the master-slave platform data. When data synchronization is completed, it switches back to the master environment, stops the related services of the backup environment, and enables the master environment. The master environment takes over all applications and resources and provides services. When the administrator returns a message disagreeing with the switch, the data waits for manual processing.
[0051] Step S310: Switch the recording device to record the operations of the entire disaster recovery process to provide post-audit.
[0052] In the above step S306, after receiving the return message sent by the administrator, the return message is parsed and the detection keywords are extracted. If a field indicating consent to switch is detected, the switch is automatically performed. If a field indicating disagreement to switch is detected, the switch is left for manual processing. The automatic switching of the master and standby environments specifically includes the following operations: judging the status of the standby environment; if it is enabled, directly executing the master-to-standby switch, modifying the standby environment status to enabled, and letting the standby environment take over all applications and resources to provide services.
[0053] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, 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 ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0054] This embodiment also provides a switching device for a management platform, which is used to implement the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0055] Figure 5 is a structural block diagram of a switching device of a management platform according to an embodiment of the present application, such as Figure 5As shown, the device is applied to a target server, wherein the target server is used to switch a target platform for managing a target terminal, the target platform is a platform selected from a first platform running on a first server and a second platform running on a second server, the target platform interacts with the target terminal through a switch, and the first server is connected to the second server through a target interface, and the device includes: a switching module 52, which is used to switch the target platform to the second platform when the target platform is the first platform and a target failure occurs on the first platform; a first determination module 54, which is used to determine a target fault cause of the target failure occurring on the first platform, and determine a target time for the first platform to complete fault repair based on the target fault cause; a second determination module 56, which is used to determine the time for the second platform to switch to the first platform according to the target time. a first moment at which the target terminal sends target data and a second moment at which the target terminal re-establishes an interactive relationship with the first platform, wherein the second moment is later than the first moment, and the target data includes data generated when the second platform, as the target platform, manages the target terminal after the first platform has most recently failed; a sending module 58, configured to send a first indication message to the second platform and a second indication message to the target terminal, wherein the first indication message is used to instruct the target terminal to transmit the target data to the first platform based on the first moment, and the second indication message is used to instruct the target terminal to adjust the execution time of a task for interacting with the target platform within a predetermined time period to other times outside the predetermined time period, and to re-establish an interactive relationship with the first platform at the second moment, wherein the predetermined time period includes the second moment.
[0056] In an optional embodiment, the first determination module 54 includes at least one of the following: a first determination unit, for determining the target time for the first platform to complete fault repair according to a predetermined rule when it is determined that the type of the target fault cause is the first type, wherein the predetermined rule records the fault repair time corresponding to the first type of fault cause; a first sending unit, for sending the fault data of the target fault occurring on the first platform to the first terminal to request the first terminal to return a target response message carrying the target time when the target fault cause cannot be determined or the type of the target fault cause is the second type, wherein the second type is a fault type other than the first type.
[0057] In an optional embodiment, the device also includes: a first synchronization module, used to synchronize the first data of the first platform to the second platform according to a target period before switching the target platform to the second platform, wherein the first data includes data generated by the first platform as the target platform to manage the target terminal; a second synchronization module, used to synchronize the first data generated within a first time period to the second platform in the event of a failure of the first platform, wherein the first time period is the time period from the time of the last data synchronization to the time when the first platform fails.
[0058] In an optional embodiment, the first determination module 54 includes: a second determination unit, used to determine the first task data of the first task executed by the first platform when a fault occurs; a sending unit, used to send an indication message to the second platform, wherein the indication message is used to instruct the second platform to query whether the second task data of the second task with the same attributes as the first task is stored in the second platform, and if the second task data is stored in the second platform, return the second task data through a first response message; a third determination unit, used to determine the cause of the target fault based on the first task data and the first response message.
[0059] In an optional embodiment, the device also includes: a third determination module, which is used to determine the target period before synchronizing the first data of the first platform to the second platform according to the target period in the following manner: when the resource occupancy rate of the first platform is less than a first threshold, the predetermined period is determined as the target period; when the resource occupancy rate of the first platform is greater than or equal to the first threshold, the predetermined period is shortened to obtain a second period, and the second period is determined as the target period.
[0060] In an optional embodiment, the second server on which the second platform runs further includes: a fourth determination module for determining whether the first data of the first platform includes target task data of the target task and whether the target task is completed after the first data of the first platform is synchronized to the second platform according to the target period and after the second platform receives the first data, wherein the target task is a task recorded in a target task list, and the target task list is used to record unexecuted tasks included in the second data received by the second platform, and the second data is the first data historically received by the second platform; a first storage module for dumping the third task data of the target task stored in the first storage path and the target task data to the second storage path when the second platform determines that the first data includes the target task data and determines that the target task is completed, wherein the third task data is the target task included in the second data. task data, the first storage path is used to cache the stored data, and the second storage path is used to store the stored data for a long time; the second storage module is used to store the target task data in the first storage path when the second platform determines that the first data includes the target task data and determines that the target task is not completed; the third storage module is used to store the fourth task data in the third storage path when the second platform determines that the first data includes fourth task data of other completed third tasks except the target task data, and to store the fifth task data in the fourth storage path when the second platform determines that the first data includes fifth task data of other unfinished fourth tasks except the target task data, and add the fourth task to the target task list, wherein the third storage path is used to store the stored data for a long time, and the fourth storage path is used to cache the stored data.
[0061] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0062] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above method embodiments when run.
[0063] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0064] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0065] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0066] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0067] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.
[0068] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices, they can be implemented using program code executable by the computing device, and thus, they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order than herein, or they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0069] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included within the scope of protection of the present application.
Claims
1. A method for switching a management platform, characterized in that: Applied to a target server, wherein the target server is used to switch a target platform for managing a target terminal, the target platform being a platform selected from a first platform running on a first server and a second platform running on a second server, the target platform interacting with the target terminal via a switch, and the first server being connected to the second server via a target interface, the method comprising: When the target platform is the first platform and a target failure occurs on the first platform, switching the target platform to the second platform; Determining a target fault cause of the target fault occurring on the first platform, and determining a target time for completing fault repair on the first platform based on the target fault cause; determining, based on the target time, a first time when the second platform sends target data to the first platform and a second time when the target terminal re-establishes an interactive relationship with the first platform, wherein the second time is later than the first time, and the target data includes data generated when the second platform, acting as the target platform, manages the target terminal after a most recent failure of the first platform; A first indication message is sent to the second platform, and a second indication message is sent to the target terminal, wherein the first indication message is used to instruct the second platform to transmit the target data to the first platform based on the first moment, and the second indication message is used to instruct the target terminal to adjust the execution time of the task of interacting with the target platform within a predetermined time period to other times outside the predetermined time period, and to re-establish an interactive relationship with the first platform at the second moment, and the predetermined time period includes the second moment.
2. The method according to claim 1, characterized in that Determining a target fault cause of the target fault occurring on the first platform, and determining a target time for completing fault repair on the first platform based on the target fault cause includes at least one of the following: When it is determined that the target fault cause is of the first type, determining a target time for the first platform to complete fault repair according to a predetermined rule, wherein the predetermined rule records a fault repair time corresponding to the first type of fault cause; When the target fault cause cannot be determined or the type of the target fault cause is the second type, the fault data of the target fault occurring on the first platform is sent to the first terminal to request the first terminal to return a target response message carrying the target time, wherein the second type is a fault type other than the first type.
3. The method according to claim 1, characterized in that Before switching the target platform to the second platform, the method further includes: Synchronizing first data of the first platform to the second platform according to a target period, wherein the first data includes data generated by the first platform as the target platform managing the target terminal; In the event that the first platform fails, the first data generated within a first time period is synchronized to the second platform, wherein the first time period is a period from the time of the most recent data synchronization to the time when the first platform fails.
4. The method according to claim 1, wherein Determining the target failure cause of the first platform includes: determining first task data of a first task executed by the first platform when a failure occurs; sending a third indication message to the second platform, wherein the third indication message is used to instruct the second platform to query whether second task data of a second task having the same attributes as the first task is stored in the second platform, and if the second task data is stored in the second platform, returning the second task data through a first response message; The target fault cause is determined according to the first task data and the first response message.
5. The method according to claim 3, characterized in that Before synchronizing the first data of the first platform to the second platform according to the target period, the method further includes: The target period is determined as follows: When the resource occupancy rate of the first platform is less than a first threshold, determining a predetermined period as the target period; When the resource occupancy rate of the first platform is greater than or equal to the first threshold, the predetermined period is shortened to obtain a second period, and the second period is determined as the target period.
6. The method according to claim 3, characterized in that After synchronizing the first data of the first platform to the second platform according to the target period, the method further includes: After receiving the first data, the second platform determines whether the first data includes target task data of a target task and whether the target task is completed, wherein the target task is a task recorded in a target task list, the target task list is used to record uncompleted tasks included in the second data received by the second platform, and the second data is the first data historically received by the second platform; The second platform, when determining that the first data includes the target task data and that the target task is completed, dumps the third task data of the target task stored in the first storage path and the target task data to the second storage path, wherein the third task data is the task data of the target task included in the second data, the first storage path is used to cache the stored data, and the second storage path is used to store the stored data for a long time; The second platform stores the target task data in the first storage path when determining that the first data includes the target task data and determining that the target task is not completed; When the second platform determines that the first data includes fourth task data of other completed third tasks in addition to the target task data, the fourth task data is stored in the third storage path; and when the second platform determines that the first data includes fifth task data of other uncompleted fourth tasks in addition to the target task data, the fifth task data is stored in the fourth storage path and the fourth task is added to the target task list, wherein the third storage path is used for long-term storage of the stored data, and the fourth storage path is used for caching the stored data.
7. A switching device for a management platform, characterized in that: Applied to a target server, wherein the target server is used to switch a target platform for managing a target terminal, the target platform being a platform selected from a first platform running on a first server and a second platform running on a second server, the target platform interacting with the target terminal via a switch, and the first server being connected to the second server via a target interface, the device comprising: a switching module, configured to switch the target platform to the second platform if the target platform is the first platform and a target failure occurs on the first platform; a first determining module, configured to determine a target fault cause of the target fault occurring on the first platform, and determine a target time for completing fault repair on the first platform based on the target fault cause; a second determining module, configured to determine, based on the target time, a first time at which the second platform sends target data to the first platform and a second time at which the target terminal re-establishes an interactive relationship with the first platform, wherein the second time is later than the first time, and the target data includes data generated when the second platform, as the target platform, manages the target terminal after a most recent failure of the first platform; A sending module, used to send a first indication message to the second platform and a second indication message to the target terminal, wherein the first indication message is used to instruct the second platform to transmit the target data to the first platform based on the first moment, and the second indication message is used to instruct the target terminal to adjust the execution time of the task of interacting with the target platform within a predetermined time period to other times outside the predetermined time period, and to re-establish an interactive relationship with the first platform at the second moment, and the predetermined time period includes the second moment.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method according to any one of claims 1 to 6 when executed by a processor.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Cloud platform switching control method, device and system and electronic equipment
CN109921942A
Data processing method and device in service system switching process
CN112650623A