CN111125232A - Method and device for accessing public cloud asset information - Google Patents

Method and device for accessing public cloud asset information Download PDF

Info

Publication number
CN111125232A
CN111125232A CN201911419701.8A CN201911419701A CN111125232A CN 111125232 A CN111125232 A CN 111125232A CN 201911419701 A CN201911419701 A CN 201911419701A CN 111125232 A CN111125232 A CN 111125232A
Authority
CN
China
Prior art keywords
asset information
cloud
type
target
field name
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.)
Pending
Application number
CN201911419701.8A
Other languages
Chinese (zh)
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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201911419701.8A priority Critical patent/CN111125232A/en
Publication of CN111125232A publication Critical patent/CN111125232A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/256Integrating or interfacing systems involving database management systems in federated or virtual databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a method and a device for accessing public cloud asset information. The method comprises the following steps: acquiring asset information of a plurality of cloud platforms according to the asset information type; the asset information comprises a plurality of cloud field names and cloud field content corresponding to each cloud field name; determining an asset information type table corresponding to the asset information according to the asset information type to which the asset information belongs; storing the cloud field content of the asset information in a corresponding asset information type table according to a preset field name mapping table; in the preset field name mapping table, each abstract field name corresponds to one cloud field name in the same asset information type of each cloud platform. According to the scheme, the asset information of different public cloud manufacturers can be accessed in a unified mode, the cloud fields in the asset information of the same asset information type of the different public cloud manufacturers are abstracted into the same field and then stored in an information table, and the asset information can be conveniently managed subsequently.

Description

