Method, device, system, electronic device and storage medium for acquiring data

By setting application programming interfaces in the data standardization component, the compatibility and data interoperability problems between different cloud computing platforms are solved, the unified formatting and management of data are realized, and the compatibility and data interoperability problems between cloud computing systems are solved. Data interoperability issues.

CN114721732BActive Publication Date: 2024-09-27BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210348259.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-01
Publication Date
2024-09-27
Estimated Expiration
2042-04-01

Smart Images

  • Figure CN114721732B
    Figure CN114721732B
Patent Text Reader

Abstract

The present application relates to a method, device, system, electronic device and storage medium for acquiring data. The method includes: acquiring a general data read instruction input through a target application programming interface; the target application programming interface belongs to the at least one application programming interface; acquiring a target functional component corresponding to the target application programming interface, and a general data format corresponding to the target application programming interface; the target functional component belongs to at least one functional component of the target cloud computing system; reading target data from the storage data of the target functional component according to the general data read instruction; and converting the target data into a general data format corresponding to the target functional component; and outputting the data converted into the general data format through the target application programming interface. It is used to solve the compatibility and data interoperability problems of different cloud computing systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network transmission technology, and in particular to a method, device, system, electronic device and storage medium for acquiring data. Background Art

[0002] Open stack, an open source cloud computing framework, is an open source project that provides software for the construction and management of public and private clouds. The project is composed of several main components to complete some specific tasks. Open stack mainly includes Nova (computing), cinder (storage), neutron (network), glance (image) and other component modules.

[0003] The framework was originally designed to enable the transition of existing application models to cloud computing, but it did not take into account a series of compatibility and data interoperability issues that would arise when different cloud vendors developed their own cloud computing platforms based on Open Stack.

[0004] The cloud computing platforms developed by different cloud vendors have their own characteristics. Most of them are based on Open stack or secondary development on Openstack. How to achieve compatibility and data interoperability of cloud computing platforms developed by different cloud vendors is a problem that needs to be solved. Summary of the invention

[0005] The present application provides a method, device, system, electronic device and storage medium for acquiring data, so as to solve the compatibility and data intercommunication problems of different cloud computing systems.

[0006] In a first aspect, an embodiment of the present application provides a method for acquiring data, which is applied to a data standardization component provided with at least one application programming interface, wherein the data standardization component establishes a communication connection with a target cloud computing system, and the method includes:

[0007] Obtaining a general data read instruction input through a target application programming interface; the target application programming interface belongs to the at least one application programming interface;

[0008] Acquire a target functional component corresponding to the target application programming interface and a universal data format corresponding to the target application programming interface; the target functional component belongs to at least one functional component of the target cloud computing system;

[0009] Reading target data from the storage data of the target functional component according to the universal data reading instruction; and converting the target data into a universal data format corresponding to the target functional component;

[0010] The data converted into a common data format is outputted through the target application programming interface.

[0011] Optionally, the acquiring a target functional component corresponding to the target application programming interface and a universal data format corresponding to the target application programming interface includes:

[0012] From the pre-configured mapping relationship of the target cloud computing system, the target functional component corresponding to the target application programming interface and the universal data format corresponding to the target application programming interface are extracted; wherein the mapping relationship among the application programming interface, the functional component and the universal data format is stored in the mapping relationship.

[0013] Optionally, the application programming interfaces corresponding to any two functional components in the mapping relationship are different.

[0014] Optionally, the data converted into a universal data format through the target application programming interface output includes:

[0015] Acquire the storage space corresponding to the target functional component, and store the data in the universal data format into the storage space through the target application programming interface; wherein components with the same function correspond to the same storage space.

[0016] Optionally, the target functional component includes a computing component, and the target data includes at least one of virtual machine creation data, operation data, suspension data, scheduling data, shutdown data, and destruction data;

[0017] or

[0018] The target functional component includes a mirror component, and the target data includes at least one of creation data, update data, and viewing data of the mirror;

[0019] or

[0020] The target functional component includes a block storage component, and the target data includes at least one of creation data, query data, deletion data, unmount data, mount data and backup data of a block device;

[0021] or

[0022] The target functional component includes a network virtualization component, and the target data includes network parameter configuration data.

[0023] Optionally, before acquiring the general data read instruction input through the target application programming interface, the method further includes:

[0024] Acquire at least two cloud computing systems that are communicatively connected to the data standardization component;

[0025] Selecting the target cloud computing system from the at least two cloud computing systems; and selecting the target functional component from the functional components of the target cloud computing system, and obtaining a target application programming interface corresponding to the target functional component;

[0026] Acquiring data reading parameters, wherein the data reading parameters include an access address of the target cloud computing system;

[0027] The data reading parameter is written into a universal data format corresponding to the target application programming interface to obtain the universal data reading instruction.

[0028] Optionally, selecting the target cloud computing system from the at least two cloud computing systems; and selecting the target functional component from the functional components of the target cloud computing system, and acquiring a target application programming interface corresponding to the target functional component, comprises:

[0029] displaying a first selection control for each of the at least two cloud computing systems;

[0030] Determining the selected target cloud computing system based on a click operation on the first selection control;

[0031] Displaying a second selection control for each functional component in the target cloud computing system;

[0032] Based on the click operation on the second selection control, the selected target functional component is determined, an identifier of a target application programming interface corresponding to the target functional component is obtained, and the target application programming interface is called.

[0033] In a second aspect, an embodiment of the present application provides a device for acquiring data, which is applied to a data standardization component provided with at least one application programming interface, and establishes a communication connection with a target cloud computing system; comprising:

[0034] A first acquisition module, configured to acquire a general data read instruction inputted through a target application programming interface; the target application programming interface belongs to the at least one application programming interface;

[0035] A second acquisition module is used to acquire a target functional component corresponding to the target application programming interface and a universal data format corresponding to the target application programming interface; the target functional component belongs to at least one functional component of the target cloud computing system;

[0036] A reading module, configured to read target data from the storage data of the target functional component according to the general data reading instruction; and convert the target data into a general data format corresponding to the target functional component;

[0037] The conversion module is used to output the data converted into a universal data format through the target application programming interface.

[0038] In a third aspect, an embodiment of the present application provides a cloud computing system, including a data standardization component and at least one functional component;

[0039] The data standardization component is used to implement the method for acquiring data described in any one of the first aspects.

[0040] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory, and a communication bus, wherein the processor and the memory communicate with each other via the communication bus;

[0041] The memory is used to store computer programs;

[0042] The processor is used to execute the program stored in the memory to implement the method for acquiring data described in any one of the first aspects.

[0043] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the method for acquiring data described in any one of the first aspects is implemented.

[0044] The above-mentioned technical scheme provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application, by establishing a communication connection between a data standardization component and a target cloud computing system, setting at least one application programming interface on the data standardization component, after obtaining the general data reading instruction input by the target application programming interface in the data standardization component, mapping it to the target functional component through the target application programming interface, and obtaining the general data format corresponding to the target application programming interface, after reading the target data from the storage data of the target functional component, converting the target data into the general data format, and outputting the data converted into the general data format through the target application programming interface, thereby being able to unify the data obtained from the cloud computing system into a general data format, standardizing the format of the data obtained from the cloud computing system, and avoiding the different data formats obtained from different cloud computing systems, resulting in compatibility and data interoperability problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0047] Figure 1 This is a flow chart of a method for obtaining data in an embodiment of the present application;

[0048] Figure 2 A schematic diagram of a method flow chart for generating a general data read instruction in an embodiment of the present application;

[0049] Figure 3 This is a schematic diagram of the structure of the cloud computing system integrating data standardization components in an embodiment of the present application;

[0050] Figure 4 A schematic diagram of a data standardization component connected to at least two cloud computing systems in an embodiment of the present application;

[0051] Figure 5 This is a schematic diagram of the structure of a device for acquiring data in an embodiment of the present application;

[0052] Figure 6 This is a schematic diagram of the structure of the data standardization component in the embodiment of the present application;

[0053] Figure 7 This is a schematic diagram of the structure of the cloud computing system in the embodiment of the present application;

[0054] Figure 8 This is a schematic diagram of obtaining data from cloud computing system a and cloud computing system b in an embodiment of the present application;

[0055] Fig. 9 Schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0057] In order to solve the compatibility and data interoperability problems between cloud computing systems developed by different cloud computing vendors, an embodiment of the present application provides a method for acquiring data, which is applied to a data standardization component provided with at least one application programming interface, and the data standardization component establishes a communication connection with a target cloud computing system.

[0058] Among them, the application programming interface (API) set on the data standardization component serves as the external standard interface of the data standardization component, and is used to interact with external devices for data, such as obtaining instructions passed in by external devices, and / or returning data to external devices.

[0059] In a specific embodiment, the data standardization component may be independent of the target cloud computing system, or may be integrated into the target cloud computing system as a newly added component. Where the data standardization component is independent of the target cloud computing system, the data standardization component may establish a communication connection with other cloud computing systems in addition to establishing a communication connection with the target cloud computing system.

[0060] like Figure 1 As shown, in the embodiment of the present application, the detailed method flow of obtaining data through the data standardization component is as follows:

[0061] Step 101, obtaining a general data read instruction input through a target application programming interface; the target application programming interface belongs to at least one application programming interface of a data standardization component.

[0062] Among them, the data standardization component can be set with application programming interfaces that are consistent with the number of functional components in the cloud computing system. The functional components and application programming interfaces are configured one-to-one, so that a functional component of the cloud computing system can be identified through the application programming interface.

[0063] For example, assuming that the cloud computing system includes N functional components, N application programming interfaces are set in the data standardization component corresponding to the cloud computing system, and the N functional components correspond one-to-one to the N application programming interfaces. Application programming interface 1 corresponds to functional component 1. Then, when an external device accesses data of functional component 1, the data is transmitted through application programming interface 1.

[0064] Step 102, obtaining a target functional component corresponding to a target application programming interface and a universal data format corresponding to the target application programming interface.

[0065] The target functional component belongs to at least one functional component of the target cloud computing system.

[0066] The target cloud computing system can be implemented using the cloud computing open source framework Open stack. Of course, the embodiments of the present application can also be applied to cloud computing systems implemented using other frameworks. This article only takes the cloud computing system implemented using Open stack as an example for explanation.

[0067] At least one functional component of the target cloud computing system, including a computing component (Nova), an image component (glance), a block storage component (cinder), and a network virtualization component (neutron).

[0068] In a specific embodiment, obtaining the target functional component corresponding to the target application programming interface and the universal data format corresponding to the target application programming interface includes: extracting the target functional component corresponding to the target application programming interface and the universal data format corresponding to the target application programming interface from a pre-configured mapping relationship of the target cloud computing system. The mapping relationship stores the mapping relationship among the application programming interface, the functional component, and the universal data format.

[0069] Specifically, the application programming interfaces corresponding to any two functional components in the mapping relationship are different.

[0070] For example, suppose that API1 of the data standardization component is mapped to the Nova component and format 1, API2 is mapped to the glance component and format 2, API3 is mapped to the cinder component and format 3, and API4 is mapped to the neutron component and format 4. Then the data read instruction obtained from API1 corresponds to the Nova component and format 1.

[0071] Step 103, reading target data from the storage data of the target functional component according to the general data reading instruction; and converting the target data into a general data format corresponding to the target functional component.

[0072] Among them, different target function components correspond to different target data, and the target function components are listed as follows:

[0073] Case A: The target functional component includes a computing component, and the target data includes at least one of virtual machine creation data, running data, suspension data, scheduling data, shutdown data, and destruction data.

[0074] The computing component, namely the Nova component, is mainly used to manage the entire life cycle of a virtual machine instance for a single user or user group, provide virtual services according to user needs, and is responsible for virtual machine creation, startup, shutdown, suspension (network card mounting and unmounting, etc.), suspension, adjustment (modification of host password, upgrade), online / offline migration, downtime evacuation migration, restart / reinstallation of the system, destruction and other operations, as well as configuration of central processing unit (CPU), memory and other information specifications. Creation data is generated during the virtual machine creation operation, operation data is generated during the virtual machine startup and shutdown operations, suspension data is generated during the virtual machine suspension process, scheduling data is generated during the virtual machine suspension, adjustment, and migration process, shutdown data is generated during the virtual machine restart, and destruction data is generated during the virtual machine destruction process.

[0075] Case B: the target functional component includes a mirror component, and the target data includes at least one of creation data, update data, and viewing data of the mirror.

[0076] The image component, namely the glance component, is mainly used to provide virtual machine image search and retrieval services, supports a variety of virtual machine image formats (such as AKI, AMI, ARI, ISO, QCOW2, Raw, VDI, VHD, VMDK, etc.), and is responsible for creating and uploading images, deleting images, and editing basic image information. The data read from the glance component mainly includes: the data of the host creating the whole machine image, the data of viewing the image (including snapshot query, etc.), the update data such as the status and progress of deleting images, updating updates, sharing images, and uploading images.

[0077] Case C: the target functional component includes a block storage component, and the target data includes at least one of creation data, query data, deletion data, unmount data, mount data, and backup data of a block device.

[0078] The block storage component, namely the cinder component, mainly provides stable data block storage services for running instances. The plug-in driver architecture of the cinder component facilitates the creation and management of block devices, such as creating volumes, deleting volumes, mounting and unmounting volumes on instances, etc. The core data in the cinder component includes volume creation, query, deletion, and unmounting, as well as volume snapshot creation, snapshot backup, query, and deletion, and volume backup data, including backup creation, backup query, modification, and deletion of volume backups.

[0079] For example, the query volume command can be expressed as:

[0080] GET http: / / {{url}} / xx / {{tenantid}} / volumes / {{volumeId}};

[0081] The command to delete a volume can be expressed as:

[0082] DELETE http: / / {{url}} / xx / {{tenantid}} / volumes / {{volumeId}};

[0083] url indicates the access address of the volume, tenantid indicates the interface identifier of the cinder component, and volumeId indicates the identifier of the volume.

[0084] Case D: The target functional component includes a network virtualization component, and the target data includes network parameter configuration data.

[0085] The network virtualization component, namely the neutron component, mainly provides network virtualization technology for cloud computing and network connection services for other functional components of OpenStack. It can define networks, subnets, and routers, configure DHCP (Dynamic Host Configuration Protocol), DNS (Domain Name System), load balancing, and L3 services. The network supports GRE (Generic Routing Encapsulation) and VLAN (Virtual Local Area Network).

[0086] The above is only an example of the main functional components included in the cloud computing system based on Open Stack. A cloud computing system may also include other functional components, which are not listed here one by one.

[0087] It should be noted that each functional component of Open Stack exposes a REST (Representation State Transfer) API interface to facilitate calls by other programs, such as data standardization components.

[0088] In the embodiment of the present application, the general data format corresponding to each functional component is not specifically limited, and can be defined according to the needs of each functional component. For example, after the data standardization component obtains the data from the cinder component, it extracts the keywords in the data, such as the disk identification (ID), data length, etc., and stores the extracted data according to the composition rules of each field of the general data format corresponding to the cinder component, thereby realizing the conversion of the data format, and the extracted data is saved in a general data format that complies with the standard restful interface specification through conversion.

[0089] Step 104: Output the data converted into a universal data format through a target application programming interface.

[0090] In a specific embodiment, data converted into a universal data format is output through a target application programming interface, including: obtaining a storage space corresponding to a target functional component, and storing the data in the universal data format into the storage space through the target application programming interface; wherein components with the same function correspond to the same storage space.

[0091] For example, a fixed storage space 1 is reserved for data related to the Nova component; a fixed storage space 2 is reserved for data related to the neutron component; a fixed storage space 3 is reserved for data related to the glance component; a fixed storage space 4 is reserved for data related to the cinder component; a fixed storage space 5 is reserved for data related to the Swift component; a fixed storage space 6 is reserved for data related to the Keystore component; a fixed storage space 7 is reserved for data related to the Horizon component; a fixed storage space 8 is reserved for data related to the Ceilometer component; and a fixed storage space 9 is reserved for data related to components other than the functional components listed above. Among them, storage spaces 1 to 9 can be independent storage spaces, that is, there is no reuse relationship between any two storage spaces.

[0092] When a data standardization component is connected to at least two cloud computing systems at the same time, components with the same function correspond to the same storage space, which means that the components with the same function of the at least two cloud computing systems correspond to the same storage space, for example, the Nova components of the at least two cloud computing systems correspond to the same storage space 1, and the glance components of the at least two cloud computing systems correspond to the same storage space 2, etc. By storing the data of components with the same function in the same storage space, it is convenient for users to centrally manage the data related to the same functional component obtained from different cloud computing systems, thereby improving management efficiency.

[0093] In a specific embodiment, when there is only one cloud computing system that establishes a communication connection with the data standardization component, the cloud computing system is the target cloud computing system. When there are at least two cloud computing systems that establish a communication connection with the data standardization component, before executing step 101 to obtain the universal data read instruction input through the target application programming interface, it is necessary to first determine the target cloud computing system from the at least two cloud computing systems and generate the universal data read instruction, such as Figure 2 As shown, the specific steps include:

[0094] Step 201, obtaining at least two cloud computing systems that are in communication connection with the data standardization component;

[0095] Step 202, selecting a target cloud computing system from the at least two cloud computing systems; and selecting a target functional component from each functional component of the target cloud computing system, and obtaining a target application programming interface corresponding to the target functional component;

[0096] Step 203, obtaining data reading parameters, where the data reading parameters include an access address of the target cloud computing system;

[0097] Step 204, writing the data reading parameter into the universal data format corresponding to the target application programming interface to obtain the universal data reading instruction.

[0098] In an exemplary embodiment, a target cloud computing system is selected from at least two cloud computing systems; and the target functional component is selected from the functional components of the target cloud computing system, and a target application programming interface corresponding to the target functional component is obtained. This can be implemented in a manner that is convenient for user operation, specifically including: displaying a first selection control for each cloud computing system in at least two cloud computing systems; determining the selected target cloud computing system based on a click operation on the first selection control; displaying a second selection control for each functional component in the target cloud computing system; determining the selected target functional component based on a click operation on the second selection control, obtaining an identifier of a target application programming interface corresponding to the target functional component, and calling the target application programming interface.

[0099] In an exemplary embodiment, Figure 3 The figure shows a schematic diagram of integrating a data standardization component (a component named standardDATA) in a cloud computing system implemented using Open stack. The cloud computing system includes neutron components, Nova components, glance components, and cinder components. In addition, it may also include other functional components, which are not listed here, including a data standardization component. The data standardization component establishes communication connections with the API interfaces of each functional component respectively, obtains data from each functional component as needed, and outputs the obtained data after standardization processing, and stores it in the specified storage space.

[0100] In an exemplary embodiment, Figure 4The figure shows a schematic diagram of a data standardization component (a component named standardDATA) communicating with at least two cloud computing systems implemented using Open stack. Each cloud computing system includes neutron components, Nova components, glance components, and cinder components. In addition, other functional components may also be included, which are not listed here. Among them, the data standardization component establishes a communication connection with the API interface of each functional component in the cloud computing system 1 to N. The data standardization component obtains data from each functional component as needed, and outputs the obtained data after standardization processing, and stores it in the designated storage space. For example, the data standardization component stores the data of the neutron component of each cloud computing system in the designated storage space 1, and the data of the Nova component of each cloud computing system in the designated storage space 2, etc.

[0101] In an embodiment of the present application, a communication connection is established between a data standardization component and a target cloud computing system, at least one application programming interface is set on the data standardization component, and after obtaining a general data read instruction input by the target application programming interface in the data standardization component, it is mapped to the target functional component through the target application programming interface, and a general data format corresponding to the target application programming interface is obtained. After reading the target data from the storage data of the target functional component, the target data is converted into the general data format, and the data converted into the general data format is output through the target application programming interface, thereby unifying the data obtained from the cloud computing system into a general data format, standardizing the format of the data obtained from the cloud computing system, and avoiding different data formats obtained from different cloud computing systems, which leads to compatibility and data interoperability problems.

[0102] By adding data standardization components, unified data transmission can be achieved for all functional components in the cloud computing system. Therefore, no matter how a cloud computing vendor expands or redevelops the cloud computing system using Open Stack, or how complex the logical design of the functional components of the cloud computing system (such as Nova, cinder, etc.) is, and whether the complex engineering business design is implemented according to standards, it can be output and stored in a standardized format to facilitate users to use the standardized data.

[0103] Based on the same concept, an apparatus for acquiring data is provided in an embodiment of the present application. The apparatus is applied to a data standardization component provided with at least one application programming interface, and establishes a communication connection with a target cloud computing system, such as Figure 5 As shown, the device mainly includes:

[0104] A first acquisition module 501 is used to acquire a general data read instruction input through a target application programming interface; the target application programming interface belongs to the at least one application programming interface;

[0105] A second acquisition module 502 is used to acquire a target functional component corresponding to the target application programming interface and a universal data format corresponding to the target application programming interface; the target functional component belongs to at least one functional component of the target cloud computing system;

[0106] The reading module 503 is used to read the target data from the storage data of the target functional component according to the general data reading instruction; and convert the target data into the general data format corresponding to the target functional component;

[0107] The conversion module 504 is used to output the data converted into a universal data format through the target application programming interface.

[0108] Based on the same concept, a data standardization component 600 is provided in an embodiment of the present application, such as Figure 6 As shown, the data standardization component includes a data processing unit 601, a data conversion unit 602, a data storage unit 603 and a standard data input / output unit 604, specifically:

[0109] The standard data input / output unit 604 may specifically be a plurality of application programming interfaces, any of which is used to obtain a general data reading instruction inputted from the outside;

[0110] The data processing unit 601 is used to obtain the universal data read instruction input through the target application programming interface in the standard data input / output unit 604, obtain the target functional component corresponding to the target application programming interface, and the universal data format corresponding to the target application programming interface; after reading the target data from the target functional component according to the universal data read instruction, transmit the target data and the identifier of the universal data format to the data conversion unit 602;

[0111] The data conversion unit 602 is used to convert the read target data into a common data format corresponding to the target functional component; and output it to the user through the target application programming interface of the standard data input / output unit 604;

[0112] The data processing unit 601 is also used to transmit the data in the universal data format converted by the data conversion unit 602 to the data storage unit 603 for storage.

[0113] Among them, the data processing unit 601 establishes a communication connection through the API interfaces of each functional component of the cloud computing system. For example, the data processing unit is respectively connected to the API interfaces of the Nova component, cinder component, neutron component, etc. of the cloud computing system. After determining the target functional component, the data processing unit 601 obtains the target data from the target functional component through the API interface of the target functional component.

[0114] Based on the same concept, a cloud computing system is provided in the embodiment of the present application, such as Figure 7 As shown, the cloud computing system 700 includes a data standardization component 701 and at least one functional component. The data standardization component is used to implement the method for obtaining data described in the above method embodiment.

[0115] In an exemplary embodiment, Figure 8 As shown, data standardization component 1 (component named standardDATA) is integrated in cloud computing system a, and data standardization component 2 (component named standardDATA) is integrated in cloud computing system b. Data standardization component 1 is connected to the API interface of each functional component in cloud computing system a, and data standardization component 2 is connected to the API interface of each functional component in cloud computing system b. Tenant A rents cloud computing system a and cloud computing system b at the same time. If tenant A wants to extract data of functional components in cloud computing system a, he can call the cloud server list information of tenant A on cloud computing system a through the getUserCloudServerList interface, and pass in the parameters corresponding to cloud computing system a and the target functional component. Similarly, if tenant A wants to extract data of functional components in cloud computing system b, he only needs to adjust the passed-in parameters to the parameters corresponding to cloud computing system b and the target functional component, and keep the rest unchanged, thereby reducing the difficulty of connecting multiple cloud computing systems.

