Cloud host state synchronization method and device, computer equipment and storage medium

By setting the cloud host to an unavailable state in the local management system and sending alarm messages to the operation center, the problem of cloud host status synchronization delay is solved, and timely synchronization of cloud host status and user experience is improved.

CN119854312APending Publication Date: 2025-04-18CHINA TELECOM CLOUD TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411783230.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The current data synchronization solution between the cloud management platform and the local management system is difficult to synchronize the actual status of the cloud host in a timely manner, resulting in users failing to operate the cloud host on the cloud management platform.

Method used

By determining in the local management system that a preset failure occurs in the cloud host, set it to an unavailable state and send an alarm message to the operation center. After the operation center repairs the fault, it generates a cloud host status reset instruction. After receiving the instructions, the local management system sets the cloud host to be available and sends a status change message to the cloud management platform.

Benefits of technology

Timely synchronization of cloud host status is achieved, so that the status of cloud host in the cloud management platform is consistent with the actual status, avoiding operation failures caused by inconsistent status, and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854312A_ABST
    Figure CN119854312A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of cloud platform management, and discloses a cloud host state synchronization method and device, computer equipment and a storage medium, and the method comprises the steps: setting a cloud host in an unavailable state under the condition of determining that the cloud host has a preset fault, and sending an alarm message to an operation center, the operation center is used for repairing a preset fault according to the alarm message and generating a cloud host state reset instruction; under the condition that a cloud host state reset instruction sent by the operation center is received, the cloud host is set to be in an available state, a first state change message is sent to the cloud management platform, and the first state change message is used for indicating the cloud management platform to update the state of the cloud host. The problem that a user fails to operate the cloud host on the cloud management platform due to the fact that the actual state of the cloud host is difficult to synchronize to the cloud management platform in time is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cloud platform management, and in particular to a cloud host status synchronization method, device, computer equipment and storage medium. Background Art

[0002] With the rapid development of cloud computing technology, the cloud computing resources that enterprises need to manage are becoming increasingly large. Whether it is a public cloud, a private cloud, or a hybrid cloud, it is possible to build resource pools in multiple regions. However, network latency and network stability cannot be guaranteed between resource pools across regions, so each resource pool will build a local management system. In addition, a cloud management platform will be created to synchronize the data of the local management system to the cloud management platform. Through the cloud management platform, the local management systems of multiple resource pools will be managed together, providing users with a unified management view, reducing management costs, and improving management efficiency.

[0003] However, the current data synchronization solution between the cloud management platform and the local management system cannot perceive the status of the cloud host when the cloud host becomes an error state due to underlying operation failure or hardware failure. As a result, the status of the cloud host in the cloud management platform is inconsistent with the actual status of the cloud host, which ultimately leads to failure when the user operates the cloud host on the cloud management platform.

[0004] Therefore, the related technology has the problem that it is difficult to synchronize the actual status of the cloud host to the cloud management platform in a timely manner, resulting in failure of users to operate the cloud host on the cloud management platform. Summary of the invention

[0005] In view of this, the present invention provides a cloud host status synchronization method, apparatus, computer equipment and storage medium to solve the problem that it is difficult to synchronize the actual status of the cloud host to the cloud management platform in a timely manner, resulting in failure of users to operate the cloud host on the cloud management platform.

[0006] In a first aspect, the present invention provides a cloud host status synchronization method, which is applied to a local management system, and the method includes:

[0007] When it is determined that a preset fault occurs on the cloud host, the cloud host is set to an unavailable state, and an alarm message is sent to the operation center, wherein the operation center is used to repair the preset fault according to the alarm message and generate a cloud host state reset instruction;

[0008] Upon receiving a cloud host status reset instruction sent by the operation center, the cloud host is set to an available state, and a first state change message is sent to the cloud management platform, wherein the first state change message is used to instruct the cloud management platform to update the state of the cloud host.

[0009] The cloud host status synchronization method provided in this embodiment is that when the local management system determines that a preset fault has occurred in the cloud host, it sends an alarm message to the operation center to repair the cloud host in time. The operation center repairs the preset fault and generates a cloud host status reset instruction. When the local management system receives the cloud host status reset instruction sent by the operation center, the local management system resets the status of the cloud host and promptly notifies the cloud management platform of the cloud host status change to achieve cloud host status synchronization. The cloud host status is synchronized to the cloud management platform in time in combination with the operation and maintenance process, so that the status of the cloud host in the cloud management platform is consistent with the actual status of the cloud host, avoiding the operation failure caused by the inconsistency between the status of the cloud host in the cloud management platform and the actual status of the cloud host, greatly improving the user experience. It solves the problem that it is difficult to synchronize the actual status of the cloud host to the cloud management platform in time, resulting in the failure of users to operate the cloud host on the cloud management platform.

[0010] In some optional embodiments, the method further comprises:

[0011] Upon receiving an autonomous shutdown event sent by a preset service, setting the cloud host to a shutdown state, wherein the preset service is used to generate an autonomous shutdown event when the cloud host is shut down internally;

[0012] A second status change message is sent to the cloud management platform, wherein the second status change message is used to instruct the cloud management platform to update the status of the cloud host.

[0013] In this embodiment, the local management system determines whether the cloud host is shut down internally through an autonomous shutdown event. When the cloud host is shut down internally, the cloud host is set to a shutdown state, and the cloud management platform is instructed to update the status of the cloud host. In this way, when the user does not shut down the cloud host through the cloud management platform, the cloud host status is synchronized to the cloud management platform in a timely manner, so that the status of the cloud host in the cloud management platform is consistent with the actual status of the cloud host, thereby avoiding user operation failures and greatly improving the user experience.

[0014] In some optional implementations, when it is determined that a preset fault occurs on a cloud host, setting the cloud host to an unavailable state and sending an alarm message to an operation center includes:

[0015] Determine whether a preset fault has occurred on the cloud host according to the preset program in the local management system;

[0016] If it is determined that a preset fault has occurred in the cloud host, the cloud host is set to an unavailable state and a preset alarm function is called, wherein the preset alarm function is used to generate an alarm message and send the alarm message to an alarm message queue of the operation center, and the operation center is used to read the alarm message in the alarm message queue.

[0017] In this embodiment, when the local management system determines through a preset program that a preset fault occurs in the cloud host, it sends an alarm message to the operation center to repair the cloud host in time to prevent the cloud host failure from affecting user services.

[0018] In a second aspect, the present invention provides a cloud host status synchronization method, which is applied to a cloud management platform, and the method includes:

[0019] In the case of receiving a first state change message sent by the local management system, calling a preset query function of the local management system, wherein the preset query function is used to determine a first current state of the cloud host, and the first state change message is used to indicate that after the operation center sends a state reset instruction to the local management system, the local management system sets the cloud host to an available state;

[0020] The status of the cloud host in the cloud management platform record is updated according to the first current status.

[0021] In the cloud host status synchronization method provided in this embodiment, the local management system resets the cloud host status and instructs the cloud management platform to update the cloud host status through a first status change message. The cloud management platform obtains the first current status and updates the cloud host status by calling a preset query function. The cloud host status is synchronized to the cloud management platform in a timely manner in combination with the operation and maintenance process, so that the status of the cloud host in the cloud management platform is consistent with the actual status of the cloud host, avoiding user operation failures caused by cloud host status errors. This solves the problem that it is difficult to synchronize the actual status of the cloud host to the cloud management platform in a timely manner, resulting in user failures when operating the cloud host on the cloud management platform.

[0022] In some optional embodiments, the method further comprises:

[0023] In the case of receiving a second state change message sent by the local management system, calling a preset query function to obtain a second current state of the cloud host, wherein the second state change message is used to indicate that after the preset service sends an autonomous shutdown event to the local management system, the local management system sets the cloud host to a shutdown state;

[0024] The status of the cloud host in the cloud management platform record is updated according to the second current status.

[0025] In this embodiment, the cloud management platform is instructed to update the status of the cloud host through a second status change message. The cloud management platform obtains the second current status and updates the cloud management platform records, synchronizes the cloud host status in a timely manner, and ensures that the status of the cloud host in the cloud management platform is consistent with the actual status of the cloud host.

[0026] In some optional implementations, before calling the preset query function of the local management system, the method further includes:

[0027] Creating a message queue, wherein the message queue is used to store a preset number of first state change messages and second state change messages sent by the local management system;

[0028] Monitor the message queue to determine whether there is a first state change message and / or a second state change message in the message queue.

[0029] In this embodiment, a message queue is created to store the first state change message and the second state change message. The cloud host state synchronization is achieved through the first state change message and the second state change message. The cloud host state is synchronized in time so that the state of the cloud host in the cloud management platform is consistent with the actual state of the cloud host.

[0030] In a third aspect, the present invention provides a cloud host state synchronization device, which is deployed in a local management system and includes:

[0031] An alarm module is used to set the cloud host to an unavailable state and send an alarm message to the operation center when it is determined that a preset fault occurs in the cloud host, wherein the operation center is used to repair the preset fault according to the alarm message and generate a cloud host state reset instruction;

[0032] The message sending module is used to set the cloud host to an available state and send a first state change message to the cloud management platform upon receiving a cloud host state reset instruction sent by the operation center, wherein the first state change message is used to instruct the cloud management platform to update the state of the cloud host.

[0033] In a fourth aspect, the present invention provides a cloud host state synchronization device, which is deployed on a cloud management platform and includes:

[0034] A status query module, configured to call a preset query function of the local management system upon receiving a first status change message sent by the local management system, wherein the preset query function is used to determine a first current status of the cloud host, and the first status change message is used to indicate that after the operation center sends a status reset instruction to the local management system, the local management system sets the cloud host to an available status;

