CN115048393A - Resource management method, apparatus, system, device, medium, and program product - Google Patents

Resource management method, apparatus, system, device, medium, and program product Download PDF

Info

Publication number
CN115048393A
CN115048393A CN202210574879.5A CN202210574879A CN115048393A CN 115048393 A CN115048393 A CN 115048393A CN 202210574879 A CN202210574879 A CN 202210574879A CN 115048393 A CN115048393 A CN 115048393A
Authority
CN
China
Prior art keywords
database
resource
cloud platform
management system
view
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
CN202210574879.5A
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.)
Dawning Information Industry Co Ltd
Original Assignee
Dawning Information Industry 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 Dawning Information Industry Co Ltd filed Critical Dawning Information Industry Co Ltd
Priority to CN202210574879.5A priority Critical patent/CN115048393A/en
Publication of CN115048393A publication Critical patent/CN115048393A/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/23Updating
    • G06F16/2393Updating materialised views
    • 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/21Design, administration or maintenance of databases
    • G06F16/211Schema design and management

Landscapes

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

Abstract

The application relates to a resource management method, a device, a system, equipment, a medium and a program product, wherein the resource management method obtains a resource query request based on a first database view, and the resource query request comprises a first resource identifier; and determining the target resource according to the first resource identifier and the first database view. By using the resource management method provided by the application, the accuracy of inquiring the resources in the cloud platform management system can be improved.

Description

