Information reporting method and device, electronic equipment and storage medium

The information collection platform obtains the model and package information of the cloud platform console, generates and executes inventory collection tasks, solves the problem of low efficiency in displaying resource information on cloud platform, and simplifies operations and improves visualization effects.

CN119537056APending Publication Date: 2025-02-28BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411612449.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

When the cloud platform control layer displays resource information to users, it needs to frequently call the underlying interface to obtain resource information, resulting in complex operations, low efficiency and poor visualization effects.

Method used

Provides an information reporting method, which can obtain the console's model information and package information through the information collection platform in response to preset conditions, generate inventory collection tasks, perform tasks to obtain inventory resource information, and send it to the information synchronization service to synchronize to the console.

Benefits of technology

It simplifies inventory resource acquisition operations, improves acquisition efficiency, and improves the visualization effect of resource information by displaying inventory resource information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The invention relates to an information reporting method and device, electronic equipment and a storage medium. The information reporting method is applied to an information acquisition platform in a cloud platform, and comprises the following steps: in response to a preset condition, obtaining model information and package information corresponding to a console, and generating an inventory acquisition task based on the model information and the package information; executing the inventory collection task to obtain inventory resource information corresponding to the inventory collection task; and sending the inventory resource information to an information synchronization service, so that the information synchronization service synchronizes the inventory resource information to a console, and the console displays the inventory resource information, thereby generating an inventory collection task through the information collection platform, and reporting the inventory resource information to the console after executing the inventory collection task. The control console does not need to call a bottom layer to obtain the resource information every time, the inventory resource obtaining operation is simplified, the obtaining efficiency is improved, and the visualization effect of the resource information is improved by displaying the inventory resource information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of cloud computing, and in particular to an information reporting method, device, electronic device and storage medium. Background Art

[0002] Currently, when the control layer of the cloud platform displays resources to users, it requests resource information from the bottom layer of the cloud platform by calling the bottom layer interface of the cloud platform. The bottom layer of the cloud platform obtains resource information through a single database according to the request and returns the resource information to the control layer so that the console can display the resource information.

[0003] However, every time the console displays resource information, it needs to call the underlying cloud platform to obtain it, and the console can only obtain simple, uncalculated resource information by calling the underlying cloud platform. Therefore, there are problems such as complex operation, low efficiency and poor visualization effect. Summary of the invention

[0004] In order to solve the above technical problems, the present disclosure provides an information reporting method, device, electronic device and storage medium.

[0005] A first aspect of an embodiment of the present disclosure provides an information reporting method, which is applied to an information collection platform in a cloud platform, including:

[0006] In response to preset conditions, obtain the model information and package information corresponding to the console, and generate an inventory collection task based on the model information and package information;

[0007] Execute the inventory collection task and obtain the inventory resource information corresponding to the inventory collection task;

[0008] The inventory resource information is sent to the information synchronization service, so that the information synchronization service synchronizes the inventory resource information to the console, and the console displays the inventory resource information.

[0009] A second aspect of the embodiments of the present disclosure provides an information reporting device, which is applied to an information collection platform in a cloud platform, including:

[0010] A task generation module, used to obtain the model information and package information corresponding to the console in response to preset conditions, and generate an inventory collection task based on the model information and package information;

[0011] A task execution module is used to execute the inventory collection task and obtain the inventory resource information corresponding to the inventory collection task;

[0012] The information reporting module is used to send the inventory resource information to the information synchronization service, so that the information synchronization service synchronizes the inventory resource information to the console, and the console displays the inventory resource information.

[0013] A third aspect of the embodiments of the present disclosure provides an electronic device, including:

[0014] processor;

[0015] A memory for storing executable instructions;

[0016] Among them, the processor is used to read executable instructions from the memory and execute the executable instructions to implement the information reporting method provided by the first aspect above.

[0017] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the information reporting method provided by the first aspect.