[0116] Specifically, the process of obtaining data from cloud computing system a is as follows: tenant A outputs a general data read instruction to the data processing unit through the target application programming interface of the standard data input / output unit in cloud computing system a, and the data processing unit obtains the target data (such as disk ID, data length and other related data) from the target functional component (such as cinder component) corresponding to the target application programming interface, and the data conversion unit converts the target data into a general data format (such as a standard restful interface format) corresponding to the target functional component, and outputs it to tenant A through the target application programming interface of the standard data input / output unit. At this point, tenant A obtains the data in the target functional component in cloud computing system a. Many fixed interface specifications and calling APIs are defined in the data standardization component. According to the target functional component that needs to obtain data, the corresponding interface specifications and APIs can be called. For example, if it is necessary to extract Nova data in cloud computing system a, the interface name and parameters of the Nova component in the cloud computing system can be directly replaced.

[0117] Using a similar process, tenant A obtains data from the target functional component in cloud computing system b.

[0118] Since tenant A obtains data from functional components with the same functions in cloud computing system a and cloud computing system b in a common data format, that is, the same data format is used, multiple cloud computing systems are connected. In addition, data reception management of each component in the cloud computing system is realized, and the data of each component in the cloud computing system is uniformly managed and standardized, which facilitates unified data management or processing for different cloud vendors.

[0119] It should be noted that in the embodiments of the present application, the data standardization components can be processed into plug-ins, modularization, etc. as needed.

[0120] Based on the same concept, an electronic device is also provided in the embodiment of the present application, such as Fig. 9 As shown, the electronic device mainly includes: a processor 901, a memory 902 and a communication bus 903, wherein the processor 901 and the memory 902 communicate with each other through the communication bus 903. The memory 902 stores a program that can be executed by the processor 901, and the processor 901 executes the program stored in the memory 902 to implement the following steps:

[0121] Obtaining a general data read instruction input through a target application programming interface; the target application programming interface belongs to the at least one application programming interface;

[0122] Acquire a target functional component corresponding to the target application programming interface and a universal data format corresponding to the target application programming interface; the target functional component belongs to at least one functional component of the target cloud computing system;

[0123] Reading target data from the storage data of the target functional component according to the universal data reading instruction; and converting the target data into a universal data format corresponding to the target functional component;

[0124] The data converted into a common data format is outputted through the target application programming interface.

[0125] The communication bus 903 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 903 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0126] The memory 902 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Alternatively, the memory may also be at least one storage device located away from the processor 901.

[0127] The above-mentioned processor 901 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc., and can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0128] In another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed on a computer, the computer executes the method for acquiring data described in the above embodiment.

[0129] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instruction is transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape, etc.), an optical medium (e.g., a DVD) or a semiconductor medium (e.g., a solid-state hard disk), etc.

[0130] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0131] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for acquiring data, characterized in that: The method is applied to a data standardization component provided with at least one application programming interface, wherein the data standardization component establishes a communication connection with a target cloud computing system, and comprises: Obtaining a general data read instruction input through a target application programming interface; the target application programming interface belongs to the at least one application programming interface; Acquire a target functional component corresponding to the target application programming interface and a universal data format corresponding to the target application programming interface; the target functional component belongs to at least one functional component of the target cloud computing system; Reading target data from the storage data of the target functional component according to the universal data reading instruction; and converting the target data into a universal data format corresponding to the target functional component; Outputting the data converted into a common data format through the target application programming interface; The target functional component includes a computing component, and the target data includes at least one of virtual machine creation data, running data, suspension data, scheduling data, shutdown data and destruction data; or, the target functional component includes an image component, and the target data includes at least one of image creation data, update data and viewing data; or, the target functional component includes a block storage component, and the target data includes at least one of block device creation data, query data, deletion data, uninstallation data, mount data and backup data; or, the target functional component includes a network virtualization component, and the target data includes network parameter configuration data.