Method and device for accessing public cloud asset information
Technical Field
The invention relates to the field of public cloud data access, in particular to a method and a device for accessing public cloud asset information.
Background
With the development of cloud computing technology, hybrid cloud architecture has become a main mode of cloud computing technology in recent years. The hybrid cloud combines the public cloud and the private cloud, so that an enterprise can store sensitive data in the private cloud and use computing resources of the public cloud, and the purposes of saving cost and improving computing capacity are achieved.
There are currently many manufacturers of public clouds, such as Baidu clouds, Ariyun clouds, Mount-Ilk clouds, etc. At present, when an enterprise builds a hybrid cloud architecture, multiple public clouds are generally selected simultaneously, so that a price advantage can be obtained, and the influence on an online service due to cloud faults of a certain public can be avoided. When manufacturers with multiple public clouds are adopted, the asset information of the cloud platform corresponding to each public cloud manufacturer needs to be acquired for convenient management. And all asset information of a public cloud manufacturer is stored by adopting a data table.
However, because the field names in different types of asset information have large differences, when one data table is used for storing multiple types of asset information, the number of the field names involved in the data table is very large, and when the asset information is managed subsequently, if some field names in the data table need to be inquired, the time consumption is long, and the management efficiency is low.
Disclosure of Invention
The embodiment of the invention provides a method and a device for accessing public cloud asset information, and aims to solve the problems of slow query and low management efficiency in asset information management in the prior art under the condition that all asset information of a public cloud manufacturer is stored by a data table.
In a first aspect of the present invention, there is provided a method for accessing public cloud asset information, the method including:
acquiring asset information of a plurality of cloud platforms according to the asset information type; wherein the asset information comprises a plurality of cloud field names and cloud field content corresponding to each cloud field name;
determining an asset information type table corresponding to the asset information according to the asset information type to which the asset information belongs; wherein, the asset information belonging to the same asset information type corresponds to an asset information type table;
storing the cloud field content of the asset information in a corresponding asset information type table according to a preset field name mapping table; the asset information type table comprises a plurality of abstract field names, and in the preset field name mapping table, each abstract field name corresponds to one cloud field name in the asset information of the same asset information type of each cloud platform.
Optionally, the step of obtaining the asset information of the plurality of cloud platforms according to the asset information type includes:
creating a plurality of timing tasks; wherein each timing task corresponds to a different synchronization task;
triggering a synchronous task corresponding to the timing task when the timing task reaches a preset execution time;
and acquiring the asset information of the plurality of cloud platforms according to the triggered synchronous task.
Optionally, the step of acquiring asset information of a plurality of cloud platforms according to the triggered synchronization task includes:
acquiring identifications of a plurality of cloud platforms configured in the triggered synchronous task and target types of asset information;
determining a plurality of target adapters according to the identification and the target type; target interface information is set in the target adapter, and the target interface information is interface information for acquiring the asset information of the target type in the cloud platform indicated by the identification;
and calling the target adapter to acquire the asset information of the target type from the cloud platform.
Optionally, each target adapter further comprises: an asset information type of the asset information that can be obtained and an identification of a cloud platform to which the asset information that can be obtained belongs.
Optionally, the plurality of cloud platforms are cloud platforms of a plurality of same or different public cloud manufacturers.
In a second aspect of the present invention, there is also provided an apparatus for accessing public cloud asset information, the apparatus including:
the unified access module is used for acquiring the asset information of the plurality of cloud platforms according to the asset information type; wherein the asset information comprises a plurality of cloud field names and cloud field content corresponding to each cloud field name;
the determining module is used for determining an asset information type table corresponding to the asset information according to the asset information type to which the asset information belongs; wherein, the asset information belonging to the same asset information type corresponds to an asset information type table;
the unified storage module is used for storing the cloud field content of the asset information into a corresponding asset information type table according to a preset field name mapping table; the asset information type table comprises a plurality of abstract field names, and in the preset field name mapping table, each abstract field name corresponds to one cloud field name in the asset information of the same asset information type of each cloud platform.
Optionally, the unified access module includes:
a timing task unit for creating a plurality of timing tasks; wherein each timing task corresponds to a different synchronization task;
the synchronous task unit is used for triggering a synchronous task corresponding to the timing task when the timing task reaches a preset execution time;
and the acquisition unit is used for acquiring the asset information of the cloud platforms according to the triggered synchronous task.
Optionally, the obtaining unit includes:
a first adaptor unit, configured to obtain identifiers of a plurality of cloud platforms configured in the triggered synchronization task and a target type of asset information;
the second adapter sub-unit is used for determining a plurality of target adapters according to the identification and the target type; target interface information is set in the target adapter, and the target interface information is interface information for acquiring the asset information of the target type in the cloud platform indicated by the identification;
and the third adapter subunit is used for calling the target adapter to acquire the asset information of the target type from the cloud platform.
Optionally, each target adapter further comprises: an asset information type of the asset information that can be obtained and an identification of a cloud platform to which the asset information that can be obtained belongs.
Optionally, the plurality of cloud platforms are cloud platforms of a plurality of same or different public cloud manufacturers.
In a third aspect of the present invention, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of the public cloud asset information access method when executing the program stored in the memory.
In a fourth aspect implemented by the present invention, there is also provided a computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing the method for public cloud asset information access as described in any one of the first aspect.
In a fifth aspect of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the above-described method of public cloud asset information access.
Aiming at the prior art, the invention has the following advantages:
the asset information of a plurality of cloud platforms can be obtained according to the asset information type; the asset information comprises a plurality of cloud field names and cloud field contents corresponding to each cloud field name; therefore, the asset information of the cloud platforms of a plurality of public cloud manufacturers can be accessed in a unified mode. Then according to the asset information type to which the asset information belongs, determining an asset information type table corresponding to the asset information; wherein, the asset information belonging to the same asset information type corresponds to an asset information type table; storing the cloud field content of the asset information in a corresponding asset information type table according to a preset field name mapping table; the asset information type table comprises a plurality of abstract field names, and in a preset field name mapping table, each abstract field name corresponds to one cloud field name in the asset information of the same asset information type of each cloud platform. The asset information of the same asset information type of the cloud platforms can be stored in the same asset information type table; meanwhile, the cloud field names of the asset information respectively belonging to the cloud platforms correspond to the same abstract field name, so that the related field names are fewer under the condition that the asset information of the same asset information type of the cloud platforms is stored in the asset information type table. And then when the asset information is managed in a subsequent unified way, the inquiry time of the asset information can be shortened, so that the management efficiency is improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flowchart illustrating steps of a method for accessing public cloud asset information according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating steps of another method for accessing public cloud asset information according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating steps of another method for accessing public cloud asset information according to an embodiment of the present invention;
FIG. 4 is a first architecture diagram of a method for applying public cloud asset information access in accordance with an embodiment of the present invention;
FIG. 5 is a second architecture diagram of a method for applying public cloud asset information access in accordance with an embodiment of the present invention;
fig. 6 is a block diagram of an apparatus for accessing public cloud asset information according to an embodiment of the present invention;
fig. 7 is a block diagram of another apparatus for public cloud asset information access according to an embodiment of the present invention;
fig. 8 is a block diagram of an electronic device provided in an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Fig. 1 is a flowchart of steps of a method for accessing public cloud asset information according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
step 101, acquiring asset information of a plurality of cloud platforms according to asset information types.
It should be noted that public cloud vendors include: baidu cloud, Aliyun, Jinshan cloud, etc. Each public cloud vendor has its own cloud platform to provide cloud services. The asset information is the asset information of a cloud platform corresponding to a public cloud manufacturer; typically, the asset information is stored in the form of fields, and thus the asset information includes a plurality of cloud field names and cloud field contents corresponding to each cloud field name.
And 102, determining an asset information type table corresponding to the asset information according to the asset information type to which the asset information belongs.
It should be noted that, when acquiring the asset information, the asset information type is determined according to the asset information. The acquired asset information is therefore asset information of a known asset information type. Preferably, after the asset information is acquired, a type identifier for distinguishing the type of the asset information may be added to the asset information.
The asset information belonging to the same asset information type corresponds to an asset information type table; namely, the number of the asset information type tables is multiple, and each asset information type table corresponds to one asset information type. For example, the asset information types include a load balancing type, a cloud disk type, an object storage type, and an elastic public network type, and the asset information type table includes: the system comprises a first asset information type table corresponding to asset information belonging to a load balancing type, a second asset information type table corresponding to asset information belonging to a cloud disk type, a third asset information type table corresponding to asset information belonging to an object storage type and a fourth asset information type table corresponding to asset information belonging to an elastic public network type.
Step 103: and storing the cloud field content of the asset information in a corresponding asset information type table according to a preset field name mapping table.
It should be noted that each asset information type corresponds to a different asset information type table. Therefore, when the asset information is stored, the asset information is stored in the asset information type table corresponding to the asset information type to which the asset information belongs.
The asset information type table comprises a plurality of abstract field names, and in the preset field name mapping table, each abstract field name corresponds to one cloud field name in the asset information of the same asset information type of each cloud platform. Preferably, the cloud field names corresponding to the cloud field contents having the same meaning in the asset information of the same asset information type of the plurality of cloud platforms correspond to the same abstract field name.
An asset information type table and a field name mapping table can be created in advance for asset information of the same asset information type, for example, when a corresponding first asset information type table is created for asset information of a load balancing type, cloud field names respectively corresponding to cloud field contents with the same meaning in the asset information of the load balancing type on different cloud platforms are determined, so that a plurality of cloud field names are obtained, wherein each cloud field name corresponds to one cloud platform; and then abstracting the obtained plurality of cloud field names into an abstract field name according to a preset rule. In this way, a plurality of abstract field names will be obtained. And establishing a mapping relation between a plurality of cloud field names and abstract field names formed by the cloud field names in the field name mapping table. And taking the obtained abstract field name as the field name of the asset information type table, thereby obtaining the created asset information type table. When the asset information of the load balancing type is stored, a field name mapping table is inquired, and the field content of a target cloud in the asset information is stored in the field content corresponding to the name of the target abstract field; the cloud field name corresponding to the target cloud field content has a mapping relation with the target abstract field name in the field name mapping table. In this way, cloud field content having multiple identical meanings may be stored in the same field of the asset information type table.
In the embodiment of the invention, the asset information of a plurality of cloud platforms can be obtained according to the asset information type; the asset information comprises a plurality of cloud field names and cloud field contents corresponding to each cloud field name; therefore, the asset information of the cloud platforms of a plurality of public cloud manufacturers can be accessed in a unified mode. Then according to the asset information type to which the asset information belongs, determining an asset information type table corresponding to the asset information; wherein, the asset information belonging to the same asset information type corresponds to an asset information type table; storing the cloud field content of the asset information in a corresponding asset information type table according to a preset field name mapping table; the asset information type table comprises a plurality of abstract field names, and in a preset field name mapping table, each abstract field name corresponds to one cloud field name in the asset information of the same asset information type of each cloud platform. The asset information of the same asset information type of the cloud platforms can be stored in the same asset information type table; meanwhile, the cloud field names of the asset information respectively belonging to the cloud platforms correspond to the same abstract field name, so that the related field names are fewer under the condition that the asset information of the same asset information type of the cloud platforms is stored in the asset information type table. And then when the asset information is managed in a subsequent unified way, the inquiry time of the asset information can be shortened, so that the management efficiency is improved.
Fig. 2 is a flowchart of steps of another method for accessing public cloud asset information according to an embodiment of the present invention, and as shown in fig. 2, the method may include:
step 201, creating a plurality of timing tasks.
It should be noted that each timing task corresponds to a different synchronization task; preferably, the number of timed tasks is the same as the number of asset information types.
Step 202, when the timing task reaches the preset execution time, triggering the synchronization task corresponding to the timing task.
It should be noted that each timing task is configured with an execution time in advance, and the execution time may be a periodic time, for example, a certain time of day.
And 203, acquiring asset information of a plurality of cloud platforms according to the triggered synchronous tasks.
It should be noted that the plurality of cloud platforms are cloud platforms of a plurality of same or different public cloud vendors. Public cloud vendors include: baidu cloud, Aliyun, Jinshan cloud, etc. Each public cloud vendor has its own cloud platform to provide cloud services. The asset information is the asset information of a cloud platform corresponding to a public cloud manufacturer; and each public cloud manufacturer divides the corresponding asset information into a plurality of fixed types. Preferably, the asset information types include: a Load Balance (LB) type, a cloud DISK (DISK) type, an Object Storage Service (OSS) type, and an Elastic IP Address (EIP) type. Typically, the asset information is stored in the form of fields, and thus the asset information includes a plurality of cloud field names and cloud field contents corresponding to each cloud field name. Preferably, the cloud field names in the asset information of the same asset information type acquired by each cloud platform are the same in number, and the number is a target preset value; in the asset information of the same asset information type, the cloud field content of the target preset value group exists; any group comprises a plurality of cloud field contents with the same meaning, and the plurality of cloud field contents are respectively located in the asset information of different cloud platforms.
And 204, determining an asset information type table corresponding to the asset information according to the asset information type to which the asset information belongs.
It should be noted that, when acquiring the asset information, the asset information type is determined according to the asset information. The acquired asset information is therefore asset information of a known asset information type. Preferably, after the asset information is acquired, a type identifier for distinguishing the type of the asset information may be added to the asset information.
The asset information belonging to the same asset information type corresponds to an asset information type table; namely, the number of the asset information type tables is multiple, and each asset information type table corresponds to one asset information type. For example, the asset information types include a load balancing type, a cloud disk type, an object storage type, and an elastic public network type, and the asset information type table includes: the system comprises a first asset information type table corresponding to asset information belonging to a load balancing type, a second asset information type table corresponding to asset information belonging to a cloud disk type, a third asset information type table corresponding to asset information belonging to an object storage type and a fourth asset information type table corresponding to asset information belonging to an elastic public network type.
Preferably, the table name of the first asset information type table is mco _ lb _ info. The table name of the fourth asset information type table is mco _ eip _ info.
mco _ eip _ info has the following structure:
CREATE TABLE`mco_eip_info`(
`id`int(11)NOT NULL AUTO_INCREMENT,
`eip_name`varchar(200)NOT NULL,
`eip_type`varchar(50)NOT NULL COMMENT'normal,shared',
`status`varchar(50)NOT NULL,
`vendor`varchar(200)NOT NULL COMMENT'baidu',
`ip_addr`varchar(100)NOT NULL,
`band_width`int(8)NOT NULL,
`description`varchar(500)DEFAULT NULL,
`payment_type`varchar(100)DEFAULT NULL COMMENT'PostPaid',
`expire_time`datetime DEFAULT NULL,
`create_time`datetime NOT NULL,
`update_time`datetime NOT NULL,
`payment_time`datetime DEFAULT NULL,
`payment_sub_type`varchar(100)DEFAULT NULL,
`payment_period`double(15,5)DEFAULT NULL,
`location`varchar(100)DEFAULT NULL,
PRIMARY KEY(`id`)
)ENGINE=InnoDB AUTO_INCREMENT=7DEFAULT CHARSET=utf8
mco _ lb _ info has the following structure:
CREATE TABLE`mco_lb_info`(
`id`int(11)NOT NULL AUTO_INCREMENT,
`lb_id`varchar(200)NOT NULL,
`lb_name`varchar(200)NOT NULL,
`lb_type`varchar(50)DEFAULT NULL COMMENT'normal',
`status`varchar(50)NOT NULL,
`vendor`varchar(200)NOT NULL COMMENT'baidu',
`description`varchar(500)DEFAULT NULL,
`payment_type`varchar(100)DEFAULT NULL COMMENT'PostPaid',
`expire_time`datetime DEFAULT NULL,
`create_time`datetime NOT NULL,
`update_time`datetime NOT NULL,
`payment_time`datetime DEFAULT NULL,
`payment_sub_type`varchar(100)DEFAULT NULL,
`payment_period`double(15,5)DEFAULT NULL,
PRIMARY KEY(`id`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8
step 205: and storing the cloud field content of the asset information in a corresponding asset information type table according to a preset field name mapping table.
It should be noted that each asset information type corresponds to a different asset information type table. Therefore, when the asset information is stored, the asset information is stored in the asset information type table corresponding to the asset information type to which the asset information belongs.
The asset information type table comprises a plurality of abstract field names, and in the preset field name mapping table, each abstract field name corresponds to one cloud field name in the asset information of the same asset information type of each cloud platform. Preferably, the cloud field names corresponding to the cloud field contents having the same meaning in the asset information of the same asset information type of the plurality of cloud platforms correspond to the same abstract field name. Compared with the prior art, the method has the advantages that the existing storage table is obtained after the asset information of all asset information types of one cloud platform is stored by one information table; in the embodiment of the invention, the number of the field names in the asset information type table storing the asset information of the same asset information type is less. The number of field names in the existing storage table is the sum of the number of field names of asset information of all asset information types. The number of the field names in the asset information type table in the embodiment of the invention is only the number of the field names of the asset information of one asset information type. In order to distinguish different public cloud manufacturers, preferably, the asset information type table includes abstract field names and identification fields for distinguishing different cloud manufacturers. And after the data information corresponding to the abstract field name is determined, determining the public cloud manufacturer according to the identification field.
An asset information type table and a field name mapping table can be created in advance for asset information of the same asset information type, for example, when a corresponding first asset information type table is created for asset information of a load balancing type, cloud field names respectively corresponding to cloud field contents with the same meaning in the asset information of the load balancing type on different cloud platforms are determined, so that a plurality of cloud field names are obtained, wherein each cloud field name corresponds to one cloud platform; and then abstracting the obtained plurality of cloud field names into an abstract field name according to a preset rule. In this way, a plurality of abstract field names will be obtained. And establishing a mapping relation between a plurality of cloud field names and abstract field names formed by the cloud field names in the field name mapping table. And taking the obtained abstract field name as the field name of the asset information type table, thereby obtaining the created asset information type table. When the asset information of the load balancing type is stored, a field name mapping table is inquired, and the field content of a target cloud in the asset information is stored in the field content corresponding to the name of the target abstract field; the cloud field name corresponding to the target cloud field content has a mapping relation with the target abstract field name in the field name mapping table. In this way, cloud field content having multiple identical meanings may be stored in the same field of the asset information type table.
To further clarify the relationship between the cloud field name and the abstract field name in asset information of the same asset information type. For example, the asset information of the load balancing type of the Baidu cloud includes a cloud field name "A", and the corresponding cloud field content is an asset id. The alliun load balancing type asset information comprises a cloud field name 'B', and the corresponding cloud field content is an asset id. Since the cloud field content corresponding to "a" has the same meaning as the cloud field content corresponding to "B", both represent asset ids. Therefore, when the field name mapping table is established, the cloud field names "a" and "B" are both mapped to the abstract field name "LB _ AB", where the abstract field name may be related to "a" or "B" or unrelated, as long as it is ensured that the two cloud field names are mapped to the same abstract field name. That is, the names of the cloud fields corresponding to the cloud field contents with the same meaning are mapped to the same abstract field name.
In the embodiment of the invention, the asset information of a plurality of cloud platforms can be obtained according to the asset information type; the asset information comprises a plurality of cloud field names and cloud field contents corresponding to each cloud field name; therefore, the asset information of the cloud platforms of a plurality of public cloud manufacturers can be accessed in a unified mode. Then according to the asset information type to which the asset information belongs, determining an asset information type table corresponding to the asset information; wherein, the asset information belonging to the same asset information type corresponds to an asset information type table; storing the cloud field content of the asset information in a corresponding asset information type table according to a preset field name mapping table; the asset information type table comprises a plurality of abstract field names, and in a preset field name mapping table, each abstract field name corresponds to one cloud field name in the asset information of the same asset information type of each cloud platform. The asset information of the same asset information type of the cloud platforms can be stored in the same asset information type table; meanwhile, the cloud field names of the asset information respectively belonging to the cloud platforms correspond to the same abstract field name, so that the related field names are fewer under the condition that the asset information of the same asset information type of the cloud platforms is stored in the asset information type table. And then when the asset information is managed in a subsequent unified way, the inquiry time of the asset information can be shortened, so that the management efficiency is improved.
Fig. 3 is a flowchart of steps of another method for accessing public cloud asset information according to an embodiment of the present invention, and as shown in fig. 3, the method may include:
step 301, creating a plurality of timing tasks;
it should be noted that each timing task corresponds to a different synchronization task; preferably, the number of timed tasks is the same as the number of asset information types.
Step 302, when the timing task reaches the preset execution time, triggering the synchronization task corresponding to the timing task.
It should be noted that each timed task is configured with an execution time in advance, and the execution time is preferably a period of time, and may be a certain time of day, for example.
And step 303, acquiring the identifications of the cloud platforms configured in the triggered synchronization task and the target type of the asset information.
It should be noted that different target types may be configured in each synchronization task, such that when a synchronization task is triggered, asset information of only one asset information type is obtained. Identifiers of a plurality of cloud platforms can be configured in each synchronization task, namely, the target type asset information is respectively obtained from the cloud platforms.
Step 304, determining a plurality of target adapters according to the identification and the target type.
It should be noted that each target adapter further comprises: an asset information type of the asset information that can be obtained and an identification of a cloud platform to which the asset information that can be obtained belongs. Target interface information is set in the target adapter, and the target interface information is interface information for acquiring asset information of a target type in the cloud platform indicated by the identification. The interface information may be an interface name, but is not limited thereto. The asset information may be obtained by using an adaptation principle, so that a plurality of adapters are generated in advance, and each adapter is provided with interface information of one type of asset information. Since each adapter can only acquire asset information of one asset information type of one cloud platform, the number of adapters needs to be determined according to the number of cloud platforms and the number of asset information types. For example, asset information of a load balancing type of a hundredth cloud, asset information of a cloud disk type, asset information of a load balancing type of an aristoloc cloud, and asset information of a cloud disk type need to be acquired, at this time, at least 4 adapters need to be preset, where a first adapter is used to acquire asset information of a load balancing type of a hundredth cloud, a second adapter is used to acquire asset information of a cloud disk type of a hundredth cloud, a third adapter is used to acquire asset information of a load balancing type of an aristoloc cloud, and a fourth adapter is used to acquire asset information of a cloud disk type of an aristoloc cloud, and the 4 adapters are target adapters.
And 305, calling the target adapter to acquire the asset information of the target type from the cloud platform.
And step 306, determining an asset information type table corresponding to the asset information according to the asset information type to which the asset information belongs.
It should be noted that, when acquiring the asset information, the asset information type is determined according to the asset information. The acquired asset information is therefore asset information of a known asset information type. Preferably, after the asset information is acquired, a type identifier for distinguishing the type of the asset information may be added to the asset information.
The asset information belonging to the same asset information type corresponds to an asset information type table; namely, the number of the asset information type tables is multiple, and each asset information type table corresponds to one asset information type. For example, the asset information types include a load balancing type, a cloud disk type, an object storage type, and an elastic public network type, and the asset information type table includes: the system comprises a first asset information type table corresponding to asset information belonging to a load balancing type, a second asset information type table corresponding to asset information belonging to a cloud disk type, a third asset information type table corresponding to asset information belonging to an object storage type and a fourth asset information type table corresponding to asset information belonging to an elastic public network type.
Preferably, the table name of the first asset information type table is mco _ lb _ info. The table name of the fourth asset information type table is mco _ eip _ info.
mco _ eip _ info has the following structure:
CREATE TABLE`mco_eip_info`(
`id`int(11)NOT NULL AUTO_INCREMENT,
`eip_name`varchar(200)NOT NULL,
`eip_type`varchar(50)NOT NULL COMMENT'normal,shared',
`status`varchar(50)NOT NULL,
`vendor`varchar(200)NOT NULL COMMENT'baidu',
`ip_addr`varchar(100)NOT NULL,
`band_width`int(8)NOT NULL,
`description`varchar(500)DEFAULTNULL,
`payment_type`varchar(100)DEFAULT NULL COMMENT'PostPaid',
`expire_time`datetime DEFAULT NULL,
`create_time`datetime NOT NULL,
`update_time`datetime NOT NULL,
`payment_time`datetime DEFAULT NULL,
`payment_sub_type`varchar(100)DEFAULT NULL,
`payment_period`double(15,5)DEFAULT NULL,
`location`varchar(100)DEFAULT NULL,
PRIMARY KEY(`id`)
)ENGINE=InnoDB AUTO_INCREMENT=7DEFAULT CHARSET=utf8
mco _ lb _ info has the following structure:
CREATE TABLE`mco_lb_info`(
`id`int(11)NOT NULL AUTO_INCREMENT,
`lb_id`varchar(200)NOT NULL,
`lb_name`varchar(200)NOT NULL,
`lb_type`varchar(50)DEFAULT NULL COMMENT'normal',
`status`varchar(50)NOT NULL,
`vendor`varchar(200)NOT NULL COMMENT'baidu',
`description`varchar(500)DEFAULT NULL,
`payment_type`varchar(100)DEFAULT NULL COMMENT'PostPaid',
`expire_time`datetime DEFAULT NULL,
`create_time`datetime NOT NULL,
`update_time`datetime NOT NULL,
`payment_time`datetime DEFAULT NULL,
`payment_sub_type`varchar(100)DEFAULT NULL,
`payment_period`double(15,5)DEFAULT NULL,
PRIMARY KEY(`id`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8
step 307: and storing the cloud field content of the asset information in a corresponding asset information type table according to a preset field name mapping table.
It should be noted that each asset information type corresponds to a different asset information type table. Therefore, when the asset information is stored, the asset information is stored in the asset information type table corresponding to the asset information type to which the asset information belongs.
The asset information type table comprises a plurality of abstract field names, and in the preset field name mapping table, each abstract field name corresponds to one cloud field name in the asset information of the same asset information type of each cloud platform. Preferably, the cloud field names corresponding to the cloud field contents having the same meaning in the asset information of the same asset information type of the plurality of cloud platforms correspond to the same abstract field name. Compared with the prior art, the method has the advantages that the existing storage table is obtained after the asset information of all asset information types of one cloud platform is stored by one information table; in the embodiment of the invention, the number of the field names in the asset information type table storing the asset information of the same asset information type is less. The number of field names in the existing storage table is the sum of the number of field names of asset information of all asset information types. The number of the field names in the asset information type table in the embodiment of the invention is only the number of the field names of the asset information of one asset information type. In order to distinguish different public cloud manufacturers, preferably, the asset information type table includes abstract field names and identification fields for distinguishing different cloud manufacturers. And after the data information corresponding to the abstract field name is determined, determining the public cloud manufacturer according to the identification field.
An asset information type table and a field name mapping table can be created in advance for asset information of the same asset information type, for example, when a corresponding first asset information type table is created for asset information of a load balancing type, cloud field names respectively corresponding to cloud field contents with the same meaning in the asset information of the load balancing type on different cloud platforms are determined, so that a plurality of cloud field names are obtained, wherein each cloud field name corresponds to one cloud platform; and then abstracting the obtained plurality of cloud field names into an abstract field name according to a preset rule. In this way, a plurality of abstract field names will be obtained. And establishing a mapping relation between a plurality of cloud field names and abstract field names formed by the cloud field names in the field name mapping table. And taking the obtained abstract field name as the field name of the asset information type table, thereby obtaining the created asset information type table. When the asset information of the load balancing type is stored, a field name mapping table is inquired, and the field content of a target cloud in the asset information is stored in the field content corresponding to the name of the target abstract field; the cloud field name corresponding to the target cloud field content has a mapping relation with the target abstract field name in the field name mapping table. In this way, cloud field content having multiple identical meanings may be stored in the same field of the asset information type table.
To further clarify the relationship between the cloud field name and the abstract field name in asset information of the same asset information type. For example, the asset information of the load balancing type of the Baidu cloud includes a cloud field name "A", and the corresponding cloud field content is an asset id. The alliun load balancing type asset information comprises a cloud field name 'B', and the corresponding cloud field content is an asset id. Since the cloud field content corresponding to "a" has the same meaning as the cloud field content corresponding to "B", both represent asset ids. Therefore, when the field name mapping table is established, the cloud field names "a" and "B" are both mapped to the abstract field name "LB _ AB", where the abstract field name may be related to "a" or "B" or unrelated, as long as it is ensured that the two cloud field names are mapped to the same abstract field name. That is, the names of the cloud fields corresponding to the cloud field contents with the same meaning are mapped to the same abstract field name.
In the embodiment of the invention, the asset information of a plurality of cloud platforms can be obtained according to the asset information type; the asset information comprises a plurality of cloud field names and cloud field contents corresponding to each cloud field name; therefore, the asset information of the cloud platforms of a plurality of public cloud manufacturers can be accessed in a unified mode. Then according to the asset information type to which the asset information belongs, determining an asset information type table corresponding to the asset information; wherein, the asset information belonging to the same asset information type corresponds to an asset information type table; storing the cloud field content of the asset information in a corresponding asset information type table according to a preset field name mapping table; the asset information type table comprises a plurality of abstract field names, and in a preset field name mapping table, each abstract field name corresponds to one cloud field name in the asset information of the same asset information type of each cloud platform. The asset information of the same asset information type of the cloud platforms can be stored in the same asset information type table; meanwhile, the cloud field names of the asset information respectively belonging to the cloud platforms correspond to the same abstract field name, so that the related field names are fewer under the condition that the asset information of the same asset information type of the cloud platforms is stored in the asset information type table. And then when the asset information is managed in a subsequent unified way, the inquiry time of the asset information can be shortened, so that the management efficiency is improved.
Fig. 4 is a first architecture diagram of a method for accessing public cloud asset information according to an embodiment of the present invention, where the first architecture diagram includes: a Jobs (task) layer, a Helpers (service) layer, an Adapters (Adapter) layer, and a DAOs (data Access) layer. The Jobs layer is responsible for scheduling and managing timing tasks, including: sync LB (synchronous load balancing), Sync Disk (synchronous cloud Disk), Sync Oss (synchronous object storage), Sync EIP (synchronous elastic public network) four timing tasks. When the Sync LB synchronization task is executed, asset information of load balancing types of different public cloud manufacturers can be obtained. When a Sync Disk synchronization task is executed, asset information of cloud Disk types of different public cloud manufacturers can be obtained. When the Sync Oss synchronization task is executed, asset information of object storage types of different public cloud manufacturers is obtained. When a Sync EIP synchronization task is executed, asset information of elastic public network types of different public cloud manufacturers can be obtained.
Specifically, the Jobs layer manages the timing task, and when the execution time of the timing task is reached, the Jobs layer uniformly calls an Interface Mco Helper Interface, namely a Sync (vendor, apiNamesMap), of the Helper layer abstraction, wherein the vendor identifies a public cloud manufacturer and is used for distinguishing different public cloud manufacturers; the apiNamesMap is a parameter mapping table required by the interface, thereby triggering different timing tasks. The Helper layer triggers different Helper class methods according to the triggered timing task. The Helper layer comprises four types of methods, namely LB Sync Helper (load balancing auxiliary class), DISK Sync Helper (cloud DISK auxiliary class), OSSSync Helper (object storage auxiliary class) and EIP Sync Helper (elastic public network auxiliary class). The Helper layer adapts to the related interfaces of different public clouds and different asset information by calling the Adapter Interface abstracted by the Adapter layer, namely, the Adapter mode is adopted to acquire the asset information from the related interfaces of the different asset information of the different public clouds through the unified Interface. The related interfaces such as BLB Apis related to load balancing type asset information, CDS Apis related to cloud disk type asset information, BOS Apis and KS3 Apis related to object storage type asset information, and EIP Apis related to elastic public network type asset information in the figure may acquire asset information of one asset information type according to a specific method of a triggered Helper class. And finally, storing the acquired asset information of the asset information type into a unified data table through a Persist interface of the DAOs layer. The number of the data tables is multiple, and the asset information needs to be accessed into the corresponding data tables according to the asset information types, wherein the LB type asset information corresponds to LB DAO, and the DISK type asset information corresponds to DISKDAO similarly; the asset information of the OSS type corresponds to OSSK DAO; the EIP type asset information corresponds to EIP DAO. The Interface Adapter Interface abstracted by the Adapter layer is exchange (vendor, apiName), wherein the apiName identifies the Interface name.
Fig. 5 is a second architecture diagram of a method for accessing public cloud asset information according to an embodiment of the present invention, where the method for accessing public cloud asset information includes:
acquiring asset information of a plurality of cloud platforms according to the asset information type; the asset information comprises a plurality of cloud field names and cloud field contents corresponding to each cloud field name;
determining an asset information type table corresponding to the asset information according to the asset information type to which the asset information belongs; wherein, the asset information belonging to the same asset information type corresponds to an asset information type table;
storing the cloud field content of the asset information in a corresponding asset information type table according to a preset field name mapping table; the asset information type table comprises a plurality of abstract field names, and in a preset field name mapping table, each abstract field name corresponds to one cloud field name in the asset information of the same asset information type of each cloud platform.
Referring to fig. 4 and 5, when asset information stored in the asset information type table is managed, the vendor fields identifying different public cloud vendors are used to uniformly manage the same kind of assets of different public cloud vendors. Taking the LB as an example, when an administrator of the LB needs to query the operating states of all LBs in the hundredth cloud, the operating state of each LB in the hundredth cloud can be found out only by specifying the vendor as the hundredth and finding out the status field of the corresponding LB. When the LB administrator needs to query the operating states of all the LBs in the mountains cloud, in a similar manner, the operating state of each LB in the mountains cloud can be found out only by specifying the vendor as the mountains cloud and finding out the status field of the corresponding LB. Since only the asset information of the same asset information type is stored in the same asset information type table, and the field contents of different public cloud vendors correspond to the same field name of the asset information type table. Compared with the prior art that the asset information of all asset information types of a public cloud manufacturer is stored in an information table to obtain the prior information table; the number of the field names in the asset information type table is less, and the inquiry time of the asset information can be shortened when the asset information is managed in a unified mode, so that the management efficiency is improved.
Fig. 6 is a block diagram of an apparatus for accessing public cloud asset information according to an embodiment of the present invention, where as shown in fig. 6, the apparatus includes:
the unified access module 61 is used for acquiring the asset information of the plurality of cloud platforms according to the asset information type; the asset information comprises a plurality of cloud field names and cloud field contents corresponding to each cloud field name;
a determining module 62, configured to determine, according to the asset information type to which the asset information belongs, an asset information type table corresponding to the asset information; wherein, the asset information belonging to the same asset information type corresponds to an asset information type table;
the unified storage module 63 is configured to store cloud field contents of the asset information in a corresponding asset information type table according to a preset field name mapping table; the asset information type table comprises a plurality of abstract field names, and in a preset field name mapping table, each abstract field name corresponds to one cloud field name in the asset information of the same asset information type of each cloud platform.
In the embodiment of the invention, the asset information of a plurality of cloud platforms can be obtained according to the asset information type; the asset information comprises a plurality of cloud field names and cloud field contents corresponding to each cloud field name; therefore, the asset information of the cloud platforms of a plurality of public cloud manufacturers can be accessed in a unified mode. Then according to the asset information type to which the asset information belongs, determining an asset information type table corresponding to the asset information; wherein, the asset information belonging to the same asset information type corresponds to an asset information type table; storing the cloud field content of the asset information in a corresponding asset information type table according to a preset field name mapping table; the asset information type table comprises a plurality of abstract field names, and in a preset field name mapping table, each abstract field name corresponds to one cloud field name in the asset information of the same asset information type of each cloud platform. The asset information of the same asset information type of the cloud platforms can be stored in the same asset information type table; meanwhile, the cloud field names of the asset information respectively belonging to the cloud platforms correspond to the same abstract field name, so that the related field names are fewer under the condition that the asset information of the same asset information type of the cloud platforms is stored in the asset information type table. And then when the asset information is managed in a subsequent unified way, the inquiry time of the asset information can be shortened, so that the management efficiency is improved.
Fig. 7 is a block diagram of another apparatus for accessing public cloud asset information according to an embodiment of the present invention, where as shown in fig. 7, the apparatus includes:
the unified access module 71 is used for acquiring asset information of a plurality of cloud platforms according to the asset information types; the asset information comprises a plurality of cloud field names and cloud field contents corresponding to each cloud field name;
a determining module 72, configured to determine, according to the asset information type to which the asset information belongs, an asset information type table corresponding to the asset information; wherein, the asset information belonging to the same asset information type corresponds to an asset information type table;
the unified storage module 73 is configured to store cloud field contents of the asset information in a corresponding asset information type table according to a preset field name mapping table; the asset information type table comprises a plurality of abstract field names, and in a preset field name mapping table, each abstract field name corresponds to one cloud field name in the asset information of the same asset information type of each cloud platform.
Optionally, the unified access module 71 includes:
a timing task unit 711 for creating a plurality of timing tasks; wherein each timing task corresponds to a different synchronization task;
a synchronous task unit 712, configured to trigger a synchronous task corresponding to the timing task when the timing task reaches a preset execution time;
an obtaining unit 713, configured to obtain asset information of multiple cloud platforms according to the triggered synchronization task.
Optionally, the obtaining unit 713 includes:
the first adaptor unit is used for acquiring the identifications of the cloud platforms configured in the triggered synchronization task and the target type of the asset information;
the second adapter sub-unit is used for determining a plurality of target adapters according to the identification and the target type; target interface information is set in the target adapter, and the target interface information is interface information for acquiring asset information of a target type in the cloud platform indicated by the identification;
and the third adapter subunit is used for calling the target adapter to acquire the asset information of the target type from the cloud platform.
Optionally, each target adapter further comprises: an asset information type of the asset information that can be obtained and an identification of a cloud platform to which the asset information that can be obtained belongs.
Optionally, the plurality of cloud platforms are cloud platforms of a plurality of same or different public cloud vendors.
In the embodiment of the invention, the asset information of a plurality of cloud platforms can be obtained according to the asset information type; the asset information comprises a plurality of cloud field names and cloud field contents corresponding to each cloud field name; therefore, the asset information of the cloud platforms of a plurality of public cloud manufacturers can be accessed in a unified mode. Then according to the asset information type to which the asset information belongs, determining an asset information type table corresponding to the asset information; wherein, the asset information belonging to the same asset information type corresponds to an asset information type table; storing the cloud field content of the asset information in a corresponding asset information type table according to a preset field name mapping table; the asset information type table comprises a plurality of abstract field names, and in a preset field name mapping table, each abstract field name corresponds to one cloud field name in the asset information of the same asset information type of each cloud platform. The asset information of the same asset information type of the cloud platforms can be stored in the same asset information type table; meanwhile, the cloud field names of the asset information respectively belonging to the cloud platforms correspond to the same abstract field name, so that the related field names are fewer under the condition that the asset information of the same asset information type of the cloud platforms is stored in the asset information type table. And then when the asset information is managed in a subsequent unified way, the inquiry time of the asset information can be shortened, so that the management efficiency is improved.
For the above device embodiments, since they are basically similar to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points.
An embodiment of the present invention further provides an electronic device, as shown in fig. 8, which includes a processor 801, a communication interface 802, a memory 803, and a communication bus 804, where the processor 801, the communication interface 802, and the memory 803 complete mutual communication through the communication bus 804,
a memory 803 for storing a computer program;
the processor 801 is configured to implement the following steps when executing the program stored in the memory 803:
acquiring asset information of the same type of different public cloud manufacturers;
determining an abstract field name corresponding to each cloud field name in the asset information according to a preset field name mapping table, wherein in the preset field name mapping table, a plurality of cloud field names belonging to different public cloud manufacturers correspond to the same abstract field name;
and storing the asset information in a pre-created same type information table according to the abstract field names, wherein the same type information table comprises abstract field names and identification fields for distinguishing different cloud manufacturers.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, and when the computer-readable storage medium runs on a computer, the computer is caused to execute the method for accessing the public cloud asset information in any one of the above embodiments.
In yet another embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method for public cloud asset information access described in the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may 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 loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, 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. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A method for public cloud asset information access, the method comprising:
acquiring asset information of a plurality of cloud platforms according to the asset information type; wherein the asset information comprises a plurality of cloud field names and cloud field content corresponding to each cloud field name;
determining an asset information type table corresponding to the asset information according to the asset information type to which the asset information belongs; wherein, the asset information belonging to the same asset information type corresponds to an asset information type table;
storing the cloud field content of the asset information in a corresponding asset information type table according to a preset field name mapping table; the asset information type table comprises a plurality of abstract field names, and in the preset field name mapping table, each abstract field name corresponds to one cloud field name in the asset information of the same asset information type of each cloud platform.
2. The method of claim 1, wherein the step of obtaining asset information for a plurality of cloud platforms based on asset information type comprises:
creating a plurality of timing tasks; wherein each timing task corresponds to a different synchronization task;
triggering a synchronous task corresponding to the timing task when the timing task reaches a preset execution time;
and acquiring the asset information of the plurality of cloud platforms according to the triggered synchronous task.
3. The method of claim 2, wherein the step of obtaining asset information for a plurality of cloud platforms based on the triggered synchronization task comprises:
acquiring identifications of a plurality of cloud platforms configured in the triggered synchronous task and target types of asset information;
determining a plurality of target adapters according to the identification and the target type; target interface information is set in the target adapter, and the target interface information is interface information for acquiring the asset information of the target type in the cloud platform indicated by the identification;
and calling the target adapter to acquire the asset information of the target type from the cloud platform.
4. The method of claim 3, wherein each target adapter further comprises: an asset information type of the asset information that can be obtained and an identification of a cloud platform to which the asset information that can be obtained belongs.
5. The method of claim 1, wherein the plurality of cloud platforms are cloud platforms of a plurality of same or different public cloud vendors.
6. An apparatus for public cloud asset information access, the apparatus comprising:
the unified access module is used for acquiring the asset information of the plurality of cloud platforms according to the asset information type; wherein the asset information comprises a plurality of cloud field names and cloud field content corresponding to each cloud field name;
the determining module is used for determining an asset information type table corresponding to the asset information according to the asset information type to which the asset information belongs; wherein, the asset information belonging to the same asset information type corresponds to an asset information type table;
the unified storage module is used for storing the cloud field content of the asset information into a corresponding asset information type table according to a preset field name mapping table; the asset information type table comprises a plurality of abstract field names, and in the preset field name mapping table, each abstract field name corresponds to one cloud field name in the asset information of the same asset information type of each cloud platform.
7. The apparatus of claim 6, wherein the unified access module comprises:
a timing task unit for creating a plurality of timing tasks; wherein each timing task corresponds to a different synchronization task;
the synchronous task unit is used for triggering a synchronous task corresponding to the timing task when the timing task reaches a preset execution time;
and the acquisition unit is used for acquiring the asset information of the cloud platforms according to the triggered synchronous task.
8. The apparatus of claim 7, wherein the obtaining unit comprises:
a first adaptor unit, configured to obtain identifiers of a plurality of cloud platforms configured in the triggered synchronization task and a target type of asset information;
the second adapter sub-unit is used for determining a plurality of target adapters according to the identification and the target type; target interface information is set in the target adapter, and the target interface information is interface information for acquiring the asset information of the target type in the cloud platform indicated by the identification;
and the third adapter subunit is used for calling the target adapter to acquire the asset information of the target type from the cloud platform.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the method for public cloud asset information access of any of claims 1-5 when executing the program stored on the memory.
10. A computer-readable storage medium having stored thereon a computer program, wherein the program, when executed by a processor, implements the method of public cloud asset information access of any of claims 1-5.
CN201911419701.8A 2019-12-31 2019-12-31 Method and device for accessing public cloud asset information Pending CN111125232A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911419701.8A CN111125232A (en) 2019-12-31 2019-12-31 Method and device for accessing public cloud asset information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911419701.8A CN111125232A (en) 2019-12-31 2019-12-31 Method and device for accessing public cloud asset information

Publications (1)

Publication Number Publication Date
CN111125232A true CN111125232A (en) 2020-05-08

Family

ID=70507259

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911419701.8A Pending CN111125232A (en) 2019-12-31 2019-12-31 Method and device for accessing public cloud asset information

Country Status (1)

Country Link
CN (1) CN111125232A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112261175A (en) * 2020-10-26 2021-01-22 深信服科技股份有限公司 Asset information updating method, device, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799807A (en) * 2009-02-10 2010-08-11 中国移动通信集团公司 Heterogeneous data table merging method and system thereof
CN105893526A (en) * 2016-03-30 2016-08-24 上海坤士合生信息科技有限公司 Multi-source data fusion system and method
US20190082026A1 (en) * 2016-07-08 2019-03-14 Tencent Technology (Shenzhen) Company Limited Interface invocation method and apparatus for hybrid cloud
CN109800259A (en) * 2018-12-11 2019-05-24 深圳市金证科技股份有限公司 Collecting method, device and terminal device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799807A (en) * 2009-02-10 2010-08-11 中国移动通信集团公司 Heterogeneous data table merging method and system thereof
CN105893526A (en) * 2016-03-30 2016-08-24 上海坤士合生信息科技有限公司 Multi-source data fusion system and method
US20190082026A1 (en) * 2016-07-08 2019-03-14 Tencent Technology (Shenzhen) Company Limited Interface invocation method and apparatus for hybrid cloud
CN109800259A (en) * 2018-12-11 2019-05-24 深圳市金证科技股份有限公司 Collecting method, device and terminal device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112261175A (en) * 2020-10-26 2021-01-22 深信服科技股份有限公司 Asset information updating method, device, equipment and medium
CN112261175B (en) * 2020-10-26 2023-05-12 深信服科技股份有限公司 Asset information updating method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US7685322B2 (en) Port number emulation for wireless USB connections
CN111352902A (en) Log processing method and device, terminal equipment and storage medium
KR101682738B1 (en) Managed system extensibility
US11669599B2 (en) Systems and methods for software license management
CN110633977A (en) Payment exception processing method and device and terminal equipment
CN112685709B (en) Authorization token management method and device, storage medium and electronic equipment
CN110855471B (en) Port mapping method, device and equipment
US8510423B2 (en) Install system and install method
US8966506B2 (en) Method and apparatus for managing related drivers associated with a virtual bus driver
CN107908565B (en) Test method and test equipment
CN107066522A (en) The access method and device of database
CN112598529B (en) Data processing method and device, computer readable storage medium and electronic equipment
CN111125232A (en) Method and device for accessing public cloud asset information
US20170228408A1 (en) Data management apparatus and method therefor
CN116151631A (en) Service decision processing system, service decision processing method and device
US20080040466A1 (en) System and method for object-oriented meta-data driven instrumentation
CN110704301B (en) TPC-E automatic test method and TPC-E test system
US11200253B2 (en) Providing instant and distributed access to a source blob via copy-on-read blobs and link blobs
JP2006343848A (en) Work result management device
CN109725856B (en) Shared node management method and device, electronic equipment and storage medium
CN109254855B (en) Registration method and device of parameter transmission protocol and electronic equipment
CN111857955A (en) Method for automatically constructing and updating resource configuration information in heterogeneous cloud environment
CN111045928A (en) Interface data testing method, device, terminal and storage medium
CN117251297B (en) Equipment distribution method, electronic equipment and storage medium
CN115270110B (en) Account inspection method and device, electronic 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