[0018] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0019] The information reporting method, device, electronic device and storage medium provided by the embodiments of the present disclosure can obtain the model information and package information corresponding to the console in response to preset conditions, and generate an inventory collection task based on the model information and package information. Then, the inventory collection task is executed to obtain the inventory resource information corresponding to the inventory collection task. After obtaining the inventory resource information, the inventory resource information is sent to the information synchronization service so that the information synchronization service synchronizes the inventory resource information to the console, and the console displays the inventory resource information. Thus, the inventory collection task can be generated through the information collection platform, and the inventory resource information can be reported to the console after the inventory collection task is executed. The console does not need to call the bottom layer every time to obtain resource information, which simplifies the inventory resource acquisition operation and improves the acquisition efficiency. By displaying the inventory resource information, the visualization effect of the resource information is improved. BRIEF DESCRIPTION OF THE DRAWINGS

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

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

[0022] Figure 1 is a flow chart of an information reporting method provided by an embodiment of the present disclosure;

[0023] Figure 2is a schematic diagram of an application scenario provided by an embodiment of the present disclosure;

[0024] Figure 3 is an interactive schematic diagram of resource collection provided by an embodiment of the present disclosure;

[0025] Figure 4 is a structural diagram of a resource collection component provided by an embodiment of the present disclosure;

[0026] Figure 5 is a structural diagram of a resource query module provided by an embodiment of the present disclosure;

[0027] Figure 6 is an interactive schematic diagram of inventory resource collection provided by an embodiment of the present disclosure;

[0028] Figure 7 It is a structural diagram of an information reporting device provided by an embodiment of the present disclosure;

[0029] Figure 8 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0030] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0031] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0032] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

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

[0034] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0035] Generally, each time the console in the existing cloud platform displays resource information, it needs to call the bottom layer of the cloud platform to obtain it, and the console can only obtain simple uncalculated resource information by calling the bottom layer of the cloud platform. Therefore, there are problems such as complex operation, low efficiency and poor visualization effect. To solve this problem, the embodiment of the present disclosure provides an information reporting method, which is introduced in conjunction with a specific embodiment below.

[0036] Figure 1 is a flow chart of an information reporting method provided by an embodiment of the present disclosure. The method can be executed by an information reporting device. The information reporting device can be implemented in software and / or hardware. The information reporting device can be configured in an electronic device, such as a server or a terminal, wherein the terminal specifically includes a computer or a tablet computer, etc. In addition, the method can be applied to Figure 2 The application scenario shown includes a control console 10, an information collection platform 20 and a preset cache database 30. It can be understood that the information reporting method provided in the embodiment of the present disclosure can also be applied in other scenarios.

[0037] like Figure 2 As shown, the control console 10, the information collection platform 20 and the preset cache database 30 can communicate and interact with each other.

[0038] The console 10 is a console in the cloud platform, which is used to interact with users and display pages.

[0039] The information collection platform 20 is a platform for collecting information between the cloud platform console 10 and the bottom layer of the cloud platform, such as collecting resource information such as CPU and memory of the host machine corresponding to the virtual machine. The information collection platform 20 can synchronize information to the console 10 through the information synchronization service UniMQ.

[0040] The information collection platform 20 may include at least one resource collection component, such as Figure 2 The resource collection component 21 and the resource collection component 22 are shown. At least one resource collection component can collect resources at the same time, and the distributed lock control of the preset cache database 30 is used to perform the task of resource collection.

[0041] The preset cache database 30 is used to store the information collected by the information collection platform. Exemplarily, the preset cache database 30 can be a key-value storage system, such as a redis database.

[0042] Combine the following Figure 2 The application scenario shown is Figure 1 The information reporting method shown is introduced, for example, Figure 2 The information collection platform 20 in the embodiment can execute the method. Figure 1 As shown, the information reporting method provided in this embodiment includes the following steps.

[0043] S110. In response to a preset condition, obtain model information and package information corresponding to the console, and generate an inventory collection task based on the model information and package information.

[0044] Among them, the preset conditions can be understood as conditions for triggering the execution of information reporting operations. For example, it can be based on a timer to determine the arrival of a preset time interval, that is, to execute the information reporting operation at a scheduled time; it can also be in response to the user's target operation, etc., which is not limited here.

[0045] Model information can be understood as parameters used to describe the specific configuration and performance of the cloud host.