[0035] The status update module is used to update the status of the cloud host in the cloud management platform record according to the first current status.

[0036] In a fifth aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the cloud host status synchronization method of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions, or executes the cloud host status synchronization method of the above-mentioned second aspect or any corresponding embodiment thereof.

[0037] In a sixth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the cloud host status synchronization method of the above-mentioned first aspect or any corresponding embodiment thereof, or to execute the cloud host status synchronization method of the above-mentioned second aspect or any corresponding embodiment thereof.

[0038] In a seventh aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the cloud host status synchronization method of the above-mentioned first aspect or any corresponding embodiment thereof, or to execute the cloud host status synchronization method of the above-mentioned second aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 is a flow chart of a cloud host state synchronization method applied to a local management system according to an embodiment of the present invention;

[0041] Figure 2 is a structural diagram of a cloud host status synchronization system according to an embodiment of the present invention;

[0042] Figure 3 is a flow chart of another cloud host status synchronization method applied to a local management system according to an embodiment of the present invention;

[0043] Figure 4 It is a flowchart of a cloud host status synchronization method applied to a cloud management platform according to an embodiment of the present invention;

[0044] Figure 5 It is a flowchart of another cloud host status synchronization method applied to a cloud management platform according to an embodiment of the present invention;

[0045] Figure 6 is a schematic diagram of a process of sending and receiving messages according to an embodiment of the present invention;

[0046] Figure 7 is a structural block diagram of a cloud host state synchronization device deployed in a local management system according to an embodiment of the present invention;

[0047] Figure 8 It is a structural block diagram of a cloud host state synchronization device deployed on a cloud management platform according to an embodiment of the present invention;

[0048] Fig. 9 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0050] Combined with the application scenarios that the execution of the cloud host status synchronization method depends on, the application scenarios are described here. The cloud management platform is a product that manages public clouds, private clouds, and hybrid clouds, and provides enterprises with services for managing multiple cloud infrastructures. In order to provide users with a unified view, the cloud management platform needs to display the same type of resources from multiple resource pools on one page. If the cloud management platform first queries the data from each resource pool when the user queries the information, and then aggregates it on the cloud management platform, the entire process is time-consuming and inefficient, and cannot meet the user's real-time query needs. Therefore, it is necessary to cache a copy of the data of all resource pools on the cloud management platform. When users query data, they directly query the data they need from the data cached on the cloud management platform and display it on the page. This introduces the problem of data synchronization between the cloud management platform and the local management system.

[0051] At present, the data synchronization scheme between the cloud management platform and the local management system makes it difficult for the local management system to synchronize the status of the cloud host in the resource pool to the cloud management platform in a timely manner in some cases. For example, when the cloud host becomes an error state due to a failure in the underlying operation or a hardware failure, the cloud management platform cannot perceive the status of the cloud host and whether the operation and maintenance personnel have reset the cloud host status at the bottom layer. In addition, it is difficult for the local management system to synchronize the actual status of the cloud host to the cloud management platform in a timely manner, resulting in the inconsistency between the status of the cloud host in the cloud management platform and the actual status of the cloud host, which ultimately leads to the failure of the user to operate the cloud host on the cloud management platform. After the user does not shut down the cloud host through the cloud management platform, the cloud management platform cannot perceive the status of the cloud host in a timely manner, resulting in the inconsistency between the status of the cloud host in the cloud management platform and the actual status of the cloud host, which ultimately leads to the failure of the user to operate the cloud host on the cloud management platform.

[0052] Based on the above content, an embodiment of the present invention provides a method for synchronizing the status of a cloud host. After a cloud host fails, the local management system modifies the status of the cloud host in the local management system and alerts the operation center. After the operation and maintenance personnel of the operation center repair the failure, the local management system resets the status of the cloud host and promptly notifies the cloud management platform of the change in the status of the cloud host. After the underlying cloud host becomes an error state due to a failure or misoperation and is repaired by the operation and maintenance personnel, the status of the cloud host can be synchronized to the cloud management platform in a timely manner in combination with the operation and maintenance process, so that the status of the cloud host in the cloud management platform is consistent with the actual status of the cloud host. In this way, the status of the cloud host can be synchronized to the cloud management platform in a timely manner, avoiding the situation where the operation failure is caused by the inconsistency between the status of the cloud host in the cloud management platform and the actual status of the cloud host, greatly improving the user experience.

[0053] According to an embodiment of the present invention, a cloud host status synchronization embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, for example: a computer, a server, etc., and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.

[0054] In this embodiment, a cloud host status synchronization method is provided, which is applied to a local management system. Figure 1 is a flow chart of a cloud host status synchronization method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0055] Step S101, when it is determined that a preset fault occurs on the cloud host, the cloud host is set to an unavailable state, and an alarm message is sent to the operation center, wherein the operation center is used to repair the preset fault according to the alarm message and generate a cloud host state reset instruction.