Resource management method, apparatus, system, device, medium, and program product
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method, an apparatus, a system, a device, a medium, and a program product for resource management.
Background
Openstack is an open-source cloud platform management project, and a data center resource pool can be managed by using Openstack. In scenarios where Openstack is used to handle large-scale problems, multiple databases need to be managed.
In the conventional technology, when a cloud platform management system manages resources in a plurality of databases, the resources may be managed by establishing a local service database, for example, the resources in the plurality of databases of the cloud platform management system may be synchronized to the local service database periodically, and a user may perform resource management based on the local service database.
However, in the conventional technology, the local service database is different from the multiple databases managed by the Openstack, which may cause inaccuracy of resource information queried by the user based on the local service database.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a resource management method, apparatus, system, device, medium, and program product for addressing the above technical problems.
In a first aspect, an embodiment of the present application provides a resource management method, where the resource management method includes:
acquiring a resource query request based on a first database view; the first database view is a view created according to resource information in each database in the cloud platform management system; the resource query request comprises a first resource identifier;
and determining the target resource according to the first resource identifier and the first database view.
According to the resource management method, the first database view is created according to the resource information in each database in the cloud platform management system, namely the resource information in the first database view is the same as the resource information in each database in the cloud platform management system, so that when the target resource is queried based on the first database view, the condition that the resource information in the local database and the resource information in the databases in the cloud platform management system are not synchronous does not exist, and the accuracy of the queried target resource can be ensured.
In one embodiment, the method for creating the first database view comprises the following steps:
acquiring a second database view corresponding to each database in the cloud platform management system; the second database view is generated by the cloud platform management system according to each database table in the database;
and generating a first database view according to the second database views.
The creating method of the first database view has high efficiency and practicability.
In one embodiment, the method for creating the second database view comprises the following steps:
aiming at each database in the cloud platform management system, acquiring a service attribute of each database table in the database and a service attribute value corresponding to the service attribute;
and generating a second database view according to the service attributes and the service attribute values of all database tables in the database.
According to the resource management method, the resource information contained in the database can be extracted from each database more quickly and accurately through the service attribute and the service attribute value in the database table in each database, the efficiency and the accuracy of the generated second database view can be ensured, and therefore the efficiency and the practicability of the resource management method can be improved.
In one embodiment, the resource management method further includes:
acquiring a resource maintenance request; the resource maintenance request comprises a second resource identifier and maintenance information;
and calling an interface corresponding to the cloud platform management system, and maintaining the resource corresponding to the second resource identifier in the cloud platform management system according to the maintenance information.
According to the resource management method, when the resource information in the cloud platform management system is maintained, the resource maintenance is realized by directly using the corresponding interface of the cloud platform management system. Therefore, the user terminal does not need to perform service processing and does not need to consider services and database transactions in the cloud platform management system. Moreover, when resource information in the cloud platform management system is queried, an interface corresponding to the cloud platform management system is not occupied, so that the process of querying the resource information of the cloud platform management system does not influence the process of resource maintenance, and the practicability and reliability of resource management can be improved.
In a second aspect, an embodiment of the present application provides a resource management method, where the resource management method includes:
acquiring resource information in each database in a cloud platform management system;
generating a first database view according to the resource information in each database;
and synchronizing the first database view to the user terminal so that the user terminal determines the target resource after acquiring the resource query request based on the first database view.
According to the resource management method, the resource information in each database in the cloud platform management system is synchronized to the user terminal, so that when the user terminal queries and queries the target resource based on the first database view, the condition that the first database view is not synchronous with the resource information in each database in the cloud platform management system does not exist, and the accuracy of the queried target resource can be ensured.
In one embodiment, acquiring resource information in each database in a cloud platform management system, and generating a first database view according to the resource information in each database includes:
acquiring each database table of each database in the cloud platform management system; the database table includes resource information;
aiming at each database in the cloud platform management system, acquiring a service attribute of each database table in the database and a service attribute value corresponding to the service attribute; generating a second database view of the database according to the service attributes and the service attribute values of all database tables in the database;
and generating a first database view according to the second database views.
According to the resource management method, the resource information contained in each database can be extracted from each database more quickly and accurately through the service attribute and the service attribute value in the database in each database, and the efficiency and the accuracy of finally generating the first database view can be improved.
In a third aspect, an embodiment of the present application provides a resource management device, where the resource management device includes:
the acquisition module is used for acquiring a resource query request based on the first database view; the first database view is a view created according to resource information in each database in the cloud platform management system; the resource query request comprises a first resource identifier;
and the first determining module is used for determining the target resource according to the first resource identifier and the first database view.
In a fourth aspect, an embodiment of the present application provides a resource management apparatus, including:
the second determining module is used for acquiring resource information in each database in the cloud platform management system;
the generating module is used for generating a first database view according to the resource information in each database;
and the synchronization module is used for synchronizing the first database view to the user terminal so that the user terminal can determine the target resource after acquiring the resource query request based on the first database view.
In a fifth aspect, an embodiment of the present application provides a resource management system, including a user terminal and a cloud platform management system, where the user terminal is configured to execute the steps of the resource management method provided in the first aspect, and the cloud platform management system is configured to execute the steps of the resource management method provided in the second aspect.
In a sixth aspect, an embodiment of the present application provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the resource management method provided in the first and second aspects when executing the computer program.
In a seventh aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the resource management method provided in the first and second aspects.
In an eighth aspect, an embodiment of the present application further provides a computer program product, which includes a computer program, and when executed by a processor, the computer program implements the steps of the resource management method provided in the first aspect and the second aspect.
The embodiment of the application provides a resource management method, a device, a system, equipment, a medium and a program product. The resource management method obtains a resource query request based on a first database view, and determines a target resource according to a first resource identifier and the first database view carried in the resource query request. Because the first database view is created according to the resource information in each database in the cloud platform management system, that is, the resource information in the first database view is the same as the resource information in each database in the cloud platform management system, when the target resource is queried based on the first database view, the condition that the resource information in the local database and the resource information in the databases in the cloud platform management system are not synchronized does not exist, so that the accuracy of the queried target resource can be ensured.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or the conventional technologies of the present application, the drawings used in the description of the embodiments or the conventional technologies will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a resource management method according to an embodiment;
FIG. 2 is a flowchart illustrating steps of a method for resource management according to an embodiment;
FIG. 3 is a diagram illustrating an interface of a user terminal, according to an embodiment;
FIG. 4 is a schematic interface diagram of a user terminal according to another embodiment;
FIG. 5 is a flowchart illustrating steps of a resource management method according to another embodiment;
FIG. 6 is a flowchart illustrating steps of a resource management method according to another embodiment;
FIG. 7 is a flowchart illustrating steps of a resource management method according to another embodiment;
FIG. 8 is a flowchart illustrating steps of a resource management method according to another embodiment;
FIG. 9 is a flowchart illustrating steps of a resource management method according to another embodiment;
FIG. 10 is a flowchart illustrating steps of a resource management method according to another embodiment;
FIG. 11 is a flowchart illustrating steps of a resource management method according to another embodiment;
FIG. 12 is an architectural diagram of a resource management system, according to an embodiment;
fig. 13 is a schematic structural diagram of a resource management apparatus according to an embodiment;
fig. 14 is a schematic structural diagram of a resource management apparatus according to another embodiment;
FIG. 15 is a block diagram of a computer device, according to an embodiment.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanying the present application are described in detail below with reference to the accompanying drawings. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of embodiments in many different forms than those described herein and that modifications may be made by one skilled in the art without departing from the spirit and scope of the application and it is therefore not intended to be limited to the specific embodiments disclosed below.
The numbering of the components as such, e.g., "first", "second", etc., is used herein only to distinguish the objects as described, and does not have any sequential or technical meaning.
The resource management method provided by the application can be applied to a cloud platform management system. Openstack is an open-source cloud platform management project, and a data center resource pool of a cloud platform management system can be managed by using Openstack. In Openstack, when dealing with large-scale problems, Nova community proposes using a multi-cell (multi-cell) architecture for deployment. Thus, there is a separate Mysql database service in each cell environment. That is, in a scenario where large-scale problems are handled using Openstack, multiple databases need to be managed.
In the conventional technology, when resources in a plurality of databases are queried in a cloud platform management system, the query can be performed in the following three forms.
First, the interface of Openstack is used directly for querying. However, such a query method has poor page-divided expansibility, does not support fuzzy query, and has poor capability of returning internal expansion, which may result in poor user experience.
And in the second type, an Openstack interface is used for taking out all resource data of a plurality of database types, storing the resource data and paging the resource data. However, such a query method requires access to the full amount of data every time access is performed, and the large amount of data causes slow loading.
Third, the query may be implemented by a locally established service database. However, the local service database is different from the plurality of databases of the cloud platform system, which may cause the resource information for querying the local service database to be inaccurate.
The following describes the technical solution of the present application and how to solve the technical problem in detail by using specific embodiments. These several specific embodiments may be combined with each other below, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
The resource management method provided by the present application can be applied to a resource management system 10 shown in fig. 1, where the resource management system 10 includes a user terminal 11 and a cloud platform management system 12. The user terminal 11 and the cloud platform management system 12 realize communication through a communication network. The user terminal 11 may be a computer device or a server, and the computer device includes a control chip, a personal computer, a notebook computer, a tablet computer, a portable wearable device, and the like. Cloud platform management system 12 may be a stand-alone server or a server cluster of multiple servers.
In an embodiment, as shown in fig. 2, a resource management method is provided, and this embodiment is exemplified by applying the resource management method to the user terminal shown in fig. 1. In this embodiment, the resource management method includes the steps of:
200, acquiring a resource query request based on a first database view; the first database view is a view created according to resource information in each database in the cloud platform management system; the resource query request includes a first resource identification.
The cloud platform management system comprises a plurality of databases, and each database comprises different resource information. The first database view is created according to the resource information in the multiple databases in the cloud platform management system, that is, the first database view includes all the resource information in the multiple databases in the cloud platform management system. The first database view may be stored in a local database. Specifically, the resource information may include relevant information of a virtual machine in the cloud platform management system, relevant information of cloud storage, relevant information of a cloud hard disk, and the like, which is not limited in this embodiment. When a user needs to query resource information in the cloud platform management system, the user terminal can load a first database view in the local database and display resource identifiers of all resource information contained in the first database view on an interface. The user terminal obtains a resource query request input by a user according to all resource information in a first database view displayed on an interface, wherein the resource query request comprises a first resource identifier, and the first resource identifier is used for representing a target resource. Or the first database view may also be stored in a standby database of the cloud platform management system, and when the user needs to query resource information in the cloud platform management system, the first database view may be downloaded from the database of the cloud platform management system at the user terminal.
In a specific embodiment, the interface diagram of the user terminal is shown in fig. 3, and the identifier of the resource information may include a name, a state, a mirror image, a network, and the like corresponding to the resource. As can be seen from fig. 3, the resource information displayed on the interface may be displayed in pages, so that page extensibility is good, and user experience can be improved.
In an optional embodiment, the resource query request is triggered by a user clicking a first resource identifier in the first database view on the interface.
In another alternative embodiment, the interface of the user terminal includes a name list corresponding to the resource and a search box, as shown in fig. 4. The resource query request refers to that a user selects a resource name corresponding to a first resource identifier in a pull-down list corresponding to a resource, and inputs the first resource identifier in a search box to click a search button for triggering. Specifically, the input into the search box may be the complete first resource identifier, or may be partial content of the first resource identifier. That is, the fuzzy query may be implemented through the search box.
Step 210, determining a target resource according to the first resource identifier and the first database view.
After receiving a resource query request input by a user, a user terminal can obtain a target resource corresponding to a first resource identifier according to the first resource identifier in the resource query request and a first database view. Specifically, all resource information of the target resource in the first database view can be obtained through the first resource identifier. Optionally, the user terminal displays the information of the target resource on the interface, so that the user can view the information conveniently.
The embodiment of the application provides a resource management method, which is characterized by acquiring a resource query request based on a first database view, and determining a target resource according to a first resource identifier and the first database view carried in the resource query request. Because the first database view is created according to the resource information in each database in the cloud platform management system, that is, the resource information in the first database view is the same as the resource information in each database in the cloud platform management system, when the target resource is queried based on the first database view, the condition that the resource information in the local database and the resource information in the databases in the cloud platform management system are not synchronous does not exist, and the accuracy of the queried target resource can be ensured.
In an embodiment, as shown in fig. 5, if the first database view is in a database corresponding to the cloud platform management system, an execution subject of the creating method of the first database view is the cloud platform management system.
In this embodiment, the creating method of the first database view includes the steps of:
500, acquiring a second database view corresponding to each database in the cloud platform management system; the second database view is generated by the cloud platform management system according to each database table in the database.
Each database in the cloud platform management system comprises a plurality of database tables, and the cloud platform management system can generate a second database view corresponding to each database by extracting resource data in the plurality of database tables. That is, the second database view corresponding to each database contains resource information in a plurality of database tables in the database.
In an alternative embodiment, the cloud platform management system extracts the required resource data from a plurality of database tables through the statement of creating the view in mysql to generate a database view (second database view).
Step 510, generating a first database view according to each second database view.
After the cloud platform management system obtains the second database views corresponding to each database in the cloud platform management system, the cloud platform management system extracts and concentrates the data in each second database view into the first database table, namely, the first database view is generated.
Optionally, the first database view and each second database view may be stored in different databases, for example, a plurality of second database views are respectively stored in each database in the cloud platform management system, and the first database view is stored in a standby database in the cloud platform management system. After the cloud platform management system obtains the second database views stored in each database in the cloud platform management system, the second database views stored in each database are respectively synchronized to the standby databases by using a remote synchronization technology. The cloud platform management system collects the synchronized second database views in the standby database into one database view, and generates a first database view.
Specifically, the cloud platform management system utilizes the function of creating the remote table by mysql to synchronize the second database view in each database in the cloud platform management system to the standby database. The cloud platform collects the resource information in the second database views into one database view through the statement for creating the view in the mysql to form the first database view.
In this embodiment, the formation of the first database view and the formation of the second database view are both completed in the cloud platform management system, so that the pressure of the user terminal in processing data can be reduced, and the practicability of the resource management method provided by this embodiment is improved.
In an embodiment, as shown in fig. 6, if the first database view is in a local database corresponding to the user terminal, the step of the method for creating the first database view includes:
step 600, the cloud platform management system obtains a second database view corresponding to each database in the cloud platform management system.
And step 610, synchronizing the second database views corresponding to the databases to the local database by the cloud platform management system.
For the description that the cloud platform management system acquires the second database view corresponding to each database, and synchronizes each second database view to the local database, reference may be made to the specific description in the above embodiment, which is not described herein again.
Step 620, the user terminal generates a first database view according to the plurality of second database views in the local database.
After the second database views are synchronized to the local database, the user terminal collects the resource information in the second database views into one database view through the statements for creating the views in the mysql to form a first database view.
In this embodiment, the first database views are stored in the local database, so that the user terminal directly loads the first database views in the local database without being affected by factors such as network speed and the like, thereby having higher efficiency and further improving the practicability of the resource management method provided by this embodiment.
In one embodiment, as shown in FIG. 7, the steps of the method for creating the second database view include:
step 700, for each database in the cloud platform management system, obtaining a service attribute of each database table in the database and a service attribute value corresponding to the service attribute.
Each database in the cloud platform management system comprises a plurality of database tables, and the cloud platform management system can acquire the service attribute of each database table in the database and the service attribute value corresponding to the service attribute aiming at each database in the cloud platform management system.
Illustratively, the openstack managed database includes three database tables, namely an instance table, an instance system data table and a volumes table. The service attributes which can be obtained from the instances table comprise the ID of the virtual machine, the name of the virtual machine, the state of the virtual machine, the task state and the like; the service data that can be obtained from the instance _ system _ metadata table includes a mirror ID, a mirror name, and the like, and the service attribute that can be obtained from the flashes table includes a specification ID, a specification name, a specification memory, a specification central processing unit, a specification root disk, and the like.
And 710, generating a second database view according to the service attributes and the service attribute values of all database tables in the database.
And after the cloud platform management system obtains the service attributes and the service attribute values of all the database tables in each database, the service attributes and the service attribute values of all the database tables are in one-to-one correspondence to form a second database view.
In this embodiment, the resource information included in each database can be extracted from each database more quickly and accurately through the service attribute and the service attribute value in the database table in each database, and the efficiency and accuracy of the generated second database view can be ensured, so that the efficiency and the practicability of the resource management method can be improved.
In one embodiment, as shown in fig. 8, the steps of the resource management method further include:
step 800, acquiring a resource maintenance request; the resource maintenance request comprises a second resource identifier and maintenance information;
the resource maintenance can be new creation, modification, deletion and the like of resources. The resource maintenance request includes a second resource identifier and maintenance information, where the second resource identifier is an identifier corresponding to resource information that needs to be maintained, and the maintenance information may include newly created resource information, resource information that needs to be modified, resource information that needs to be deleted, and the like. The user terminal obtains a resource maintenance request input by a user on an interface of the user terminal.
And step 810, calling an interface corresponding to the cloud platform management system, and maintaining the resource corresponding to the second resource identifier in the cloud platform management system according to the maintenance information.
After the user terminal obtains the resource maintenance request, an interface corresponding to the cloud platform management system, for example, an interface of an Openstack, is called, and resource information corresponding to the second resource identifier in the cloud platform management system is maintained (newly created, modified or deleted).
In this embodiment, when resource information in the cloud platform management system is maintained, the resource maintenance is directly implemented by using an interface corresponding to the cloud platform management system. Therefore, the user terminal does not need to perform service processing and does not need to consider services and database transactions in the cloud platform management system. Moreover, when resource information in the cloud platform management system is queried, an interface corresponding to the cloud platform management system is not occupied, so that the process of querying the resource information of the cloud platform management system does not influence the process of resource maintenance, and the practicability and reliability of resource management can be improved.
In an embodiment, as shown in fig. 9, a resource management method is provided, and this embodiment is exemplified by applying the resource management method to a cloud platform management system shown in fig. 1. The resource management method comprises the following steps:
and 900, acquiring resource information in each database in the cloud platform management system.
The cloud platform management system acquires resource information in each database in the cloud platform management system, namely resource information contained in all databases in the cloud platform management system. The embodiment does not limit the specific acquisition method as long as the functions thereof can be realized.
Step 910, generating a first database view according to the resource information in each database.
And the cloud platform management system generates a first database view according to the acquired resource information in each database. In other words, the resource information in multiple databases is aggregated into one database view. Specifically, the database to which the first database view belongs is a standby database in the cloud platform management system, and the cloud platform management system centralizes resource information in each database in the cloud platform management system into the standby database. The present embodiment does not limit the specific method for generating the first database view according to the resource information in each database, as long as the function thereof can be realized.
And 920, synchronizing the first database view to the user terminal so that the user terminal can determine the target resource after acquiring the resource query request based on the first database view.
After the cloud platform management system obtains the first database views corresponding to the databases in the cloud platform management system, the first database views are synchronized to the user terminal, that is, the resource information in the first database views is displayed on an interface of the user terminal, so that a user can input a resource query request on the interface of the user terminal. The user terminal determines the target resource based on the first database view after receiving the resource query request. For the resource query request and the description of the user terminal determining the target resource based on the first database view and the resource query request, reference may be made to the specific description in the foregoing embodiments, which is not described herein again.
The resource management method provided by the embodiment of the application acquires resource information in each database in a cloud platform management system; generating a first database view according to the resource information in each database; and synchronizing the first database view to the user terminal so that the user terminal can determine the target resource after acquiring the resource query request based on the first database view. According to the resource management method provided by the embodiment, the resource information in each database in the cloud platform management system is synchronized to the user terminal, so that when the user terminal queries and queries the target resource based on the first database view, the condition that the first database view is not synchronized with the resource information in each database in the cloud platform management system does not exist, and the accuracy of the queried target resource can be ensured.
In one embodiment, as shown in fig. 10, the steps related to one possible implementation manner of obtaining resource information in databases in the cloud platform management system include:
step 101, acquiring each database table of each database in a cloud platform management system; the database table includes resource information.
Each database in the cloud platform management system comprises a plurality of database tables, and each database table comprises resource information corresponding to the database. The cloud platform acquires each database table in the database aiming at each database in the cloud platform management system, namely acquires resource information in each database. The embodiment does not limit the specific method for acquiring each database table, as long as the function of the database table can be realized.
102, aiming at each database in a cloud platform management system, acquiring a service attribute of each database table in the database and a service attribute value corresponding to the service attribute; and generating a second database view of the database according to the service attributes and the service attribute values of all database tables in the database.
The cloud platform management system acquires the service attribute of each database table and the service attribute value corresponding to the service attribute from each database table in the acquired database tables of each database. The service attributes and the service attribute values are in one-to-one correspondence, and after the service attributes and the service attribute values of all database tables in each database are obtained, the cloud platform management system generates a second database view of each database according to the service attributes and the service attribute values and the corresponding relation between the service attributes and the service attribute values. For the description of the service attribute and the service attribute value, reference may be made to the specific description in the foregoing embodiments, which is not described herein again.
And 103, generating a first database view according to the second database views.
After the second database view corresponding to each database in the cloud platform management system, the cloud platform management system generates a first database view according to the plurality of second database views, so that the first database view contains all resource information in the plurality of second database views. In other words, the cloud platform management system may aggregate the resource information in the plurality of second database views into the first database view.
Specifically, if the first database view is stored in a standby database in the cloud platform management system, the cloud platform management system synchronizes the second database views stored in each database to the standby database by using a remote synchronization technology, and centralizes a plurality of synchronized second database views in the standby database into one database view to generate the first database view.
In this embodiment, the resource information included in each database can be extracted from each database more quickly and accurately through the service attribute and the service attribute value in the database in each database, and the efficiency and the accuracy of finally generating the first database view can be improved.
Referring to fig. 11, in an embodiment, the present application provides a resource management method, where the resource management method includes:
and step 111, the cloud platform management system acquires each database table of each database in the cloud platform management system.
Step 112, the cloud platform management system acquires, for each database in the cloud platform management system, a service attribute of each database table in the database and a service attribute value corresponding to the service attribute.
And 113, the cloud platform management system generates a second database view of the database according to the service attributes and the service attribute values of all the database tables in the database tables.
And step 114, the cloud platform management system generates a first database view according to each second database view.
And step 115, synchronizing the first database view to the user terminal by the cloud platform management system.
Step 116, the user terminal obtains a resource query request based on the first database view; the resource query request includes a first resource identification.
And step 117, the user terminal determines the target resource according to the first resource identifier and the first database view.
In a specific embodiment, an overall architecture of the resource management system is shown in fig. 12, where the cloud platform management system includes a database 1, a database 2, and a standby database, and each database includes a database table 1, a database table 2, and a database table 3. Database 1 has a corresponding second database view 1 and database 2 has a corresponding second database view 2. The standby database comprises a second database view 1 and a second database view 2 which are synchronized from the database 1 and the database 2, and a first database view generated from the first database view 1 and the second database view 2. When a user terminal inquires resource information in a cloud platform management system, the user terminal directly obtains the resource information from a first database view in a standby database; when the resource information in the cloud platform management system is maintained, the resource information in the cloud platform management system is maintained through the interface of the cloud platform management system.
It should be understood that, although the steps in the flowcharts in the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
Continuing to refer to fig. 1, in one embodiment, the present application provides a cloud platform management system 10, which includes a user terminal 11 and a cloud platform management system 12. The user terminal 11 is in communication connection with the cloud platform management system 12. The user terminal 11 performs the steps of the resource management method provided by the embodiments shown in fig. 2, fig. 5 to fig. 8; the cloud platform management system 12 is configured to perform the steps of the resource management method provided in the embodiments shown in fig. 9 and fig. 10.
Based on the same inventive concept, the embodiment of the present application further provides a resource management apparatus for implementing the above-mentioned resource management method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so specific limitations in one or more embodiments of the resource management device provided below may refer to the limitations in the above resource management method, and details are not described here.
In one embodiment, as shown in fig. 13, there is provided a resource management apparatus 20, which includes an obtaining module 21 and a first determining module 22. Wherein the content of the first and second substances,
the obtaining module 21 is configured to obtain a resource query request based on the first database view; the first database view is a view created according to resource information in each database in the cloud platform management system; the resource query request comprises a first resource identifier;
the first determining module 22 is configured to determine the target resource according to the first resource identifier and the first database view.
In one embodiment, as shown in fig. 14, there is provided a resource management apparatus 30 comprising a second determining module 31, a generating module 32 and a synchronizing module 33. Wherein the content of the first and second substances,
the second determining module 31 is configured to obtain resource information in each database in the cloud platform management system;
the generating module 32 is configured to generate a first database view according to the resource information in each database;
the synchronization module 33 is configured to synchronize the first database view to the user terminal, so that the user terminal determines the target resource after acquiring the resource query request based on the first database view.
For the specific limitations of the resource management device 20 and the resource management device 30, reference may be made to the limitations of the resource management method above, which are not described herein again. The respective modules in the resource management device 20 and the resource management device 30 may be wholly or partially implemented by software, hardware, and a combination thereof. The above devices, modules or units may be embedded in hardware or independent of a processor in a computer device, or may be stored in a memory in the computer device in software, so that the processor calls and executes operations corresponding to the above devices or modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure thereof may be as shown in fig. 15. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for resource information. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a resource management method.
Those skilled in the art will appreciate that the architecture shown in fig. 15 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the following steps when executing the computer program:
acquiring a resource query request based on a first database view; the first database view is a view created according to resource information in each database in the cloud platform management system; the resource query request comprises a first resource identifier;
and determining the target resource according to the first resource identifier and the first database view.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a second database view corresponding to each database in the cloud platform management system; the second database view is generated by the cloud platform management system according to each database table in the database; and generating a first database view according to the second database views.
In one embodiment, the processor, when executing the computer program, further performs the steps of: aiming at each database in the cloud platform management system, acquiring a service attribute of each database table in the database and a service attribute value corresponding to the service attribute; and generating a second database view according to the service attributes and the service attribute values of all database tables in the database.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a resource maintenance request; the resource maintenance request comprises a second resource identifier and maintenance information; and calling an interface corresponding to the cloud platform management system, and maintaining the resource corresponding to the second resource identifier in the cloud platform management system according to the maintenance information.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
acquiring resource information in each database in a cloud platform management system;
generating a first database view according to the resource information in each database;
and synchronizing the first database view to the user terminal so that the user terminal determines the target resource after acquiring the resource query request based on the first database view.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring each database table of each database in the cloud platform management system; the database table includes resource information; aiming at each database in the cloud platform management system, acquiring a service attribute of each database table in the database and a service attribute value corresponding to the service attribute; generating a second database view of the database according to the service attributes and the service attribute values of all database tables in the database; and generating a first database view according to the second database views.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a resource query request based on a first database view; the first database view is a view created according to resource information in each database in the cloud platform management system; the resource query request comprises a first resource identifier;
and determining the target resource according to the first resource identifier and the first database view.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a second database view corresponding to each database in the cloud platform management system; the second database view is generated by the cloud platform management system according to each database table in the database; and generating a first database view according to the second database views.
In one embodiment, the computer program when executed by the processor further performs the steps of: aiming at each database in the cloud platform management system, acquiring a service attribute of each database table in the database and a service attribute value corresponding to the service attribute; and generating a second database view according to the service attributes and the service attribute values of all database tables in the database.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a resource maintenance request; the resource maintenance request comprises a second resource identifier and maintenance information; and calling an interface corresponding to the cloud platform management system, and maintaining the resource corresponding to the second resource identifier in the cloud platform management system according to the maintenance information.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring resource information in each database in a cloud platform management system;
generating a first database view according to the resource information in each database;
and synchronizing the first database view to the user terminal so that the user terminal can determine the target resource after acquiring the resource query request based on the first database view.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring each database table of each database in a cloud platform management system; the database table includes resource information; aiming at each database in the cloud platform management system, acquiring a service attribute of each database table in the database and a service attribute value corresponding to the service attribute; generating a second database view of the database according to the service attributes and the service attribute values of all database tables in the database; and generating a first database view according to the second database views.
In one embodiment, a computer program product is provided, comprising a computer program which when executed by a processor performs the steps of:
acquiring a resource query request based on a first database view; the first database view is a view created according to resource information in each database in the cloud platform management system; the resource query request comprises a first resource identifier;
and determining the target resource according to the first resource identifier and the first database view.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a second database view corresponding to each database in the cloud platform management system; the second database view is generated by the cloud platform management system according to each database table in the database; and generating a first database view according to the second database views.
In one embodiment, the computer program when executed by the processor further performs the steps of: aiming at each database in the cloud platform management system, acquiring a service attribute of each database table in the database and a service attribute value corresponding to the service attribute; and generating a second database view according to the service attributes and the service attribute values of all database tables in the database.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a resource maintenance request; the resource maintenance request comprises a second resource identifier and maintenance information; and calling an interface corresponding to the cloud platform management system, and maintaining the resource corresponding to the second resource identifier in the cloud platform management system according to the maintenance information.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring resource information in each database in a cloud platform management system;
generating a first database view according to the resource information in each database;
and synchronizing the first database view to the user terminal so that the user terminal can determine the target resource after acquiring the resource query request based on the first database view.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring each database table of each database in a cloud platform management system; the database table includes resource information; aiming at each database in the cloud platform management system, acquiring a service attribute of each database table in the database and a service attribute value corresponding to the service attribute; generating a second database view of the database according to the service attributes and the service attribute values of all database tables in the database; and generating a first database view according to the second database views.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), Magnetic Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A resource management method, characterized in that the resource management method comprises:
acquiring a resource query request based on a first database view; the first database view is a view created according to resource information in each database in the cloud platform management system; the resource query request comprises a first resource identifier;
and determining a target resource according to the first resource identifier and the first database view.
2. The method for resource management according to claim 1, wherein the method for creating the first database view comprises:
acquiring a second database view corresponding to each database in the cloud platform management system; the second database view is generated by the cloud platform management system according to each database table in the database;
and generating the first database view according to each second database view.
3. The method for resource management according to claim 2, wherein the method for creating the second database view comprises:
aiming at each database in the cloud platform management system, acquiring a service attribute of each database table in the database and a service attribute value corresponding to the service attribute;
and generating the second database view according to the service attributes and the service attribute values of all the database tables in the database.
4. The method for resource management according to any of claims 1-3, wherein the method for resource management further comprises:
acquiring a resource maintenance request; the resource maintenance request comprises a second resource identifier and maintenance information;
and calling an interface corresponding to the cloud platform management system, and maintaining the resource corresponding to the second resource identifier in the cloud platform management system according to the maintenance information.
5. A resource management method, characterized in that the resource management method comprises:
acquiring resource information in each database in a cloud platform management system;
generating a first database view according to the resource information in each database;
and synchronizing the first database view to a user terminal so that the user terminal can determine a target resource after acquiring a resource query request based on the first database view.
6. The method according to claim 5, wherein the obtaining resource information in each of the databases in the cloud platform management system, and generating a first database view according to the resource information in each of the databases, comprises:
acquiring each database table of each database in the cloud platform management system; the database table includes the resource information;
aiming at each database in the cloud platform management system, acquiring a service attribute of each database table in the database and a service attribute value corresponding to the service attribute; generating a second database view of the database according to the service attributes and the service attribute values of all the database tables in the database;
and generating the first database view according to the second database views.
7. A resource management apparatus, characterized in that the resource management apparatus comprises:
the acquisition module is used for acquiring a resource query request based on the first database view; the first database view is a view created according to resource information in each database in the cloud platform management system; the resource query request comprises a first resource identifier;
and the first determining module is used for determining the target resource according to the first resource identifier and the first database view.
8. A resource management apparatus, characterized in that the resource management apparatus comprises:
the second determining module is used for acquiring resource information in each database in the cloud platform management system;
the generating module is used for generating a first database view according to the resource information in each database;
and the synchronization module is used for synchronizing the first database view to a user terminal so that the user terminal can determine a target resource after acquiring a resource query request based on the first database view.
9. A resource management system comprising a user terminal for performing the steps of the resource management method according to any one of claims 1 to 4 and a cloud platform management system for performing the steps of the resource management method according to any one of claims 5 and 6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the resource management method according to any one of claims 1 to 6.
CN202210574879.5A 2022-05-25 2022-05-25 Resource management method, apparatus, system, device, medium, and program product Pending CN115048393A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210574879.5A CN115048393A (en) 2022-05-25 2022-05-25 Resource management method, apparatus, system, device, medium, and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210574879.5A CN115048393A (en) 2022-05-25 2022-05-25 Resource management method, apparatus, system, device, medium, and program product