[0046] Package information can be understood as the relevant information corresponding to different packages in different models. Each model contains multiple different packages.

[0047] The inventory collection task can be understood as a task used to determine the inventory information of different models and packages.

[0048] Specifically, the information collection platform can retrieve model information and package information from the console based on the console's external public interface, receive the model information and package information returned by the console, and then obtain the model information and package information, and after obtaining the model information and package information, generate an inventory collection task.

[0049] S120: Execute the inventory collection task to obtain inventory resource information corresponding to the inventory collection task.

[0050] Among them, inventory resource information may include information such as inventory quantity, saleability rate, etc. corresponding to different models and packages.

[0051] Specifically, after generating an inventory collection task, the information collection platform can determine the cluster and computing node corresponding to the inventory collection task based on the model information and package information corresponding to the inventory collection task, perform inventory calculations for different models and packages based on the resource information of the cluster and computing nodes, and obtain inventory resource information.

[0052] S130: Send the inventory resource information to the information synchronization service, so that the information synchronization service synchronizes the inventory resource information to the console, and the console displays the inventory resource information.

[0053] Among them, the information synchronization service can be understood as a one-way service for synchronizing the information of the information collection platform to the console.

[0054] Specifically, after acquiring the inventory resource information, the information collection platform sends the inventory resource information to the information synchronization service, so that the information synchronization service synchronizes the received inventory resource information to the console. After receiving the inventory resource information, the console displays the inventory resource information to realize the visualization of the inventory resource information.

[0055] In the disclosed embodiment, it is possible to obtain the model information and package information corresponding to the console in response to preset conditions, and generate an inventory collection task based on the model information and package information. Then, the inventory collection task is executed to obtain the inventory resource information corresponding to the inventory collection task. After obtaining the inventory resource information, the inventory resource information is sent to the information synchronization service, so that the information synchronization service synchronizes the inventory resource information to the console, and the console displays the inventory resource information. Thus, the inventory collection task can be generated through the information collection platform, and the inventory resource information is reported to the console after the inventory collection task is executed. The console does not need to call the bottom layer every time to obtain resource information, which simplifies the inventory resource acquisition operation and improves the acquisition efficiency. By displaying the inventory resource information, the visualization effect of the resource information is improved.

[0056] On the basis of the above-mentioned embodiments of the present disclosure, after obtaining the model information and package information to be queried by the console, the information reporting method may also include: obtaining at least one area corresponding to the console, and determining at least one available area corresponding to each area; for each available area, obtaining at least one first cluster information corresponding to the available area and at least one target computing node information corresponding to each first cluster; establishing a correspondence between the available area, at least one first cluster, and at least one target computing node; constructing a first resource view corresponding to each available area based on the correspondence, and constructing a second resource view corresponding to each first cluster based on the resource information in each first cluster information; storing the correspondence, the first resource view, and the second resource view in a preset cache database.

[0057] The first cluster information may include a name corresponding to the first cluster, metadata information corresponding to the cluster, and the like.

[0058] The first resource view includes resource information such as the occupied amount and available amount of the CPU, memory, disk, etc. corresponding to the available area.

[0059] The second resource view includes resource information such as the corresponding usage and available amount of the CPU, memory, disk, etc. of the corresponding cluster.

[0060] It should be noted that there is no restriction on the order of constructing the first resource view and the second resource view. The first resource view can be constructed first and then the second resource view, or the second resource view can be constructed first and then the first resource view. The first resource view and the second resource view can also be constructed at the same time. There is no restriction here.

[0061] Figure 3 is an interactive schematic diagram of resource collection provided by an embodiment of the present disclosure, such as Figure 3As shown, the information collection platform can start a task for pulling resource information based on preset conditions, such as reaching a preset time interval, pull the regional information stored in the MySQL database, that is, the region information, from the database, and for each region, start a task for pulling the available areas of each region, and call the computing component interface (for example, the Nova component responsible for the computing part in OpenStack) to pull all available areas corresponding to each region; after obtaining all available areas corresponding to each region, for each available area, call the computing component interface to query and pull at least one first cluster information corresponding to each region and at least one first cluster corresponding to each first cluster. target computing node information; after obtaining the first cluster information and the target computing node information corresponding to each area, establish a correspondence between the available areas, at least one first cluster and at least one target computing node, and build a first resource view corresponding to each available area based on the correspondence, the first cluster information and the target computing node information, update or store the first resource view in a preset cache database, and push the first resource view to the information synchronization service; and build a second resource view based on the first cluster information, update (not for the first time) or store (for the first time) the second resource view in the preset cache database, and push the second resource view to the information synchronization service.