[0056] Specifically, the preset faults include: cloud host configuration failure, startup failure, shutdown failure, etc., which are caused by cloud host underlying state errors. The local management system is used to provide resource pool management services.

[0057] The unavailable state means that the cloud host has a fault and cannot be used normally, for example: error state, offline state, abnormal state, etc. When the local management system determines that the cloud host has the above preset fault, it sets the cloud host to an unavailable state and sends an alarm message to the operation center. After receiving the alarm message, the operation and maintenance platform of the operation center alerts the operation and maintenance personnel and notifies the operation and maintenance personnel of the preset fault of the cloud host. After receiving the alarm, the operation and maintenance personnel will investigate the error phenomenon and try to repair the cloud host. After the preset fault is repaired, the state of the cloud host needs to be reset. The operation center generates a cloud host state reset instruction to control the local management system to reset the state of the cloud host. It should be noted that the work of the above-mentioned operation and maintenance personnel can be replaced by existing fault repair programs, scripts, etc.

[0058] The above Figure 2 As shown, when a cloud host fails due to an underlying state error of the cloud host such as a configuration failure, a startup failure, or a shutdown failure, the local management system of the resource pool alerts the operation center. After the operation center receives the alarm message, the operation and maintenance platform of the operation center alerts the operation and maintenance personnel. After the preset fault is repaired, the local management system of the resource pool is operated to reset the state.

[0059] Step S102, upon receiving a cloud host status reset instruction sent by the operation center, the cloud host is set to an available state, and a first state change message is sent to the cloud management platform, wherein the first state change message is used to instruct the cloud management platform to update the state of the cloud host.

[0060] Specifically, the cloud host state reset instruction is, for example: calling the reset state function of the local management system through the state reset API (Application Programming Interface) of the local management system. After the reset state function of the local management system is called, the reset state module of the local management system sets the cloud host to an available state. In addition, this embodiment adds a state notification mechanism to the reset state module. Once the cloud host state is reset due to receiving the cloud host state reset instruction, a first state change message is sent to the cloud host state change message queue of the cloud management platform. The state change message queue can be a kafka queue, and reading the message in the kafka queue can be called consuming the message in the kafka queue. The cloud management platform can consume the first state change message in the cloud host state change message queue, that is, the cloud management platform can read the first state change message in the cloud host state change message queue. The cloud management platform will call the cloud host state query function of the local management system through the state query API of the local management system, obtain the state of the cloud host in the local management system, and update the cloud management platform record according to the obtained state.

[0061] It should be noted that, in this embodiment, the first status change message, for example, the cloud host status reset message, is only used to notify the cloud management platform that the status of the cloud host has changed, and does not include the status information of the cloud host. On the one hand, this is to avoid transmitting too much data and causing additional communication overhead; on the other hand, if the first status change message carries status information, due to communication delays and other reasons, the later sent first status change message may arrive at the cloud management platform first, and the earlier sent first status change message may arrive at the cloud management platform later, resulting in an incorrect status of the cloud host in the cloud management platform.

[0062] The above Figure 2 As shown, the local management system is called through the state reset API to reset the state function, the cloud host is set to an available state, and the cloud host state reset message is sent as the first state change message to the cloud host state change message queue. The cloud management platform consumes the first state change message from the cloud host state change message queue.

[0063] Through the above steps, the underlying misoperation causes the cloud host to become an error state. The operation center receives an alarm, and the operation and maintenance personnel repair the cloud host and call the underlying API of the local management system to set the cloud host to an available state. When the user logs in to the cloud management platform to check the status of the cloud host, the cloud management platform shows that the cloud host is in an available state.

[0064] The cloud host status synchronization method provided in this embodiment is that when the local management system determines that a preset fault has occurred in the cloud host, it sends an alarm message to the operation center to repair the cloud host in time. The operation center repairs the preset fault and generates a cloud host status reset instruction. When the local management system receives the cloud host status reset instruction sent by the operation center, the local management system resets the status of the cloud host and promptly notifies the cloud management platform of the cloud host status change to achieve cloud host status synchronization. The cloud host status is synchronized to the cloud management platform in time in combination with the operation and maintenance process, so that the status of the cloud host in the cloud management platform is consistent with the actual status of the cloud host, avoiding the operation failure caused by the inconsistency between the status of the cloud host in the cloud management platform and the actual status of the cloud host, greatly improving the user experience. It solves the problem that it is difficult to synchronize the actual status of the cloud host to the cloud management platform in time, resulting in the failure of users to operate the cloud host on the cloud management platform.

