CN114157662B - Cloud platform parameter adaptation method, device, terminal equipment and storage medium - Google Patents

Cloud platform parameter adaptation method, device, terminal equipment and storage medium Download PDF

Info

Publication number
CN114157662B
CN114157662B CN202111322770.4A CN202111322770A CN114157662B CN 114157662 B CN114157662 B CN 114157662B CN 202111322770 A CN202111322770 A CN 202111322770A CN 114157662 B CN114157662 B CN 114157662B
Authority
CN
China
Prior art keywords
parameter
cloud platform
cloud
class
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111322770.4A
Other languages
Chinese (zh)
Other versions
CN114157662A (en
Inventor
张志江
季统凯
贺忠堂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
G Cloud Technology Co Ltd
Original Assignee
G Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by G Cloud Technology Co Ltd filed Critical G Cloud Technology Co Ltd
Priority to CN202111322770.4A priority Critical patent/CN114157662B/en
Publication of CN114157662A publication Critical patent/CN114157662A/en
Application granted granted Critical
Publication of CN114157662B publication Critical patent/CN114157662B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application discloses a cloud platform parameter adaptation method, a device, terminal equipment and a storage medium, wherein the method comprises the steps of obtaining a cloud platform type of each cloud platform accessed into a multi-cloud management platform; acquiring a parameter class statement corresponding to a parameter class of each interface on the multi-cloud management platform, wherein the parameter class statement comprises a cloud platform type supported by parameters corresponding to the parameter class, and when the multi-cloud management platform accesses a first cloud platform through a first interface, acquiring a first parameter corresponding to a first parameter class of the first interface and a first parameter class statement corresponding to the first parameter class; and according to the cloud platform type of the first cloud platform and the first parameter class statement, filtering the first parameter to obtain a second parameter, and calling an adaptation parameter class corresponding to the first cloud platform according to the second parameter. The embodiment of the application solves the technical problem that the interfaces of the multi-cloud management platform are difficult to develop and maintain because the parameters supported by each cloud platform cannot be distinguished in the prior art.

Description

Cloud platform parameter adaptation method, device, terminal equipment and storage medium
Technical Field
The embodiment of the application relates to the field of cloud platforms, in particular to a cloud platform parameter adaptation method, a device, terminal equipment and a storage medium.
Background
With the rapid development of cloud computing technology, more and more manufacturers in China strive to perform layout in the field of cloud platforms. Cloud platforms, also referred to as cloud computing platforms, refer to services that provide computing, networking, and storage capabilities based on hardware resources and software resources. Cloud computing platforms can be divided into 3 classes: a storage type cloud platform mainly used for data storage, a computing type cloud platform mainly used for data processing and a comprehensive cloud computing platform taking both computing and data storage processing into consideration. At present, the cloud computing field does not have a unified interface standard, and along with the increase of manufacturer quotients for manufacturing cloud platforms, how to adapt interfaces of cloud platforms of different manufacturers is a problem to be solved by the existing multi-cloud management platform. Most of interface parameters of the existing multi-cloud management platform adopt union sets of parameters of all cloud platforms, however, parameters supported by all cloud platforms cannot be distinguished in the mode, so that interfaces of the multi-cloud management platform are difficult to develop and maintain.
Disclosure of Invention
The embodiment of the application provides a cloud platform parameter adaptation method, a device, terminal equipment and a storage medium, which solve the technical problem that interfaces of a multi-cloud management platform are difficult to develop and maintain because parameters supported by each cloud platform cannot be distinguished in the prior art.
In a first aspect, an embodiment of the present application provides a cloud platform parameter adapting method, including the following steps:
acquiring a cloud platform type of each cloud platform accessed to the multi-cloud management platform;
according to each interface on the multi-cloud management platform, acquiring a parameter class statement corresponding to a parameter class of each interface, wherein the parameter class statement comprises a cloud platform type supported by a parameter corresponding to the parameter class, and the parameter class statement is a pre-annotated statement;
when the multi-cloud management platform accesses a first cloud platform through a first interface, acquiring a first parameter corresponding to a first parameter class of the first interface, and acquiring a first parameter class statement corresponding to the first parameter class;
and filtering the first parameter according to the cloud platform type of the first cloud platform and the first parameter class statement to obtain a second parameter, and calling an adaptation parameter class corresponding to the first cloud platform according to the second parameter.
Preferably, the specific process of obtaining the cloud platform type of each cloud platform accessed to the multi-cloud management platform is as follows:
and acquiring interface call authorization information of each cloud platform accessed to the multi-cloud management platform, wherein the interface call authorization information comprises cloud platform types of the corresponding cloud platforms.
Preferably, the specific process of acquiring the interface call authorization information of each cloud platform accessing the multi-cloud management platform is as follows:
acquiring authorization information ciphertext of each cloud platform accessed to the multi-cloud management platform through a multi-cloud platform filter and a parameter signature MD5 value;
and decrypting the authorization information ciphertext according to the parameter signature MD5 value to obtain the interface call authorization information of each cloud platform.
Preferably, the specific process of obtaining the parameter class declaration corresponding to the parameter class of each interface according to each interface on the multi-cloud management platform is as follows:
determining the interface name of each interface according to each interface on the multi-cloud management platform;
acquiring a parameter class corresponding to each interface name;
and acquiring a parameter class statement corresponding to the parameter class.
Preferably, after the obtaining of the parameter class corresponding to each interface name, before the obtaining of the parameter class declaration corresponding to each parameter class, the method further includes the following steps:
the parameter class is injected into a Spring container.
Preferably, the specific process of filtering the first parameter to obtain the second parameter according to the cloud platform type of the first cloud platform and the first parameter class statement is as follows:
according to the first parameter class declaration, determining the type of the cloud platform supported by each first parameter, and placing the parameter name of the first parameter, which is supported in the first parameters and does not correspond to the type of the cloud platform of the first cloud platform, into an exclusion array;
and filtering the first parameter according to the exclusion array to obtain a second parameter.
Preferably, the specific process of filtering the first parameter according to the exclusion array to obtain the second parameter is as follows:
and deleting the first parameter matched with the parameter name in the exclusion array from the first parameter to obtain a second parameter.
In a second aspect, an embodiment of the present application provides a cloud platform parameter adapting device, including: the system comprises a type acquisition module, a statement acquisition module, a parameter acquisition module and a parameter filtering module;
the type acquisition module is used for acquiring the type of each cloud platform accessed to the multi-cloud management platform;
the declaration acquisition module is used for acquiring a parameter class declaration corresponding to a parameter class of each interface according to each interface on the multi-cloud management platform, wherein the parameter class declaration comprises a cloud platform type supported by a parameter corresponding to the parameter class, and the parameter class declaration is a pre-annotated declaration;
the parameter acquisition module is used for acquiring a first parameter corresponding to a first parameter class of a first interface and acquiring a first parameter class statement corresponding to the first parameter class when the multi-cloud management platform accesses the first cloud platform through the first interface;
the parameter filtering module is used for filtering the first parameter according to the cloud platform type of the first cloud platform and the first parameter class statement to obtain a second parameter, and calling an adaptation parameter class corresponding to the first cloud platform according to the second parameter.
In a third aspect, an embodiment of the present application provides a terminal device, where the terminal device includes a processor and a memory;
the memory is used for storing a computer program and transmitting the computer program to the processor;
the processor is configured to execute a cloud platform parameter adaptation method according to the first aspect according to instructions in the computer program.
In a fourth aspect, embodiments of the present application provide a storage medium storing computer executable instructions which, when executed by a computer processor, are adapted to carry out a cloud platform parameter adaptation method as described in the first aspect.
The embodiment of the application provides a cloud platform parameter adapting method, a device, terminal equipment and a storage medium, wherein the method comprises the following steps: acquiring a cloud platform type of each cloud platform accessed to the multi-cloud management platform; according to each interface on the multi-cloud management platform, acquiring a parameter class statement corresponding to a parameter class of each interface, wherein the parameter class statement comprises a cloud platform type supported by a parameter corresponding to the parameter class, and the parameter class statement is a pre-annotated statement; when the multi-cloud management platform accesses the first cloud platform through the first interface, acquiring a first parameter corresponding to a first parameter class of the first interface, and acquiring a first parameter class statement corresponding to the first parameter class; and according to the cloud platform type of the first cloud platform and the first parameter class statement, filtering the first parameter to obtain a second parameter, and calling an adaptation parameter class corresponding to the first cloud platform according to the second parameter.
According to the embodiment of the application, the cloud platform type supported by the parameters corresponding to each parameter class is determined in the parameter class declaration through the pre-annotating the parameter class declaration, so that when the subsequent multi-cloud management platform accesses the first cloud platform through the first interface, only the first parameter class declaration corresponding to the first parameter class is required to be acquired, and then the first parameter corresponding to the first parameter class of the first interface can be filtered according to the cloud platform type of the first cloud platform and the first parameter class declaration to obtain the second parameter. According to the embodiment of the application, even if interface parameters are disordered caused by inconsistent parameters of a plurality of cloud manufacturers, the parameters corresponding to each cloud platform can be screened, so that development and maintenance of interface functions of developers are facilitated, meanwhile, the usability and readability of interfaces of the cloud platforms are improved, and the technical problem that the interfaces of the cloud management platforms are difficult to develop and maintain due to the fact that the parameters supported by each cloud platform cannot be distinguished in the prior art is solved.
Drawings
Fig. 1 is a schematic flow chart of a cloud platform parameter adapting method according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of a cloud platform parameter adapting device according to an embodiment of the present application.
Fig. 3 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
The following description and the drawings sufficiently illustrate specific embodiments of the application to enable those skilled in the art to practice them. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the sequence of operations may vary. Portions and features of some embodiments may be included in, or substituted for, those of others. The scope of embodiments of the application encompasses the full ambit of the claims, as well as all available equivalents of the claims. Embodiments may be referred to herein, individually or collectively, by the term "application" merely for convenience and without intending to voluntarily limit the scope of this application to any single application or inventive concept if more than one is in fact disclosed. Relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, or terminal device that comprises a list of elements does not include only those elements but may include other elements not expressly listed. Various embodiments are described herein in a progressive manner, each embodiment focusing on differences from other embodiments, and identical and similar parts between the various embodiments are sufficient to be seen with each other. The structures, products and the like disclosed in the embodiments correspond to the parts disclosed in the embodiments, so that the description is relatively simple, and the relevant parts refer to the description of the method parts.
Example 1
As shown in fig. 1, fig. 1 is a flowchart of a cloud platform parameter adapting method provided by an embodiment of the present application. The cloud platform parameter adapting method provided by the embodiment of the application can be executed by the cloud platform parameter adapting device, the cloud platform parameter adapting device can be realized in a software and/or hardware mode, and the cloud platform parameter adapting device can be composed of two or more physical entities or a physical entity. For example, the cloud platform parameter adapting device may be a computer, an upper computer, a tablet, or the like. The method comprises the following steps:
step 101, acquiring a cloud platform type of each cloud platform accessed to the multi-cloud management platform.
Generally, a plurality of cloud platforms are connected to the multi-cloud management platform, and the multi-cloud management platform can access or manage the connected cloud platforms. In this embodiment, first, a cloud platform type of each cloud platform accessed to the multi-cloud management platform needs to be acquired, for example, an a cloud platform, a B cloud platform and a C cloud platform accessed to the multi-cloud management platform are included, the cloud platform type of the a cloud platform is an ali public cloud, the cloud platform type of the B cloud platform is a messenger cloud, and the cloud platform type of the C cloud platform is a hua cloud.
Based on the above embodiment, the specific process of acquiring the cloud platform type of each cloud platform accessing to the multi-cloud management platform is as follows:
and acquiring interface call authorization information of each cloud platform accessed to the multi-cloud management platform, wherein the interface call authorization information comprises the cloud platform type of the corresponding cloud platform.
It should be further noted that, in order to enable the multi-cloud management platform to access the cloud platform, the interface call authorization information of each cloud platform needs to be acquired first, and the multi-cloud management platform can access the corresponding cloud platform through different interfaces according to the interface call authorization information. The interface call authorization information comprises cloud platform types corresponding to the cloud platforms, so that the cloud platform types of the cloud platforms can be known when the multi-cloud management platform accesses the cloud platforms.
On the basis of the above embodiment, the step 1011 and the step 1012 of obtaining the interface call authorization information of each cloud platform accessing the multi-cloud management platform are performed by the specific procedures as follows:
and 1011, acquiring authorization information ciphertext and a parameter signature MD5 value of each cloud platform accessed to the multi-cloud management platform through a multi-cloud platform filter.
Firstly, an authorization information ciphertext and a parameter signature MD5 value of each cloud platform accessed to the multi-cloud management platform are obtained through a cloud platform filter, and the use of the cloud platform filter has the advantages of preventing the authorization information ciphertext from being leaked and the parameter signature MD5 value from being tampered.
And step 1012, decrypting the authorization information ciphertext according to the parameter signature MD5 value to obtain the interface call authorization information of each cloud platform.
After the authorization information ciphertext and the parameter signature MD5 value are obtained, the authorization information ciphertext is decrypted by using the parameter signature MD5 value, and the interface calling authorization information is obtained. In one embodiment, the interface call authorization information includes a cloud platform type, a login ID, and a login password, in the format shown below:
{"providerType":"xxxx","accessKeyId":"xxxx","accessKeySecret":"xxxxx"}
wherein providerType represents a cloud platform type, accessKeyId represents a login ID, accessKeySecret represents a login password.
Step 102, according to each interface on the multi-cloud management platform, acquiring a parameter class statement corresponding to each parameter class of each interface, wherein the parameter class statement comprises a cloud platform type supported by a parameter corresponding to the parameter class, and the parameter class statement is a pre-annotated statement.
After the type of each cloud platform is acquired, further acquiring a parameter class declaration corresponding to each parameter class of each interface according to each interface on the multi-cloud management platform. It should be further noted that, the multiple cloud management platform is provided with multiple interfaces, and the multiple cloud management platform accesses different cloud platforms through the interfaces, for example, virtual machine creation interfaces, etc., each interface corresponds to at least one parameter class, each parameter class corresponds to a pre-annotated parameter class declaration, and each parameter class declaration annotates a cloud platform type supported by a parameter corresponding to each parameter class. For example, in one embodiment, the parameter class a has two parameters, i.e., the parameter B and the parameter C, respectively, and the cloud platform types supported by the parameter B and the parameter C are marked in the parameter class declaration of the parameter class a.
Based on the above embodiment, according to each interface on the multi-cloud management platform, the specific steps 1021-1023 of obtaining the parameter class declaration corresponding to each parameter class of each interface are executed, and the specific steps are as follows:
step 1021, determining the interface name of each interface according to each interface on the multi-cloud management platform.
First, the interface name of each interface on the multi-cloud management platform needs to be determined, for example, the interface name of the created virtual machine interface is createonstance.
Step 1022, obtain the parameter class corresponding to each interface name.
After the interface name of each interface is obtained, further obtaining all parameter classes corresponding to each interface name according to the interface name. For creating a virtual machine interface, the corresponding parameter class is ecsCreateInstansRequest according to the interface name createInstance.
Step 1023, obtaining a parameter class statement corresponding to the parameter class.
After the parameter class of each interface is obtained, the parameter class declaration of each parameter class can be obtained. Illustratively, in one embodiment, annotating a parameter class that creates a virtual machine interface results in a parameter class declaration as follows:
in this embodiment, the parameter class of ecsCreateinstanceRequest is annotated in the created virtual machine interface, and the parameters corresponding to the parameter class include a region ID and a cpu, and the cloud platform type supported by the region ID is ALIYUN_PUBLIC (Alicloud), TENCENT (Tencent cloud), HWCLOUD_PUBLIC (Hua is cloud) and AZURE (Amazon cloud), and the cloud platform type supported by the cpu is OpenStack.
In one embodiment, after the parameter class corresponding to each interface name is obtained, before the parameter class declaration corresponding to each parameter class is obtained, the method further comprises the following steps:
the parameter class is injected into the Spring container.
In this embodiment, all the parameter classes are also injected into the Spring container, so that the Spring container can manage and configure all the parameter classes.
Step 103, when the multi-cloud management platform accesses the first cloud platform through the first interface, acquiring a first parameter corresponding to a first parameter class of the first interface, and acquiring a first parameter class statement corresponding to the first parameter class.
When the multi-cloud management platform accesses the first cloud platform through the first interface, acquiring a first parameter corresponding to a first parameter class of the first interface, and acquiring a first parameter class statement corresponding to the first parameter class. Illustratively, in one embodiment, when the multi-cloud management platform accesses the A1 cloud platform via the X interface, a first parameter corresponding to a class of parameters that creates the virtual machine interface is obtained, where at least one of the first parameters exists, such as parameter B and parameter C. Meanwhile, a first parameter class statement corresponding to the first parameter class is required to be acquired, wherein the first parameter class statement is that the types of cloud platforms supported by the parameter B are A1, A2 and A3, and the type of the cloud platform supported by the parameter C is A4.
Step 104, according to the cloud platform type of the first cloud platform and the first parameter class statement, filtering the first parameter to obtain a second parameter, and according to the second parameter, calling an adaptation parameter class corresponding to the first cloud platform.
After the first parameters and the first parameter class declarations are obtained, the cloud platform type of the first cloud platform is determined, and then, according to the cloud platform type of the first cloud platform and the first parameter declarations, all first parameters which are different in the cloud platform type and the first cloud platform type and are supported in the first parameters are filtered, so that second parameters required by the first cloud platform are obtained, and the adaptation parameter class corresponding to the first cloud platform is called according to the second parameters to realize corresponding functions.
Based on the above embodiment, according to the cloud platform type of the first cloud platform and the first parameter class declaration, the specific process of filtering the first parameter to obtain the second parameter is performed by steps 1041 to 102, where the specific process is:
step 1041, determining a cloud platform type supported by each first parameter according to the first parameter class statement, and placing a parameter name of the first parameter, which is not corresponding to the cloud platform type of the first cloud platform, and is supported by the cloud platform type in the first parameter, into the exclusion array.
In this embodiment, first, according to a first parameter class statement, a cloud platform type supported by each first parameter is determined, and then, parameter names of first parameters, which are supported by all first parameters and do not correspond to the cloud platform type of the first cloud platform, are put into an exclusion array.
In an embodiment, when the multi-cloud management platform accesses the A1 cloud platform through the X interface, the first parameters include a parameter B and a parameter C, and the cloud platform types supported by the parameter B are determined to be A1, A2 and A3 according to the first parameter declaration, and the cloud platform type supported by the parameter C is determined to be A4. And then, in all the first parameters, placing the parameter names of the first parameters of which the supported cloud platform types do not correspond to the A1 cloud platform into an exclusion array, namely placing the parameter names of the parameters C into the exclusion array in all the first parameters.
Step 1042, filtering the first parameter according to the exclusion array to obtain a second parameter.
After the exclusion array is obtained, the first parameters can be filtered according to the parameter names in the exclusion array, so that parameters required by the first cloud platform are obtained.
On the basis of the above embodiment, the specific process of filtering the first parameter according to the exclusion array to obtain the second parameter is as follows:
and deleting the first parameter matched with the parameter name in the exclusion array from the first parameter to obtain a second parameter.
In this embodiment, all the first parameters are traversed, and if there is a first parameter matching with the parameter name in the exclusion array, the first parameter is deleted, so as to obtain a second parameter. For example, if the parameter name in the exclusion array is a region id, the first parameter matching the region id is deleted from all the first parameters, and a second parameter is obtained.
In the embodiment of the application, the cloud platform type supported by the parameters corresponding to each parameter class is determined in the parameter class declaration through the pre-annotating the parameter class declaration, so that when the subsequent multi-cloud management platform accesses the first cloud platform through the first interface, only the first parameter class declaration corresponding to the first parameter class is required to be acquired, and then the first parameter corresponding to the first parameter class of the first interface can be filtered according to the cloud platform type of the first cloud platform and the first parameter class declaration to obtain the second parameter. According to the embodiment of the application, even if interface parameters are disordered caused by inconsistent parameters of a plurality of cloud manufacturers, the parameters corresponding to each cloud platform can be screened, so that development and maintenance of interface functions of developers are facilitated, meanwhile, the usability and readability of interfaces of the cloud platforms are improved, and the technical problem that the interfaces of the cloud management platforms are difficult to develop and maintain due to the fact that the parameters supported by each cloud platform cannot be distinguished in the prior art is solved.
Example two
As shown in fig. 2, fig. 2 is a schematic structural diagram of a cloud platform parameter adapting device according to an embodiment of the present application, including: a type acquisition module 201, a declaration acquisition module 202, a parameter acquisition module 203, and a parameter filtering module 204;
the type acquisition module 201 is configured to acquire a cloud platform type of each cloud platform accessing the multi-cloud management platform;
the declaration acquisition module 202 is configured to acquire, according to each interface on the multi-cloud management platform, a parameter class declaration corresponding to a parameter class of each interface, where the parameter class declaration includes a cloud platform type supported by a parameter corresponding to the parameter class, and the parameter class declaration is a pre-annotated declaration;
the parameter obtaining module 203 is configured to obtain a first parameter corresponding to a first parameter class of the first interface and obtain a first parameter class declaration corresponding to the first parameter class when the multi-cloud management platform accesses the first cloud platform through the first interface;
the parameter filtering module 204 is configured to filter the first parameter according to the cloud platform type and the first parameter class declaration of the first cloud platform to obtain a second parameter, and call an adaptation parameter class corresponding to the first cloud platform according to the second parameter.
Based on the foregoing embodiments, the type obtaining module 201 is configured to obtain a specific cloud platform type of each cloud platform accessing to the multi-cloud management platform, where the specific cloud platform type is:
the interface calling authorization information is used for acquiring interface calling authorization information of each cloud platform accessed to the multi-cloud management platform, and the interface calling authorization information comprises cloud platform types of the corresponding cloud platforms.
Based on the above embodiment, the type obtaining module 201 is configured to obtain the interface call authorization information of each cloud platform accessing to the multi-cloud management platform specifically:
the method comprises the steps of obtaining authorization information ciphertext and a parameter signature MD5 value of each cloud platform accessed to a multi-cloud management platform through a multi-cloud platform filter; and decrypting the authorization information ciphertext according to the parameter signature MD5 value to obtain the interface call authorization information of each cloud platform.
Based on the above embodiment, the declaration obtaining module 202 is configured to obtain, according to each interface on the multi-cloud management platform, a parameter class declaration corresponding to a parameter class of each interface, where the specific steps are as follows:
the interface name of each interface is determined according to each interface on the multi-cloud management platform; acquiring a parameter class corresponding to each interface name; and acquiring a parameter class declaration corresponding to the parameter class.
On the basis of the above embodiment, after the declaration acquisition module 202 is configured to acquire the parameter class corresponding to each interface name, before the parameter class declaration corresponding to each parameter class is acquired, the declaration acquisition module is further configured to:
the parameter class is injected into the Spring container.
Based on the above embodiment, the parameter filtering module 204 is configured to filter the first parameter according to the cloud platform type of the first cloud platform and the first parameter class declaration to obtain the second parameter specifically as follows:
the cloud platform type identification module is used for determining the cloud platform type supported by each first parameter according to the first parameter class statement, and placing the parameter name of the first parameter, which is supported by the first parameter and does not correspond to the cloud platform type of the first cloud platform, into the exclusion array; and filtering the first parameter according to the exclusion array to obtain a second parameter.
Based on the above embodiment, the parameter filtering module 204 is configured to filter the first parameter according to the exclusion array, and the specific steps of obtaining the second parameter are:
and deleting the first parameter matched with the parameter name in the exclusion array from the first parameter to obtain a second parameter.
Example III
The present embodiment also provides a terminal device, as shown in fig. 3, a terminal device 30, the terminal device including a processor 300 and a memory 301;
the memory 301 is used for storing a computer program 302 and transmitting the computer program 302 to the processor;
the processor 300 is configured to perform the steps of one of the cloud platform parameter adaptation method embodiments described above according to instructions in the computer program 302.
Illustratively, the computer program 302 may be partitioned into one or more modules/units that are stored in the memory 301 and executed by the processor 300 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments are used for describing the execution of the computer program 302 in the terminal device 30.
The terminal device 30 may be a computing device such as a desktop computer, a notebook computer, a palm computer, and a cloud server. The terminal device 30 may include, but is not limited to, a processor 300, a memory 301. It will be appreciated by those skilled in the art that fig. 3 is merely an example of the terminal device 30 and is not meant to be limiting of the terminal device 30, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., the terminal device 30 may also include input and output devices, network access devices, buses, etc.
The processor 300 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 301 may be an internal storage unit of the terminal device 30, such as a hard disk or a memory of the terminal device 30. The memory 301 may also be an external storage terminal device of the terminal device 30, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the terminal device 30. Further, the memory 301 may also include both an internal storage unit and an external storage device of the terminal device 30. The memory 301 is used for storing the computer program and other programs and data required by the terminal device 30. The memory 301 may also be used to temporarily store data that has been output or is to be output.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media in which computer programs can be stored.
Example IV
Embodiments of the present application also provide a storage medium containing computer executable instructions, which when executed by a computer processor, are for performing a cloud platform parameter adaptation method, the method comprising the steps of:
acquiring a cloud platform type of each cloud platform accessed to the multi-cloud management platform;
according to each interface on the multi-cloud management platform, acquiring a parameter class statement corresponding to a parameter class of each interface, wherein the parameter class statement comprises a cloud platform type supported by a parameter corresponding to the parameter class, and the parameter class statement is a pre-annotated statement;
when the multi-cloud management platform accesses a first cloud platform through a first interface, acquiring a first parameter corresponding to a first parameter class of the first interface, and acquiring a first parameter class statement corresponding to the first parameter class;
and filtering the first parameter according to the cloud platform type of the first cloud platform and the first parameter class statement to obtain a second parameter, and calling an adaptation parameter class corresponding to the first cloud platform according to the second parameter.
Note that the above is only a preferred embodiment of the present application and the technical principle applied. It will be understood by those skilled in the art that the embodiments of the present application are not limited to the particular embodiments described herein, but are capable of numerous obvious changes, rearrangements and substitutions without departing from the scope of the embodiments of the present application. Therefore, while the embodiments of the present application have been described in connection with the above embodiments, the embodiments of the present application are not limited to the above embodiments, but may include many other equivalent embodiments without departing from the spirit of the embodiments of the present application, and the scope of the embodiments of the present application is determined by the scope of the appended claims.

Claims (8)

1. The cloud platform parameter adapting method is characterized by comprising the following steps of:
acquiring a cloud platform type of each cloud platform accessed to the multi-cloud management platform;
according to each interface on the multi-cloud management platform, acquiring a parameter class statement corresponding to a parameter class of each interface, wherein the parameter class statement comprises a cloud platform type supported by a parameter corresponding to the parameter class, and the parameter class statement is a pre-annotated statement;
when the multi-cloud management platform accesses a first cloud platform through a first interface, acquiring a first parameter corresponding to a first parameter class of the first interface, and acquiring a first parameter class statement corresponding to the first parameter class;
according to the cloud platform type of the first cloud platform and the first parameter class statement, filtering the first parameter to obtain a second parameter, and calling an adaptation parameter class corresponding to the first cloud platform according to the second parameter;
the specific process of filtering the first parameter to obtain the second parameter according to the cloud platform type of the first cloud platform and the first parameter class statement is as follows:
according to the first parameter class declaration, determining the type of the cloud platform supported by each first parameter, and placing the parameter name of the first parameter, which is supported in the first parameters and does not correspond to the type of the cloud platform of the first cloud platform, into an exclusion array;
filtering the first parameter according to the exclusion array to obtain a second parameter;
the specific process of filtering the first parameter according to the exclusion array to obtain the second parameter is as follows:
and deleting the first parameter matched with the parameter name in the exclusion array from the first parameter to obtain a second parameter.
2. The cloud platform parameter adapting method according to claim 1, wherein the specific process of obtaining the cloud platform type of each cloud platform accessing to the multi-cloud management platform is as follows:
and acquiring interface call authorization information of each cloud platform accessed to the multi-cloud management platform, wherein the interface call authorization information comprises cloud platform types of the corresponding cloud platforms.
3. The cloud platform parameter adapting method according to claim 2, wherein the specific process of obtaining the interface call authorization information of each cloud platform accessing the multi-cloud management platform is as follows:
acquiring authorization information ciphertext of each cloud platform accessed to the multi-cloud management platform through a multi-cloud platform filter and a parameter signature MD5 value;
and decrypting the authorization information ciphertext according to the parameter signature MD5 value to obtain the interface call authorization information of each cloud platform.
4. The cloud platform parameter adapting method according to claim 1, wherein the specific process of obtaining the parameter class declaration corresponding to the parameter class of each interface according to each interface on the multi-cloud management platform is as follows:
determining the interface name of each interface according to each interface on the multi-cloud management platform;
acquiring a parameter class corresponding to each interface name;
and acquiring a parameter class statement corresponding to the parameter class.
5. The cloud platform parameter adaptation method according to claim 4, wherein after said obtaining the parameter class corresponding to each of said interface names, before obtaining the parameter class declaration corresponding to each of said parameter classes, further comprising the steps of:
the parameter class is injected into a Spring container.
6. The cloud platform parameter adaptation device is characterized by comprising: the system comprises a type acquisition module, a statement acquisition module, a parameter acquisition module and a parameter filtering module;
the type acquisition module is used for acquiring the type of each cloud platform accessed to the multi-cloud management platform;
the declaration acquisition module is used for acquiring a parameter class declaration corresponding to a parameter class of each interface according to each interface on the multi-cloud management platform, wherein the parameter class declaration comprises a cloud platform type supported by a parameter corresponding to the parameter class, and the parameter class declaration is a pre-annotated declaration;
the parameter acquisition module is used for acquiring a first parameter corresponding to a first parameter class of a first interface and acquiring a first parameter class statement corresponding to the first parameter class when the multi-cloud management platform accesses the first cloud platform through the first interface;
the parameter filtering module is used for filtering the first parameter according to the cloud platform type of the first cloud platform and the first parameter class statement to obtain a second parameter, and calling an adaptation parameter class corresponding to the first cloud platform according to the second parameter;
the parameter filtering module is specifically configured to:
according to the first parameter class declaration, determining the type of the cloud platform supported by each first parameter, and placing the parameter name of the first parameter, which is supported in the first parameters and does not correspond to the type of the cloud platform of the first cloud platform, into an exclusion array;
filtering the first parameter according to the exclusion array to obtain a second parameter;
the parameter filtering module is specifically configured to delete, from the first parameters, a first parameter that matches a parameter name in the exclusion array, and obtain a second parameter.
7. A terminal device, characterized in that the terminal device comprises a processor and a memory;
the memory is used for storing a computer program and transmitting the computer program to the processor;
the processor is configured to execute a cloud platform parameter adaptation method according to any of claims 1-5 according to instructions in the computer program.
8. A storage medium storing computer executable instructions which, when executed by a computer processor, are adapted to carry out a cloud platform parameter adaptation method according to any of claims 1-5.
CN202111322770.4A 2021-11-09 2021-11-09 Cloud platform parameter adaptation method, device, terminal equipment and storage medium Active CN114157662B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111322770.4A CN114157662B (en) 2021-11-09 2021-11-09 Cloud platform parameter adaptation method, device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111322770.4A CN114157662B (en) 2021-11-09 2021-11-09 Cloud platform parameter adaptation method, device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114157662A CN114157662A (en) 2022-03-08
CN114157662B true CN114157662B (en) 2023-08-29

Family

ID=80459797

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111322770.4A Active CN114157662B (en) 2021-11-09 2021-11-09 Cloud platform parameter adaptation method, device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114157662B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111858101B (en) * 2020-07-28 2023-05-26 深圳平安医疗健康科技服务有限公司 Cloud architecture system-oriented adaptation method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107493310A (en) * 2016-06-13 2017-12-19 腾讯科技(深圳)有限公司 A kind of cloud resource processing method and cloud management platform
CN107659624A (en) * 2017-09-06 2018-02-02 国云科技股份有限公司 A kind of isomery cloud management system and method suitable for cloud computing
CN108449418A (en) * 2018-03-29 2018-08-24 新华三云计算技术有限公司 A kind of mixed cloud platform management system and method
CN110213092A (en) * 2019-05-21 2019-09-06 深信服科技股份有限公司 Resource access method, platform management equipment, storage medium and the device of mixed cloud

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10360122B2 (en) * 2011-05-31 2019-07-23 Red Hat, Inc. Tracking cloud installation information using cloud-aware kernel of operating system
CN112104697B (en) * 2018-05-31 2022-03-04 华为技术有限公司 Data processing method, multi-cloud management system and related equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107493310A (en) * 2016-06-13 2017-12-19 腾讯科技(深圳)有限公司 A kind of cloud resource processing method and cloud management platform
CN107659624A (en) * 2017-09-06 2018-02-02 国云科技股份有限公司 A kind of isomery cloud management system and method suitable for cloud computing
CN108449418A (en) * 2018-03-29 2018-08-24 新华三云计算技术有限公司 A kind of mixed cloud platform management system and method
CN110213092A (en) * 2019-05-21 2019-09-06 深信服科技股份有限公司 Resource access method, platform management equipment, storage medium and the device of mixed cloud

Also Published As

Publication number Publication date
CN114157662A (en) 2022-03-08

Similar Documents

Publication Publication Date Title
US10148731B2 (en) Methods, systems, and computer readable media for on-boarding virtualized network function (VNF) packages in a network functions virtualization (NFV) system
CN110601880B (en) Cloud platform, service processing method, command interface and computer equipment
CN107798038B (en) Data response method and data response equipment
WO2019109518A1 (en) Data list uploading method and terminal thereof
CN111078140B (en) Nuclear power station file uploading management method and device, terminal equipment and medium
WO2019196239A1 (en) Method for managing thread interfaces, and terminal device and computer-readable storage medium
US20120159566A1 (en) Access control framework
CN111914029A (en) Block chain-based medical data calling method and device, electronic equipment and medium
WO2021164462A1 (en) Data encryption method, data decryption method, computer device, and medium
CN107656750A (en) Update of plug-in method and device
TW202032466A (en) User age prediction method, apparatus, and device
CN111694677A (en) Message queue management method, device, terminal and computer-readable storage medium
CN114157662B (en) Cloud platform parameter adaptation method, device, terminal equipment and storage medium
CN112363935A (en) Data joint debugging method and device, electronic equipment and storage medium
CN110851334A (en) Flow statistical method, electronic device, system and medium
CN109756527B (en) Data sharing method, device and system
CN111046393B (en) Vulnerability information uploading method and device, terminal equipment and storage medium
CN112580079A (en) Authority configuration method and device, electronic equipment and readable storage medium
US20220327242A1 (en) Data management method and apparatus
CN110855525A (en) Flow statistical method, electronic device, system and medium
CN110362294A (en) Development task executes method, apparatus, electronic equipment and storage medium
CN112035471B (en) Transaction processing method and computer equipment
CN111783121B (en) Data processing method, device, equipment and storage medium
WO2023082032A1 (en) Cloud platform parameter adaptation method and apparatus, terminal device, and storage medium
CN114124524A (en) Cloud platform permission setting method and device, terminal equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant