A hybrid cloud management platform resource status data synchronization method
By introducing a two-way synchronization mechanism in the hybrid cloud management platform and utilizing a global state counter and state monitoring unit, the problem of inconsistent states between the cloud platform side and the underlying resource pool side is resolved, enabling fast state synchronization and consistency confirmation, and improving the user experience.
Patent Information
- Application Number
- CN202311716247.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-14
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2043-12-14
AI Technical Summary
In the existing technology, the hybrid cloud management platform has inconsistent status between the cloud platform side and the underlying resource pool side, which affects the user experience. The synchronization mechanism of scheduled rotation and on-demand calling of the underlying interface cannot effectively solve the problem of inconsistent status.
A two-way synchronization mechanism is adopted to monitor the status changes of the cloud platform side and the underlying resource pool side through the global status counter and status monitoring unit, and the status collection and comparison unit is used to collect and compare status change information to achieve status synchronization between the cloud platform side and the underlying resource pool side.
It reduces the inconsistency between the cloud platform side and the underlying resource pool side, improves user perception, and quickly identifies inconsistencies through status monitoring and synchronization mechanisms, ensuring state consistency and improving the timeliness of synchronization.
Smart Images

Figure CN117812089B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cloud computing, and in particular to a method for synchronizing resource status data of a hybrid cloud management platform. Background Art
[0002] The cloud hybrid cloud management platform manages all cloud resource pools across the country and provides services to users in a unified manner. In order to improve user experience, a database is used to store users' cloud resource data, such as cloud hosts, cloud hard drives, VPCs, and other list data. In this way, when users access, they can read database data and quickly provide feedback to improve user perception. However, this approach will inevitably introduce state inconsistency issues. For example, the underlying state changes without the upper data layer noticing, resulting in inconsistent states on both sides. Or the last state change, but due to network problems or underlying interface forwarding problems, the underlying state changes are not timely, which will also cause state inconsistency issues.
[0003] Currently, the commonly used method to solve the synchronization mechanism is usually that the cloud management platform regularly calls the underlying resource pool interface to obtain the underlying resource status for the cloud resources to be synchronized, or calls the underlying interface status on demand to synchronize. The interval setting of the regular rotation is not easy to control. If the time is set too short, the resource consumption is large. If the setting time is too long, the synchronization is not timely. Calling the underlying interface on demand also has the problem of untimely response, affecting the user experience.
[0004] Patent CN112182100A discloses a method and system for synchronizing state data on a cloud management platform. The system configures activity convergence factors for various operations that affect state changes on various cloud computing resources. When an operation that affects state changes occurs on a resource, the activity is set to the maximum value and divided into active zones. The activity of the resource is deducted according to the corresponding activity convergence factor. When the activity reaches 0, the resource is divided into a static zone. The state synchronization thread pool periodically generates a fixed number of state synchronization threads and allocates them to active and static zones in a preset ratio. Each thread obtains the latest state for a resource in the corresponding zone and synchronizes the state with the database of the cloud management platform. The system mainly focuses on dividing resources into active and static zones, setting activity and activity convergence factors for various resources managed by the cloud management platform, and dividing resources into active or static zones based on different activity levels, thereby executing different state data synchronization strategies. However, it does not address how to detect inconsistent states between the upper and lower layers or confirm the synchronization results.
[0005] The present invention further considers how to improve the timeliness of synchronization and how to confirm the synchronization results, and proposes a hybrid cloud management platform resource status data synchronization method. Summary of the Invention
[0006] The purpose of this invention is to provide a method for synchronizing resource status data on a hybrid cloud management platform to address the issue of inconsistent status between the cloud platform and the underlying resource pool. By improving one-way synchronization to two-way synchronization, inconsistencies between the cloud platform and the underlying resource pool are reduced. Furthermore, a state monitoring and auditing mechanism is introduced to enable state auditing and consistency verification.
[0007] The present invention provides a method for synchronizing resource status data of a hybrid cloud management platform, comprising:
[0008] Set the global status counter;
[0009] Based on the global status counter, obtain the value of the global status counter on the cloud platform side, and realize status synchronization from the cloud platform side to the underlying resource pool side;
[0010] Based on the global status counter, obtain the global status counter value on the bottom resource pool side, and realize status synchronization from the bottom resource pool side to the cloud platform side;
[0011] Use the status monitoring unit to monitor the cloud platform side and the underlying resource pool side according to the monitoring rules, obtain status change information, and send the status change information to the status collection and comparison unit;
[0012] The state collection and comparison unit updates the state change information into an ordered set of resource states on the cloud platform side and an ordered set of resource states on the underlying resource pool side;
[0013] Determine the state resources to be updated on the cloud platform side and the underlying resource pool side according to the ordered set of resource states on the cloud platform side and the ordered set of resource states on the underlying resource pool side;
[0014] The state synchronization unit completes resource state data synchronization between the cloud platform side and the underlying resource pool side according to the state resources to be updated.
[0015] In some embodiments of the present application, the global status counter includes: system number_resource type_resource UU ID_status count_status flag;
[0016] Wherein, the state count starts from 1;
[0017] The status mark is an enumeration value, where a status mark of 0 indicates waiting for update, a status mark of 1 indicates successful update, and a status mark of 2 indicates updating.
[0018] In some embodiments of the present application, state synchronization from the cloud platform to the underlying resource pool is implemented, including:
[0019] The cloud platform sends a status synchronization request to the underlying resource pool.
[0020] The bottom resource pool side completes state synchronization after receiving the state synchronization request;
[0021] Among them, setting the first flag bit means that the cloud platform side sends a positive synchronization request to the underlying resource pool side;
[0022] Set the second flag to synchronize the underlying resource pool side to the cloud platform side in the reverse direction.
[0023] The values of the first and second flag bits are both 0 and 1, 0 indicates failure and 1 indicates success.
[0024] In some embodiments of the present application, after receiving the state synchronization request, the underlying resource pool side completes state synchronization, including:
[0025] If the underlying resource pool side receives the state synchronization request, completes the state synchronization operation and synchronously returns the operation result, then updates the data and updates both the first flag bit and the second flag bit to 1;
[0026] If the underlying resource pool side does not receive the state synchronization request, the state synchronization request is resent, and the number of resending times is 3;
[0027] If the underlying resource pool side does not return an operation result after receiving the state synchronization request, the global state counter value of the underlying resource pool side is compared with the global state counter value of the cloud platform side to complete the state synchronization operation.
[0028] In some embodiments of the present application, the global state counter value on the underlying resource pool side is compared with the global state counter value on the cloud platform side to complete the state synchronization operation, including:
[0029] If the status count on the underlying resource pool side is consistent with the status count on the cloud platform side, the status mark on the underlying resource pool side is compared with the status mark on the cloud platform side;
[0030] If the status mark on the underlying resource pool side is consistent with the status mark on the cloud platform side, no operation is performed;
[0031] If the status mark on the underlying resource pool side is inconsistent with the status mark on the cloud platform side, the status on the cloud platform side is synchronized with the status on the underlying resource pool side;
[0032] If the status count on the underlying resource pool side is inconsistent with the status count on the cloud platform side, a sequential chain status synchronization update is performed based on the difference in status counts.
[0033] In some embodiments of the present application, performing a sequential chain state synchronization update based on the difference in state counts includes:
[0034] The status count on the bottom resource pool side is n, and the status is Sn , the cloud platform side state count is m, then the state is S m , where m<n;
[0035] The sequential chain state is updated synchronously as follows:
[0036] S m →S m+1 →……→S n ;
[0037] After completing the sequential chain state synchronization update, the update process is recorded in the update record.
[0038] In some embodiments of the present application, state synchronization from the underlying resource pool to the cloud platform is implemented, including:
[0039] The underlying resource pool sends a status synchronization request to the cloud platform.
[0040] The cloud platform side completes the state synchronization after receiving the state synchronization request;
[0041] Among them, setting the third flag bit is to send a positive synchronization request from the underlying resource pool side to the cloud platform side;
[0042] Set the fourth flag to synchronize the cloud platform side to the underlying resource pool side in the reverse direction.
[0043] The values of the third and fourth flag bits are both 0 and 1, 0 indicates failure and 1 indicates success.
[0044] In some embodiments of the present application, after receiving the state synchronization request, the cloud platform side completes the state synchronization, including:
[0045] If the cloud platform side receives the state synchronization request, completes the state synchronization operation and synchronously returns the operation result, then updates the data and updates the third flag bit and the fourth flag bit to 1;
[0046] If the cloud platform does not receive the state synchronization request, the state synchronization request is resent three times.
[0047] If the cloud platform side does not return an operation result after receiving the state synchronization request, the global state counter value of the cloud platform side is compared with the global state counter value of the underlying resource pool side to complete the state synchronization operation.
[0048] In some embodiments of the present application, the global state counter value on the cloud platform side is compared with the global state counter value on the underlying resource pool side to complete the state synchronization operation, including:
[0049] If the status count on the cloud platform side is consistent with the status count on the underlying resource pool side, the status mark on the cloud platform side is compared with the status mark on the underlying resource pool side;
[0050] If the status mark on the cloud platform side is consistent with the status mark on the underlying resource pool side, no operation is performed;
[0051] If the status mark on the cloud platform side is inconsistent with the status mark on the underlying resource pool side, the status of the underlying resource pool side and the status on the cloud platform side are synchronized;
[0052] If the state count on the cloud platform side is inconsistent with the state count on the underlying resource pool side, a sequential chain state synchronization update is performed based on the difference in the state counts.
[0053] In some embodiments of the present application, performing a sequential chain state synchronization update based on the difference in state counts includes:
[0054] The status count on the bottom resource pool side is i, and the status is S i , the cloud platform side state count is j, then the state is S j , where i<j;
[0055] The sequential chain state is updated synchronously as follows:
[0056] S i →S i+1 →……→S j ;
[0057] After completing the sequential chain state synchronization update, the update process is recorded in the update record.
[0058] In some embodiments of the present application, the monitoring rule includes a monitoring resource type, a monitoring resource operation, and a monitoring resource status;
[0059] The monitoring resource types include: cloud host, cloud hard disk, elastic IP and physical machine;
[0060] The monitoring resource operations include: cloud host startup, cloud host shutdown, cloud host restart, cloud hard disk binding, cloud hard disk unbinding, elastic IP binding and elastic IP unbinding;
[0061] The monitoring resource status includes: running, shut down, unbound and bound.
[0062] In some embodiments of the present application, the cloud platform side resource state ordered set and the underlying resource pool side resource state ordered set are both defined as:
[0063] S={(resource_key1, status1), (resource_key2, status2), ..., (resource_keyn, statusn)};
[0064] Among them, resource_key represents resource type_resource UUID_status count_resource status change time;
[0065] Status indicates the status of resources on the cloud platform or the underlying resource pool.
[0066] In some embodiments of the present application, determining the state resources to be updated on the cloud platform side and the underlying resource pool side according to the ordered set of resource states on the cloud platform side and the ordered set of resource states on the underlying resource pool side includes:
[0067] According to the ordered set S of resource states on the cloud platform side a and the ordered set of resource states S on the underlying resource pool side b Determine that there is no need to update state resource C ab , the state resource C does not need to be updated ab The calculation method is: C ab =S a ∩S b ;
[0068] Based on the above, there is no need to update the state resource C ab Determine the state resources M to be updated on the cloud platform side and the underlying resource pool side ab , the state resource M to be updated ab The calculation method is M ab =S a ∪S b -C ab .
[0069] In some embodiments of the present application, the state synchronization unit completes resource state data synchronization between the cloud platform side and the underlying resource pool side according to the state resource to be updated, including:
[0070] If the state resource to be updated M ab If it is an empty collection, the resource status on the cloud platform side and the underlying resource pool side is in data synchronization state;
[0071] If the state resource to be updated M ab If it is not an empty collection, data synchronization of resource status between the cloud platform side and the underlying resource pool side is performed.
[0072] Compared with the prior art, the advantages and beneficial effects of the present invention are:
[0073] Compared with the current one-way synchronization method from the cloud platform side, the present invention determines the forward and reverse synchronization information through the first flag bit and the second flag bit to realize two-way synchronization of the state. At the same time, a global state counter is set to record the state change process and manage the entire state change process. It can reduce the inconsistency of the state between the cloud platform side and the underlying resource pool side, and improve user perception.
[0074] The present invention sets a status monitoring unit to monitor the status changes on the cloud platform side and the underlying resource pool side, reports to the status collection and comparison unit, quickly identifies the inconsistency between the cloud platform side and the underlying resource pool side, and marks the number of status changes through a status count to eliminate the interference caused by the update time difference between the cloud platform side and the underlying resource pool side.
[0075] The present invention quickly obtains a set of resources with inconsistent resource states by calculating the intersection, union, and difference of ordered sets, automatically completes resource state synchronization, and realizes resource state auditing and consistency confirmation.
[0076] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 A schematic diagram of a method for synchronizing resource status data on a hybrid cloud management platform according to the present invention;
[0078] Figure 2 This is a diagram of the relationship between the cloud platform and the underlying resource pool in an embodiment of the present invention. DETAILED DESCRIPTION
[0079] The technical solution of the present invention is further described below with reference to the accompanying drawings and embodiments.
[0080] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0081] It should be noted that the terms used herein are intended only to describe specific embodiments and are not intended to limit the exemplary embodiments of the present invention. As used herein, unless the context clearly indicates otherwise, the singular is intended to include the plural. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they specify the presence of features, steps, operations, devices, components, and / or combinations thereof, and do not exclude other elements or objects. The terms "first," "second," and similar terms used in the present invention do not denote any order, quantity, or importance, but are simply used to distinguish between different components. Terms such as "upper," "lower," "left," "right," "front," "rear," "vertical," "horizontal," "side," and "bottom" indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings. These terms are merely relative terms defined to facilitate the description of the structural relationships between the various components or elements of the present invention and do not specifically refer to any particular component or element in the invention and should not be construed as limiting the invention. Terms such as "fixed," "connected," and "connected" should be interpreted broadly to mean that a connection can be fixed, integral, or detachable; it can be direct or indirect through an intermediary. Relevant scientific research or technical personnel in this field can determine the specific meanings of the above terms in the present invention based on specific circumstances, and they should not be understood as limitations on the present invention.
[0082] Example
[0083] The present invention provides a hybrid cloud management platform resource status data synchronization method, such as Figure 1 and Figure 2 Shown, including:
[0084] S100, setting a global status counter.
[0085] S200, based on the global status counter, obtain the value of the global status counter on the cloud platform side, and realize status synchronization from the cloud platform side to the underlying resource pool side.
[0086] S300: Based on the global status counter, obtain the value of the global status counter on the bottom resource pool side, and realize status synchronization from the bottom resource pool side to the cloud platform side.
[0087] S400: Using the status monitoring unit to monitor the cloud platform side and the underlying resource pool side according to the monitoring rules, obtain status change information, and send the status change information to the status collection and comparison unit.
[0088] S500: The state collection and comparison unit updates the state change information into an ordered set of resource states on the cloud platform side and an ordered set of resource states on the underlying resource pool side.
[0089] S600: Determine the resources to be updated on the cloud platform side and the underlying resource pool side according to the ordered set of resource states on the cloud platform side and the ordered set of resource states on the underlying resource pool side.
[0090] S700, the state synchronization unit completes resource state data synchronization between the cloud platform side and the underlying resource pool side according to the state resources to be updated.
[0091] In some embodiments of the present application, in step S100, the global status counter includes: system number_resource type_resource UU ID_status count_status flag, where the status count starts at 1, and the status flag is an enumerated value, where a status flag of 0 indicates waiting for update, a status flag of 1 indicates a successful update, and a status flag of 2 indicates updating in progress. The status count is incremented by 1 for each successful status change.
[0092] In some embodiments of the present application, in step S200, state synchronization from the cloud platform to the underlying resource pool is implemented, including:
[0093] The cloud platform sends a status synchronization request to the underlying resource pool.
[0094] The bottom resource pool side completes the state synchronization after receiving the state synchronization request.
[0095] Among them, the first flag is set to send a forward synchronization request from the cloud platform side to the underlying resource pool side.
[0096] The second flag is set to synchronize the underlying resource pool side to the cloud platform side in the reverse direction.
[0097] The values of the first and second flag bits are both 0 and 1, 0 indicates failure and 1 indicates success.
[0098] In some embodiments of the present application, after receiving the state synchronization request, the underlying resource pool side completes state synchronization, including:
[0099] If the underlying resource pool side receives the state synchronization request, completes the state synchronization operation and synchronously returns the operation result, the data is updated and the first flag bit and the second flag bit are both updated to 1.
[0100] If the bottom resource pool side does not receive the state synchronization request, the state synchronization request is resent, and the number of resending times is 3.
[0101] If the underlying resource pool side does not return an operation result after receiving the state synchronization request, the global state counter value of the underlying resource pool side is compared with the global state counter value of the cloud platform side to complete the state synchronization operation.
[0102] In some embodiments of the present application, the global state counter value on the underlying resource pool side is compared with the global state counter value on the cloud platform side to complete the state synchronization operation, including:
[0103] If the status count on the underlying resource pool side is consistent with the status count on the cloud platform side, the status mark on the underlying resource pool side is compared with the status mark on the cloud platform side.
[0104] If the status mark on the underlying resource pool side is consistent with the status mark on the cloud platform side, no operation is performed.
[0105] If the status mark on the underlying resource pool side is inconsistent with the status mark on the cloud platform side, the status on the cloud platform side and the status on the underlying resource pool side will be synchronized.
[0106] If the status count on the underlying resource pool side is inconsistent with the status count on the cloud platform side, a sequential chain status synchronization update is performed based on the difference in status counts.
[0107] In some embodiments of the present application, performing a sequential chain state synchronization update based on the difference in state counts includes:
[0108] The status count on the bottom resource pool side is n, and the status is S n , the cloud platform side state count is m, then the state is S m , where m<n.
[0109] The sequential chain state is updated synchronously as follows:
[0110] S m →S m+1 →……→S n .
[0111] After completing the sequential chain state synchronization update, the update process is recorded in the update record.
[0112] In this embodiment, before requesting a state synchronization on the cloud platform, the cloud platform first obtains the global state counter value, records it on the cloud platform, initiates a state synchronization request, and calls the underlying resource pool interface to perform a state change. Setting the first flag to 1 indicates a successful forward synchronization request from the cloud platform to the underlying resource pool. Setting the second flag to 1 indicates a successful reverse synchronization from the underlying resource pool to the cloud platform. Both the first and second flags are enumeration types. The default value is 0, indicating unsynchronized, and a value of 1 indicates successful.
[0113] There are two situations. The first is that the state synchronization operation is completed and the operation result is returned synchronously, the data update is completed, and the first flag bit request is recorded as successful. Considering the possibility of failure in calling the interface, the number of retries R is set, which defaults to 3. If the number of retries exceeds the set value and still fails, an SMS and email alert will be sent.
[0114] If the underlying resource pool side does not return an operation result after receiving the status synchronization request, compare the value of the global status counter on the underlying resource pool side with the value of the global status counter on the cloud platform side to complete the status synchronization operation.
[0115] The second case is that no operation result is returned. It is judged that the request issued by the cloud platform side is successful through the first flag, and the resource status on the underlying resource pool side is queried through the interface and compared with the resource status and status count on the cloud platform side. If the status counts are the same, then compare the statuses. If the statuses are the same, no operation is required. If they are different, the cloud platform side synchronizes the status on the underlying resource pool side to make the status consistent. If the status counts are different, then sequential chained updates need to be performed according to the difference in status counts.
[0116] Assume that the status count on the cloud platform side is m, the status is Sm, the underlying status count is n, and the status is Sn, and m < n. Then the update process starts from the status Sm: Sm → Sm+1 → … → Sn;
[0117] At the same time, record the update process in the update record, and finally make the statuses on the cloud platform side and the underlying resource pool side consistent. At the same time, the status counter is in the updating state, and the update status can only be set to update success after the change is completed.
[0118] In some embodiments of the present application, for the step S300, implementing status synchronization from the underlying resource pool side to the cloud platform side includes:
[0119] The underlying resource pool side sends a status synchronization request to the cloud platform side.
[0120] After receiving the status synchronization request, the cloud platform side completes the status synchronization.
[0121] Among them, the third flag bit is set to send a forward synchronization request from the underlying resource pool side to the cloud platform side.
[0122] The fourth flag bit is set to reverse synchronization from the cloud platform side to the underlying resource pool side.
[0123] The values of the third flag bit and the fourth flag bit are both 0 and 1. 0 indicates failure, and 1 indicates success.
[0124] In some embodiments of the present application, after the cloud platform side receives the status synchronization request and completes the status synchronization, it includes: [[ID=3--2]]
[0125] If the cloud platform side completes the status synchronization operation and returns an operation result after receiving the status synchronization request, update the data and update both the third flag bit and the fourth flag bit to 1.
[0126] If the cloud platform does not receive the status synchronization request, the status synchronization request is resent, and the number of resending times is 3 times.
[0127] If the cloud platform side does not return an operation result after receiving the state synchronization request, the global state counter value of the cloud platform side is compared with the global state counter value of the underlying resource pool side to complete the state synchronization operation.
[0128] In some embodiments of the present application, the global state counter value on the cloud platform side is compared with the global state counter value on the underlying resource pool side to complete the state synchronization operation, including:
[0129] If the status count on the cloud platform side is consistent with the status count on the underlying resource pool side, the status mark on the cloud platform side is compared with the status mark on the underlying resource pool side.
[0130] If the status mark on the cloud platform side is consistent with the status mark on the underlying resource pool side, no operation is performed.
[0131] If the status mark on the cloud platform side is inconsistent with the status mark on the underlying resource pool side, the status of the underlying resource pool side and the status of the cloud platform side will be synchronized.
[0132] If the state count on the cloud platform side is inconsistent with the state count on the underlying resource pool side, a sequential chain state synchronization update is performed based on the difference in the state counts.
[0133] In some embodiments of the present application, performing a sequential chain state synchronization update based on the difference in state counts includes:
[0134] The status count on the bottom resource pool side is i, and the status is S i , the cloud platform side state count is j, then the state is S j , where i<j.
[0135] The sequential chain state is updated synchronously as follows:
[0136] S i →S i+1 →……→S j .
[0137] After completing the sequential chain state synchronization update, the update process is recorded in the update record.
[0138] In this embodiment, step S300 is the same as step S200, but step S300 is for achieving resource status synchronization from the underlying resource pool side to the cloud platform side.
[0139] In some embodiments of the present application, the monitoring rule includes a monitoring resource type, a monitoring resource operation, and a monitoring resource status.
[0140] The monitoring resource types include: cloud host, cloud hard disk, elastic IP and physical machine.
[0141] The monitoring resource operations include: cloud host startup, cloud host shutdown, cloud host restart, cloud hard disk binding, cloud hard disk unbinding, elastic IP binding and elastic IP unbinding.
[0142] The monitoring resource status includes: running, shut down, unbound and bound.
[0143] In this embodiment, the monitoring resource status is not fixed. If the monitoring resource type is a cloud host, the status includes: running (1), shutting down (2), starting (3), stopping (4), deleting (5), modifying (6), creating (7), and restarting (8). When the status monitoring unit monitors a change in the cloud resource status, it records the status change information. At the same time, the status monitoring unit synchronizes the status change information to the status collection and comparison unit through the interface, and uses the https protocol to improve the security of data interaction. The REST interface adopts a synchronization mechanism. If the call fails, it will be retried through the retry mechanism. The number of retries R can be set, and the default is 3 times. If it fails after exceeding the retry number setting value, a text message and email warning will be sent.
[0144] In some embodiments of the present application, the cloud platform side resource state ordered set and the underlying resource pool side resource state ordered set are both defined as:
[0145] S={(resource_key1, status1), (resource_key2, status2), ..., (resource_keyn, statusn)};
[0146] Among them, resource_key represents resource type_resource UUID_status count_resource status change time;
[0147] Status indicates the status of resources on the cloud platform or the underlying resource pool.
[0148] First, define the ordered set of cloud resource status to store cloud resource status S = {(resource_key1, status1), (resource_key2, status2), ..., (resource_keyn, statusn)}
[0149] In this embodiment, resource_key refers to the resource status of a specific resource within a specified system at a specific change time, with the change time being accurate to the second. Status refers to the state of the cloud resource. Each system, such as a cloud platform, represents a separate state set. Because updates to the cloud platform and the underlying resource pool may differ in time, the update sequence is marked with a status count during comparison, ignoring the resource status change time. The resource status change time is used only as an exception audit indicator to identify update anomalies.
[0150] In some embodiments of the present application, determining the state resources to be updated on the cloud platform side and the underlying resource pool side according to the ordered set of resource states on the cloud platform side and the ordered set of resource states on the underlying resource pool side includes:
[0151] According to the ordered set S of resource states on the cloud platform side a and the ordered set of resource states S on the underlying resource pool side b Determine that there is no need to update state resource C ab , the state resource C does not need to be updated ab The calculation method is: C ab =S a ∩S b .
[0152] Based on the above, there is no need to update the state resource C ab Determine the state resources M to be updated on the cloud platform side and the underlying resource pool side ab , the state resource M to be updated ab The calculation method is M ab =S a ∪S b -C ab .
[0153] In this embodiment, the cloud platform side resource state ordered set S a and the ordered set of resource states S on the underlying resource pool side b Do intersection calculation, intersection C ab The part that represents the consistency between the resource status of the cloud platform side and the resource status of the underlying resource pool side does not need to be synchronized. The difference between the union and intersection of the ordered sets is calculated to obtain the part that needs to be synchronized, that is, the state resource M to be updated. ab , then M ab =S a ∪S b -C ab
[0154] Among them, M ab Indicates the difference between the ordered set of resource states on the cloud platform side and the ordered set of resource states on the underlying resource pool side, that is, the part that needs to be synchronized.
[0155] If M ab If it is an empty set, it means that the states of the two systems are synchronized. Otherwise, it means that there are inconsistent states and synchronization is required.
[0156] In some embodiments of the present application, the state synchronization unit completes resource state data synchronization between the cloud platform side and the underlying resource pool side according to the state resource to be updated, including:
[0157] If the state resource to be updated M ab If it is an empty collection, the resource status on the cloud platform side and the underlying resource pool side is in data synchronization status.
[0158] If the state resource to be updated M ab If it is not an empty collection, data synchronization of resource status between the cloud platform side and the underlying resource pool side is performed.
[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the same. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solutions of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
[0160] The system provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the modules or steps in the embodiments of the present invention can be further decomposed or combined. For example, the modules in the above embodiment can be combined into one module or further divided into multiple sub-modules to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of the present invention are only for distinguishing the modules or steps and are not to be regarded as improper limitations of the present invention.
[0161] Those skilled in the art should be able to appreciate that, in conjunction with the modules and method steps of each example described in the embodiments disclosed herein, it is possible to implement them with electronic hardware, computer software, or a combination of the two, and the programs corresponding to the software modules and method steps can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art. In order to clearly illustrate the interchangeability of electronic hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in electronic hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
Claims
1. A hybrid cloud management platform resource status data synchronization method, characterized in that: include: Set the global status counter; Based on the global status counter, obtain the value of the global status counter on the cloud platform side, and realize status synchronization from the cloud platform side to the underlying resource pool side; Based on the global status counter, obtain the global status counter value on the bottom resource pool side, and realize status synchronization from the bottom resource pool side to the cloud platform side; Use the status monitoring unit to monitor the cloud platform side and the underlying resource pool side according to the monitoring rules, obtain status change information, and send the status change information to the status collection and comparison unit; The state collection and comparison unit updates the state change information into an ordered set of resource states on the cloud platform side and an ordered set of resource states on the underlying resource pool side; Determine the state resources to be updated on the cloud platform side and the underlying resource pool side according to the ordered set of resource states on the cloud platform side and the ordered set of resource states on the underlying resource pool side; The state synchronization unit completes resource state data synchronization between the cloud platform side and the underlying resource pool side according to the state resources to be updated.
2. A hybrid cloud management platform resource status data synchronization method according to claim 1, characterized in that: The global status counter includes: system number_resource type_resource UUID_status count_status mark; Wherein, the state count starts from 1; The status mark is an enumeration value, where a status mark of 0 indicates waiting for update, a status mark of 1 indicates successful update, and a status mark of 2 indicates updating.
3. A hybrid cloud management platform resource status data synchronization method according to claim 1, characterized in that: Synchronize the state of the cloud platform to the underlying resource pool, including: The cloud platform sends a status synchronization request to the underlying resource pool. The bottom resource pool side completes state synchronization after receiving the state synchronization request; Among them, setting the first flag bit means that the cloud platform side sends a positive synchronization request to the underlying resource pool side; Set the second flag to synchronize the underlying resource pool side to the cloud platform side in the reverse direction. The values of the first and second flags are both 0 and 1, 0 means failure and 1 means success; The bottom resource pool side completes state synchronization after receiving the state synchronization request, including: If the underlying resource pool side receives the state synchronization request, completes the state synchronization operation and synchronously returns the operation result, then updates the data and updates both the first flag bit and the second flag bit to 1; If the underlying resource pool side does not receive the state synchronization request, the state synchronization request is resent, and the number of resending times is 3; If the underlying resource pool side does not return an operation result after receiving the state synchronization request, the global state counter value of the underlying resource pool side is compared with the global state counter value of the cloud platform side to complete the state synchronization operation.
4. A hybrid cloud management platform resource status data synchronization method according to claim 3, characterized in that: Comparing the global status counter value on the underlying resource pool side with the global status counter value on the cloud platform side to complete the status synchronization operation, including: If the status count on the underlying resource pool side is consistent with the status count on the cloud platform side, the status mark on the underlying resource pool side is compared with the status mark on the cloud platform side; If the status mark on the underlying resource pool side is consistent with the status mark on the cloud platform side, no operation is performed; If the status mark on the underlying resource pool side is inconsistent with the status mark on the cloud platform side, the status on the cloud platform side is synchronized with the status on the underlying resource pool side; If the status count on the underlying resource pool side is inconsistent with the status count on the cloud platform side, a sequential chain status synchronization update is performed based on the difference in status counts.
5. A hybrid cloud management platform resource status data synchronization method according to claim 4, characterized in that: The sequential chain state synchronization update is performed based on the difference in state counts, including: The status count on the bottom resource pool side is n, and the status is S n , the cloud platform side state count is m, then the state is S m , where m<n; The sequential chain state is updated synchronously as follows: S m →S m+1 →……→S n ; After completing the sequential chain state synchronization update, the update process is recorded in the update record.
6. A hybrid cloud management platform resource status data synchronization method according to claim 1, characterized in that: Synchronize the status of the underlying resource pool to the cloud platform, including: The underlying resource pool sends a status synchronization request to the cloud platform. The cloud platform side completes the state synchronization after receiving the state synchronization request; Among them, setting the third flag bit is to send a positive synchronization request from the underlying resource pool side to the cloud platform side; Set the fourth flag to synchronize the cloud platform side to the underlying resource pool side in the reverse direction. The values of the third and fourth flag bits are both 0 and 1, 0 means failure and 1 means success; After receiving the state synchronization request, the cloud platform completes the state synchronization, including: If the cloud platform side receives the state synchronization request, completes the state synchronization operation and synchronously returns the operation result, then updates the data and updates the third flag bit and the fourth flag bit to 1; If the cloud platform does not receive the state synchronization request, the state synchronization request is resent three times. If the cloud platform side does not return an operation result after receiving the state synchronization request, the global state counter value of the cloud platform side is compared with the global state counter value of the underlying resource pool side to complete the state synchronization operation.
7. A hybrid cloud management platform resource status data synchronization method according to claim 6, characterized in that: Comparing the global status counter value on the cloud platform side with the global status counter value on the underlying resource pool side to complete the status synchronization operation, including: If the status count on the cloud platform side is consistent with the status count on the underlying resource pool side, the status mark on the cloud platform side is compared with the status mark on the underlying resource pool side; If the status mark on the cloud platform side is consistent with the status mark on the underlying resource pool side, no operation is performed; If the status mark on the cloud platform side is inconsistent with the status mark on the underlying resource pool side, the status of the underlying resource pool side and the status on the cloud platform side are synchronized; If the state count on the cloud platform side is inconsistent with the state count on the underlying resource pool side, a sequential chain state synchronization update is performed based on the difference in the state counts.
8. A hybrid cloud management platform resource status data synchronization method according to claim 7, characterized in that: The sequential chain state synchronization update is performed based on the difference in state counts, including: The status count on the bottom resource pool side is i, and the status is S i , the cloud platform side state count is j, then the state is S j , where i<j; The sequential chain state is updated synchronously as follows: S i →S i+1 →……→S j ; After completing the sequential chain state synchronization update, the update process is recorded in the update record.
9. A hybrid cloud management platform resource status data synchronization method according to claim 1, characterized in that: Determining the state resources to be updated on the cloud platform side and the underlying resource pool side according to the cloud platform side resource state ordered set and the underlying resource pool side resource state ordered set includes: The cloud platform side resource status ordered set and the underlying resource pool side resource status ordered set are both defined as: S = {(resource_key1, status1), (resource_key2, status2), ..., (resource_keyn, statusn)}; Among them, resource_key represents resource type, resource UUID, status count, and resource status change time, and status represents the status of resources on the cloud platform side or the underlying resource pool side; According to the ordered set S of resource states on the cloud platform side a and the ordered set of resource states S on the underlying resource pool side b Determine that there is no need to update state resource C ab , the state resource C does not need to be updated ab The calculation method is: C ab =S a ∩S b ; Based on the above, there is no need to update the state resource C ab Determine the state resources M to be updated on the cloud platform side and the underlying resource pool side ab , the state resource M to be updated ab The calculation method is M ab =S a ∪S b -C ab .
10. A hybrid cloud management platform resource status data synchronization method according to claim 9, characterized in that: The state synchronization unit completes resource state data synchronization between the cloud platform side and the underlying resource pool side according to the state resource to be updated, including: If the state resource to be updated M ab If it is an empty collection, the resource status on the cloud platform side and the underlying resource pool side is in data synchronization state; If the state resource to be updated M ab If it is not an empty collection, data synchronization of resource status between the cloud platform side and the underlying resource pool side is performed.
Citation Information
Patent Citations
Cloud management platform state data synchronization method and system
CN112182100A
Underlying resource state synchronization method and device, cloud platform system and storage medium
CN110572464A
System and method for synchronizing a plurality of processors in a multiprocessor computer platform employing a global clock counter
US20040117682A1