[0065] In this embodiment, another cloud host status synchronization method applied to a local management system is provided, which can be used for the above-mentioned local management system. Figure 3 is a flow chart of another cloud host status synchronization method applied to a local management system according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0066] Step S301, when it is determined that a preset fault occurs on the cloud host, the cloud host is set to an unavailable state, and an alarm message is sent to the operation center, wherein the operation center is used to repair the preset fault according to the alarm message and generate a cloud host state reset instruction.

[0067] Specifically, the above step S301 includes:

[0068] Step S3011, determining whether a preset fault occurs on the cloud host according to a preset program in the local management system.

[0069] Step S3012, if it is determined that a preset fault occurs on the cloud host, the cloud host is set to an unavailable state and a preset alarm function is called, wherein the preset alarm function is used to generate an alarm message and send the alarm message to the alarm message queue of the operation center, and the operation center is used to read the alarm message in the alarm message queue.

[0070] Specifically, all programs in the local management system that will set the cloud host status to an unavailable state are modified, so that the local management system can use the modified programs to set the cloud host to an unavailable state while also alerting the operation center. The modified programs are the preset programs.

[0071] Therefore, the local management system determines whether the cloud host has a preset fault according to the preset program in the local management system. If it is determined that the cloud host has a preset fault, the local management system uses the preset program to set the cloud host to an unavailable state, and at the same time, alerts the operation and maintenance platform. The alarm process, for example, uses the alarm API of the operation center to call the preset alarm function of the operation center, generates an alarm message through the preset alarm function, and sends the alarm message to the alarm message queue of the operation center. The alarm message queue can be a kafka queue, and the operation and maintenance platform of the operation center can consume the alarm messages in the alarm message queue.

[0072] The above process is as follows Figure 2 As shown, when a cloud host fails due to underlying state errors (errors) of the cloud host such as configuration failure, startup failure, and shutdown failure, the local management system of the resource pool calls the alarm API and calls the alarm function of the operation center. The alarm function generates an alarm message and sends the alarm message to the alarm message queue (kafka) of the operation center. The operation and maintenance platform of the operation center consumes the alarm messages in the alarm message queue.

[0073] In this embodiment, when the local management system determines through a preset program that a preset fault occurs in the cloud host, it sends an alarm message to the operation center to repair the cloud host in time to prevent the cloud host failure from affecting user services.

[0074] Step S302: upon receiving the cloud host status reset instruction sent by the operation center, the cloud host is set to an available state, and a first state change message is sent to the cloud management platform, wherein the first state change message is used to instruct the cloud management platform to update the state of the cloud host. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.

[0075] Step S303, upon receiving an autonomous shutdown event sent by a preset service, setting the cloud host to a shutdown state, wherein the preset service is used to generate an autonomous shutdown event when the cloud host is shut down internally.

[0076] Step S304: Send a second status change message to the cloud management platform, where the second status change message is used to instruct the cloud management platform to update the status of the cloud host.

[0077] Specifically, the preset service is, for example, a virtualization management service in a local management system. Taking the virtualization management service as an example, the virtualization management service will monitor the status of the cloud host. When the virtualization management service detects that the user has not shut down the cloud host through the cloud management platform, the virtualization management service will generate an autonomous shutdown event and send the autonomous shutdown event to the local management system.

[0078] After receiving the autonomous shutdown event, the local management system sets the management state of the cloud host to the shutdown state, and at the same time sends a second state change message to the cloud management platform. The second state change message is, for example, a cloud host state change message. The second state change message may also be the same as the first state change message.

[0079] The process of the local management system sending the second state change message to the cloud management platform is, for example: sending the second state change message to the cloud host state change message queue of the cloud management platform. The cloud management platform can consume the second state change message in the cloud host state change message queue. When the cloud management platform monitors the second state change message, the cloud management platform will call the cloud host state query function of the local management system through the state query API of the local management system, obtain the state of the cloud host in the local management system, and update the cloud management platform record according to the obtained state.

[0080] It should be noted that, in this embodiment, the second status change message is only used to notify the cloud management platform that the status of the cloud host has changed, and does not include the status information of the cloud host.

[0081] The above process is as follows Figure 2 As shown, the local management system automatically resets the cloud host state, and at the same time, sends the cloud host state change message as the second state change message to the cloud host state change message queue, and the cloud management platform consumes the second state change message from the cloud host state change message queue.

[0082] The user did not shut down the cloud host through the cloud management platform. The cloud host status is synchronized to the cloud management platform in time through the above steps. At this time, the user logs in to the cloud management platform, and the status of the cloud host in the cloud management platform is shutdown.

[0083] In this embodiment, the local management system determines whether the cloud host is shut down internally through an autonomous shutdown event. When the cloud host is shut down internally, the cloud host is set to a shutdown state, and the cloud management platform is instructed to update the status of the cloud host. In this way, when the user does not shut down the cloud host through the cloud management platform, the cloud host status is synchronized to the cloud management platform in a timely manner, so that the status of the cloud host in the cloud management platform is consistent with the actual status of the cloud host, thereby avoiding user operation failures and greatly improving the user experience.

[0084] This embodiment provides another cloud host status synchronization method applied to the local management system, combined with the data synchronization solution of the operation and maintenance process, which can achieve that after the underlying cloud host becomes an error state due to a fault or misoperation, after the operation and maintenance personnel repair it, the cloud host status can be synchronized to the cloud management platform in a timely manner. In addition, when the user operates the cloud host without going through the cloud management platform, the status change of the cloud host can be perceived in time and synchronized to the cloud management platform. Avoiding operation failures caused by inconsistent upper and lower states improves user experience.

[0085] According to an embodiment of the present invention, an embodiment of a cloud host status synchronization method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, for example: a computer, a server, etc., and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0086] In this embodiment, a cloud host status synchronization method is provided, which is applied to a cloud management platform. Figure 4 is a flow chart of a cloud host status synchronization method according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:

[0087] Step S401, upon receiving a first status change message sent by the local management system, calling a preset query function of the local management system, wherein the preset query function is used to determine a first current status of the cloud host, and the first status change message is used to indicate that after the operation center sends a status reset instruction to the local management system, the local management system sets the cloud host to an available status.

[0088] Specifically, after receiving the alarm message, the operation and maintenance platform of the operation center alerts the operation and maintenance personnel and notifies the operation and maintenance personnel of the preset fault of the cloud host. After receiving the alarm, the operation and maintenance personnel will investigate the error phenomenon and try to repair the cloud host. After the preset fault is repaired, it is necessary to reset the status of the cloud host. The operation center generates a cloud host status reset instruction to control the local management system to reset the status of the cloud host. After the reset status function of the local management system is called, the reset status module of the local management system sets the cloud host to an available state. In addition, this embodiment adds a status notification mechanism to the reset status module. Once the cloud host status is reset due to receiving the cloud host status reset instruction, a first status change message is sent to the cloud host status change message queue of the cloud management platform.

[0089] Preset query functions include: cloud host status query function of the local management system. The cloud management platform can read the cloud host status change message queue. If the first status change message is read in the cloud host status change message queue, the cloud management platform will call the cloud host status query function of the local management system through the status query API of the local management system to obtain the status of the cloud host in the local management system, that is, the first current status of the cloud host.

[0090] Step S402: Update the status of the cloud host in the cloud management platform record according to the first current status.

[0091] Specifically, the cloud management platform updates the status of the cloud host in the cloud management platform record according to the acquired first current status.

[0092] In the cloud host status synchronization method provided in this embodiment, the local management system resets the cloud host status and instructs the cloud management platform to update the cloud host status through a first status change message. The cloud management platform obtains the first current status and updates the cloud host status by calling a preset query function. The cloud host status is synchronized to the cloud management platform in a timely manner in combination with the operation and maintenance process, so that the status of the cloud host in the cloud management platform is consistent with the actual status of the cloud host, avoiding user operation failures caused by cloud host status errors. This solves the problem that it is difficult to synchronize the actual status of the cloud host to the cloud management platform in a timely manner, resulting in user failures when operating the cloud host on the cloud management platform.

[0093] In this embodiment, another cloud host status synchronization method applied to a cloud management platform is provided, which can be used for the above-mentioned cloud management platform. Figure 5 FIG. 1 is a flow chart of another cloud host status synchronization method applied to a cloud management platform according to an embodiment of the present invention. Figure 5 As shown, the process includes the following steps:

[0094] Step S501: Create a message queue, wherein the message queue is used to store a preset number of first state change messages and second state change messages sent by the local management system.

[0095] Step S502: monitor the message queue to determine whether there is a first state change message and / or a second state change message in the message queue.

[0096] Specifically, a message queue is created, for example, a state change message queue, which may be a Kafka queue. The cloud management platform may monitor the message queue to determine whether there is a first state change message and / or a second state change message in the message queue.

[0097] Resource pools are distributed in multiple regions, for example: Region1, ..., Regionx, where x is greater than 1 and the specific value is set according to the actual situation. Each resource pool will have a local management system. The local management system is used to provide resource pool management services. For example: the resource pool in Region1 includes resource pool management services AZ1, resource pool management services AZ2, and resource pool management services AZ3, and the resource pool in Regionx includes resource pool management services AZx. Figure 6 As shown, the resource pool management service of multiple local management systems will send state change messages to the message queue, and the cloud management platform will monitor the message queue and listen to the state change messages. In addition, the resource pool management service can also send alarms to the operation and maintenance platform. The state change message includes the first state change message and the second state change message mentioned above.

[0098] In this embodiment, a message queue is created to store the first state change message and the second state change message. The cloud host state synchronization is achieved through the first state change message and the second state change message. The cloud host state is synchronized in time so that the state of the cloud host in the cloud management platform is consistent with the actual state of the cloud host.