Publications (1)

Publication Number Publication Date
CN115048393A true CN115048393A (en) 2022-09-13

Family

ID=83159754

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210574879.5A Pending CN115048393A (en) 2022-05-25 2022-05-25 Resource management method, apparatus, system, device, medium, and program product

Country Status (1)

Country Link
CN (1) CN115048393A (en)

Similar Documents

Publication Publication Date Title
CN105468720A (en) Method for integrating distributed data processing systems, corresponding systems and data processing method
CN110784498B (en) Personalized data disaster tolerance method and device
WO2014110940A1 (en) A method, apparatus and system for storing, reading the directory index
CN112148693A (en) Data processing method, device and storage medium
CN112528067A (en) Graph database storage method, graph database reading method, graph database storage device, graph database reading device and graph database reading equipment
CN112800058A (en) Method for realizing HBase secondary index
CN111340404A (en) Method and device for constructing index system and computer storage medium
CN112199443B (en) Data synchronization method and device, computer equipment and storage medium
CN109697234B (en) Multi-attribute information query method, device, server and medium for entity
CN116028517A (en) Fusion database system and electronic equipment
CN115408546A (en) Time sequence data management method, device, equipment and storage medium
CN113590643B (en) Data synchronization method, device, equipment and storage medium based on dual-track database
CN115048393A (en) Resource management method, apparatus, system, device, medium, and program product
US10146791B2 (en) Open file rebalance
EP4170512A1 (en) Time series data injection method, time series data query method and database system
CN116628042A (en) Data processing method, device, equipment and medium
CN113515518A (en) Data storage method and device, computer equipment and storage medium
CN111339245A (en) Data storage method, device, storage medium and equipment
CN111611245B (en) Method and system for processing data table
CN112632294B (en) Method and system for synchronizing Neo4j data to search server
CN114385630A (en) Blood relationship combing method, apparatus, device, storage medium, and program product
CN117194363A (en) Data processing method, device, electronic equipment, storage medium and product
CN114092064A (en) Electric power big data processing batch processing system, method, device, equipment and medium
CN116821217A (en) Data distribution conversion method, device, equipment and storage medium
CN114647630A (en) File synchronization method, information generation method, file synchronization device, information generation device, computer 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