[0062] Among them, when the preset cache database is a redis database, in order to facilitate query, the corresponding relationship can be stored in the form of a key-value pair, and the resource information of the target computing node can be stored with the name of the target computing node as the key; the information of multiple target computing nodes corresponding to the first cluster can be stored with the name of the first cluster as the key; the metadata of the first cluster can be stored with the name of the first cluster as the key; the name of the available area can be used as the key to store the name of the first cluster corresponding to the available area; and the information of the available area corresponding to it can be stored with the name of the area as the key.

[0063] When storing the first resource view and the second resource view in the preset cache database, the first resource view is stored with the name of the available area as the key, and the second resource view is stored with the name of the first cluster as the key.

[0064] In the disclosed embodiment, after obtaining the model information and package information to be queried by the console, a resource view can be constructed with available areas and / or clusters as the granularity, and the resource view can be updated or stored in a preset cache database to provide resource data support for subsequent execution of inventory collection tasks, while improving the accuracy of the inventory resource information corresponding to the acquired inventory collection tasks.

[0065] In the embodiment of the present disclosure, the information collection platform includes at least one task generation component and at least one task execution component.

[0066] Figure 4 is a schematic diagram of the structure of a resource collection component provided by an embodiment of the present disclosure, such as Figure 4 As shown, a resource collection component such as resource collection component 21 or resource collection component 22 may include at least one task generation component such as Figure 4 The task generation component 31, the task generation component 32, and at least one task execution component are shown as Figure 4 The task execution components 41 and 42 are shown.

[0067] Among them, the task generation component 31 and the task generation component 32 are used to generate tasks and add the generated tasks to the task queue; the task execution component 41 and the task execution component 42 are used to monitor the tasks in the task queue, and after monitoring the existence of new tasks in the task queue, take out the new tasks from the task queue, and execute the collection operations corresponding to the new tasks, generate resource records corresponding to the new tasks for storage, and send them to the message queue, and send them to the console in the form of a message queue.

[0068] Multiple task generation components can perform task generation operations simultaneously, and multiple task execution components can perform collection operations corresponding to the tasks simultaneously. By performing resource or data collection simultaneously with multiple task generation components and multiple task execution components, the efficiency of resource or data collection is improved.

[0069] In an embodiment of the present disclosure, generating an inventory collection task based on model information and package information may specifically include: determining at least one target available area corresponding to the model information based on the model information; for each target available area, dividing the task based on the model as the granularity based on at least one task generation component and at least one target model information corresponding to the available area to obtain at least one collection subtask, determining the at least one collection subtask as an inventory collection task, and adding the at least one collection subtask to a task queue.

[0070] In some embodiments of the present disclosure, the information collection platform determines the target available area corresponding to each model based on the model information, and for each target available area, determines at least one target model information corresponding to the target available area, and divides the tasks based on the model granularity based on the task generation component in the resource collection component to obtain at least one collection task, and then determines at least one collection task as an inventory collection task and adds it to the task queue.

[0071] In other embodiments of the present disclosure, after acquiring the machine model information, the information collection platform can directly divide the tasks based on the machine model information based on the task generation component in the resource collection component with the machine model as the granularity to obtain at least one collection task, and then determine at least one collection task as an inventory collection task and add it to the task queue.

[0072] Furthermore, executing the inventory collection task to obtain inventory resource information corresponding to the inventory collection task may specifically include: extracting at least one collection subtask from the task queue based on at least one task execution component, and executing at least one collection subtask to obtain computing resource information corresponding to each collection subtask, and determining the computing resource information corresponding to the at least one collection subtask as the inventory resource information.

[0073] Specifically, after the information collection platform generates an inventory collection task based on at least one task generation component and adds it to the task queue, at least one task execution component monitors the presence of a newly added collection task in the task queue, then extracts at least one collection subtask from the task queue, and calls the computing component interface to execute at least one collection subtask to obtain the computing resource information corresponding to each collection subtask, wherein the computing resource information may include first computing resource information of the model corresponding to each collection subtask, and may also include second computing resource information corresponding to different packages corresponding to the model, the computing resource information is determined as inventory resource information, the inventory resource information is stored and synchronized to the information synchronization service, so that the information synchronization service synchronizes the inventory resource information to the console.

[0074] In the embodiments of the present disclosure, the collection of resources or data can be performed through at least one task generation component and at least one task execution component, thereby improving the efficiency of resource or data collection.

[0075] In an embodiment of the present disclosure, after obtaining the computing resource information corresponding to each acquisition subtask, the information reporting method may further include: for each target available area, constructing a first inventory resource view with the available area as a dimension based on the computing resource information; storing the first inventory resource view in a preset cache database; after constructing the first inventory resource view with the available area as a dimension based on the computing resource information, determining at least one target cluster corresponding to each target model in the target available area; constructing a second inventory resource view with the cluster as a dimension based on the computing resource information and at least one target cluster; storing the second inventory resource view in the preset cache database, and adding field information of at least one target cluster in the inventory information corresponding to the target model.

[0076] The field information of at least one target cluster may include field information such as a name and an identifier of the target cluster.

[0077] Furthermore, sending the inventory resource information to the information synchronization service so that the information synchronization service synchronizes the inventory resource information to the console may specifically include: sending the first inventory resource view and the second inventory resource view to the information synchronization service, and synchronizing the first inventory resource view and the second inventory resource view to the console based on the information synchronization service.

[0078] In the disclosed embodiment, inventory resource views of different dimensions can be constructed and sent to the information synchronization service, so that the information synchronization service synchronizes the inventory resource views of different dimensions to the console, thereby enabling the console to directly display the inventory resource views of different dimensions, thereby improving the visualization effect of the resource view and further improving the user experience.

[0079] In the embodiment of the present disclosure, the information reporting method may also include receiving an information query request sent by a console or a third-party platform based on a preset interface; executing the information query request, searching for target resource information corresponding to the information query request from a preset cache database, and returning the target resource information to the console or the third-party platform.

[0080] Among them, the target resource information includes resource information such as inventory, saleability, etc. of the model or package to be queried corresponding to the information query request.

[0081] Figure 5 is a schematic diagram of the structure of a resource query module provided by an embodiment of the present disclosure, such as Figure 5 As shown, the information collection platform is provided with an information collection platform interface for communicating with the console or the third-party platform, i.e., the preset interface in the embodiment of the present disclosure. The interface can receive information query requests sent by the console or the third-party platform, and after receiving the information query request, the information query request is executed based on the resource collection component. The resource collection component searches for the target resource information corresponding to the information query request from the preset cache database, and returns the target resource information to the console or the third-party platform.

[0082] Furthermore, executing the information query request and searching the preset cache database for target resource information corresponding to the information query request may specifically include: obtaining cluster metadata information corresponding to the model to be queried in the information query request; searching the preset cache database based on the cluster metadata information to determine the second cluster corresponding to the information query request; searching the preset cache database for a target inventory resource view corresponding to the second cluster, and determining the target resource information based on the target inventory resource view.

[0083] Figure 6 is an interactive schematic diagram of inventory resource collection provided by an embodiment of the present disclosure, such as Figure 6As shown, the information collection platform can periodically start a task for collecting inventory resources based on preset conditions or receive an information query request sent by a console or a third-party platform based on a preset interface, and then call the console interface of the console to obtain the instance package details corresponding to the task or information query request (such as the corresponding model information and package information, etc.), and the console returns the instance package details. After receiving the instance package details, the information collection platform calls the computing component interface according to the classification rules, which can be classified according to regions, available areas, models, etc., to obtain the inventory information of each package of the specified model corresponding to the task or information query request. The computing component interface responds to the calling operation of the information collection platform and requests the computing component scheduler to obtain the inventory information of each package. The computing component scheduler returns the inventory information of each package to the computing component interface. After receiving the inventory information of each package returned by the computing component scheduler, the computing component interface returns the inventory information of each package to the information collection platform; the information collection platform According to the cluster metadata information contained in the task or information query request, a search is performed from a preset cache database based on the cluster metadata information, and a second cluster corresponding to the task or information query request is screened and determined. According to the name of the second cluster, a target inventory resource view corresponding to the second cluster is searched from the preset cache database, and the target resource information is determined based on the target inventory resource view, and the corresponding fields are updated to the model inventory, wherein the corresponding fields may include the CPU selling ratio corresponding to the model (only the cluster oversell ratio corresponding to the second cluster may be displayed), CPU selling rate (%), total CPU, remaining CPU available amount, remaining memory available amount, total memory, memory selling rate (%) and other information; then, the model and / or package inventory information is saved to the preset cache database, and the model and / or package inventory information is pushed to the information synchronization service at the same time, and the information synchronization service synchronizes the model and / or package inventory information to the console, and the console displays the inventory resources after receiving the model and / or package inventory information.

[0084] In the embodiments of the present disclosure, not only can the inventory collection task be started and executed based on preset conditions, but also information query requests received by the console or a third-party platform can be received and executed. While regularly reporting inventory resource information to satisfy the resource display of the console, it can also meet the user's irregular information query needs, simplifying the inventory resource acquisition operation and improving the acquisition efficiency, and by displaying inventory resource information, improving the visualization of resource information, and further improving the user experience.

[0085] Figure 7 It is a structural diagram of an information reporting device provided in an embodiment of the present disclosure.

[0086] In the disclosed embodiment, the information reporting device is applied to the information collection platform in the cloud platform, and can be specifically set in an electronic device, which is understood as a part of the functional modules in the above electronic device. Specifically, the electronic device can be a server or a terminal, wherein the terminal specifically includes a computer or a tablet computer, etc., which is not limited here.

[0087] like Figure 7 As shown, the information reporting device 700 may include a task generating module 710 , a task executing module 720 and an information reporting module 730 .

[0088] The task generation module 710 can be used to obtain the model information and package information corresponding to the console in response to preset conditions, and generate an inventory collection task based on the model information and package information.

[0089] The task execution module 720 may be used to execute an inventory collection task and obtain inventory resource information corresponding to the inventory collection task.

[0090] The information reporting module 730 may be used to send the inventory resource information to the information synchronization service, so that the information synchronization service synchronizes the inventory resource information to the console, and the console displays the inventory resource information.

[0091] In the disclosed embodiment, it is possible to obtain the model information and package information corresponding to the console in response to preset conditions, and generate an inventory collection task based on the model information and package information. Then, the inventory collection task is executed to obtain the inventory resource information corresponding to the inventory collection task. After obtaining the inventory resource information, the inventory resource information is sent to the information synchronization service, so that the information synchronization service synchronizes the inventory resource information to the console, and the console displays the inventory resource information. Thus, the inventory collection task can be generated through the information collection platform, and the inventory resource information is reported to the console after the inventory collection task is executed. The console does not need to call the bottom layer every time to obtain resource information, which simplifies the inventory resource acquisition operation and improves the acquisition efficiency. By displaying the inventory resource information, the visualization effect of the resource information is improved.

[0092] In some embodiments of the present disclosure, the information reporting device 700 may further include a resource collection module.

[0093] The resource acquisition module may be used to obtain at least one region corresponding to the console after obtaining the model information and package information corresponding to the console, and determine at least one available region corresponding to each region;

[0094] For each available area, obtain at least one first cluster information corresponding to the available area and at least one target computing node information corresponding to each first cluster;

[0095] Establishing a correspondence between the available zone, at least one first cluster, and at least one target computing node;

[0096] Building a first resource view corresponding to each available area based on the corresponding relationship, and building a second resource view corresponding to each first cluster based on the resource information in each first cluster information;

[0097] The corresponding relationship, the first resource view and the second resource view are stored in a preset cache database.

[0098] In some embodiments of the present disclosure, the information collection platform includes at least one task generation component and at least one task execution component.

[0099] The task generation module 710 may be specifically configured to determine at least one target available area corresponding to the model information based on the model information;

[0100] For each target available area, tasks are divided based on the model granularity based on at least one task generation component and at least one target model information corresponding to the available area to obtain at least one collection subtask, determine the at least one collection subtask as an inventory collection task, and add the at least one collection subtask to the task queue.

[0101] The task execution module 720 can be specifically used to extract at least one collection subtask from the task queue based on at least one task execution component, and execute at least one collection subtask to obtain the computing resource information corresponding to each collection subtask, and determine the computing resource information corresponding to at least one collection subtask as inventory resource information.

[0102] In some embodiments of the present disclosure, the information reporting device 700 may further include a first view building module.

[0103] The inventory resource view construction module may be used to construct a first inventory resource view with the available area as a dimension based on the computing resource information for each target available area after obtaining the computing resource information corresponding to each acquisition subtask;

[0104] The first inventory resource view is stored in a preset cache database.

[0105] In some embodiments of the present disclosure, the information reporting device 700 may further include a second view building module.

[0106] The second view construction module may be used to determine at least one target cluster corresponding to each target machine model in the target available area after constructing the first inventory resource view with the available area as a dimension based on the computing resource information;

[0107] Building a second inventory resource view with cluster as a dimension based on the computing resource information and at least one target cluster;

[0108] The second inventory resource view is stored in a preset cache database, and field information of at least one target cluster is added to the inventory information corresponding to the target model.

[0109] The information reporting module 730 may be specifically configured to send the first inventory resource view and the second inventory resource view to the information synchronization service, and synchronize the first inventory resource view and the second inventory resource view to the console based on the information synchronization service.

[0110] In some embodiments of the present disclosure, the information reporting device 700 may further include an information query module.

[0111] The information query module can be used to receive information query requests sent by the console or a third-party platform based on a preset interface;

[0112] Execute the information query request, search for the target resource information corresponding to the information query request from the preset cache database, and return the target resource information to the console or the third-party platform.

[0113] In some embodiments of the present disclosure, the information query module may be specifically used to obtain cluster metadata information corresponding to the model to be queried in the information query request;

[0114] Searching a preset cache database based on the cluster metadata information to determine a second cluster corresponding to the information query request;

[0115] The target inventory resource view corresponding to the second cluster is searched in a preset cache database, and the target resource information is determined based on the target inventory resource view.

[0116] It should be noted that Figure 7 The information reporting device 700 shown can execute each step in the above method embodiment and realize each process and effect in the above method embodiment, which will not be described in detail here.

[0117] Figure 8 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure.

[0118] In the disclosed embodiment, Figure 8 The electronic device shown may be a server or a terminal, wherein the terminal specifically includes a computer or a tablet computer, etc., which is not limited here.

[0119] like Figure 8 As shown, the electronic device may include a processor 810 and a memory 820 storing computer program instructions.

[0120] Specifically, the processor 810 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present disclosure.

[0121] The memory 820 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 820 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 820 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 820 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 820 is a non-volatile solid-state memory. In a particular embodiment, the memory 820 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.

[0122] The processor 810 reads and executes the computer program instructions stored in the memory 820 to perform the steps of the information reporting method provided in the embodiment of the present disclosure.

[0123] In one example, the electronic device may further include a transceiver 830 and a bus 840. Figure 8 As shown, the processor 810, the memory 820 and the transceiver 830 are connected via a bus 840 and communicate with each other.

[0124] The bus 840 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 840 may include one or more buses.

[0125] The embodiments of the present disclosure further provide a computer-readable storage medium, which may store a computer program. When the computer program is executed by a processor, the processor implements the information reporting method provided by the embodiments of the present disclosure.