2. The method for acquiring data according to claim 1, characterized in that: The obtaining of the target functional component corresponding to the target application programming interface and the universal data format corresponding to the target application programming interface includes: From the pre-configured mapping relationship of the target cloud computing system, the target functional component corresponding to the target application programming interface and the universal data format corresponding to the target application programming interface are extracted; wherein the mapping relationship among the application programming interface, the functional component and the universal data format is stored in the mapping relationship.

3. The method for acquiring data according to claim 2, characterized in that: The application programming interfaces corresponding to any two functional components in the mapping relationship are different.

4. The method for acquiring data according to claim 1, characterized in that: The data converted into a common data format through the target application programming interface output includes: Acquire the storage space corresponding to the target functional component, and store the data in the universal data format into the storage space through the target application programming interface; wherein components with the same function correspond to the same storage space.

5. The method for acquiring data according to claim 1, characterized in that: Before acquiring the general data read instruction input through the target application programming interface, the method further includes: Acquire at least two cloud computing systems that are communicatively connected to the data standardization component; Selecting the target cloud computing system from the at least two cloud computing systems; and selecting the target functional component from the functional components of the target cloud computing system, and obtaining a target application programming interface corresponding to the target functional component; Acquiring data reading parameters, wherein the data reading parameters include an access address of the target cloud computing system; The data reading parameter is written into a universal data format corresponding to the target application programming interface to obtain the universal data reading instruction.

6. The method for acquiring data according to claim 5, characterized in that: Selecting the target cloud computing system from the at least two cloud computing systems; And selecting the target functional component from the functional components of the target cloud computing system, and obtaining a target application programming interface corresponding to the target functional component, including: displaying a first selection control for each of the at least two cloud computing systems; Determining the selected target cloud computing system based on a click operation on the first selection control; Displaying a second selection control for each functional component in the target cloud computing system; Based on the click operation on the second selection control, the selected target functional component is determined, an identifier of a target application programming interface corresponding to the target functional component is obtained, and the target application programming interface is called.

7. A device for acquiring data, characterized in that: A data standardization component provided with at least one application programming interface is used to establish a communication connection with a target cloud computing system; comprising: A first acquisition module, configured to acquire a general data read instruction inputted through a target application programming interface; the target application programming interface belongs to the at least one application programming interface; A second acquisition module is used to acquire a target functional component corresponding to the target application programming interface and a universal data format corresponding to the target application programming interface; the target functional component belongs to at least one functional component of the target cloud computing system; A reading module, configured to read target data from the storage data of the target functional component according to the general data reading instruction; and convert the target data into a general data format corresponding to the target functional component; A conversion module, used for outputting data converted into a common data format through the target application programming interface; The target functional component includes a computing component, and the target data includes at least one of virtual machine creation data, running data, suspension data, scheduling data, shutdown data and destruction data; or, the target functional component includes an image component, and the target data includes at least one of image creation data, update data and viewing data; or, the target functional component includes a block storage component, and the target data includes at least one of block device creation data, query data, deletion data, uninstallation data, mount data and backup data; or, the target functional component includes a network virtualization component, and the target data includes network parameter configuration data.

8. A cloud computing system, characterized in that: including a data normalization component and at least one functional component; The data standardization component is used to implement the method for acquiring data as described in any one of claims 1 to 6.

9. An electronic device, characterized in that: include: A processor, a memory and a communication bus, wherein the processor and the memory communicate with each other via the communication bus; The memory is used to store computer programs; The processor is used to execute the program stored in the memory to implement the method for acquiring data as described in any one of claims 1 to 6.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for acquiring data according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Programmable component management and control method and device

    CN113467839A

  • User-Initiated Dynamic Data Application Programming Interface Creation

    US20190114181A1