[0099] Step S503, upon receiving the first state change message sent by the local management system, calling the preset query function of the local management system, wherein the preset query function is used to determine the first current state of the cloud host, and the first state change message is used to indicate that after the operation center sends a state reset instruction to the local management system, the local management system sets the cloud host to an available state. For details, please refer to Figure 1 Step S401 of the illustrated embodiment will not be described in detail here.

[0100] Step S504: Update the status of the cloud host in the cloud management platform record according to the first current status. Figure 1 Step S402 of the illustrated embodiment will not be described in detail here.

[0101] Step S505, when receiving the second state change message sent by the local management system, call the preset query function to obtain the second current state of the cloud host, wherein the second state change message is used to indicate that after the preset service sends an autonomous shutdown event to the local management system, the local management system sets the cloud host to the shutdown state.

[0102] Step S506, updating the status of the cloud host in the cloud management platform record according to the second current status.

[0103] Specifically, after receiving the autonomous shutdown event, the local management system sets the management state of the cloud host to the shutdown state, and at the same time, sends a second state change message to the cloud management platform, such as a cloud host state change message.

[0104] Preset query functions include, for example, the cloud host status query function of the local management system. The cloud management platform can read the cloud host status change message queue. If the second status change message is read in the cloud host status change message queue, the cloud management platform will call the cloud host status query function of the local management system through the status query API of the local management system to obtain the status of the cloud host in the local management system, that is, the second current status of the cloud host. It should be noted that although the first current status and the second current status are both the status of the cloud host in the local management system, there may be a difference between the first current status and the second current status due to the different times of querying the status. Therefore, the first current status and the second current status are used to distinguish between the two.

[0105] The cloud management platform updates the status of the cloud host in the cloud management platform record according to the acquired second current status.

[0106] In this embodiment, the cloud management platform is instructed to update the status of the cloud host through a second status change message. The cloud management platform obtains the second current status and updates the cloud management platform records, synchronizes the cloud host status in a timely manner, and ensures that the status of the cloud host in the cloud management platform is consistent with the actual status of the cloud host.

[0107] This embodiment provides another cloud host status synchronization method applied to the cloud management platform, combined with the data synchronization solution of the operation and maintenance process, which can achieve that after the underlying cloud host becomes an error state due to a fault or misoperation, after the operation and maintenance personnel repair it, the cloud host status can be synchronized to the cloud management platform in a timely manner. In addition, when the user operates the cloud host without going through the cloud management platform, the status change of the cloud host can be perceived in time and synchronized to the cloud management platform. Avoiding operation failures caused by inconsistent upper and lower states improves user experience.

[0108] In this embodiment, a cloud host state synchronization device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated here. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0109] This embodiment provides a cloud host status synchronization device, which is deployed in a local management system, such as Figure 7 As shown, including:

[0110] The alarm module 701 is used to set the cloud host to an unavailable state when it is determined that a preset fault occurs in the cloud host, and send an alarm message to the operation center, wherein the operation center is used to repair the preset fault according to the alarm message and generate a cloud host state reset instruction;

[0111] The message sending module 702 is used to set the cloud host to an available state and send a first state change message to the cloud management platform upon receiving a cloud host state reset instruction sent by the operation center, wherein the first state change message is used to instruct the cloud management platform to update the state of the cloud host.

[0112] In some optional embodiments, the device further comprises:

[0113] A setting module, configured to set the cloud host to a shutdown state upon receiving an autonomous shutdown event sent by a preset service, wherein the preset service is configured to generate an autonomous shutdown event after the cloud host is shut down internally;

[0114] The sending module is used to send a second status change message to the cloud management platform, wherein the second status change message is used to instruct the cloud management platform to update the status of the cloud host.

[0115] In some optional implementations, the alarm module 701 includes:

[0116] A judgment unit, used to judge whether a preset fault occurs on the cloud host according to a preset program in the local management system;

[0117] The calling unit is used to set the cloud host to an unavailable state and call a preset alarm function if it is determined that a preset fault occurs in the cloud host, wherein the preset alarm function is used to generate an alarm message and send the alarm message to an alarm message queue of an operation center, and the operation center is used to read the alarm message in the alarm message queue.

[0118] This embodiment provides a cloud host status synchronization device, which is deployed on a cloud management platform, such as Figure 8 As shown, including:

[0119] The state query module 801 is used to call a preset query function of the local management system when receiving a first state change message sent by the local management system, wherein the preset query function is used to determine a first current state of the cloud host, and the first state change message is used to indicate that after the operation center sends a state reset instruction to the local management system, the local management system sets the cloud host to an available state;

[0120] The status update module 802 is used to update the status of the cloud host in the cloud management platform record according to the first current status.

[0121] In some optional embodiments, the device further comprises:

[0122] A calling module is used to call a preset query function to obtain a second current state of the cloud host when receiving a second state change message sent by the local management system, wherein the second state change message is used to indicate that after the preset service sends an autonomous shutdown event to the local management system, the local management system sets the cloud host to a shutdown state;

[0123] The update module is used to update the status of the cloud host in the cloud management platform record according to the second current status.

[0124] In some optional embodiments, the device further comprises:

[0125] A creation module, used to create a message queue, wherein the message queue is used to store a preset number of first state change messages and second state change messages sent by the local management system;

[0126] The monitoring module is used to monitor the message queue and determine whether there is a first state change message and / or a second state change message in the message queue.

[0127] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0128] The cloud host status synchronization device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0129] The embodiment of the present invention also provides a computer device having the above Figure 7 or Figure 8 The cloud host status synchronization device is shown.

[0130] See also Fig. 9 , Fig. 9is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig. 9 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9 A processor 10 is taken as an example.

[0131] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include an integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0132] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0133] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer 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.

[0134] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0135] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0136] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0137] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0138] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined in this application.

Claims

1. A cloud host status synchronization method, characterized in that: The method is applied to a local management system, and the method comprises: When it is determined that a preset fault occurs on a cloud host, the cloud host is set to an unavailable state, and an alarm message is sent to an operation center, wherein the operation center is used to repair the preset fault according to the alarm message and generate a cloud host state reset instruction; Upon receiving the cloud host status reset instruction sent by the operation center, the cloud host is set to an available state, and a first state change message is sent to the cloud management platform, wherein the first state change message is used to instruct the cloud management platform to update the state of the cloud host.

2. The method according to claim 1, characterized in that The method further comprises: Upon receiving an autonomous shutdown event sent by a preset service, setting the cloud host to a shutdown state, wherein the preset service is used to generate the autonomous shutdown event after the cloud host is shut down internally; A second status change message is sent to the cloud management platform, wherein the second status change message is used to instruct the cloud management platform to update the status of the cloud host.

3. The method according to claim 1, characterized in that When it is determined that a preset fault occurs on the cloud host, setting the cloud host to an unavailable state and sending an alarm message to the operation center includes: Determining whether the cloud host has the preset fault according to the preset program in the local management system; If it is determined that the cloud host has the preset fault, the cloud host is set to an unavailable state and a preset alarm function is called, wherein the preset alarm function is used to generate the alarm message and send the alarm message to the alarm message queue of the operation center, and the operation center is used to read the alarm message in the alarm message queue.

4. A cloud host status synchronization method, characterized in that: The method is applied to a cloud management platform, and the method includes: In the case of receiving a first state change message sent by the local management system, calling a preset query function of the local management system, wherein the preset query function is used to determine a first current state of the cloud host, and the first state change message is used to indicate that after the operation center sends a state reset instruction to the local management system, the local management system sets the cloud host to an available state; The status of the cloud host in the cloud management platform record is updated according to the first current status.

5. The method according to claim 4, characterized in that The method further comprises: In the case of receiving a second state change message sent by the local management system, calling the preset query function to obtain a second current state of the cloud host, wherein the second state change message is used to indicate that after the preset service sends an autonomous shutdown event to the local management system, the local management system sets the cloud host to a shutdown state; The status of the cloud host in the cloud management platform record is updated according to the second current status.

6. The method according to claim 5, characterized in that Before calling the preset query function of the local management system, the method further includes: Creating a message queue, wherein the message queue is used to store a preset number of the first state change messages and the second state change messages sent by the local management system; Monitor the message queue to determine whether the first state change message and / or the second state change message exists in the message queue.

7. A cloud host status synchronization device, characterized in that: The device is deployed in a local management system, and the device includes: An alarm module is used to set the cloud host to an unavailable state and send an alarm message to an operation center when it is determined that a preset fault occurs on the cloud host, wherein the operation center is used to repair the preset fault according to the alarm message and generate a cloud host state reset instruction; A message sending module is used to set the cloud host to an available state and send a first state change message to the cloud management platform upon receiving the cloud host state reset instruction sent by the operation center, wherein the first state change message is used to instruct the cloud management platform to update the state of the cloud host.

8. A cloud host status synchronization device, characterized in that: The device is deployed on a cloud management platform and includes: A status query module, configured to call a preset query function of the local management system upon receiving a first status change message sent by the local management system, wherein the preset query function is used to determine a first current status of the cloud host, and the first status change message is used to indicate that after the operation center sends a status reset instruction to the local management system, the local management system sets the cloud host to an available status; A status update module is used to update the status of the cloud host in the cloud management platform record according to the first current status.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the cloud host status synchronization method according to any one of claims 1 to 6 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the cloud host status synchronization method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Cloud platform management method and platform

    CN112346858A

  • Method for managing cloud host by using operation and maintenance platform

    CN113901409A

  • Cloud host recovery method and device, and medium

    CN114840362A

  • Cloud service operation and maintenance management method and system

    CN115102840A