[0126] The above-mentioned storage medium may, for example, include a memory 820 of computer program instructions, and the above-mentioned instructions may be executed by the processor 810 of the electronic device to complete the information reporting method provided by the embodiment of the present disclosure. Optionally, the storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a ROM, a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc ROM, CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0127] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An information reporting method, characterized in that: The information collection platform used in the cloud platform includes: In response to a preset condition, obtaining model information and package information corresponding to the console, and generating an inventory collection task based on the model information and the package information; Execute the inventory collection task to obtain inventory resource information corresponding to the inventory collection task; The inventory resource information is sent to an information synchronization service, so that the information synchronization service synchronizes the inventory resource information to the console, and the console displays the inventory resource information.

2. The method according to claim 1, characterized in that After obtaining the model information and package information corresponding to the console, the method further includes: Obtain at least one region corresponding to the console, and determine at least one available region corresponding to each region; For each available area, obtain at least one first cluster information corresponding to the available area and at least one target computing node information corresponding to each first cluster; Establishing a correspondence between the available zone, at least one first cluster, and at least one target computing node; Constructing a first resource view corresponding to each available area based on the corresponding relationship, and constructing a second resource view corresponding to each first cluster based on the resource information in each first cluster information; The corresponding relationship, the first resource view and the second resource view are stored in a preset cache database.

3. The method according to claim 1, characterized in that The information collection platform includes at least one task generation component and at least one task execution component, and the generating of the inventory collection task based on the model information and the package information includes: Determine at least one target available area corresponding to the model information based on the model information; For each target available area, based on the at least one task generation component and at least one target model information corresponding to the available area, tasks are divided based on the model granularity to obtain at least one collection subtask, the at least one collection subtask is determined as the inventory collection task, and the at least one collection subtask is added to a task queue; The executing the inventory collection task to obtain inventory resource information corresponding to the inventory collection task includes: Based on the at least one task execution component, the at least one collection subtask is extracted from the task queue respectively, and the at least one collection subtask is executed to obtain the computing resource information corresponding to each collection subtask, and the computing resource information corresponding to the at least one collection subtask is determined as the inventory resource information.

4. The method according to claim 3, characterized in that After obtaining the computing resource information corresponding to each acquisition subtask, the method may further include: For each target available area, constructing a first inventory resource view with the available area as a dimension based on the computing resource information; The first inventory resource view is stored in a preset cache database.

5. The method according to claim 4, characterized in that After constructing a first inventory resource view with available areas as dimensions based on the computing resource information, the method further includes: Determine at least one target cluster corresponding to each target machine model in the target available area; Based on the computing resource information and the at least one target cluster, construct a second inventory resource view with cluster as a dimension; storing the second inventory resource view in the preset cache database, and adding field information of the at least one target cluster to the inventory information corresponding to the target model; The sending the inventory resource information to the information synchronization service so that the information synchronization service synchronizes the inventory resource information to the console includes: The first inventory resource view and the second inventory resource view are sent to the information synchronization service, and the first inventory resource view and the second inventory resource view are synchronized to the console based on the information synchronization service.

6. The method according to claim 1, characterized in that The method further comprises: Receiving an information query request sent by the console or a third-party platform based on a preset interface; The information query request is executed, target resource information corresponding to the information query request is searched from a preset cache database, and the target resource information is returned to the console or the third-party platform.

7. The method according to claim 6, characterized in that The executing the information query request and searching for target resource information corresponding to the information query request from a preset cache database includes: Obtaining cluster metadata information corresponding to the model to be queried in the information query request; Searching the preset cache database based on the cluster metadata information to determine a second cluster corresponding to the information query request; The target inventory resource view corresponding to the second cluster is searched in the preset cache database, and the target resource information is determined based on the target inventory resource view.

8. An information reporting device, characterized in that: The information collection platform used in the cloud platform includes: A task generation module, used to obtain model information and package information corresponding to the console in response to preset conditions, and generate an inventory collection task based on the model information and the package information; A task execution module, used to execute the inventory collection task and obtain the inventory resource information corresponding to the inventory collection task; The information reporting module is used to send the inventory resource information to the information synchronization service, so that the information synchronization service synchronizes the inventory resource information to the console, and the console displays the inventory resource information.

9. An electronic device, characterized in that: include: processor; A memory for storing executable instructions; The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the information reporting method described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the processor implements the information reporting method according to any one of claims 1 to 7.