Cloud platform updating method and device, computer equipment and storage medium
By decoupling and customizing information to update the cloud platform and updating it with preset scripts, the problem of high complexity of traditional cloud platform update methods is solved, and a more efficient and accurate update process is achieved.
Patent Information
- Application Number
- CN202411742549.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-02-18
AI Technical Summary
The traditional cloud platform update method has high complexity and is difficult to effectively reduce the update complexity.
By decoupling information from the cloud platform to be updated, platform information is obtained, including version information, hardware information and variable information, customize the configuration based on this information, generate update files, and update operations using preset scripts.
Reduces the complexity of updates, improves the efficiency and accuracy of the update process, and ensures the matching between the update files and the cloud platform to be updated.
Smart Images

Figure CN119473364A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of cloud platforms, and in particular to a method, apparatus, computer equipment and storage medium for updating a cloud platform. Background Art
[0002] As user businesses grow and technology develops, the existing cloud platform may not be able to meet the growing performance requirements. By updating and upgrading the cloud platform, more advanced technologies can be introduced to the cloud platform and the existing architecture can be optimized, thereby improving the processing speed of the cloud platform, reducing latency, and ensuring user experience. For example, the cloud platform can manage the gostack platform for elastic cloud hosts.
[0003] In traditional technology, common components are usually used to update cloud platforms. For example, the open source Ansible service configuration management tool can be used to assemble different operations such as cloud platform update checking, backup, upgrade, rollback, etc. into a script according to Ansible specifications, and the cloud platform can be updated by calling the script.
[0004] However, the traditional cloud platform update method has the problem of high update complexity. Summary of the invention
[0005] Based on this, it is necessary to provide a cloud platform update method, device, computer equipment and storage medium that can reduce the update complexity in response to the above technical problems.
[0006] In a first aspect, the present application provides a method for updating a cloud platform, comprising:
[0007] Decoupling the cloud platform to be updated from information, and obtaining the platform information of the cloud platform to be updated; the platform information of the cloud platform to be updated includes version information, hardware information and variable information of the cloud platform to be updated;
[0008] Customizing the cloud platform to be updated according to the version information and the hardware information to generate an update file;
[0009] The cloud platform to be updated is updated according to the variable information, the update file and the preset script; the preset script is applicable to the basic function update of any version of the cloud platform.
[0010] In one embodiment, the updating operation on the cloud platform to be updated according to the variable information, the update file and the preset script includes:
[0011] According to the variable information, the preset script is configured to obtain the target script corresponding to the cloud platform to be updated;
[0012] Determine an update process for performing an update operation on the cloud platform to be updated according to the target script;
[0013] An update operation is performed on the cloud platform to be updated according to the update process and the update file.
[0014] In one embodiment, the update file includes a check file and an upgrade file, and the updating operation on the cloud platform to be updated according to the update process and the update file includes:
[0015] Performing a check operation on the cloud platform to be updated according to the check file to obtain a check result;
[0016] When the checking result indicates that the cloud platform to be updated meets the update requirement, an update operation is performed on the cloud platform to be updated according to the upgrade file.
[0017] In one embodiment, the update file also includes a backup file, and the method further includes:
[0018] When the checking result indicates that the cloud platform to be updated meets the update requirement, a backup operation is performed on the system data of the cloud platform to be updated according to the backup file.
[0019] In one embodiment, the information decoupling of the cloud platform to be updated to obtain the platform information of the cloud platform to be updated includes:
[0020] Find the version file according to the preset storage path, and parse the version file to obtain the version information of the cloud platform to be updated;
[0021] According to the host name of the server where the cloud platform to be updated is located, querying the hardware information corresponding to the host name from a preset information library;
[0022] The environment information of the cloud platform to be updated is parsed to obtain the variable information; the variable information includes at least one of general information, non-standard information, and external dependency information.
[0023] In one embodiment, the customizing and configuring the cloud platform to be updated according to the version information and the hardware information to generate an update file includes:
[0024] Filtering out a plurality of candidate update files from a preset update file library according to the hardware information;
[0025] From the multiple candidate update files, determine the update file of the cloud platform to be updated according to the version information.
[0026] In a second aspect, the present application also provides a cloud platform update device, including:
[0027] A decoupling module is used to perform information decoupling on the cloud platform to be updated to obtain platform information of the cloud platform to be updated; the platform information of the cloud platform to be updated includes version information, hardware information and variable information of the cloud platform to be updated;
[0028] A generation module, used to customize the cloud platform to be updated according to the version information and the hardware information, and generate an update file;
[0029] An update module is used to update the cloud platform to be updated according to the variable information, the update file and a preset script; the preset script is applicable to basic function updates of any version of the cloud platform.
[0030] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0031] Decoupling the cloud platform to be updated from information, and obtaining the platform information of the cloud platform to be updated; the platform information of the cloud platform to be updated includes version information, hardware information and variable information of the cloud platform to be updated;
[0032] Customizing the cloud platform to be updated according to the version information and the hardware information to generate an update file;
[0033] The cloud platform to be updated is updated according to the variable information, the update file and the preset script; the preset script is applicable to the basic function update of any version of the cloud platform.
[0034] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0035] Decoupling the cloud platform to be updated from information, and obtaining the platform information of the cloud platform to be updated; the platform information of the cloud platform to be updated includes version information, hardware information and variable information of the cloud platform to be updated;
[0036] Customizing the cloud platform to be updated according to the version information and the hardware information to generate an update file;
[0037] The cloud platform to be updated is updated according to the variable information, the update file and the preset script; the preset script is applicable to the basic function update of any version of the cloud platform.
[0038] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0039] Decoupling the cloud platform to be updated from information, and obtaining the platform information of the cloud platform to be updated; the platform information of the cloud platform to be updated includes version information, hardware information and variable information of the cloud platform to be updated;
[0040] Customizing the cloud platform to be updated according to the version information and the hardware information to generate an update file;
[0041] The cloud platform to be updated is updated according to the variable information, the update file and the preset script; the preset script is applicable to the basic function update of any version of the cloud platform.
[0042] The update method, device, computer equipment and storage medium of the above-mentioned cloud platform perform information decoupling on the cloud platform to be updated to obtain the platform information of the cloud platform to be updated; the platform information of the cloud platform to be updated includes the version information, hardware information and variable information of the cloud platform to be updated; the cloud platform to be updated is customized and configured according to the version information and hardware information to generate an update file; the cloud platform to be updated is updated according to the variable information, update file and preset script; the preset script is applicable to the basic function update of any version of the cloud platform. Before the update operation is performed on the cloud platform to be updated, the personalized platform information and universal script of the cloud platform to be updated are determined, and there is no need to obtain the script multiple times, which improves the update complexity of the cloud platform to be updated. Information decoupling on the cloud platform to be updated increases the speed of obtaining platform information, further increases the update complexity of the cloud platform to be updated, and at the same time, the cloud platform to be updated is customized and configured according to the version information and hardware information, which improves the matching degree between the update file and the cloud platform to be updated. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0044] FIG1 is an application environment diagram of a cloud platform update method in one embodiment;
[0045] Figure 2 A schematic diagram of a flow chart of a method for updating a cloud platform in one embodiment;
[0046] Figure 3It is a flowchart of a method for updating a cloud platform in another embodiment;
[0047] Figure 4 It is a flowchart of a method for updating a cloud platform in another embodiment;
[0048] Figure 5 It is a flowchart of a method for updating a cloud platform in another embodiment;
[0049] Figure 6 A schematic diagram of updating various components in a cloud platform to be updated in one embodiment;
[0050] Figure 7 It is a flowchart of a method for updating a cloud platform in another embodiment;
[0051] Figure 8 It is a flowchart of a method for updating a cloud platform in another embodiment;
[0052] Fig. 9 It is a flowchart of a method for updating a cloud platform in another embodiment;
[0053] Fig.10 It is a structural block diagram of an updating device of a cloud platform in one embodiment. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0055] The updating method of the cloud platform provided in the embodiment of the present application can be applied to the application environment as shown in Figure 1. Wherein, the computer device can be a server, and its internal structure diagram can be shown in Figure 1. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Wherein, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Wherein, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the update data of the cloud platform. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for updating a cloud platform is implemented.
[0056] Those skilled in the art will understand that the structure shown in FIG. 1 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0057] In one embodiment, Figure 2 As shown, a cloud platform update method is provided, and the method is applied to the server in FIG1 as an example for explanation, including:
[0058] S201, decoupling the information of the cloud platform to be updated to obtain the platform information of the cloud platform to be updated; the platform information of the cloud platform to be updated includes version information, hardware information and variable information of the cloud platform to be updated.
[0059] The version information of the cloud platform to be updated may include the version identifier of the cloud platform to be updated and the sub-version identifiers of the components of the cloud platform to be updated. For example, the cloud platform to be updated may include component 1, component 2, and component 3. The version identifier of the cloud platform to be updated may be 5, the sub-version identifier of component 1 may be 3, the sub-version identifier of component 2 may be 3, and the sub-version identifier of component 3 may be 5. The hardware information may be the device model, host identifier, configuration information, etc. of the server where the cloud platform to be updated is located. The variable information may be the relevant environment information of the cloud platform to be updated.
[0060] In the embodiment of the present application, the cloud platform to be updated is information decoupled to obtain the version information, hardware information and variable information of the cloud platform to be updated. Optionally, the file in the first storage location can be parsed to obtain the version information of the cloud platform to be updated; the file in the second storage location can be parsed to obtain the hardware information of the cloud platform to be updated; and the file in the third storage location can be parsed to obtain the variable information of the cloud platform to be updated.
[0061] As another optional implementation, the information package of the cloud platform to be updated can be obtained from a third-party platform, and data processing operations such as decompression and decryption operations can be performed on the information package to obtain version information, hardware information and variable information of the cloud platform to be updated.
[0062] S202: Customize the cloud platform to be updated according to the version information and hardware information to generate an update file.
[0063] In an embodiment of the present application, since the version information of each cloud platform is different from the server where the cloud platform is located, the process and instructions for updating each cloud platform may be different. The cloud platform to be updated is customized according to the version information and hardware information, and an update file matching the cloud platform to be updated is generated.
[0064] Optionally, the version information and hardware information can be input into a preset update file generation tool to generate an update file corresponding to the cloud platform to be updated; or, the update file corresponding to the version information and hardware information can be screened out from a preset update file library; or, an initial update file can be generated based on the version information, and then the initial update file can be adjusted based on the hardware information to generate an update file.
[0065] S203, performing update operations on the cloud platform to be updated according to the variable information, update files and preset scripts; the preset scripts are applicable to basic function updates of any version of the cloud platform.
[0066] The preset script is used to instruct the server to determine the process of performing update operations on the cloud platform to be updated. The update operation may include an upgrade operation, a correction operation, and the like.
[0067] In the embodiment of the present application, the preset script can be configured by reading variable information according to the instructions of the preset script, and the update file can be called according to the instructions of the preset script to update the cloud platform to be updated. Optionally, the update file can be run multiple times according to the preset script to update the cloud platform to be updated; or different contents in the update file can be run separately according to the preset script to update the cloud platform to be updated.
[0068] Optionally, preset playbooks can be generated for the Ansible service configuration management tool, which can manage resources in Kubernetes resources.
[0069] In the above-mentioned update method of the cloud platform, the information of the cloud platform to be updated is decoupled to obtain the platform information of the cloud platform to be updated; the platform information of the cloud platform to be updated includes the version information, hardware information and variable information of the cloud platform to be updated; the cloud platform to be updated is customized according to the version information and hardware information to generate an update file; the cloud platform to be updated is updated according to the variable information, update file and preset script; the preset script is applicable to the basic function update of any version of the cloud platform. Before the update operation is performed on the cloud platform to be updated, the personalized platform information and universal script of the cloud platform to be updated are determined, and there is no need to obtain the script multiple times, which improves the update complexity of the cloud platform to be updated. The information decoupling of the cloud platform to be updated increases the speed of obtaining platform information, further increases the update complexity of the cloud platform to be updated, and at the same time, the cloud platform to be updated is customized according to the version information and hardware information, which improves the matching degree between the update file and the cloud platform to be updated.
[0070] In one embodiment, an implementation of the above S203 is provided, such as Figure 3 As shown, the above “update the cloud platform to be updated according to variable information, update files and preset scripts” includes:
[0071] S301, configuring the preset script according to the variable information to obtain the target script corresponding to the cloud platform to be updated.
[0072] In an embodiment of the present application, the data position corresponding to each data in the variable information in the preset script can be determined first, and each data in the variable information can be substituted into the corresponding data position in the preset script to complete the information configuration and obtain the target script corresponding to the cloud platform to be updated.
[0073] For example, the information configuration of the preset script can be realized by combining the external variable input of Ansible with include_role.
[0074] S302: Determine an update process for performing update operations on the cloud platform to be updated according to the target script.
[0075] In an embodiment of the present application, the target script may include multiple instructions for updating the cloud platform to be updated and the instruction sequence corresponding to the multiple instructions. The update process for updating the cloud platform to be updated is determined according to the instruction sequence in the target script.
[0076] Exemplarily, the update process in the target script may include operation 1, operation 2, and operation 3.
[0077] S303: Perform an update operation on the cloud platform to be updated according to the update process and update files.
[0078] In an embodiment of the present application, the update file may include multiple update sub-files, and the instructions in the target script may be called in sequence according to the update process. Optionally, the target script may include instructions for reading and calling the update file, as well as other general update operation instructions. Exemplarily, instructions 1, 2, and 3 in the target script are called in sequence according to the update process, wherein instruction 1 may be used to instruct the general update operation 1 to be performed on the cloud platform to be updated, instruction 2 may be used to instruct the general update operation 2 to be performed on the cloud platform to be updated, and instruction 3 may be used to instruct the call of the update file, thereby performing a deletion operation, an addition operation, or a replacement operation on the information corresponding to the cloud platform to be updated according to the update file.
[0079] In the above-mentioned application embodiment, the preset script is configured according to the variable information to obtain the target script corresponding to the cloud platform to be updated, thereby improving the matching degree between the target script and the cloud platform to be updated. In addition, the information configuration is only performed based on the preset script, thereby reducing the complexity of the information configuration and thus reducing the complexity of the update operation on the cloud platform to be updated.
[0080] In one embodiment, an implementation of the above S303 is provided, where the update file includes a check file and an upgrade file, such as Figure 4 As shown, the above “update the cloud platform to be updated according to the update process and update files” includes:
[0081] S401, performing a check operation on the cloud platform to be updated according to the check file to obtain a check result.
[0082] The inspection files may include inspection scripts and inspection standards.
[0083] In an embodiment of the present application, the update process may include first performing an inspection operation, then performing an upgrade operation, calling the inspection file according to the instructions in the target script, thereby performing an inspection operation on the cloud platform to be updated and obtaining an inspection result. Optionally, the inspection script in the inspection file may be run to obtain the environment information, configuration information, etc. of the cloud platform to be updated, thereby determining whether the environment information, configuration information, etc. of the cloud platform to be updated are consistent with the information in the inspection standard according to the inspection standard in the inspection file. If they are consistent, it means that the cloud platform to be updated meets the update requirements. If they are inconsistent, it means that the cloud platform to be updated meets the non-update requirements.
[0084] S402: When the checking result indicates that the cloud platform to be updated meets the update requirements, an update operation is performed on the cloud platform to be updated according to the upgrade file.
[0085] The upgrade file includes multiple update sub-files, and each update sub-file corresponds one-to-one to a component to be updated in the cloud platform to be updated.
[0086] In the embodiment of the present application, when the check result indicates that the cloud platform to be updated meets the update requirements, the upgrade file is parsed according to the instructions in the target script, and the components to be updated in the cloud platform to be updated are determined according to the update sub-files in the upgrade file, and further, the update sub-files in the upgrade file are called in sequence to update the corresponding components to be updated. Optionally, the update operation may include deleting, adding, or replacing the information corresponding to the components to be updated.
[0087] In the above application embodiment, the cloud platform to be updated is first checked, and when the updated cloud platform meets the update requirements, the updated cloud platform is updated, thereby improving the success rate of the update operation on the cloud platform to be updated.
[0088] In one embodiment, the update file also includes a backup file, such as Figure 5 As shown, the updating method of the cloud platform further includes:
[0089] S403: When the checking result indicates that the cloud platform to be updated meets the update requirements, a backup operation is performed on the system data of the cloud platform to be updated according to the backup file.
[0090] The backup file may include a backup target and a backup location.
[0091] In an embodiment of the present application, the update process may include first performing an inspection operation, then performing a backup operation, and then performing an upgrade operation. When the inspection result indicates that the cloud platform to be updated meets the update requirements, the backup file is parsed according to the instructions in the target script to obtain the backup target and the backup location, thereby determining the system data of the cloud platform to be updated that needs to be backed up according to the backup target, and copying the determined system data. Furthermore, the copied system data is stored in the backup location. After completing the backup operation on the system data of the cloud platform to be updated, the step of updating the cloud platform to be updated according to the upgrade file is executed.
[0092] Optional, such as Figure 6As shown, the cloud platform to be updated may include multiple components. For example, each component can be represented as component A, component B, and component C. Each component can be checked according to the check file. When the check result indicates that the cloud platform to be updated meets the update requirements, each component can be checked according to the backup file. Further, each component can be upgraded according to the upgrade file, wherein the check file can be represented as check.yml, the backup file can be represented as backup.yml, and the upgrade file can be represented as upgrade.yml. Optionally, if there is a component whose check result is that it does not meet the update requirements, the component may not be upgraded, and other components whose check results are that they meet the update requirements may be upgraded; or, if there is a component whose check result is that it does not meet the update requirements, all components in the cloud platform to be updated may not be upgraded.
[0093] In the above application embodiment, when the inspection result indicates that the cloud platform to be updated meets the update requirements, the system data of the cloud platform to be updated is backed up, so that in the event that the update of the cloud platform to be updated fails, the backup file can be used to restore the system data of the cloud platform to be updated, thereby ensuring the normal working state of the cloud platform to be updated.
[0094] In one embodiment, an implementation of the above S201 is provided, such as Figure 7 As shown, the above “decoupling the information of the cloud platform to be updated to obtain the platform information of the cloud platform to be updated” includes:
[0095] S501, find the version file according to the preset storage path, and parse the version file to obtain the version information of the cloud platform to be updated.
[0096] In an embodiment of the present application, the version information of the cloud platform to be updated is pre-encapsulated as a version file and stored in a preset storage location. Before the update operation is performed on the cloud platform to be updated, the version file is found according to the preset storage path, and the version file is parsed, for example, the version information is decrypted, features are extracted, etc., to obtain the version information of the cloud platform to be updated.
[0097] Optionally, each component version in the cloud platform to be updated can be stored in the chart.yml file under the component directory, and the dependent component information in the k8s resource is obtained from this file.
[0098] S502: According to the host name of the server where the cloud platform to be updated is located, query the hardware information corresponding to the host name from a preset information library.
[0099] The hardware information may include host identification information, configuration information related to the host type, and the like.
[0100] In an embodiment of the present application, the system data of the cloud platform to be updated can be queried to determine the host name of the server where the cloud platform to be updated is located. The server pre-stores the correspondence between the host name and the hardware information. Therefore, based on the host name of the server where the cloud platform to be updated is located and the correspondence, the hardware information corresponding to the host name can be queried from the preset information library.
[0101] S503, parsing the environment information of the cloud platform to be updated to obtain variable information; the variable information includes at least one of general information, non-standard information, and external dependency information.
[0102] Among them, general information includes resource pool identification, role-based address, data path, namespace, etc., non-standard information includes prefix information, special tags, etc.; external dependency information includes block storage backend, object storage access information, authentication access information, etc.
[0103] In an embodiment of the present application, a preset tool can be called to parse the environmental information of the cloud platform to be updated, sort out the variable information related to the environment, and automatically obtain specific values in combination with the environment through the preset tool to generate a global variable file. The global variable file can be expressed as global.yml, and the global variable file is used to configure the preset script.
[0104] In the above application embodiment, the version information, hardware information and variable information of the cloud platform to be updated are respectively obtained, so that the cloud platform to be updated is personalized according to the version information, hardware information and variable information, thereby improving the matching degree between the upgrade process of the cloud platform to be updated and the cloud platform to be updated.
[0105] In one embodiment, an implementation of the above S202 is provided, such as Figure 8 As shown, the above “customizing the cloud platform to be updated according to the version information and hardware information to generate update files” includes:
[0106] S601, screening out a plurality of candidate update files from a preset update file library according to hardware information.
[0107] In an embodiment of the present application, a first correspondence between hardware information and candidate update files is pre-established, so that based on the hardware information of the cloud platform to be updated and the first correspondence, multiple candidate update files for the cloud platform to be updated are screened out from a preset update file library based on the hardware information.
[0108] S602: Determine an update file of the cloud platform to be updated from multiple candidate update files according to version information.
[0109] In an embodiment of the present application, a second correspondence between version information and update files is pre-established, so that the update files of the cloud platform to be updated are determined from multiple candidate update files based on the version information of the cloud platform to be updated and the second correspondence.
[0110] In the above application embodiment, multiple candidate update files are first screened out based on hardware information, and then the update file of the cloud platform to be updated is determined from the multiple candidate update files based on version information. The accuracy of the update file is improved through distributed determination, and determining the update file based on version information and hardware information ensures the matching degree between the update file and the file to be updated.
[0111] In one embodiment, a complete cloud platform update method is provided, such as Fig. 9 As shown, the above method includes:
[0112] S1, find the version file according to the preset storage path, and parse the version file to obtain the version information of the cloud platform to be updated.
[0113] S2, according to the host name of the server where the cloud platform to be updated is located, query the hardware information corresponding to the host name from the preset information library.
[0114] S3, parsing the environment information of the cloud platform to be updated to obtain variable information; the variable information includes at least one of general information, non-standard information, and external dependency information.
[0115] S4, customize the cloud platform to be updated according to the version information and hardware information, and generate an update file.
[0116] S5, configure the preset script according to the variable information to obtain the target script corresponding to the cloud platform to be updated; the preset script is applicable to the basic function update of any version of the cloud platform.
[0117] S6, determining an update process for performing update operations on the cloud platform to be updated according to the target script.
[0118] S7, performing a check operation on the cloud platform to be updated according to the check file to obtain a check result.
[0119] S8, when the check result indicates that the cloud platform to be updated meets the update requirements, a backup operation is performed on the system data of the cloud platform to be updated according to the backup file.
[0120] S9, when the check result indicates that the cloud platform to be updated meets the update requirements, the cloud platform to be updated is updated according to the upgrade file.
[0121] In the above-mentioned update method of the cloud platform, the information of the cloud platform to be updated is decoupled to obtain the platform information of the cloud platform to be updated; the platform information of the cloud platform to be updated includes the version information, hardware information and variable information of the cloud platform to be updated; the cloud platform to be updated is customized according to the version information and hardware information to generate an update file; the cloud platform to be updated is updated according to the variable information, update file and preset script; the preset script is applicable to the basic function update of any version of the cloud platform. Before the update operation is performed on the cloud platform to be updated, the personalized platform information and universal script of the cloud platform to be updated are determined, and there is no need to obtain the script multiple times, which improves the update complexity of the cloud platform to be updated. The information decoupling of the cloud platform to be updated increases the speed of obtaining platform information, further increases the update complexity of the cloud platform to be updated, and at the same time, the cloud platform to be updated is customized according to the version information and hardware information, which improves the matching degree between the update file and the cloud platform to be updated.
[0122] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0123] Based on the same inventive concept, the embodiment of the present application also provides a cloud platform update device for implementing the cloud platform update method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more cloud platform update devices provided below can refer to the limitations of the cloud platform update method above, and will not be repeated here.
[0124] In one embodiment, Fig.10 As shown, a cloud platform update device is provided, comprising: a decoupling module 10, a generating module 11 and an updating module 12, wherein:
[0125] The decoupling module 10 is used to perform information decoupling on the cloud platform to be updated to obtain platform information of the cloud platform to be updated; the platform information of the cloud platform to be updated includes version information, hardware information and variable information of the cloud platform to be updated.
[0126] The generation module 11 is used to customize the configuration of the cloud platform to be updated according to the version information and hardware information, and generate an update file.
[0127] The update module 12 is used to perform update operations on the cloud platform to be updated according to the variable information, update files and preset scripts; the preset scripts are applicable to the basic function updates of any version of the cloud platform.
[0128] In one embodiment, the updating module 12 includes: a configuration unit, a first determining unit and an updating unit, wherein:
[0129] The configuration unit is used to configure the preset script according to the variable information to obtain the target script corresponding to the cloud platform to be updated.
[0130] The first determining unit is used to determine an update process for performing an update operation on the cloud platform to be updated according to a target script.
[0131] The updating unit is used to perform an updating operation on the cloud platform to be updated according to the updating process and the updating file.
[0132] In one embodiment, the update file includes a check file and an upgrade file. The above-mentioned update unit is specifically used to perform a check operation on the cloud platform to be updated according to the check file to obtain a check result; when the check result indicates that the cloud platform to be updated meets the update requirements, an update operation is performed on the cloud platform to be updated according to the upgrade file.
[0133] In one embodiment, the update file also includes a backup file. The update unit is further specifically configured to back up the system data of the cloud platform to be updated according to the backup file when the check result indicates that the cloud platform to be updated meets the update requirements.
[0134] In one embodiment, the decoupling module 10 includes: a first parsing unit, a query unit, and a second parsing unit, wherein:
[0135] The first parsing unit is used to find the version file according to the preset storage path, and parse the version file to obtain the version information of the cloud platform to be updated.
[0136] The query unit is used to query the hardware information corresponding to the host name from a preset information base according to the host name of the server where the cloud platform to be updated is located.
[0137] The second parsing unit is used to parse the environment information of the cloud platform to be updated to obtain variable information; the variable information includes at least one of general information, non-standard information, and external dependency information.
[0138] In one embodiment, the generation module 11 includes: a screening unit and a second determination unit, wherein:
[0139] The screening unit is used to screen out a plurality of candidate update files from a preset update file library according to hardware information.
[0140] The second determining unit is used to determine the update file of the cloud platform to be updated from multiple candidate update files according to the version information.
[0141] Each module in the update device of the above cloud platform can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0142] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0143] Decoupling the information of the cloud platform to be updated to obtain the platform information of the cloud platform to be updated; the platform information of the cloud platform to be updated includes version information, hardware information and variable information of the cloud platform to be updated;
[0144] Customize the configuration of the cloud platform to be updated according to the version information and hardware information, and generate update files;
[0145] Update the cloud platform to be updated according to the variable information, update files and preset scripts; the preset scripts are applicable to the basic function updates of any version of the cloud platform.
[0146] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0147] Configure the preset script according to the variable information to obtain the target script corresponding to the cloud platform to be updated;
[0148] Determine the update process for updating the cloud platform to be updated based on the target script;
[0149] Update the cloud platform to be updated according to the update process and update files.
[0150] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0151] Perform inspection operations on the cloud platform to be updated according to the inspection file and obtain inspection results;
[0152] When the check result indicates that the cloud platform to be updated meets the update requirements, the cloud platform to be updated is updated according to the upgrade file.
[0153] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0154] When the check result indicates that the cloud platform to be updated meets the update requirements, a backup operation is performed on the system data of the cloud platform to be updated according to the backup file.
[0155] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0156] Find the version file according to the preset storage path, parse the version file, and obtain the version information of the cloud platform to be updated;
[0157] According to the host name of the server where the cloud platform to be updated is located, query the hardware information corresponding to the host name from the preset information library;
[0158] The environment information of the cloud platform to be updated is parsed to obtain variable information; the variable information includes at least one of general information, non-standard information, and external dependency information.
[0159] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0160] Filtering multiple candidate update files from a preset update file library according to hardware information;
[0161] From multiple candidate update files, determine the update file of the cloud platform to be updated according to the version information.
[0162] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0163] Decoupling the information of the cloud platform to be updated to obtain the platform information of the cloud platform to be updated; the platform information of the cloud platform to be updated includes version information, hardware information and variable information of the cloud platform to be updated;
[0164] Customize the configuration of the cloud platform to be updated according to the version information and hardware information, and generate update files;
[0165] Update the cloud platform to be updated according to the variable information, update files and preset scripts; the preset scripts are applicable to the basic function updates of any version of the cloud platform.
[0166] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0167] Configure the preset script according to the variable information to obtain the target script corresponding to the cloud platform to be updated;
[0168] Determine the update process for updating the cloud platform to be updated based on the target script;
[0169] Update the cloud platform to be updated according to the update process and update files.
[0170] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0171] Perform inspection operations on the cloud platform to be updated according to the inspection file and obtain inspection results;
[0172] When the check result indicates that the cloud platform to be updated meets the update requirements, the cloud platform to be updated is updated according to the upgrade file.
[0173] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0174] When the check result indicates that the cloud platform to be updated meets the update requirements, a backup operation is performed on the system data of the cloud platform to be updated according to the backup file.
[0175] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0176] Find the version file according to the preset storage path, parse the version file, and obtain the version information of the cloud platform to be updated;
[0177] According to the host name of the server where the cloud platform to be updated is located, query the hardware information corresponding to the host name from the preset information library;
[0178] The environment information of the cloud platform to be updated is parsed to obtain variable information; the variable information includes at least one of general information, non-standard information, and external dependency information.
[0179] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0180] Filtering multiple candidate update files from a preset update file library according to hardware information;
[0181] From multiple candidate update files, determine the update file of the cloud platform to be updated according to the version information.
[0182] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0183] Decoupling the information of the cloud platform to be updated to obtain the platform information of the cloud platform to be updated; the platform information of the cloud platform to be updated includes version information, hardware information and variable information of the cloud platform to be updated;
[0184] Customize the configuration of the cloud platform to be updated according to the version information and hardware information, and generate update files;
[0185] Update the cloud platform to be updated according to the variable information, update files and preset scripts; the preset scripts are applicable to the basic function updates of any version of the cloud platform.
[0186] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0187] Configure the preset script according to the variable information to obtain the target script corresponding to the cloud platform to be updated;
[0188] Determine the update process for updating the cloud platform to be updated based on the target script;
[0189] Update the cloud platform to be updated according to the update process and update files.
[0190] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0191] Perform inspection operations on the cloud platform to be updated according to the inspection file and obtain inspection results;
[0192] When the check result indicates that the cloud platform to be updated meets the update requirements, the cloud platform to be updated is updated according to the upgrade file.
[0193] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0194] When the check result indicates that the cloud platform to be updated meets the update requirements, a backup operation is performed on the system data of the cloud platform to be updated according to the backup file.
[0195] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0196] Find the version file according to the preset storage path, parse the version file, and obtain the version information of the cloud platform to be updated;
[0197] According to the host name of the server where the cloud platform to be updated is located, query the hardware information corresponding to the host name from the preset information library;
[0198] The environment information of the cloud platform to be updated is parsed to obtain variable information; the variable information includes at least one of general information, non-standard information, and external dependency information.
[0199] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0200] Filtering multiple candidate update files from a preset update file library according to hardware information;
[0201] From multiple candidate update files, determine the update file of the cloud platform to be updated according to the version information.
[0202] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0203] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0204] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for updating a cloud platform, characterized in that: The method comprises: Decoupling the cloud platform to be updated from information, and obtaining the platform information of the cloud platform to be updated; the platform information of the cloud platform to be updated includes version information, hardware information and variable information of the cloud platform to be updated; Customizing the cloud platform to be updated according to the version information and the hardware information to generate an update file; The cloud platform to be updated is updated according to the variable information, the update file and the preset script; the preset script is applicable to the basic function update of any version of the cloud platform.
2. The method according to claim 1, characterized in that The updating operation of the cloud platform to be updated according to the variable information, the update file and the preset script includes: According to the variable information, the preset script is configured to obtain the target script corresponding to the cloud platform to be updated; Determine an update process for performing an update operation on the cloud platform to be updated according to the target script; An update operation is performed on the cloud platform to be updated according to the update process and the update file.
3. The method according to claim 2, characterized in that The update file includes a check file and an upgrade file, and the updating operation on the cloud platform to be updated according to the update process and the update file includes: Performing a check operation on the cloud platform to be updated according to the check file to obtain a check result; When the checking result indicates that the cloud platform to be updated meets the update requirement, an update operation is performed on the cloud platform to be updated according to the upgrade file.
4. The method according to claim 3, characterized in that The update file also includes a backup file, and the method further includes: When the checking result indicates that the cloud platform to be updated meets the update requirement, a backup operation is performed on the system data of the cloud platform to be updated according to the backup file.
5. The method according to claim 1, characterized in that: Decoupling the information of the cloud platform to be updated to obtain the platform information of the cloud platform to be updated includes: Find the version file according to the preset storage path, and parse the version file to obtain the version information of the cloud platform to be updated; According to the host name of the server where the cloud platform to be updated is located, querying the hardware information corresponding to the host name from a preset information library; The environment information of the cloud platform to be updated is parsed to obtain the variable information; the variable information includes at least one of general information, non-standard information, and external dependency information.
6. The method according to claim 1, characterized in that The step of customizing the cloud platform to be updated according to the version information and the hardware information to generate an update file includes: Filtering out a plurality of candidate update files from a preset update file library according to the hardware information; From the multiple candidate update files, determine the update file of the cloud platform to be updated according to the version information.
7. A cloud platform update device, characterized in that: The device comprises: A decoupling module is used to perform information decoupling on the cloud platform to be updated to obtain platform information of the cloud platform to be updated; the platform information of the cloud platform to be updated includes version information, hardware information and variable information of the cloud platform to be updated; A generation module, used to customize the cloud platform to be updated according to the version information and the hardware information, and generate an update file; An update module is used to update the cloud platform to be updated according to the variable information, the update file and a preset script; the preset script is applicable to basic function updates of any version of the cloud platform.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.